feat: added print events and improved returned values#7235
feat: added print events and improved returned values#7235brice-stacks wants to merge 6 commits into
Conversation
|
@rafa-stacks Let me know if this covers everything you'd like to see in the events. |
Coverage Report for CI Build 26574518384Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-38.3%) to 47.617%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions88543 previously-covered lines in 343 files lost coverage.
Coverage Stats
💛 - Coveralls |
rafa-stacks
left a comment
There was a problem hiding this comment.
Thanks for this @brice-stacks ! Just a question about print formatting
| ) | ||
|
|
||
| (print { | ||
| bond-index: bond-index, |
There was a problem hiding this comment.
Would it be possible to add topic: "setup-bond" here (and similar topics to other print functions)? It would be super helpful for parsing and classification
There was a problem hiding this comment.
Ah, yeah, you're right. I was thinking that the print event already included which function it came from, but it seems that it does not. I can add that. One note, it looks like the event already uses the name topic to just show the event type, print. It's at a different level so it wouldn't conflict, but would it be more clear to use a different name or do you want to stick with topic?
There was a problem hiding this comment.
would it be more clear to use a different name or do you want to stick with topic
good point... it wouldn't conflict per se but I'm down to tweak the property name to make it easier. What about action, type, kind or something like that? Any name you pick would be fine by me 👍
There was a problem hiding this comment.
@brice-stacks I think you maybe forgot to push that commit?
There was a problem hiding this comment.
🤦♂️ pushed now. I just left it as topic.
There was a problem hiding this comment.
@hstove-stacks related question... from this setup-bond print event, how can I determine when this bond will activate and/or unlock? (i.e. at which pox cycle, burn height, etc.)
There was a problem hiding this comment.
I can add the starting reward cycle and burn block height to the print event if that would be convenient.
The print event does NOT include the function name, so we need an explicit `topic` included in the printed value.
| amount-ustx: (get amount-ustx current-membership), | ||
| amount-sats: amount-sats, | ||
| first-reward-cycle: first-reward-cycle, | ||
| num-cycles: num-cycles, |
There was a problem hiding this comment.
@brice-stacks could you also provide the updated unlock-burn-height and unlock-cycle here? I assume modifying num-cycles would also modify the unlock height
EDIT: Now that I think of it, a bond's unlock schedule can never change, right? so these values will never really change?
There was a problem hiding this comment.
That's right. Let me know if you still need them any way, or if we can resolve this.
Added
printevents for all interesting actions on the pox-5 contract and also improved the return values for some.