Closed AurevoirXavier closed 1 year ago
So the “Bytes” part of the input means that is come back in the metadata as Vec<u8>
. (The (Vec<DepositId>)
is the associated type name.
You didn’t specify a chain or the actual code link, so cannot quite comment further.
The first would indicate (with metadata retrieval) the actual type definition, ie. You can see what is returned and linked (also in the UI). The second will show the actual definition from Rust.
You didn’t specify a chain or the actual code link, so cannot quite comment further.
The original definition: https://github.com/darwinia-network/darwinia-2.0/blob/08b703a75e657a120b6701a5781bdbbd88e6a617/pallet/deposit/src/lib.rs#L59
The associated type: https://github.com/darwinia-network/darwinia-2.0/blob/08b703a75e657a120b6701a5781bdbbd88e6a617/pallet/staking/src/lib.rs#L66
And it was used in this storage item: https://github.com/darwinia-network/darwinia-2.0/blob/08b703a75e657a120b6701a5781bdbbd88e6a617/pallet/staking/src/lib.rs#L128
It's a little bit like NegativeImbalance
in Substrate. Maybe you are familiar with that.
Which network is this? (You guys have a couple, hence asking - would like to pull the metadata and look at the type definitions in the metadata alongside)
Ok, all good. Cann see the reason from the first link provided.
pub type DepositId = u8;
So it will treat it as the normal Vec<u8>
handling in the apps UI, e.g. as a "normal" input type via the Bytes
component, aka no individual specification of the items. (In apps UI land all Vec<u8>
are handled that way)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
I didn't get any helpful answers from StackExchange. So, I open an issue here. Sorry for this.
Is there any way to decode this? Thanks. I don't know how to make my front end works.