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,
- Storage ==>
key, err = types.CreateStorageKey(meta, "System", "Account", signature.TestKeyringPairAlice.PublicKey, nil)
- Calls ==>
c, err := types.NewCall(meta, "Balances.transfer", bob, types.NewUCompactFromUInt(1000))
- 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.