Skip to content

Commit

Permalink
/~https://github.com/pendulum-chain/spacewalk/pull/350#discussion_r1206…
Browse files Browse the repository at this point in the history
  • Loading branch information
b-yap committed May 30, 2023
1 parent 56845b5 commit 407d32b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
19 changes: 15 additions & 4 deletions pallets/issue/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ benchmarks! {
request_issue {
let origin: T::AccountId = account("Origin", 0, 0);
let vault_id = get_vault_id::<T>();
// this amount is when running the benchmark with the testchain
// let amount = 1000_0000u32.into();
let amount = 1000u32.into();
let amount = 10_000_000u32.into();
let asset = vault_id.wrapped_currency();
let relayer_id: T::AccountId = account("Relayer", 0, 0);

Expand Down Expand Up @@ -187,6 +185,19 @@ benchmarks! {

impl_benchmark_test_suite!(
Issue,
crate::mock::ExtBuilder::build_with(Default::default()),
crate::mock::ExtBuilder::build_with(orml_tokens::GenesisConfig::<crate::mock::Test> {
balances: vec![
currency::testing_constants::DEFAULT_COLLATERAL_CURRENCY,
currency::testing_constants::DEFAULT_NATIVE_CURRENCY
]
.into_iter()
.flat_map(|currency_id| {
vec![
(crate::mock::USER, currency_id, 1_000_000_000_000),
(crate::mock::VAULT.account_id, currency_id, 1_000_000_000_000),
]
})
.collect(),
}),
crate::mock::Test
);
2 changes: 1 addition & 1 deletion pallets/issue/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ impl ExtBuilder {

fee::GenesisConfig::<Test> {
issue_fee: UnsignedFixedPoint::checked_from_rational(5, 1000).unwrap(), // 0.5%
issue_griefing_collateral: UnsignedFixedPoint::checked_from_rational(5, 100000)
issue_griefing_collateral: UnsignedFixedPoint::checked_from_rational(5, 1_000_000_000)
.unwrap(), // 0.005%
redeem_fee: UnsignedFixedPoint::checked_from_rational(5, 1000).unwrap(), // 0.5%
premium_redeem_fee: UnsignedFixedPoint::checked_from_rational(5, 100).unwrap(), // 5%
Expand Down
2 changes: 1 addition & 1 deletion testchain/node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ fn testnet_genesis(
AssetId::new(b"FIAT".to_vec(), b"MXN-USD".to_vec()),
AssetId::new(b"Stellar".to_vec(), b"XLM".to_vec()),
],
batching_api: b"http://dia-00.pendulumchain.tech:8070/currencies".to_vec(),
batching_api: b"https://dia-00.pendulumchain.tech:8070/currencies".to_vec(),
coin_infos_map: vec![],
},
}
Expand Down
6 changes: 0 additions & 6 deletions testchain/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,6 @@ impl pallet_aura::Config for Runtime {

impl pallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
// type KeyOwnerProof =
// <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, GrandpaId)>>::Proof;
// type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
// KeyTypeId,
// GrandpaId,
// )>>::IdentificationTuple;
type KeyOwnerProof = sp_core::Void;
type WeightInfo = ();
type MaxAuthorities = MaxAuthorities;
Expand Down

0 comments on commit 407d32b

Please sign in to comment.