Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(json-rpc): get transaction block raw effects (MystenLabs#19438)
## Description Add the ability to get transaction effects in BCS form, from JSON-RPC's read path, by passing the `showRawEffects` option. ## Test plan ``` sui$ cargo build --bin sui --features indexer sui$ $SUI start --force-regenesis --with-indexer --with-graphql --with-faucet ``` Then in another session: ``` sui$ $SUI client faucet ``` Find the transaction `$DIGEST` of the faucet transaction, and then fetch it with: ``` curl -LX POST "http://localhost:9000" \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc": "2.0", "method": "sui_getTransactionBlock", "id": 1, "params": ["'$DIGEST'", { "showRawEffects": true }] }' | jq . ``` And corroborate it against the following GraphQL query: ``` query ($digest: String!) { transactionBlock(digest: $digest) { effects { bcs } } } ``` Which can be requested at `localhost:9125`. --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [x] Nodes (Validators and Full nodes): `sui_getTransactionBlock` and `sui_multiGetTransactionBlock` JSON-RPC endpoints will now heed the `showRawEffects` option, and return the BCS representation of the transaction effects. - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API:
- Loading branch information