sui icon indicating copy to clipboard operation
sui copied to clipboard

filter issue when pass FromOrToAddress

Open avaghasiya-supra opened this issue 1 year ago • 10 comments

Steps to Reproduce Issue

[Error: Error checking transaction input objects: Unsupported("Some(FromOrToAddress { addr: 0x })")]

const client = new SuiClient({
      url: 'https://fullnode.devnet.sui.io:443/',
    });
const fromTransactionBlocks = await suiProvider.queryTransactionBlocks({
          filter: {
            FromOrToAddress: { addr: walletAddress },
          },
          options: {
            showInput: true,
          },
        });

Expected Result

we are not getting a response as expected.

System Information

  • OS: iOS/Android
  • Platform: React Native

avaghasiya-supra avatar Oct 17 '23 06:10 avaghasiya-supra

@hayes-mysten do you maybe have a thought of what might have gone wrong here?

stefan-mysten avatar Oct 18 '23 04:10 stefan-mysten

It looks like this is not implemented/supported by the full node API, the error comes from here: https://github.com/MystenLabs/sui/blob/main/crates/sui-storage/src/indexes.rs#L669-L693 but is part of the RPC spec. We re-use the same TransactionFilter type in multiple places, but not all the methods that accept that filter implement the all the filter options

hayes-mysten avatar Oct 18 '23 17:10 hayes-mysten

This Filter is a work in-progress and isn't available on fullnodes yet, but it's being worked on and should be available soon

hayes-mysten avatar Oct 18 '23 18:10 hayes-mysten

by when we expect it?

avaghasiya-supra avatar Oct 20 '23 10:10 avaghasiya-supra

any update?

avaghasiya-supra avatar Feb 15 '24 06:02 avaghasiya-supra

when support that filter?

kecson avatar Feb 21 '24 10:02 kecson

@hayes-mysten what do mean by soon ?)

DzmitryTurko avatar Apr 29 '24 10:04 DzmitryTurko

@DzmitryTurko I just checked with the team working on this, and it sounds like this filter will not be added to the fullnode version of the JSON RPC API. It is not available in the GraphQL API yet, but it will be added there as well in the future

hayes-mysten avatar Apr 29 '24 18:04 hayes-mysten

Hello @hayes-mysten any update?

avaghasiya-supra avatar Jul 08 '24 07:07 avaghasiya-supra

Unfortunately not, The GraphQL team has been very focused on working through performance issues, and hasn't had time to prioritize this feature yet. I don't work on this myself, but this is a known blocker for people wanting to migrate to GraphQL, and is definitely still on their road map

hayes-mysten avatar Jul 08 '24 19:07 hayes-mysten