Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cherry-pick][rpc][bugfix] Remove the usage of get_past_object_read f…
…rom get_coin_… (#11999) …metadata (#11971) ## Description The current implementation of `get_coin_metadata` relies on `get_past_object_read`, which stops working if the fullnode has pruning enabled. This is unnecessary because we only need the latest version of the coinmetada object(if it is wrapped, then it's okay to return null). ## Test Plan tested locally ``` curl --location 'https://mainnet.sui.rpcpool.com' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc":"2.0", "id":1, "method":"suix_getCoinMetadata", "params":["0x2::sui::SUI"] }' ``` ``` { "jsonrpc": "2.0", "result": { "decimals": 9, "name": "Sui", "symbol": "SUI", "description": "", "iconUrl": null, "id": "0x9258181f5ceac8dbffb7030890243caed69a9599d2886d957a9cb7656af3bdb3" }, "id": 1 } ``` --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [x] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes Fixed a bug for `get_coin_metadata` which can return null when the fullnode is pruned ## Description Describe the changes or additions included in this PR. ## Test Plan How did you test the new or updated feature? --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
- Loading branch information