mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Gilts Pallet (#8139)
* Initial draft * Enlarge function drafted. * Thaw draft * Retract_bid draft * Final bits of draft impl. * Test mockup * Tests * Docs * Add benchmark scaffold * Integrate weights * All benchmarks done * Missing file * Remove stale comments * Fixes * Fixes * Allow for priority queuing. * Another test and a fix * Fixes * Fixes * cargo run --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_gilt --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/gilt/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Grumble * Update frame/gilt/src/tests.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/gilt/src/tests.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Grumble * Update frame/gilt/src/tests.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/gilt/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/gilt/src/lib.rs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> * Fix unreserve ordering * Grumble * Fixes Co-authored-by: Parity Benchmarking Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -1045,6 +1045,32 @@ impl pallet_assets::Config for Runtime {
|
||||
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const QueueCount: u32 = 300;
|
||||
pub const MaxQueueLen: u32 = 1000;
|
||||
pub const FifoQueueLen: u32 = 500;
|
||||
pub const Period: BlockNumber = 30 * DAYS;
|
||||
pub const MinFreeze: Balance = 100 * DOLLARS;
|
||||
pub const IntakePeriod: BlockNumber = 10;
|
||||
pub const MaxIntakeBids: u32 = 10;
|
||||
}
|
||||
|
||||
impl pallet_gilt::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type AdminOrigin = frame_system::EnsureRoot<AccountId>;
|
||||
type Deficit = ();
|
||||
type Surplus = ();
|
||||
type QueueCount = QueueCount;
|
||||
type MaxQueueLen = MaxQueueLen;
|
||||
type FifoQueueLen = FifoQueueLen;
|
||||
type Period = Period;
|
||||
type MinFreeze = MinFreeze;
|
||||
type IntakePeriod = IntakePeriod;
|
||||
type MaxIntakeBids = MaxIntakeBids;
|
||||
type WeightInfo = pallet_gilt::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
construct_runtime!(
|
||||
pub enum Runtime where
|
||||
Block = Block,
|
||||
@@ -1088,6 +1114,7 @@ construct_runtime!(
|
||||
Assets: pallet_assets::{Module, Call, Storage, Event<T>},
|
||||
Mmr: pallet_mmr::{Module, Storage},
|
||||
Lottery: pallet_lottery::{Module, Call, Storage, Event<T>},
|
||||
Gilt: pallet_gilt::{Module, Call, Storage, Event<T>, Config},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1425,8 +1452,9 @@ impl_runtime_apis! {
|
||||
add_benchmark!(params, batches, pallet_collective, Council);
|
||||
add_benchmark!(params, batches, pallet_contracts, Contracts);
|
||||
add_benchmark!(params, batches, pallet_democracy, Democracy);
|
||||
add_benchmark!(params, batches, pallet_elections_phragmen, Elections);
|
||||
add_benchmark!(params, batches, pallet_election_provider_multi_phase, ElectionProviderMultiPhase);
|
||||
add_benchmark!(params, batches, pallet_elections_phragmen, Elections);
|
||||
add_benchmark!(params, batches, pallet_gilt, Gilt);
|
||||
add_benchmark!(params, batches, pallet_grandpa, Grandpa);
|
||||
add_benchmark!(params, batches, pallet_identity, Identity);
|
||||
add_benchmark!(params, batches, pallet_im_online, ImOnline);
|
||||
|
||||
Reference in New Issue
Block a user