From 74e3cedeec5215f3286af6565c1503e578a848fb Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Thu, 1 Feb 2024 19:33:19 +0100 Subject: [PATCH] feat: add signer-key to synthetic pox events --- pox-locking/src/events.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pox-locking/src/events.rs b/pox-locking/src/events.rs index 32909f47b..cc727f2ca 100644 --- a/pox-locking/src/events.rs +++ b/pox-locking/src/events.rs @@ -127,7 +127,9 @@ fn create_event_info_data_code( start-burn-height: {start_burn_height}, ;; how long to lock, in burn blocks ;; equal to args[3] - lock-period: {lock_period} + lock-period: {lock_period}, + ;; equal to args[4] + signer-key: {signer_key} }} }} "#, @@ -135,6 +137,7 @@ fn create_event_info_data_code( lock_period = &args[3], pox_addr = &args[1], start_burn_height = &args[2], + signer_key = &args.get(3).map_or("none".to_string(), |v| v.to_string()), ) } "delegate-stack-stx" => { @@ -244,12 +247,15 @@ fn create_event_info_data_code( ;; equal to args[0] extend-count: {extend_count}, ;; new unlock burnchain block height - unlock-burn-height: new-unlock-ht + unlock-burn-height: new-unlock-ht, + ;; equal to args[2] + signer-key: {signer_key} }} }}) "#, extend_count = &args[0], pox_addr = &args[1], + signer_key = &args.get(2).map_or("none".to_string(), |v| v.to_string()), ) } "delegate-stack-extend" => { @@ -307,12 +313,15 @@ fn create_event_info_data_code( (unwrap-panic (map-get? logged-partial-stacked-by-cycle {{ pox-addr: {pox_addr}, sender: tx-sender, reward-cycle: {reward_cycle} }}))), ;; delegator (this is the caller) - delegator: tx-sender + delegator: tx-sender, + ;; equal to args[2] + signer-key: {signer_key} }} }} "#, pox_addr = &args[0], - reward_cycle = &args[1] + reward_cycle = &args[1], + signer_key = &args.get(2).map_or("none".to_string(), |v| v.to_string()), ) } "delegate-stx" => {