Questions tagged [trait]
The trait tag has no usage guidance.
7
questions
1
vote
1
answer
30
views
Trait bond Clone not satisfied by pallet constant
Trying to implement boundedVecs for an struct, but the compiler is telling me that I can´t Clone the struct because the StringLimit Constant doesn´t comply with the Clone Trait.
This is the definition ...
0
votes
1
answer
34
views
Deriving Contract Reference from `ink::trait_definition`
Is it possible to create a Contract Reference to perform a Cross-Contract call from ink::trait_definition?
If it is, how can I do so?
If it is not, why it is not possible? It seems strange that we can ...
2
votes
1
answer
75
views
Why BoundedVec does not implement a Decode trait
A clear explanation will be appreciated as to why Decode trait is not implemented while encode is. What are the design reason for this?
0
votes
3
answers
181
views
error[E0405]: cannot find trait `Trait` in crate pallet_contracts
I am performing the (add the contracts pallet to a runtime) substrate tutorial and I am getting this error
error[E0405]: cannot find trait Trait in crate pallet_contracts
--> runtime/src/lib.rs:279:...
2
votes
2
answers
46
views
decl_storage macro syntax
decl_storage! {
trait Store for Module<T: Trait> as KittyStorage {
Kitties get(kitty): map T::Hash => Kitty<T::Hash, T::Balance>;
What is this for use?
What is Store ? is ...
1
vote
1
answer
70
views
Explanation on this syntax: pub trait Config<I: 'static = ()>: frame_system::Config
I was contributing on pallet-assets and I found it hard to understand this syntax:
pub trait Config<I: 'static = ()>: frame_system::Config
Care to explain in details and examples?
1
vote
1
answer
112
views
What is the purpose of CreateSignedTransaction<LocalCall>?
From docs :
Create signed transaction.
This trait is meant to be implemented by the runtime and is
responsible for constructing a payload to be signed and contained
within the extrinsic. This will ...