Skip to content

Commit

Permalink
add methods for recipient modify (#2308)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukby1234 authored Aug 3, 2022
1 parent 98db250 commit 2cc84df
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ecosystem-modules/stable-asset
7 changes: 7 additions & 0 deletions runtime/acala/src/weights/nutsfinance_stable_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ impl<T: frame_system::Config> nutsfinance_stable_asset::WeightInfo for WeightInf
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: StableAsset Pools (r:1 w:1)
fn modify_recipients() -> Weight {
(24_780_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: StableAsset Pools (r:1 w:1)
// Storage: Tokens Accounts (r:6 w:6)
// Storage: System Account (r:2 w:2)
Expand Down
7 changes: 7 additions & 0 deletions runtime/karura/src/weights/nutsfinance_stable_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ impl<T: frame_system::Config> nutsfinance_stable_asset::WeightInfo for WeightInf
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: StableAsset Pools (r:1 w:1)
fn modify_recipients() -> Weight {
(24_780_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: StableAsset Pools (r:1 w:1)
// Storage: Tokens Accounts (r:6 w:6)
// Storage: System Account (r:2 w:2)
// Storage: AssetRegistry AssetMetadatas (r:1 w:0)
Expand Down
7 changes: 7 additions & 0 deletions runtime/mandala/src/benchmarking/nutsfinance_stable_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ runtime_benchmarks! {
let pool_id = StableAsset::pool_count() - 1;
}: _(RawOrigin::Root, pool_id, Some(100u128), Some(200u128), Some(300u128))

modify_recipients {
let assets = vec![LDOT, AUSD];
let precisions = vec![1u128, 1u128];
create_stable_pools(assets, precisions)?;
let pool_id = StableAsset::pool_count() - 1;
}: _(RawOrigin::Root, pool_id, Some(account("fee-1", 3, SEED)), Some(account("yield-1", 4, SEED)))

mint {
let tester: AccountId = whitelisted_caller();
let u in 2u32 .. <Runtime as nutsfinance_stable_asset::Config>::PoolAssetLimit::get();
Expand Down
7 changes: 7 additions & 0 deletions runtime/mandala/src/weights/nutsfinance_stable_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ impl<T: frame_system::Config> nutsfinance_stable_asset::WeightInfo for WeightInf
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: unknown [0x3a7472616e73616374696f6e5f6c6576656c3a] (r:1 w:1)
// Storage: StableAsset Pools (r:1 w:1)
fn modify_recipients() -> Weight {
(26_099_000 as Weight)
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
// Storage: StableAsset Pools (r:1 w:1)
// Storage: Tokens Accounts (r:6 w:6)
// Storage: System Account (r:2 w:2)
Expand Down

0 comments on commit 2cc84df

Please sign in to comment.