Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GMP precompile to Moonriver and Moonbeam runtimes #2327

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions runtime/moonbeam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pallet-evm-precompile-collective = { workspace = true }
pallet-evm-precompile-conviction-voting = { workspace = true }
pallet-evm-precompile-crowdloan-rewards = { workspace = true }
pallet-evm-precompile-democracy = { workspace = true }
pallet-evm-precompile-gmp = { workspace = true }
pallet-evm-precompile-parachain-staking = { workspace = true }
pallet-evm-precompile-preimage = { workspace = true }
pallet-evm-precompile-proxy = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions runtime/moonbeam/src/precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile;
use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile;
use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile;
use pallet_evm_precompile_democracy::DemocracyPrecompile;
use pallet_evm_precompile_gmp::GmpPrecompile;
use pallet_evm_precompile_modexp::Modexp;
use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile;
use pallet_evm_precompile_preimage::PreimagePrecompile;
Expand Down Expand Up @@ -228,6 +229,7 @@ type MoonbeamPrecompilesAt<R> = (
PrecompileRegistry<R>,
(CallableByContract, CallableByPrecompile),
>,
PrecompileAt<AddressU64<2070>, GmpPrecompile<R>, SubcallWithMaxNesting<0>>,
);

/// The PrecompileSet installed in the Moonbeam runtime.
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2936,7 +2936,7 @@ fn precompile_existence() {
let precompile_addresses: std::collections::BTreeSet<_> = vec![
1, 2, 3, 4, 5, 6, 7, 8, 9, 1024, 1025, 1026, 2048, 2049, 2050, 2051, 2052, 2053, 2054,
2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068,
2069,
2069, 2070,
]
.into_iter()
.map(H160::from_low_u64_be)
Expand Down
1 change: 1 addition & 0 deletions runtime/moonriver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ pallet-evm-precompile-collective = { workspace = true }
pallet-evm-precompile-conviction-voting = { workspace = true }
pallet-evm-precompile-crowdloan-rewards = { workspace = true }
pallet-evm-precompile-democracy = { workspace = true }
pallet-evm-precompile-gmp = { workspace = true }
pallet-evm-precompile-parachain-staking = { workspace = true }
pallet-evm-precompile-preimage = { workspace = true }
pallet-evm-precompile-proxy = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions runtime/moonriver/src/precompiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ use pallet_evm_precompile_collective::CollectivePrecompile;
use pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile;
use pallet_evm_precompile_crowdloan_rewards::CrowdloanRewardsPrecompile;
use pallet_evm_precompile_democracy::DemocracyPrecompile;
use pallet_evm_precompile_gmp::GmpPrecompile;
use pallet_evm_precompile_modexp::Modexp;
use pallet_evm_precompile_parachain_staking::ParachainStakingPrecompile;
use pallet_evm_precompile_preimage::PreimagePrecompile;
Expand Down Expand Up @@ -228,6 +229,7 @@ type MoonriverPrecompilesAt<R> = (
PrecompileRegistry<R>,
(CallableByContract, CallableByPrecompile),
>,
PrecompileAt<AddressU64<2070>, GmpPrecompile<R>, SubcallWithMaxNesting<0>>,
);

/// The PrecompileSet installed in the Moonriver runtime.
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonriver/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,7 @@ fn precompile_existence() {
let precompile_addresses: std::collections::BTreeSet<_> = vec![
1, 2, 3, 4, 5, 6, 7, 8, 9, 1024, 1025, 1026, 2048, 2049, 2050, 2051, 2052, 2053, 2054,
2055, 2056, 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068,
2069,
2069, 2070,
]
.into_iter()
.map(H160::from_low_u64_be)
Expand Down