How to call Constants Declared in Metadata Of substrate Node

213 Views Asked by At

I am using this library https://github.com/centrifuge/go-substrate-rpc-client where we fetch Latest Metadata via this call in my gloang code api.RPC.State.GetMetadataLatest(). This will return me metaData result for the connected substrate node from the go-substrate-rpc-client library.

I am able to fetch the storage, calls and events for any given palette the same can be achieved for the following like this,

  1. Storage ==> key, err = types.CreateStorageKey(meta, "System", "Account", signature.TestKeyringPairAlice.PublicKey, nil)
  2. Calls ==> c, err := types.NewCall(meta, "Balances.transfer", bob, types.NewUCompactFromUInt(1000))
  3. Events ==> sub, err := api.RPC.Author.SubmitAndWatchExtrinsic(ext)

But I`m unable to find a way to fetch Constants that are declared in MetaData using go-substrate-rpc.

Balances Palette contains a constant ExistentialDeposit whose value to retrieved via golang api.

0

There are 0 best solutions below