Hi, Concordium Client ouputs the, what I believe to be, module name?
concordium-client module inspect 48682eecb17547b46a2a62fa05b1cbf95054be4804db99db8878db3766c04799
Module: '48682eecb17547b46a2a62fa05b1cbf95054be4804db99db8878db3766c04799'
Wasm version: V0
Contracts:
- BictoryListing
- buy
- list
- unlist
- updatePrice
I’m referring to BictoryListing
. How can I get this information using GRPCv2?
There’s GetModuleList
, but that returns a list of ModuleRef
s, and there’s GetModuleSource
which returns the source code in bytes
.
abizjak
February 12, 2023, 6:47pm
#2
This information is extracted from the module source.
The client parses the module source (which is a Wasm standard byte format with an extra version header) and then extracts this information.
Ok, so if I decode the bytes, will I be able to read this name as well?
abizjak
February 12, 2023, 7:04pm
#4
Yes.
If you remove the first 8 bytes of the response then the rest is just a standard Wasm module.
If you parse that and look at the exported definitions you will find there
init_BictoryListing
BictoryListing.buy
BictoryListing.list
…
I hope you see the schema here.
1 Like