Skip to content

Commit

Permalink
fix build for westend & kitchensink
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Dec 23, 2024
1 parent 7145af7 commit 9cd21fc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
24 changes: 12 additions & 12 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,6 @@ parameter_types! {
pub CodeHashLockupDepositPercent: Perbill = Perbill::from_percent(30);
}

type EventRecord = frame_system::EventRecord<
<Runtime as frame_system::Config>::RuntimeEvent,
<Runtime as frame_system::Config>::Hash,
>;

impl pallet_revive::Config for Runtime {
type Time = Timestamp;
type Currency = Balances;
Expand Down Expand Up @@ -2077,7 +2072,7 @@ impl_runtime_apis! {
}
}

impl pallet_revive::ReviveApi<Block, AccountId, Balance, Nonce, BlockNumber, EventRecord> for Runtime
impl pallet_revive::ReviveApi<Block, AccountId, Balance, Nonce, BlockNumber> for Runtime
{
fn balance(address: H160) -> U256 {
Revive::evm_balance(&address)
Expand All @@ -2102,6 +2097,7 @@ impl_runtime_apis! {
tx,
blockweights.max_block,
encoded_size,
pallet_revive::debug::Tracer::Disabled,
)
}

Expand All @@ -2112,7 +2108,7 @@ impl_runtime_apis! {
gas_limit: Option<Weight>,
storage_deposit_limit: Option<Balance>,
input_data: Vec<u8>,
) -> pallet_revive::ContractResult<pallet_revive::ExecReturnValue, Balance, EventRecord> {
) -> pallet_revive::ContractResult<pallet_revive::ExecReturnValue, Balance> {
let blockweights= <Runtime as frame_system::Config>::BlockWeights::get();
Revive::bare_call(
RuntimeOrigin::signed(origin),
Expand All @@ -2121,8 +2117,7 @@ impl_runtime_apis! {
gas_limit.unwrap_or(blockweights.max_block),
pallet_revive::DepositLimit::Balance(storage_deposit_limit.unwrap_or(u128::MAX)),
input_data,
pallet_revive::DebugInfo::UnsafeDebug,
pallet_revive::CollectEvents::UnsafeCollect,
pallet_revive::debug::Tracer::Disabled,
)
}

Expand All @@ -2134,7 +2129,7 @@ impl_runtime_apis! {
code: pallet_revive::Code,
data: Vec<u8>,
salt: Option<[u8; 32]>,
) -> pallet_revive::ContractResult<pallet_revive::InstantiateReturnValue, Balance, EventRecord>
) -> pallet_revive::ContractResult<pallet_revive::InstantiateReturnValue, Balance>
{
let blockweights= <Runtime as frame_system::Config>::BlockWeights::get();
Revive::bare_instantiate(
Expand All @@ -2145,8 +2140,7 @@ impl_runtime_apis! {
code,
data,
salt,
pallet_revive::DebugInfo::UnsafeDebug,
pallet_revive::CollectEvents::UnsafeCollect,
pallet_revive::debug::Tracer::Disabled,
)
}

Expand All @@ -2172,6 +2166,12 @@ impl_runtime_apis! {
key
)
}

fn trace_tx(
_tx: sp_core::H256
) -> Result<pallet_revive::evm::CallTrace, sp_runtime::DispatchError> {
todo!()
}
}
}

Expand Down
19 changes: 12 additions & 7 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3208,7 +3208,7 @@ impl_runtime_apis! {
}
}

impl pallet_revive::ReviveApi<Block, AccountId, Balance, Nonce, BlockNumber, EventRecord> for Runtime
impl pallet_revive::ReviveApi<Block, AccountId, Balance, Nonce, BlockNumber> for Runtime
{
fn balance(address: H160) -> U256 {
Revive::evm_balance(&address)
Expand All @@ -3233,6 +3233,7 @@ impl_runtime_apis! {
tx,
blockweights.max_block,
encoded_size,
pallet_revive::debug::Tracer::Disabled,
)
}

Expand All @@ -3243,16 +3244,15 @@ impl_runtime_apis! {
gas_limit: Option<Weight>,
storage_deposit_limit: Option<Balance>,
input_data: Vec<u8>,
) -> pallet_revive::ContractResult<pallet_revive::ExecReturnValue, Balance, EventRecord> {
) -> pallet_revive::ContractResult<pallet_revive::ExecReturnValue, Balance> {
Revive::bare_call(
RuntimeOrigin::signed(origin),
dest,
value,
gas_limit.unwrap_or(RuntimeBlockWeights::get().max_block),
pallet_revive::DepositLimit::Balance(storage_deposit_limit.unwrap_or(u128::MAX)),
input_data,
pallet_revive::DebugInfo::UnsafeDebug,
pallet_revive::CollectEvents::UnsafeCollect,
pallet_revive::debug::Tracer::Disabled,
)
}

Expand All @@ -3264,7 +3264,7 @@ impl_runtime_apis! {
code: pallet_revive::Code,
data: Vec<u8>,
salt: Option<[u8; 32]>,
) -> pallet_revive::ContractResult<pallet_revive::InstantiateReturnValue, Balance, EventRecord>
) -> pallet_revive::ContractResult<pallet_revive::InstantiateReturnValue, Balance>
{
Revive::bare_instantiate(
RuntimeOrigin::signed(origin),
Expand All @@ -3274,8 +3274,7 @@ impl_runtime_apis! {
code,
data,
salt,
pallet_revive::DebugInfo::UnsafeDebug,
pallet_revive::CollectEvents::UnsafeCollect,
pallet_revive::debug::Tracer::Disabled,
)
}

Expand All @@ -3301,6 +3300,12 @@ impl_runtime_apis! {
key
)
}

fn trace_tx(
_tx: sp_core::H256
) -> Result<pallet_revive::evm::CallTrace, sp_runtime::DispatchError> {
todo!()
}
}

impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<
Expand Down

0 comments on commit 9cd21fc

Please sign in to comment.