Skip to main content

Questions tagged [trait]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
35 views

How to change the NextAuthorities set from custom pallet?

The NextAuthorities is only updated in function enact_epoch_change() in pallet_babe and this function is called in Trait EpochChangeTrigger (pallet_babe) and OnSessionHandler so, in the ...
MinhK's user avatar
  • 125
1 vote
1 answer
39 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 ...
Xavier's user avatar
  • 415
0 votes
1 answer
37 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 ...
Yrefef's user avatar
  • 75
2 votes
1 answer
87 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?
Mrisho Lukamba's user avatar
0 votes
3 answers
206 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:...
Vitthal agarwal's user avatar
2 votes
2 answers
53 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 ...
user6894661's user avatar
1 vote
1 answer
83 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?
Mrisho Lukamba's user avatar
1 vote
1 answer
124 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 ...
Purple_Turtle's user avatar