Skip to content

Commit

Permalink
Add missing benchmarks config item
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoaguirre committed Jan 30, 2024
1 parent 87ad6a3 commit 9befb69
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,13 @@ sp_api::impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(TokenLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
// Kusama doesn't support asset locking
Err(BenchmarkError::Skip)
Expand Down
7 changes: 7 additions & 0 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2407,6 +2407,13 @@ sp_api::impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(TokenLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
// Polkadot doesn't support asset locking
Err(BenchmarkError::Skip)
Expand Down
7 changes: 7 additions & 0 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,13 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(KsmLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
7 changes: 7 additions & 0 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,13 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(DotLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
8 changes: 8 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,14 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(KsmRelayLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}


fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down
7 changes: 7 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,13 @@ impl_runtime_apis! {
Ok((origin, ticket, assets))
}

fn fee_asset() -> Result<MultiAsset, BenchmarkError> {
Ok(MultiAsset {
id: Concrete(DotRelayLocation::get()),
fun: Fungible(1_000_000 * UNITS),
})
}

fn unlockable_asset() -> Result<(MultiLocation, MultiLocation, MultiAsset), BenchmarkError> {
Err(BenchmarkError::Skip)
}
Expand Down

0 comments on commit 9befb69

Please sign in to comment.