diff --git a/Cargo.lock b/Cargo.lock index 63fce17949..7e3c6a96ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6480,7 +6480,6 @@ dependencies = [ "pallet-collective", "pallet-conviction-voting", "pallet-crowdloan-rewards", - "pallet-democracy", "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", @@ -6495,7 +6494,6 @@ dependencies = [ "pallet-evm-precompile-collective", "pallet-evm-precompile-conviction-voting", "pallet-evm-precompile-crowdloan-rewards", - "pallet-evm-precompile-democracy", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", "pallet-evm-precompile-identity", @@ -6966,7 +6964,6 @@ dependencies = [ "pallet-collective", "pallet-conviction-voting", "pallet-crowdloan-rewards", - "pallet-democracy", "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", @@ -6981,7 +6978,6 @@ dependencies = [ "pallet-evm-precompile-collective", "pallet-evm-precompile-conviction-voting", "pallet-evm-precompile-crowdloan-rewards", - "pallet-evm-precompile-democracy", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", "pallet-evm-precompile-identity", @@ -7087,7 +7083,6 @@ dependencies = [ "pallet-collective", "pallet-conviction-voting", "pallet-crowdloan-rewards", - "pallet-democracy", "pallet-ethereum-xcm", "pallet-evm", "pallet-evm-chain-id", @@ -7116,6 +7111,7 @@ dependencies = [ "sp-api", "sp-consensus-slots", "sp-core", + "sp-io", "sp-runtime", "sp-std", "staging-xcm", @@ -7359,7 +7355,6 @@ dependencies = [ "pallet-collective", "pallet-conviction-voting", "pallet-crowdloan-rewards", - "pallet-democracy", "pallet-erc20-xcm-bridge", "pallet-ethereum", "pallet-ethereum-xcm", @@ -7374,7 +7369,6 @@ dependencies = [ "pallet-evm-precompile-collective", "pallet-evm-precompile-conviction-voting", "pallet-evm-precompile-crowdloan-rewards", - "pallet-evm-precompile-democracy", "pallet-evm-precompile-dispatch", "pallet-evm-precompile-gmp", "pallet-evm-precompile-identity", @@ -8931,33 +8925,6 @@ dependencies = [ "sp-std", ] -[[package]] -name = "pallet-evm-precompile-democracy" -version = "0.2.0" -dependencies = [ - "derive_more", - "fp-evm", - "frame-support", - "frame-system", - "hex-literal 0.3.4", - "log", - "num_enum 0.5.11", - "pallet-balances", - "pallet-democracy", - "pallet-evm", - "pallet-preimage", - "pallet-scheduler", - "pallet-timestamp", - "parity-scale-codec", - "precompile-utils", - "scale-info", - "serde", - "sp-core", - "sp-io", - "sp-runtime", - "sp-std", -] - [[package]] name = "pallet-evm-precompile-dispatch" version = "2.0.0-dev" @@ -9608,7 +9575,6 @@ dependencies = [ "frame-system", "log", "pallet-balances", - "pallet-democracy", "pallet-evm", "pallet-scheduler", "pallet-timestamp", diff --git a/Cargo.toml b/Cargo.toml index d1bd3afcd7..bc837a7731 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,45 +1,44 @@ [workspace] exclude = ["bin/utils/moonkey"] members = [ - "bin/utils/moonkey", - "client/rpc/finality", - "client/rpc/manual-xcm", - "client/vrf", - "node", - "node/cli", - "node/service", - "pallets/erc20-xcm-bridge", - "pallets/moonbeam-orbiters", - "pallets/precompile-benchmarks", - "pallets/proxy-genesis-companion", - "pallets/moonbeam-lazy-migrations", - "precompiles/balances-erc20", - "precompiles/batch", - "precompiles/call-permit", - "precompiles/collective", - "precompiles/conviction-voting", - "precompiles/crowdloan-rewards", - "precompiles/gmp", - "precompiles/identity", - "precompiles/pallet-democracy", - "precompiles/parachain-staking", - "precompiles/precompile-registry", - "precompiles/preimage", - "precompiles/proxy", - "precompiles/referenda", - "precompiles/relay-encoder", - "precompiles/relay-data-verifier", - "precompiles/utils", - "precompiles/utils/macro", - "precompiles/utils/tests-external", - "precompiles/xcm-transactor", - "precompiles/xtokens", - "primitives/storage-proof", - "runtime/moonbase", - "runtime/moonbeam", - "runtime/moonriver", - "runtime/relay-encoder", - "runtime/summarize-precompile-checks", + "bin/utils/moonkey", + "client/rpc/finality", + "client/rpc/manual-xcm", + "client/vrf", + "node", + "node/cli", + "node/service", + "pallets/erc20-xcm-bridge", + "pallets/moonbeam-orbiters", + "pallets/precompile-benchmarks", + "pallets/proxy-genesis-companion", + "pallets/moonbeam-lazy-migrations", + "precompiles/balances-erc20", + "precompiles/batch", + "precompiles/call-permit", + "precompiles/collective", + "precompiles/conviction-voting", + "precompiles/crowdloan-rewards", + "precompiles/gmp", + "precompiles/identity", + "precompiles/parachain-staking", + "precompiles/precompile-registry", + "precompiles/preimage", + "precompiles/proxy", + "precompiles/referenda", + "precompiles/relay-encoder", + "precompiles/relay-data-verifier", + "precompiles/utils", + "precompiles/utils/macro", + "precompiles/utils/tests-external", + "precompiles/xcm-transactor", + "precompiles/xtokens", + "primitives/storage-proof", + "runtime/moonbase", + "runtime/moonbeam", + "runtime/moonriver", + "runtime/relay-encoder", + "runtime/summarize-precompile-checks", ] resolver = "2" @@ -55,335 +54,333 @@ repository = "https://github.com/PureStake/moonbeam" # - "client" dependencies are only used in the client, and thus don't need to be no_std compatible. # Moonbeam (wasm) -account = { path = "primitives/account", default-features = false } -evm-tracing-events = { path = "primitives/rpc/evm-tracing-events", default-features = false } -moonbeam-core-primitives = { path = "core-primitives", default-features = false } -moonbeam-primitives-ext = { path = "primitives/ext", default-features = false } -moonbeam-rpc-primitives-debug = { path = "primitives/rpc/debug", default-features = false } -moonbeam-rpc-primitives-txpool = { path = "primitives/rpc/txpool", default-features = false } -storage-proof-primitives = { path = "primitives/storage-proof", default-features = false } +account = {path = "primitives/account", default-features = false} +evm-tracing-events = {path = "primitives/rpc/evm-tracing-events", default-features = false} +moonbeam-core-primitives = {path = "core-primitives", default-features = false} +moonbeam-primitives-ext = {path = "primitives/ext", default-features = false} +moonbeam-rpc-primitives-debug = {path = "primitives/rpc/debug", default-features = false} +moonbeam-rpc-primitives-txpool = {path = "primitives/rpc/txpool", default-features = false} +storage-proof-primitives = {path = "primitives/storage-proof", default-features = false} -moonbeam-evm-tracer = { path = "runtime/evm_tracer", default-features = false } -moonbeam-relay-encoder = { path = "runtime/relay-encoder", default-features = false } -moonbeam-runtime-common = { path = "runtime/common", default-features = false } +moonbeam-evm-tracer = {path = "runtime/evm_tracer", default-features = false} +moonbeam-relay-encoder = {path = "runtime/relay-encoder", default-features = false} +moonbeam-runtime-common = {path = "runtime/common", default-features = false} -moonbeam-xcm-benchmarks = { path = "pallets/moonbeam-xcm-benchmarks", default-features = false } -pallet-asset-manager = { path = "pallets/asset-manager", default-features = false } -pallet-erc20-xcm-bridge = { path = "pallets/erc20-xcm-bridge", default-features = false } -pallet-ethereum-xcm = { path = "pallets/ethereum-xcm", default-features = false } +moonbeam-xcm-benchmarks = {path = "pallets/moonbeam-xcm-benchmarks", default-features = false} +pallet-asset-manager = {path = "pallets/asset-manager", default-features = false} +pallet-erc20-xcm-bridge = {path = "pallets/erc20-xcm-bridge", default-features = false} +pallet-ethereum-xcm = {path = "pallets/ethereum-xcm", default-features = false} -pallet-evm-precompile-author-mapping = { path = "precompiles/author-mapping", default-features = false } -pallet-evm-precompile-balances-erc20 = { path = "precompiles/balances-erc20", default-features = false } -pallet-evm-precompile-batch = { path = "precompiles/batch", default-features = false } -pallet-evm-precompile-call-permit = { path = "precompiles/call-permit", default-features = false } -pallet-evm-precompile-collective = { path = "precompiles/collective", default-features = false } -pallet-evm-precompile-conviction-voting = { path = "precompiles/conviction-voting", default-features = false } -pallet-evm-precompile-crowdloan-rewards = { path = "precompiles/crowdloan-rewards", default-features = false } -pallet-evm-precompile-democracy = { path = "precompiles/pallet-democracy", default-features = false } -pallet-evm-precompile-gmp = { path = "precompiles/gmp", default-features = false } -pallet-evm-precompile-identity = { path = "precompiles/identity", default-features = false } -pallet-evm-precompile-parachain-staking = { path = "precompiles/parachain-staking", default-features = false } -pallet-evm-precompile-preimage = { path = "precompiles/preimage", default-features = false } -pallet-evm-precompile-proxy = { path = "precompiles/proxy", default-features = false } -pallet-evm-precompile-randomness = { path = "precompiles/randomness", default-features = false } -pallet-evm-precompile-referenda = { path = "precompiles/referenda", default-features = false } -pallet-evm-precompile-registry = { path = "precompiles/precompile-registry", default-features = false } -pallet-evm-precompile-relay-encoder = { path = "precompiles/relay-encoder", default-features = false } -pallet-evm-precompile-relay-verifier = { path = "precompiles/relay-data-verifier", default-features = false } -pallet-evm-precompile-xcm-transactor = { path = "precompiles/xcm-transactor", default-features = false } -pallet-evm-precompile-xcm-utils = { path = "precompiles/xcm-utils", default-features = false } -pallet-evm-precompile-xtokens = { path = "precompiles/xtokens", default-features = false } -pallet-evm-precompileset-assets-erc20 = { path = "precompiles/assets-erc20", default-features = false } -pallet-moonbeam-orbiters = { path = "pallets/moonbeam-orbiters", default-features = false } -pallet-parachain-staking = { path = "pallets/parachain-staking", default-features = false } -pallet-precompile-benchmarks = { path = "pallets/precompile-benchmarks", default-features = false } -pallet-proxy-genesis-companion = { path = "pallets/proxy-genesis-companion", default-features = false } -pallet-xcm-transactor = { path = "pallets/xcm-transactor", default-features = false } -pallet-moonbeam-lazy-migrations = { path = "pallets/moonbeam-lazy-migrations", default-features = false } -precompile-utils = { path = "precompiles/utils", default-features = false } -xcm-primitives = { path = "primitives/xcm", default-features = false } +pallet-evm-precompile-author-mapping = {path = "precompiles/author-mapping", default-features = false} +pallet-evm-precompile-balances-erc20 = {path = "precompiles/balances-erc20", default-features = false} +pallet-evm-precompile-batch = {path = "precompiles/batch", default-features = false} +pallet-evm-precompile-call-permit = {path = "precompiles/call-permit", default-features = false} +pallet-evm-precompile-collective = {path = "precompiles/collective", default-features = false} +pallet-evm-precompile-conviction-voting = {path = "precompiles/conviction-voting", default-features = false} +pallet-evm-precompile-crowdloan-rewards = {path = "precompiles/crowdloan-rewards", default-features = false} +pallet-evm-precompile-gmp = {path = "precompiles/gmp", default-features = false} +pallet-evm-precompile-identity = {path = "precompiles/identity", default-features = false} +pallet-evm-precompile-parachain-staking = {path = "precompiles/parachain-staking", default-features = false} +pallet-evm-precompile-preimage = {path = "precompiles/preimage", default-features = false} +pallet-evm-precompile-proxy = {path = "precompiles/proxy", default-features = false} +pallet-evm-precompile-randomness = {path = "precompiles/randomness", default-features = false} +pallet-evm-precompile-referenda = {path = "precompiles/referenda", default-features = false} +pallet-evm-precompile-registry = {path = "precompiles/precompile-registry", default-features = false} +pallet-evm-precompile-relay-encoder = {path = "precompiles/relay-encoder", default-features = false} +pallet-evm-precompile-relay-verifier = {path = "precompiles/relay-data-verifier", default-features = false} +pallet-evm-precompile-xcm-transactor = {path = "precompiles/xcm-transactor", default-features = false} +pallet-evm-precompile-xcm-utils = {path = "precompiles/xcm-utils", default-features = false} +pallet-evm-precompile-xtokens = {path = "precompiles/xtokens", default-features = false} +pallet-evm-precompileset-assets-erc20 = {path = "precompiles/assets-erc20", default-features = false} +pallet-moonbeam-lazy-migrations = {path = "pallets/moonbeam-lazy-migrations", default-features = false} +pallet-moonbeam-orbiters = {path = "pallets/moonbeam-orbiters", default-features = false} +pallet-parachain-staking = {path = "pallets/parachain-staking", default-features = false} +pallet-precompile-benchmarks = {path = "pallets/precompile-benchmarks", default-features = false} +pallet-proxy-genesis-companion = {path = "pallets/proxy-genesis-companion", default-features = false} +pallet-xcm-transactor = {path = "pallets/xcm-transactor", default-features = false} +precompile-utils = {path = "precompiles/utils", default-features = false} +xcm-primitives = {path = "primitives/xcm", default-features = false} -pallet-crowdloan-rewards = { git = "https://github.com/moonbeam-foundation/crowdloan-rewards", branch = "moonbeam-polkadot-v1.3.0", default-features = false } +pallet-crowdloan-rewards = {git = "https://github.com/moonbeam-foundation/crowdloan-rewards", branch = "moonbeam-polkadot-v1.3.0", default-features = false} # Moonbeam (client) -moonbeam-cli = { path = "node/cli", default-features = false } -moonbeam-cli-opt = { path = "node/cli-opt", default-features = false } -moonbeam-service = { path = "node/service", default-features = false } +moonbeam-cli = {path = "node/cli", default-features = false} +moonbeam-cli-opt = {path = "node/cli-opt", default-features = false} +moonbeam-service = {path = "node/service", default-features = false} -manual-xcm-rpc = { path = "client/rpc/manual-xcm" } -moonbeam-client-evm-tracing = { path = "client/evm-tracing" } -moonbeam-finality-rpc = { path = "client/rpc/finality" } -moonbeam-rpc-core-debug = { path = "client/rpc-core/debug" } -moonbeam-rpc-core-trace = { path = "client/rpc-core/trace" } -moonbeam-rpc-core-txpool = { path = "client/rpc-core/txpool" } -moonbeam-rpc-core-types = { path = "client/rpc-core/types" } -moonbeam-rpc-debug = { path = "client/rpc/debug" } -moonbeam-rpc-trace = { path = "client/rpc/trace" } -moonbeam-rpc-txpool = { path = "client/rpc/txpool" } -moonbeam-vrf = { path = "client/vrf" } +manual-xcm-rpc = {path = "client/rpc/manual-xcm"} +moonbeam-client-evm-tracing = {path = "client/evm-tracing"} +moonbeam-finality-rpc = {path = "client/rpc/finality"} +moonbeam-rpc-core-debug = {path = "client/rpc-core/debug"} +moonbeam-rpc-core-trace = {path = "client/rpc-core/trace"} +moonbeam-rpc-core-txpool = {path = "client/rpc-core/txpool"} +moonbeam-rpc-core-types = {path = "client/rpc-core/types"} +moonbeam-rpc-debug = {path = "client/rpc/debug"} +moonbeam-rpc-trace = {path = "client/rpc/trace"} +moonbeam-rpc-txpool = {path = "client/rpc/txpool"} +moonbeam-vrf = {path = "client/vrf"} -moonbase-runtime = { path = "runtime/moonbase" } -moonbeam-runtime = { path = "runtime/moonbeam" } -moonriver-runtime = { path = "runtime/moonriver" } +moonbase-runtime = {path = "runtime/moonbase"} +moonbeam-runtime = {path = "runtime/moonbeam"} +moonriver-runtime = {path = "runtime/moonriver"} # Substrate (wasm) -frame-benchmarking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -frame-executive = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -frame-support = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -frame-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -frame-system-benchmarking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -frame-try-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-assets = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-balances = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-collective = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-conviction-voting = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-democracy = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-identity = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-message-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -pallet-multisig = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-preimage = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-proxy = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-referenda = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-root-testing = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-scheduler = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-society = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-staking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-sudo = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-timestamp = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-transaction-payment = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-treasury = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-utility = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-whitelist = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -parity-scale-codec = { version = "3.2.2", default-features = false, features = [ - "derive", -] } -scale-info = { version = "2.0", default-features = false, features = [ - "derive", -] } -sp-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-application-crypto = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-block-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-consensus-babe = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-consensus-slots = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-debug-derive = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-externalities = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-inherents = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-io = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-keystore = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-offchain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-runtime-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-session = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-std = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-state-machine = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-transaction-pool = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-trie = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-version = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -sp-weights = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -substrate-fixed = { git = "https://github.com/encointer/substrate-fixed", default-features = false } +frame-benchmarking = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +frame-executive = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +frame-support = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +frame-system = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +frame-system-benchmarking = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +frame-system-rpc-runtime-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +frame-try-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-assets = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-balances = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-collective = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-conviction-voting = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-identity = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-message-queue = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +pallet-multisig = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-preimage = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-proxy = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-referenda = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-root-testing = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-scheduler = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-society = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-staking = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-sudo = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-timestamp = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-transaction-payment = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-transaction-payment-rpc-runtime-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-treasury = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-utility = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-whitelist = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +parity-scale-codec = {version = "3.2.2", default-features = false, features = [ + "derive", +]} +scale-info = {version = "2.0", default-features = false, features = [ + "derive", +]} +sp-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-application-crypto = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-block-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-consensus-babe = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-consensus-slots = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-core = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-debug-derive = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-externalities = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-inherents = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-io = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-keystore = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-offchain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-runtime-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-session = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-state-machine = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-std = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-transaction-pool = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-trie = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-version = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +sp-weights = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +substrate-fixed = {git = "https://github.com/encointer/substrate-fixed", default-features = false} # Substrate (client) -frame-benchmarking-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -pallet-transaction-payment-rpc = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-basic-authorship = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-block-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-chain-spec = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-client-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-client-db = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-consensus = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-consensus-grandpa = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-consensus-manual-seal = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-executor = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-informant = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-network = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-network-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-network-sync = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-offchain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-rpc = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-rpc-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-sysinfo = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-telemetry = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-tracing = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-transaction-pool = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-transaction-pool-api = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sc-utils = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sp-blockchain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sp-consensus = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sp-storage = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sp-timestamp = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -sp-wasm-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-build-script-utils = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-frame-rpc-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-prometheus-endpoint = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-test-client = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-test-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-test-runtime-client = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -substrate-wasm-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -try-runtime-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } +frame-benchmarking-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +pallet-transaction-payment-rpc = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-basic-authorship = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-block-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-chain-spec = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-client-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-client-db = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-consensus = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-consensus-grandpa = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-consensus-manual-seal = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-executor = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-informant = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-network = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-network-common = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-network-sync = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-offchain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-rpc = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-rpc-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-service = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-sysinfo = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-telemetry = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-tracing = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-transaction-pool = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-transaction-pool-api = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sc-utils = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sp-blockchain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sp-consensus = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sp-storage = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sp-timestamp = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +sp-wasm-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-build-script-utils = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-frame-rpc-system = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-prometheus-endpoint = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-test-client = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-test-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-test-runtime-client = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +substrate-wasm-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +try-runtime-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} # Frontier (wasm) -ethereum = { version = "0.14.0", default-features = false, features = [ - "with-codec", -] } -ethereum-types = { version = "0.14", default-features = false } -evm = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -evm-gasometer = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -evm-runtime = { git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -fp-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -fp-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -fp-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -fp-self-contained = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-ethereum = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ - "forbid-evm-reentrancy", -] } -pallet-evm = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ - "forbid-evm-reentrancy", -] } -pallet-evm-chain-id = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-evm-precompile-blake2 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-evm-precompile-dispatch = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false } +ethereum = {version = "0.14.0", default-features = false, features = [ + "with-codec", +]} +ethereum-types = {version = "0.14", default-features = false} +evm = {git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +evm-gasometer = {git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +evm-runtime = {git = "https://github.com/moonbeam-foundation/evm", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +fp-ethereum = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +fp-evm = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +fp-rpc = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +fp-self-contained = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-ethereum = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ + "forbid-evm-reentrancy", +]} +pallet-evm = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ + "forbid-evm-reentrancy", +]} +pallet-evm-chain-id = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-evm-precompile-blake2 = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-evm-precompile-bn128 = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-evm-precompile-dispatch = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-evm-precompile-modexp = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-evm-precompile-sha3fips = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-evm-precompile-simple = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", default-features = false} # Frontier (client) -fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fc-db = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fc-api = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", features = [ - "rpc-binary-search-estimate", -] } -fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fc-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fp-consensus = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } -fp-storage = { git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0" } +fc-api = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fc-consensus = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fc-db = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fc-mapping-sync = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fc-rpc = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0", features = [ + "rpc-binary-search-estimate", +]} +fc-rpc-core = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fc-storage = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fp-consensus = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} +fp-storage = {git = "https://github.com/moonbeam-foundation/frontier", branch = "moonbeam-polkadot-v1.3.0"} # Cumulus (wasm) -cumulus-pallet-dmp-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ - "parameterized-consensus-hook", -] } -cumulus-pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-primitives-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-primitives-parachain-inherent = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-primitives-utility = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -cumulus-test-relay-sproof-builder = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -parachain-info = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } +cumulus-pallet-dmp-queue = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-pallet-parachain-system = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false, features = [ + "parameterized-consensus-hook", +]} +cumulus-pallet-xcm = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-pallet-xcmp-queue = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-primitives-core = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-primitives-parachain-inherent = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-primitives-timestamp = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-primitives-utility = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +cumulus-test-relay-sproof-builder = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +parachain-info = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} # Cumulus (client) -cumulus-client-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-client-collator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-client-consensus-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-client-consensus-proposer = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-client-consensus-relay-chain = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-client-network = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-client-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-relay-chain-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -cumulus-relay-chain-rpc-interface = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } +cumulus-client-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-collator = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-consensus-common = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-consensus-proposer = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-consensus-relay-chain = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-network = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-client-service = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-relay-chain-inprocess-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-relay-chain-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-relay-chain-minimal-node = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +cumulus-relay-chain-rpc-interface = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} # Polkadot / XCM (wasm) -orml-traits = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -orml-xcm-support = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -orml-xtokens = { git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-xcm = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -polkadot-core-primitives = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -polkadot-runtime-common = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -xcm = { package = "staging-xcm", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false } +orml-traits = {git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +orml-xcm-support = {git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +orml-xtokens = {git = "https://github.com/moonbeam-foundation/open-runtime-module-library", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-xcm = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-xcm-benchmarks = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +polkadot-core-primitives = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +polkadot-parachain = {package = "polkadot-parachain-primitives", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +polkadot-runtime-common = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +polkadot-runtime-parachains = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +xcm = {package = "staging-xcm", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +xcm-builder = {package = "staging-xcm-builder", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +xcm-executor = {package = "staging-xcm-executor", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0", default-features = false} # Polkadot / XCM (client) #kusama-runtime = { package = "staging-kusama-runtime", git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -polkadot-cli = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -polkadot-primitives = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } +polkadot-cli = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +polkadot-primitives = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} #polkadot-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -polkadot-service = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -rococo-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -westend-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } -xcm-simulator = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0" } +polkadot-service = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +rococo-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +westend-runtime = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} +xcm-simulator = {git = "https://github.com/moonbeam-foundation/polkadot-sdk", branch = "moonbeam-polkadot-v1.3.0"} # Moonkit (wasm) -async-backing-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-async-backing = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -pallet-relay-storage-roots = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } -session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false } +async-backing-primitives = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +moonkit-xcm-primitives = {package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +nimbus-primitives = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-async-backing = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-author-inherent = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-author-mapping = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-author-slot-filter = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-maintenance-mode = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-migrations = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-randomness = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +pallet-relay-storage-roots = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} +session-keys-primitives = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0", default-features = false} # Moonkit (client) -nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0" } +nimbus-consensus = {git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.3.0"} # Other (wasm) affix = "0.1.2" -async-trait = { version = "0.1.42" } -blake2-rfc = { version = "0.2.18", default-features = false } +async-trait = {version = "0.1.42"} +blake2-rfc = {version = "0.2.18", default-features = false} derive_more = "0.99" -environmental = { version = "1.1.2", default-features = false } -frame-metadata = { version = "16.0.0", default-features = false, features = [ - "current", -] } -hex = { version = "0.4.3", default-features = false } -hex-literal = { version = "0.3.4" } -impl-serde = { version = "0.3.1", default-features = false } +environmental = {version = "1.1.2", default-features = false} +frame-metadata = {version = "16.0.0", default-features = false, features = [ + "current", +]} +hex = {version = "0.4.3", default-features = false} +hex-literal = {version = "0.3.4"} +impl-serde = {version = "0.3.1", default-features = false} impl-trait-for-tuples = "0.2.1" -libsecp256k1 = { version = "0.7", default-features = false } -log = { version = "0.4", default-features = false } -num_enum = { version = "0.5.3", default-features = false } +libsecp256k1 = {version = "0.7", default-features = false} +log = {version = "0.4", default-features = false} +num_enum = {version = "0.5.3", default-features = false} paste = "1.0.6" -rlp = { version = "0.5", default-features = false } -rustc-hex = { version = "2.0.1", default-features = false } -serde = { version = "1.0.101", default-features = false } -sha3 = { version = "0.10", default-features = false } +rlp = {version = "0.5", default-features = false} +rustc-hex = {version = "2.0.1", default-features = false} +serde = {version = "1.0.101", default-features = false} +sha3 = {version = "0.10", default-features = false} slices = "0.2.0" smallvec = "1.8.0" -strum = { version = "0.24", default-features = false, features = ["derive"] } +strum = {version = "0.24", default-features = false, features = ["derive"]} strum_macros = "0.24" # Other (client) ansi_term = "0.12.1" assert_cmd = "2.0.10" async-io = "1.3" -bip32 = { version = "0.5.1", default-features = false, features = ["bip39"] } -clap = { version = "4.0.9", features = ["derive"] } +bip32 = {version = "0.5.1", default-features = false, features = ["bip39"]} +clap = {version = "4.0.9", features = ["derive"]} exit-future = "0.2" flume = "0.10.9" -futures = { version = "0.3.21" } -jsonrpsee = { version = "0.16.2", default-features = false } +futures = {version = "0.3.21"} +jsonrpsee = {version = "0.16.2", default-features = false} maplit = "1.0.2" nix = "0.23" parking_lot = "0.12.0" primitive-types = "0.12.0" -prometheus = { version = "0.13.0", default-features = false } +prometheus = {version = "0.13.0", default-features = false} rand = "0.7.3" -schnorrkel = { version = "0.9.1", default-features = false, features = [ - "preaudit_deprecated", - "u64_backend", -] } -serde_json = { version = "1.0" } +schnorrkel = {version = "0.9.1", default-features = false, features = [ + "preaudit_deprecated", + "u64_backend", +]} +serde_json = {version = "1.0"} similar-asserts = "1.1.0" tempfile = "3.2.0" -tiny-bip39 = { version = "0.8", default-features = false } -tokio = { version = "1.13" } +tiny-bip39 = {version = "0.8", default-features = false} +tokio = {version = "1.13"} tracing = "0.1.34" tracing-core = "0.1.29" trie-root = "0.15.2" @@ -405,49 +402,49 @@ url = "2.2.2" # # This list is ordered alphabetically. [profile.dev.package] -blake2 = { opt-level = 3 } -blake2b_simd = { opt-level = 3 } -chacha20poly1305 = { opt-level = 3 } -cranelift-codegen = { opt-level = 3 } -cranelift-wasm = { opt-level = 3 } -crc32fast = { opt-level = 3 } -crossbeam-deque = { opt-level = 3 } -crypto-mac = { opt-level = 3 } -curve25519-dalek = { opt-level = 3 } -ed25519-zebra = { opt-level = 3 } -flate2 = { opt-level = 3 } -futures-channel = { opt-level = 3 } -hash-db = { opt-level = 3 } -hashbrown = { opt-level = 3 } -hmac = { opt-level = 3 } -httparse = { opt-level = 3 } -integer-sqrt = { opt-level = 3 } -k256 = { opt-level = 3 } -keccak = { opt-level = 3 } -libm = { opt-level = 3 } -librocksdb-sys = { opt-level = 3 } -libsecp256k1 = { opt-level = 3 } -libz-sys = { opt-level = 3 } -mio = { opt-level = 3 } -nalgebra = { opt-level = 3 } -num-bigint = { opt-level = 3 } -parking_lot = { opt-level = 3 } -parking_lot_core = { opt-level = 3 } -percent-encoding = { opt-level = 3 } -primitive-types = { opt-level = 3 } -ring = { opt-level = 3 } -rustls = { opt-level = 3 } -secp256k1 = { opt-level = 3 } -sha2 = { opt-level = 3 } -sha3 = { opt-level = 3 } -smallvec = { opt-level = 3 } -snow = { opt-level = 3 } -twox-hash = { opt-level = 3 } -uint = { opt-level = 3 } -wasmi = { opt-level = 3 } -x25519-dalek = { opt-level = 3 } -yamux = { opt-level = 3 } -zeroize = { opt-level = 3 } +blake2 = {opt-level = 3} +blake2b_simd = {opt-level = 3} +chacha20poly1305 = {opt-level = 3} +cranelift-codegen = {opt-level = 3} +cranelift-wasm = {opt-level = 3} +crc32fast = {opt-level = 3} +crossbeam-deque = {opt-level = 3} +crypto-mac = {opt-level = 3} +curve25519-dalek = {opt-level = 3} +ed25519-zebra = {opt-level = 3} +flate2 = {opt-level = 3} +futures-channel = {opt-level = 3} +hash-db = {opt-level = 3} +hashbrown = {opt-level = 3} +hmac = {opt-level = 3} +httparse = {opt-level = 3} +integer-sqrt = {opt-level = 3} +k256 = {opt-level = 3} +keccak = {opt-level = 3} +libm = {opt-level = 3} +librocksdb-sys = {opt-level = 3} +libsecp256k1 = {opt-level = 3} +libz-sys = {opt-level = 3} +mio = {opt-level = 3} +nalgebra = {opt-level = 3} +num-bigint = {opt-level = 3} +parking_lot = {opt-level = 3} +parking_lot_core = {opt-level = 3} +percent-encoding = {opt-level = 3} +primitive-types = {opt-level = 3} +ring = {opt-level = 3} +rustls = {opt-level = 3} +secp256k1 = {opt-level = 3} +sha2 = {opt-level = 3} +sha3 = {opt-level = 3} +smallvec = {opt-level = 3} +snow = {opt-level = 3} +twox-hash = {opt-level = 3} +uint = {opt-level = 3} +wasmi = {opt-level = 3} +x25519-dalek = {opt-level = 3} +yamux = {opt-level = 3} +zeroize = {opt-level = 3} # make sure dev builds with backtrace do # not slow us down @@ -462,12 +459,12 @@ lto = true [profile.release] debug-assertions = true # Enable debug-assert! for non-production profiles -opt-level = 3 +opt-level = 3 # Moonbeam runtime requires unwinding. panic = "unwind" [profile.testnet] -debug = 1 # debug symbols are useful for profilers +debug = 1 # debug symbols are useful for profilers debug-assertions = true # Enable debug-assert! for non-production profiles -inherits = "release" +inherits = "release" overflow-checks = true diff --git a/node/service/src/chain_spec/moonbase.rs b/node/service/src/chain_spec/moonbase.rs index 776260af5a..e957ecd54b 100644 --- a/node/service/src/chain_spec/moonbase.rs +++ b/node/service/src/chain_spec/moonbase.rs @@ -26,8 +26,8 @@ use cumulus_primitives_core::ParaId; use hex_literal::hex; use moonbase_runtime::{ currency::UNIT, AccountId, AuthorFilterConfig, AuthorMappingConfig, Balance, BalancesConfig, - CrowdloanRewardsConfig, DemocracyConfig, EVMConfig, EligibilityValue, EthereumChainIdConfig, - EthereumConfig, GenesisAccount, InflationInfo, MaintenanceModeConfig, MoonbeamOrbitersConfig, + CrowdloanRewardsConfig, EVMConfig, EligibilityValue, EthereumChainIdConfig, EthereumConfig, + GenesisAccount, InflationInfo, MaintenanceModeConfig, MoonbeamOrbitersConfig, OpenTechCommitteeCollectiveConfig, ParachainInfoConfig, ParachainStakingConfig, PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, SudoConfig, SystemConfig, TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, XcmTransactorConfig, HOURS, @@ -285,7 +285,6 @@ pub fn testnet_genesis( ethereum: EthereumConfig { ..Default::default() }, - democracy: DemocracyConfig::default(), parachain_staking: ParachainStakingConfig { candidates: candidates .iter() diff --git a/node/service/src/chain_spec/moonbeam.rs b/node/service/src/chain_spec/moonbeam.rs index b677401847..ef89ad49ef 100644 --- a/node/service/src/chain_spec/moonbeam.rs +++ b/node/service/src/chain_spec/moonbeam.rs @@ -27,8 +27,8 @@ use hex_literal::hex; use moonbase_runtime::EligibilityValue; use moonbeam_runtime::{ currency::GLMR, currency::SUPPLY_FACTOR, AccountId, AuthorFilterConfig, AuthorMappingConfig, - Balance, BalancesConfig, CrowdloanRewardsConfig, DemocracyConfig, EVMConfig, - EthereumChainIdConfig, EthereumConfig, GenesisAccount, InflationInfo, MaintenanceModeConfig, + Balance, BalancesConfig, CrowdloanRewardsConfig, EVMConfig, EthereumChainIdConfig, + EthereumConfig, GenesisAccount, InflationInfo, MaintenanceModeConfig, OpenTechCommitteeCollectiveConfig, ParachainInfoConfig, ParachainStakingConfig, PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, SystemConfig, TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, HOURS, WASM_BINARY, @@ -270,7 +270,6 @@ pub fn testnet_genesis( ethereum: EthereumConfig { ..Default::default() }, - democracy: DemocracyConfig::default(), parachain_staking: ParachainStakingConfig { candidates: candidates .iter() diff --git a/node/service/src/chain_spec/moonriver.rs b/node/service/src/chain_spec/moonriver.rs index c0c1821feb..15b47bc089 100644 --- a/node/service/src/chain_spec/moonriver.rs +++ b/node/service/src/chain_spec/moonriver.rs @@ -27,11 +27,10 @@ use hex_literal::hex; use moonbase_runtime::EligibilityValue; use moonriver_runtime::{ currency::MOVR, AccountId, AuthorFilterConfig, AuthorMappingConfig, Balance, BalancesConfig, - CrowdloanRewardsConfig, DemocracyConfig, EVMConfig, EthereumChainIdConfig, EthereumConfig, - GenesisAccount, InflationInfo, MaintenanceModeConfig, OpenTechCommitteeCollectiveConfig, - ParachainInfoConfig, ParachainStakingConfig, PolkadotXcmConfig, Precompiles, Range, - RuntimeGenesisConfig, SystemConfig, TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, - HOURS, WASM_BINARY, + CrowdloanRewardsConfig, EVMConfig, EthereumChainIdConfig, EthereumConfig, GenesisAccount, + InflationInfo, MaintenanceModeConfig, OpenTechCommitteeCollectiveConfig, ParachainInfoConfig, + ParachainStakingConfig, PolkadotXcmConfig, Precompiles, Range, RuntimeGenesisConfig, + SystemConfig, TransactionPaymentConfig, TreasuryCouncilCollectiveConfig, HOURS, WASM_BINARY, }; use nimbus_primitives::NimbusId; use pallet_transaction_payment::Multiplier; @@ -270,7 +269,6 @@ pub fn testnet_genesis( ethereum: EthereumConfig { ..Default::default() }, - democracy: DemocracyConfig::default(), parachain_staking: ParachainStakingConfig { candidates: candidates .iter() diff --git a/pallets/moonbeam-lazy-migrations/Cargo.toml b/pallets/moonbeam-lazy-migrations/Cargo.toml index 8725645bd4..e0170906cf 100644 --- a/pallets/moonbeam-lazy-migrations/Cargo.toml +++ b/pallets/moonbeam-lazy-migrations/Cargo.toml @@ -1,52 +1,51 @@ [package] -name = "pallet-moonbeam-lazy-migrations" -authors = { workspace = true } +authors = {workspace = true} description = "A pallet for performing migrations from extrinsics" edition = "2021" +name = "pallet-moonbeam-lazy-migrations" version = "0.1.0" [dependencies] -log = { workspace = true } +log = {workspace = true} # Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -parity-scale-codec = { workspace = true } -scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -pallet-democracy = { workspace = true } -pallet-scheduler = { workspace = true } -sp-std = { workspace = true } +frame-support = {workspace = true} +frame-system = {workspace = true} +pallet-scheduler = {workspace = true} +parity-scale-codec = {workspace = true} +scale-info = {workspace = true, features = ["derive"]} +sp-core = {workspace = true} +sp-io = {workspace = true} +sp-runtime = {workspace = true} +sp-std = {workspace = true} # Frontier -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } +pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} # Benchmarks -frame-benchmarking = { workspace = true, optional = true } +frame-benchmarking = {workspace = true, optional = true} [dev-dependencies] -pallet-balances = { workspace = true, features = ["std"] } -pallet-timestamp = { workspace = true, features = ["std"] } -frame-benchmarking = { workspace = true, features = ["std"] } -sp-io = { workspace = true, features = ["std"] } -rlp = { workspace = true, features = ["std"] } +frame-benchmarking = {workspace = true, features = ["std"]} +pallet-balances = {workspace = true, features = ["std"]} +pallet-timestamp = {workspace = true, features = ["std"]} +rlp = {workspace = true, features = ["std"]} +sp-io = {workspace = true, features = ["std"]} [features] default = ["std"] +runtime-benchmarks = ["frame-benchmarking"] std = [ - "pallet-balances/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", - "sp-std/std", - "pallet-evm/std", - "pallet-timestamp/std", - "rlp/std", + "pallet-balances/std", + "frame-support/std", + "frame-system/std", + "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", + "pallet-evm/std", + "pallet-timestamp/std", + "rlp/std", ] -runtime-benchmarks = ["frame-benchmarking"] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/moonbeam-lazy-migrations/src/lib.rs b/pallets/moonbeam-lazy-migrations/src/lib.rs index c2db72695d..975aed1324 100644 --- a/pallets/moonbeam-lazy-migrations/src/lib.rs +++ b/pallets/moonbeam-lazy-migrations/src/lib.rs @@ -37,9 +37,7 @@ pub use pallet::*; pub mod pallet { use super::*; use frame_support::pallet_prelude::*; - use frame_support::traits::{LockIdentifier, LockableCurrency}; use frame_system::pallet_prelude::*; - use pallet_democracy::VotingOf; use sp_core::H160; pub const ARRAY_LIMIT: u32 = 1000; @@ -49,15 +47,6 @@ pub mod pallet { const MAX_LOCAL_ASSETS_STORAGE_ENTRY_SIZE: u64 = (/* biggest key on moonbeam */136) + (/* biggest value on moonbeam */142); - /// Copied from pallet-democracy - const DEMOCRACY_ID: LockIdentifier = *b"democrac"; - const MAX_DEMOCRACY_VOTINGOF_STORAGE_ENTRY_SIZE: u64 = - (/* biggest key on moonbeam */60) + (/* biggest value on moonbeam */1440); - const MAX_BALANCES_LOCKS_STORAGE_ENTRY_SIZE: u64 = - (/* biggest key on moonbeam */60) + (/* biggest value on moonbeam */26 * 3); - const MAX_UNLOCK_PROOF_PER_ACCOUNT: u64 = - MAX_BALANCES_LOCKS_STORAGE_ENTRY_SIZE + MAX_DEMOCRACY_VOTINGOF_STORAGE_ENTRY_SIZE; - /// Pallet for multi block migrations #[pallet::pallet] pub struct Pallet(PhantomData); @@ -66,17 +55,13 @@ pub mod pallet { /// If true, it means that LocalAssets storage has been removed. pub(crate) type LocalAssetsMigrationCompleted = StorageValue<_, bool, ValueQuery>; - #[pallet::storage] - /// If true, it means that Democracy funds have been unlocked. - pub(crate) type DemocracyLocksMigrationCompleted = StorageValue<_, bool, ValueQuery>; - #[pallet::storage] /// The total number of suicided contracts that were removed pub(crate) type SuicidedContractsRemoved = StorageValue<_, u32, ValueQuery>; /// Configuration trait of this pallet. #[pallet::config] - pub trait Config: frame_system::Config + pallet_evm::Config + pallet_democracy::Config { + pub trait Config: frame_system::Config + pallet_evm::Config { type WeightInfo: WeightInfo; } @@ -202,46 +187,5 @@ pub mod pallet { } Ok(Pays::No.into()) } - - // TODO(alexandru): This extrinsic should be removed once Gov V1 is removed. - // Note: We don't need to unreserve any funds, as they are assumed to be already - // unreserved prior to this operation and the proposal submission disabled. - #[pallet::call_index(2)] - #[pallet::weight( - Weight::from_parts(0, - INTERMEDIATES_NODES_SIZE + MAX_UNLOCK_PROOF_PER_ACCOUNT * ::from(*limit)) - .saturating_add(::DbWeight::get() - .reads_writes((*limit + 1).into(), (*limit + 1).into()).saturating_mul(2)) - )] - pub fn unlock_democracy_funds( - origin: OriginFor, - limit: u32, - ) -> DispatchResultWithPostInfo { - ensure_signed(origin)?; - ensure!(limit != 0, Error::::LimitCannotBeZero); - ensure!(limit <= 50, Error::::UnlockLimitTooHigh); - - ensure!( - !DemocracyLocksMigrationCompleted::::get(), - Error::::AllDemocracyFundsUnlocked - ); - - // Unlock staked funds and remove the voting entry. This way we can keep track of what - // is left without extra cost. - let unlocked_accounts = VotingOf::::iter() - .drain() - .take(limit as usize) - .map(|(account, _)| { - ::Currency::remove_lock(DEMOCRACY_ID, &account) - }) - .count() as u32; - - if unlocked_accounts < limit { - DemocracyLocksMigrationCompleted::::set(true); - } - - log::info!("Unlocked {} accounts 🧹", unlocked_accounts); - Ok(Pays::No.into()) - } } } diff --git a/pallets/moonbeam-lazy-migrations/src/mock.rs b/pallets/moonbeam-lazy-migrations/src/mock.rs index 6a9f47a805..65630ab6c6 100644 --- a/pallets/moonbeam-lazy-migrations/src/mock.rs +++ b/pallets/moonbeam-lazy-migrations/src/mock.rs @@ -23,7 +23,7 @@ use frame_support::{ traits::{EqualPrivilegeOnly, Everything, SortedMembers}, weights::{constants::RocksDbWeight, Weight}, }; -use frame_system::{EnsureRoot, EnsureSigned}; +use frame_system::EnsureRoot; use pallet_evm::{AddressMapping, EnsureAddressTruncated}; use sp_core::{ConstU32, H160, H256, U256}; use sp_runtime::{ @@ -43,7 +43,6 @@ construct_runtime!( Timestamp: pallet_timestamp, EVM: pallet_evm, LazyMigrations: pallet_moonbeam_lazy_migrations::{Pallet, Call}, - Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event}, Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event}, } ); @@ -130,37 +129,6 @@ impl SortedMembers for OneToFive { #[cfg(feature = "runtime-benchmarks")] fn add(_m: &u64) {} } -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = pallet_balances::Pallet; - type EnactmentPeriod = (); - type LaunchPeriod = (); - type VotingPeriod = (); - type VoteLockingPeriod = (); - type FastTrackVotingPeriod = (); - type MinimumDeposit = (); - type MaxDeposits = (); - type MaxBlacklisted = (); - type SubmitOrigin = EnsureSigned; - type ExternalOrigin = EnsureRoot; - type ExternalMajorityOrigin = EnsureRoot; - type ExternalDefaultOrigin = EnsureRoot; - type FastTrackOrigin = EnsureRoot; - type CancellationOrigin = EnsureRoot; - type BlacklistOrigin = EnsureRoot; - type CancelProposalOrigin = EnsureRoot; - type VetoOrigin = EnsureSigned; - type CooloffPeriod = (); - type Slash = (); - type InstantOrigin = EnsureRoot; - type InstantAllowed = (); - type Scheduler = Scheduler; - type MaxVotes = (); - type PalletsOrigin = OriginCaller; - type WeightInfo = (); - type MaxProposals = (); - type Preimages = (); -} parameter_types! { pub const MinimumPeriod: u64 = 6000 / 2; diff --git a/pallets/xcm-transactor/src/encode.rs b/pallets/xcm-transactor/src/encode.rs index d9dfac890e..6d5f3c9113 100644 --- a/pallets/xcm-transactor/src/encode.rs +++ b/pallets/xcm-transactor/src/encode.rs @@ -22,7 +22,6 @@ //! for the Xcm Transactor pallet #![cfg_attr(not(feature = "std"), no_std)] - use frame_support::pallet_prelude::*; use sp_runtime::traits::{AccountIdLookup, StaticLookup}; use sp_std::prelude::*; diff --git a/precompiles/pallet-democracy/Cargo.toml b/precompiles/pallet-democracy/Cargo.toml deleted file mode 100644 index 175e732269..0000000000 --- a/precompiles/pallet-democracy/Cargo.toml +++ /dev/null @@ -1,58 +0,0 @@ -[package] -name = "pallet-evm-precompile-democracy" -authors = { workspace = true } -description = "A Precompile to make Substrate's pallet-democracy accessible to pallet-evm" -edition = "2021" -version = "0.2.0" - -[dependencies] -log = { workspace = true } -num_enum = { workspace = true } - -# Moonbeam -precompile-utils = { workspace = true } - -# Substrate -fp-evm = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-democracy = { workspace = true } -pallet-preimage = { workspace = true } -parity-scale-codec = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Frontier -pallet-evm = { workspace = true, features = [ "forbid-evm-reentrancy" ] } - -[dev-dependencies] -derive_more = { workspace = true } -hex-literal = { workspace = true } -serde = { workspace = true } - -# Moonbeam -precompile-utils = { workspace = true, features = [ "std", "testing" ] } - -# Substrate -pallet-balances = { workspace = true, features = [ "std" ] } -pallet-scheduler = { workspace = true, features = [ "std" ] } -pallet-timestamp = { workspace = true, features = [ "std" ] } -scale-info = { workspace = true, features = [ "derive", "std" ] } -sp-runtime = { workspace = true, features = [ "std" ] } - -[features] -default = [ "std" ] -std = [ - "fp-evm/std", - "frame-support/std", - "frame-system/std", - "pallet-democracy/std", - "pallet-evm/std", - "parity-scale-codec/std", - "precompile-utils/std", - "sp-core/std", - "sp-io/std", - "sp-std/std", -] diff --git a/precompiles/pallet-democracy/DemocracyInterface.sol b/precompiles/pallet-democracy/DemocracyInterface.sol deleted file mode 100644 index 810575ee45..0000000000 --- a/precompiles/pallet-democracy/DemocracyInterface.sol +++ /dev/null @@ -1,223 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -/// @dev The Democracy contract's address. -address constant DEMOCRACY_ADDRESS = 0x0000000000000000000000000000000000000803; - -/// @dev The Democracy contract's instance. -Democracy constant DEMOCRACY_CONTRACT = Democracy(DEMOCRACY_ADDRESS); - -/// @author The Moonbeam Team -/// @title Pallet Democracy Interface -/// @dev The interface through which solidity contracts will interact with pallet-democracy. -/// This interface does not exhaustively wrap pallet democracy, rather it wraps the most -/// important parts and the parts that are expected to be most useful to evm contracts. -/// More exhaustive wrapping can be added later if it is desireable and the pallet interface -/// is deemed sufficiently stable. -/// @custom:address 0x0000000000000000000000000000000000000803 -interface Democracy { - // First some simple accessors - - /// Get The total number of public proposals past and present - /// @custom:selector 31305462 - /// - /// @return The total number of public proposals past and present - function publicPropCount() external view returns (uint256); - - /// Get details about all public porposals. - /// @custom:selector - /// @return (prop index, proposal hash, proposer) - /// TODO This is supposed to be a vec. Let's save this one for later. - // function publicProps() - // external - // view - // returns ( - // uint256, - // bytes32, - // address - // ); - - /// Get the total amount locked behind a proposal. - /// @custom:selector 4767142d - /// - /// @dev Unlike the similarly-named Rust function this one only returns the value, not the - /// complete list of backers. - /// @param propIndex The index of the proposal you are interested in - /// @return The amount of tokens locked behind the proposal - function depositOf(uint256 propIndex) external view returns (uint256); - - /// Get the index of the lowest unbaked referendum - /// @custom:selector d49dccf0 - /// - /// @return The lowest referendum index representing an unbaked referendum. - function lowestUnbaked() external view returns (uint256); - - /// Get the details about an ongoing referendum. - /// @custom:selector f033b7cd - /// - /// @dev This, along with `finishedReferendumInfo`, wraps the pallet's `referendumInfo` - /// function. It is necessary to split it into two here because Solidity only has c-style enums. - /// @param refIndex The index of the referendum you are interested in - /// @return A tuple including: - /// * The block in which the referendum ended - /// * The proposal hash - /// * The baising mechanism 0-SuperMajorityApprove, 1-SuperMajorityAgainst, 2-SimpleMajority - /// * The delay between passing and launching - /// * The total aye vote (including conviction) - /// * The total nay vote (including conviction) - /// * The total turnout (not including conviction) - function ongoingReferendumInfo(uint32 refIndex) - external - view - returns ( - uint256, - bytes32, - uint8, - uint256, - uint256, - uint256, - uint256 - ); - - /// Get the details about a finished referendum. - /// @custom:selector c75abcce - /// - /// @dev This, along with `ongoingReferendumInfo`, wraps the pallet's `referendumInfo` - /// function. It is necessary to split it into two here because Solidity only has c-style enums. - /// @param refIndex The index of the referendum you are interested in - /// @return A tuple including whether the referendum passed, and the block at which it finished. - function finishedReferendumInfo(uint32 refIndex) - external - view - returns (bool, uint256); - - // Now the dispatchables - - /// Make a new proposal - /// @custom:selector 7824e7d1 - /// - /// @param proposalHash The hash of the proposal you are making - /// @param value The number of tokens to be locked behind this proposal. - function propose(bytes32 proposalHash, uint256 value) external; - - /// Signal agreement with a proposal - /// @custom:selector c7a76601 - /// - /// @dev No amount is necessary here. Seconds are always for the same amount that the original - /// proposer locked. You may second multiple times. - /// - /// @param propIndex index of the proposal you want to second - /// @param secondsUpperBound A number greater than or equal to the current number of seconds. - /// This is necessary for calculating the weight of the call. - function second(uint256 propIndex, uint256 secondsUpperBound) external; - - //TODO should we have an alternative `simpleSecond` where the upper bound is read from storage? - - /// Vote in a referendum. - /// @custom:selector 6cd18b0d - /// - /// @param refIndex index of the referendum you want to vote in - /// @param aye `true` is a vote to enact the proposal; `false` is a vote to keep the status quo. - /// @param voteAmount The number of tokens you are willing to lock if you get your way - /// @param conviction How strongly you want to vote. Higher conviction means longer lock time. - /// This must be an interget in the range 0 to 6 - /// - /// @dev This function only supposrts `Standard` votes where you either vote aye xor nay. - /// It does not support `Split` votes where you vote on both sides. If such a need - /// arises, we should add an additional function to this interface called `splitVote`. - function standardVote( - uint256 refIndex, - bool aye, - uint256 voteAmount, - uint256 conviction - ) external; - - /// Remove a vote for a referendum. - /// @custom:selector 3f68fde4 - /// - /// @dev Locks get complex when votes are removed. See pallet-democracy's docs for details. - /// @param refIndex The index of the referendum you are interested in - function removeVote(uint256 refIndex) external; - - /// Delegate voting power to another account. - /// @custom:selector 0185921e - /// - /// @dev The balance delegated is locked for as long as it is delegated, and thereafter for the - /// time appropriate for the conviction's lock period. - /// @param representative The account to whom the vote shall be delegated. - /// @param conviction The conviction with which you are delegating. This conviction is used for - /// All_ delegated votes. - /// @param amount The number of tokens whose voting power shall be delegated. - function delegate( - address representative, - uint256 conviction, - uint256 amount - ) external; - - /// Undelegatehe voting power - /// @custom:selector 1eef225c - /// - /// @dev Tokens may be unlocked once the lock period corresponding to the conviction with which - /// the delegation was issued has elapsed. - function unDelegate() external; - - /// Unlock tokens that have an expired lock. - /// @custom:selector 2f6c493c - /// - /// @param target The account whose tokens should be unlocked. This may be any account. - function unlock(address target) external; - - /// Register the preimage for an upcoming proposal. This doesn't require the proposal to be - /// in the dispatch queue but does require a deposit, returned once enacted. - /// @custom:selector cb00f603 - /// - /// @param encodedProposal The scale-encoded proposal whose hash has been submitted on-chain. - function notePreimage(bytes memory encodedProposal) external; - - /// Register the preimage for an upcoming proposal. This requires the proposal to be - /// in the dispatch queue. No deposit is needed. When this call is successful, i.e. - /// the preimage has not been uploaded before and matches some imminent proposal, - /// no fee is paid. - /// @custom:selector 974791e3 - /// - /// @param encodedProposal The scale-encoded proposal whose hash has been submitted on-chain. - function noteImminentPreimage(bytes memory encodedProposal) external; - - /// @dev A motion has been proposed by a public account. - /// @custom:selector d89e173ca5c9fd0ec38f2b01995c4f1748210f686fa189a6b8d189c210444924 - /// @param proposalIndex uint32 Index of the proposal. - /// @param deposit uint256 Amount of tokens deposited. - event Proposed(uint32 indexed proposalIndex, uint256 deposit); - - /// @dev An account has seconded a proposal. - /// @custom:selector e1613d7e3f54885ef3ffdb714435193b9b80818bd3381f108a4d4b21e842654a - /// @param proposalIndex uint32 Index of the proposal. - /// @param seconder address Address of the seconder. - event Seconded(uint32 indexed proposalIndex, address seconder); - - /// @dev An account made a standard vote. - /// @custom:selector 057363260bf880d3658601ecff97e75b67a22f38b7066c0e47e2d170477579c3 - /// @param referendumIndex uint32 Index of the referendum. - /// @param voter address Address of the voter. - /// @param aye bool Is it a vote for or against the referendum. - /// @param voteAmount uint256 Amount used to vote. - /// @param conviction uint8 Conviction of the vote. - event StandardVote( - uint32 indexed referendumIndex, - address voter, - bool aye, - uint256 voteAmount, - uint8 conviction - ); - - /// @dev An account delegated some voting power to another account - /// @custom:selector 4bc154dd35d6a5cb9206482ecb473cdbf2473006d6bce728b9cc0741bcc59ea2 - /// @param who address Address of the delegator. - /// @param target address Address of the delegatee. - event Delegated(address indexed who, address target); - - /// @dev An account undelegated. - /// @custom:selector 42176493fdfcada70cc1bcf321c9a2314e9571a9fe53c54a5385a1eeac8bc1d7 - /// @param who address Address of the delegator. - event Undelegated(address indexed who); -} diff --git a/precompiles/pallet-democracy/PoliticalPartyDao.sol b/precompiles/pallet-democracy/PoliticalPartyDao.sol deleted file mode 100644 index 5d7840495a..0000000000 --- a/precompiles/pallet-democracy/PoliticalPartyDao.sol +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -pragma solidity >=0.8.3; - -/// Example contract to use and test the democracy interface. -/// -/// A simple DAO where you can contribute eth and vote on a referendum. The DAO holds its own -/// internal vote on a pallet-democracy style referendum, and votes all DAO tokens accordingly. -/// -/// Contributors who lock tokens in the contract are sacrificing the ability to otherwise -/// use the tokens (opportunity cost) as well as sacrificing their freedom to vote with those tokens. -/// They are accepting these costs for the potential of gaining more overall political influence by -/// means of non-member citizens delegating their own votes to the party. -/// -/// This example contract is meant to explore the democracy interface more than innovate in terms of -/// elections and political parties, so there are a few limitations. -/// 1. This DAO is for a _single_ referendum. -/// 2. It uses a simple majority rules mechanism. Definitely not production ready... -/// 3. Early withdrawal penalties are just locked in the contract forever. -/// 4. We just use a simple mapping to store everything. A better idea might be fungible dao tokens -contract PoliticalPartyDao { - mapping(address => Contribution) public contributions; - - constructor(uint256 proposalHash) { - // Make sure the proposal exists - } - - /// @dev Contribute funds to the dao and specify your initial vote - /// - /// @param vote Whether you support the referendum (true). - /// @custom:selector 40656963 - function contribute(bool vote) external payable {} - - /// @dev Change your currently registered vote in the contract - /// @custom:selector bc55efbf - function changeVote() external {} - - /// @dev Withdraw your tokens after the referendum finishes. - /// @custom:selector 3ccfd60b - function withdraw() external {} - - /// @dev Allows a user who is unhappy with the status of the internal party vote to withdraw tokens. - /// However there is a 10% penalty for being fickle. The 10% of tokens that remain in the DAO - /// are jsut locked here forever. A real-life impl could explicitly burn or redistribute. - /// @custom:selector 2fc54f73 - function withdrawEarly() external { - // Does this actually help explore the democracy interface? If not, don't implement it. - } -} - -/// Information about a contribution to the DAO including the amount contributed and the vote. -struct Contribution { - uint256 amount; - bool vote; -} diff --git a/precompiles/pallet-democracy/src/lib.rs b/precompiles/pallet-democracy/src/lib.rs deleted file mode 100644 index f4d5cf0ce7..0000000000 --- a/precompiles/pallet-democracy/src/lib.rs +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . - -//! Precompile to interact with pallet democracy through an evm precompile. - -#![cfg_attr(not(feature = "std"), no_std)] - -use fp_evm::PrecompileHandle; -use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo}; -use frame_support::traits::{Bounded, ConstU32, Currency, QueryPreimage}; -use frame_system::pallet_prelude::BlockNumberFor; -use pallet_democracy::{ - AccountVote, Call as DemocracyCall, Conviction, ReferendumInfo, Vote, VoteThreshold, -}; -use pallet_evm::AddressMapping; -use pallet_preimage::Call as PreimageCall; -use precompile_utils::prelude::*; -use sp_core::{Get, H160, H256, U256}; -use sp_runtime::traits::{Dispatchable, Hash, StaticLookup}; -use sp_std::{ - convert::{TryFrom, TryInto}, - fmt::Debug, - marker::PhantomData, - vec::Vec, -}; - -#[cfg(test)] -mod mock; -#[cfg(test)] -mod tests; - -type BalanceOf = <::Currency as Currency< - ::AccountId, ->>::Balance; - -type DemocracyOf = pallet_democracy::Pallet; - -pub const ENCODED_PROPOSAL_SIZE_LIMIT: u32 = 2u32.pow(16); -type GetEncodedProposalSizeLimit = ConstU32; - -/// Solidity selector of the Proposed log, which is the Keccak of the Log signature. -pub const SELECTOR_LOG_PROPOSED: [u8; 32] = keccak256!("Proposed(uint32,uint256)"); - -/// Solidity selector of the Seconded log, which is the Keccak of the Log signature. -pub const SELECTOR_LOG_SECONDED: [u8; 32] = keccak256!("Seconded(uint32,address)"); - -/// Solidity selector of the StandardVote log, which is the Keccak of the Log signature. -pub const SELECTOR_LOG_STANDARD_VOTE: [u8; 32] = - keccak256!("StandardVote(uint32,address,bool,uint256,uint8)"); - -/// Solidity selector of the Delegated log, which is the Keccak of the Log signature. -pub const SELECTOR_LOG_DELEGATED: [u8; 32] = keccak256!("Delegated(address,address)"); - -/// Solidity selector of the Undelegated log, which is the Keccak of the Log signature. -pub const SELECTOR_LOG_UNDELEGATED: [u8; 32] = keccak256!("Undelegated(address)"); - -/// A precompile to wrap the functionality from pallet democracy. -/// -/// Grants evm-based DAOs the right to vote making them first-class citizens. -/// -/// For an example of a political party that operates as a DAO, see PoliticalPartyDao.sol -pub struct DemocracyPrecompile(PhantomData); - -#[precompile_utils::precompile] -#[precompile::test_concrete_types(mock::Runtime)] -impl DemocracyPrecompile -where - Runtime: pallet_democracy::Config - + pallet_evm::Config - + frame_system::Config - + pallet_preimage::Config, - U256: From>, - BalanceOf: TryFrom + TryInto + Into + Debug + solidity::Codec, - Runtime::RuntimeCall: Dispatchable + GetDispatchInfo, - ::RuntimeOrigin: From>, - Runtime::RuntimeCall: From>, - Runtime::RuntimeCall: From>, - Runtime::Hash: From + Into, - BlockNumberFor: Into, -{ - // The accessors are first. They directly return their result. - #[precompile::public("publicPropCount()")] - #[precompile::public("public_prop_count()")] - #[precompile::view] - fn public_prop_count(handle: &mut impl PrecompileHandle) -> EvmResult { - // Fetch data from pallet - // storage item: PublicPropCount - // max encoded len: u32(4) - handle.record_db_read::(4)?; - let prop_count = DemocracyOf::::public_prop_count(); - log::trace!(target: "democracy-precompile", "Prop count from pallet is {:?}", prop_count); - - Ok(prop_count.into()) - } - - #[precompile::public("depositOf(uint256)")] - #[precompile::public("deposit_of(uint256)")] - #[precompile::view] - fn deposit_of( - handle: &mut impl PrecompileHandle, - prop_index: Convert, - ) -> EvmResult { - let prop_index = prop_index.converted(); - - // Fetch data from pallet - // storage item: DepositOf - // max encoded len: Twox64(8) + PropIndex u32(4) + - // BalanceOf(16) + BoundedVec (20 * MaxDeposits) - handle.record_db_read::((20 * ::get() as usize) + 28)?; - let deposit = DemocracyOf::::deposit_of(prop_index) - .ok_or_else(|| revert("No such proposal in pallet democracy"))? - .1; - - log::trace!( - target: "democracy-precompile", - "Deposit of proposal {:?} is {:?}", prop_index, deposit - ); - - Ok(deposit.into()) - } - - #[precompile::public("lowestUnbaked()")] - #[precompile::public("lowest_unbaked()")] - #[precompile::view] - fn lowest_unbaked(handle: &mut impl PrecompileHandle) -> EvmResult { - // Fetch data from pallet - // storage item: LowestUnbaked - // max encoded len: ReferendumIndex u32(4) - handle.record_db_read::(4)?; - let lowest_unbaked = DemocracyOf::::lowest_unbaked(); - log::trace!( - target: "democracy-precompile", - "lowest unbaked referendum is {:?}", lowest_unbaked - ); - - Ok(lowest_unbaked.into()) - } - - #[precompile::public("ongoingReferendumInfo(uint32)")] - #[precompile::view] - fn ongoing_referendum_info( - handle: &mut impl PrecompileHandle, - ref_index: u32, - ) -> EvmResult<(U256, H256, u8, U256, U256, U256, U256)> { - // storage item: ReferendumInfoOf - // max encoded len: Twox64(8) + ReferendumIndex u32(4) + - // ReferendumInfo (enum(1) + end(4) + proposal(128) + threshold(1) + delay(4) + tally(3*16)) - handle.record_db_read::(186)?; - let ref_status = match DemocracyOf::::referendum_info(ref_index) { - Some(ReferendumInfo::Ongoing(ref_status)) => ref_status, - Some(ReferendumInfo::Finished { .. }) => Err(revert("Referendum is finished"))?, - None => Err(revert("Unknown referendum"))?, - }; - - let threshold_u8: u8 = match ref_status.threshold { - VoteThreshold::SuperMajorityApprove => 0, - VoteThreshold::SuperMajorityAgainst => 1, - VoteThreshold::SimpleMajority => 2, - }; - - Ok(( - ref_status.end.into(), - ref_status.proposal.hash().into(), - threshold_u8.into(), - ref_status.delay.into(), - ref_status.tally.ayes.into(), - ref_status.tally.nays.into(), - ref_status.tally.turnout.into(), - )) - } - - #[precompile::public("finishedReferendumInfo(uint32)")] - #[precompile::view] - fn finished_referendum_info( - handle: &mut impl PrecompileHandle, - ref_index: u32, - ) -> EvmResult<(bool, U256)> { - // storage item: ReferendumInfoOf - // max encoded len: Twox64(8) + ReferendumIndex u32(4) + - // ReferendumInfo (enum(1) + end(4) + proposal(128) + threshold(1) + delay(4) + tally(3*16)) - handle.record_db_read::(186)?; - let (approved, end) = match DemocracyOf::::referendum_info(ref_index) { - Some(ReferendumInfo::Ongoing(_)) => Err(revert("Referendum is ongoing"))?, - Some(ReferendumInfo::Finished { approved, end }) => (approved, end), - None => Err(revert("Unknown referendum"))?, - }; - - Ok((approved, end.into())) - } - - // The dispatchable wrappers are next. They dispatch a Substrate inner Call. - #[precompile::public("propose(bytes32,uint256)")] - fn propose(handle: &mut impl PrecompileHandle, proposal_hash: H256, value: U256) -> EvmResult { - handle.record_log_costs_manual(2, 32)?; - - // Fetch data from pallet - // storage item: PublicPropCount - // max encoded len: PropIndex u32(4) - handle.record_db_read::(4)?; - let prop_count = DemocracyOf::::public_prop_count(); - - let value = Self::u256_to_amount(value).in_field("value")?; - - log::trace!( - target: "democracy-precompile", - "Proposing with hash {:?}, and amount {:?}", proposal_hash, value - ); - - // This forces it to have the proposal in pre-images. - // Storage item: StatusFor - // max encoded len: Hash(32) + RequestStatus(enum(1) + deposit(1+20+16) + count(4) + len(5)) - handle.record_db_read::(79)?; - let len = ::Preimages::len(&proposal_hash).ok_or({ - RevertReason::custom("Failure in preimage fetch").in_field("proposal_hash") - })?; - - let bounded = Bounded::Lookup::< - pallet_democracy::CallOf, - ::Hashing, - > { - hash: proposal_hash, - len, - }; - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::propose { - proposal: bounded, - value, - }; - - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - log2( - handle.context().address, - SELECTOR_LOG_PROPOSED, - H256::from_low_u64_be(prop_count as u64), // proposal index, - solidity::encode_event_data(U256::from(value)), - ) - .record(handle)?; - - Ok(()) - } - - #[precompile::public("second(uint256,uint256)")] - fn second( - handle: &mut impl PrecompileHandle, - prop_index: Convert, - seconds_upper_bound: Convert, - ) -> EvmResult { - handle.record_log_costs_manual(2, 32)?; - let prop_index = prop_index.converted(); - let seconds_upper_bound = seconds_upper_bound.converted(); - - log::trace!( - target: "democracy-precompile", - "Seconding proposal {:?}, with bound {:?}", prop_index, seconds_upper_bound - ); - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::second { - proposal: prop_index, - }; - - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - log2( - handle.context().address, - SELECTOR_LOG_SECONDED, - H256::from_low_u64_be(prop_index as u64), // proposal index, - solidity::encode_event_data(Address(handle.context().caller)), - ) - .record(handle)?; - - Ok(()) - } - - #[precompile::public("standardVote(uint256,bool,uint256,uint256)")] - #[precompile::public("standard_vote(uint256,bool,uint256,uint256)")] - fn standard_vote( - handle: &mut impl PrecompileHandle, - ref_index: Convert, - aye: bool, - vote_amount: U256, - conviction: Convert, - ) -> EvmResult { - handle.record_log_costs_manual(2, 32 * 4)?; - let ref_index = ref_index.converted(); - let vote_amount_balance = Self::u256_to_amount(vote_amount).in_field("voteAmount")?; - - let conviction_enum: Conviction = - conviction.clone().converted().try_into().map_err(|_| { - RevertReason::custom("Must be an integer between 0 and 6 included") - .in_field("conviction") - })?; - - let vote = AccountVote::Standard { - vote: Vote { - aye, - conviction: conviction_enum, - }, - balance: vote_amount_balance, - }; - - log::trace!(target: "democracy-precompile", - "Voting {:?} on referendum #{:?}, with conviction {:?}", - aye, ref_index, conviction_enum - ); - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::vote { ref_index, vote }; - - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - log2( - handle.context().address, - SELECTOR_LOG_STANDARD_VOTE, - H256::from_low_u64_be(ref_index as u64), // referendum index, - solidity::encode_event_data(( - Address(handle.context().caller), - aye, - vote_amount, - conviction.converted(), - )), - ) - .record(handle)?; - - Ok(()) - } - - #[precompile::public("removeVote(uint256)")] - #[precompile::public("remove_vote(uint256)")] - fn remove_vote(handle: &mut impl PrecompileHandle, ref_index: Convert) -> EvmResult { - let ref_index: u32 = ref_index.converted(); - - log::trace!( - target: "democracy-precompile", - "Removing vote from referendum {:?}", - ref_index - ); - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::remove_vote { index: ref_index }; - - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("delegate(address,uint256,uint256)")] - fn delegate( - handle: &mut impl PrecompileHandle, - representative: Address, - conviction: Convert, - amount: U256, - ) -> EvmResult { - handle.record_log_costs_manual(2, 32)?; - let amount = Self::u256_to_amount(amount).in_field("amount")?; - - let conviction: Conviction = conviction.converted().try_into().map_err(|_| { - RevertReason::custom("Must be an integer between 0 and 6 included") - .in_field("conviction") - })?; - - log::trace!(target: "democracy-precompile", - "Delegating vote to {representative:?} with balance {amount:?} and conviction {conviction:?}", - ); - - let to = Runtime::AddressMapping::into_account_id(representative.into()); - let to: ::Source = Runtime::Lookup::unlookup(to.clone()); - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::delegate { - to, - conviction, - balance: amount, - }; - - RuntimeHelper::::try_dispatch( - handle, - Some(origin).into(), - call, - SYSTEM_ACCOUNT_SIZE, - )?; - - log2( - handle.context().address, - SELECTOR_LOG_DELEGATED, - handle.context().caller, - solidity::encode_event_data(representative), - ) - .record(handle)?; - - Ok(()) - } - - #[precompile::public("unDelegate()")] - #[precompile::public("un_delegate()")] - fn un_delegate(handle: &mut impl PrecompileHandle) -> EvmResult { - handle.record_log_costs_manual(2, 0)?; - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::undelegate {}; - - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - log2( - handle.context().address, - SELECTOR_LOG_UNDELEGATED, - handle.context().caller, - [], - ) - .record(handle)?; - - Ok(()) - } - - #[precompile::public("unlock(address)")] - fn unlock(handle: &mut impl PrecompileHandle, target: Address) -> EvmResult { - let target: H160 = target.into(); - let target = Runtime::AddressMapping::into_account_id(target); - let target: ::Source = - Runtime::Lookup::unlookup(target.clone()); - - log::trace!( - target: "democracy-precompile", - "Unlocking democracy tokens for {:?}", target - ); - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = DemocracyCall::::unlock { target }; - - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("notePreimage(bytes)")] - #[precompile::public("note_preimage(bytes)")] - fn note_preimage( - handle: &mut impl PrecompileHandle, - encoded_proposal: BoundedBytes, - ) -> EvmResult { - let encoded_proposal: Vec = encoded_proposal.into(); - - log::trace!( - target: "democracy-precompile", - "Noting preimage {:?}", encoded_proposal - ); - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = PreimageCall::::note_preimage { - bytes: encoded_proposal.into(), - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - #[precompile::public("noteImminentPreimage(bytes)")] - #[precompile::public("note_imminent_preimage(bytes)")] - fn note_imminent_preimage( - handle: &mut impl PrecompileHandle, - encoded_proposal: BoundedBytes, - ) -> EvmResult { - let encoded_proposal: Vec = encoded_proposal.into(); - - log::trace!( - target: "democracy-precompile", - "Noting imminent preimage {:?}", encoded_proposal - ); - - // To mimic imminent preimage behavior, we need to check whether the preimage - // has been requested - let proposal_hash = ::Hashing::hash(&encoded_proposal); - // is_requested implies db read - // Storage item: StatusFor - // max encoded len: Hash(32) + RequestStatus(enum(1) + deposit(1+20+16) + count(4) + len(5)) - handle.record_db_read::(79)?; - if !<::Preimages as QueryPreimage>::is_requested( - &proposal_hash.into(), - ) { - return Err(revert("not imminent preimage (preimage not requested)")); - }; - - let origin = Runtime::AddressMapping::into_account_id(handle.context().caller); - let call = PreimageCall::::note_preimage { - bytes: encoded_proposal.into(), - }; - RuntimeHelper::::try_dispatch(handle, Some(origin).into(), call, 0)?; - - Ok(()) - } - - fn u256_to_amount(value: U256) -> MayRevert> { - value - .try_into() - .map_err(|_| RevertReason::value_is_too_large("balance type").into()) - } -} diff --git a/precompiles/pallet-democracy/src/mock.rs b/precompiles/pallet-democracy/src/mock.rs deleted file mode 100644 index 364d463543..0000000000 --- a/precompiles/pallet-democracy/src/mock.rs +++ /dev/null @@ -1,334 +0,0 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . - -//! Test utilities -use super::*; -use frame_support::{ - construct_runtime, parameter_types, - traits::{EqualPrivilegeOnly, Everything, OnFinalize, OnInitialize, StorePreimage}, - weights::Weight, -}; -use frame_system::{EnsureRoot, EnsureSigned}; -use pallet_democracy::{BoundedCallOf, VoteThreshold}; -use pallet_evm::{EnsureAddressNever, EnsureAddressRoot, SubstrateBlockHashMapping}; -use precompile_utils::{precompile_set::*, testing::MockAccount}; -use sp_core::{H256, U256}; -use sp_runtime::{ - traits::{BlakeTwo256, IdentityLookup}, - BuildStorage, -}; - -pub type AccountId = MockAccount; -pub type Balance = u128; -pub type BlockNumber = BlockNumberFor; - -type Block = frame_system::mocking::MockBlockU32; - -// Configure a mock runtime to test the pallet. -construct_runtime!( - pub enum Runtime { - System: frame_system, - Balances: pallet_balances, - Evm: pallet_evm, - Timestamp: pallet_timestamp, - Democracy: pallet_democracy, - Scheduler: pallet_scheduler, - Preimage: pallet_preimage, - } -); - -parameter_types! { - pub const BlockHashCount: u32 = 250; - pub const SS58Prefix: u8 = 42; -} -impl frame_system::Config for Runtime { - type BaseCallFilter = Everything; - type DbWeight = (); - type RuntimeOrigin = RuntimeOrigin; - type Nonce = u64; - type Block = Block; - type RuntimeCall = RuntimeCall; - type Hash = H256; - type Hashing = BlakeTwo256; - type AccountId = AccountId; - type Lookup = IdentityLookup; - type RuntimeEvent = RuntimeEvent; - type BlockHashCount = BlockHashCount; - type Version = (); - type PalletInfo = PalletInfo; - type AccountData = pallet_balances::AccountData; - type OnNewAccount = (); - type OnKilledAccount = (); - type SystemWeightInfo = (); - type BlockWeights = (); - type BlockLength = (); - type SS58Prefix = SS58Prefix; - type OnSetCode = (); - type MaxConsumers = frame_support::traits::ConstU32<16>; -} -parameter_types! { - pub const ExistentialDeposit: u128 = 0; -} -impl pallet_balances::Config for Runtime { - type MaxReserves = (); - type ReserveIdentifier = (); - type MaxLocks = (); - type Balance = Balance; - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = (); - type RuntimeHoldReason = (); - type FreezeIdentifier = (); - type MaxHolds = (); - type MaxFreezes = (); - type RuntimeFreezeReason = (); -} - -const MAX_POV_SIZE: u64 = 5 * 1024 * 1024; -/// Block storage limit in bytes. Set to 40 KB. -const BLOCK_STORAGE_LIMIT: u64 = 40 * 1024; - -parameter_types! { - pub BlockGasLimit: U256 = U256::from(u64::MAX); - pub PrecompilesValue: Precompiles = Precompiles::new(); - pub const WeightPerGas: Weight = Weight::from_parts(1, 0); - pub GasLimitPovSizeRatio: u64 = { - let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); - block_gas_limit.saturating_div(MAX_POV_SIZE) - }; - pub GasLimitStorageGrowthRatio: u64 = { - let block_gas_limit = BlockGasLimit::get().min(u64::MAX.into()).low_u64(); - block_gas_limit.saturating_div(BLOCK_STORAGE_LIMIT) - }; -} - -pub type Precompiles = - PrecompileSetBuilder, DemocracyPrecompile>,)>; - -pub type PCall = DemocracyPrecompileCall; - -impl pallet_evm::Config for Runtime { - type FeeCalculator = (); - type GasWeightMapping = pallet_evm::FixedGasWeightMapping; - type WeightPerGas = WeightPerGas; - type CallOrigin = EnsureAddressRoot; - type WithdrawOrigin = EnsureAddressNever; - type AddressMapping = AccountId; - type Currency = Balances; - type RuntimeEvent = RuntimeEvent; - type Runner = pallet_evm::runner::stack::Runner; - type PrecompilesType = Precompiles; - type PrecompilesValue = PrecompilesValue; - type ChainId = (); - type OnChargeTransaction = (); - type BlockGasLimit = BlockGasLimit; - type BlockHashMapping = SubstrateBlockHashMapping; - type FindAuthor = (); - type OnCreate = (); - type GasLimitPovSizeRatio = GasLimitPovSizeRatio; - type SuicideQuickClearLimit = ConstU32<0>; - type GasLimitStorageGrowthRatio = GasLimitStorageGrowthRatio; - type Timestamp = Timestamp; - type WeightInfo = pallet_evm::weights::SubstrateWeight; -} - -parameter_types! { - pub const MinimumPeriod: u64 = 5; -} -impl pallet_timestamp::Config for Runtime { - type Moment = u64; - type OnTimestampSet = (); - type MinimumPeriod = MinimumPeriod; - type WeightInfo = (); -} - -parameter_types! { - pub const LaunchPeriod: BlockNumber = 10; - pub const VotingPeriod: BlockNumber = 10; - pub const VoteLockingPeriod: BlockNumber = 10; - pub const FastTrackVotingPeriod: BlockNumber = 5; - pub const EnactmentPeriod: BlockNumber = 10; - pub const CooloffPeriod: BlockNumber = 10; - pub const MinimumDeposit: Balance = 10; - pub const MaxVotes: u32 = 10; - pub const MaxProposals: u32 = 10; - pub const PreimageByteDeposit: Balance = 10; - pub const InstantAllowed: bool = false; -} - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = EnactmentPeriod; - type LaunchPeriod = LaunchPeriod; - type VotingPeriod = VotingPeriod; - type VoteLockingPeriod = VoteLockingPeriod; - type FastTrackVotingPeriod = FastTrackVotingPeriod; - type MinimumDeposit = MinimumDeposit; - type ExternalOrigin = EnsureRoot; - type ExternalMajorityOrigin = EnsureRoot; - type ExternalDefaultOrigin = EnsureRoot; - type FastTrackOrigin = EnsureRoot; - type InstantOrigin = EnsureRoot; - type CancellationOrigin = EnsureRoot; - type CancelProposalOrigin = EnsureRoot; - type BlacklistOrigin = EnsureRoot; - type VetoOrigin = EnsureSigned; - type CooloffPeriod = CooloffPeriod; - type Slash = (); - type InstantAllowed = InstantAllowed; - type Scheduler = Scheduler; - type MaxVotes = MaxVotes; - type PalletsOrigin = OriginCaller; - type WeightInfo = (); - type MaxProposals = MaxProposals; - type Preimages = Preimage; - type MaxDeposits = ConstU32<1000>; - type MaxBlacklisted = ConstU32<5>; - type SubmitOrigin = EnsureSigned; -} -impl pallet_scheduler::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; - type PalletsOrigin = OriginCaller; - type RuntimeCall = RuntimeCall; - type MaximumWeight = (); - type ScheduleOrigin = EnsureRoot; - type MaxScheduledPerBlock = (); - type WeightInfo = (); - type OriginPrivilegeCmp = EqualPrivilegeOnly; // TODO : Simplest type, maybe there is better ? - type Preimages = (); -} - -impl pallet_preimage::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type WeightInfo = (); - type Currency = Balances; - type ManagerOrigin = EnsureRoot; - type Consideration = (); -} - -/// Build test externalities, prepopulated with data for testing democracy precompiles -pub(crate) struct ExtBuilder { - /// Endowed accounts with balances - balances: Vec<(AccountId, Balance)>, - /// Referenda that already exist (don't need a proposal and launch period delay) - referenda: Vec<( - Bounded, - VoteThreshold, - BlockNumber, - )>, -} - -impl Default for ExtBuilder { - fn default() -> ExtBuilder { - ExtBuilder { - balances: vec![], - referenda: vec![], - } - } -} - -impl ExtBuilder { - /// Fund some accounts before starting the test - pub(crate) fn with_balances(mut self, balances: Vec<(AccountId, Balance)>) -> Self { - self.balances = balances; - self - } - - /// Put some referenda into storage before starting the test - pub(crate) fn with_referenda( - mut self, - referenda: Vec<( - Bounded, - VoteThreshold, - BlockNumber, - )>, - ) -> Self { - self.referenda = referenda; - self - } - - /// Build the test externalities for use in tests - pub(crate) fn build(self) -> sp_io::TestExternalities { - let mut t = frame_system::GenesisConfig::::default() - .build_storage() - .expect("Frame system builds valid default genesis config"); - - pallet_balances::GenesisConfig:: { - balances: self.balances.clone(), - } - .assimilate_storage(&mut t) - .expect("Pallet balances storage can be assimilated"); - - let mut ext = sp_io::TestExternalities::new(t); - ext.execute_with(|| { - System::set_block_number(1); - - // Pallet democracy doesn't have a meaningful genesis config, so we use - // its helper method to initialize the referenda - for (hash, thresh, delay) in self.referenda { - Democracy::internal_start_referendum(hash, thresh, delay); - } - }); - ext - } -} - -pub(crate) fn roll_to(n: BlockNumber) { - // We skip timestamp's on_finalize because it requires that the timestamp inherent be set - // We may be able to simulate this by poking its storage directly, but I don't see any value - // added from doing that. - while System::block_number() < n { - Scheduler::on_finalize(System::block_number()); - Democracy::on_finalize(System::block_number()); - // Timestamp::on_finalize(System::block_number()); - Evm::on_finalize(System::block_number()); - Balances::on_finalize(System::block_number()); - System::on_finalize(System::block_number()); - - System::set_block_number(System::block_number() + 1); - - System::on_initialize(System::block_number()); - Balances::on_initialize(System::block_number()); - Evm::on_initialize(System::block_number()); - Timestamp::on_initialize(System::block_number()); - Democracy::on_initialize(System::block_number()); - Scheduler::on_initialize(System::block_number()); - } -} - -pub(crate) fn events() -> Vec { - System::events() - .into_iter() - .map(|r| r.event) - .collect::>() -} - -pub(crate) fn set_balance_proposal( - who: impl Into, - value: u128, -) -> BoundedCallOf { - let who = who.into(); - let inner = pallet_balances::Call::force_set_balance { - who, - new_free: value, - }; - let outer = RuntimeCall::Balances(inner); - Preimage::bound(outer).unwrap() -} diff --git a/precompiles/pallet-democracy/src/tests.rs b/precompiles/pallet-democracy/src/tests.rs deleted file mode 100644 index eb9d9173bc..0000000000 --- a/precompiles/pallet-democracy/src/tests.rs +++ /dev/null @@ -1,1469 +0,0 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . - -use crate::{ - mock::{ - events, roll_to, set_balance_proposal, AccountId, Balances, Democracy, ExtBuilder, PCall, - Precompiles, PrecompilesValue, Preimage, Runtime, RuntimeCall, RuntimeOrigin, - }, - SELECTOR_LOG_DELEGATED, SELECTOR_LOG_PROPOSED, SELECTOR_LOG_SECONDED, - SELECTOR_LOG_STANDARD_VOTE, SELECTOR_LOG_UNDELEGATED, -}; -use frame_support::{ - assert_ok, - traits::{Currency, PreimageProvider, QueryPreimage, StorePreimage}, -}; -use pallet_balances::Event as BalancesEvent; -use pallet_preimage::Event as PreimageEvent; - -use pallet_democracy::{ - AccountVote, Call as DemocracyCall, Config as DemocracyConfig, Event as DemocracyEvent, Vote, - VoteThreshold, Voting, -}; -use pallet_evm::{Call as EvmCall, Event as EvmEvent}; -use precompile_utils::{prelude::*, testing::*}; -use sp_core::{H160, H256, U256}; -use sp_runtime::traits::Dispatchable; -use std::{convert::TryInto, str::from_utf8}; - -fn precompiles() -> Precompiles { - PrecompilesValue::get() -} - -fn evm_call(input: Vec) -> EvmCall { - EvmCall::call { - source: Alice.into(), - target: Precompile1.into(), - input, - value: U256::zero(), // No value sent in EVM - gas_limit: u64::max_value(), - max_fee_per_gas: 0.into(), - max_priority_fee_per_gas: Some(U256::zero()), - nonce: None, // Use the next nonce - access_list: Vec::new(), - } -} - -#[test] -fn selector_less_than_four_bytes() { - ExtBuilder::default().build().execute_with(|| { - // This selector is only three bytes long when four are required. - precompiles() - .prepare_test(Alice, Precompile1, vec![1u8, 2u8, 3u8]) - .execute_reverts(|output| output == b"Tried to read selector out of bounds"); - }); -} - -#[test] -fn no_selector_exists_but_length_is_right() { - ExtBuilder::default().build().execute_with(|| { - precompiles() - .prepare_test(Alice, Precompile1, vec![1u8, 2u8, 3u8, 4u8]) - .execute_reverts(|output| output == b"Unknown selector"); - }); -} - -#[test] -fn selectors() { - assert!(PCall::delegate_selectors().contains(&0x0185921e)); - assert!(PCall::deposit_of_selectors().contains(&0x4767142d)); - assert!(PCall::finished_referendum_info_selectors().contains(&0xc75abcce)); - assert!(PCall::lowest_unbaked_selectors().contains(&0xd49dccf0)); - assert!(PCall::ongoing_referendum_info_selectors().contains(&0xf033b7cd)); - assert!(PCall::propose_selectors().contains(&0x7824e7d1)); - assert!(PCall::public_prop_count_selectors().contains(&0x31305462)); - assert!(PCall::remove_vote_selectors().contains(&0x3f68fde4)); - assert!(PCall::second_selectors().contains(&0xc7a76601)); - assert!(PCall::standard_vote_selectors().contains(&0x6cd18b0d)); - assert!(PCall::un_delegate_selectors().contains(&0x1eef225c)); - assert!(PCall::unlock_selectors().contains(&0x2f6c493c)); - - // TODO also test logs once we have them -} - -#[test] -fn modifiers() { - ExtBuilder::default().build().execute_with(|| { - let mut tester = PrecompilesModifierTester::new(precompiles(), Alice, Precompile1); - - tester.test_default_modifier(PCall::delegate_selectors()); - tester.test_view_modifier(PCall::deposit_of_selectors()); - tester.test_view_modifier(PCall::finished_referendum_info_selectors()); - tester.test_view_modifier(PCall::lowest_unbaked_selectors()); - tester.test_view_modifier(PCall::ongoing_referendum_info_selectors()); - tester.test_default_modifier(PCall::propose_selectors()); - tester.test_view_modifier(PCall::public_prop_count_selectors()); - tester.test_default_modifier(PCall::remove_vote_selectors()); - tester.test_default_modifier(PCall::second_selectors()); - tester.test_default_modifier(PCall::standard_vote_selectors()); - tester.test_default_modifier(PCall::un_delegate_selectors()); - tester.test_default_modifier(PCall::unlock_selectors()); - }); -} - -#[test] -fn prop_count_zero() { - ExtBuilder::default().build().execute_with(|| { - // Assert that no props have been opened. - precompiles() - .prepare_test(Alice, Precompile1, PCall::public_prop_count {}) - .expect_cost(0) // TODO: Test db read/write costs - .expect_no_logs() - .execute_returns(U256::zero()) - }); -} - -#[test] -fn prop_count_non_zero() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // There is no interesting genesis config for pallet democracy so we make the proposal here - assert_ok!(RuntimeCall::Democracy(DemocracyCall::propose { - proposal: set_balance_proposal(Charlie, 1000u128), - value: 1000u128 - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - precompiles() - .prepare_test(Alice, Precompile1, PCall::public_prop_count {}) - .expect_cost(0) // TODO: Test db read/write costs - .expect_no_logs() - .execute_returns(1u32); - }); -} - -// It is impossible to have a proposal with zero deposits. When the proposal is made, the proposer -// makes a deposit. So there is always at least one depositor. -#[test] -fn deposit_of_non_zero() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // There is no interesting genesis config for pallet democracy so we make the proposal here - assert_ok!(RuntimeCall::Democracy(DemocracyCall::propose { - proposal: set_balance_proposal(Charlie, 1000u128), - value: 1000u128 - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::deposit_of { - prop_index: 0.into(), - }, - ) - .expect_cost(0) // TODO: Test db read/write costs - .expect_no_logs() - .execute_returns(1000u32); - }); -} - -#[test] -fn deposit_of_bad_index() { - ExtBuilder::default().build().execute_with(|| { - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::deposit_of { - prop_index: 10.into(), - }, - ) - .execute_reverts(|output| output == b"No such proposal in pallet democracy"); - }); -} - -#[test] -fn lowest_unbaked_zero() { - ExtBuilder::default().build().execute_with(|| { - precompiles() - .prepare_test(Alice, Precompile1, PCall::lowest_unbaked {}) - .expect_cost(0) // TODO: Test db read/write costs - .expect_no_logs() - .execute_returns(0u32); - }); -} - -// This test is currently failing. I believe it is caused by a bug in the underlying pallet. I've -// asked about it in https://github.com/paritytech/substrate/issues/9739 -#[ignore] -#[test] -fn lowest_unbaked_non_zero() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1_000_000)]) - .with_referenda(vec![ - ( - set_balance_proposal(Bob, 1000u128), - VoteThreshold::SimpleMajority, - 10, - ), - ( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - ), - ]) - .build() - .execute_with(|| { - // To ensure the referendum passes, we need an Aye vote on it - assert_ok!(RuntimeCall::Democracy(DemocracyCall::vote { - ref_index: 0, // referendum 0 - vote: AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100_000, - } - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - let voting = match pallet_democracy::VotingOf::::get(AccountId::from(Alice)) { - Voting::Direct { - votes, - delegations, - prior, - } => (votes.into_inner(), delegations, prior), - _ => panic!("Votes are not direct"), - }; - - // Assert that the vote was recorded in storage - assert_eq!( - voting, - ( - vec![( - 0, - AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100_000, - } - )], - Default::default(), - Default::default() - ) - ); - - // Run it through until it is baked - roll_to( - ::VotingPeriod::get() - + ::LaunchPeriod::get() - + 1000, - ); - - precompiles() - .prepare_test(Alice, Precompile1, PCall::lowest_unbaked {}) - .expect_cost(0) // TODO: Test db read/write costs - .expect_no_logs() - .execute_returns(1u32); - }); -} - -#[test] -fn ongoing_ref_info_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - assert_ok!(RuntimeCall::Democracy(DemocracyCall::vote { - ref_index: 0, // referendum 0 - vote: AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100_000, - } - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - let hash = set_balance_proposal(Charlie, 1000u128).hash(); - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::ongoing_referendum_info { ref_index: 0 }, - ) - .expect_no_logs() - .execute_returns(( - U256::from(11), // end - hash, // hash - 2u8, // threshold type - U256::from(10), // delay - U256::from(10_000), // tally ayes - U256::zero(), // tally nays - U256::from(100_000), // turnout - )); - }) -} - -#[test] -fn ongoing_ref_info_bad_index() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::ongoing_referendum_info { ref_index: 1 }, - ) - .expect_no_logs() - .execute_reverts(|output| output == b"Unknown referendum"); - }) -} - -#[test] -fn ongoing_ref_info_is_not_ongoing() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - assert_ok!(RuntimeCall::Democracy(DemocracyCall::vote { - ref_index: 0, // referendum 0 - vote: AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100_000, - } - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - roll_to(12); - - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::ongoing_referendum_info { ref_index: 0 }, - ) - .expect_no_logs() - .execute_reverts(|output| output == b"Referendum is finished"); - }) -} - -#[test] -fn finished_ref_info_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - assert_ok!(RuntimeCall::Democracy(DemocracyCall::vote { - ref_index: 0, // referendum 0 - vote: AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100_000, - } - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - roll_to(12); - - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::finished_referendum_info { ref_index: 0 }, - ) - .expect_no_logs() - .execute_returns((true, U256::from(11))); - }) -} - -#[test] -fn finished_ref_info_bad_index() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::finished_referendum_info { ref_index: 1 }, - ) - .expect_no_logs() - .execute_reverts(|output| output == b"Unknown referendum"); - }) -} - -#[test] -fn finished_ref_info_is_not_finished() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::finished_referendum_info { ref_index: 0 }, - ) - .expect_no_logs() - .execute_reverts(|output| output == b"Referendum is ongoing"); - }) -} - -#[test] -fn propose_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // Note first - let hash = <::Preimages as StorePreimage>::note( - Default::default(), - ) - .unwrap(); - - // Construct data to propose empty hash with value 100 - let input = PCall::propose { - proposal_hash: hash, - value: 100.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - PreimageEvent::Noted { hash }.into(), - BalancesEvent::Reserved { - who: Alice.into(), - amount: 100 - } - .into(), - DemocracyEvent::Proposed { - proposal_index: 0, - deposit: 100 - } - .into(), - EvmEvent::Log { - log: log2( - Precompile1, - SELECTOR_LOG_PROPOSED, - H256::zero(), // proposal index, - solidity::encode_event_data(U256::from(100)) - ) - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - }) -} - -// Potential additional `propose` error cases: -// * propose_bad_length -// * proposing fails when you don't have enough funds to cover the deposit - -#[test] -fn second_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // Before we can second anything, we have to have a proposal there to second. - assert_ok!(RuntimeCall::Democracy(DemocracyCall::propose { - proposal: set_balance_proposal(Charlie, 1000u128), // Propose the default hash - value: 100u128, // bond of 100 tokens - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - // Construct the call to second via a precompile - let input = PCall::second { - prop_index: 0.into(), - seconds_upper_bound: 100.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - BalancesEvent::Reserved { - who: Alice.into(), - amount: 100 - } - .into(), - DemocracyEvent::Proposed { - proposal_index: 0, - deposit: 100 - } - .into(), - // This 100 is reserved for the second. - // Pallet democracy does not have an event for seconding - BalancesEvent::Reserved { - who: Alice.into(), - amount: 100 - } - .into(), - DemocracyEvent::Seconded { - seconder: Alice.into(), - prop_index: 0 - } - .into(), - EvmEvent::Log { - log: log2( - Precompile1, - SELECTOR_LOG_SECONDED, - H256::zero(), // proposal index, - solidity::encode_event_data(Address(Alice.into())) - ) - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - }) -} - -// Potential additional `second` error cases: -// * proposal doesn't exist -// * you can't afford it - -#[test] -fn standard_vote_aye_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - // Construct input data to vote aye - let input = PCall::standard_vote { - ref_index: 0.into(), - aye: true, - vote_amount: 100_000.into(), - conviction: 0.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - DemocracyEvent::Started { - ref_index: 0, - threshold: pallet_democracy::VoteThreshold::SimpleMajority - } - .into(), - DemocracyEvent::Voted { - voter: Alice.into(), - ref_index: 0, - vote: AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100000 - } - } - .into(), - BalancesEvent::Locked { - who: Alice.into(), - amount: 100000 - } - .into(), - EvmEvent::Log { - log: log2( - Precompile1, - SELECTOR_LOG_STANDARD_VOTE, - H256::zero(), // referendum index, - solidity::encode_event_data(( - Address(Alice.into()), - true, - U256::from(100_000), - 0u8 - )) - ), - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - - let voting = match pallet_democracy::VotingOf::::get(AccountId::from(Alice)) { - Voting::Direct { - votes, - delegations, - prior, - } => (votes.into_inner(), delegations, prior), - _ => panic!("Votes are not direct"), - }; - - // Assert that the vote was recorded in storage - assert_eq!( - voting, - ( - vec![( - 0, - AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100_000, - } - )], - Default::default(), - Default::default() - ) - ); - }) -} - -#[test] -fn standard_vote_nay_conviction_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000_000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - // Construct input data to vote aye - let input = PCall::standard_vote { - ref_index: 0.into(), - aye: false, - vote_amount: 100_000.into(), - conviction: 3.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - DemocracyEvent::Started { - ref_index: 0, - threshold: pallet_democracy::VoteThreshold::SimpleMajority - } - .into(), - DemocracyEvent::Voted { - voter: Alice.into(), - ref_index: 0, - vote: AccountVote::Standard { - vote: Vote { - aye: false, - conviction: 3u8.try_into().unwrap() - }, - balance: 100000 - } - } - .into(), - BalancesEvent::Locked { - who: Alice.into(), - amount: 100000 - } - .into(), - EvmEvent::Log { - log: log2( - Precompile1, - SELECTOR_LOG_STANDARD_VOTE, - H256::zero(), // referendum index, - solidity::encode_event_data(( - Address(Alice.into()), - false, - U256::from(100_000), - 3u8 - )) - ), - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - - let voting = match pallet_democracy::VotingOf::::get(AccountId::from(Alice)) { - Voting::Direct { - votes, - delegations, - prior, - } => (votes.into_inner(), delegations, prior), - _ => panic!("Votes are not direct"), - }; - - // Assert that the vote was recorded in storage - // Should check ReferendumInfoOf too, but can't because of private fields etc - assert_eq!( - voting, - ( - vec![( - 0, - AccountVote::Standard { - vote: Vote { - aye: false, - conviction: 3u8.try_into().unwrap() - }, - balance: 100_000, - } - )], - Default::default(), - Default::default() - ) - ); - }) -} - -//Potential additional `standard_vote` error cases: -// * can't afford it -// * invalid conviction -// * referendum doesn't exist - -#[test] -fn remove_vote_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - // Vote on it - assert_ok!(Democracy::vote( - RuntimeOrigin::signed(Alice.into()), - 0, // Propose the default hash - AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100, - }, - )); - - let input = PCall::remove_vote { - ref_index: 0.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - DemocracyEvent::Started { - ref_index: 0, - threshold: pallet_democracy::VoteThreshold::SimpleMajority - } - .into(), - DemocracyEvent::Voted { - voter: Alice.into(), - ref_index: 0, - vote: AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 0u8.try_into().unwrap() - }, - balance: 100 - } - } - .into(), - BalancesEvent::Locked { - who: Alice.into(), - amount: 100 - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - - let voting = match pallet_democracy::VotingOf::::get(AccountId::from(Alice)) { - Voting::Direct { - votes, - delegations, - prior, - } => (votes.into_inner(), delegations, prior), - _ => panic!("Votes are not direct"), - }; - - // Assert that the vote was recorded in storage - // Should check ReferendumInfoOf too, but can't because of private fields etc - assert_eq!(voting, (vec![], Default::default(), Default::default())); - }) -} - -#[test] -fn remove_vote_dne() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // Before we can vote on anything, we have to have a referendum there to vote on. - // This will be nicer after https://github.com/paritytech/substrate/pull/9484 - // Make a proposal - assert_ok!(RuntimeCall::Democracy(DemocracyCall::propose { - proposal: set_balance_proposal(Charlie, 1000u128), // Propose the default hash - value: 100u128, // bond of 100 tokens - }) - .dispatch(RuntimeOrigin::signed(Alice.into()))); - - // Wait until it becomes a referendum - roll_to(::LaunchPeriod::get()); - - precompiles() - .prepare_test( - Alice, - Precompile1, - PCall::remove_vote { - ref_index: 0.into(), - }, - ) - .execute_reverts(|output| from_utf8(&output).unwrap().contains("NotVoter")); - }) -} - -#[test] -fn delegate_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // Construct input data to delegate Alice -> Bob - let input = PCall::delegate { - representative: H160::from(Bob).into(), - conviction: 2.into(), - amount: 100.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - BalancesEvent::Locked { - who: Alice.into(), - amount: 100 - } - .into(), - DemocracyEvent::Delegated { - who: Alice.into(), - target: Bob.into() - } - .into(), - EvmEvent::Log { - log: log2( - Precompile1, - SELECTOR_LOG_DELEGATED, - H160::from(Alice), - solidity::encode_event_data(Address(Bob.into())) - ), - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - let alice_voting = - match pallet_democracy::VotingOf::::get(AccountId::from(Alice)) { - Voting::Delegating { - balance, - target, - conviction, - delegations, - prior, - } => (balance, target, conviction, delegations, prior), - _ => panic!("Votes are not delegating"), - }; - - // Assert that the vote was recorded in storage - // Should check ReferendumInfoOf too, but can't because of private fields etc - assert_eq!( - alice_voting, - ( - 100, - Bob.into(), - 2u8.try_into().unwrap(), - Default::default(), - Default::default(), - ) - ); - - let bob_voting = match pallet_democracy::VotingOf::::get(AccountId::from(Bob)) - { - Voting::Direct { - votes, - delegations, - prior, - } => (votes.into_inner(), delegations, prior), - _ => panic!("Votes are not direct"), - }; - - // Assert that the vote was recorded in storage - assert_eq!( - bob_voting, - ( - Default::default(), - pallet_democracy::Delegations { - votes: 200, //because of 2x conviction - capital: 100, - }, - Default::default() - ) - ); - }) -} - -#[test] -fn undelegate_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // Before we can undelegate there has to be a delegation. - // There's no a genesis config or helper function available, so I'll make one here. - assert_ok!(Democracy::delegate( - RuntimeOrigin::signed(Alice.into()), - Bob.into(), - 1u8.try_into().unwrap(), - 100 - )); - - // Construct input data to un-delegate Alice - let input = PCall::un_delegate {}.into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - BalancesEvent::Locked { - who: Alice.into(), - amount: 100 - } - .into(), - DemocracyEvent::Delegated { - who: Alice.into(), - target: Bob.into() - } - .into(), - DemocracyEvent::Undelegated { - account: Alice.into() - } - .into(), - EvmEvent::Log { - log: log2(Precompile1, SELECTOR_LOG_UNDELEGATED, H160::from(Alice), [],), - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - - // Would be nice to check storage too, but I can't express PriorLock because - // it is private. - // assert_eq!( - // pallet_democracy::VotingOf::::get(Alice), - // Voting::Direct{ - // votes: Default::default(), - // delegations: Default::default(), - // prior: pallet_democracy::vote::PriorLock(11, 100), - // } - // ); - }) -} - -#[test] -fn undelegate_dne() { - ExtBuilder::default().build().execute_with(|| { - precompiles() - .prepare_test(Alice, Precompile1, PCall::un_delegate {}) - .execute_reverts(|output| from_utf8(&output).unwrap().contains("NotDelegating")); - }) -} - -#[test] -#[ignore] -fn unlock_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .with_referenda(vec![( - set_balance_proposal(Charlie, 1000u128), - VoteThreshold::SimpleMajority, - 10, - )]) - .build() - .execute_with(|| { - // Alice votes to get some tokens locked - assert_ok!(Democracy::vote( - RuntimeOrigin::signed(Alice.into()), - 0, - AccountVote::Standard { - vote: Vote { - aye: true, - conviction: 1u8.try_into().unwrap() - }, - balance: 100, - } - )); - - // Tokens are locked in `try_vote` when a vote is cast. Why is that not - // reflected here? - // https://github.com/paritytech/substrate/blob/master/frame/democracy/src/lib.rs#L1405 - // One possible way to look further: I just noticed there is a `Locks` storage item in - // the pallet. - // And also, maybe write a test in the pallet to ensure the locks work as expected. - assert_eq!( - >::free_balance(&Alice.into()), - 900 - ); - - // Let time elapse until she wins the vote and gets her tokens locked - roll_to(11); - - // Let time elapse until her tokens no longer need to be locked - // NOTE: This is bogus hash with no preimage, so no actual outcome - // will be successfully dispatched. Nonetheless, she should still have her - // tokens locked. - roll_to(21); - - // Construct input data to un-lock tokens for Alice - let input = PCall::unlock { - target: H160::from(Alice).into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - DemocracyEvent::Started { - ref_index: 0, - threshold: pallet_democracy::VoteThreshold::SimpleMajority - } - .into(), - DemocracyEvent::Passed { ref_index: 0 }.into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - }) -} - -#[test] -fn unlock_with_nothing_locked() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) // So that she already has an account existing. - .build() - .execute_with(|| { - // Construct input data to un-lock tokens for Alice - let input = PCall::unlock { - target: H160::from(Alice).into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(evm_call(input)).dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![EvmEvent::Executed { - address: Precompile1.into() - } - .into(),] - ); - }) -} - -#[test] -fn note_preimage_works() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) // So she can afford the deposit - .build() - .execute_with(|| { - // Construct our dummy proposal and associated data - let dummy_preimage: Vec = vec![1, 2, 3, 4]; - let dummy_bytes = dummy_preimage.clone(); - let proposal_hash = - <::Hashing as sp_runtime::traits::Hash>::hash( - &dummy_preimage[..], - ); - - // Construct input data to note preimage - let input = PCall::note_preimage { - encoded_proposal: dummy_bytes.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(EvmCall::call { - source: Alice.into(), - target: Precompile1.into(), - input, - value: U256::zero(), // No value sent in EVM - gas_limit: u64::max_value(), - max_fee_per_gas: U256::zero(), - max_priority_fee_per_gas: Some(U256::zero()), - nonce: None, // Use the next nonce - access_list: Vec::new(), - }) - .dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - PreimageEvent::Noted { - hash: proposal_hash - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - - // Storage is private so we need to check information through traits - let len = <::Preimages as QueryPreimage>::len( - &proposal_hash, - ) - .unwrap(); - - assert_eq!(len, dummy_preimage.len() as u32); - - let requested = - <::Preimages as QueryPreimage>::is_requested( - &proposal_hash, - ); - - // preimage not requested yet - assert!(!requested); - - let preimage = - >::get_preimage(&proposal_hash).unwrap(); - - // preimage bytes are stored correctly - assert_eq!(preimage, dummy_preimage); - }) -} - -#[test] -fn note_preimage_works_with_real_data() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) // So she can afford the deposit - .build() - .execute_with(|| { - // Construct our dummy proposal and associated data - let dummy_preimage: Vec = - hex_literal::hex!("0c026be02d1d3665660d22ff9624b7be0551ee1ac91b").to_vec(); - let dummy_bytes = dummy_preimage.clone(); - let proposal_hash = - <::Hashing as sp_runtime::traits::Hash>::hash( - &dummy_preimage[..], - ); - - // Assert that the hash is as expected from TS tests - assert_eq!( - proposal_hash, - sp_core::H256::from(hex_literal::hex!( - "e435886138904e20b9d834d5c30b51693e5e53cc97f6d6da5908f1e41468bebf" - )) - ); - - // Construct input data to note preimage - let input = PCall::note_preimage { - encoded_proposal: dummy_bytes.into(), - } - .into(); - - // Make sure the call goes through successfully - assert_ok!(RuntimeCall::Evm(EvmCall::call { - source: Alice.into(), - target: Precompile1.into(), - input, - value: U256::zero(), // No value sent in EVM - gas_limit: u64::max_value(), - max_fee_per_gas: U256::zero(), - max_priority_fee_per_gas: Some(U256::zero()), - nonce: None, // Use the next nonce - access_list: Vec::new(), - }) - .dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - PreimageEvent::Noted { - hash: proposal_hash - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - ] - ); - - // Storage is private so we need to check information through traits - let len = <::Preimages as QueryPreimage>::len( - &proposal_hash, - ) - .unwrap(); - - assert_eq!(len, dummy_preimage.len() as u32); - - let requested = - <::Preimages as QueryPreimage>::is_requested( - &proposal_hash, - ); - - // preimage not requested yet - assert!(!requested,); - - let preimage = - >::get_preimage(&proposal_hash).unwrap(); - - // preimage bytes are stored correctly - assert_eq!(preimage, dummy_preimage); - }) -} - -#[test] -fn cannot_note_duplicate_preimage() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) // So she can afford the deposit - .build() - .execute_with(|| { - // Construct our dummy proposal and associated data - let dummy_preimage: Vec = vec![1, 2, 3, 4]; - let dummy_bytes = dummy_preimage.clone(); - let proposal_hash = - <::Hashing as sp_runtime::traits::Hash>::hash( - &dummy_preimage[..], - ); - - // Construct input data to note preimage - let input: Vec<_> = PCall::note_preimage { - encoded_proposal: dummy_bytes.into(), - } - .into(); - - // First call should go successfully - assert_ok!(RuntimeCall::Evm(EvmCall::call { - source: Alice.into(), - target: Precompile1.into(), - input: input.clone(), - value: U256::zero(), // No value sent in EVM - gas_limit: u64::max_value(), - max_fee_per_gas: U256::zero(), - max_priority_fee_per_gas: Some(U256::zero()), - nonce: None, // Use the next nonce - access_list: Vec::new(), - }) - .dispatch(RuntimeOrigin::root())); - - // Second call should fail because that preimage is already noted - assert_ok!(RuntimeCall::Evm(EvmCall::call { - source: Alice.into(), - target: Precompile1.into(), - input, - value: U256::zero(), // No value sent in EVM - gas_limit: u64::max_value(), - max_fee_per_gas: U256::zero(), - max_priority_fee_per_gas: Some(U256::zero()), - nonce: None, // Use the next nonce - access_list: Vec::new(), - }) - .dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![ - PreimageEvent::Noted { - hash: proposal_hash - } - .into(), - EvmEvent::Executed { - address: Precompile1.into() - } - .into(), - EvmEvent::ExecutedFailed { - address: Precompile1.into() - } - .into(), - ] - ); - }) -} - -#[test] -fn cannot_note_imminent_preimage_before_it_is_actually_imminent() { - ExtBuilder::default() - .with_balances(vec![(Alice.into(), 1000)]) - .build() - .execute_with(|| { - // Construct our dummy proposal and associated data - let dummy_preimage: Vec = vec![1, 2, 3, 4]; - let dummy_bytes = dummy_preimage.clone(); - - // Construct input data to note preimage - let input = PCall::note_imminent_preimage { - encoded_proposal: dummy_bytes.into(), - } - .into(); - - // This call should not succeed because - assert_ok!(RuntimeCall::Evm(EvmCall::call { - source: Alice.into(), - target: Precompile1.into(), - input, - value: U256::zero(), // No value sent in EVM - gas_limit: u64::max_value(), - max_fee_per_gas: 0.into(), - max_priority_fee_per_gas: Some(U256::zero()), - nonce: None, // Use the next nonce - access_list: Vec::new(), - }) - .dispatch(RuntimeOrigin::root())); - - // Assert that the events are as expected - assert_eq!( - events(), - vec![EvmEvent::ExecutedFailed { - address: Precompile1.into() - } - .into()] - ); - }) -} - -#[test] -fn test_solidity_interface_has_all_function_selectors_documented_and_implemented() { - check_precompile_implements_solidity_interfaces( - &["DemocracyInterface.sol"], - PCall::supports_selector, - ) -} - -#[test] -fn test_deprecated_solidity_selectors_are_supported() { - for deprecated_function in [ - "public_prop_count()", - "deposit_of(uint256)", - "lowest_unbaked()", - "standard_vote(uint256,bool,uint256,uint256)", - "remove_vote(uint256)", - "un_delegate()", - "note_preimage(bytes)", - "note_imminent_preimage(bytes)", - ] { - let selector = compute_selector(deprecated_function); - if !PCall::supports_selector(selector) { - panic!( - "deprecated selector {selector:x} for '{deprecated_function}' should be supported but\ - is not", - ) - } - } -} diff --git a/runtime/common/Cargo.toml b/runtime/common/Cargo.toml index 21fd6ddafa..c87a4f7d7e 100644 --- a/runtime/common/Cargo.toml +++ b/runtime/common/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "moonbeam-runtime-common" -authors = { workspace = true } +authors = {workspace = true} description = "Common code shared between runtimes" edition = "2021" homepage = "https://moonbeam.network" license = "GPL-3.0-only" +name = "moonbeam-runtime-common" version = "0.8.0-dev" [dependencies] @@ -13,133 +13,131 @@ impl-trait-for-tuples = "0.2.1" log = "0.4" # Moonbeam -moonbeam-xcm-benchmarks = { workspace = true } -pallet-asset-manager = { workspace = true } -pallet-author-mapping = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-ethereum-xcm = { workspace = true } -pallet-migrations = { workspace = true } -pallet-parachain-staking = { workspace = true } -pallet-randomness = { workspace = true } -pallet-xcm-transactor = { workspace = true } -precompile-utils = { workspace = true } -xcm-primitives = { workspace = true } -pallet-moonbeam-lazy-migrations = { workspace = true } -pallet-relay-storage-roots = { workspace = true } -pallet-precompile-benchmarks = { workspace = true } +moonbeam-xcm-benchmarks = {workspace = true} +pallet-asset-manager = {workspace = true} +pallet-author-mapping = {workspace = true} +pallet-conviction-voting = {workspace = true} +pallet-ethereum-xcm = {workspace = true} +pallet-migrations = {workspace = true} +pallet-moonbeam-lazy-migrations = {workspace = true} +pallet-parachain-staking = {workspace = true} +pallet-precompile-benchmarks = {workspace = true} +pallet-randomness = {workspace = true} +pallet-relay-storage-roots = {workspace = true} +pallet-xcm-transactor = {workspace = true} +precompile-utils = {workspace = true} +xcm-primitives = {workspace = true} # Substrate -cumulus-pallet-xcmp-queue = { workspace = true } -frame-benchmarking = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-collective = { workspace = true } -pallet-crowdloan-rewards = { workspace = true } -pallet-democracy = { workspace = true } -pallet-identity = { workspace = true } -pallet-moonbeam-orbiters = { workspace = true } -pallet-multisig = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-referenda = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-whitelist = { workspace = true } -pallet-xcm = { workspace = true } -sp-api = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - +cumulus-pallet-xcmp-queue = {workspace = true} +frame-benchmarking = {workspace = true} +frame-support = {workspace = true} +frame-system = {workspace = true} +pallet-assets = {workspace = true} +pallet-balances = {workspace = true} +pallet-collective = {workspace = true} +pallet-crowdloan-rewards = {workspace = true} +pallet-identity = {workspace = true} +pallet-moonbeam-orbiters = {workspace = true} +pallet-multisig = {workspace = true} +pallet-preimage = {workspace = true} +pallet-proxy = {workspace = true} +pallet-referenda = {workspace = true} +pallet-scheduler = {workspace = true} +pallet-sudo = {workspace = true} +pallet-timestamp = {workspace = true} +pallet-treasury = {workspace = true} +pallet-utility = {workspace = true} +pallet-whitelist = {workspace = true} +pallet-xcm = {workspace = true} +sp-api = {workspace = true} +sp-consensus-slots = {workspace = true} +sp-core = {workspace = true} +sp-io = {workspace = true} +sp-runtime = {workspace = true} +sp-std = {workspace = true} # Frontier -fp-ethereum = { workspace = true } -fp-evm = { workspace = true } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm-chain-id = { workspace = true } +fp-ethereum = {workspace = true} +fp-evm = {workspace = true} +pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm-chain-id = {workspace = true} # Moonkit -nimbus-primitives = { workspace = true } -pallet-async-backing = { workspace = true } -pallet-author-inherent = { workspace = true } -pallet-author-slot-filter = { workspace = true } +nimbus-primitives = {workspace = true} +pallet-async-backing = {workspace = true} +pallet-author-inherent = {workspace = true} +pallet-author-slot-filter = {workspace = true} # Polkadot -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +xcm = {workspace = true} +xcm-builder = {workspace = true} +xcm-executor = {workspace = true} # Parity -parity-scale-codec = { workspace = true } +parity-scale-codec = {workspace = true} -account = { workspace = true } +account = {workspace = true} [features] -std = [ - "fp-ethereum/std", - "fp-evm/std", - "frame-support/std", - "pallet-asset-manager/std", - "pallet-async-backing/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-ethereum-xcm/std", - "pallet-evm/std", - "pallet-migrations/std", - "pallet-parachain-staking/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-scheduler/std", - "pallet-xcm-transactor/std", - "pallet-moonbeam-lazy-migrations/std", - "parity-scale-codec/std", - "precompile-utils/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-runtime/std", - "sp-std/std", - "xcm-executor/std", - "xcm/std", - "account/std", -] runtime-benchmarks = [ - "cumulus-pallet-xcmp-queue/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", +] +std = [ + "fp-ethereum/std", + "fp-evm/std", + "frame-support/std", + "pallet-asset-manager/std", + "pallet-async-backing/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-ethereum-xcm/std", + "pallet-evm/std", + "pallet-migrations/std", + "pallet-parachain-staking/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-scheduler/std", + "pallet-xcm-transactor/std", + "pallet-moonbeam-lazy-migrations/std", + "parity-scale-codec/std", + "precompile-utils/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-runtime/std", + "sp-std/std", + "xcm-executor/std", + "xcm/std", + "account/std", ] try-runtime = ["frame-support/try-runtime", "pallet-migrations/try-runtime"] diff --git a/runtime/common/src/migrations.rs b/runtime/common/src/migrations.rs index ce3ac01f33..40b0db2afe 100644 --- a/runtime/common/src/migrations.rs +++ b/runtime/common/src/migrations.rs @@ -26,6 +26,7 @@ use frame_support::migration::get_storage_value; use frame_support::{ parameter_types, sp_runtime::traits::{Block as BlockT, Header as HeaderT}, + storage::unhashed::contains_prefixed_key, traits::OnRuntimeUpgrade, weights::Weight, }; @@ -179,42 +180,41 @@ where } parameter_types! { - pub const CouncilPalletName: &'static str = "Council"; - pub const TechnicalCommitteePalletName: &'static str = "TechnicalCommittee"; + pub const DemocracyPalletName: &'static str = "Democracy"; } -pub struct PalletCollectiveDropGovV1Collectives(pub PhantomData); -impl Migration for PalletCollectiveDropGovV1Collectives +pub struct RemovePalletDemocracy(pub PhantomData); +impl Migration for RemovePalletDemocracy where Runtime: frame_system::Config, { fn friendly_name(&self) -> &str { - "MM_RemoveGovV1Collectives" + "MM_RemoveDemocracyPallet" } fn migrate(&self, _available_weight: Weight) -> Weight { - log::info!("Removing Council and Tech from pallet_collective"); - - let mut weight = Weight::zero(); - - let w = frame_support::migrations::RemovePallet::< - CouncilPalletName, - ::DbWeight, - >::on_runtime_upgrade(); - weight = weight.saturating_add(w); - - let w = frame_support::migrations::RemovePallet::< - TechnicalCommitteePalletName, + log::info!("Removing pallet democracy"); + + // Democracy: f2794c22e353e9a839f12faab03a911b + // VotingOf: e470c6afbbbc027eb288ade7595953c2 + let prefix = + hex_literal::hex!("f2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2"); + if contains_prefixed_key(&prefix) { + // PoV failsafe: do not execute the migration if there are VotingOf keys + // that have not been cleaned up + log::info!("Found keys for Democracy.VotingOf pre-removal - skipping migration",); + return Weight::zero(); + }; + frame_support::migrations::RemovePallet::< + DemocracyPalletName, ::DbWeight, - >::on_runtime_upgrade(); - weight = weight.saturating_add(w); - weight + >::on_runtime_upgrade() } #[cfg(feature = "try-runtime")] fn pre_upgrade(&self) -> Result, sp_runtime::DispatchError> { frame_support::migrations::RemovePallet::< - TechnicalCommitteePalletName, + DemocracyPalletName, ::DbWeight, >::pre_upgrade(); @@ -224,7 +224,7 @@ where #[cfg(feature = "try-runtime")] fn post_upgrade(&self, _state: Vec) -> Result<(), sp_runtime::DispatchError> { frame_support::migrations::RemovePallet::< - TechnicalCommitteePalletName, + DemocracyPalletName, ::DbWeight, >::post_upgrade(_state); Ok(()) @@ -239,7 +239,6 @@ where Runtime: pallet_parachain_staking::Config, Runtime: pallet_scheduler::Config, Runtime: AuthorSlotFilterConfig, - Runtime: pallet_democracy::Config, Runtime: pallet_preimage::Config, Runtime: pallet_asset_manager::Config, ::ForeignAssetType: From, @@ -320,8 +319,9 @@ where // FixIncorrectPalletVersions::(Default::default()); // let pallet_referenda_migrate_v0_to_v1 = // PalletReferendaMigrateV0ToV1::(Default::default()); - let pallet_collective_drop_gov_v1_collectives = - PalletCollectiveDropGovV1Collectives::(Default::default()); + // let pallet_collective_drop_gov_v1_collectives = + // PalletCollectiveDropGovV1Collectives::(Default::default()); + let remove_pallet_democracy = RemovePalletDemocracy::(Default::default()); vec![ // completed in runtime 800 @@ -377,7 +377,9 @@ where // Box::new(fix_pallet_versions), // Box::new(pallet_referenda_migrate_v0_to_v1), // completed in runtime 2800 - Box::new(pallet_collective_drop_gov_v1_collectives), + // Box::new(pallet_collective_drop_gov_v1_collectives), + // completed in runtime 2900 + Box::new(remove_pallet_democracy), ] } } diff --git a/runtime/common/src/weights/mod.rs b/runtime/common/src/weights/mod.rs index e8adde13ca..33400899f0 100644 --- a/runtime/common/src/weights/mod.rs +++ b/runtime/common/src/weights/mod.rs @@ -27,7 +27,6 @@ pub mod pallet_balances; pub mod pallet_collective; pub mod pallet_conviction_voting; pub mod pallet_crowdloan_rewards; -pub mod pallet_democracy; pub mod pallet_evm; pub mod pallet_identity; pub mod pallet_moonbeam_lazy_migrations; diff --git a/runtime/common/src/weights/pallet_democracy.rs b/runtime/common/src/weights/pallet_democracy.rs deleted file mode 100644 index 40962dcd94..0000000000 --- a/runtime/common/src/weights/pallet_democracy.rs +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . -//! Autogenerated weights for `pallet_democracy` -//! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2024-02-22, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `ip-10-0-0-176`, CPU: `Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz` -//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("moonbase-dev")`, DB CACHE: 1024 - -// Executed Command: -// ./target/production/moonbeam -// benchmark -// pallet -// --chain=moonbase-dev -// --steps=50 -// --repeat=20 -// --pallet=pallet_democracy -// --extrinsic=* -// --wasm-execution=compiled -// --header=./file_header.txt -// --output=./runtime/common/src/weights/ - -#![cfg_attr(rustfmt, rustfmt_skip)] -#![allow(unused_parens)] -#![allow(unused_imports)] -#![allow(missing_docs)] - -use frame_support::{traits::Get, weights::Weight}; -use core::marker::PhantomData; - -/// Weight functions for `pallet_democracy`. -pub struct WeightInfo(PhantomData); -impl pallet_democracy::WeightInfo for WeightInfo { - /// Storage: `Democracy::PublicPropCount` (r:1 w:1) - /// Proof: `Democracy::PublicPropCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::PublicProps` (r:1 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:1 w:0) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(2038), added: 4513, mode: `MaxEncodedLen`) - /// Storage: `Democracy::DepositOf` (r:0 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(2030), added: 4505, mode: `MaxEncodedLen`) - fn propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `3876` - // Estimated: `16987` - // Minimum execution time: 43_807_000 picoseconds. - Weight::from_parts(44_928_000, 0) - .saturating_add(Weight::from_parts(0, 16987)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::DepositOf` (r:1 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(2030), added: 4505, mode: `MaxEncodedLen`) - fn second() -> Weight { - // Proof Size summary in bytes: - // Measured: `2625` - // Estimated: `5495` - // Minimum execution time: 39_242_000 picoseconds. - Weight::from_parts(40_044_000, 0) - .saturating_add(Weight::from_parts(0, 5495)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) - fn vote_new() -> Weight { - // Proof Size summary in bytes: - // Measured: `3577` - // Estimated: `7248` - // Minimum execution time: 61_029_000 picoseconds. - Weight::from_parts(62_242_000, 0) - .saturating_add(Weight::from_parts(0, 7248)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) - fn vote_existing() -> Weight { - // Proof Size summary in bytes: - // Measured: `3599` - // Estimated: `7248` - // Minimum execution time: 63_434_000 picoseconds. - Weight::from_parts(65_011_000, 0) - .saturating_add(Weight::from_parts(0, 7248)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Cancellations` (r:1 w:1) - /// Proof: `Democracy::Cancellations` (`max_values`: None, `max_size`: Some(33), added: 2508, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn emergency_cancel() -> Weight { - // Proof Size summary in bytes: - // Measured: `299` - // Estimated: `3666` - // Minimum execution time: 23_007_000 picoseconds. - Weight::from_parts(23_677_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - /// Storage: `Democracy::DepositOf` (r:1 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(2030), added: 4505, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:3 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:0 w:1) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(2038), added: 4513, mode: `MaxEncodedLen`) - fn blacklist() -> Weight { - // Proof Size summary in bytes: - // Measured: `4692` - // Estimated: `16987` - // Minimum execution time: 89_964_000 picoseconds. - Weight::from_parts(91_706_000, 0) - .saturating_add(Weight::from_parts(0, 16987)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(7)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:1 w:0) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(2038), added: 4513, mode: `MaxEncodedLen`) - fn external_propose() -> Weight { - // Proof Size summary in bytes: - // Measured: `2161` - // Estimated: `5503` - // Minimum execution time: 11_478_000 picoseconds. - Weight::from_parts(12_031_000, 0) - .saturating_add(Weight::from_parts(0, 5503)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:0 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - fn external_propose_majority() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_678_000 picoseconds. - Weight::from_parts(2_885_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:0 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - fn external_propose_default() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_615_000 picoseconds. - Weight::from_parts(2_818_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumCount` (r:1 w:1) - /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:2) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - fn fast_track() -> Weight { - // Proof Size summary in bytes: - // Measured: `219` - // Estimated: `3518` - // Minimum execution time: 22_690_000 picoseconds. - Weight::from_parts(23_262_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:1) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::Blacklist` (r:1 w:1) - /// Proof: `Democracy::Blacklist` (`max_values`: None, `max_size`: Some(2038), added: 4513, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn veto_external() -> Weight { - // Proof Size summary in bytes: - // Measured: `2264` - // Estimated: `5503` - // Minimum execution time: 25_110_000 picoseconds. - Weight::from_parts(26_013_000, 0) - .saturating_add(Weight::from_parts(0, 5503)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - /// Storage: `Democracy::DepositOf` (r:1 w:1) - /// Proof: `Democracy::DepositOf` (`max_values`: None, `max_size`: Some(2030), added: 4505, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn cancel_proposal() -> Weight { - // Proof Size summary in bytes: - // Measured: `4591` - // Estimated: `16987` - // Minimum execution time: 71_095_000 picoseconds. - Weight::from_parts(72_524_000, 0) - .saturating_add(Weight::from_parts(0, 16987)) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(4)) - } - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:0 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - fn cancel_referendum() -> Weight { - // Proof Size summary in bytes: - // Measured: `204` - // Estimated: `3518` - // Minimum execution time: 16_505_000 picoseconds. - Weight::from_parts(17_111_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) - /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumCount` (r:1 w:0) - /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `177 + r * (86 ±0)` - // Estimated: `1489 + r * (2676 ±0)` - // Minimum execution time: 5_162_000 picoseconds. - Weight::from_parts(7_627_988, 0) - .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 7_367 - .saturating_add(Weight::from_parts(3_326_543, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::LowestUnbaked` (r:1 w:1) - /// Proof: `Democracy::LowestUnbaked` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumCount` (r:1 w:0) - /// Proof: `Democracy::ReferendumCount` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`) - /// Storage: `Democracy::LastTabledWasExternal` (r:1 w:0) - /// Proof: `Democracy::LastTabledWasExternal` (`max_values`: Some(1), `max_size`: Some(1), added: 496, mode: `MaxEncodedLen`) - /// Storage: `Democracy::NextExternal` (r:1 w:0) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::PublicProps` (r:1 w:0) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:0) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `177 + r * (86 ±0)` - // Estimated: `16987 + r * (2676 ±0)` - // Minimum execution time: 7_546_000 picoseconds. - Weight::from_parts(9_724_046, 0) - .saturating_add(Weight::from_parts(0, 16987)) - // Standard Error: 8_125 - .saturating_add(Weight::from_parts(3_341_703, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::VotingOf` (r:3 w:3) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn delegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `898 + r * (108 ±0)` - // Estimated: `19764 + r * (2676 ±0)` - // Minimum execution time: 43_501_000 picoseconds. - Weight::from_parts(47_916_673, 0) - .saturating_add(Weight::from_parts(0, 19764)) - // Standard Error: 8_373 - .saturating_add(Weight::from_parts(4_199_542, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(5)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(4)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::VotingOf` (r:2 w:2) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// Storage: `Democracy::ReferendumInfoOf` (r:99 w:99) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn undelegate(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `388 + r * (108 ±0)` - // Estimated: `13506 + r * (2676 ±0)` - // Minimum execution time: 17_687_000 picoseconds. - Weight::from_parts(20_633_241, 0) - .saturating_add(Weight::from_parts(0, 13506)) - // Standard Error: 9_026 - .saturating_add(Weight::from_parts(4_144_999, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) - .saturating_add(T::DbWeight::get().writes(2)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(r.into()))) - .saturating_add(Weight::from_parts(0, 2676).saturating_mul(r.into())) - } - /// Storage: `Democracy::PublicProps` (r:0 w:1) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - fn clear_public_proposals() -> Weight { - // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 2_828_000 picoseconds. - Weight::from_parts(2_965_000, 0) - .saturating_add(Weight::from_parts(0, 0)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn unlock_remove(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `421` - // Estimated: `7248` - // Minimum execution time: 25_291_000 picoseconds. - Weight::from_parts(37_992_429, 0) - .saturating_add(Weight::from_parts(0, 7248)) - // Standard Error: 3_166 - .saturating_add(Weight::from_parts(92_170, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// Storage: `Balances::Locks` (r:1 w:1) - /// Proof: `Balances::Locks` (`max_values`: None, `max_size`: Some(1287), added: 3762, mode: `MaxEncodedLen`) - /// Storage: `Balances::Freezes` (r:1 w:0) - /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(37), added: 2512, mode: `MaxEncodedLen`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(116), added: 2591, mode: `MaxEncodedLen`) - /// The range of component `r` is `[0, 99]`. - fn unlock_set(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `422 + r * (22 ±0)` - // Estimated: `7248` - // Minimum execution time: 32_953_000 picoseconds. - Weight::from_parts(36_048_676, 0) - .saturating_add(Weight::from_parts(0, 7248)) - // Standard Error: 1_719 - .saturating_add(Weight::from_parts(123_818, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(4)) - .saturating_add(T::DbWeight::get().writes(3)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 100]`. - fn remove_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `649 + r * (26 ±0)` - // Estimated: `7248` - // Minimum execution time: 15_072_000 picoseconds. - Weight::from_parts(19_384_023, 0) - .saturating_add(Weight::from_parts(0, 7248)) - // Standard Error: 2_744 - .saturating_add(Weight::from_parts(148_439, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:1) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::VotingOf` (r:1 w:1) - /// Proof: `Democracy::VotingOf` (`max_values`: None, `max_size`: Some(3783), added: 6258, mode: `MaxEncodedLen`) - /// The range of component `r` is `[1, 100]`. - fn remove_other_vote(r: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `649 + r * (26 ±0)` - // Estimated: `7248` - // Minimum execution time: 15_175_000 picoseconds. - Weight::from_parts(19_375_345, 0) - .saturating_add(Weight::from_parts(0, 7248)) - // Standard Error: 2_607 - .saturating_add(Weight::from_parts(148_710, 0).saturating_mul(r.into())) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(2)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:0) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:0) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) - /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) - /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:0 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn set_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `289` - // Estimated: `3544` - // Minimum execution time: 17_427_000 picoseconds. - Weight::from_parts(18_136_000, 0) - .saturating_add(Weight::from_parts(0, 3544)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::NextExternal` (r:1 w:0) - /// Proof: `Democracy::NextExternal` (`max_values`: Some(1), `max_size`: Some(132), added: 627, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn clear_external_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `219` - // Estimated: `3518` - // Minimum execution time: 14_534_000 picoseconds. - Weight::from_parts(14_891_000, 0) - .saturating_add(Weight::from_parts(0, 3518)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:0) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - /// Storage: `Preimage::StatusFor` (r:1 w:0) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) - /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) - /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:0 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn set_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `3621` - // Estimated: `16987` - // Minimum execution time: 41_771_000 picoseconds. - Weight::from_parts(42_742_000, 0) - .saturating_add(Weight::from_parts(0, 16987)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::PublicProps` (r:1 w:0) - /// Proof: `Democracy::PublicProps` (`max_values`: Some(1), `max_size`: Some(15502), added: 15997, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn clear_proposal_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `3555` - // Estimated: `16987` - // Minimum execution time: 36_963_000 picoseconds. - Weight::from_parts(37_705_000, 0) - .saturating_add(Weight::from_parts(0, 16987)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Preimage::StatusFor` (r:1 w:0) - /// Proof: `Preimage::StatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) - /// Storage: `Preimage::RequestStatusFor` (r:1 w:0) - /// Proof: `Preimage::RequestStatusFor` (`max_values`: None, `max_size`: Some(79), added: 2554, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:0 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn set_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `144` - // Estimated: `3544` - // Minimum execution time: 14_553_000 picoseconds. - Weight::from_parts(14_921_000, 0) - .saturating_add(Weight::from_parts(0, 3544)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } - /// Storage: `Democracy::ReferendumInfoOf` (r:1 w:0) - /// Proof: `Democracy::ReferendumInfoOf` (`max_values`: None, `max_size`: Some(201), added: 2676, mode: `MaxEncodedLen`) - /// Storage: `Democracy::MetadataOf` (r:1 w:1) - /// Proof: `Democracy::MetadataOf` (`max_values`: None, `max_size`: Some(53), added: 2528, mode: `MaxEncodedLen`) - fn clear_referendum_metadata() -> Weight { - // Proof Size summary in bytes: - // Measured: `235` - // Estimated: `3666` - // Minimum execution time: 16_867_000 picoseconds. - Weight::from_parts(17_203_000, 0) - .saturating_add(Weight::from_parts(0, 3666)) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) - } -} diff --git a/runtime/moonbase/Cargo.toml b/runtime/moonbase/Cargo.toml index 8d515d3369..4b0f51527b 100644 --- a/runtime/moonbase/Cargo.toml +++ b/runtime/moonbase/Cargo.toml @@ -1,305 +1,301 @@ [package] -name = "moonbase-runtime" -authors = { workspace = true } +authors = {workspace = true} build = "build.rs" description = "Moonbase Runtime" edition = "2021" homepage = "https://moonbeam.network" license = "GPL-3.0-only" +name = "moonbase-runtime" version = "0.8.4" [dependencies] -hex-literal = { workspace = true, optional = true } -log = { workspace = true } -num_enum = { workspace = true } -rlp = { workspace = true, optional = true } -serde = { workspace = true, features = ["derive"] } -sha3 = { workspace = true, optional = true } -smallvec = { workspace = true } -strum = { workspace = true } -strum_macros = { workspace = true } +hex-literal = {workspace = true, optional = true} +log = {workspace = true} +num_enum = {workspace = true} +rlp = {workspace = true, optional = true} +serde = {workspace = true, features = ["derive"]} +sha3 = {workspace = true, optional = true} +smallvec = {workspace = true} +strum = {workspace = true} +strum_macros = {workspace = true} # Moonbeam -account = { workspace = true } -moonbeam-core-primitives = { workspace = true } -moonbeam-relay-encoder = { workspace = true } -moonbeam-runtime-common = { workspace = true } -precompile-utils = { workspace = true } -session-keys-primitives = { workspace = true } -xcm-primitives = { workspace = true } +account = {workspace = true} +moonbeam-core-primitives = {workspace = true} +moonbeam-relay-encoder = {workspace = true} +moonbeam-runtime-common = {workspace = true} +precompile-utils = {workspace = true} +session-keys-primitives = {workspace = true} +xcm-primitives = {workspace = true} # Moonbeam pallets -moonbeam-xcm-benchmarks = { workspace = true } -pallet-asset-manager = { workspace = true } -pallet-author-mapping = { workspace = true } -pallet-crowdloan-rewards = { workspace = true } -pallet-erc20-xcm-bridge = { workspace = true } -pallet-evm-chain-id = { workspace = true } -pallet-ethereum-xcm = { workspace = true } -pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } -pallet-migrations = { workspace = true } -pallet-moonbeam-lazy-migrations = { workspace = true } -pallet-moonbeam-orbiters = { workspace = true } -pallet-parachain-staking = { workspace = true } -pallet-proxy-genesis-companion = { workspace = true } -pallet-randomness = { workspace = true } -pallet-xcm-transactor = { workspace = true } -pallet-precompile-benchmarks = { workspace = true } +moonbeam-xcm-benchmarks = {workspace = true} +pallet-asset-manager = {workspace = true} +pallet-author-mapping = {workspace = true} +pallet-crowdloan-rewards = {workspace = true} +pallet-erc20-xcm-bridge = {workspace = true} +pallet-ethereum-xcm = {workspace = true} +pallet-evm-chain-id = {workspace = true} +pallet-maintenance-mode = {workspace = true, features = ["xcm-support"]} +pallet-migrations = {workspace = true} +pallet-moonbeam-lazy-migrations = {workspace = true} +pallet-moonbeam-orbiters = {workspace = true} +pallet-parachain-staking = {workspace = true} +pallet-precompile-benchmarks = {workspace = true} +pallet-proxy-genesis-companion = {workspace = true} +pallet-randomness = {workspace = true} +pallet-xcm-transactor = {workspace = true} # Moonbeam precompiles -pallet-evm-precompile-author-mapping = { workspace = true } -pallet-evm-precompile-balances-erc20 = { workspace = true } -pallet-evm-precompile-batch = { workspace = true } -pallet-evm-precompile-call-permit = { workspace = true } -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-identity = { workspace = true } -pallet-evm-precompile-parachain-staking = { workspace = true } -pallet-evm-precompile-preimage = { workspace = true } -pallet-evm-precompile-proxy = { workspace = true } -pallet-evm-precompile-randomness = { workspace = true } -pallet-evm-precompile-referenda = { workspace = true } -pallet-evm-precompile-registry = { workspace = true } -pallet-evm-precompile-relay-encoder = { workspace = true } -pallet-evm-precompile-relay-verifier = { workspace = true } -pallet-evm-precompile-xcm-transactor = { workspace = true } -pallet-evm-precompile-xcm-utils = { workspace = true } -pallet-evm-precompile-xtokens = { workspace = true } -pallet-evm-precompileset-assets-erc20 = { workspace = true } +pallet-evm-precompile-author-mapping = {workspace = true} +pallet-evm-precompile-balances-erc20 = {workspace = true} +pallet-evm-precompile-batch = {workspace = true} +pallet-evm-precompile-call-permit = {workspace = true} +pallet-evm-precompile-collective = {workspace = true} +pallet-evm-precompile-conviction-voting = {workspace = true} +pallet-evm-precompile-crowdloan-rewards = {workspace = true} +pallet-evm-precompile-gmp = {workspace = true} +pallet-evm-precompile-identity = {workspace = true} +pallet-evm-precompile-parachain-staking = {workspace = true} +pallet-evm-precompile-preimage = {workspace = true} +pallet-evm-precompile-proxy = {workspace = true} +pallet-evm-precompile-randomness = {workspace = true} +pallet-evm-precompile-referenda = {workspace = true} +pallet-evm-precompile-registry = {workspace = true} +pallet-evm-precompile-relay-encoder = {workspace = true} +pallet-evm-precompile-relay-verifier = {workspace = true} +pallet-evm-precompile-xcm-transactor = {workspace = true} +pallet-evm-precompile-xcm-utils = {workspace = true} +pallet-evm-precompile-xtokens = {workspace = true} +pallet-evm-precompileset-assets-erc20 = {workspace = true} # Moonbeam tracing -evm-tracing-events = { workspace = true, optional = true } -moonbeam-evm-tracer = { workspace = true, optional = true } -moonbeam-rpc-primitives-debug = { workspace = true } -moonbeam-rpc-primitives-txpool = { workspace = true } +evm-tracing-events = {workspace = true, optional = true} +moonbeam-evm-tracer = {workspace = true, optional = true} +moonbeam-rpc-primitives-debug = {workspace = true} +moonbeam-rpc-primitives-txpool = {workspace = true} # Substrate -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } -pallet-collective = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-democracy = { workspace = true } -pallet-identity = { workspace = true } -pallet-multisig = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-referenda = { workspace = true } -pallet-root-testing = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-society = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-whitelist = { workspace = true } -parity-scale-codec = { workspace = true, features = [ - "derive", - "max-encoded-len", - "chain-error", -] } -scale-info = { workspace = true, features = ["derive"] } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-core = { workspace = true } -sp-debug-derive = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true, features = ["improved_panic_error_reporting"] } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } -sp-weights = { workspace = true } +frame-executive = {workspace = true} +frame-support = {workspace = true} +frame-system = {workspace = true} +frame-system-rpc-runtime-api = {workspace = true} +pallet-assets = {workspace = true} +pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} +pallet-collective = {workspace = true} +pallet-conviction-voting = {workspace = true} +pallet-identity = {workspace = true} +pallet-multisig = {workspace = true} +pallet-preimage = {workspace = true} +pallet-proxy = {workspace = true} +pallet-referenda = {workspace = true} +pallet-root-testing = {workspace = true} +pallet-scheduler = {workspace = true} +pallet-society = {workspace = true} +pallet-sudo = {workspace = true} +pallet-timestamp = {workspace = true} +pallet-transaction-payment = {workspace = true} +pallet-transaction-payment-rpc-runtime-api = {workspace = true} +pallet-treasury = {workspace = true} +pallet-utility = {workspace = true} +pallet-whitelist = {workspace = true} +parity-scale-codec = {workspace = true, features = [ + "derive", + "max-encoded-len", + "chain-error", +]} +scale-info = {workspace = true, features = ["derive"]} +sp-api = {workspace = true} +sp-block-builder = {workspace = true} +sp-consensus-slots = {workspace = true} +sp-core = {workspace = true} +sp-debug-derive = {workspace = true} +sp-inherents = {workspace = true} +sp-io = {workspace = true, features = ["improved_panic_error_reporting"]} +sp-offchain = {workspace = true} +sp-runtime = {workspace = true} +sp-session = {workspace = true} +sp-std = {workspace = true} +sp-transaction-pool = {workspace = true} +sp-version = {workspace = true} +sp-weights = {workspace = true} # Frontier -fp-evm = { workspace = true } -fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } -pallet-ethereum = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm-precompile-blake2 = { workspace = true } -pallet-evm-precompile-bn128 = { workspace = true } -pallet-evm-precompile-dispatch = { workspace = true } -pallet-evm-precompile-modexp = { workspace = true } -pallet-evm-precompile-sha3fips = { workspace = true } -pallet-evm-precompile-simple = { workspace = true } +fp-evm = {workspace = true} +fp-rpc = {workspace = true} +fp-self-contained = {workspace = true, features = ["serde"]} +pallet-ethereum = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm-precompile-blake2 = {workspace = true} +pallet-evm-precompile-bn128 = {workspace = true} +pallet-evm-precompile-dispatch = {workspace = true} +pallet-evm-precompile-modexp = {workspace = true} +pallet-evm-precompile-sha3fips = {workspace = true} +pallet-evm-precompile-simple = {workspace = true} # Polkadot / XCM -orml-traits = { workspace = true } -orml-xcm-support = { workspace = true } -orml-xtokens = { workspace = true } -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { workspace = true, optional = true } -polkadot-core-primitives = { workspace = true } -polkadot-parachain = { workspace = true } -polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +orml-traits = {workspace = true} +orml-xcm-support = {workspace = true} +orml-xtokens = {workspace = true} +pallet-xcm = {workspace = true} +pallet-xcm-benchmarks = {workspace = true, optional = true} +polkadot-core-primitives = {workspace = true} +polkadot-parachain = {workspace = true} +polkadot-runtime-common = {workspace = true} +xcm = {workspace = true} +xcm-builder = {workspace = true} +xcm-executor = {workspace = true} # Cumulus -cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-timestamp = { workspace = true } -cumulus-primitives-utility = { workspace = true } -parachain-info = { workspace = true } +cumulus-pallet-dmp-queue = {workspace = true} +cumulus-pallet-parachain-system = {workspace = true} +cumulus-pallet-xcm = {workspace = true} +cumulus-pallet-xcmp-queue = {workspace = true} +cumulus-primitives-core = {workspace = true} +cumulus-primitives-timestamp = {workspace = true} +cumulus-primitives-utility = {workspace = true} +parachain-info = {workspace = true} # Moonkit -async-backing-primitives = { workspace = true } -moonkit-xcm-primitives = { workspace = true } -nimbus-primitives = { workspace = true } -pallet-async-backing = { workspace = true } -pallet-author-inherent = { workspace = true } -pallet-author-slot-filter = { workspace = true } -pallet-relay-storage-roots = { workspace = true } +async-backing-primitives = {workspace = true} +moonkit-xcm-primitives = {workspace = true} +nimbus-primitives = {workspace = true} +pallet-async-backing = {workspace = true} +pallet-author-inherent = {workspace = true} +pallet-author-slot-filter = {workspace = true} +pallet-relay-storage-roots = {workspace = true} # Benchmarking -frame-benchmarking = { workspace = true, optional = true } -frame-system-benchmarking = { workspace = true, optional = true } -frame-try-runtime = { workspace = true, optional = true } +frame-benchmarking = {workspace = true, optional = true} +frame-system-benchmarking = {workspace = true, optional = true} +frame-try-runtime = {workspace = true, optional = true} [dev-dependencies] -ethereum = { workspace = true } -hex = { workspace = true, features = ["std"] } -sha3 = { workspace = true, features = ["std"] } +ethereum = {workspace = true} +hex = {workspace = true, features = ["std"]} +sha3 = {workspace = true, features = ["std"]} -cumulus-primitives-parachain-inherent = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true } +cumulus-primitives-parachain-inherent = {workspace = true} +cumulus-test-relay-sproof-builder = {workspace = true} -frame-metadata = { workspace = true } -pallet-message-queue = { workspace = true } -polkadot-runtime-parachains = { workspace = true } -sp-timestamp = { workspace = true } -xcm-simulator = { workspace = true } +frame-metadata = {workspace = true} +pallet-message-queue = {workspace = true} +polkadot-runtime-parachains = {workspace = true} +sp-timestamp = {workspace = true} +xcm-simulator = {workspace = true} -precompile-utils = { workspace = true, features = ["std", "testing"] } +precompile-utils = {workspace = true, features = ["std", "testing"]} [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = {workspace = true} [features] default = ["std"] std = [ - "account/std", - "async-backing-primitives/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "evm-tracing-events/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "moonbeam-core-primitives/std", - "moonbeam-evm-tracer/std", - "moonbeam-relay-encoder/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "moonbeam-runtime-common/std", - "moonkit-xcm-primitives/std", - "nimbus-primitives/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-async-backing/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-author-slot-filter/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-conviction-voting/std", - "pallet-crowdloan-rewards/std", - "pallet-democracy/std", - "pallet-erc20-xcm-bridge/std", - "pallet-evm-chain-id/std", - "pallet-ethereum-xcm/std", - "pallet-ethereum/std", - "pallet-evm-precompile-author-mapping/std", - "pallet-evm-precompile-balances-erc20/std", - "pallet-evm-precompile-batch/std", - "pallet-evm-precompile-call-permit/std", - "pallet-evm-precompile-collective/std", - "pallet-evm-precompile-conviction-voting/std", - "pallet-evm-precompile-democracy/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-preimage/std", - "pallet-evm-precompile-randomness/std", - "pallet-evm-precompile-referenda/std", - "pallet-evm-precompile-registry/std", - "pallet-evm-precompile-xcm-transactor/std", - "pallet-evm-precompile-xcm-utils/std", - "pallet-evm-precompile-xtokens/std", - "pallet-evm-precompileset-assets-erc20/std", - "pallet-evm/std", - "pallet-identity/std", - "pallet-maintenance-mode/std", - "pallet-migrations/std", - "pallet-moonbeam-lazy-migrations/std", - "pallet-moonbeam-orbiters/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-precompile-benchmarks/std", - "pallet-preimage/std", - "pallet-proxy-genesis-companion/std", - "pallet-proxy/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-relay-storage-roots/std", - "pallet-root-testing/std", - "pallet-scheduler/std", - "pallet-society/std", - "pallet-sudo/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-whitelist/std", - "pallet-xcm-transactor/std", - "pallet-xcm/std", - "parachain-info/std", - "parity-scale-codec/std", - "precompile-utils/std", - "scale-info/std", - "session-keys-primitives/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "strum/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "account/std", + "async-backing-primitives/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "evm-tracing-events/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "moonbeam-core-primitives/std", + "moonbeam-evm-tracer/std", + "moonbeam-relay-encoder/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "moonbeam-runtime-common/std", + "moonkit-xcm-primitives/std", + "nimbus-primitives/std", + "orml-xtokens/std", + "pallet-asset-manager/std", + "pallet-assets/std", + "pallet-async-backing/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-author-slot-filter/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-crowdloan-rewards/std", + "pallet-erc20-xcm-bridge/std", + "pallet-evm-chain-id/std", + "pallet-ethereum-xcm/std", + "pallet-ethereum/std", + "pallet-evm-precompile-author-mapping/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-collective/std", + "pallet-evm-precompile-conviction-voting/std", + "pallet-evm-precompile-parachain-staking/std", + "pallet-evm-precompile-preimage/std", + "pallet-evm-precompile-randomness/std", + "pallet-evm-precompile-referenda/std", + "pallet-evm-precompile-registry/std", + "pallet-evm-precompile-xcm-transactor/std", + "pallet-evm-precompile-xcm-utils/std", + "pallet-evm-precompile-xtokens/std", + "pallet-evm-precompileset-assets-erc20/std", + "pallet-evm/std", + "pallet-identity/std", + "pallet-maintenance-mode/std", + "pallet-migrations/std", + "pallet-moonbeam-lazy-migrations/std", + "pallet-moonbeam-orbiters/std", + "pallet-multisig/std", + "pallet-parachain-staking/std", + "pallet-precompile-benchmarks/std", + "pallet-preimage/std", + "pallet-proxy-genesis-companion/std", + "pallet-proxy/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-relay-storage-roots/std", + "pallet-root-testing/std", + "pallet-scheduler/std", + "pallet-society/std", + "pallet-sudo/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-whitelist/std", + "pallet-xcm-transactor/std", + "pallet-xcm/std", + "parachain-info/std", + "parity-scale-codec/std", + "precompile-utils/std", + "scale-info/std", + "session-keys-primitives/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "strum/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", ] # Must be enabled for tracing runtimes only @@ -317,81 +313,79 @@ runtime-wasm = [] on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "moonbeam-relay-encoder/runtime-benchmarks", - "moonbeam-runtime-common/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-democracy/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-migrations/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-precompile-benchmarks/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-relay-storage-roots/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-society/runtime-benchmarks", - "pallet-sudo/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "session-keys-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "moonbeam-relay-encoder/runtime-benchmarks", + "moonbeam-runtime-common/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-precompile-benchmarks/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-relay-storage-roots/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-society/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "session-keys-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", ] try-runtime = [ - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "moonbeam-runtime-common/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-author-mapping/try-runtime", - "pallet-author-slot-filter/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-conviction-voting/try-runtime", - "pallet-democracy/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", - "pallet-moonbeam-lazy-migrations/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-referenda/try-runtime", - "pallet-relay-storage-roots/try-runtime", - "pallet-root-testing/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-society/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-xcm-transactor/try-runtime", + "fp-self-contained/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "moonbeam-runtime-common/try-runtime", + "pallet-asset-manager/try-runtime", + "pallet-author-mapping/try-runtime", + "pallet-author-slot-filter/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-migrations/try-runtime", + "pallet-moonbeam-lazy-migrations/try-runtime", + "pallet-parachain-staking/try-runtime", + "pallet-preimage/try-runtime", + "pallet-referenda/try-runtime", + "pallet-relay-storage-roots/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-society/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-xcm-transactor/try-runtime", ] moonbase-runtime-benchmarks = [] diff --git a/runtime/moonbase/src/governance/democracy.rs b/runtime/moonbase/src/governance/democracy.rs deleted file mode 100644 index d8e226d98d..0000000000 --- a/runtime/moonbase/src/governance/democracy.rs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . - -//! Democracy config for Gov1 - -use super::councils::*; -use crate::*; - -// The purpose of this offset is to ensure that a democratic proposal will not apply in the same -// block as a round change. -const ENACTMENT_OFFSET: u32 = 300; - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = ConstU32<{ 1 * DAYS + ENACTMENT_OFFSET }>; - type LaunchPeriod = ConstU32<{ 1 * DAYS }>; - type VotingPeriod = ConstU32<{ 5 * DAYS }>; - type VoteLockingPeriod = ConstU32<{ 1 * DAYS }>; - type FastTrackVotingPeriod = ConstU32<{ 4 * HOURS }>; - type MinimumDeposit = ConstU128<{ 4 * currency::UNIT * currency::SUPPLY_FACTOR }>; - /// To decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To have the next scheduled referendum be a straight default-carries (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To allow a shorter voting/enactment period for external proposals. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To instant fast track. - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal which has been passed. - type CancellationOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - // To cancel a proposal before it has been passed. - type CancelProposalOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cooloff period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = ConstU32<{ 7 * DAYS }>; - type Slash = (); - type InstantAllowed = ConstBool; - type Scheduler = Scheduler; - type MaxVotes = ConstU32<100>; - type PalletsOrigin = OriginCaller; - type WeightInfo = moonbeam_weights::pallet_democracy::WeightInfo; - type MaxProposals = ConstU32<100>; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; - type SubmitOrigin = EnsureSigned; -} diff --git a/runtime/moonbase/src/governance/mod.rs b/runtime/moonbase/src/governance/mod.rs index 0367cdf063..36a2c6be11 100644 --- a/runtime/moonbase/src/governance/mod.rs +++ b/runtime/moonbase/src/governance/mod.rs @@ -17,7 +17,6 @@ //! Governance configurations pub mod councils; -mod democracy; pub mod referenda; use super::*; diff --git a/runtime/moonbase/src/lib.rs b/runtime/moonbase/src/lib.rs index 785ce35d22..8fb0f75228 100644 --- a/runtime/moonbase/src/lib.rs +++ b/runtime/moonbase/src/lib.rs @@ -942,8 +942,7 @@ impl Default for ProxyType { fn is_governance_precompile(precompile_name: &precompiles::PrecompileName) -> bool { matches!( precompile_name, - PrecompileName::DemocracyPrecompile - | PrecompileName::TreasuryCouncilInstance + PrecompileName::TreasuryCouncilInstance | PrecompileName::ReferendaPrecompile | PrecompileName::ConvictionVotingPrecompile | PrecompileName::PreimagePrecompile @@ -1027,13 +1026,10 @@ impl InstanceFilter for ProxyType { | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::ParachainStaking(..) - | RuntimeCall::Democracy(..) | RuntimeCall::Referenda(..) | RuntimeCall::Preimage(..) | RuntimeCall::ConvictionVoting(..) - // TODO: GovV1| RuntimeCall::CouncilCollective(..) | RuntimeCall::TreasuryCouncilCollective(..) - // TODO: GovV1 | RuntimeCall::TechCommitteeCollective(..) | RuntimeCall::OpenTechCommitteeCollective(..) | RuntimeCall::Identity(..) | RuntimeCall::Utility(..) @@ -1045,13 +1041,10 @@ impl InstanceFilter for ProxyType { } ProxyType::Governance => matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Referenda(..) + RuntimeCall::Referenda(..) | RuntimeCall::Preimage(..) | RuntimeCall::ConvictionVoting(..) - // TODO: GovV1 | RuntimeCall::CouncilCollective(..) | RuntimeCall::TreasuryCouncilCollective(..) - // TODO: GovV1 | RuntimeCall::TechCommitteeCollective(..) | RuntimeCall::OpenTechCommitteeCollective(..) | RuntimeCall::Utility(..) ), @@ -1159,7 +1152,6 @@ impl Contains for MaintenanceFilter { RuntimeCall::Treasury(_) => false, RuntimeCall::XcmTransactor(_) => false, RuntimeCall::EthereumXcm(_) => false, - RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, _ => true, } } @@ -1201,8 +1193,6 @@ impl Contains for NormalFilter { // Note: It is also assumed that EVM calls are only allowed through `Origin::Root` so // this can be seen as an additional security RuntimeCall::EVM(_) => false, - // TODO: Shall this be replaced with OpenGov ? - RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, RuntimeCall::Treasury( pallet_treasury::Call::spend { .. } | pallet_treasury::Call::payout { .. } @@ -1452,11 +1442,9 @@ construct_runtime! { Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Origin, Config} = 11, ParachainStaking: pallet_parachain_staking::{Pallet, Call, Storage, Event, Config} = 12, Scheduler: pallet_scheduler::{Pallet, Storage, Event, Call} = 13, - Democracy: pallet_democracy::{Pallet, Storage, Config, Event, Call} = 14, - // CouncilCollective: - // pallet_collective::::{Pallet, Call, Storage, Event, Origin, Config} = 15, - // TechCommitteeCollective: - // pallet_collective::::{Pallet, Call, Storage, Event, Origin, Config} = 16, + // Previously 14: pallet_democracy::{Pallet, Storage, Config, Event, Call} = 14, + // Previously 15: CouncilCollective: pallet_collective:: + // Previously 16: TechCommitteeCollective: pallet_collective:: Treasury: pallet_treasury::{Pallet, Storage, Config, Event, Call} = 17, AuthorInherent: pallet_author_inherent::{Pallet, Call, Storage, Inherent} = 18, AuthorFilter: pallet_author_slot_filter::{Pallet, Call, Storage, Event, Config} = 19, @@ -1546,10 +1534,8 @@ mod benches { [pallet_sudo, Sudo] [pallet_evm, EVM] [pallet_assets, Assets] - // [pallet_collective, CouncilCollective] [pallet_parachain_staking, ParachainStaking] [pallet_scheduler, Scheduler] - [pallet_democracy, Democracy] [pallet_treasury, Treasury] [pallet_author_inherent, AuthorInherent] [pallet_author_slot_filter, AuthorFilter] @@ -1758,11 +1744,7 @@ mod tests { ); assert_eq!(STORAGE_BYTE_FEE, Balance::from(100 * MICROUNIT)); - // democracy minimums - assert_eq!( - get!(pallet_democracy, MinimumDeposit, u128), - Balance::from(4 * UNIT) - ); + // treasury minimums assert_eq!( get!(pallet_treasury, ProposalBondMinimum, u128), Balance::from(1 * UNIT) diff --git a/runtime/moonbase/src/precompiles.rs b/runtime/moonbase/src/precompiles.rs index ac2f7036eb..a951e6d29f 100644 --- a/runtime/moonbase/src/precompiles.rs +++ b/runtime/moonbase/src/precompiles.rs @@ -29,7 +29,6 @@ use pallet_evm_precompile_call_permit::CallPermitPrecompile; 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_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; @@ -125,11 +124,7 @@ type MoonbasePrecompilesAt = ( Erc20BalancesPrecompile, (CallableByContract, CallableByPrecompile), >, - PrecompileAt< - AddressU64<2051>, - DemocracyPrecompile, - (CallableByContract, CallableByPrecompile), - >, + RemovedPrecompileAt>, // DemocracyPrecompile PrecompileAt< AddressU64<2052>, XtokensPrecompile, diff --git a/runtime/moonbase/tests/integration_test.rs b/runtime/moonbase/tests/integration_test.rs index df6ac25708..d0175aa706 100644 --- a/runtime/moonbase/tests/integration_test.rs +++ b/runtime/moonbase/tests/integration_test.rs @@ -38,7 +38,6 @@ use frame_support::{ }; use moonbase_runtime::{ asset_config::{AssetRegistrarMetadata, ForeignAssetInstance}, - get, xcm_config::{AssetType, SelfReserve}, AccountId, AssetId, AssetManager, Assets, Balances, CrowdloanRewards, OpenTechCommitteeCollective, ParachainStaking, PolkadotXcm, Precompiles, Runtime, @@ -101,11 +100,6 @@ fn xcmp_queue_controller_origin_is_root() { ); } -#[test] -fn fast_track_available() { - assert!(get!(pallet_democracy, InstantAllowed, bool)); -} - #[test] fn verify_pallet_prefixes() { fn is_pallet_prefix(name: &str) { @@ -131,7 +125,6 @@ fn verify_pallet_prefixes() { is_pallet_prefix::("Ethereum"); is_pallet_prefix::("ParachainStaking"); is_pallet_prefix::("Scheduler"); - is_pallet_prefix::("Democracy"); is_pallet_prefix::("Treasury"); is_pallet_prefix::( "OpenTechCommitteeCollective", @@ -415,7 +408,7 @@ fn verify_pallet_indices() { is_pallet_index::(11); is_pallet_index::(12); is_pallet_index::(13); - is_pallet_index::(14); + //is_pallet_index::(14); Removed is_pallet_index::(17); is_pallet_index::(18); is_pallet_index::(19); @@ -2571,7 +2564,7 @@ fn precompile_existence() { fn removed_precompiles() { ExtBuilder::default().build().execute_with(|| { let precompiles = Precompiles::new(); - let removed_precompiles = [1025, 2062, 2063]; + let removed_precompiles = [1025, 2051, 2062, 2063]; for i in 1..3000 { let address = H160::from_low_u64_be(i); diff --git a/runtime/moonbeam/Cargo.toml b/runtime/moonbeam/Cargo.toml index e39c4e4d3c..d881934db9 100644 --- a/runtime/moonbeam/Cargo.toml +++ b/runtime/moonbeam/Cargo.toml @@ -1,296 +1,293 @@ [package] -name = "moonbeam-runtime" -authors = { workspace = true } +authors = {workspace = true} build = "build.rs" description = "Moonbeam Runtime" edition = "2021" homepage = "https://moonbeam.network" license = "GPL-3.0-only" +name = "moonbeam-runtime" version = "0.8.4" [dependencies] -hex-literal = { workspace = true, optional = true } -log = { workspace = true } -num_enum = { workspace = true } -rlp = { workspace = true, optional = true } -serde = { workspace = true, features = ["derive"] } -sha3 = { workspace = true, optional = true } -smallvec = { workspace = true } -strum = { workspace = true } -strum_macros = { workspace = true } +hex-literal = {workspace = true, optional = true} +log = {workspace = true} +num_enum = {workspace = true} +rlp = {workspace = true, optional = true} +serde = {workspace = true, features = ["derive"]} +sha3 = {workspace = true, optional = true} +smallvec = {workspace = true} +strum = {workspace = true} +strum_macros = {workspace = true} # Moonbeam -account = { workspace = true } -moonbeam-core-primitives = { workspace = true } -moonbeam-relay-encoder = { workspace = true } -moonbeam-runtime-common = { workspace = true } -precompile-utils = { workspace = true } -session-keys-primitives = { workspace = true } -xcm-primitives = { workspace = true } +account = {workspace = true} +moonbeam-core-primitives = {workspace = true} +moonbeam-relay-encoder = {workspace = true} +moonbeam-runtime-common = {workspace = true} +precompile-utils = {workspace = true} +session-keys-primitives = {workspace = true} +xcm-primitives = {workspace = true} # Moonbeam pallets -moonbeam-xcm-benchmarks = { workspace = true } -pallet-asset-manager = { workspace = true } -pallet-author-mapping = { workspace = true } -pallet-crowdloan-rewards = { workspace = true } -pallet-erc20-xcm-bridge = { workspace = true } -pallet-evm-chain-id = { workspace = true } -pallet-ethereum-xcm = { workspace = true } -pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } -pallet-migrations = { workspace = true } -pallet-moonbeam-lazy-migrations = { workspace = true } -pallet-moonbeam-orbiters = { workspace = true } -pallet-parachain-staking = { workspace = true } -pallet-proxy-genesis-companion = { workspace = true } -pallet-randomness = { workspace = true } -pallet-xcm-transactor = { workspace = true } +moonbeam-xcm-benchmarks = {workspace = true} +pallet-asset-manager = {workspace = true} +pallet-author-mapping = {workspace = true} +pallet-crowdloan-rewards = {workspace = true} +pallet-erc20-xcm-bridge = {workspace = true} +pallet-ethereum-xcm = {workspace = true} +pallet-evm-chain-id = {workspace = true} +pallet-maintenance-mode = {workspace = true, features = ["xcm-support"]} +pallet-migrations = {workspace = true} +pallet-moonbeam-lazy-migrations = {workspace = true} +pallet-moonbeam-orbiters = {workspace = true} +pallet-parachain-staking = {workspace = true} +pallet-proxy-genesis-companion = {workspace = true} +pallet-randomness = {workspace = true} +pallet-xcm-transactor = {workspace = true} # Moonbeam precompiles -pallet-evm-precompile-author-mapping = { workspace = true } -pallet-evm-precompile-balances-erc20 = { workspace = true } -pallet-evm-precompile-batch = { workspace = true } -pallet-evm-precompile-call-permit = { workspace = true } -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-identity = { workspace = true } -pallet-evm-precompile-parachain-staking = { workspace = true } -pallet-evm-precompile-preimage = { workspace = true } -pallet-evm-precompile-proxy = { workspace = true } -pallet-evm-precompile-randomness = { workspace = true } -pallet-evm-precompile-referenda = { workspace = true } -pallet-evm-precompile-registry = { workspace = true } -pallet-evm-precompile-relay-encoder = { workspace = true } -pallet-evm-precompile-xcm-transactor = { workspace = true } -pallet-evm-precompile-xcm-utils = { workspace = true } -pallet-evm-precompile-xtokens = { workspace = true } -pallet-evm-precompileset-assets-erc20 = { workspace = true } +pallet-evm-precompile-author-mapping = {workspace = true} +pallet-evm-precompile-balances-erc20 = {workspace = true} +pallet-evm-precompile-batch = {workspace = true} +pallet-evm-precompile-call-permit = {workspace = true} +pallet-evm-precompile-collective = {workspace = true} +pallet-evm-precompile-conviction-voting = {workspace = true} +pallet-evm-precompile-crowdloan-rewards = {workspace = true} +pallet-evm-precompile-gmp = {workspace = true} +pallet-evm-precompile-identity = {workspace = true} +pallet-evm-precompile-parachain-staking = {workspace = true} +pallet-evm-precompile-preimage = {workspace = true} +pallet-evm-precompile-proxy = {workspace = true} +pallet-evm-precompile-randomness = {workspace = true} +pallet-evm-precompile-referenda = {workspace = true} +pallet-evm-precompile-registry = {workspace = true} +pallet-evm-precompile-relay-encoder = {workspace = true} +pallet-evm-precompile-xcm-transactor = {workspace = true} +pallet-evm-precompile-xcm-utils = {workspace = true} +pallet-evm-precompile-xtokens = {workspace = true} +pallet-evm-precompileset-assets-erc20 = {workspace = true} # Moonbeam tracing -evm-tracing-events = { workspace = true, optional = true } -moonbeam-evm-tracer = { workspace = true, optional = true } -moonbeam-rpc-primitives-debug = { workspace = true } -moonbeam-rpc-primitives-txpool = { workspace = true } +evm-tracing-events = {workspace = true, optional = true} +moonbeam-evm-tracer = {workspace = true, optional = true} +moonbeam-rpc-primitives-debug = {workspace = true} +moonbeam-rpc-primitives-txpool = {workspace = true} # Substrate -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } -pallet-collective = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-democracy = { workspace = true } -pallet-identity = { workspace = true } -pallet-multisig = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-referenda = { workspace = true } -pallet-root-testing = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-society = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-whitelist = { workspace = true } -parity-scale-codec = { workspace = true, features = [ - "derive", - "max-encoded-len", - "chain-error", -] } -scale-info = { workspace = true, features = ["derive"] } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-core = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true, features = ["improved_panic_error_reporting"] } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } -sp-weights = { workspace = true } +frame-executive = {workspace = true} +frame-support = {workspace = true} +frame-system = {workspace = true} +frame-system-rpc-runtime-api = {workspace = true} +pallet-assets = {workspace = true} +pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} +pallet-collective = {workspace = true} +pallet-conviction-voting = {workspace = true} +pallet-identity = {workspace = true} +pallet-multisig = {workspace = true} +pallet-preimage = {workspace = true} +pallet-proxy = {workspace = true} +pallet-referenda = {workspace = true} +pallet-root-testing = {workspace = true} +pallet-scheduler = {workspace = true} +pallet-society = {workspace = true} +pallet-timestamp = {workspace = true} +pallet-transaction-payment = {workspace = true} +pallet-transaction-payment-rpc-runtime-api = {workspace = true} +pallet-treasury = {workspace = true} +pallet-utility = {workspace = true} +pallet-whitelist = {workspace = true} +parity-scale-codec = {workspace = true, features = [ + "derive", + "max-encoded-len", + "chain-error", +]} +scale-info = {workspace = true, features = ["derive"]} +sp-api = {workspace = true} +sp-block-builder = {workspace = true} +sp-consensus-slots = {workspace = true} +sp-core = {workspace = true} +sp-inherents = {workspace = true} +sp-io = {workspace = true, features = ["improved_panic_error_reporting"]} +sp-offchain = {workspace = true} +sp-runtime = {workspace = true} +sp-session = {workspace = true} +sp-std = {workspace = true} +sp-transaction-pool = {workspace = true} +sp-version = {workspace = true} +sp-weights = {workspace = true} # Frontier -fp-evm = { workspace = true } -fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } -pallet-ethereum = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm-precompile-blake2 = { workspace = true } -pallet-evm-precompile-bn128 = { workspace = true } -pallet-evm-precompile-dispatch = { workspace = true } -pallet-evm-precompile-modexp = { workspace = true } -pallet-evm-precompile-sha3fips = { workspace = true } -pallet-evm-precompile-simple = { workspace = true } +fp-evm = {workspace = true} +fp-rpc = {workspace = true} +fp-self-contained = {workspace = true, features = ["serde"]} +pallet-ethereum = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm-precompile-blake2 = {workspace = true} +pallet-evm-precompile-bn128 = {workspace = true} +pallet-evm-precompile-dispatch = {workspace = true} +pallet-evm-precompile-modexp = {workspace = true} +pallet-evm-precompile-sha3fips = {workspace = true} +pallet-evm-precompile-simple = {workspace = true} # Polkadot / XCM -orml-traits = { workspace = true } -orml-xcm-support = { workspace = true } -orml-xtokens = { workspace = true } -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { workspace = true, optional = true } -polkadot-core-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -polkadot-parachain = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +orml-traits = {workspace = true} +orml-xcm-support = {workspace = true} +orml-xtokens = {workspace = true} +pallet-xcm = {workspace = true} +pallet-xcm-benchmarks = {workspace = true, optional = true} +polkadot-core-primitives = {workspace = true} +polkadot-parachain = {workspace = true} +polkadot-runtime-common = {workspace = true} +xcm = {workspace = true} +xcm-builder = {workspace = true} +xcm-executor = {workspace = true} # Cumulus -cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-timestamp = { workspace = true } -cumulus-primitives-utility = { workspace = true } -parachain-info = { workspace = true } +cumulus-pallet-dmp-queue = {workspace = true} +cumulus-pallet-parachain-system = {workspace = true} +cumulus-pallet-xcm = {workspace = true} +cumulus-pallet-xcmp-queue = {workspace = true} +cumulus-primitives-core = {workspace = true} +cumulus-primitives-timestamp = {workspace = true} +cumulus-primitives-utility = {workspace = true} +parachain-info = {workspace = true} # Moonkit -async-backing-primitives = { workspace = true } -moonkit-xcm-primitives = { workspace = true } -nimbus-primitives = { workspace = true } -pallet-author-inherent = { workspace = true } -pallet-author-slot-filter = { workspace = true } +async-backing-primitives = {workspace = true} +moonkit-xcm-primitives = {workspace = true} +nimbus-primitives = {workspace = true} +pallet-author-inherent = {workspace = true} +pallet-author-slot-filter = {workspace = true} # Benchmarking -frame-benchmarking = { workspace = true, optional = true } -frame-system-benchmarking = { workspace = true, optional = true } -frame-try-runtime = { workspace = true, optional = true } +frame-benchmarking = {workspace = true, optional = true} +frame-system-benchmarking = {workspace = true, optional = true} +frame-try-runtime = {workspace = true, optional = true} [dev-dependencies] -ethereum = { workspace = true } -frame-metadata = { workspace = true } -hex = { workspace = true, features = ["std"] } -sha3 = { workspace = true, features = ["std"] } +ethereum = {workspace = true} +frame-metadata = {workspace = true} +hex = {workspace = true, features = ["std"]} +sha3 = {workspace = true, features = ["std"]} -cumulus-primitives-parachain-inherent = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true } +cumulus-primitives-parachain-inherent = {workspace = true} +cumulus-test-relay-sproof-builder = {workspace = true} -pallet-message-queue = { workspace = true } -polkadot-runtime-parachains = { workspace = true } -xcm-simulator = { workspace = true } +pallet-message-queue = {workspace = true} +polkadot-runtime-parachains = {workspace = true} +xcm-simulator = {workspace = true} -precompile-utils = { workspace = true, features = ["std", "testing"] } +precompile-utils = {workspace = true, features = ["std", "testing"]} [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = {workspace = true} [features] default = ["std"] +evm-tracing = ["evm-tracing-events", "moonbeam-evm-tracer", "rlp", "sha3"] std = [ - "account/std", - "async-backing-primitives/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "evm-tracing-events/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "moonbeam-core-primitives/std", - "moonbeam-evm-tracer/std", - "moonbeam-relay-encoder/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "moonbeam-runtime-common/std", - "moonbeam-xcm-benchmarks/std", - "moonkit-xcm-primitives/std", - "nimbus-primitives/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-author-slot-filter/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-conviction-voting/std", - "pallet-crowdloan-rewards/std", - "pallet-democracy/std", - "pallet-erc20-xcm-bridge/std", - "pallet-evm-chain-id/std", - "pallet-ethereum-xcm/std", - "pallet-ethereum/std", - "pallet-evm-precompile-author-mapping/std", - "pallet-evm-precompile-balances-erc20/std", - "pallet-evm-precompile-batch/std", - "pallet-evm-precompile-call-permit/std", - "pallet-evm-precompile-collective/std", - "pallet-evm-precompile-conviction-voting/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-preimage/std", - "pallet-evm-precompile-randomness/std", - "pallet-evm-precompile-referenda/std", - "pallet-evm-precompile-relay-encoder/std", - "pallet-evm-precompile-xcm-transactor/std", - "pallet-evm-precompile-xcm-utils/std", - "pallet-evm-precompile-xtokens/std", - "pallet-evm-precompileset-assets-erc20/std", - "pallet-evm/std", - "pallet-identity/std", - "pallet-maintenance-mode/std", - "pallet-migrations/std", - "pallet-moonbeam-lazy-migrations/std", - "pallet-moonbeam-orbiters/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-preimage/std", - "pallet-proxy-genesis-companion/std", - "pallet-proxy/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-root-testing/std", - "pallet-scheduler/std", - "pallet-society/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-whitelist/std", - "pallet-xcm-transactor/std", - "pallet-xcm/std", - "parachain-info/std", - "parity-scale-codec/std", - "precompile-utils/std", - "scale-info/std", - "session-keys-primitives/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "strum/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "account/std", + "async-backing-primitives/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "evm-tracing-events/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "moonbeam-core-primitives/std", + "moonbeam-evm-tracer/std", + "moonbeam-relay-encoder/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "moonbeam-runtime-common/std", + "moonbeam-xcm-benchmarks/std", + "moonkit-xcm-primitives/std", + "nimbus-primitives/std", + "orml-xtokens/std", + "pallet-asset-manager/std", + "pallet-assets/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-author-slot-filter/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-crowdloan-rewards/std", + "pallet-erc20-xcm-bridge/std", + "pallet-evm-chain-id/std", + "pallet-ethereum-xcm/std", + "pallet-ethereum/std", + "pallet-evm-precompile-author-mapping/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-collective/std", + "pallet-evm-precompile-conviction-voting/std", + "pallet-evm-precompile-parachain-staking/std", + "pallet-evm-precompile-preimage/std", + "pallet-evm-precompile-randomness/std", + "pallet-evm-precompile-referenda/std", + "pallet-evm-precompile-relay-encoder/std", + "pallet-evm-precompile-xcm-transactor/std", + "pallet-evm-precompile-xcm-utils/std", + "pallet-evm-precompile-xtokens/std", + "pallet-evm-precompileset-assets-erc20/std", + "pallet-evm/std", + "pallet-identity/std", + "pallet-maintenance-mode/std", + "pallet-migrations/std", + "pallet-moonbeam-lazy-migrations/std", + "pallet-moonbeam-orbiters/std", + "pallet-multisig/std", + "pallet-parachain-staking/std", + "pallet-preimage/std", + "pallet-proxy-genesis-companion/std", + "pallet-proxy/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-root-testing/std", + "pallet-scheduler/std", + "pallet-society/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-whitelist/std", + "pallet-xcm-transactor/std", + "pallet-xcm/std", + "parachain-info/std", + "parity-scale-codec/std", + "precompile-utils/std", + "scale-info/std", + "session-keys-primitives/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "strum/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", ] -evm-tracing = ["evm-tracing-events", "moonbeam-evm-tracer", "rlp", "sha3"] # Will be enabled by the `wasm-builder` when building the runtime for WASM. runtime-wasm = [] @@ -301,74 +298,73 @@ runtime-wasm = [] on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "moonbeam-relay-encoder/runtime-benchmarks", - "moonbeam-runtime-common/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-migrations/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-society/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "session-keys-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "moonbeam-relay-encoder/runtime-benchmarks", + "moonbeam-runtime-common/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-society/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "session-keys-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", ] try-runtime = [ - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "moonbeam-runtime-common/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-author-mapping/try-runtime", - "pallet-author-slot-filter/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-conviction-voting/try-runtime", - "pallet-democracy/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", - "pallet-moonbeam-lazy-migrations/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-referenda/try-runtime", - "pallet-root-testing/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-society/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-whitelist/try-runtime", + "fp-self-contained/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "moonbeam-runtime-common/try-runtime", + "pallet-asset-manager/try-runtime", + "pallet-author-mapping/try-runtime", + "pallet-author-slot-filter/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-migrations/try-runtime", + "pallet-moonbeam-lazy-migrations/try-runtime", + "pallet-parachain-staking/try-runtime", + "pallet-preimage/try-runtime", + "pallet-referenda/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-society/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-whitelist/try-runtime", ] diff --git a/runtime/moonbeam/src/governance/democracy.rs b/runtime/moonbeam/src/governance/democracy.rs deleted file mode 100644 index e9b2cedd04..0000000000 --- a/runtime/moonbeam/src/governance/democracy.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019-2023 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . - -//! Democracy config for Gov1 - -use super::councils::*; -use crate::*; - -// The purpose of this offset is to ensure that a democratic proposal will not apply in the same -// block as a round change. -const ENACTMENT_OFFSET: u32 = 900; - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = ConstU32<{ 2 * DAYS + ENACTMENT_OFFSET }>; - type LaunchPeriod = ConstU32<{ 7 * DAYS }>; - type VotingPeriod = ConstU32<{ 14 * DAYS }>; - - type VoteLockingPeriod = ConstU32<{ 7 * DAYS }>; - type FastTrackVotingPeriod = ConstU32<{ 1 * DAYS }>; - type MinimumDeposit = ConstU128<{ 4 * currency::GLMR * currency::SUPPLY_FACTOR }>; - /// To decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To have the next scheduled referendum be a straight default-carries (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To allow a shorter voting/enactment period for external proposals. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To instant fast track. - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal which has been passed. - type CancellationOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - // To cancel a proposal before it has been passed. - type CancelProposalOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cooloff period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = ConstU32<{ 7 * DAYS }>; - type Slash = (); - type InstantAllowed = ConstBool; - type Scheduler = Scheduler; - type MaxVotes = ConstU32<100>; - type PalletsOrigin = OriginCaller; - type WeightInfo = moonbeam_weights::pallet_democracy::WeightInfo; - type MaxProposals = ConstU32<100>; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; - type SubmitOrigin = EnsureSigned; -} diff --git a/runtime/moonbeam/src/governance/mod.rs b/runtime/moonbeam/src/governance/mod.rs index bc946aadb5..bfe3def35e 100644 --- a/runtime/moonbeam/src/governance/mod.rs +++ b/runtime/moonbeam/src/governance/mod.rs @@ -17,7 +17,6 @@ //! Governance configurations pub mod councils; -mod democracy; pub mod referenda; use super::*; diff --git a/runtime/moonbeam/src/lib.rs b/runtime/moonbeam/src/lib.rs index 661566bc2f..a76faa9db2 100644 --- a/runtime/moonbeam/src/lib.rs +++ b/runtime/moonbeam/src/lib.rs @@ -896,8 +896,7 @@ impl Default for ProxyType { fn is_governance_precompile(precompile_name: &precompiles::PrecompileName) -> bool { matches!( precompile_name, - PrecompileName::DemocracyPrecompile - | PrecompileName::ConvictionVotingPrecompile + PrecompileName::ConvictionVotingPrecompile | PrecompileName::PreimagePrecompile | PrecompileName::ReferendaPrecompile | PrecompileName::OpenTechCommitteeInstance @@ -1008,7 +1007,6 @@ impl InstanceFilter for ProxyType { | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::ParachainStaking(..) - | RuntimeCall::Democracy(..) | RuntimeCall::Referenda(..) | RuntimeCall::Preimage(..) | RuntimeCall::ConvictionVoting(..) @@ -1024,8 +1022,7 @@ impl InstanceFilter for ProxyType { } ProxyType::Governance => matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Referenda(..) + RuntimeCall::Referenda(..) | RuntimeCall::Preimage(..) | RuntimeCall::ConvictionVoting(..) | RuntimeCall::TreasuryCouncilCollective(..) @@ -1134,7 +1131,6 @@ impl Contains for MaintenanceFilter { RuntimeCall::Treasury(_) => false, RuntimeCall::XcmTransactor(_) => false, RuntimeCall::EthereumXcm(_) => false, - RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, _ => true, } } @@ -1182,7 +1178,6 @@ impl Contains for NormalFilter { // Note: It is also assumed that EVM calls are only allowed through `Origin::Root` so // this can be seen as an additional security RuntimeCall::EVM(_) => false, - RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, RuntimeCall::Treasury( pallet_treasury::Call::spend { .. } | pallet_treasury::Call::payout { .. } @@ -1441,7 +1436,7 @@ construct_runtime! { // Governance stuff. Scheduler: pallet_scheduler::{Pallet, Storage, Event, Call} = 60, - Democracy: pallet_democracy::{Pallet, Storage, Config, Event, Call} = 61, + // Democracy: 61, Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 62, ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 63, Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 64, @@ -1497,7 +1492,6 @@ mod benches { [pallet_assets, Assets] [pallet_parachain_staking, ParachainStaking] [pallet_scheduler, Scheduler] - [pallet_democracy, Democracy] [pallet_treasury, Treasury] [pallet_author_inherent, AuthorInherent] [pallet_author_slot_filter, AuthorFilter] @@ -1747,11 +1741,7 @@ mod tests { ); assert_eq!(STORAGE_BYTE_FEE, Balance::from(10 * MILLIGLMR)); - // democracy minimums - assert_eq!( - get!(pallet_democracy, MinimumDeposit, u128), - Balance::from(400 * GLMR) - ); + // treasury minimums assert_eq!( get!(pallet_treasury, ProposalBondMinimum, u128), Balance::from(100 * GLMR) diff --git a/runtime/moonbeam/src/precompiles.rs b/runtime/moonbeam/src/precompiles.rs index 9bd6bd0434..cf7469bb62 100644 --- a/runtime/moonbeam/src/precompiles.rs +++ b/runtime/moonbeam/src/precompiles.rs @@ -29,7 +29,6 @@ use pallet_evm_precompile_call_permit::CallPermitPrecompile; 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_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; @@ -124,11 +123,7 @@ type MoonbeamPrecompilesAt = ( Erc20BalancesPrecompile, (CallableByContract, CallableByPrecompile), >, - PrecompileAt< - AddressU64<2051>, - DemocracyPrecompile, - (CallableByContract, CallableByPrecompile), - >, + RemovedPrecompileAt>, // Democracy PrecompileAt< AddressU64<2052>, XtokensPrecompile, diff --git a/runtime/moonbeam/tests/integration_test.rs b/runtime/moonbeam/tests/integration_test.rs index 92bebb30c9..3f07173762 100644 --- a/runtime/moonbeam/tests/integration_test.rs +++ b/runtime/moonbeam/tests/integration_test.rs @@ -95,15 +95,6 @@ fn xcmp_queue_controller_origin_is_root() { ); } -#[test] -fn fast_track_available() { - assert!(moonbeam_runtime::get!( - pallet_democracy, - InstantAllowed, - bool - )); -} - #[test] fn verify_pallet_prefixes() { fn is_pallet_prefix(name: &str) { @@ -129,7 +120,6 @@ fn verify_pallet_prefixes() { is_pallet_prefix::("Ethereum"); is_pallet_prefix::("ParachainStaking"); is_pallet_prefix::("Scheduler"); - is_pallet_prefix::("Democracy"); is_pallet_prefix::( "OpenTechCommitteeCollective", ); @@ -415,7 +405,7 @@ fn verify_pallet_indices() { is_pallet_index::(52); // Governance is_pallet_index::(60); - is_pallet_index::(61); + // is_pallet_index::(61); Removed // Council // is_pallet_index::(70); Removed // is_pallet_index::(71); Removed @@ -2484,7 +2474,7 @@ fn precompile_existence() { fn removed_precompiles() { ExtBuilder::default().build().execute_with(|| { let precompiles = Precompiles::new(); - let removed_precompiles = [1025, 2062, 2063]; + let removed_precompiles = [1025, 2051, 2062, 2063]; for i in 1..3000 { let address = H160::from_low_u64_be(i); diff --git a/runtime/moonriver/Cargo.toml b/runtime/moonriver/Cargo.toml index 78971397a3..526b9f182f 100644 --- a/runtime/moonriver/Cargo.toml +++ b/runtime/moonriver/Cargo.toml @@ -1,294 +1,290 @@ [package] -name = "moonriver-runtime" -authors = { workspace = true } +authors = {workspace = true} build = "build.rs" description = "Moonriver Runtime" edition = "2021" homepage = "https://moonbeam.network" license = "GPL-3.0-only" +name = "moonriver-runtime" version = "0.8.4" [dependencies] -hex-literal = { workspace = true, optional = true } -log = { workspace = true } -num_enum = { workspace = true } -rlp = { workspace = true, optional = true } -serde = { workspace = true, features = ["derive"] } -sha3 = { workspace = true, optional = true } -smallvec = { workspace = true } -strum = { workspace = true } -strum_macros = { workspace = true } +hex-literal = {workspace = true, optional = true} +log = {workspace = true} +num_enum = {workspace = true} +rlp = {workspace = true, optional = true} +serde = {workspace = true, features = ["derive"]} +sha3 = {workspace = true, optional = true} +smallvec = {workspace = true} +strum = {workspace = true} +strum_macros = {workspace = true} # Moonbeam -account = { workspace = true } -moonbeam-core-primitives = { workspace = true } -moonbeam-relay-encoder = { workspace = true } -moonbeam-runtime-common = { workspace = true } -precompile-utils = { workspace = true } -session-keys-primitives = { workspace = true } -xcm-primitives = { workspace = true } +account = {workspace = true} +moonbeam-core-primitives = {workspace = true} +moonbeam-relay-encoder = {workspace = true} +moonbeam-runtime-common = {workspace = true} +precompile-utils = {workspace = true} +session-keys-primitives = {workspace = true} +xcm-primitives = {workspace = true} # Moonbeam pallets -moonbeam-xcm-benchmarks = { workspace = true } -pallet-asset-manager = { workspace = true } -pallet-author-mapping = { workspace = true } -pallet-crowdloan-rewards = { workspace = true } -pallet-erc20-xcm-bridge = { workspace = true } -pallet-evm-chain-id = { workspace = true } -pallet-ethereum-xcm = { workspace = true } -pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } -pallet-migrations = { workspace = true } -pallet-moonbeam-lazy-migrations = { workspace = true } -pallet-moonbeam-orbiters = { workspace = true } -pallet-parachain-staking = { workspace = true } -pallet-proxy-genesis-companion = { workspace = true } -pallet-randomness = { workspace = true } -pallet-xcm-transactor = { workspace = true } +moonbeam-xcm-benchmarks = {workspace = true} +pallet-asset-manager = {workspace = true} +pallet-author-mapping = {workspace = true} +pallet-crowdloan-rewards = {workspace = true} +pallet-erc20-xcm-bridge = {workspace = true} +pallet-ethereum-xcm = {workspace = true} +pallet-evm-chain-id = {workspace = true} +pallet-maintenance-mode = {workspace = true, features = ["xcm-support"]} +pallet-migrations = {workspace = true} +pallet-moonbeam-lazy-migrations = {workspace = true} +pallet-moonbeam-orbiters = {workspace = true} +pallet-parachain-staking = {workspace = true} +pallet-proxy-genesis-companion = {workspace = true} +pallet-randomness = {workspace = true} +pallet-xcm-transactor = {workspace = true} # Moonbeam precompiles -pallet-evm-precompile-author-mapping = { workspace = true } -pallet-evm-precompile-balances-erc20 = { workspace = true } -pallet-evm-precompile-batch = { workspace = true } -pallet-evm-precompile-call-permit = { workspace = true } -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-identity = { workspace = true } -pallet-evm-precompile-parachain-staking = { workspace = true } -pallet-evm-precompile-preimage = { workspace = true } -pallet-evm-precompile-proxy = { workspace = true } -pallet-evm-precompile-randomness = { workspace = true } -pallet-evm-precompile-referenda = { workspace = true } -pallet-evm-precompile-registry = { workspace = true } -pallet-evm-precompile-relay-encoder = { workspace = true } -pallet-evm-precompile-xcm-transactor = { workspace = true } -pallet-evm-precompile-xcm-utils = { workspace = true } -pallet-evm-precompile-xtokens = { workspace = true } -pallet-evm-precompileset-assets-erc20 = { workspace = true } +pallet-evm-precompile-author-mapping = {workspace = true} +pallet-evm-precompile-balances-erc20 = {workspace = true} +pallet-evm-precompile-batch = {workspace = true} +pallet-evm-precompile-call-permit = {workspace = true} +pallet-evm-precompile-collective = {workspace = true} +pallet-evm-precompile-conviction-voting = {workspace = true} +pallet-evm-precompile-crowdloan-rewards = {workspace = true} +pallet-evm-precompile-gmp = {workspace = true} +pallet-evm-precompile-identity = {workspace = true} +pallet-evm-precompile-parachain-staking = {workspace = true} +pallet-evm-precompile-preimage = {workspace = true} +pallet-evm-precompile-proxy = {workspace = true} +pallet-evm-precompile-randomness = {workspace = true} +pallet-evm-precompile-referenda = {workspace = true} +pallet-evm-precompile-registry = {workspace = true} +pallet-evm-precompile-relay-encoder = {workspace = true} +pallet-evm-precompile-xcm-transactor = {workspace = true} +pallet-evm-precompile-xcm-utils = {workspace = true} +pallet-evm-precompile-xtokens = {workspace = true} +pallet-evm-precompileset-assets-erc20 = {workspace = true} # Moonbeam tracing -evm-tracing-events = { workspace = true, optional = true } -moonbeam-evm-tracer = { workspace = true, optional = true } -moonbeam-rpc-primitives-debug = { workspace = true } -moonbeam-rpc-primitives-txpool = { workspace = true } +evm-tracing-events = {workspace = true, optional = true} +moonbeam-evm-tracer = {workspace = true, optional = true} +moonbeam-rpc-primitives-debug = {workspace = true} +moonbeam-rpc-primitives-txpool = {workspace = true} # Substrate -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true, features = ["insecure_zero_ed"] } -pallet-collective = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-democracy = { workspace = true } -pallet-identity = { workspace = true } -pallet-multisig = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-referenda = { workspace = true } -pallet-root-testing = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-society = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-whitelist = { workspace = true } -parity-scale-codec = { workspace = true, features = [ - "derive", - "max-encoded-len", - "chain-error", -] } -scale-info = { workspace = true, features = ["derive"] } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-core = { workspace = true } -sp-debug-derive = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true, features = ["improved_panic_error_reporting"] } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } -sp-weights = { workspace = true } +frame-executive = {workspace = true} +frame-support = {workspace = true} +frame-system = {workspace = true} +frame-system-rpc-runtime-api = {workspace = true} +pallet-assets = {workspace = true} +pallet-balances = {workspace = true, features = ["insecure_zero_ed"]} +pallet-collective = {workspace = true} +pallet-conviction-voting = {workspace = true} +pallet-identity = {workspace = true} +pallet-multisig = {workspace = true} +pallet-preimage = {workspace = true} +pallet-proxy = {workspace = true} +pallet-referenda = {workspace = true} +pallet-root-testing = {workspace = true} +pallet-scheduler = {workspace = true} +pallet-society = {workspace = true} +pallet-timestamp = {workspace = true} +pallet-transaction-payment = {workspace = true} +pallet-transaction-payment-rpc-runtime-api = {workspace = true} +pallet-treasury = {workspace = true} +pallet-utility = {workspace = true} +pallet-whitelist = {workspace = true} +parity-scale-codec = {workspace = true, features = [ + "derive", + "max-encoded-len", + "chain-error", +]} +scale-info = {workspace = true, features = ["derive"]} +sp-api = {workspace = true} +sp-block-builder = {workspace = true} +sp-consensus-slots = {workspace = true} +sp-core = {workspace = true} +sp-debug-derive = {workspace = true} +sp-inherents = {workspace = true} +sp-io = {workspace = true, features = ["improved_panic_error_reporting"]} +sp-offchain = {workspace = true} +sp-runtime = {workspace = true} +sp-session = {workspace = true} +sp-std = {workspace = true} +sp-transaction-pool = {workspace = true} +sp-version = {workspace = true} +sp-weights = {workspace = true} # Frontier -fp-evm = { workspace = true } -fp-rpc = { workspace = true } -fp-self-contained = { workspace = true, features = ["serde"] } -pallet-ethereum = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm = { workspace = true, features = ["forbid-evm-reentrancy"] } -pallet-evm-precompile-blake2 = { workspace = true } -pallet-evm-precompile-bn128 = { workspace = true } -pallet-evm-precompile-dispatch = { workspace = true } -pallet-evm-precompile-modexp = { workspace = true } -pallet-evm-precompile-sha3fips = { workspace = true } -pallet-evm-precompile-simple = { workspace = true } +fp-evm = {workspace = true} +fp-rpc = {workspace = true} +fp-self-contained = {workspace = true, features = ["serde"]} +pallet-ethereum = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm = {workspace = true, features = ["forbid-evm-reentrancy"]} +pallet-evm-precompile-blake2 = {workspace = true} +pallet-evm-precompile-bn128 = {workspace = true} +pallet-evm-precompile-dispatch = {workspace = true} +pallet-evm-precompile-modexp = {workspace = true} +pallet-evm-precompile-sha3fips = {workspace = true} +pallet-evm-precompile-simple = {workspace = true} # Polkadot / XCM -orml-traits = { workspace = true } -orml-xcm-support = { workspace = true } -orml-xtokens = { workspace = true } -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { workspace = true, optional = true } -polkadot-core-primitives = { workspace = true } -polkadot-parachain = { workspace = true } -polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +orml-traits = {workspace = true} +orml-xcm-support = {workspace = true} +orml-xtokens = {workspace = true} +pallet-xcm = {workspace = true} +pallet-xcm-benchmarks = {workspace = true, optional = true} +polkadot-core-primitives = {workspace = true} +polkadot-parachain = {workspace = true} +polkadot-runtime-common = {workspace = true} +xcm = {workspace = true} +xcm-builder = {workspace = true} +xcm-executor = {workspace = true} # Cumulus -cumulus-pallet-dmp-queue = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-timestamp = { workspace = true } -cumulus-primitives-utility = { workspace = true } -parachain-info = { workspace = true } +cumulus-pallet-dmp-queue = {workspace = true} +cumulus-pallet-parachain-system = {workspace = true} +cumulus-pallet-xcm = {workspace = true} +cumulus-pallet-xcmp-queue = {workspace = true} +cumulus-primitives-core = {workspace = true} +cumulus-primitives-timestamp = {workspace = true} +cumulus-primitives-utility = {workspace = true} +parachain-info = {workspace = true} # Moonkit -async-backing-primitives = { workspace = true } -moonkit-xcm-primitives = { workspace = true } -nimbus-primitives = { workspace = true } -pallet-author-inherent = { workspace = true } -pallet-author-slot-filter = { workspace = true } +async-backing-primitives = {workspace = true} +moonkit-xcm-primitives = {workspace = true} +nimbus-primitives = {workspace = true} +pallet-author-inherent = {workspace = true} +pallet-author-slot-filter = {workspace = true} # Benchmarking -frame-benchmarking = { workspace = true, optional = true } -frame-system-benchmarking = { workspace = true, optional = true } -frame-try-runtime = { workspace = true, optional = true } +frame-benchmarking = {workspace = true, optional = true} +frame-system-benchmarking = {workspace = true, optional = true} +frame-try-runtime = {workspace = true, optional = true} [dev-dependencies] -ethereum = { workspace = true } -frame-metadata = { workspace = true } -hex = { workspace = true, features = ["std"] } -sha3 = { workspace = true, features = ["std"] } +ethereum = {workspace = true} +frame-metadata = {workspace = true} +hex = {workspace = true, features = ["std"]} +sha3 = {workspace = true, features = ["std"]} -cumulus-primitives-parachain-inherent = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true } +cumulus-primitives-parachain-inherent = {workspace = true} +cumulus-test-relay-sproof-builder = {workspace = true} -pallet-message-queue = { workspace = true } -polkadot-runtime-parachains = { workspace = true } -xcm-simulator = { workspace = true } +pallet-message-queue = {workspace = true} +polkadot-runtime-parachains = {workspace = true} +xcm-simulator = {workspace = true} -precompile-utils = { workspace = true, features = ["std", "testing"] } +precompile-utils = {workspace = true, features = ["std", "testing"]} [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = {workspace = true} [features] default = ["std"] std = [ - "account/std", - "async-backing-primitives/std", - "cumulus-pallet-dmp-queue/std", - "cumulus-pallet-parachain-system/std", - "cumulus-pallet-xcm/std", - "cumulus-pallet-xcmp-queue/std", - "cumulus-primitives-core/std", - "cumulus-primitives-timestamp/std", - "evm-tracing-events/std", - "fp-evm/std", - "fp-rpc/std", - "fp-self-contained/std", - "frame-benchmarking/std", - "frame-executive/std", - "frame-support/std", - "frame-system-rpc-runtime-api/std", - "frame-system/std", - "moonbeam-core-primitives/std", - "moonbeam-evm-tracer/std", - "moonbeam-relay-encoder/std", - "moonbeam-rpc-primitives-debug/std", - "moonbeam-rpc-primitives-txpool/std", - "moonbeam-runtime-common/std", - "moonbeam-xcm-benchmarks/std", - "moonkit-xcm-primitives/std", - "nimbus-primitives/std", - "orml-xtokens/std", - "pallet-asset-manager/std", - "pallet-assets/std", - "pallet-author-inherent/std", - "pallet-author-mapping/std", - "pallet-author-slot-filter/std", - "pallet-balances/std", - "pallet-collective/std", - "pallet-conviction-voting/std", - "pallet-crowdloan-rewards/std", - "pallet-democracy/std", - "pallet-erc20-xcm-bridge/std", - "pallet-evm-chain-id/std", - "pallet-ethereum-xcm/std", - "pallet-ethereum/std", - "pallet-evm-precompile-author-mapping/std", - "pallet-evm-precompile-balances-erc20/std", - "pallet-evm-precompile-batch/std", - "pallet-evm-precompile-call-permit/std", - "pallet-evm-precompile-collective/std", - "pallet-evm-precompile-conviction-voting/std", - "pallet-evm-precompile-democracy/std", - "pallet-evm-precompile-parachain-staking/std", - "pallet-evm-precompile-preimage/std", - "pallet-evm-precompile-randomness/std", - "pallet-evm-precompile-referenda/std", - "pallet-evm-precompile-xcm-transactor/std", - "pallet-evm-precompile-xcm-utils/std", - "pallet-evm-precompile-xtokens/std", - "pallet-evm/std", - "pallet-identity/std", - "pallet-maintenance-mode/std", - "pallet-migrations/std", - "pallet-moonbeam-lazy-migrations/std", - "pallet-moonbeam-orbiters/std", - "pallet-multisig/std", - "pallet-parachain-staking/std", - "pallet-preimage/std", - "pallet-proxy-genesis-companion/std", - "pallet-proxy/std", - "pallet-randomness/std", - "pallet-referenda/std", - "pallet-root-testing/std", - "pallet-scheduler/std", - "pallet-society/std", - "pallet-timestamp/std", - "pallet-transaction-payment-rpc-runtime-api/std", - "pallet-transaction-payment/std", - "pallet-treasury/std", - "pallet-utility/std", - "pallet-whitelist/std", - "pallet-xcm-transactor/std", - "pallet-xcm/std", - "parachain-info/std", - "parity-scale-codec/std", - "precompile-utils/std", - "scale-info/std", - "session-keys-primitives/std", - "sp-api/std", - "sp-block-builder/std", - "sp-consensus-slots/std", - "sp-core/std", - "sp-inherents/std", - "sp-io/std", - "sp-offchain/std", - "sp-runtime/std", - "sp-session/std", - "sp-std/std", - "sp-transaction-pool/std", - "sp-version/std", - "strum/std", - "xcm-builder/std", - "xcm-executor/std", - "xcm-primitives/std", - "xcm/std", + "account/std", + "async-backing-primitives/std", + "cumulus-pallet-dmp-queue/std", + "cumulus-pallet-parachain-system/std", + "cumulus-pallet-xcm/std", + "cumulus-pallet-xcmp-queue/std", + "cumulus-primitives-core/std", + "cumulus-primitives-timestamp/std", + "evm-tracing-events/std", + "fp-evm/std", + "fp-rpc/std", + "fp-self-contained/std", + "frame-benchmarking/std", + "frame-executive/std", + "frame-support/std", + "frame-system-rpc-runtime-api/std", + "frame-system/std", + "moonbeam-core-primitives/std", + "moonbeam-evm-tracer/std", + "moonbeam-relay-encoder/std", + "moonbeam-rpc-primitives-debug/std", + "moonbeam-rpc-primitives-txpool/std", + "moonbeam-runtime-common/std", + "moonbeam-xcm-benchmarks/std", + "moonkit-xcm-primitives/std", + "nimbus-primitives/std", + "orml-xtokens/std", + "pallet-asset-manager/std", + "pallet-assets/std", + "pallet-author-inherent/std", + "pallet-author-mapping/std", + "pallet-author-slot-filter/std", + "pallet-balances/std", + "pallet-collective/std", + "pallet-conviction-voting/std", + "pallet-crowdloan-rewards/std", + "pallet-erc20-xcm-bridge/std", + "pallet-evm-chain-id/std", + "pallet-ethereum-xcm/std", + "pallet-ethereum/std", + "pallet-evm-precompile-author-mapping/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-collective/std", + "pallet-evm-precompile-conviction-voting/std", + "pallet-evm-precompile-parachain-staking/std", + "pallet-evm-precompile-preimage/std", + "pallet-evm-precompile-randomness/std", + "pallet-evm-precompile-referenda/std", + "pallet-evm-precompile-xcm-transactor/std", + "pallet-evm-precompile-xcm-utils/std", + "pallet-evm-precompile-xtokens/std", + "pallet-evm/std", + "pallet-identity/std", + "pallet-maintenance-mode/std", + "pallet-migrations/std", + "pallet-moonbeam-lazy-migrations/std", + "pallet-moonbeam-orbiters/std", + "pallet-multisig/std", + "pallet-parachain-staking/std", + "pallet-preimage/std", + "pallet-proxy-genesis-companion/std", + "pallet-proxy/std", + "pallet-randomness/std", + "pallet-referenda/std", + "pallet-root-testing/std", + "pallet-scheduler/std", + "pallet-society/std", + "pallet-timestamp/std", + "pallet-transaction-payment-rpc-runtime-api/std", + "pallet-transaction-payment/std", + "pallet-treasury/std", + "pallet-utility/std", + "pallet-whitelist/std", + "pallet-xcm-transactor/std", + "pallet-xcm/std", + "parachain-info/std", + "parity-scale-codec/std", + "precompile-utils/std", + "scale-info/std", + "session-keys-primitives/std", + "sp-api/std", + "sp-block-builder/std", + "sp-consensus-slots/std", + "sp-core/std", + "sp-inherents/std", + "sp-io/std", + "sp-offchain/std", + "sp-runtime/std", + "sp-session/std", + "sp-std/std", + "sp-transaction-pool/std", + "sp-version/std", + "strum/std", + "xcm-builder/std", + "xcm-executor/std", + "xcm-primitives/std", + "xcm/std", ] # Must be enabled for tracing runtimes only @@ -306,73 +302,72 @@ runtime-wasm = [] on-chain-release-build = ["sp-api/disable-logging"] runtime-benchmarks = [ - "cumulus-pallet-parachain-system/runtime-benchmarks", - "frame-benchmarking", - "frame-benchmarking/runtime-benchmarks", - "frame-support/runtime-benchmarks", - "frame-system-benchmarking/runtime-benchmarks", - "frame-system/runtime-benchmarks", - "hex-literal", - "moonbeam-relay-encoder/runtime-benchmarks", - "moonbeam-runtime-common/runtime-benchmarks", - "moonbeam-xcm-benchmarks/runtime-benchmarks", - "pallet-asset-manager/runtime-benchmarks", - "pallet-assets/runtime-benchmarks", - "pallet-author-inherent/runtime-benchmarks", - "pallet-author-mapping/runtime-benchmarks", - "pallet-author-slot-filter/runtime-benchmarks", - "pallet-balances/runtime-benchmarks", - "pallet-collective/runtime-benchmarks", - "pallet-conviction-voting/runtime-benchmarks", - "pallet-crowdloan-rewards/runtime-benchmarks", - "pallet-ethereum-xcm/runtime-benchmarks", - "pallet-ethereum/runtime-benchmarks", - "pallet-evm/runtime-benchmarks", - "pallet-identity/runtime-benchmarks", - "pallet-migrations/runtime-benchmarks", - "pallet-moonbeam-lazy-migrations/runtime-benchmarks", - "pallet-moonbeam-orbiters/runtime-benchmarks", - "pallet-multisig/runtime-benchmarks", - "pallet-parachain-staking/runtime-benchmarks", - "pallet-preimage/runtime-benchmarks", - "pallet-proxy/runtime-benchmarks", - "pallet-randomness/runtime-benchmarks", - "pallet-referenda/runtime-benchmarks", - "pallet-scheduler/runtime-benchmarks", - "pallet-society/runtime-benchmarks", - "pallet-timestamp/runtime-benchmarks", - "pallet-treasury/runtime-benchmarks", - "pallet-utility/runtime-benchmarks", - "pallet-whitelist/runtime-benchmarks", - "pallet-xcm-benchmarks", - "pallet-xcm-transactor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks", - "session-keys-primitives/runtime-benchmarks", - "sp-runtime/runtime-benchmarks", - "xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system-benchmarking/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "hex-literal", + "moonbeam-relay-encoder/runtime-benchmarks", + "moonbeam-runtime-common/runtime-benchmarks", + "moonbeam-xcm-benchmarks/runtime-benchmarks", + "pallet-asset-manager/runtime-benchmarks", + "pallet-assets/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-author-mapping/runtime-benchmarks", + "pallet-author-slot-filter/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-collective/runtime-benchmarks", + "pallet-conviction-voting/runtime-benchmarks", + "pallet-crowdloan-rewards/runtime-benchmarks", + "pallet-ethereum-xcm/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-identity/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-moonbeam-lazy-migrations/runtime-benchmarks", + "pallet-moonbeam-orbiters/runtime-benchmarks", + "pallet-multisig/runtime-benchmarks", + "pallet-parachain-staking/runtime-benchmarks", + "pallet-preimage/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-randomness/runtime-benchmarks", + "pallet-referenda/runtime-benchmarks", + "pallet-scheduler/runtime-benchmarks", + "pallet-society/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", + "pallet-treasury/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "pallet-whitelist/runtime-benchmarks", + "pallet-xcm-benchmarks", + "pallet-xcm-transactor/runtime-benchmarks", + "pallet-xcm/runtime-benchmarks", + "session-keys-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "xcm-builder/runtime-benchmarks", ] try-runtime = [ - "fp-self-contained/try-runtime", - "frame-executive/try-runtime", - "frame-system/try-runtime", - "frame-try-runtime", - "moonbeam-runtime-common/try-runtime", - "pallet-asset-manager/try-runtime", - "pallet-author-mapping/try-runtime", - "pallet-author-slot-filter/try-runtime", - "pallet-balances/try-runtime", - "pallet-collective/try-runtime", - "pallet-conviction-voting/try-runtime", - "pallet-democracy/try-runtime", - "pallet-maintenance-mode/try-runtime", - "pallet-migrations/try-runtime", - "pallet-moonbeam-lazy-migrations/try-runtime", - "pallet-parachain-staking/try-runtime", - "pallet-preimage/try-runtime", - "pallet-referenda/try-runtime", - "pallet-root-testing/try-runtime", - "pallet-scheduler/try-runtime", - "pallet-society/try-runtime", - "pallet-timestamp/try-runtime", - "pallet-whitelist/try-runtime", + "fp-self-contained/try-runtime", + "frame-executive/try-runtime", + "frame-system/try-runtime", + "frame-try-runtime", + "moonbeam-runtime-common/try-runtime", + "pallet-asset-manager/try-runtime", + "pallet-author-mapping/try-runtime", + "pallet-author-slot-filter/try-runtime", + "pallet-balances/try-runtime", + "pallet-collective/try-runtime", + "pallet-conviction-voting/try-runtime", + "pallet-maintenance-mode/try-runtime", + "pallet-migrations/try-runtime", + "pallet-moonbeam-lazy-migrations/try-runtime", + "pallet-parachain-staking/try-runtime", + "pallet-preimage/try-runtime", + "pallet-referenda/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-scheduler/try-runtime", + "pallet-society/try-runtime", + "pallet-timestamp/try-runtime", + "pallet-whitelist/try-runtime", ] diff --git a/runtime/moonriver/src/governance/democracy.rs b/runtime/moonriver/src/governance/democracy.rs deleted file mode 100644 index 823f2cc495..0000000000 --- a/runtime/moonriver/src/governance/democracy.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2019-2022 PureStake Inc. -// This file is part of Moonbeam. - -// Moonbeam is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Moonbeam is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Moonbeam. If not, see . - -//! Democracy config for Gov1 - -use super::councils::*; -use crate::*; - -// The purpose of this offset is to ensure that a democratic proposal will not apply in the same -// block as a round change. -const ENACTMENT_OFFSET: u32 = 300; - -impl pallet_democracy::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type EnactmentPeriod = ConstU32<{ 1 * DAYS + ENACTMENT_OFFSET }>; - type LaunchPeriod = ConstU32<{ 1 * DAYS }>; - type VotingPeriod = ConstU32<{ 5 * DAYS }>; - - type VoteLockingPeriod = ConstU32<{ 1 * DAYS }>; - type FastTrackVotingPeriod = ConstU32<{ 3 * HOURS }>; - type MinimumDeposit = ConstU128<{ 4 * currency::MOVR * currency::SUPPLY_FACTOR }>; - /// To decide what their next motion is. - type ExternalOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To have the next scheduled referendum be a straight majority-carries vote. - type ExternalMajorityOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To have the next scheduled referendum be a straight default-carries (NTB) vote. - type ExternalDefaultOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To allow a shorter voting/enactment period for external proposals. - type FastTrackOrigin = - pallet_collective::EnsureProportionAtLeast; - /// To instant fast track. - type InstantOrigin = - pallet_collective::EnsureProportionAtLeast; - // To cancel a proposal which has been passed. - type CancellationOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - // To cancel a proposal before it has been passed. - type CancelProposalOrigin = EitherOfDiverse< - EnsureRoot, - pallet_collective::EnsureProportionAtLeast, - >; - type BlacklistOrigin = EnsureRoot; - // Any single technical committee member may veto a coming council proposal, however they can - // only do it once and it lasts only for the cooloff period. - type VetoOrigin = pallet_collective::EnsureMember; - type CooloffPeriod = ConstU32<{ 7 * DAYS }>; - type Slash = (); - type InstantAllowed = ConstBool; - type Scheduler = Scheduler; - type MaxVotes = ConstU32<100>; - type PalletsOrigin = OriginCaller; - type WeightInfo = moonbeam_weights::pallet_democracy::WeightInfo; - type MaxProposals = ConstU32<100>; - type Preimages = Preimage; - type MaxDeposits = ConstU32<100>; - type MaxBlacklisted = ConstU32<100>; - type SubmitOrigin = EnsureSigned; -} diff --git a/runtime/moonriver/src/governance/mod.rs b/runtime/moonriver/src/governance/mod.rs index 0367cdf063..36a2c6be11 100644 --- a/runtime/moonriver/src/governance/mod.rs +++ b/runtime/moonriver/src/governance/mod.rs @@ -17,7 +17,6 @@ //! Governance configurations pub mod councils; -mod democracy; pub mod referenda; use super::*; diff --git a/runtime/moonriver/src/governance/origins.rs b/runtime/moonriver/src/governance/origins.rs index a8a5a53738..cbed5b9ecb 100644 --- a/runtime/moonriver/src/governance/origins.rs +++ b/runtime/moonriver/src/governance/origins.rs @@ -13,7 +13,6 @@ //! Custom origins for governance interventions. #![cfg_attr(not(feature = "std"), no_std)] - pub use custom_origins::*; #[frame_support::pallet] diff --git a/runtime/moonriver/src/lib.rs b/runtime/moonriver/src/lib.rs index b0c1f7e0f3..0faec14a56 100644 --- a/runtime/moonriver/src/lib.rs +++ b/runtime/moonriver/src/lib.rs @@ -898,8 +898,7 @@ impl Default for ProxyType { fn is_governance_precompile(precompile_name: &precompiles::PrecompileName) -> bool { matches!( precompile_name, - PrecompileName::DemocracyPrecompile - | PrecompileName::TreasuryCouncilInstance + PrecompileName::TreasuryCouncilInstance | PrecompileName::PreimagePrecompile | PrecompileName::ReferendaPrecompile | PrecompileName::ConvictionVotingPrecompile @@ -1010,7 +1009,6 @@ impl InstanceFilter for ProxyType { | RuntimeCall::ParachainSystem(..) | RuntimeCall::Timestamp(..) | RuntimeCall::ParachainStaking(..) - | RuntimeCall::Democracy(..) | RuntimeCall::Referenda(..) | RuntimeCall::Preimage(..) | RuntimeCall::ConvictionVoting(..) @@ -1026,8 +1024,7 @@ impl InstanceFilter for ProxyType { } ProxyType::Governance => matches!( c, - RuntimeCall::Democracy(..) - | RuntimeCall::Referenda(..) + RuntimeCall::Referenda(..) | RuntimeCall::Preimage(..) | RuntimeCall::ConvictionVoting(..) | RuntimeCall::TreasuryCouncilCollective(..) @@ -1136,7 +1133,6 @@ impl Contains for MaintenanceFilter { RuntimeCall::Treasury(_) => false, RuntimeCall::XcmTransactor(_) => false, RuntimeCall::EthereumXcm(_) => false, - RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, _ => true, } } @@ -1184,7 +1180,6 @@ impl Contains for NormalFilter { // Note: It is also assumed that EVM calls are only allowed through `Origin::Root` so // this can be seen as an additional security RuntimeCall::EVM(_) => false, - RuntimeCall::Democracy(pallet_democracy::Call::propose { .. }) => false, RuntimeCall::Treasury( pallet_treasury::Call::spend { .. } | pallet_treasury::Call::payout { .. } @@ -1442,7 +1437,7 @@ construct_runtime! { // Governance stuff. Scheduler: pallet_scheduler::{Pallet, Storage, Event, Call} = 60, - Democracy: pallet_democracy::{Pallet, Storage, Config, Event, Call} = 61, + // Democracy: 61, Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 62, ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 63, Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 64, @@ -1497,7 +1492,6 @@ mod benches { [pallet_assets, Assets] [pallet_parachain_staking, ParachainStaking] [pallet_scheduler, Scheduler] - [pallet_democracy, Democracy] [pallet_treasury, Treasury] [pallet_author_inherent, AuthorInherent] [pallet_author_slot_filter, AuthorFilter] @@ -1747,11 +1741,7 @@ mod tests { ); assert_eq!(STORAGE_BYTE_FEE, Balance::from(100 * MICROMOVR)); - // democracy minimums - assert_eq!( - get!(pallet_democracy, MinimumDeposit, u128), - Balance::from(4 * MOVR) - ); + // treasury minimums assert_eq!( get!(pallet_treasury, ProposalBondMinimum, u128), Balance::from(1 * MOVR) diff --git a/runtime/moonriver/src/precompiles.rs b/runtime/moonriver/src/precompiles.rs index ded6888483..8b8282f5a8 100644 --- a/runtime/moonriver/src/precompiles.rs +++ b/runtime/moonriver/src/precompiles.rs @@ -28,7 +28,6 @@ use pallet_evm_precompile_call_permit::CallPermitPrecompile; 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_identity::IdentityPrecompile; use pallet_evm_precompile_modexp::Modexp; @@ -118,11 +117,7 @@ type MoonriverPrecompilesAt = ( Erc20BalancesPrecompile, (CallableByContract, CallableByPrecompile), >, - PrecompileAt< - AddressU64<2051>, - DemocracyPrecompile, - (CallableByContract, CallableByPrecompile), - >, + RemovedPrecompileAt>, // DemocracyPrecompile PrecompileAt< AddressU64<2052>, XtokensPrecompile, diff --git a/runtime/moonriver/tests/integration_test.rs b/runtime/moonriver/tests/integration_test.rs index 05f9ff21df..acac9c321c 100644 --- a/runtime/moonriver/tests/integration_test.rs +++ b/runtime/moonriver/tests/integration_test.rs @@ -93,15 +93,6 @@ fn xcmp_queue_controller_origin_is_root() { ); } -#[test] -fn fast_track_available() { - assert!(moonriver_runtime::get!( - pallet_democracy, - InstantAllowed, - bool - )); -} - #[test] fn verify_pallet_prefixes() { fn is_pallet_prefix(name: &str) { @@ -128,7 +119,6 @@ fn verify_pallet_prefixes() { is_pallet_prefix::("ParachainStaking"); is_pallet_prefix::("MaintenanceMode"); is_pallet_prefix::("Scheduler"); - is_pallet_prefix::("Democracy"); is_pallet_prefix::( "OpenTechCommitteeCollective", ); @@ -413,7 +403,7 @@ fn verify_pallet_indices() { is_pallet_index::(52); // Governance is_pallet_index::(60); - is_pallet_index::(61); + // is_pallet_index::(61); Removed // Council // is_pallet_index::(70); Removed // is_pallet_index::(71); Removed @@ -2390,7 +2380,7 @@ fn precompile_existence() { fn removed_precompiles() { ExtBuilder::default().build().execute_with(|| { let precompiles = Precompiles::new(); - let removed_precompiles = [1025, 2062, 2063]; + let removed_precompiles = [1025, 2051, 2062, 2063]; for i in 1..3000 { let address = H160::from_low_u64_be(i); diff --git a/test/helpers/democracy-unlock-test-data.ts b/test/helpers/democracy-unlock-test-data.ts deleted file mode 100644 index 73d4bf9847..0000000000 --- a/test/helpers/democracy-unlock-test-data.ts +++ /dev/null @@ -1,906 +0,0 @@ -// editorconfig-checker-disable-file -export const votingOf = [ - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2000b2e7e8724ef5535c1bbf43375f3cbf7a665e2d602b1d79de3e239", - data: "0x00042f0000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200129692a48dac897ffe533f10dad2e5f484038bd7b0e6f11537b4bd", - data: "0x0008460000000081000040b2bac9e0191e020000000000004700000000810000a0dec5adc935360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200460800e262a9350192bd926197464a164d7258cedcd78f9ce7c9c1", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2004a15bb3b71194c6c7a836e4b3c0f91d0c35dafe99e16e34d1f43c5", - data: "0x00045400000000800000b2d3595bf006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200548c3fe2e00f4c1912b1cd0bec531703ef6beae4ba1b5c62f9b735", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2005a4780044b72a4e6bbe7112ad0f0aea6183d904a2cc044d277a2a8", - data: "0x000c3000000000800000ce8ebd02e15100000000000000004900000000800000d01309468e1501000000000000004c00000000800000d01309468e15010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200b411612b2f0b4f464d19bb970ff3a27d2f5404656c4915564dfa41", - data: "0x0004330000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200b9ecf3c38bb4301f9afe5929c95bfa4d3d04beb534c9327f096ee4", - data: "0x00044600000000800000c52ebca2b100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200c6106fc0b75d5f155903e5000ddc87310779e224f411ffdaf6a3bc", - data: "0x0004330000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200e46cec53e0cf682d3abcbb3edfc208f02ff5ecab69822bf93bc40f", - data: "0x0008320000000080000064a7b3b6e00d00000000000000004300000000810000c84e676dc11b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200ecc80e6c0085133777b5e94059adde594073b0c5177ea082fb1941", - data: "0x00045400000000820000f44482916345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c200fb675bc3aea120cd9d197873075c2291f724f8816d8aac6cdea6f1", - data: "0x00045400000000800000f44482916345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2012f50d6ef2187c9033d815f4fb30b2459a396e004c5a7ecfe30ec39", - data: "0x00083c00000000800000b2d3595bf00600000000000000003d00000000860000c52ebca2b100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2013084c315fd1a61ed389e24ce9094b333553b0c704788b5d78daa60", - data: "0x000c4000000000800000cdac4fdacd01000000000000000050000000008000008a5d78456301000000000000000051000000008000009e1869d02904000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c201423cc18cb27fe4d6686d3c83749cd20b441528f01ae516fceb74c3", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2014cd81a75d2acbff19d20170fd0694bf18afd007cb48edcf0395de3", - data: "0x00045400000000810000b2d3595bf006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2015489a00ff29a363b060960d683b56b8af32cbd926b432b3d9a2267", - data: "0x0004330000000080000026d05789b801000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c201606ba302e7ed4bd5dc8285cf6abfd3f037406441bff7ff10398bf4", - data: "0x0004330000000081000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20188a6f99a5b94782e62a19b5486d1f073b7012ed5ee90039ba40139", - data: "0x0004430000000085000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c201a05db72db3fc1fc47399c64418c34b6bfd2516e6fcce80cb5395ef", - data: "0x00042e000000008600007a22c1c8b122000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c201ce17557790db52a20d39edc78ffae5cb24a63551783b24b6eca00a", - data: "0x0004340000000082000010632d5ec76b050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c201e4572b3dfdc3df2a160af19cfd6a82fee726367be1d23d3f2ff039", - data: "0x0004330000000086000084e2506ce67c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c201e936ba8308dd854af4658d6794f7c7cd5d4a1fcc0fd6188f18930f", - data: "0x0004330000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2020870bae8d911af33c0389405e00c821a917235ff21a0d782b6f93d", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2022070cd502cd36c087f55714719d955f696e5d2dc87af75105d81ce", - data: "0x0004470000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2025b50a0ac04eb818feaad8fcea4fe396a60be375e242eb0cd9fe7d3", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c202646255ac1e878fb3f7d9a75b7779e6d3cb459f0e492ed2c6027bb1", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20264df4f4f4db910a532e9c59aa9ca1ca6832240f2ad52e329dccacb", - data: "0x00102d0000000080000064a7b3b6e00d0000000000000000310000000085000064a7b3b6e00d0000000000000000430000000080000064a7b3b6e00d00000000000000005b0000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20269f92411f930916f66e1bf5bb6873c2dde9efa11ac4478faf96617", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20283941b88acc27ca54c60bd2294a6c1c86e57787981afacf9ef86e7", - data: "0x001c330000000080000064a7b3b6e00d00000000000000003c0000000080000064a7b3b6e00d00000000000000003d00000000800000f444829163450000000000000000420000000080000064a7b3b6e00d0000000000000000430000000080000064a7b3b6e00d00000000000000005400000000800000c84e676dc11b00000000000000005700000000810000c84e676dc11b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2029289c2777842cbcf80ac8088d7c33a9ef53046d753a2fb217a340c", - data: "0x000440000000008100008a5d78456301000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2029b2ff3cd513fc5acc17bb304c19f627d391c0a4ff35397a8eb9768", - data: "0x00084000000000800080c6a47e8d030000000000000000004100000000800080c6a47e8d0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c202ab7f971d816ee4394a90aca22ef2af249944c996cd6ab744990d18", - data: "0x000443000000008000008a5d78456301000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c202c7b27ae7a86b986d53a199f8af4b0cb4bebf4279963748ef1a388f", - data: "0x0004540000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c202d4489d24c957257d1d8223945913e82477fe07b5dfd9431e0e4a39", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c202f7dcecefd4790c651817b6b7464b61c6c6ef87da2bc84ee0e64377", - data: "0x00045b000000008000004bcd6acc8601000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20336cab20a4a4a0d333c5dba8179822056f2289bdede1b53a863f577", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c203445dc30f0605bd0560d338cc84a4137dd154ca4e98b29dc39f1da8", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2034a06e74d7b483735ef64388c456c7ab4ac0c649b51349b50962116", - data: "0x0004670000000080000014bbf08ac602000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2035f3b63ff60619b02d32f820f296cd4a4e8d7aae30ceec85c858737", - data: "0x000433000000008000008a5d78456301000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2037641964f522e110198d3053a69c3f977bb1943bc95a0ffa7777474", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20384526a06c83e7308943873222ce63ec48f8907757928dcb06af388", - data: "0x00045400000000800080c6a47e8d0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2039992d3130941734fd8da9e304896f8b2660f846763d9f0ffb2d11a", - data: "0x00043300000000800000c16ff2862300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c203d867d44946b2f42dc5221cd5e02950e151f2f8c5f05fdccd5152c1", - data: "0x0004540000000081000010632d5ec76b050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2041ecc8ed54e2f3f75313be03410e32b20cf890ac7321c89c221e289", - data: "0x0004330000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2043b77510e7ebe29f13b49032f1202b50d02753a8d2a0ad68e9d0262", - data: "0x0004400000000081000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204521d6092af25fcd75229819c7f6a664ea443e40bfdef806d03af75", - data: "0x00343200000000860000e8890423c78a00000000000000003300000000850000f444829163450000000000000000340000000081000064a7b3b6e00d00000000000000003500000000810000c84e676dc11b0000000000000000380000000081000064a7b3b6e00d0000000000000000390000000082000064a7b3b6e00d00000000000000003c0000000080000064a7b3b6e00d00000000000000003f0000000000000064a7b3b6e00d00000000000000004000000000840000c84e676dc11b00000000000000004100000000840000c84e676dc11b0000000000000000420000000081000064a7b3b6e00d0000000000000000430000000082000064a7b3b6e00d0000000000000000490000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2047d3abdbf1f7d60bbf3af41480ec29595fa00a0160b4b24d9bcdbb5", - data: "0x00045b00000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20484796e75b48766fea4d4b1ea32f7e494c14f1491c9b2c45b20ca5c", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2048a34ae639cc26febe90ce0eadf76bf484d1853fbbff8dd6207804a", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2048c60d5e125e552dc0cd73fbebd5e5a10227d982fb9bc212b80fccc", - data: "0x00043100000000800000bc93e9fe2461000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204a7025466366961ac3291c17cf065138e4fa7cbb528d331cac0b2b5", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204bec2da68699a6c17857a03f5b35b3fd12fef1baee4ee9316483f08", - data: "0x00045f0000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204ca797e28135e17ac84102e841ba70e6e9c70424a93de388fdcfd10", - data: "0x0008560000000080000014801f4769b40000000000000000570000000080000014801f4769b4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204cb4ccc93fbb00bd4123a5d361ead832058493dab34210aa4a9b152", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204e249978d7b196e304e10a79bcf81efc0280e08b931bb3f39ca72be", - data: "0x0004330000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204e7b8afd5568923e2b13924ea708473e6c5f4c159617cd7794520a1", - data: "0x00045b00000000800000570ac81f3103000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c204f7c2d3b3966e910dfd2741fa7f5e6a22b1c7fb13c3554550ecc9d5", - data: "0x00043a0000000080000080f64ae1c7022d1500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20507712ea70ffa163fe7c089077e29b2a1d258533f6ad718e0f9f05e", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c205144d5f7c943fb88f21947e92d5f723455022859525a2ff106f8b67", - data: "0x000c2d00000000860000c16ff286230000000000000000002e00000000860000c16ff286230000000000000000003100000000860000c16ff2862300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2051e246cf450997b7069a47f7e46b9d4518d73ce03418b470522c920", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20523934df1fc2da935df63a1fb1ab3d8ae9691c31da62a09f25eee58", - data: "0x0004690000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20531d09eef6977c16dfd1642bea5b6d4a6de6837f0221f53bd2ee960", - data: "0x00043000000000800000c84e676dc11b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2053bacd1859274407b30bc1c35a29f2a998a854f43f7fae9d780abf7", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20572fc8c072680111b45860777d004894a9f3b2c50fefcc323633859", - data: "0x0004330000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20577ec624d53fa5b2012e7d3dd25ca77bf5e5e3a9b516345e65e1769", - data: "0x000431000000008000008a5d78456301000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2057c51d0c64fbadcfb7d9a1163040658ef2d281ff423b6ed746566aa", - data: "0x00043300000000810000b0b302ffdae1540600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20593321d2118e3b27800a4798ef98b05c4c929e4596ee13acb00f050", - data: "0x0004330000000080000040bd8b5b936b6c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2059964ac693812f6e4b95ce64959a9f5ff306e79e0bda764067cda54", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2059a58336de0475f5e22a22532e3d4e3c633a1dcbd6884cb2ec7a74d", - data: "0x00044d00000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c205a569b6f2b2cdfadf994fcc102ecca4379c6722dcce641d984887bd", - data: "0x0004600000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c205c952028edcd828576eb27cbf54518d3de5a38ea7746ef6a9b8b5e6", - data: "0x00043300000000800000c16ff2862300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c205e5f52af5b563938e2798faa648fae0ca936d93952c25395899008c", - data: "0x0004430000000081000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c205e852597494c17b571c9b09afe7248421563e7958459413b3af98fc", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206113bde1a8a564ecfc6311963155d645aa215be71352d5ffbe9c4d6", - data: "0x000440000000008000407a10f35a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2062c4903b552252afc35f54b6ffa820bccc833bcb3b0308f6b6e5cd3", - data: "0x00044000000000800000c16ff2862300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20655f4fd72371a8a054becf10c79afa4e60f75b187837be9fb83867d", - data: "0x00044200000000800000c16ff2862300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2065b36fd363f654645e2feb81bd6630c3b136e489674c8b61170eb22", - data: "0x000857000000008600002cf61a24a22900000000000000005b0000000086000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2068ffed3f1b6eba4b16b95047bf3e393e655e206e503011c08f7f1c1", - data: "0x0004570000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206a0c9f35692480e6d81bfbf7e9f19f542a52d698160b58ed5daa1e2", - data: "0x000443000000008300002cf61a24a229000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206b27a3dec431cba20f783b6fdd2b7c8fc129280080f4a378ebff851", - data: "0x00046400000000800000c4588bd7f15a010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206bb45ed8fef05d7c6cf1d4d2b4e1897b4de35536d8459f5b3fca3f6", - data: "0x0004570000000080000088b116afe3b5020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206bd27700dfca793714f61bc4956e563f9b20879940a4c9987af5acb", - data: "0x00044000000000840000e8890423c78a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206ca8faa3f82e92e68a2ad56fd4c37e8d982f1f0bf6d09a1ee23283c", - data: "0x0004430000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c206f14e311f3abbd9e9907f72ac682df9573a936a272d0338534e3495", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20718ae434a9675ecffedeab90b1763aa21a6c1cababeb99b7cfa93a5", - data: "0x00045000000000000000e8890423c78a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2071eed56f9015e0b166b0e967bf17571fc2df38064a36ed6871d6118", - data: "0x000440000000008000008a5d78456301000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2072d89ece67bdebef88bffdd307b78eb5fc18e02dc70648c32140d86", - data: "0x00044300000000800000e8890423c78a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207562ebe2f5b47cabba779592fbf91b6f6613492856d13e9e64c10ca", - data: "0x0010330000000081000064a7b3b6e00d0000000000000000400000000080000064a7b3b6e00d0000000000000000410000000080000064a7b3b6e00d0000000000000000430000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c20766dad8d0cd64ecdc4e2b6ab52552537205bb565c0af7981610236f", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2076bf15672f501984a43c16107591ae5ec904e584ed4bb05386f98f7", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c2078e4d71ba3a1a4762fbe42036e76921947dee38cba08b1265710851", - data: "0x00044600000000800000c84e676dc11b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207a519fbe8e53431ca19d045317224c3bb84af1a403f70bd3589ef56", - data: "0x00042e0000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207d1c85114953d043c8e741c0a2cb4b8d5cbb1ead482cfdf87fdd66f", - data: "0x000c530000000081000010632d5ec76b0500000000000000540000000081000010632d5ec76b0500000000000000550000000081000010632d5ec76b050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207d7e36637db6a6b1d8308ba3086c4b3108c7de9bbb93a53d7372b9c", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207e1c1ca61299d693837af146dddf3f0b8acbd8ca716786db89764ee", - data: "0x0004310000000081000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207eacf014ff024ce823c3cdbdf033b0cc3153eaac3cf45882279f153", - data: "0x00045600000000860000b2d3595bf006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207ee8744bbc02185a046aa316a897670967fe6105e6258a1a933599f", - data: "0x0004540000000080000064a7b3b6e00d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207ef3c8caa332c3e602604c910870a7c5c189f6c0ab60d6f13c5880d", - data: "0x00043300000000000000f44482916345000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, - { - key: "0xf2794c22e353e9a839f12faab03a911be470c6afbbbc027eb288ade7595953c207f018e75b92d78ef4de4067706feb9d81518812d41a1542b3c36bc5", - data: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - }, -]; -// editorconfig-checker-disable-file -export const locks = [ - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc68b0688398281e46195d630e3fccba9ec35c1bbf43375f3cbf7a665e2d602b1d79de3e239", - account: "0x35c1bbf43375f3cbf7a665e2d602b1d79de3e239", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc654bedfa34979a510af978a74fab804e97ffe533f10dad2e5f484038bd7b0e6f11537b4bd", - account: "0x7ffe533f10dad2e5f484038bd7b0e6f11537b4bd", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6c99de1f26c305a0bd5e5a9571bf7fb630192bd926197464a164d7258cedcd78f9ce7c9c1", - account: "0x0192bd926197464a164d7258cedcd78f9ce7c9c1", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc610c712f8cf112e4d5ef2e30151b9e18b6c7a836e4b3c0f91d0c35dafe99e16e34d1f43c5", - account: "0x6c7a836e4b3c0f91d0c35dafe99e16e34d1f43c5", - data: "0x0464656d6f637261630000b2d3595bf006000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6215589152d0fc174bfd7a230db5c82411912b1cd0bec531703ef6beae4ba1b5c62f9b735", - account: "0x1912b1cd0bec531703ef6beae4ba1b5c62f9b735", - data: "0x0473746b6e6764656ca017731a0b5561d1020400000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6cc9b488ad1e0e457188f9c5fa5c13b62e6bbe7112ad0f0aea6183d904a2cc044d277a2a8", - account: "0xe6bbe7112ad0f0aea6183d904a2cc044d277a2a8", - data: "0x0864656d6f637261630000d01309468e1501000000000000000173746b6e6764656c9591f39864bf1e378f0000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc693ec99eba0b76a3e5ac2f545fca19953464d19bb970ff3a27d2f5404656c4915564dfa41", - account: "0x464d19bb970ff3a27d2f5404656c4915564dfa41", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6254f00e60af4b3449f12edef65678cc51f9afe5929c95bfa4d3d04beb534c9327f096ee4", - account: "0x1f9afe5929c95bfa4d3d04beb534c9327f096ee4", - data: "0x0864656d6f637261630000c52ebca2b10000000000000000000173746b6e6764656c467972793ba70b8c060000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc66e03693fcba30b27b3cbe897fda47251155903e5000ddc87310779e224f411ffdaf6a3bc", - account: "0x155903e5000ddc87310779e224f411ffdaf6a3bc", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc603728d8474a9873eafde545cc0eb7d222d3abcbb3edfc208f02ff5ecab69822bf93bc40f", - account: "0x2d3abcbb3edfc208f02ff5ecab69822bf93bc40f", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b9f54105ee22f5eda44dde5cb398ef743777b5e94059adde594073b0c5177ea082fb1941", - account: "0x3777b5e94059adde594073b0c5177ea082fb1941", - data: "0x0464656d6f637261630000f44482916345000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6a1977b1e129c0cf03d4e7184ed107c06cd9d197873075c2291f724f8816d8aac6cdea6f1", - account: "0xcd9d197873075c2291f724f8816d8aac6cdea6f1", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6668a25e9e31e94b30df27bf29d5a016d033d815f4fb30b2459a396e004c5a7ecfe30ec39", - account: "0x033d815f4fb30b2459a396e004c5a7ecfe30ec39", - data: "0x0464656d6f637261630000b2d3595bf006000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc675a7d1888f203fb1b833d2ab8bd86674ed389e24ce9094b333553b0c704788b5d78daa60", - account: "0xed389e24ce9094b333553b0c704788b5d78daa60", - data: "0x0464656d6f6372616300009e1869d02904000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6dc9220d1a26f6abdb05686e07536896dd6686d3c83749cd20b441528f01ae516fceb74c3", - account: "0xd6686d3c83749cd20b441528f01ae516fceb74c3", - data: "0x0473746b6e6764656c98bfc2fe0ab50140240400000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f2fd5b54672c15355050b75d2c05f97af19d20170fd0694bf18afd007cb48edcf0395de3", - account: "0xf19d20170fd0694bf18afd007cb48edcf0395de3", - data: "0x0464656d6f637261630000b2d3595bf006000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6d696123dddf7b5dea05d07fbc2f25d0f3b060960d683b56b8af32cbd926b432b3d9a2267", - account: "0x3b060960d683b56b8af32cbd926b432b3d9a2267", - data: "0x0464656d6f63726163000026d05789b801000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6044bd6087323b2acfc7a352c44ba43e0d5dc8285cf6abfd3f037406441bff7ff10398bf4", - account: "0xd5dc8285cf6abfd3f037406441bff7ff10398bf4", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b7e1d3785f026211200ed5b573f28bd32e62a19b5486d1f073b7012ed5ee90039ba40139", - account: "0x2e62a19b5486d1f073b7012ed5ee90039ba40139", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6417b8a2dbdf1454398ad0b95c03f683cc47399c64418c34b6bfd2516e6fcce80cb5395ef", - account: "0xc47399c64418c34b6bfd2516e6fcce80cb5395ef", - data: "0x0864656d6f6372616300007a22c1c8b12200000000000000000173746b6e6764656c4c0e6dee14e86c88480000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6c9c1470d5f7dd4c19e70c83a78ad2bb3a20d39edc78ffae5cb24a63551783b24b6eca00a", - account: "0xa20d39edc78ffae5cb24a63551783b24b6eca00a", - data: "0x0464656d6f63726163000010632d5ec76b050000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b52f17edf3f79a84e1ba7c9e190acf372a160af19cfd6a82fee726367be1d23d3f2ff039", - account: "0x2a160af19cfd6a82fee726367be1d23d3f2ff039", - data: "0x0464656d6f63726163000084e2506ce67c000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6e6ddc8d93f39ce669849b68ee1e9909f4af4658d6794f7c7cd5d4a1fcc0fd6188f18930f", - account: "0x4af4658d6794f7c7cd5d4a1fcc0fd6188f18930f", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc689f6ed98969fd44d0e40f7fc92a85d7f33c0389405e00c821a917235ff21a0d782b6f93d", - account: "0x33c0389405e00c821a917235ff21a0d782b6f93d", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc63b94d5958a7caa1b36af5c2294611c42087f55714719d955f696e5d2dc87af75105d81ce", - account: "0x087f55714719d955f696e5d2dc87af75105d81ce", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6ba5a095a0637389f3be149284be04f378feaad8fcea4fe396a60be375e242eb0cd9fe7d3", - account: "0x8feaad8fcea4fe396a60be375e242eb0cd9fe7d3", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc632dfd514299a33e16bb11d1e364e58aab3f7d9a75b7779e6d3cb459f0e492ed2c6027bb1", - account: "0xb3f7d9a75b7779e6d3cb459f0e492ed2c6027bb1", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b564e9ad9e00b0afb85b3b01a2e70c19a532e9c59aa9ca1ca6832240f2ad52e329dccacb", - account: "0xa532e9c59aa9ca1ca6832240f2ad52e329dccacb", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc60f8b59fc16d23389f33f0bfdcc9f30e96f66e1bf5bb6873c2dde9efa11ac4478faf96617", - account: "0x6f66e1bf5bb6873c2dde9efa11ac4478faf96617", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc657344b4d06473c9023b19fadb9c0a183a54c60bd2294a6c1c86e57787981afacf9ef86e7", - account: "0xa54c60bd2294a6c1c86e57787981afacf9ef86e7", - data: "0x0864656d6f637261630000f444829163450000000000000000017079636f6e766f74000064a7b3b6e00d000000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6c972aca238e95439d38c0c7ee4e9513acf80ac8088d7c33a9ef53046d753a2fb217a340c", - account: "0xcf80ac8088d7c33a9ef53046d753a2fb217a340c", - data: "0x0464656d6f6372616300008a5d78456301000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b8beaa5b499c7491713bf3fd21f6557dacc17bb304c19f627d391c0a4ff35397a8eb9768", - account: "0xacc17bb304c19f627d391c0a4ff35397a8eb9768", - data: "0x0464656d6f637261630080c6a47e8d0300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc69a322ff57c119a47dfc3d3c2ce65056a394a90aca22ef2af249944c996cd6ab744990d18", - account: "0x394a90aca22ef2af249944c996cd6ab744990d18", - data: "0x0464656d6f6372616300008a5d78456301000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc674c066df53c6e5feb6e2def552f273116d53a199f8af4b0cb4bebf4279963748ef1a388f", - account: "0x6d53a199f8af4b0cb4bebf4279963748ef1a388f", - data: "0x0464656d6f6372616300008a5d78456301000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc69f3302d17f862318fd8de3e7b39059b17d1d8223945913e82477fe07b5dfd9431e0e4a39", - account: "0x7d1d8223945913e82477fe07b5dfd9431e0e4a39", - data: "0x0473746b6e6764656c86f79a428fcf6150090000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6db82b0d05d1250076180ece185977275651817b6b7464b61c6c6ef87da2bc84ee0e64377", - account: "0x651817b6b7464b61c6c6ef87da2bc84ee0e64377", - data: "0x0464656d6f6372616300004bcd6acc8601000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f23397a5fd631f5f8b3cdf92eec62175333c5dba8179822056f2289bdede1b53a863f577", - account: "0x333c5dba8179822056f2289bdede1b53a863f577", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc615fffe2150fefa13e0d3a5ad9fdbac820560d338cc84a4137dd154ca4e98b29dc39f1da8", - account: "0x0560d338cc84a4137dd154ca4e98b29dc39f1da8", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc675d5fe901f7e1af04f8a89eb90a20f2735ef64388c456c7ab4ac0c649b51349b50962116", - account: "0x35ef64388c456c7ab4ac0c649b51349b50962116", - data: "0x0464656d6f63726163000014bbf08ac602000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc66c9787b4c437d4826e09a6892628eb9502d32f820f296cd4a4e8d7aae30ceec85c858737", - account: "0x02d32f820f296cd4a4e8d7aae30ceec85c858737", - data: "0x0464656d6f6372616300008a5d78456301000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6eb80f049aace2e2f8b9057d4acaa8efc0198d3053a69c3f977bb1943bc95a0ffa7777474", - account: "0x0198d3053a69c3f977bb1943bc95a0ffa7777474", - data: "0x0473746b6e67636f6c000040b2bac9e0191e0200000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc628bd1e36bb0d5410d77c8868cff85b5108943873222ce63ec48f8907757928dcb06af388", - account: "0x08943873222ce63ec48f8907757928dcb06af388", - data: "0x0464656d6f637261630080c6a47e8d0300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc679027ba1f66121006d5cd9c2538a6ea74fd8da9e304896f8b2660f846763d9f0ffb2d11a", - account: "0x4fd8da9e304896f8b2660f846763d9f0ffb2d11a", - data: "0x0464656d6f637261630000c16ff2862300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f913d40bd09125eb4671bde5b4ff26b92dc5221cd5e02950e151f2f8c5f05fdccd5152c1", - account: "0x2dc5221cd5e02950e151f2f8c5f05fdccd5152c1", - data: "0x0873746b6e6764656c71bad32f1ccae33c3a000000000000000264656d6f63726163000010632d5ec76b050000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6a1136f33b613f2db5da419412b70263975313be03410e32b20cf890ac7321c89c221e289", - account: "0x75313be03410e32b20cf890ac7321c89c221e289", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b7f6797097d7d4d6d54bd5c97acc7b9ff13b49032f1202b50d02753a8d2a0ad68e9d0262", - account: "0xf13b49032f1202b50d02753a8d2a0ad68e9d0262", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6d71646d33beeaa7dcecdeffc7770a9f0d75229819c7f6a664ea443e40bfdef806d03af75", - account: "0xd75229819c7f6a664ea443e40bfdef806d03af75", - data: "0x0464656d6f637261630000e8890423c78a000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6854c52b390c75fe547f4825e9f478935bbf3af41480ec29595fa00a0160b4b24d9bcdbb5", - account: "0xbbf3af41480ec29595fa00a0160b4b24d9bcdbb5", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc63c60722e3c97c697ad2675c52a7cf1e1fea4d4b1ea32f7e494c14f1491c9b2c45b20ca5c", - account: "0xfea4d4b1ea32f7e494c14f1491c9b2c45b20ca5c", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc63803cff8ac2d27a25751d0cdc3146223ebe90ce0eadf76bf484d1853fbbff8dd6207804a", - account: "0xebe90ce0eadf76bf484d1853fbbff8dd6207804a", - data: "0x0473746b6e6764656c6f442a709c0af3c3960100000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6fc71319d4bceb2154d31302eec68b6d6dc0cd73fbebd5e5a10227d982fb9bc212b80fccc", - account: "0xdc0cd73fbebd5e5a10227d982fb9bc212b80fccc", - data: "0x0464656d6f63726163000014bbf08ac602000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b2a39e533215834f8727d0b1147bc6f3ac3291c17cf065138e4fa7cbb528d331cac0b2b5", - account: "0xac3291c17cf065138e4fa7cbb528d331cac0b2b5", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc66590bcfbe2a113a268abbefc61759d4d17857a03f5b35b3fd12fef1baee4ee9316483f08", - account: "0x17857a03f5b35b3fd12fef1baee4ee9316483f08", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc66eeaf89c2788c1af7c0123128391c4e2ac84102e841ba70e6e9c70424a93de388fdcfd10", - account: "0xac84102e841ba70e6e9c70424a93de388fdcfd10", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc69649c842a466736baa58dfc46b6a8647d4123a5d361ead832058493dab34210aa4a9b152", - account: "0xd4123a5d361ead832058493dab34210aa4a9b152", - data: "0x0473746b6e6764656c3f6f2295380dfc1a0c0000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f14f4ff825f28a256603a076419ef3cc304e10a79bcf81efc0280e08b931bb3f39ca72be", - account: "0x304e10a79bcf81efc0280e08b931bb3f39ca72be", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6becaa2e2de46c7c7e65206c9e64a6e6ae2b13924ea708473e6c5f4c159617cd7794520a1", - account: "0xe2b13924ea708473e6c5f4c159617cd7794520a1", - data: "0x0464656d6f637261630000570ac81f3103000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6d80359c8839aab3747165569d0fbf9080dfd2741fa7f5e6a22b1c7fb13c3554550ecc9d5", - account: "0x0dfd2741fa7f5e6a22b1c7fb13c3554550ecc9d5", - data: "0x0464656d6f63726163000080f64ae1c7022d1500000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc65bf6ae1979f1f25eacb5fa764d2e93a33fe7c089077e29b2a1d258533f6ad718e0f9f05e", - account: "0x3fe7c089077e29b2a1d258533f6ad718e0f9f05e", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6e96246248bde21dc47a0269c497965b68f21947e92d5f723455022859525a2ff106f8b67", - account: "0x8f21947e92d5f723455022859525a2ff106f8b67", - data: "0x0464656d6f637261630000c16ff2862300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc64392d7212747d3848afe9d2ad890ab3f7069a47f7e46b9d4518d73ce03418b470522c920", - account: "0x7069a47f7e46b9d4518d73ce03418b470522c920", - data: "0x0473746b6e6764656c0000bc7d47dbbfbd630300000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc666c2464c5ac6de7f34534fc9f68b3d9935df63a1fb1ab3d8ae9691c31da62a09f25eee58", - account: "0x35df63a1fb1ab3d8ae9691c31da62a09f25eee58", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f66e54c2572a7c9a2faa78c056dd342b6dfd1642bea5b6d4a6de6837f0221f53bd2ee960", - account: "0x6dfd1642bea5b6d4a6de6837f0221f53bd2ee960", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc61d82b5f1f427904500d09e201c6ddcbd7b30bc1c35a29f2a998a854f43f7fae9d780abf7", - account: "0x7b30bc1c35a29f2a998a854f43f7fae9d780abf7", - data: "0x0473746b6e6764656cad122ea0bcc325d0d50b00000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc62f321f2bbc0f0e9501d83453212178411b45860777d004894a9f3b2c50fefcc323633859", - account: "0x1b45860777d004894a9f3b2c50fefcc323633859", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc675f4f1f50d75a0c77cdf149f6ccb696e2012e7d3dd25ca77bf5e5e3a9b516345e65e1769", - account: "0x2012e7d3dd25ca77bf5e5e3a9b516345e65e1769", - data: "0x0464656d6f6372616300008a5d78456301000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f953efef0935e679c5d7f28efb937b15fb7d9a1163040658ef2d281ff423b6ed746566aa", - account: "0xfb7d9a1163040658ef2d281ff423b6ed746566aa", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6322c3368f036dbb96a7c42507ef6b0447800a4798ef98b05c4c929e4596ee13acb00f050", - account: "0x7800a4798ef98b05c4c929e4596ee13acb00f050", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc638fe473fa90c617da4783a44a73276a0e4b95ce64959a9f5ff306e79e0bda764067cda54", - account: "0xe4b95ce64959a9f5ff306e79e0bda764067cda54", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc68528d53a3370c46695e48abb3335cd195e22a22532e3d4e3c633a1dcbd6884cb2ec7a74d", - account: "0x5e22a22532e3d4e3c633a1dcbd6884cb2ec7a74d", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f6c5f6350f78d7367c9a696fef855dbcdf994fcc102ecca4379c6722dcce641d984887bd", - account: "0xdf994fcc102ecca4379c6722dcce641d984887bd", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6b69b9db3e8301ab159c1933c4a2a0ddf576eb27cbf54518d3de5a38ea7746ef6a9b8b5e6", - account: "0x576eb27cbf54518d3de5a38ea7746ef6a9b8b5e6", - data: "0x0464656d6f637261630000c16ff2862300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc61325d85e3aff7959419258a124937fb18e2798faa648fae0ca936d93952c25395899008c", - account: "0x8e2798faa648fae0ca936d93952c25395899008c", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc64e844b01e2e2310ef3b43d25eafa8e1a571c9b09afe7248421563e7958459413b3af98fc", - account: "0x571c9b09afe7248421563e7958459413b3af98fc", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc682126b7fb1d993b6ef1ae9c57237bb29cfc6311963155d645aa215be71352d5ffbe9c4d6", - account: "0xcfc6311963155d645aa215be71352d5ffbe9c4d6", - data: "0x0464656d6f6372616300407a10f35a0000000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6e71c382c8edb9a5abc6fbb02e030673cfc35f54b6ffa820bccc833bcb3b0308f6b6e5cd3", - account: "0xfc35f54b6ffa820bccc833bcb3b0308f6b6e5cd3", - data: "0x0464656d6f637261630000c16ff2862300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc61d8d22095583348019a15cdbf7308827054becf10c79afa4e60f75b187837be9fb83867d", - account: "0x054becf10c79afa4e60f75b187837be9fb83867d", - data: "0x0464656d6f637261630000c16ff2862300000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc60b9d242c9850797e08dfdfbc1bf162b145e2feb81bd6630c3b136e489674c8b61170eb22", - account: "0x45e2feb81bd6630c3b136e489674c8b61170eb22", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc69f4f3ca7b4271f31599c64ce9e1753eeb16b95047bf3e393e655e206e503011c08f7f1c1", - account: "0xb16b95047bf3e393e655e206e503011c08f7f1c1", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc63fc447a530e8da4fc409fed2fe0b578c6d81bfbf7e9f19f542a52d698160b58ed5daa1e2", - account: "0x6d81bfbf7e9f19f542a52d698160b58ed5daa1e2", - data: "0x0464656d6f6372616300002cf61a24a229000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc641d60d575e3f65188e2ad69ddcbc605820f783b6fdd2b7c8fc129280080f4a378ebff851", - account: "0x20f783b6fdd2b7c8fc129280080f4a378ebff851", - data: "0x0873746b6e6764656c0000601669c083787b010000000000000264656d6f637261630000c4588bd7f15a010000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6552f6581833b0756eda911bf194d2b28c6cf1d4d2b4e1897b4de35536d8459f5b3fca3f6", - account: "0xc6cf1d4d2b4e1897b4de35536d8459f5b3fca3f6", - data: "0x0464656d6f63726163000088b116afe3b5020000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6923f33adda753a1b8a03ca975fee9661714f61bc4956e563f9b20879940a4c9987af5acb", - account: "0x714f61bc4956e563f9b20879940a4c9987af5acb", - data: "0x0464656d6f637261630000e8890423c78a000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6d8d5535b80cfee0d6e48dddb2d0e663a68a2ad56fd4c37e8d982f1f0bf6d09a1ee23283c", - account: "0x68a2ad56fd4c37e8d982f1f0bf6d09a1ee23283c", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc625ef5c1da69419d8f70f27dc9311605ae9907f72ac682df9573a936a272d0338534e3495", - account: "0xe9907f72ac682df9573a936a272d0338534e3495", - data: "0x0473746b6e6764656c000023b213b82742270000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc680d346450ca6c03718565556b838d913ffedeab90b1763aa21a6c1cababeb99b7cfa93a5", - account: "0xffedeab90b1763aa21a6c1cababeb99b7cfa93a5", - data: "0x0464656d6f637261630000e8890423c78a000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6ca0f1b6eb0899d3fbcce63223c010d57166b0e967bf17571fc2df38064a36ed6871d6118", - account: "0x166b0e967bf17571fc2df38064a36ed6871d6118", - data: "0x0464656d6f6372616300008a5d78456301000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc65b4f836ebfce4a10715a12ab5f221c4ff88bffdd307b78eb5fc18e02dc70648c32140d86", - account: "0xf88bffdd307b78eb5fc18e02dc70648c32140d86", - data: "0x0464656d6f637261630000e8890423c78a000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc65967f4551090fd2d096f8ff4ded8d7c1bba779592fbf91b6f6613492856d13e9e64c10ca", - account: "0xbba779592fbf91b6f6613492856d13e9e64c10ca", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc663e659797cc4421c64484f8f31ea46b4dc4e2b6ab52552537205bb565c0af7981610236f", - account: "0xdc4e2b6ab52552537205bb565c0af7981610236f", - data: "0x00", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6ab56e941edc177bb98031504d2d416664a43c16107591ae5ec904e584ed4bb05386f98f7", - account: "0x4a43c16107591ae5ec904e584ed4bb05386f98f7", - data: "0x0473746b6e6764656c000022285f72ac10480200000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6f02c6ed4f1ba82ce01e817b06e62f45862fbe42036e76921947dee38cba08b1265710851", - account: "0x62fbe42036e76921947dee38cba08b1265710851", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc65865ec7cde96f55322ea45799e77c77dca19d045317224c3bb84af1a403f70bd3589ef56", - account: "0xca19d045317224c3bb84af1a403f70bd3589ef56", - data: "0x0464656d6f63726163000064a7b3b6e00d000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc609e66e6b7729a9a91c71a728856812963c8e741c0a2cb4b8d5cbb1ead482cfdf87fdd66f", - account: "0x3c8e741c0a2cb4b8d5cbb1ead482cfdf87fdd66f", - data: "0x0464656d6f63726163000010632d5ec76b050000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc69a00c704fda2168df421ee5a9ddb9af91d8308ba3086c4b3108c7de9bbb93a53d7372b9c", - account: "0x1d8308ba3086c4b3108c7de9bbb93a53d7372b9c", - data: "0x0473746b6e6764656c1b968a949c7f92e7ab0000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc67214a27015c703b02cfbb2ae0fbd96a93837af146dddf3f0b8acbd8ca716786db89764ee", - account: "0x3837af146dddf3f0b8acbd8ca716786db89764ee", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6615333f9538b966e4e31eda07ad9ed5a823c3cdbdf033b0cc3153eaac3cf45882279f153", - account: "0x823c3cdbdf033b0cc3153eaac3cf45882279f153", - data: "0x0464656d6f637261630000b2d3595bf006000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6877db100e0c90217bad1fe035a22ebc7a046aa316a897670967fe6105e6258a1a933599f", - account: "0xa046aa316a897670967fe6105e6258a1a933599f", - data: "0x0473746b6e6764656cc180f49e512564c8780000000000000002", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc63dc964ac25f6f3c4685e8aa3e47270a5602604c910870a7c5c189f6c0ab60d6f13c5880d", - account: "0x602604c910870a7c5c189f6c0ab60d6f13c5880d", - data: "0x0464656d6f637261630000f44482916345000000000000000001", - }, - { - key: "0xc2261276cc9d1f8598ea4b6a74b15c2f218f26c73add634897550b4003b26bc6d75eacf18ce862dcc8810a164b577f3bf4de4067706feb9d81518812d41a1542b3c36bc5", - account: "0xf4de4067706feb9d81518812d41a1542b3c36bc5", - data: "0x00", - }, -]; diff --git a/test/helpers/index.ts b/test/helpers/index.ts index a2eb61b2aa..649f635239 100644 --- a/test/helpers/index.ts +++ b/test/helpers/index.ts @@ -5,7 +5,6 @@ export * from "./common"; export * from "./constants"; export * from "./contracts"; export * from "./crowdloan"; -export * from "./democracy-unlock-test-data"; export * from "./eth-transactions"; export * from "./expect"; export * from "./foreign-chains"; diff --git a/test/helpers/precompiles.ts b/test/helpers/precompiles.ts index b232a654f4..edfeab3ea2 100644 --- a/test/helpers/precompiles.ts +++ b/test/helpers/precompiles.ts @@ -4,7 +4,7 @@ import { CHARLETH_PRIVATE_KEY, DOROTHY_PRIVATE_KEY, PRECOMPILE_AUTHOR_MAPPING_ADDRESS, - PRECOMPILE_DEMOCRACY_ADDRESS, + PRECOMPILE_PREIMAGE_ADDRESS, baltathar, charleth, createViemTransaction, @@ -74,7 +74,7 @@ export const notePreimagePrecompile = async < }); const tx = await createViemTransaction(context, { - to: PRECOMPILE_DEMOCRACY_ADDRESS, + to: PRECOMPILE_PREIMAGE_ADDRESS, gas: 2_000_000n, data, }); diff --git a/test/suites/dev/moonbase/test-balance/test-balance-reducible.ts b/test/suites/dev/moonbase/test-balance/test-balance-reducible.ts index 3aac1cc844..2d937382e7 100644 --- a/test/suites/dev/moonbase/test-balance/test-balance-reducible.ts +++ b/test/suites/dev/moonbase/test-balance/test-balance-reducible.ts @@ -28,7 +28,6 @@ describeSuite({ const existentialDeposit = context .polkadotJs() .consts.balances.existentialDeposit.toBigInt(); - const minDepositAmount = context.polkadotJs().consts.democracy.minimumDeposit.toBigInt(); const proposal = context .polkadotJs() .tx.balances.forceSetBalance(randomAccount.address, 100); diff --git a/test/suites/dev/moonbase/test-contract/test-contract-delegate-call.ts b/test/suites/dev/moonbase/test-contract/test-contract-delegate-call.ts index ef67109ab1..099b421fb3 100644 --- a/test/suites/dev/moonbase/test-contract/test-contract-delegate-call.ts +++ b/test/suites/dev/moonbase/test-contract/test-contract-delegate-call.ts @@ -4,8 +4,8 @@ import { ALITH_ADDRESS } from "@moonwall/util"; import { encodeFunctionData, Abi } from "viem"; const PRECOMPILE_PREFIXES = [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 1024, 1026, 2048, 2049, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, - 2058, 2059, + 1, 2, 3, 4, 5, 6, 7, 8, 9, 1024, 1026, 2048, 2049, 2050, 2052, 2053, 2054, 2055, 2056, 2057, 2058, + 2059, ]; // Ethereum precompile 1-9 are pure and allowed to be called through DELEGATECALL diff --git a/test/suites/dev/moonbase/test-moonbeam-lazy-migrations/test-unlock-democracy-funds.ts b/test/suites/dev/moonbase/test-moonbeam-lazy-migrations/test-unlock-democracy-funds.ts deleted file mode 100644 index d4163533d9..0000000000 --- a/test/suites/dev/moonbase/test-moonbeam-lazy-migrations/test-unlock-democracy-funds.ts +++ /dev/null @@ -1,100 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { describeSuite, expect, beforeAll } from "@moonwall/cli"; -import { alith } from "@moonwall/util"; -import { ApiPromise } from "@polkadot/api"; -import { votingOf, locks } from "../../../../helpers"; - -describeSuite({ - id: "LM01", - title: "Lazy Migrations - Unlock Democracy Funds", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let api: ApiPromise; - - beforeAll(async () => { - api = context.polkadotJs(); - - await context.createBlock( - api.tx.sudo - .sudo(api.tx.system.setStorage(votingOf.map((v) => [v.key, v.data]))) - .signAsync(alith) - ); - expect((await api.query.democracy.votingOf.entries()).length).is.equal(100); - - await context.createBlock( - api.tx.sudo - .sudo(api.tx.system.setStorage(locks.map((l) => [l.key, l.data]))) - .signAsync(alith) - ); - // 100 just added + alith - expect((await api.query.balances.locks.entries()).length).is.equal(101); - }); - - it({ - id: "T01", - title: "Test unlockDemocracyFunds limit is enforced.", - test: async function () { - const tx1 = await context.createBlock( - await api.tx.moonbeamLazyMigrations.unlockDemocracyFunds(51) - ); - expect(tx1.result?.error?.name).is.equal("UnlockLimitTooHigh"); - }, - }); - - it({ - id: "T02", - title: - "Complex test where we unlock all democracy funds and check that the migration state has " + - "been changed.", - test: async function () { - const tx1 = await context.createBlock( - await api.tx.moonbeamLazyMigrations.unlockDemocracyFunds(30) - ); - expect(tx1.result?.successful, "Failed to unlock democracy funds"); - expect((await api.query.democracy.votingOf.entries()).length).is.equal(70); - - /// Check that the locks are removed for the first 30 accounts - for (let i = 0; i < 30; i++) { - const account_locks = await api.query.balances.locks(locks[i]["account"]); - for (let j = 0; j < account_locks.length; j++) { - expect(account_locks[j].id.toHuman()).is.not.equal("democrac"); - } - } - - const tx2 = await context.createBlock( - await api.tx.moonbeamLazyMigrations.unlockDemocracyFunds(50) - ); - expect(tx2.result?.successful, "Failed to unlock democracy funds"); - expect((await api.query.democracy.votingOf.entries()).length).is.equal(20); - - /// Check that the locks are removed for the first 70 accounts - for (let i = 0; i < 70; i++) { - const account_locks = await api.query.balances.locks(locks[i]["account"]); - for (let j = 0; j < account_locks.length; j++) { - expect(account_locks[j].id.toHuman()).is.not.equal("democrac"); - } - } - - const tx4 = await context.createBlock( - await api.tx.moonbeamLazyMigrations.unlockDemocracyFunds(50) - ); - expect(tx4.result?.successful, "Failed to unlock democracy funds"); - expect((await api.query.democracy.votingOf.entries()).length).is.equal(0); - - /// Check there is no democracy lock left - for (let i = 0; i < locks.length; i++) { - const account_locks = await api.query.balances.locks(locks[i]["account"]); - for (let j = 0; j < account_locks.length; j++) { - expect(account_locks[j].id.toHuman()).is.not.equal("democrac"); - } - } - - const tx5 = await context.createBlock( - await api.tx.moonbeamLazyMigrations.unlockDemocracyFunds(1) - ); - expect(tx5.result?.successful).is.equal(false); - expect(tx5.result?.error?.name).is.equal("AllDemocracyFundsUnlocked"); - }, - }); - }, -}); diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-democracy.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-democracy.ts index ccd5505b2a..4bddc24fb4 100644 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-democracy.ts +++ b/test/suites/dev/moonbase/test-precompile/test-precompile-democracy.ts @@ -5,14 +5,14 @@ import { notePreimagePrecompile } from "../../../../helpers"; describeSuite({ id: "D012937", - title: "Democracy - genesis and preimage", + title: "Governance - genesis and preimage", foundationMethods: "dev", testCases: ({ context, it, log }) => { it({ id: "T01", title: "should check initial state - no referendum", test: async function () { - const referendumCount = await context.polkadotJs().query.democracy.referendumCount(); + const referendumCount = await context.polkadotJs().query.referenda.referendumCount(); const blockNum = (await context.polkadotJs().rpc.chain.getHeader()).number.toBigInt(); if (blockNum == 0n) { expect(referendumCount.toNumber()).to.equal(0); @@ -54,7 +54,7 @@ describeSuite({ ).toHuman(); // TODO: uncomment when we have types - // expect(preimageStatus.unwrap().isUnrequested).to.be.true; + // expect(preimageStatus!.unwrap().isUnrequested).to.be.true; // TODO: change syntax when we have types const proposer = preimageStatus!["Unrequested"]["ticket"][0]; diff --git a/test/suites/dev/moonbase/test-precompile/test-precompile-democracy2.ts b/test/suites/dev/moonbase/test-precompile/test-precompile-democracy2.ts deleted file mode 100644 index 0c7b4f325d..0000000000 --- a/test/suites/dev/moonbase/test-precompile/test-precompile-democracy2.ts +++ /dev/null @@ -1,58 +0,0 @@ -import "@moonbeam-network/api-augment"; -import { beforeAll, describeSuite, expect, fetchCompiledContract } from "@moonwall/cli"; -import { - ALITH_ADDRESS, - PRECOMPILE_DEMOCRACY_ADDRESS, - PROPOSAL_AMOUNT, - createViemTransaction, -} from "@moonwall/util"; -import { nToHex } from "@polkadot/util"; -import { Abi, encodeFunctionData } from "viem"; -import { notePreimagePrecompile } from "../../../../helpers"; - -describeSuite({ - id: "D012938", - title: "Democracy - propose", - foundationMethods: "dev", - testCases: ({ context, it, log }) => { - let encodedHash: `0x${string}`; - let democracyAbi: Abi; - - beforeAll(async () => { - const { abi } = fetchCompiledContract("Democracy"); - democracyAbi = abi; - encodedHash = await notePreimagePrecompile( - context, - context.polkadotJs().tx.parachainStaking.setParachainBondAccount(ALITH_ADDRESS) - ); - }); - it({ - id: "T01", - title: "propose", - test: async function () { - await context.createBlock( - createViemTransaction(context, { - to: PRECOMPILE_DEMOCRACY_ADDRESS, - gas: 2_000_000n, - data: encodeFunctionData({ - abi: democracyAbi, - functionName: "propose", - args: [encodedHash, nToHex(PROPOSAL_AMOUNT)], - }), - }) - ); - - const referendumCount = ( - await context.polkadotJs().query.democracy.referendumCount() - ).toNumber(); - if (referendumCount !== 0) { - log(`referendumCount is ${referendumCount}, skipping test as pre-existing state found`); - return; - } - - const publicPropCount = await context.polkadotJs().query.democracy.publicPropCount(); - expect(publicPropCount.toNumber(), "Proposal created").to.equal(0); - }, - }); - }, -});