Cannot fetch MarketCoin<T> token info using

Hello, I’m trying to find out why I cannot fetch coin metadata for a specific coin:
RPC request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "suix_getCoinMetadata",
  "params": [
    "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::reserve::MarketCoin<0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA>"
  ]
}

RPC response:

{"jsonrpc":"2.0","id":1,"result":null}

Is MarketCoin some specific type of coin? I noticed it is shown a bit differently than other coins in different explorers. Example tx: HwZ8N7d8yg7QbhT6KpVKs8yW9PfkYKaCnGc8fbwQYU78

Hey two things:

  1. The jsonrpc is deprecated so we recommend you switching to the graphql or the gRPC. Migrating from JSON-RPC | Mysten Labs TypeScript SDK Docs
    Accessing Data | Sui Documentation
    This is how you can use the core TS SDK client to query a coin’s metadata: Core API | Mysten Labs TypeScript SDK Docs
  2. I cannot seem to find the docs for suix_getCoinMetadata at the moment but I am guessing that the issue is that suix_getCoinMetadata only works for official coins (using the coin standard). reserve::MarketCoin is not an official coin type so the function isn’t going to work as exected.

I hope this makes sense. If you’d like, I can guide you through the process of creating a coin with the coin standard?

Hi, thanks for your response. Didn’t know about JsonRPC deprecation, thanks for the heads up.

Regarding suix_getCoinMetadata, it really works only with official coins, but if you check coin link from my previous message this MarketCoin looks like some kind of a wrapper around an official coin: MarketCoin<SCA>

And SCA is an official coin which has coin metadata available:
{“jsonrpc”:“2.0”,“id”:1,“result”:{“decimals”:9,“name”:“Scallop”,“symbol”:“SCA”,“description”:“SCA is the native token of Scallop Protocol.”}}

yeah, this migration overview video might help!

Yeah, that makes sense regarding the wrapper.