Questions tagged [struct]
The struct tag has no usage guidance.
5
questions
3
votes
1
answer
76
views
Mapping throws error when trying to use custom struct INK 4.0 beta
Im trying to use a custom struct inside a Mapping, but i get many errors when trying to compile my code.
Here is the custom struct i want to use inside a Mapping:
#[ink::storage_item]
pub struct ...
0
votes
1
answer
28
views
What is the most standard pallet structure in Substrate?
I wonder if there is a structure in pallets, which other projects should follow.
We have the following elements:
< Config trait >
< Types >
< Storage >
< Genesis info>
< ...
0
votes
2
answers
69
views
Are both of them same StorageMap?
I found this puzzle in my last question, which is from one answer of my question.
There are at least two StorageMap structs in substrate framework.Their links are listed below:
https://paritytech....
3
votes
1
answer
101
views
How to create and use custom primitives for Runtime API and Pallet?
I'm trying to create a pallet that handles extrinsic and also runtime-api for the RPC endpoints. Since I plan to query storage items with RPC, I've created primitives for my pallet to use within my ...
3
votes
2
answers
538
views
T doesn't implement std::fmt::Debug
I'm trying to have a Hash variable stored in my struct. I have to pass T so I can call T::Hash. But when I use the struct in the method variable it throws an error.
#[derive(Clone, Encode, Decode, ...