soroban-cli
soroban-cli copied to clipboard
Render events as json in stellar events pretty output instead of as rust debug
Events in pretty print mode print as Rust debug format.
We should print as JSON for the same reasons as, because developers are more familiar with the JSON format than the Rust debug format:
- https://github.com/stellar/stellar-cli/pull/1600
Example:
$ stellar contract event --ledger 3423
...
Event 0000014701673062400-0000000000 [DIAGNOSTIC]:
Ledger: 3423 (closed at 2024-09-17T22:20:30Z)
Contract:
Topics:
Symbol(ScSymbol(StringM(fn_call)))
Bytes(ScBytes(BytesM(2ab7f467d192fcb2aefa138e0aae1f596216692d5e3d631a2c2ee81e263ab83f)))
Symbol(ScSymbol(StringM(set_price)))
Value: Vec(Some(ScVec(VecM([Vec(Some(ScVec(VecM([I128(Int128Parts { hi: 0, lo: 0 }), I128(Int128Parts { hi: 0, lo: 62622635909 }), I128(Int128Parts { hi: 0, lo: 99750087794911 }), I128(Int128Parts { hi: 0, lo: 1498490882301 }), I128(Int128Parts { hi: 0, lo: 199315054592 }), I128(Int128Parts { hi: 0, lo: 80315405446 }), I128(Int128Parts { hi: 0, lo: 110532281494896 })])))), U64(1726611600000)]))))
...