pub trait Config: Config + Config<RuntimeEvent: From<Event<Self>>> {
type Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + MutateHold<Self::AccountId, Reason: From<HoldReason>>;
type DepositBase: CalculateBaseDeposit<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
type DepositPerPage: CalculatePageDeposit<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
type InvulnerableDeposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
type RewardBase: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
type MaxSubmissions: Get<u32>;
type BailoutGraceRatio: Get<Perbill>;
type EjectGraceRatio: Get<Perbill>;
type EstimateCallFee: EstimateCallFee<Call<Self>, <<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>;
type WeightInfo: WeightInfo;
}
Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
Sourcetype Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + MutateHold<Self::AccountId, Reason: From<HoldReason>>
type Currency: Inspect<Self::AccountId> + Mutate<Self::AccountId> + MutateHold<Self::AccountId, Reason: From<HoldReason>>
Handler to the currency.
Sourcetype DepositBase: CalculateBaseDeposit<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
type DepositBase: CalculateBaseDeposit<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
Base deposit amount for a submission.
Sourcetype DepositPerPage: CalculatePageDeposit<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
type DepositPerPage: CalculatePageDeposit<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
Extra deposit per-page.
Sourcetype InvulnerableDeposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
type InvulnerableDeposit: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
The fixed deposit charged upon Pallet::register
from Invulnerables
.
Sourcetype RewardBase: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
type RewardBase: Get<<<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
Base reward that is given to the winner.
Sourcetype MaxSubmissions: Get<u32>
type MaxSubmissions: Get<u32>
Maximum number of submissions. This, combined with SignedValidationPhase
and Pages
dictates how many signed solutions we can verify.
Sourcetype BailoutGraceRatio: Get<Perbill>
type BailoutGraceRatio: Get<Perbill>
The ratio of the deposit to return in case a signed account submits a solution via
Pallet::register
, but later calls Pallet::bail
.
This should be large enough to cover for the deletion cost of possible all pages. To be safe, you can put it to 100% to begin with to fully dis-incentivize bailing.
Sourcetype EjectGraceRatio: Get<Perbill>
type EjectGraceRatio: Get<Perbill>
The ratio of the deposit to return in case a signed account is ejected from the queue.
This value is assumed to be 100% for accounts that are in the invulnerable list, which can only be set by governance.
Sourcetype EstimateCallFee: EstimateCallFee<Call<Self>, <<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
type EstimateCallFee: EstimateCallFee<Call<Self>, <<Self as Config>::Currency as Inspect<<Self as Config>::AccountId>>::Balance>
Handler to estimate the fee of a call. Useful to refund the transaction fee of the submitter for the winner.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Provided weights of this pallet.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.