-
Notifications
You must be signed in to change notification settings - Fork 23
Improve query stake-address-info output #1313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b7e6878 to
7e9d541
Compare
palas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be breaking? Because I am guessing cip129SerialiseRaw returns something different than UsingRawBytesHex (the header)
|
looking good now: ${cardanocli} ${cliEra} query stake-address-info --address stake_test1urqntq4wexjylnrdnp97qq79qkxxvrsa9lcnwr7ckjd6w0cr04y4p | jq[
{
"address": "stake_test1urqntq4wexjylnrdnp97qq79qkxxvrsa9lcnwr7ckjd6w0cr04y4p",
"govActionDeposits": {},
"rewardAccountBalance": 200000000000,
"stakeDelegation": {
"stakePoolBech32": "pool1rdaxrw3722f0x3nx4uam9u9c6dh9qqd2g83r2uyllf53qmmj5uu",
"stakePoolHex": "1b7a61ba3e5292f34666af3bb2f0b8d36e5001aa41e235709ffa6910"
},
"stakeRegistrationDeposit": 2000000,
"voteDelegation": {
"keyHashBech32": "drep1ytwmwvtd0a8lr45ssner2tjxzv5y8q03w3606yeald9mdmgmwecja",
"keyHashHex": "22ddb7316d7f4ff1d69084f2352e4613284381f17474fd133dfb4bb6ed",
"keyHashLedger": "ddb7316d7f4ff1d69084f2352e4613284381f17474fd133dfb4bb6ed"
}
}
]${cardanocli} ${cliEra} query stake-address-info --address stake_test1uqjfvelzvn48j39euddwdkd54w973dwe025mdx79h7qms6sm4zrfx | jq[
{
"address": "stake_test1uqjfvelzvn48j39euddwdkd54w973dwe025mdx79h7qms6sm4zrfx",
"govActionDeposits": {},
"rewardAccountBalance": 8355636437,
"stakeDelegation": null,
"stakeRegistrationDeposit": 2000000,
"voteDelegation": {
"scriptHashBech32": "drep1yd6cmmc6qf5fy5g6flrsxh6ydps40rgj5je92puq6fvfxhgk7ydq7",
"scriptHashHex": "23758def1a026892511a4fc7035f446861578d12a4b2550780d258935d",
"scriptHashLedger": "758def1a026892511a4fc7035f446861578d12a4b2550780d258935d"
}
}
] |
palas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
4af7529 to
67b0e50
Compare
|
can we settle on the naming and do a bugfix release before the holidays? the current output is broken. i would like to keep it as shown here already working? #1313 (comment) |
Update friendlyDRep to use CIP129 identifiers Improve query stake-address-info output now includes the correct cip129 hex format as well as the Ledger state format. This is still needed, for example, to further queries based on this output.
67b0e50 to
a30aeef
Compare
|
Thx for the bugfix. New SPO Scripts already released. 🙏 |
query stake-address-info now includes the correct cip129 hex format as well as the Ledger state format. This is still needed, for example, to further queries based on this output.
Changelog
Context
Fixes #1311
How to trust this PR
The output provides the 3 formats used by explorers and tools: CIP129Bech32, CIP129Hex and LedgerStateHex, both for Dreps with keys and for script based ones:
cardano-cli conway query stake-address-info --address stake1u8c4jt34q0hzs6pdzky26da0g03fdqxpzne84s0q40twjpgcsfpz3 [ { "address": "stake1u8c4jt34q0hzs6pdzky26da0g03fdqxpzne84s0q40twjpgcsfpz3", "govActionDeposits": {}, "rewardAccountBalance": 827782, "stakeDelegation": { "stakePoolBech32": "pool14wk2m2af7y4gk5uzlsmsunn7d9ppldvcxxa5an9r5ywek8330fg", "stakePoolHex": "abacadaba9f12a8b5382fc370e4e7e69421fb59831bb4ecca3a11d9b" }, "stakeRegistrationDeposit": 2000000, "voteDelegation": { "keyHashBech32": "drep1ygne2h7vn5ghnpz06mg0g8zehy0euz8daxhpmsekvc8encsfd5ac9", "keyHashHex": "2227955fcc9d1179844fd6d0f41c59b91f9e08ede9ae1dc336660f99e2", "keyHashLedger": "27955fcc9d1179844fd6d0f41c59b91f9e08ede9ae1dc336660f99e2" } } ]cardano-cli conway query stake-address-info --address stake1u8h3ygf3vc8jz9ju4ea63cy0ugcx03mwfxqlkqhxdnhnavqna2vcj [ { "address": "stake1u8h3ygf3vc8jz9ju4ea63cy0ugcx03mwfxqlkqhxdnhnavqna2vcj", "govActionDeposits": {}, "rewardAccountBalance": 27665, "stakeDelegation": { "stakePoolBech32": "pool1gqgyta9sku3crjzfl9kj7kxsgfkt98y98yeu09kx22zscrezuj7", "stakePoolHex": "401045f4b0b72381c849f96d2f58d0426cb29c853933c796c652850c" }, "stakeRegistrationDeposit": 2000000, "voteDelegation": { "scriptHashBech32": "drep1yv4uesaj92wk8ljlsh4p7jzndnzrflchaz5fzug3zxg4naqkpeas3", "scriptHashHex": "232bccc3b22a9d63fe5f85ea1f48536cc434ff17e8a8917111119159f4", "scriptHashLedger": "2bccc3b22a9d63fe5f85ea1f48536cc434ff17e8a8917111119159f4" } } ]Checklist