From c51e03b31277713be4e480bb525ecffe0d41ac72 Mon Sep 17 00:00:00 2001 From: Francisco Gamundi Date: Fri, 10 Nov 2023 03:30:50 +0100 Subject: [PATCH] Add precompiles and tests to evm template --- Cargo.lock | 367 +++- Cargo.toml | 60 +- .../templates/frontier/node/src/chain_spec.rs | 69 +- .../templates/frontier/runtime/Cargo.toml | 12 + .../templates/frontier/runtime/src/lib.rs | 8 +- .../frontier/runtime/src/precompiles.rs | 124 +- pnpm-lock.yaml | 1571 +++++++++-------- test/contracts/solidity/Batch.sol | 82 + test/contracts/solidity/CallPermit.sol | 54 + test/contracts/solidity/CallPermitDemo.sol | 125 ++ test/contracts/solidity/ERC20.sol | 122 ++ test/contracts/solidity/XcmUtils.sol | 52 + test/helpers/eth-transactions.ts | 63 + test/helpers/index.ts | 2 + test/helpers/xcm.ts | 24 + test/moonwall.config.json | 7 +- test/package.json | 24 +- .../test-precompiles/test-precompile-batch.ts | 95 + .../test-precompile-call-permit.ts | 220 +++ .../test-precompiles/test-precompile-erc20.ts | 269 +++ .../test-precompile-xcm-utils.ts | 439 +++++ .../test-upgrade-chain.ts | 0 22 files changed, 2859 insertions(+), 930 deletions(-) create mode 100644 test/contracts/solidity/Batch.sol create mode 100644 test/contracts/solidity/CallPermit.sol create mode 100644 test/contracts/solidity/CallPermitDemo.sol create mode 100644 test/contracts/solidity/ERC20.sol create mode 100644 test/contracts/solidity/XcmUtils.sol create mode 100644 test/helpers/eth-transactions.ts create mode 100644 test/helpers/index.ts create mode 100644 test/helpers/xcm.ts create mode 100644 test/suites/dev-frontier-template/test-precompiles/test-precompile-batch.ts create mode 100644 test/suites/dev-frontier-template/test-precompiles/test-precompile-call-permit.ts create mode 100644 test/suites/dev-frontier-template/test-precompiles/test-precompile-erc20.ts create mode 100644 test/suites/dev-frontier-template/test-precompiles/test-precompile-xcm-utils.ts rename test/suites/{rt-ugprade-chopsticks => rt-upgrade-chopsticks}/test-upgrade-chain.ts (100%) diff --git a/Cargo.lock b/Cargo.lock index 2868bde70..fa72997ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -874,7 +874,7 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.9", + "prettyplease 0.2.15", "proc-macro2", "quote", "regex", @@ -1192,6 +1192,12 @@ dependencies = [ "thiserror", ] +[[package]] +name = "case" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6c0e7b807d60291f42f33f58480c0bfafe28ed08286446f45e463728cf9c1c" + [[package]] name = "cc" version = "1.0.79" @@ -1588,7 +1594,7 @@ dependencies = [ "fc-rpc-core", "fc-storage", "flume", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "fp-rpc", "frame-benchmarking", "frame-benchmarking-cli", @@ -1662,8 +1668,8 @@ dependencies = [ "cumulus-primitives-core", "cumulus-primitives-timestamp", "cumulus-primitives-utility", - "fp-account", - "fp-evm", + "fp-account 1.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "fp-rpc", "fp-self-contained", "frame-executive", @@ -1674,17 +1680,22 @@ dependencies = [ "hex-literal 0.3.4", "log", "nimbus-primitives", + "num_enum", "pallet-author-inherent", "pallet-balances", "pallet-base-fee", "pallet-cc-authorities-noting", "pallet-dynamic-fee", "pallet-ethereum", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "pallet-evm-chain-id", + "pallet-evm-precompile-balances-erc20", + "pallet-evm-precompile-batch", + "pallet-evm-precompile-call-permit", "pallet-evm-precompile-modexp", "pallet-evm-precompile-sha3fips", "pallet-evm-precompile-simple", + "pallet-evm-precompile-xcm-utils", "pallet-hotfix-sufficients", "pallet-maintenance-mode", "pallet-migrations", @@ -1700,6 +1711,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-common", + "precompile-utils 0.1.0 (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "scale-info", "serde", "smallvec", @@ -3668,6 +3680,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "faster-hex" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e2ce894d53b295cf97b05685aa077950ff3e8541af83217fc720a6437169f8" + [[package]] name = "fastrand" version = "1.9.0" @@ -3705,7 +3723,7 @@ dependencies = [ [[package]] name = "fc-api" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "async-trait", "fp-storage", @@ -3717,7 +3735,7 @@ dependencies = [ [[package]] name = "fc-cli" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "clap", "ethereum-types", @@ -3735,7 +3753,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "async-trait", "fp-consensus", @@ -3751,7 +3769,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "async-trait", "ethereum", @@ -3782,7 +3800,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "fc-db", "fc-storage", @@ -3805,7 +3823,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "ethereum-types", @@ -3814,7 +3832,7 @@ dependencies = [ "fc-mapping-sync", "fc-rpc-core", "fc-storage", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "fp-rpc", "fp-storage", "futures 0.3.28", @@ -3822,7 +3840,7 @@ dependencies = [ "jsonrpsee", "libsecp256k1", "log", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "parity-scale-codec", "prometheus", "rand 0.8.5", @@ -3859,7 +3877,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "ethereum-types", @@ -3872,7 +3890,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "ethereum-types", @@ -4065,7 +4083,26 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "hex", + "impl-serde", + "libsecp256k1", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", +] + +[[package]] +name = "fp-account" +version = "1.0.0-dev" +source = "git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "hex", "impl-serde", @@ -4084,7 +4121,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "parity-scale-codec", @@ -4096,7 +4133,7 @@ dependencies = [ [[package]] name = "fp-dynamic-fee" version = "1.0.0" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "async-trait", "sp-core", @@ -4106,11 +4143,11 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "ethereum-types", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "frame-support", "parity-scale-codec", "sp-std", @@ -4119,7 +4156,23 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "evm", + "frame-support", + "num_enum", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "fp-evm" +version = "3.0.0-dev" +source = "git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "evm", "frame-support", @@ -4135,11 +4188,11 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "ethereum-types", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "parity-scale-codec", "scale-info", "sp-api", @@ -4152,7 +4205,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "frame-support", "parity-scale-codec", @@ -4164,7 +4217,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "parity-scale-codec", "serde", @@ -6774,7 +6827,7 @@ dependencies = [ [[package]] name = "nimbus-consensus" version = "0.9.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.1.0#cb1c4fd10debd2d09d11292ff3ff7a4c053f622d" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -6804,7 +6857,7 @@ dependencies = [ [[package]] name = "nimbus-primitives" version = "0.9.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.1.0#cb1c4fd10debd2d09d11292ff3ff7a4c053f622d" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" dependencies = [ "async-trait", "frame-support", @@ -6962,18 +7015,18 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" +checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ea360eafe1022f7cc56cd7b869ed57330fb2453d0c7831d99b74c65d2f5597" +checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7179,7 +7232,7 @@ dependencies = [ [[package]] name = "pallet-author-inherent" version = "0.9.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.1.0#cb1c4fd10debd2d09d11292ff3ff7a4c053f622d" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" dependencies = [ "frame-benchmarking", "frame-support", @@ -7363,9 +7416,9 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "frame-support", "frame-system", "parity-scale-codec", @@ -7613,10 +7666,10 @@ dependencies = [ [[package]] name = "pallet-dynamic-fee" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "fp-dynamic-fee", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "frame-support", "frame-system", "parity-scale-codec", @@ -7686,21 +7739,47 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "ethereum", "ethereum-types", "evm", "fp-consensus", "fp-ethereum", - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "fp-rpc", "fp-storage", "frame-support", "frame-system", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-evm" +version = "6.0.0-dev" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "environmental", + "evm", + "fp-account 1.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "frame-benchmarking", + "frame-support", + "frame-system", + "hash-db 0.16.0", + "hex", + "hex-literal 0.4.1", + "impl-trait-for-tuples", + "log", "parity-scale-codec", + "rlp", "scale-info", + "sp-core", "sp-io", "sp-runtime", "sp-std", @@ -7709,12 +7788,12 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "environmental", "evm", - "fp-account", - "fp-evm", + "fp-account 1.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", "frame-benchmarking", "frame-support", "frame-system", @@ -7735,7 +7814,7 @@ dependencies = [ [[package]] name = "pallet-evm-chain-id" version = "1.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "frame-support", "frame-system", @@ -7744,34 +7823,121 @@ dependencies = [ "sp-runtime", ] +[[package]] +name = "pallet-evm-precompile-balances-erc20" +version = "0.1.0" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" +dependencies = [ + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "frame-support", + "frame-system", + "log", + "num_enum", + "pallet-balances", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "pallet-timestamp", + "parity-scale-codec", + "paste", + "precompile-utils 0.1.0 (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "slices", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "pallet-evm-precompile-batch" +version = "0.1.0" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" +dependencies = [ + "evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "frame-support", + "frame-system", + "log", + "num_enum", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "parity-scale-codec", + "paste", + "precompile-utils 0.1.0 (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "slices", + "sp-core", + "sp-io", + "sp-std", +] + +[[package]] +name = "pallet-evm-precompile-call-permit" +version = "0.1.0" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" +dependencies = [ + "evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "frame-support", + "frame-system", + "log", + "num_enum", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "pallet-timestamp", + "parity-scale-codec", + "paste", + "precompile-utils 0.1.0 (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "slices", + "sp-core", + "sp-io", + "sp-std", +] + [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "num", ] [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "tiny-keccak", ] [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ - "fp-evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "ripemd", "sp-io", ] +[[package]] +name = "pallet-evm-precompile-xcm-utils" +version = "0.1.0" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" +dependencies = [ + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "frame-support", + "frame-system", + "num_enum", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "pallet-xcm", + "parity-scale-codec", + "precompile-utils 0.1.0 (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "sp-core", + "sp-runtime", + "sp-std", + "sp-weights", + "staging-xcm", + "staging-xcm-executor", + "xcm-primitives", +] + [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" @@ -7817,12 +7983,12 @@ dependencies = [ [[package]] name = "pallet-hotfix-sufficients" version = "1.0.0" -source = "git+https://github.com/moondance-labs/frontier?branch=tanssi-polkadot-v1.1.0#aecb63fd0ce55fb59e7deb26c99e37d224b35064" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "pallet-evm", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", "parity-scale-codec", "scale-info", "sp-core", @@ -7921,7 +8087,7 @@ dependencies = [ [[package]] name = "pallet-maintenance-mode" version = "0.1.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.1.0#cb1c4fd10debd2d09d11292ff3ff7a4c053f622d" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -7973,7 +8139,7 @@ dependencies = [ [[package]] name = "pallet-migrations" version = "0.1.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.1.0#cb1c4fd10debd2d09d11292ff3ff7a4c053f622d" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" dependencies = [ "frame-support", "frame-system", @@ -10262,6 +10428,83 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "precompile-utils" +version = "0.1.0" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "environmental", + "evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "frame-support", + "frame-system", + "hex", + "impl-trait-for-tuples", + "log", + "num_enum", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "parity-scale-codec", + "precompile-utils-macro 0.1.0 (git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "precompile-utils" +version = "0.1.0" +source = "git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "environmental", + "evm", + "fp-evm 3.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "frame-support", + "frame-system", + "hex", + "impl-trait-for-tuples", + "log", + "num_enum", + "pallet-evm 6.0.0-dev (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "parity-scale-codec", + "precompile-utils-macro 0.1.0 (git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", + "staging-xcm", +] + +[[package]] +name = "precompile-utils-macro" +version = "0.1.0" +source = "git+https://github.com/fgamundi/frontier?branch=precompile-xcm-util#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "case", + "num_enum", + "prettyplease 0.2.15", + "proc-macro2", + "quote", + "sp-core-hashing", + "syn 1.0.109", +] + +[[package]] +name = "precompile-utils-macro" +version = "0.1.0" +source = "git+https://github.com/fgamundi/frontier?branch=tanssi-polkadot-v1.1.0#ff0e23bfe28c2f6f67c02ee1e63adddeb11e7eed" +dependencies = [ + "case", + "num_enum", + "prettyplease 0.2.15", + "proc-macro2", + "quote", + "sp-core-hashing", + "syn 1.0.109", +] + [[package]] name = "predicates" version = "2.1.5" @@ -10304,9 +10547,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", "syn 2.0.37", @@ -12871,6 +13114,18 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" +[[package]] +name = "slices" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2086e458a369cdca838e9f6ed04b4cc2e3ce636d99abb80c9e2eada107749cf" +dependencies = [ + "faster-hex", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "slot-range-helper" version = "1.0.0" @@ -16781,7 +17036,7 @@ dependencies = [ [[package]] name = "xcm-primitives" version = "0.1.0" -source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.1.0#cb1c4fd10debd2d09d11292ff3ff7a4c053f622d" +source = "git+https://github.com/fgamundi/moonkit?branch=tanssi-polkadot-v1.1.0#0c841076bd09f8ccaaf93d188f03057fdf25c195" dependencies = [ "sp-runtime", ] diff --git a/Cargo.toml b/Cargo.toml index 2302a4e6e..92097a2cc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,12 +55,16 @@ tp-core = { path = "primitives/core", default-features = false } tp-traits = { path = "primitives/traits", default-features = false } # Moonkit (wasm) -nimbus-consensus = { git = "https://github.com/moondance-labs/moonkit", branch = "tanssi-polkadot-v1.1.0" } -nimbus-primitives = { git = "https://github.com/moondance-labs/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-author-inherent = { git = "https://github.com/moondance-labs/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-maintenance-mode = { git = "https://github.com/moondance-labs/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-migrations = { git = "https://github.com/moondance-labs/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } -xcm-primitives = { git = "https://github.com/moondance-labs/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +nimbus-consensus = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0" } +nimbus-primitives = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-author-inherent = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-maintenance-mode = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-migrations = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +xcm-primitives = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-evm-precompile-balances-erc20 = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-evm-precompile-batch = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-evm-precompile-call-permit = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } +pallet-evm-precompile-xcm-utils = { git = "https://github.com/fgamundi/moonkit", branch = "tanssi-polkadot-v1.1.0", default-features = false } # Substrate (wasm) sp-consensus-beefy = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } @@ -190,31 +194,32 @@ cumulus-test-relay-sproof-builder = { git = "https://github.com/moondance-labs/p xcm-emulator = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-v1.1.0", default-features = false } # Frontier (wasm) -fp-account = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fp-evm = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fp-rpc = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fp-self-contained = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-base-fee = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-dynamic-fee = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-ethereum = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-evm = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-evm-chain-id = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -pallet-hotfix-sufficients = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } +fp-account = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fp-evm = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fp-rpc = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fp-self-contained = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-base-fee = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-dynamic-fee = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-ethereum = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-evm = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-evm-chain-id = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +pallet-hotfix-sufficients = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +precompile-utils = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } # Frontier (client) -fc-api = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fc-cli = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fc-consensus = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fc-db = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fc-mapping-sync = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fc-rpc = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", features = [ +fc-api = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fc-cli = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fc-consensus = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fc-db = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fc-mapping-sync = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fc-rpc = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", features = [ "rpc-binary-search-estimate", ] } -fc-rpc-core = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } -fc-storage = { git = "https://github.com/moondance-labs/frontier", branch = "tanssi-polkadot-v1.1.0", default-features = false } +fc-rpc-core = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } +fc-storage = { git = "https://github.com/fgamundi/frontier", branch = "precompile-xcm-util", default-features = false } # General (wasm) hex-literal = { version = "0.3.4" } @@ -222,6 +227,7 @@ log = { version = "0.4.17", default-features = false } serde = { version = "1.0.152", default-features = false } smallvec = "1.10.0" rand_chacha = { version = "0.3.1", default-features = false } +num_enum = { version = "0.7.1", default-features = false } # General (client) async-io = "1.3" diff --git a/container-chains/templates/frontier/node/src/chain_spec.rs b/container-chains/templates/frontier/node/src/chain_spec.rs index bcf233a6d..e3225bfbc 100644 --- a/container-chains/templates/frontier/node/src/chain_spec.rs +++ b/container-chains/templates/frontier/node/src/chain_spec.rs @@ -17,16 +17,15 @@ use { container_chain_template_frontier_runtime::{ AccountId, EVMChainIdConfig, EVMConfig, MaintenanceModeConfig, MigrationsConfig, - PolkadotXcmConfig, + PolkadotXcmConfig, Precompiles, }, cumulus_primitives_core::ParaId, + fp_evm::GenesisAccount, hex_literal::hex, sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}, sc_network::config::MultiaddrWithPeerId, sc_service::ChainType, serde::{Deserialize, Serialize}, - sp_core::{H160, U256}, - std::{collections::BTreeMap, str::FromStr}, }; /// Specialized `ChainSpec` for the normal parachain runtime. @@ -155,6 +154,12 @@ fn testnet_genesis( id: ParaId, root_key: AccountId, ) -> container_chain_template_frontier_runtime::RuntimeGenesisConfig { + // This is the simplest bytecode to revert without returning any data. + // We will pre-deploy it under all of our precompiles to ensure they can be called from + // within contracts. + // (PUSH1 0x00 PUSH1 0x00 REVERT) + let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; + container_chain_template_frontier_runtime::RuntimeGenesisConfig { system: container_chain_template_frontier_runtime::SystemConfig { code: container_chain_template_frontier_runtime::WASM_BINARY @@ -182,49 +187,21 @@ fn testnet_genesis( ..Default::default() }, evm: EVMConfig { - accounts: { - let mut map = BTreeMap::new(); - map.insert( - // H160 address of Alice dev account - // Derived from SS58 (42 prefix) address - // SS58: 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY - // hex: 0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d - // Using the full hex key, truncating to the first 20 bytes (the first 40 hex chars) - H160::from_str("d43593c715fdd31c61141abd04a99fd6822c8558") - .expect("internal H160 is valid; qed"), - fp_evm::GenesisAccount { - balance: U256::from_str("0xffffffffffffffffffffffffffffffff") - .expect("internal U256 is valid; qed"), - code: Default::default(), - nonce: Default::default(), - storage: Default::default(), - }, - ); - map.insert( - // H160 address of CI test runner account - H160::from_str("6be02d1d3665660d22ff9624b7be0551ee1ac91b") - .expect("internal H160 is valid; qed"), - fp_evm::GenesisAccount { - balance: U256::from_str("0xffffffffffffffffffffffffffffffff") - .expect("internal U256 is valid; qed"), - code: Default::default(), - nonce: Default::default(), - storage: Default::default(), - }, - ); - map.insert( - // H160 address for benchmark usage - H160::from_str("1000000000000000000000000000000000000001") - .expect("internal H160 is valid; qed"), - fp_evm::GenesisAccount { - nonce: U256::from(1), - balance: U256::from(1_000_000_000_000_000_000_000_000u128), - storage: Default::default(), - code: vec![0x00], - }, - ); - map - }, + // We need _some_ code inserted at the precompile address so that + // the evm will actually call the address. + accounts: Precompiles::used_addresses() + .map(|addr| { + ( + addr.into(), + GenesisAccount { + nonce: Default::default(), + balance: Default::default(), + storage: Default::default(), + code: revert_bytecode.clone(), + }, + ) + }) + .collect(), ..Default::default() }, ethereum: Default::default(), diff --git a/container-chains/templates/frontier/runtime/Cargo.toml b/container-chains/templates/frontier/runtime/Cargo.toml index d87cb0325..d8287dc3d 100644 --- a/container-chains/templates/frontier/runtime/Cargo.toml +++ b/container-chains/templates/frontier/runtime/Cargo.toml @@ -16,6 +16,7 @@ parity-scale-codec = { workspace = true, features = ["derive"] } scale-info = { workspace = true, features = ["derive"] } serde = { workspace = true, optional = true, features = ["derive"] } smallvec = { workspace = true } +num_enum = { workspace = true } # Local ccp-xcm = { workspace = true } @@ -28,6 +29,10 @@ pallet-author-inherent = { workspace = true } pallet-maintenance-mode = { workspace = true, features = ["xcm-support"] } pallet-migrations = { workspace = true } xcm-primitives = { 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-xcm-utils = { workspace = true } # Substrate frame-executive = { workspace = true } @@ -91,6 +96,8 @@ pallet-evm-precompile-modexp = { workspace = true } pallet-evm-precompile-sha3fips = { workspace = true } pallet-evm-precompile-simple = { workspace = true } pallet-hotfix-sufficients = { workspace = true } +precompile-utils = { workspace = true } + [build-dependencies] substrate-wasm-builder = { workspace = true } @@ -125,6 +132,11 @@ std = [ "pallet-evm-precompile-modexp/std", "pallet-evm-precompile-sha3fips/std", "pallet-evm-precompile-simple/std", + "pallet-evm-precompile-balances-erc20/std", + "pallet-evm-precompile-batch/std", + "pallet-evm-precompile-call-permit/std", + "pallet-evm-precompile-xcm-utils/std", + "precompile-utils/std", "pallet-evm/std", "pallet-hotfix-sufficients/std", "pallet-maintenance-mode/std", diff --git a/container-chains/templates/frontier/runtime/src/lib.rs b/container-chains/templates/frontier/runtime/src/lib.rs index d0b66a6e4..fa5f31626 100644 --- a/container-chains/templates/frontier/runtime/src/lib.rs +++ b/container-chains/templates/frontier/runtime/src/lib.rs @@ -32,7 +32,7 @@ mod precompiles; pub mod xcm_config; use { - crate::precompiles::FrontierPrecompiles, + crate::precompiles::TemplatePrecompiles, cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases, cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler}, fp_account::EthereumSignature, @@ -96,6 +96,8 @@ pub use { // Polkadot imports use polkadot_runtime_common::BlockHashCount; +pub type Precompiles = TemplatePrecompiles; + /// Alias to 512-bit hash when used in the context of a transaction signature on the chain. pub type Signature = EthereumSignature; @@ -781,7 +783,7 @@ impl FindAuthor for FindAuthorAdapter { parameter_types! { pub BlockGasLimit: U256 = U256::from(BLOCK_GAS_LIMIT); - pub PrecompilesValue: FrontierPrecompiles = FrontierPrecompiles::<_>::new(); + pub PrecompilesValue: TemplatePrecompiles = TemplatePrecompiles::<_>::new(); pub WeightPerGas: Weight = Weight::from_parts(weight_per_gas(BLOCK_GAS_LIMIT, NORMAL_DISPATCH_RATIO, WEIGHT_MILLISECS_PER_BLOCK), 0); } @@ -796,7 +798,7 @@ impl pallet_evm::Config for Runtime { type AddressMapping = IdentityAddressMapping; type Currency = Balances; type RuntimeEvent = RuntimeEvent; - type PrecompilesType = FrontierPrecompiles; + type PrecompilesType = TemplatePrecompiles; type PrecompilesValue = PrecompilesValue; type ChainId = EVMChainId; type BlockGasLimit = BlockGasLimit; diff --git a/container-chains/templates/frontier/runtime/src/precompiles.rs b/container-chains/templates/frontier/runtime/src/precompiles.rs index 9a80481a7..af037b191 100644 --- a/container-chains/templates/frontier/runtime/src/precompiles.rs +++ b/container-chains/templates/frontier/runtime/src/precompiles.rs @@ -14,71 +14,89 @@ // You should have received a copy of the GNU General Public License // along with Tanssi. If not, see . -use fp_evm::IsPrecompileResult; - use { - pallet_evm::{Precompile, PrecompileHandle, PrecompileResult, PrecompileSet}, + crate::xcm_config::XcmConfig, + pallet_evm_precompile_balances_erc20::{Erc20BalancesPrecompile, Erc20Metadata}, + pallet_evm_precompile_batch::BatchPrecompile, + pallet_evm_precompile_call_permit::CallPermitPrecompile, pallet_evm_precompile_modexp::Modexp, pallet_evm_precompile_sha3fips::Sha3FIPS256, pallet_evm_precompile_simple::{ECRecover, ECRecoverPublicKey, Identity, Ripemd160, Sha256}, - sp_core::H160, - sp_std::marker::PhantomData, + pallet_evm_precompile_xcm_utils::{AllExceptXcmExecute, XcmUtilsPrecompile}, + precompile_utils::precompile_set::{ + AcceptDelegateCall, AddressU64, CallableByContract, CallableByPrecompile, OnlyFrom, + PrecompileAt, PrecompileSetBuilder, PrecompilesInRangeInclusive, SubcallWithMaxNesting, + }, }; -pub struct FrontierPrecompiles(PhantomData); +/// ERC20 metadata for the native token. +pub struct NativeErc20Metadata; -impl Default for FrontierPrecompiles { - fn default() -> Self { - Self(PhantomData) +impl Erc20Metadata for NativeErc20Metadata { + /// Returns the name of the token. + fn name() -> &'static str { + "UNIT token" } -} -impl FrontierPrecompiles -where - R: pallet_evm::Config, -{ - pub fn new() -> Self { - Self::default() + /// Returns the symbol of the token. + fn symbol() -> &'static str { + "UNIT" } - pub fn used_addresses() -> [H160; 7] { - [ - hash(1), - hash(2), - hash(3), - hash(4), - hash(5), - hash(1024), - hash(1025), - ] - } -} -impl PrecompileSet for FrontierPrecompiles -where - R: pallet_evm::Config, -{ - fn execute(&self, handle: &mut impl PrecompileHandle) -> Option { - match handle.code_address() { - // Ethereum precompiles : - a if a == hash(1) => Some(ECRecover::execute(handle)), - a if a == hash(2) => Some(Sha256::execute(handle)), - a if a == hash(3) => Some(Ripemd160::execute(handle)), - a if a == hash(4) => Some(Identity::execute(handle)), - a if a == hash(5) => Some(Modexp::execute(handle)), - // Non-Frontier specific nor Ethereum precompiles : - a if a == hash(1024) => Some(Sha3FIPS256::execute(handle)), - a if a == hash(1025) => Some(ECRecoverPublicKey::execute(handle)), - _ => None, - } + + /// Returns the decimals places of the token. + fn decimals() -> u8 { + 18 } - fn is_precompile(&self, address: H160, _remaining_gas: u64) -> IsPrecompileResult { - IsPrecompileResult::Answer { - is_precompile: Self::used_addresses().contains(&address), - extra_cost: 0, - } + /// Must return `true` only if it represents the main native currency of + /// the network. It must be the currency used in `pallet_evm`. + fn is_native_currency() -> bool { + true } } -fn hash(a: u64) -> H160 { - H160::from_low_u64_be(a) -} +type EthereumPrecompilesChecks = (AcceptDelegateCall, CallableByContract, CallableByPrecompile); + +#[precompile_utils::precompile_name_from_address] +type TemplatePrecompilesAt = ( + // Ethereum precompiles: + // Allow DELEGATECALL to stay compliant with Ethereum behavior. + PrecompileAt, ECRecover, EthereumPrecompilesChecks>, + PrecompileAt, Sha256, EthereumPrecompilesChecks>, + PrecompileAt, Ripemd160, EthereumPrecompilesChecks>, + PrecompileAt, Identity, EthereumPrecompilesChecks>, + PrecompileAt, Modexp, EthereumPrecompilesChecks>, + // Non-template specific nor Ethereum precompiles : + PrecompileAt, Sha3FIPS256, (CallableByContract, CallableByPrecompile)>, + PrecompileAt, ECRecoverPublicKey, (CallableByContract, CallableByPrecompile)>, + // Template specific precompiles: + PrecompileAt< + AddressU64<2048>, + Erc20BalancesPrecompile, + (CallableByContract, CallableByPrecompile), + >, + PrecompileAt< + AddressU64<2049>, + BatchPrecompile, + ( + SubcallWithMaxNesting<2>, + // Batch is the only precompile allowed to call Batch. + CallableByPrecompile>>, + ), + >, + PrecompileAt< + AddressU64<2050>, + CallPermitPrecompile, + (SubcallWithMaxNesting<0>, CallableByContract), + >, + PrecompileAt< + AddressU64<2051>, + XcmUtilsPrecompile, + CallableByContract>, + >, +); + +pub type TemplatePrecompiles = PrecompileSetBuilder< + R, + (PrecompilesInRangeInclusive<(AddressU64<1>, AddressU64<4095>), TemplatePrecompilesAt>,), +>; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 36aabff68..5f5caf6fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: dependencies: '@zombienet/orchestrator': specifier: ^0.0.52 - version: 0.0.52(@polkadot/util@12.4.2)(@types/node@20.5.6) + version: 0.0.52(@polkadot/util@12.5.1)(@types/node@20.5.6) inquirer: specifier: ^9.2.11 version: 9.2.11 @@ -20,37 +20,37 @@ importers: devDependencies: '@acala-network/chopsticks': specifier: npm:@tanssi/chopsticks@^0.8.0-9 - version: /@tanssi/chopsticks@0.8.0-9(@polkadot/util@12.4.2)(debug@4.3.4) + version: /@tanssi/chopsticks@0.8.0-9(@polkadot/util@12.5.1)(debug@4.3.4) '@moonbeam-network/api-augment': specifier: ^0.2400.0 version: 0.2400.0 '@moonwall/cli': - specifier: ^4.1.6 - version: 4.1.6(@types/node@20.5.6)(@vitest/ui@0.33.0)(typescript@5.2.2) + specifier: ^4.3.1 + version: 4.3.1(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3)(typescript@5.2.2) '@moonwall/util': - specifier: ^4.1.6 - version: 4.1.6(@types/node@20.5.6)(@vitest/ui@0.33.0)(typescript@5.2.2) + specifier: ^4.3.1 + version: 4.3.1(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3)(typescript@5.2.2) '@polkadot/api': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/api-augment': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/keyring': - specifier: ^12.4.2 - version: 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) + specifier: ^12.5.1 + version: 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/types': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/types-codec': - specifier: ^10.9.1 - version: 10.9.1 + specifier: ^10.10.1 + version: 10.10.1 '@polkadot/util': - specifier: ^12.4.2 - version: 12.4.2 + specifier: ^12.5.1 + version: 12.5.1 '@polkadot/util-crypto': - specifier: ^12.4.2 - version: 12.4.2(@polkadot/util@12.4.2) + specifier: ^12.5.1 + version: 12.5.1(@polkadot/util@12.5.1) '@tanssi/api-augment': specifier: workspace:* version: link:../typescript-api @@ -67,8 +67,8 @@ importers: specifier: ^6.4.1 version: 6.4.1(eslint@8.47.0)(typescript@5.2.2) '@vitest/ui': - specifier: ^0.33.0 - version: 0.33.0(vitest@0.34.3) + specifier: 1.0.0-beta.3 + version: 1.0.0-beta.3(vitest@1.0.0-beta.3) '@zombienet/utils': specifier: ^0.0.19 version: 0.0.19(@types/node@20.5.6)(typescript@5.2.2) @@ -106,11 +106,11 @@ importers: specifier: ^5.2.2 version: 5.2.2 viem: - specifier: ^1.7.0 - version: 1.7.0(typescript@5.2.2) + specifier: ^1.18.9 + version: 1.18.9(typescript@5.2.2) vitest: - specifier: ^0.34.3 - version: 0.34.3(@vitest/ui@0.33.0) + specifier: 1.0.0-beta.3 + version: 1.0.0-beta.3(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3) web3: specifier: 4.0.3 version: 4.0.3 @@ -189,32 +189,83 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@acala-network/chopsticks-executor@0.7.3: - resolution: {integrity: sha512-sPAQst4/i8S5i3aGPz7YXgRHfoR71HxOdk30PXnuExkUpOKQH1BYD0wuQkoVstonTeBwis3BSW5CL9Xz/4ksjQ==} + /@acala-network/chopsticks-core@0.9.1(@polkadot/util@12.5.1): + resolution: {integrity: sha512-pFPbSELcpkSzPy9lpomYAcn6BMFXqn6Z+0RNR+CcLSqHeMoJRKGh/w9T7MwFKd4MqDjY8/WZhLmp4X6bp7xAng==} + dependencies: + '@acala-network/chopsticks-executor': 0.9.1 + '@polkadot/api': 10.10.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + comlink: 4.4.1 + eventemitter3: 5.0.1 + lodash: 4.17.21 + pino: 8.16.1 + pino-pretty: 10.2.3 + zod: 3.22.4 + transitivePeerDependencies: + - '@polkadot/util' + - bufferutil + - supports-color + - utf-8-validate + dev: true + + /@acala-network/chopsticks-db@0.9.1(@polkadot/util@12.5.1): + resolution: {integrity: sha512-jtDTqGu5CKyaAKKHI3Oi8FIRc3jwm1oMgbjTSYWD9oSzEBAqn2Xmbwg6VxCQhWH20ydrcxPyALEWb9mMICoNtw==} + dependencies: + '@acala-network/chopsticks-core': 0.9.1(@polkadot/util@12.5.1) + idb: 7.1.1 + sqlite3: 5.1.6 + typeorm: 0.3.17(sql.js@1.8.0)(sqlite3@5.1.6) + transitivePeerDependencies: + - '@google-cloud/spanner' + - '@polkadot/util' + - '@sap/hana-client' + - better-sqlite3 + - bluebird + - bufferutil + - encoding + - hdb-pool + - ioredis + - mongodb + - mssql + - mysql2 + - oracledb + - pg + - pg-native + - pg-query-stream + - redis + - sql.js + - supports-color + - ts-node + - typeorm-aurora-data-api-driver + - utf-8-validate + dev: true + + /@acala-network/chopsticks-executor@0.9.1: + resolution: {integrity: sha512-uukm3GInn+z+3jjZTFClJZjoWlM/IudpaYw+wO5h+6XIySmkLIfsPd19Kq4Nj0S0DFRPDHynnqsgg2JL789P+A==} + dependencies: + '@polkadot/util': 12.5.1 + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) dev: true - /@acala-network/chopsticks@0.7.3(debug@4.3.4): - resolution: {integrity: sha512-RYGFI1UQgNwc+rUwjoZEucLYesiG62IJXT9ABfs/KKEkvMx6JiJWwO37tObdGkUm4S8zezdRumEnOPOl+B65FQ==} + /@acala-network/chopsticks@0.9.1(@polkadot/util@12.5.1)(debug@4.3.4): + resolution: {integrity: sha512-oTrJGQ/omE/6Di06RIPwAD4VdC8akstWY4GpZc1n+ZGn5YIHLDv7Nxzi2q2VBY9zBIIAp8Xw96cMId7ane2G+Q==} hasBin: true dependencies: - '@acala-network/chopsticks-executor': 0.7.3 + '@acala-network/chopsticks-core': 0.9.1(@polkadot/util@12.5.1) + '@acala-network/chopsticks-db': 0.9.1(@polkadot/util@12.5.1) '@pnpm/npm-conf': 2.2.2 - '@polkadot/api': 10.10.1 - axios: 1.4.0(debug@4.3.4) + axios: 1.6.1(debug@4.3.4) + dotenv: 16.3.1 global-agent: 3.0.0 js-yaml: 4.1.0 - jsondiffpatch: 0.4.1 + jsondiffpatch: 0.5.0 lodash: 4.17.21 - pino: 8.15.0 - pino-pretty: 10.2.0 - reflect-metadata: 0.1.13 - sqlite3: 5.1.6 - typeorm: 0.3.17(sql.js@1.8.0)(sqlite3@5.1.6) ws: 8.14.2 yargs: 17.7.2 - zod: 3.22.2 + zod: 3.22.4 transitivePeerDependencies: - '@google-cloud/spanner' + - '@polkadot/util' - '@sap/hana-client' - better-sqlite3 - bluebird @@ -238,8 +289,8 @@ packages: - utf-8-validate dev: true - /@adraffy/ens-normalize@1.9.0: - resolution: {integrity: sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==} + /@adraffy/ens-normalize@1.10.0: + resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} dev: true /@adraffy/ens-normalize@1.9.2: @@ -914,8 +965,8 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true - /@jest/schemas@29.6.0: - resolution: {integrity: sha512-rxLjXyJBTL4LQeJW3aKo0M/+GkCOXsO+8i9Iu7eDb6KwtP65ayoDsitrdPBtujxQ88k4wI2FNYfa6TOGwSn6cQ==} + /@jest/schemas@29.6.3: + resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 @@ -961,25 +1012,30 @@ packages: engines: {node: '>=14.0.0'} dev: true - /@moonwall/cli@4.1.6(@types/node@20.5.6)(@vitest/ui@0.33.0)(typescript@5.2.2): - resolution: {integrity: sha512-Y+b3f83T4PpGNvcDqauhGRBjn121/rtMPxLflohJXomXRoThB+vriI3jL/atnAO5IKbpPjeMo1sRNcle5+WYhw==} - engines: {node: '>=14.16.0', pnpm: '>=7'} + /@moonbeam-network/api-augment@0.2500.0: + resolution: {integrity: sha512-HOHQE9FCw9Pft+t5bWKe+c5+mKJ/5ZD1UztJlGBMxg4NRLCdZiKxdbPBiv2OTpRsBRq5v6PD2LaTFayRjXZYNQ==} + engines: {node: '>=14.0.0'} + dev: true + + /@moonwall/cli@4.3.1(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3)(typescript@5.2.2): + resolution: {integrity: sha512-bTup6W7fqMI45Nfh9tBURHSkcKWPu45BcOjIUJy/nWEaDUPXkWQZ4ixCrlzw85cZSsVidxd/vFOXw3UhXhfggg==} + engines: {node: '>=20.0.0', pnpm: '>=7'} hasBin: true dependencies: - '@acala-network/chopsticks': 0.7.3(debug@4.3.4) - '@moonbeam-network/api-augment': 0.2400.0 - '@moonwall/types': 4.1.6(@types/node@20.5.6)(typescript@5.2.2) - '@moonwall/util': 4.1.6(@types/node@20.5.6)(@vitest/ui@0.33.0)(typescript@5.2.2) - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-derive': 10.9.1 + '@acala-network/chopsticks': 0.9.1(@polkadot/util@12.5.1)(debug@4.3.4) + '@moonbeam-network/api-augment': 0.2500.0 + '@moonwall/types': 4.3.1(typescript@5.2.2) + '@moonwall/util': 4.3.1(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3)(typescript@5.2.2) + '@polkadot/api': 10.10.1 + '@polkadot/api-augment': 10.10.1 + '@polkadot/api-derive': 10.10.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-codec': 10.10.1 '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - '@zombienet/orchestrator': 0.0.56(@polkadot/util@12.5.1)(@types/node@20.5.6) - '@zombienet/utils': 0.0.22(@types/node@20.5.6)(typescript@5.2.2) + '@zombienet/orchestrator': 0.0.62(@polkadot/util@12.5.1)(@types/node@20.5.6) + '@zombienet/utils': 0.0.24(@types/node@20.5.6)(typescript@5.2.2) bottleneck: 2.19.5 chalk: 5.3.0 clear: 0.1.0 @@ -987,18 +1043,20 @@ packages: colors: 1.4.0 debug: 4.3.4(supports-color@8.1.1) dotenv: 16.3.1 - ethers: 6.7.1 + ethers: 6.8.1 + execa: 8.0.1 inquirer: 9.2.11 inquirer-press-to-continue: 1.2.0(inquirer@9.2.11) + jsonc-parser: 3.2.0 minimatch: 9.0.3 node-fetch: 3.3.2 semver: 7.5.4 - viem: 1.16.0(typescript@5.2.2) - vitest: 0.34.6(@vitest/ui@0.33.0) - web3: 4.0.3 - web3-providers-ws: 4.0.3 + viem: 1.18.9(typescript@5.2.2) + vitest: 1.0.0-beta.3(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3) + web3: 4.2.1(typescript@5.2.2) + web3-providers-ws: 4.0.7 ws: 8.14.2 - yaml: 2.3.2 + yaml: 2.3.4 yargs: 17.7.2 transitivePeerDependencies: - '@edge-runtime/vm' @@ -1028,9 +1086,7 @@ packages: - pg - pg-native - pg-query-stream - - playwright - redis - - safaridriver - sass - sql.js - stylus @@ -1041,12 +1097,11 @@ packages: - typeorm-aurora-data-api-driver - typescript - utf-8-validate - - webdriverio - zod dev: true - /@moonwall/types@4.1.6(@types/node@20.5.6)(typescript@5.2.2): - resolution: {integrity: sha512-bPshKiorLsgl0NOsUZCP0wsF1g3wrbnYQ1UXPRzLfrH9/ZLlFkKYqlnPBD4Fo4ZT/tZp5LTdOGxgrdxi5dfN0w==} + /@moonwall/types@4.3.1(typescript@5.2.2): + resolution: {integrity: sha512-QvUTYdXQ6jSVY6TjVmxxCGyg90mNT09HQqqX/XymZhboYkXdCCgm5AC+vuJjoWrKvoPXop2cFjCqk2fcxba0uQ==} engines: {node: '>=14.16.0', pnpm: '>=7'} dependencies: '@polkadot/api': 10.10.1 @@ -1055,16 +1110,16 @@ packages: '@polkadot/types': 10.10.1 '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - '@zombienet/utils': 0.0.22(@types/node@20.5.6)(typescript@5.2.2) + '@types/node': 20.9.0 + '@zombienet/utils': 0.0.24(@types/node@20.9.0)(typescript@5.2.2) bottleneck: 2.19.5 debug: 4.3.4(supports-color@8.1.1) - ethers: 6.7.1 - viem: 1.16.0(typescript@5.2.2) - web3: 4.0.3 + ethers: 6.8.1 + viem: 1.18.9(typescript@5.2.2) + web3: 4.2.1(typescript@5.2.2) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' - - '@types/node' - bufferutil - chokidar - encoding @@ -1074,19 +1129,19 @@ packages: - zod dev: true - /@moonwall/util@4.1.6(@types/node@20.5.6)(@vitest/ui@0.33.0)(typescript@5.2.2): - resolution: {integrity: sha512-eYIQbfTDIVxPHLiy7Bry4y9xcB04YIQ0JY5zYQD+Aq2oFjoPJawyKhLlTsr29cP0lrr5fbvomB5LPohWaDgcqQ==} + /@moonwall/util@4.3.1(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3)(typescript@5.2.2): + resolution: {integrity: sha512-QHboRMMOyciczjY9bVhkejFqEnlO+BaokfabPo1x78Ve9b1MAj0VGEtPfq1w0YHYUTQ1ViFW/gy5i0ke2zkb4A==} engines: {node: '>=14.16.0', pnpm: '>=7'} dependencies: '@moonbeam-network/api-augment': 0.2400.0 - '@moonwall/types': 4.1.6(@types/node@20.5.6)(typescript@5.2.2) - '@polkadot/api': 10.9.1 - '@polkadot/api-augment': 10.9.1 - '@polkadot/api-derive': 10.9.1 + '@moonwall/types': 4.3.1(typescript@5.2.2) + '@polkadot/api': 10.10.1 + '@polkadot/api-augment': 10.10.1 + '@polkadot/api-derive': 10.10.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) - '@polkadot/rpc-provider': 10.9.1 - '@polkadot/types': 10.9.1 - '@polkadot/types-codec': 10.9.1 + '@polkadot/rpc-provider': 10.10.1 + '@polkadot/types': 10.10.1 + '@polkadot/types-codec': 10.10.1 '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) bottleneck: 2.19.5 @@ -1096,17 +1151,17 @@ packages: colors: 1.4.0 debug: 4.3.4(supports-color@8.1.1) dotenv: 16.3.1 - ethers: 6.7.1 + ethers: 6.8.1 inquirer: 9.2.11 inquirer-press-to-continue: 1.2.0(inquirer@9.2.11) node-fetch: 3.3.2 rlp: 3.0.0 semver: 7.5.4 - viem: 1.16.0(typescript@5.2.2) - vitest: 0.34.6(@vitest/ui@0.33.0) - web3: 4.0.3 + viem: 1.18.9(typescript@5.2.2) + vitest: 1.0.0-beta.3(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3) + web3: 4.2.1(typescript@5.2.2) ws: 8.14.2 - yaml: 2.3.2 + yaml: 2.3.4 yargs: 17.7.2 transitivePeerDependencies: - '@edge-runtime/vm' @@ -1122,8 +1177,6 @@ packages: - jsdom - less - lightningcss - - playwright - - safaridriver - sass - stylus - sugarss @@ -1131,20 +1184,14 @@ packages: - terser - typescript - utf-8-validate - - webdriverio - zod dev: true - /@noble/curves@1.0.0: - resolution: {integrity: sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==} - dependencies: - '@noble/hashes': 1.3.0 - dev: true - /@noble/curves@1.1.0: resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==} dependencies: '@noble/hashes': 1.3.1 + dev: true /@noble/curves@1.2.0: resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -1158,13 +1205,10 @@ packages: resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==} dev: true - /@noble/hashes@1.3.0: - resolution: {integrity: sha512-ilHEACi9DwqJB0pw7kv+Apvh50jiiSyR/cQ3y4W7lOR5mhvn/50FLUfsnfJz0BDZtl/RR16kXvptiv6q1msYZg==} - dev: true - /@noble/hashes@1.3.1: resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} engines: {node: '>= 16'} + dev: true /@noble/hashes@1.3.2: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} @@ -1235,8 +1279,8 @@ packages: config-chain: 1.1.13 dev: true - /@polka/url@1.0.0-next.21: - resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} + /@polka/url@1.0.0-next.23: + resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} dev: true /@polkadot/api-augment@10.10.1: @@ -1264,12 +1308,13 @@ packages: '@polkadot/types': 10.9.1 '@polkadot/types-augment': 10.9.1 '@polkadot/types-codec': 10.9.1 - '@polkadot/util': 12.4.2 + '@polkadot/util': 12.5.1 tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate + dev: true /@polkadot/api-base@10.10.1: resolution: {integrity: sha512-joH2Ywxnn+AStkw+JWAdF3i3WJy4NcBYp0SWJM/WqGafWR/FuHnati2pcj/MHzkHT8JkBippmSSJFvsqRhlwcQ==} @@ -1291,13 +1336,14 @@ packages: dependencies: '@polkadot/rpc-core': 10.9.1 '@polkadot/types': 10.9.1 - '@polkadot/util': 12.4.2 + '@polkadot/util': 12.5.1 rxjs: 7.8.1 tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate + dev: true /@polkadot/api-derive@10.10.1: resolution: {integrity: sha512-Q9Ibs4eRPqdV8qnRzFPD3dlWNbLHxRqMqNTNPmNQwKPo5m6fcQbZ0UZy3yJ+PI9S4AQHGhsWtfoi5qW8006GHQ==} @@ -1336,6 +1382,7 @@ packages: - bufferutil - supports-color - utf-8-validate + dev: true /@polkadot/api@10.10.1: resolution: {integrity: sha512-YHVkmNvjGF4Eg3thAbVhj9UX3SXx+Yxk6yVuzsEcckEudIRHzL2ikIWGCfUprfzSeFNpUCKdJIi1tsxVHtA7Tg==} @@ -1370,7 +1417,7 @@ packages: '@polkadot/api-augment': 10.9.1 '@polkadot/api-base': 10.9.1 '@polkadot/api-derive': 10.9.1 - '@polkadot/keyring': 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/rpc-augment': 10.9.1 '@polkadot/rpc-core': 10.9.1 '@polkadot/rpc-provider': 10.9.1 @@ -1379,8 +1426,8 @@ packages: '@polkadot/types-codec': 10.9.1 '@polkadot/types-create': 10.9.1 '@polkadot/types-known': 10.9.1 - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) + '@polkadot/util': 12.5.1 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) eventemitter3: 5.0.1 rxjs: 7.8.1 tslib: 2.6.2 @@ -1388,17 +1435,7 @@ packages: - bufferutil - supports-color - utf-8-validate - - /@polkadot/keyring@12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2): - resolution: {integrity: sha512-VH91feSL6GiVVLcJ6V8h6jIAuq62bfvhM75AMcjTFol6MDqFl25jdjkHfZ2bQhig330LIhLw89nKdYr2/OfwjA==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2 - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) - tslib: 2.6.2 + dev: true /@polkadot/keyring@12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1): resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==} @@ -1418,6 +1455,7 @@ packages: '@polkadot/util': 12.4.2 '@substrate/ss58-registry': 1.43.0 tslib: 2.6.2 + dev: true /@polkadot/networks@12.5.1: resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==} @@ -1454,6 +1492,7 @@ packages: - bufferutil - supports-color - utf-8-validate + dev: true /@polkadot/rpc-core@10.10.1: resolution: {integrity: sha512-awfFfJYsVF6W4DrqTj5RP00SSDRNB770FIoe1QE1Op4NcSrfeLpwh54HUJS716f4l5mOSYuvMp+zCbKzt8zKow==} @@ -1477,13 +1516,14 @@ packages: '@polkadot/rpc-augment': 10.9.1 '@polkadot/rpc-provider': 10.9.1 '@polkadot/types': 10.9.1 - '@polkadot/util': 12.4.2 + '@polkadot/util': 12.5.1 rxjs: 7.8.1 tslib: 2.6.2 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate + dev: true /@polkadot/rpc-provider@10.10.1: resolution: {integrity: sha512-VMDWoJgx6/mPHAOT66Sq+Jf2lJABfV/ZUIXtT2k8HjOndbm6oKrFqGEOSSLvB2q4olDee3FkFFxkyW1s6k4JaQ==} @@ -1530,6 +1570,7 @@ packages: - bufferutil - supports-color - utf-8-validate + dev: true /@polkadot/typegen@10.9.1: resolution: {integrity: sha512-SbG9U8/POyY8QwQUp70qzTnYsRxc6Rrjt4wzIWsBKmzVRy0i19O23EXSUo+81ukOBiLZj551GAJwRa3YBpdR+A==} @@ -1574,6 +1615,7 @@ packages: '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 tslib: 2.6.2 + dev: true /@polkadot/types-codec@10.10.1: resolution: {integrity: sha512-ETPG0wzWzt/bDKRQmYbO7CLe/0lUt8VrG6/bECdv+Kye+8Qedba2LZyTWm/9f2ngms8TZ82yI8mPv/mozdtfnw==} @@ -1587,9 +1629,10 @@ packages: resolution: {integrity: sha512-mJ5OegKGraY1FLvEa8FopRCr3pQrhDkcn5RNOjmgJQozENVeRaxhk0NwxYz7IojFvSDnKnc6lNQfKaaSe5pLHg==} engines: {node: '>=16'} dependencies: - '@polkadot/util': 12.4.2 + '@polkadot/util': 12.5.1 '@polkadot/x-bigint': 12.4.2 tslib: 2.6.2 + dev: true /@polkadot/types-create@10.10.1: resolution: {integrity: sha512-7OiLzd+Ter5zrpjP7fDwA1m89kd38VvMVixfOSv8x7ld2pDT+yyyKl14TCwRSWrKWCMtIb6M3iasPhq5cUa7cw==} @@ -1606,6 +1649,7 @@ packages: '@polkadot/types-codec': 10.9.1 '@polkadot/util': 12.5.1 tslib: 2.6.2 + dev: true /@polkadot/types-known@10.10.1: resolution: {integrity: sha512-yRa1lbDRqg3V/zoa0vSwdGOiYTIWktILW8OfkaLDExTu0GZBSbVHZlLAta52XVpA9Zww7mrUUC9+iernOwk//w==} @@ -1626,8 +1670,9 @@ packages: '@polkadot/types': 10.9.1 '@polkadot/types-codec': 10.9.1 '@polkadot/types-create': 10.9.1 - '@polkadot/util': 12.4.2 + '@polkadot/util': 12.5.1 tslib: 2.6.2 + dev: true /@polkadot/types-support@10.10.1: resolution: {integrity: sha512-Cd2mwk9RG6LlX8X3H0bRY7wCTbZPqU3z38CMFhvNkFDAyjqKjtn8hpS4n8mMrZK2EwCs/MjQH1wb7rtFkaWmJw==} @@ -1642,6 +1687,7 @@ packages: dependencies: '@polkadot/util': 12.5.1 tslib: 2.6.2 + dev: true /@polkadot/types@10.10.1: resolution: {integrity: sha512-Ben62P1tjYEhKag34GBGcLX6NqcFR1VD5nNbWaxgr+t36Jl/tlHs6P9DlbFqQP7Tt9FmGrAYY0m3oTkhjG1NzA==} @@ -1660,47 +1706,13 @@ packages: resolution: {integrity: sha512-AG33i2ZGGfq7u+5rkAdGrXAQHHl844/Yv+junH5ZzX69xiCoWO1bH/yzDUNBdpki2GlACWvF9nLYh3F2tVF93w==} engines: {node: '>=16'} dependencies: - '@polkadot/keyring': 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/types-augment': 10.9.1 '@polkadot/types-codec': 10.9.1 '@polkadot/types-create': 10.9.1 - '@polkadot/util': 12.4.2 - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) - rxjs: 7.8.1 - tslib: 2.6.2 - - /@polkadot/util-crypto@12.4.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-JP7OrEKYx35P3wWc2Iu9F6BfYMIkywXik908zQqPxwoQhr8uDLP1Qoyu9Sws+hE97Yz1O4jBVvryS2le0yusog==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': 12.4.2 - dependencies: - '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.1 - '@polkadot/networks': 12.4.2 - '@polkadot/util': 12.4.2 - '@polkadot/wasm-crypto': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-bigint': 12.4.2 - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - '@scure/base': 1.1.1 - tslib: 2.6.2 - - /@polkadot/util-crypto@12.5.1(@polkadot/util@12.4.2): - resolution: {integrity: sha512-Y8ORbMcsM/VOqSG3DgqutRGQ8XXK+X9M3C8oOEI2Tji65ZsXbh9Yh+ryPLM0oBp/9vqOXjkLgZJbbVuQceOw0A==} - engines: {node: '>=16'} - peerDependencies: '@polkadot/util': 12.5.1 - dependencies: - '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@polkadot/networks': 12.5.1 - '@polkadot/util': 12.4.2 - '@polkadot/wasm-crypto': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-bigint': 12.5.1 - '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - '@scure/base': 1.1.3 + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + rxjs: 7.8.1 tslib: 2.6.2 dev: true @@ -1732,6 +1744,7 @@ packages: '@types/bn.js': 5.1.1 bn.js: 5.2.1 tslib: 2.6.2 + dev: true /@polkadot/util@12.5.1: resolution: {integrity: sha512-fDBZL7D4/baMG09Qowseo884m3QBzErGkRWNBId1UjWR99kyex+cIY9fOSzmuQxo6nLdJlLHw1Nz2caN3+Bq0A==} @@ -1745,31 +1758,6 @@ packages: bn.js: 5.2.1 tslib: 2.6.2 - /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): - resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - '@polkadot/x-randomvalues': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 - - /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1): - resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - '@polkadot/x-randomvalues': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 - dev: true - /@polkadot/wasm-bridge@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): resolution: {integrity: sha512-CgNENd65DVYtackOVXXRA0D1RPoCv5+77IdBCf7kNqu6LeAnR4nfTI6qjaApUdN1xRweUsQjSH7tu7VjkMOA0A==} engines: {node: '>=16'} @@ -1782,15 +1770,6 @@ packages: '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) tslib: 2.6.2 - /@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - dependencies: - '@polkadot/util': 12.4.2 - tslib: 2.6.2 - /@polkadot/wasm-crypto-asmjs@7.2.2(@polkadot/util@12.5.1): resolution: {integrity: sha512-wKg+cpsWQCTSVhjlHuNeB/184rxKqY3vaklacbLOMbUXieIfuDBav5PJdzS3yeiVE60TpYaHW4iX/5OYHS82gg==} engines: {node: '>=16'} @@ -1800,37 +1779,6 @@ packages: '@polkadot/util': 12.5.1 tslib: 2.6.2 - /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): - resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - '@polkadot/x-randomvalues': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 - - /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1): - resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - '@polkadot/x-randomvalues': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 - dev: true - /@polkadot/wasm-crypto-init@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): resolution: {integrity: sha512-vD4iPIp9x+SssUIWUenxWLPw4BVIwhXHNMpsV81egK990tvpyIxL205/EF5QRb1mKn8WfWcNFm5tYwwh9NdnnA==} engines: {node: '>=16'} @@ -1846,16 +1794,6 @@ packages: '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) tslib: 2.6.2 - /@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - tslib: 2.6.2 - /@polkadot/wasm-crypto-wasm@7.2.2(@polkadot/util@12.5.1): resolution: {integrity: sha512-3efoIB6jA3Hhv6k0YIBwCtlC8gCSWCk+R296yIXRLLr3cGN415KM/PO/d1JIXYI64lbrRzWRmZRhllw3jf6Atg==} engines: {node: '>=16'} @@ -1866,39 +1804,6 @@ packages: '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) tslib: 2.6.2 - /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2): - resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - '@polkadot/x-randomvalues': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-crypto-init': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.4.2) - '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 - - /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1): - resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - '@polkadot/x-randomvalues': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-bridge': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-crypto-asmjs': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-crypto-init': 7.2.2(@polkadot/util@12.4.2)(@polkadot/x-randomvalues@12.5.1) - '@polkadot/wasm-crypto-wasm': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2) - tslib: 2.6.2 - dev: true - /@polkadot/wasm-crypto@7.2.2(@polkadot/util@12.5.1)(@polkadot/x-randomvalues@12.5.1): resolution: {integrity: sha512-1ZY1rxUTawYm0m1zylvBMFovNIHYgG2v/XoASNp/EMG5c8FQIxCbhJRaTBA983GVq4lN/IAKREKEp9ZbLLqssA==} engines: {node: '>=16'} @@ -1915,15 +1820,6 @@ packages: '@polkadot/x-randomvalues': 12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2) tslib: 2.6.2 - /@polkadot/wasm-util@7.2.2(@polkadot/util@12.4.2): - resolution: {integrity: sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': '*' - dependencies: - '@polkadot/util': 12.4.2 - tslib: 2.6.2 - /@polkadot/wasm-util@7.2.2(@polkadot/util@12.5.1): resolution: {integrity: sha512-N/25960ifCc56sBlJZ2h5UBpEPvxBmMLgwYsl7CUuT+ea2LuJW9Xh8VHDN/guYXwmm92/KvuendYkEUykpm/JQ==} engines: {node: '>=16'} @@ -1939,6 +1835,7 @@ packages: dependencies: '@polkadot/x-global': 12.4.2 tslib: 2.6.2 + dev: true /@polkadot/x-bigint@12.5.1: resolution: {integrity: sha512-Fw39eoN9v0sqxSzfSC5awaDVdzojIiE7d1hRSQgVSrES+8whWvtbYMR0qwbVhTuW7DvogHmye41P9xKMlXZysg==} @@ -1960,6 +1857,7 @@ packages: engines: {node: '>=16'} dependencies: tslib: 2.6.2 + dev: true /@polkadot/x-global@12.5.1: resolution: {integrity: sha512-6K0YtWEg0eXInDOihU5aSzeb1t9TiDdX9ZuRly+58ALSqw5kPZYmQLbzE1d8HWzyXRXK+YH65GtLzfMGqfYHmw==} @@ -1967,32 +1865,7 @@ packages: dependencies: tslib: 2.6.2 - /@polkadot/x-randomvalues@12.4.2(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2): - resolution: {integrity: sha512-HVlXRWY9RfN54RgfDroDy2itWmtTUtr119DfPl3wjnBf9i4wl/M+848OYlmCZCTpViTJrvWVSEJH9zVgchlNnw==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-global': 12.4.2 - tslib: 2.6.2 - - /@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.4.2)(@polkadot/wasm-util@7.2.2): - resolution: {integrity: sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': 12.5.1 - '@polkadot/wasm-util': '*' - dependencies: - '@polkadot/util': 12.4.2 - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) - '@polkadot/x-global': 12.5.1 - tslib: 2.6.2 - dev: true - - /@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2): + /@polkadot/x-randomvalues@12.5.1(@polkadot/util@12.5.1)(@polkadot/wasm-util@7.2.2): resolution: {integrity: sha512-UsMb1d+77EPNjW78BpHjZLIm4TaIpfqq89OhZP/6gDIoS2V9iE/AK3jOWKm1G7Y2F8XIoX1qzQpuMakjfagFoQ==} engines: {node: '>=16'} peerDependencies: @@ -2010,6 +1883,7 @@ packages: dependencies: '@polkadot/x-global': 12.4.2 tslib: 2.6.2 + dev: true /@polkadot/x-textdecoder@12.5.1: resolution: {integrity: sha512-j2YZGWfwhMC8nHW3BXq10fAPY02ObLL/qoTjCMJ1Cmc/OGq18Ep7k9cXXbjFAq3wf3tUUewt/u/hStKCk3IvfQ==} @@ -2024,6 +1898,7 @@ packages: dependencies: '@polkadot/x-global': 12.4.2 tslib: 2.6.2 + dev: true /@polkadot/x-textencoder@12.5.1: resolution: {integrity: sha512-1JNNpOGb4wD+c7zFuOqjibl49LPnHNr4rj4s3WflLUIZvOMY6euoDuN3ISjQSHCLlVSoH0sOCWA3qXZU4bCTDQ==} @@ -2078,18 +1953,11 @@ packages: /@scure/base@1.1.1: resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} + dev: true /@scure/base@1.1.3: resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} - /@scure/bip32@1.3.0: - resolution: {integrity: sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==} - dependencies: - '@noble/curves': 1.0.0 - '@noble/hashes': 1.3.1 - '@scure/base': 1.1.1 - dev: true - /@scure/bip32@1.3.1: resolution: {integrity: sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==} dependencies: @@ -2106,18 +1974,11 @@ packages: '@scure/base': 1.1.3 dev: true - /@scure/bip39@1.2.0: - resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} - dependencies: - '@noble/hashes': 1.3.1 - '@scure/base': 1.1.1 - dev: true - /@scure/bip39@1.2.1: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: - '@noble/hashes': 1.3.1 - '@scure/base': 1.1.1 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.3 dev: true /@sinclair/typebox@0.27.8: @@ -2143,6 +2004,7 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate + dev: true optional: true /@substrate/connect@0.7.33: @@ -2159,12 +2021,12 @@ packages: /@substrate/ss58-registry@1.43.0: resolution: {integrity: sha512-USEkXA46P9sqClL7PZv0QFsit4S8Im97wchKG0/H/9q3AT/S76r40UHfCr4Un7eBJPE23f7fU9BZ0ITpP9MCsA==} - /@tanssi/chopsticks-core@0.8.0-9(@polkadot/util@12.4.2)(debug@4.3.4): + /@tanssi/chopsticks-core@0.8.0-9(@polkadot/util@12.5.1)(debug@4.3.4): resolution: {integrity: sha512-j2Ds4JTP5IuOkZ5HMocuVrfDrxbX+VQOO3SnThz9vvqjfmN5ZO2kPDGkPtcK3laRoWUhlhcjZ/26RO6+tosPog==} dependencies: '@polkadot/api': 10.10.1 - '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.4.2) - '@tanssi/chopsticks-executor': 0.8.0-9(@polkadot/util@12.4.2) + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) + '@tanssi/chopsticks-executor': 0.8.0-9(@polkadot/util@12.5.1) axios: 1.4.0(debug@4.3.4) eventemitter3: 5.0.1 localforage: 1.10.0 @@ -2200,21 +2062,21 @@ packages: - utf-8-validate dev: true - /@tanssi/chopsticks-executor@0.8.0-9(@polkadot/util@12.4.2): + /@tanssi/chopsticks-executor@0.8.0-9(@polkadot/util@12.5.1): resolution: {integrity: sha512-+iW4HX7nmyp5NCrxzHsmvpsDxW/73ZE+BGoPrDVBRFMklnL8LG7BM0qTFtumAHxqVfgOMLWTs7nvt19MGanmNg==} dependencies: - '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.4.2) + '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) transitivePeerDependencies: - '@polkadot/util' dev: true - /@tanssi/chopsticks@0.8.0-9(@polkadot/util@12.4.2)(debug@4.3.4): + /@tanssi/chopsticks@0.8.0-9(@polkadot/util@12.5.1)(debug@4.3.4): resolution: {integrity: sha512-P/NDUtfcRx44oOtuLhg/H7EGDNMNJ/h0pKjlz+EMSvqknhyp05v6WYJjajnezKYY/ZekrXvnhlFQ+v0YZbVkZQ==} hasBin: true dependencies: '@pnpm/npm-conf': 2.2.2 '@polkadot/api': 10.10.1 - '@tanssi/chopsticks-core': 0.8.0-9(@polkadot/util@12.4.2)(debug@4.3.4) + '@tanssi/chopsticks-core': 0.8.0-9(@polkadot/util@12.5.1)(debug@4.3.4) axios: 1.4.0(debug@4.3.4) dotenv: 16.3.1 global-agent: 3.0.0 @@ -2277,16 +2139,6 @@ packages: dependencies: '@types/node': 20.5.6 - /@types/chai-subset@1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} - dependencies: - '@types/chai': 4.3.5 - dev: true - - /@types/chai@4.3.5: - resolution: {integrity: sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng==} - dev: true - /@types/debug@4.1.8: resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} dependencies: @@ -2317,6 +2169,12 @@ packages: /@types/node@20.5.6: resolution: {integrity: sha512-Gi5wRGPbbyOTX+4Y2iULQ27oUPrefaB0PxGQJnfyWN3kvEDGM3mIB5M/gQLmitZf7A9FmLeaqxD3L1CXpm3VKQ==} + /@types/node@20.9.0: + resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/semver@7.5.1: resolution: {integrity: sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==} dev: true @@ -2325,6 +2183,12 @@ packages: resolution: {integrity: sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==} dev: true + /@types/ws@8.5.3: + resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} + dependencies: + '@types/node': 20.5.6 + dev: true + /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: @@ -2462,123 +2326,66 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@vitest/expect@0.34.3: - resolution: {integrity: sha512-F8MTXZUYRBVsYL1uoIft1HHWhwDbSzwAU9Zgh8S6WFC3YgVb4AnFV2GXO3P5Em8FjEYaZtTnQYoNwwBrlOMXgg==} - dependencies: - '@vitest/spy': 0.34.3 - '@vitest/utils': 0.34.3 - chai: 4.3.7 - dev: true - - /@vitest/expect@0.34.6: - resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} + /@vitest/expect@1.0.0-beta.3: + resolution: {integrity: sha512-fbDKa7aj/xiCcS9X6RwlPXTZ5SNQpvPl0eswD+d3Lnp8gmuB8j2mb+CDUMe7VRg+ah5Cm/kqAc9DzYTe2IcvgQ==} dependencies: - '@vitest/spy': 0.34.6 - '@vitest/utils': 0.34.6 + '@vitest/spy': 1.0.0-beta.3 + '@vitest/utils': 1.0.0-beta.3 chai: 4.3.10 dev: true - /@vitest/runner@0.34.3: - resolution: {integrity: sha512-lYNq7N3vR57VMKMPLVvmJoiN4bqwzZ1euTW+XXYH5kzr3W/+xQG3b41xJn9ChJ3AhYOSoweu974S1V3qDcFESA==} + /@vitest/runner@1.0.0-beta.3: + resolution: {integrity: sha512-9xakpVjEpuFiyoCt42d0Ff/PiPOlBLQeKjEZbnT3LURi1M26llNVZ2I9ogDQipH3EH9IK0/xDfYAxOjs2jYaDw==} dependencies: - '@vitest/utils': 0.34.3 + '@vitest/utils': 1.0.0-beta.3 p-limit: 4.0.0 pathe: 1.1.1 dev: true - /@vitest/runner@0.34.6: - resolution: {integrity: sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==} + /@vitest/snapshot@1.0.0-beta.3: + resolution: {integrity: sha512-fun2daxMGuXo2wBi6ItFgUFl0xnN4v2hVXvIYGvoJG9SoPobfPlQ79MO8gMKOt++rWlUXNj7J23KHcoOyZ2Wwg==} dependencies: - '@vitest/utils': 0.34.6 - p-limit: 4.0.0 - pathe: 1.1.1 - dev: true - - /@vitest/snapshot@0.34.3: - resolution: {integrity: sha512-QyPaE15DQwbnIBp/yNJ8lbvXTZxS00kRly0kfFgAD5EYmCbYcA+1EEyRalc93M0gosL/xHeg3lKAClIXYpmUiQ==} - dependencies: - magic-string: 0.30.2 - pathe: 1.1.1 - pretty-format: 29.6.2 - dev: true - - /@vitest/snapshot@0.34.6: - resolution: {integrity: sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==} - dependencies: - magic-string: 0.30.2 + magic-string: 0.30.5 pathe: 1.1.1 - pretty-format: 29.6.2 - dev: true - - /@vitest/spy@0.34.3: - resolution: {integrity: sha512-N1V0RFQ6AI7CPgzBq9kzjRdPIgThC340DGjdKdPSE8r86aUSmeliTUgkTqLSgtEwWWsGfBQ+UetZWhK0BgJmkQ==} - dependencies: - tinyspy: 2.1.1 + pretty-format: 29.7.0 dev: true - /@vitest/spy@0.34.6: - resolution: {integrity: sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==} + /@vitest/spy@1.0.0-beta.3: + resolution: {integrity: sha512-ybwJagwd1f3awJixX9YWdGtZNHXbJozzEekRfYdHmTudPgIX5bxFCcH4cG/gtGY6VbVuvExwk0Es04bFx2YkLA==} dependencies: - tinyspy: 2.1.1 + tinyspy: 2.2.0 dev: true - /@vitest/ui@0.33.0(vitest@0.34.3): - resolution: {integrity: sha512-7gbAjLqt30R4bodkJAutdpy4ncv+u5IKTHYTow1c2q+FOxZUC9cKOSqMUxjwaaTwLN+EnDnmXYPtg3CoahaUzQ==} + /@vitest/ui@1.0.0-beta.3(vitest@1.0.0-beta.3): + resolution: {integrity: sha512-skfgBwRuR/6oJxABWYI1EjTfdiGsBLFnofVgwpS+huhBqmQAMC/cMJLCn8tCAKEhA8RhY/Kv0gpzbM8GOAlTBw==} peerDependencies: - vitest: '>=0.30.1 <1' + vitest: ^1.0.0-0 dependencies: - '@vitest/utils': 0.33.0 + '@vitest/utils': 1.0.0-beta.3 fast-glob: 3.3.1 - fflate: 0.8.0 + fflate: 0.8.1 flatted: 3.2.7 pathe: 1.1.1 picocolors: 1.0.0 sirv: 2.0.3 - vitest: 0.34.3(@vitest/ui@0.33.0) - dev: true - - /@vitest/utils@0.33.0: - resolution: {integrity: sha512-pF1w22ic965sv+EN6uoePkAOTkAPWM03Ri/jXNyMIKBb/XHLDPfhLvf/Fa9g0YECevAIz56oVYXhodLvLQ/awA==} - dependencies: - diff-sequences: 29.4.3 - loupe: 2.3.6 - pretty-format: 29.6.2 + vitest: 1.0.0-beta.3(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3) dev: true - /@vitest/utils@0.34.3: - resolution: {integrity: sha512-kiSnzLG6m/tiT0XEl4U2H8JDBjFtwVlaE8I3QfGiMFR0QvnRDfYfdP3YvTBWM/6iJDAyaPY6yVQiCTUc7ZzTHA==} + /@vitest/utils@1.0.0-beta.3: + resolution: {integrity: sha512-8j7Xg3A13kt78DqWJC3ludyMsBbKQn/LcX9wcULxZFMGQqmSkUFN8ij6JWFQs67w39T+clLWzPrV+NRxe+Mc9g==} dependencies: - diff-sequences: 29.4.3 - loupe: 2.3.6 - pretty-format: 29.6.2 - dev: true - - /@vitest/utils@0.34.6: - resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} - dependencies: - diff-sequences: 29.4.3 - loupe: 2.3.6 - pretty-format: 29.6.2 - dev: true - - /@wagmi/chains@1.7.0(typescript@5.2.2): - resolution: {integrity: sha512-TKVeHv0GqP5sV1yQ8BDGYToAFezPnCexbbBpeH14x7ywi5a1dDStPffpt9x+ytE6LJWkZ6pAMs/HNWXBQ5Nqmw==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - typescript: 5.2.2 + diff-sequences: 29.6.3 + loupe: 2.3.7 + pretty-format: 29.7.0 dev: true - /@zombienet/orchestrator@0.0.52(@polkadot/util@12.4.2)(@types/node@20.5.6): + /@zombienet/orchestrator@0.0.52(@polkadot/util@12.5.1)(@types/node@20.5.6): resolution: {integrity: sha512-69+MWhYtIqYFn3QF4dkUqB9pdlXb8tXpn5d8lDFNLyq12EClBGnDv2NmQVyWr9zgXSyTpvKmb/sAbRhxKjVdow==} engines: {node: '>=18'} dependencies: - '@polkadot/api': 10.9.1 - '@polkadot/keyring': 12.4.2(@polkadot/util-crypto@12.4.2)(@polkadot/util@12.4.2) - '@polkadot/util-crypto': 12.4.2(@polkadot/util@12.4.2) + '@polkadot/api': 10.10.1 + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) + '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) '@zombienet/utils': 0.0.21(@types/node@20.5.6)(typescript@5.2.2) JSONStream: 1.3.5 chai: 4.3.7 @@ -2607,14 +2414,14 @@ packages: - utf-8-validate dev: false - /@zombienet/orchestrator@0.0.56(@polkadot/util@12.5.1)(@types/node@20.5.6): - resolution: {integrity: sha512-8uLbWmzipDiuOfnNxsH8j17QZ70wZXvlLQzAWRZgis+741zpQ3ZCd8Jq0X3QiziXwAKTMMtZNLD4PLonWnDdrg==} + /@zombienet/orchestrator@0.0.62(@polkadot/util@12.5.1)(@types/node@20.5.6): + resolution: {integrity: sha512-nUX9/UrEv4k2kW7zOPBKIK6opaQ/7/QWQ4ZRfWooihM0k2cZ+HVeJ1AVXeDKnnbvaxfHG2/jrhIx5btuRYvbyQ==} engines: {node: '>=18'} dependencies: '@polkadot/api': 10.10.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - '@zombienet/utils': 0.0.22(@types/node@20.5.6)(typescript@5.2.2) + '@zombienet/utils': 0.0.24(@types/node@20.5.6)(typescript@5.2.2) JSONStream: 1.3.5 chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) @@ -2629,7 +2436,7 @@ packages: peer-id: 0.16.0 tmp-promise: 3.0.3 typescript: 5.2.2 - yaml: 2.3.2 + yaml: 2.3.4 transitivePeerDependencies: - '@polkadot/util' - '@swc/core' @@ -2678,8 +2485,8 @@ packages: - typescript dev: false - /@zombienet/utils@0.0.22(@types/node@20.5.6)(typescript@5.2.2): - resolution: {integrity: sha512-jr2RAP0jYxzHPFSIWJP3W0ctili7XpwH/cs3BGFUmCU/Nj3dqkZpMqEBoxMECGUNQ4MS3jdgDoqR86UcsALXWw==} + /@zombienet/utils@0.0.24(@types/node@20.5.6)(typescript@5.2.2): + resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} engines: {node: '>=18'} dependencies: cli-table3: 0.6.3 @@ -2697,6 +2504,25 @@ packages: - typescript dev: true + /@zombienet/utils@0.0.24(@types/node@20.9.0)(typescript@5.2.2): + resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} + engines: {node: '>=18'} + dependencies: + cli-table3: 0.6.3 + debug: 4.3.4(supports-color@8.1.1) + mocha: 10.2.0 + nunjucks: 3.2.4 + toml: 3.0.0 + ts-node: 10.9.1(@types/node@20.9.0)(typescript@5.2.2) + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - '@types/node' + - chokidar + - supports-color + - typescript + dev: true + /JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -2715,14 +2541,12 @@ packages: requiresBuild: true dev: true - /abitype@0.9.3(typescript@5.2.2): - resolution: {integrity: sha512-dz4qCQLurx97FQhnb/EIYTk/ldQ+oafEDUqC0VVIeQS1Q48/YWt/9YNfMmp9SLFqN41ktxny3c8aYxHjmFIB/w==} + /abitype@0.7.1(typescript@5.2.2): + resolution: {integrity: sha512-VBkRHTDZf9Myaek/dO3yMmOzB/y2s3Zo6nVU7yaw1G+TvCHAjwaJzNGN9yo4K5D8bU/VZXKP1EJpRhFr862PlQ==} peerDependencies: - typescript: '>=5.0.4' + typescript: '>=4.9.4' zod: ^3 >=3.19.1 peerDependenciesMeta: - typescript: - optional: true zod: optional: true dependencies: @@ -2762,11 +2586,22 @@ packages: resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} engines: {node: '>=0.4.0'} + /acorn-walk@8.3.0: + resolution: {integrity: sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==} + engines: {node: '>=0.4.0'} + dev: true + /acorn@8.10.0: resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} engines: {node: '>=0.4.0'} hasBin: true + /acorn@8.11.2: + resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /aes-js@4.0.0-beta.5: resolution: {integrity: sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==} dev: true @@ -2826,13 +2661,6 @@ packages: engines: {node: '>=12'} dev: true - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: true - /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -2929,6 +2757,16 @@ packages: - debug dev: true + /axios@1.6.1(debug@4.3.4): + resolution: {integrity: sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==} + dependencies: + follow-redirects: 1.15.3(debug@4.3.4) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: true + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -3074,7 +2912,7 @@ packages: check-error: 1.0.3 deep-eql: 4.1.3 get-func-name: 2.0.2 - loupe: 2.3.6 + loupe: 2.3.7 pathval: 1.1.1 type-detect: 4.0.8 dev: true @@ -3090,15 +2928,7 @@ packages: loupe: 2.3.6 pathval: 1.1.1 type-detect: 4.0.8 - - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true + dev: false /chalk@3.0.0: resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} @@ -3128,6 +2958,7 @@ packages: /check-error@1.0.2: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + dev: false /check-error@1.0.3: resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} @@ -3147,7 +2978,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} @@ -3237,22 +3068,12 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - dev: true - /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true - /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -3276,6 +3097,10 @@ packages: dependencies: delayed-stream: 1.0.0 + /comlink@4.4.1: + resolution: {integrity: sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q==} + dev: true + /command-exists@1.2.9: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} dev: true @@ -3329,6 +3154,14 @@ packages: - encoding dev: true + /cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -3463,8 +3296,8 @@ packages: resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==} dev: true - /diff-sequences@29.4.3: - resolution: {integrity: sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==} + /diff-sequences@29.6.3: + resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true @@ -3637,11 +3470,6 @@ packages: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - dev: true - /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -3767,6 +3595,22 @@ packages: - utf-8-validate dev: true + /ethers@6.8.1: + resolution: {integrity: sha512-iEKm6zox5h1lDn6scuRWdIdFJUCGg3+/aQWu0F4K0GVyEZiktFkqrJbRjTn1FlYEPz7RKA707D6g5Kdk6j7Ljg==} + engines: {node: '>=14.0.0'} + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.2.0 + '@noble/hashes': 1.3.2 + '@types/node': 18.15.13 + aes-js: 4.0.0-beta.5 + tslib: 2.4.0 + ws: 8.5.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -3775,6 +3619,7 @@ packages: /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} requiresBuild: true + dev: true optional: true /eventemitter3@5.0.1: @@ -3798,6 +3643,21 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.1.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + dev: true + /external-editor@3.1.0: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} @@ -3855,8 +3715,8 @@ packages: node-domexception: 1.0.0 web-streams-polyfill: 3.2.1 - /fflate@0.8.0: - resolution: {integrity: sha512-FAdS4qMuFjsJj6XHbBaZeXOgaypXp8iw/Tpyuq/w3XA41jjLHT8NPA+n7czH/DDhdncq0nAyDZmPeWXh2qmdIg==} + /fflate@0.8.1: + resolution: {integrity: sha512-/exOvEuc+/iaUm105QIiOt4LpBdMTWsXxqR0HDF35vx3fmaKzw7354gTilCh5rkzEt8WYyG//ku3h3nRmd7CHQ==} dev: true /figures@5.0.0: @@ -3915,6 +3775,18 @@ packages: debug: 4.3.4(supports-color@8.1.1) dev: true + /follow-redirects@1.15.3(debug@4.3.4): + resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dependencies: + debug: 4.3.4(supports-color@8.1.1) + dev: true + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -3953,8 +3825,8 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -4017,6 +3889,7 @@ packages: /get-func-name@2.0.0: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + dev: false /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} @@ -4035,6 +3908,11 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + dev: true + /get-tsconfig@4.7.0: resolution: {integrity: sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==} dependencies: @@ -4157,11 +4035,6 @@ packages: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} dev: true - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: true - /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -4278,6 +4151,11 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + dev: true + /humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} requiresBuild: true @@ -4298,6 +4176,10 @@ packages: dependencies: safer-buffer: 2.1.2 + /idb@7.1.1: + resolution: {integrity: sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==} + dev: true + /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -4546,6 +4428,11 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} + /is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -4600,24 +4487,24 @@ packages: events: 3.3.0 readable-stream: 3.6.2 - /isomorphic-ws@5.0.0(ws@8.12.0): + /isomorphic-ws@5.0.0(ws@8.13.0): resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} peerDependencies: ws: '*' dependencies: - ws: 8.12.0 + ws: 8.13.0 dev: true - /isomorphic-ws@5.0.0(ws@8.13.0): + /isomorphic-ws@5.0.0(ws@8.14.2): resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} peerDependencies: ws: '*' dependencies: - ws: 8.13.0 + ws: 8.14.2 dev: true - /isows@1.0.2(ws@8.13.0): - resolution: {integrity: sha512-ohHPFvRjcGLLA7uqHjIcGf5M3OrzN/k9QVYMGOvCppV/HY2GZdz7oFsJHT70ZXEL7ImrOGE1F9M0SovDGSfT6Q==} + /isows@1.0.3(ws@8.13.0): + resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} peerDependencies: ws: '*' dependencies: @@ -4700,15 +4587,6 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true - /jsondiffpatch@0.4.1: - resolution: {integrity: sha512-t0etAxTUk1w5MYdNOkZBZ8rvYYN5iL+2dHCCx/DpkFm/bW28M6y5nUS83D4XdZiHy35Fpaw6LBb+F88fHZnVCw==} - engines: {node: '>=8.17.0'} - hasBin: true - dependencies: - chalk: 2.4.2 - diff-match-patch: 1.0.5 - dev: true - /jsondiffpatch@0.5.0: resolution: {integrity: sha512-Quz3MvAwHxVYNXsOByL7xI5EB2WYOeFswqaHIA3qOK3isRWTxiplBEocmmru6XmxDB2L7jDNYtYA4FyimoAFEw==} engines: {node: '>=8.17.0'} @@ -4717,6 +4595,7 @@ packages: chalk: 3.0.0 diff-match-patch: 1.0.5 dev: true + bundledDependencies: [] /jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -4818,6 +4697,13 @@ packages: resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} dependencies: get-func-name: 2.0.0 + dev: false + + /loupe@2.3.7: + resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + dependencies: + get-func-name: 2.0.2 + dev: true /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} @@ -4826,8 +4712,8 @@ packages: yallist: 4.0.0 dev: true - /magic-string@0.30.2: - resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==} + /magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -5112,6 +4998,11 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + /mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + /minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} dev: true @@ -5222,13 +5113,13 @@ packages: hasBin: true dev: true - /mlly@1.4.0: - resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} + /mlly@1.4.2: + resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: - acorn: 8.10.0 + acorn: 8.11.2 pathe: 1.1.1 pkg-types: 1.0.3 - ufo: 1.2.0 + ufo: 1.3.1 dev: true /mocha@10.2.0: @@ -5298,8 +5189,8 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - /nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true @@ -5391,6 +5282,18 @@ packages: whatwg-url: 5.0.0 dev: true + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + /node-fetch@3.3.2: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -5443,6 +5346,13 @@ packages: dependencies: path-key: 3.1.1 + /npm-run-path@5.1.0: + resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true + /npmlog@5.0.1: resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} dependencies: @@ -5517,6 +5427,11 @@ packages: resolution: {integrity: sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==} dev: true + /on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} + dev: true + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: @@ -5528,6 +5443,13 @@ packages: dependencies: mimic-fn: 2.1.0 + /onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -5604,6 +5526,7 @@ packages: /pako@2.1.0: resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} requiresBuild: true + dev: true optional: true /parent-module@1.0.1: @@ -5644,6 +5567,11 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -5681,6 +5609,13 @@ packages: split2: 4.2.0 dev: true + /pino-abstract-transport@1.1.0: + resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} + dependencies: + readable-stream: 4.4.2 + split2: 4.2.0 + dev: true + /pino-pretty@10.2.0: resolution: {integrity: sha512-tRvpyEmGtc2D+Lr3FulIZ+R1baggQ4S3xD2Ar93KixFEDx6SEAUP3W5aYuEw1C73d6ROrNcB2IXLteW8itlwhA==} hasBin: true @@ -5701,6 +5636,26 @@ packages: strip-json-comments: 3.1.1 dev: true + /pino-pretty@10.2.3: + resolution: {integrity: sha512-4jfIUc8TC1GPUfDyMSlW1STeORqkoxec71yhxIpLDQapUu8WOuoz2TTCoidrIssyz78LZC69whBMPIKCMbi3cw==} + hasBin: true + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 3.0.1 + fast-safe-stringify: 2.1.1 + help-me: 4.2.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pump: 3.0.0 + readable-stream: 4.4.2 + secure-json-parse: 2.7.0 + sonic-boom: 3.7.0 + strip-json-comments: 3.1.1 + dev: true + /pino-std-serializers@6.2.2: resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} dev: true @@ -5722,25 +5677,42 @@ packages: thread-stream: 2.4.0 dev: true - /pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + /pino@8.16.1: + resolution: {integrity: sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA==} + hasBin: true dependencies: - jsonc-parser: 3.2.0 - mlly: 1.4.0 - pathe: 1.1.1 - dev: true - + atomic-sleep: 1.0.0 + fast-redact: 3.3.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pino-std-serializers: 6.2.2 + process-warning: 2.3.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 3.7.0 + thread-stream: 2.4.1 + dev: true + + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 1.4.2 + pathe: 1.1.1 + dev: true + /pnpm@8.6.12: resolution: {integrity: sha512-Eza4C5SO/Xl5IYozupbZ5NOA5leBRPYxmXmXfe7G4/4uCkRLhks84rB33aitxNZU/uMrnDGGjwrLktoKvPjqHA==} engines: {node: '>=16.14'} hasBin: true dev: true - /postcss@8.4.27: - resolution: {integrity: sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==} + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.6 + nanoid: 3.3.7 picocolors: 1.0.0 source-map-js: 1.0.2 dev: true @@ -5770,11 +5742,11 @@ packages: hasBin: true dev: true - /pretty-format@29.6.2: - resolution: {integrity: sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg==} + /pretty-format@29.7.0: + resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/schemas': 29.6.0 + '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 dev: true @@ -5783,6 +5755,10 @@ packages: resolution: {integrity: sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==} dev: true + /process-warning@2.3.0: + resolution: {integrity: sha512-N6mp1+2jpQr3oCFMz6SeHRGbv6Slb20bRhj4v3xR99HqNToAcOe1MFOp4tytyzOfJn+QtN8Rf7U/h2KAn4kC6g==} + dev: true + /process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} @@ -5993,12 +5969,12 @@ packages: sprintf-js: 1.1.2 dev: true - /rollup@3.28.0: - resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==} + /rollup@3.29.4: + resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /rrweb-cssom@0.6.0: @@ -6122,11 +6098,16 @@ packages: /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + /sirv@2.0.3: resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} engines: {node: '>= 10'} dependencies: - '@polka/url': 1.0.0-next.21 + '@polka/url': 1.0.0-next.23 mrmime: 1.0.1 totalist: 3.0.1 dev: true @@ -6152,6 +6133,7 @@ packages: transitivePeerDependencies: - bufferutil - utf-8-validate + dev: true optional: true /smoldot@2.0.1: @@ -6209,6 +6191,12 @@ packages: atomic-sleep: 1.0.0 dev: true + /sonic-boom@3.7.0: + resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} + dependencies: + atomic-sleep: 1.0.0 + dev: true + /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -6270,8 +6258,8 @@ packages: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true - /std-env@3.3.3: - resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} + /std-env@3.4.3: + resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} dev: true /stdin-discarder@0.1.0: @@ -6318,6 +6306,11 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + /strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -6325,14 +6318,7 @@ packages: /strip-literal@1.3.0: resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} dependencies: - acorn: 8.10.0 - dev: true - - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 + acorn: 8.11.2 dev: true /supports-color@7.2.0: @@ -6391,20 +6377,26 @@ packages: real-require: 0.2.0 dev: true + /thread-stream@2.4.1: + resolution: {integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==} + dependencies: + real-require: 0.2.0 + dev: true + /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - /tinybench@2.5.0: - resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} + /tinybench@2.5.1: + resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} dev: true - /tinypool@0.7.0: - resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + /tinypool@0.8.1: + resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==} engines: {node: '>=14.0.0'} dev: true - /tinyspy@2.1.1: - resolution: {integrity: sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==} + /tinyspy@2.2.0: + resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} engines: {node: '>=14.0.0'} dev: true @@ -6497,6 +6489,37 @@ packages: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + /ts-node@10.9.1(@types/node@20.9.0)(typescript@5.2.2): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.9.0 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.2.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + /tslib@2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} dev: true @@ -6512,7 +6535,7 @@ packages: '@esbuild-kit/core-utils': 3.1.0 '@esbuild-kit/esm-loader': 2.5.5 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /type-check@0.4.0: @@ -6630,8 +6653,8 @@ packages: engines: {node: '>=14.17'} hasBin: true - /ufo@1.2.0: - resolution: {integrity: sha512-RsPyTbqORDNDxqAdQPQBpgqhWle1VcTSou/FraClYlHf6TZnQcGslpLcAphNR+sQW4q5lLWLbOsRlh9j24baQg==} + /ufo@1.3.1: + resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} dev: true /uglify-js@3.17.4: @@ -6647,6 +6670,10 @@ packages: dependencies: multiformats: 9.9.0 + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + /unique-filename@1.1.1: resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} requiresBuild: true @@ -6721,8 +6748,8 @@ packages: /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - /viem@1.16.0(typescript@5.2.2): - resolution: {integrity: sha512-noRMxaMubiLbVrZ0tXKxUKNwle0QtF0wO6kBOWnm6wg6XIqptSW7xhFzrFdDRp8Jduu5rwwkCB4Tokd5MtFRtw==} + /viem@1.18.9(typescript@5.2.2): + resolution: {integrity: sha512-eAXtoTwAFA3YEgjTYMb5ZTQrDC0UPx5qyZ4sv90TirVKepcM9mBPksTkC1SSWya0UdxhBmhEBL/CiYMjmGCTWg==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -6735,7 +6762,7 @@ packages: '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 abitype: 0.9.8(typescript@5.2.2) - isows: 1.0.2(ws@8.13.0) + isows: 1.0.3(ws@8.13.0) typescript: 5.2.2 ws: 8.13.0 transitivePeerDependencies: @@ -6744,42 +6771,17 @@ packages: - zod dev: true - /viem@1.7.0(typescript@5.2.2): - resolution: {integrity: sha512-S4SclYe0Oca6TuPh2YPI3BzfC7a4UvN7TRDCWwpoVNnu9+4z2hqCZhW+6aF1yufgSwdezNsF14vztE/P4eMdBw==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@adraffy/ens-normalize': 1.9.0 - '@noble/curves': 1.1.0 - '@noble/hashes': 1.3.0 - '@scure/bip32': 1.3.0 - '@scure/bip39': 1.2.0 - '@types/ws': 8.5.5 - '@wagmi/chains': 1.7.0(typescript@5.2.2) - abitype: 0.9.3(typescript@5.2.2) - isomorphic-ws: 5.0.0(ws@8.12.0) - typescript: 5.2.2 - ws: 8.12.0 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - dev: true - - /vite-node@0.34.3(@types/node@20.5.6): - resolution: {integrity: sha512-+0TzJf1g0tYXj6tR2vEyiA42OPq68QkRZCu/ERSo2PtsDJfBpDyEfuKbRvLmZqi/CgC7SCBtyC+WjTGNMRIaig==} - engines: {node: '>=v14.18.0'} + /vite-node@1.0.0-beta.3(@types/node@20.5.6): + resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4(supports-color@8.1.1) - mlly: 1.4.0 + mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.9(@types/node@20.5.6) + vite: 4.5.0(@types/node@20.5.6) transitivePeerDependencies: - '@types/node' - less @@ -6791,30 +6793,8 @@ packages: - terser dev: true - /vite-node@0.34.6(@types/node@20.5.6): - resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} - engines: {node: '>=v14.18.0'} - hasBin: true - dependencies: - cac: 6.7.14 - debug: 4.3.4(supports-color@8.1.1) - mlly: 1.4.0 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 4.4.9(@types/node@20.5.6) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - /vite@4.4.9(@types/node@20.5.6): - resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} + /vite@4.5.0(@types/node@20.5.6): + resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -6843,93 +6823,27 @@ packages: dependencies: '@types/node': 20.5.6 esbuild: 0.18.20 - postcss: 8.4.27 - rollup: 3.28.0 + postcss: 8.4.31 + rollup: 3.29.4 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true - /vitest@0.34.3(@vitest/ui@0.33.0): - resolution: {integrity: sha512-7+VA5Iw4S3USYk+qwPxHl8plCMhA5rtfwMjgoQXMT7rO5ldWcdsdo3U1QD289JgglGK4WeOzgoLTsGFu6VISyQ==} - engines: {node: '>=v14.18.0'} + /vitest@1.0.0-beta.3(@types/node@20.5.6)(@vitest/ui@1.0.0-beta.3): + resolution: {integrity: sha512-Ytj70kgJq1MxWpS8U33nRwF7Mngzr0NxD6J1J8WZGZrYhGRktW3t0AwbjLyFg1URiW3ds6FSp/T3C8JEnP49cA==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 '@vitest/browser': '*' '@vitest/ui': '*' happy-dom: '*' jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - '@types/chai': 4.3.5 - '@types/chai-subset': 1.3.3 - '@types/node': 20.5.6 - '@vitest/expect': 0.34.3 - '@vitest/runner': 0.34.3 - '@vitest/snapshot': 0.34.3 - '@vitest/spy': 0.34.3 - '@vitest/ui': 0.33.0(vitest@0.34.3) - '@vitest/utils': 0.34.3 - acorn: 8.10.0 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.7 - debug: 4.3.4(supports-color@8.1.1) - local-pkg: 0.4.3 - magic-string: 0.30.2 - pathe: 1.1.1 - picocolors: 1.0.0 - std-env: 3.3.3 - strip-literal: 1.3.0 - tinybench: 2.5.0 - tinypool: 0.7.0 - vite: 4.4.9(@types/node@20.5.6) - vite-node: 0.34.3(@types/node@20.5.6) - why-is-node-running: 2.2.2 - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - - /vitest@0.34.6(@vitest/ui@0.33.0): - resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} - engines: {node: '>=v14.18.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' - peerDependenciesMeta: - '@edge-runtime/vm': + '@types/node': optional: true '@vitest/browser': optional: true @@ -6939,37 +6853,29 @@ packages: optional: true jsdom: optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true dependencies: - '@types/chai': 4.3.5 - '@types/chai-subset': 1.3.3 '@types/node': 20.5.6 - '@vitest/expect': 0.34.6 - '@vitest/runner': 0.34.6 - '@vitest/snapshot': 0.34.6 - '@vitest/spy': 0.34.6 - '@vitest/ui': 0.33.0(vitest@0.34.3) - '@vitest/utils': 0.34.6 - acorn: 8.10.0 - acorn-walk: 8.2.0 + '@vitest/expect': 1.0.0-beta.3 + '@vitest/runner': 1.0.0-beta.3 + '@vitest/snapshot': 1.0.0-beta.3 + '@vitest/spy': 1.0.0-beta.3 + '@vitest/ui': 1.0.0-beta.3(vitest@1.0.0-beta.3) + '@vitest/utils': 1.0.0-beta.3 + acorn: 8.11.2 + acorn-walk: 8.3.0 cac: 6.7.14 chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) local-pkg: 0.4.3 - magic-string: 0.30.2 + magic-string: 0.30.5 pathe: 1.1.1 picocolors: 1.0.0 - std-env: 3.3.3 + std-env: 3.4.3 strip-literal: 1.3.0 - tinybench: 2.5.0 - tinypool: 0.7.0 - vite: 4.4.9(@types/node@20.5.6) - vite-node: 0.34.6(@types/node@20.5.6) + tinybench: 2.5.1 + tinypool: 0.8.1 + vite: 4.5.0(@types/node@20.5.6) + vite-node: 1.0.0-beta.3(@types/node@20.5.6) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -7008,7 +6914,26 @@ packages: web3-utils: 4.0.3 web3-validator: 1.0.2 optionalDependencies: - web3-providers-ipc: 4.0.4 + web3-providers-ipc: 4.0.7 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: true + + /web3-core@4.3.1: + resolution: {integrity: sha512-xa3w5n/ESxp5HIbrwsYBhpAPx2KI5LprjRFEtRwP0GpqqhTcCSMMYoyItRqQQ+k9YnB0PoFpWJfJI6Qn5x8YUQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-errors: 1.1.4 + web3-eth-iban: 4.0.7 + web3-providers-http: 4.1.0 + web3-providers-ws: 4.0.7 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + optionalDependencies: + web3-providers-ipc: 4.0.7 transitivePeerDependencies: - bufferutil - encoding @@ -7022,14 +6947,13 @@ packages: web3-types: 1.0.2 dev: true - /web3-errors@1.1.0: - resolution: {integrity: sha512-XKkq4uLp/I75qid+/eXjc/veZywmcmsYy1yNZHePIS2riBcqTGKrdKiplyNCoVwY9OGWlKv9NpxZBd32k8a9mg==} + /web3-errors@1.1.4: + resolution: {integrity: sha512-WahtszSqILez+83AxGecVroyZsMuuRT+KmQp4Si5P4Rnqbczno1k748PCrZTS1J4UCPmXMG2/Vt+0Bz2zwXkwQ==} engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dependencies: - web3-types: 1.1.0 + web3-types: 1.3.1 dev: true - optional: true /web3-eth-abi@4.0.3: resolution: {integrity: sha512-is1sKkTna5LQri25iRbxJ43kQ6qlFR/Syi6dnpwsFua0qAyKuDTxLZDoMaBfdH8NvxvjuGWFUWALwuSk8gk5Xg==} @@ -7042,6 +6966,20 @@ packages: web3-utils: 4.0.3 dev: true + /web3-eth-abi@4.1.4(typescript@5.2.2): + resolution: {integrity: sha512-YLOBVVxxxLYKXjaiwZjEWYEnkMmmrm0nswZsvzSsINy/UgbWbzfoiZU+zn4YNWIEhORhx1p37iS3u/dP6VyC2w==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + abitype: 0.7.1(typescript@5.2.2) + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + transitivePeerDependencies: + - typescript + - zod + dev: true + /web3-eth-accounts@4.0.3: resolution: {integrity: sha512-qS4r25weJYlKzHPIneL3g33LG+I6QkRCs25ZtooK6elurlZY4HyRE04BIWv12xZswtsvdmMt4HysMUNKgLrgPg==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7055,6 +6993,19 @@ packages: web3-validator: 1.0.2 dev: true + /web3-eth-accounts@4.1.0: + resolution: {integrity: sha512-UFtAsOANsvihTQ6SSvOKguupmQkResyR9M9JNuOxYpKh7+3W+sTnbLXw2UbOSYIsKlc1mpqqW9bVr1SjqHDpUQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@ethereumjs/rlp': 4.0.1 + crc-32: 1.2.2 + ethereum-cryptography: 2.1.2 + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + dev: true + /web3-eth-contract@4.0.3: resolution: {integrity: sha512-x8YsIVVUeONwLCnUmswk5KD3luYxaKuN/xnSzxpb8fE4/KBA6eJswYcIGPrK9QILrVR26yDV/QQpgLU1IJS14g==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7072,6 +7023,25 @@ packages: - utf-8-validate dev: true + /web3-eth-contract@4.1.3(typescript@5.2.2): + resolution: {integrity: sha512-F6e3eyetUDiNOb78EDVJtNOb0H1GPz3xAZH8edSfYdhaxI9tTutP2V3p++kh2ZJ/RrdE2+xil7H/nPLgHymBvg==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.3.1 + web3-errors: 1.1.4 + web3-eth: 4.3.1(typescript@5.2.2) + web3-eth-abi: 4.1.4(typescript@5.2.2) + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + dev: true + /web3-eth-ens@4.0.3: resolution: {integrity: sha512-1tk1WWJB6lsViRFxHR9kt8qgfMV0cySeNBa8H/bZ9/HZ1G8L/c2cboVrG4D0QsPO1im1jQl4Cf3ceKH0PW1KZg==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7091,6 +7061,27 @@ packages: - utf-8-validate dev: true + /web3-eth-ens@4.0.8(typescript@5.2.2): + resolution: {integrity: sha512-nj0JfeD45BbzVJcVYpUJnSo8iwDcY9CQ7CZhhIVVOFjvpMAPw0zEwjTvZEIQyCW61OoDG9xcBzwxe2tZoYhMRw==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@adraffy/ens-normalize': 1.10.0 + web3-core: 4.3.1 + web3-errors: 1.1.4 + web3-eth: 4.3.1(typescript@5.2.2) + web3-eth-contract: 4.1.3(typescript@5.2.2) + web3-net: 4.0.7 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + dev: true + /web3-eth-iban@4.0.3: resolution: {integrity: sha512-9gn6fb034fh3DvQeutuhaG3J9+ZSriPC/O/H7K+lgUWJZh/lpaZy5A06nhHzNcleCWC07Q6J7d7VZlNjaBPtOA==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7101,6 +7092,16 @@ packages: web3-validator: 1.0.2 dev: true + /web3-eth-iban@4.0.7: + resolution: {integrity: sha512-8weKLa9KuKRzibC87vNLdkinpUE30gn0IGY027F8doeJdcPUfsa4IlBgNC4k4HLBembBB2CTU0Kr/HAOqMeYVQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + dev: true + /web3-eth-personal@4.0.3: resolution: {integrity: sha512-Gugz45w/D4wlUNbUth8iHWkv0c5fFZGWZqFvpACJul0z9h0Ou8HzuJMUv3U0xFOQJF5fniVegfp6l0FJQ3hGrQ==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7117,6 +7118,24 @@ packages: - utf-8-validate dev: true + /web3-eth-personal@4.0.8(typescript@5.2.2): + resolution: {integrity: sha512-sXeyLKJ7ddQdMxz1BZkAwImjqh7OmKxhXoBNF3isDmD4QDpMIwv/t237S3q4Z0sZQamPa/pHebJRWVuvP8jZdw==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.3.1 + web3-eth: 4.3.1(typescript@5.2.2) + web3-rpc-methods: 1.1.3 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + dev: true + /web3-eth@4.0.3: resolution: {integrity: sha512-4t1+lpqzk3ljubr0CKE9Ila82p2Pim6Bn7ZIruVfMt9AOA5wL6M0OeMTy0fWBODLJiZJ7R77Ugm0kvEVWD3lqg==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7138,6 +7157,29 @@ packages: - utf-8-validate dev: true + /web3-eth@4.3.1(typescript@5.2.2): + resolution: {integrity: sha512-zJir3GOXooHQT85JB8SrufE+Voo5TtXdjhf1D8IGXmxM8MrhI8AT+Pgt4siBTupJcu5hF17iGmTP/Nj2XnaibQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + setimmediate: 1.0.5 + web3-core: 4.3.1 + web3-errors: 1.1.4 + web3-eth-abi: 4.1.4(typescript@5.2.2) + web3-eth-accounts: 4.1.0 + web3-net: 4.0.7 + web3-providers-ws: 4.0.7 + web3-rpc-methods: 1.1.3 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + dev: true + /web3-net@4.0.3: resolution: {integrity: sha512-qe+stvVgYhO8AiPgDykZW5gS4mZ3GRWdQ8xn3eTvderresIMvdZYSAoUla2jWl1CgpcqzaoOSO9Pf8t43fr8SA==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7152,6 +7194,20 @@ packages: - utf-8-validate dev: true + /web3-net@4.0.7: + resolution: {integrity: sha512-SzEaXFrBjY25iQGk5myaOfO9ZyfTwQEa4l4Ps4HDNVMibgZji3WPzpjq8zomVHMwi8bRp6VV7YS71eEsX7zLow==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.3.1 + web3-rpc-methods: 1.1.3 + web3-types: 1.3.1 + web3-utils: 4.0.7 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: true + /web3-providers-http@4.0.3: resolution: {integrity: sha512-5E6nKjWrwlJdhGImOxyTnFDT6UcZu4waO6AJrENBRh2vdoCfP/Piiv3PLywHs71gwTMsAjy6CNPL5lZdGf+JQA==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7164,14 +7220,26 @@ packages: - encoding dev: true - /web3-providers-ipc@4.0.4: - resolution: {integrity: sha512-mKzyPggFAw9t+SG0fwsMKoH2npfCzpeUeKfhqaTC/HLIquoI7djOyfV+MPe2p8w9QmstB+OGdRzirVWp2op11A==} + /web3-providers-http@4.1.0: + resolution: {integrity: sha512-6qRUGAhJfVQM41E5t+re5IHYmb5hSaLc02BE2MaRQsz2xKA6RjmHpOA5h/+ojJxEpI9NI2CrfDKOAgtJfoUJQg==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + cross-fetch: 4.0.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-utils: 4.0.7 + transitivePeerDependencies: + - encoding + dev: true + + /web3-providers-ipc@4.0.7: + resolution: {integrity: sha512-YbNqY4zUvIaK2MHr1lQFE53/8t/ejHtJchrWn9zVbFMGXlTsOAbNoIoZWROrg1v+hCBvT2c9z8xt7e/+uz5p1g==} engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dependencies: - web3-errors: 1.1.0 - web3-types: 1.1.0 - web3-utils: 4.0.4 + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-utils: 4.0.7 dev: true optional: true @@ -7190,6 +7258,21 @@ packages: - utf-8-validate dev: true + /web3-providers-ws@4.0.7: + resolution: {integrity: sha512-n4Dal9/rQWjS7d6LjyEPM2R458V8blRm0eLJupDEJOOIBhGYlxw5/4FthZZ/cqB7y/sLVi7K09DdYx2MeRtU5w==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@types/ws': 8.5.3 + isomorphic-ws: 5.0.0(ws@8.14.2) + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-utils: 4.0.7 + ws: 8.14.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + /web3-rpc-methods@1.0.2: resolution: {integrity: sha512-VhLHvgR62JUNgo0op8hP4LcRkvdF0WaHD9xhcEKGLcri9VfYvR1yTZ3CVh6NTgRCmfDePObbp5blHfbla1cC5Q==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -7203,17 +7286,29 @@ packages: - utf-8-validate dev: true + /web3-rpc-methods@1.1.3: + resolution: {integrity: sha512-XB6SsCZZPdZUMPIRqDxJkZFKMu0/Y+yaExAt+Z7RqmuM7xF55fJ/Qb84LQho8zarvUoYziy4jnIfs+SXImxQUw==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.3.1 + web3-types: 1.3.1 + web3-validator: 2.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: true + /web3-types@1.0.2: resolution: {integrity: sha512-tLzA9vevGGWdHlxXvPRJjEIIR0UnZBI5Kq9qiENRS/vSekTHAHp7u+WGDxt+6kP105gKlbep50TogQIvJqLfnA==} engines: {node: '>=14', npm: '>=6.12.0'} dev: true - /web3-types@1.1.0: - resolution: {integrity: sha512-t/2kx8Is0EmQQYu+UU7riGmJB4oN4232r7r/mA7ZZmkBg3BjZmJGHhnmCllZOigbzdWBfw/rrxe+sLCKN+eDug==} + /web3-types@1.3.1: + resolution: {integrity: sha512-8fXi7h/t95VKRtgU4sxprLPZpsTh3jYDfSghshIDBgUD/OoGe5S+syP24SUzBZYllZ/L+hMr2gdp/0bGJa8pYQ==} engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dev: true - optional: true /web3-utils@4.0.3: resolution: {integrity: sha512-clBvm/vWR2mAc9nPnsPYBZMikIhVG9RAsXdrxvXI4e2jAQ3DTtHKMhqy+Cl214dQaAdAEYyVb5ILW5lKKqk2vA==} @@ -7225,17 +7320,16 @@ packages: web3-validator: 1.0.2 dev: true - /web3-utils@4.0.4: - resolution: {integrity: sha512-DuoAMY6RQkiKsQ0fAHv+oAAYmCPWRv4PJMDsy5CJN5JaW021JtXtPsEQtVIQ3iYzgQgr3SRBfGyE78WyroIkdg==} + /web3-utils@4.0.7: + resolution: {integrity: sha512-sy8S6C2FIa5NNHc8DjND+Fx3S8KDAizuh5RbL1RX3h0PRbFgPfWzF5RfUns8gTt0mjJuOhs/IaDhrZfeTszG5A==} engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dependencies: ethereum-cryptography: 2.1.2 - web3-errors: 1.1.0 - web3-types: 1.1.0 - web3-validator: 2.0.0 + web3-errors: 1.1.4 + web3-types: 1.3.1 + web3-validator: 2.0.3 dev: true - optional: true /web3-validator@1.0.2: resolution: {integrity: sha512-orx1CQAEnwJUnl/8iF2II2zSA4wiooNJvFmVE0Dbmt/kE370SugIDViQP76snhxtouG2AXzz4GyKbPCMlLGh/A==} @@ -7248,18 +7342,17 @@ packages: web3-types: 1.0.2 dev: true - /web3-validator@2.0.0: - resolution: {integrity: sha512-JGOuJFX4mjBMaR7e0VI1xrBXDHz1Z6+824eJiJZFaGOt1kjMsrbYX/z4cHJ8rgv+DdZqIFjOlxsAVJV5T8ODXQ==} + /web3-validator@2.0.3: + resolution: {integrity: sha512-fJbAQh+9LSNWy+l5Ze6HABreml8fra98o5+vS073T35jUcLbRZ0IOjF/ZPJhJNbJDt+jP1vseZsc3z3uX9mxxQ==} engines: {node: '>=14', npm: '>=6.12.0'} requiresBuild: true dependencies: ethereum-cryptography: 2.1.2 util: 0.12.5 - web3-errors: 1.1.0 - web3-types: 1.1.0 - zod: 3.22.2 + web3-errors: 1.1.4 + web3-types: 1.3.1 + zod: 3.22.4 dev: true - optional: true /web3@4.0.3: resolution: {integrity: sha512-rUMxui5f52yPWjiMRQV6xqIrTQSovYM2CNhl57y+xj/fGXNLbI1D5FsLPnUMZjMaFHJBTteaBxq/sTEaw/1jNA==} @@ -7287,6 +7380,34 @@ packages: - utf-8-validate dev: true + /web3@4.2.1(typescript@5.2.2): + resolution: {integrity: sha512-zSB+Ds1lSMu/IhAX0xKhiFI7ZA1BQ6y2WOqFE9ikqPjaMkpOEBBkl61nzWfLJRoerTB1ohEXAP20jLDXcFd4hQ==} + engines: {node: '>=14.0.0', npm: '>=6.12.0'} + dependencies: + web3-core: 4.3.1 + web3-errors: 1.1.4 + web3-eth: 4.3.1(typescript@5.2.2) + web3-eth-abi: 4.1.4(typescript@5.2.2) + web3-eth-accounts: 4.1.0 + web3-eth-contract: 4.1.3(typescript@5.2.2) + web3-eth-ens: 4.0.8(typescript@5.2.2) + web3-eth-iban: 4.0.7 + web3-eth-personal: 4.0.8(typescript@5.2.2) + web3-net: 4.0.7 + web3-providers-http: 4.1.0 + web3-providers-ws: 4.0.7 + web3-rpc-methods: 1.1.3 + web3-types: 1.3.1 + web3-utils: 4.0.7 + web3-validator: 2.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - typescript + - utf-8-validate + - zod + dev: true + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: true @@ -7397,19 +7518,6 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /ws@8.12.0: - resolution: {integrity: sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: true - /ws@8.13.0: resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} engines: {node: '>=10.0.0'} @@ -7472,8 +7580,8 @@ packages: engines: {node: '>= 14'} dev: false - /yaml@2.3.2: - resolution: {integrity: sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==} + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} dev: true @@ -7536,3 +7644,8 @@ packages: /zod@3.22.2: resolution: {integrity: sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==} dev: true + + /zod@3.22.4: + resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + requiresBuild: true + dev: true diff --git a/test/contracts/solidity/Batch.sol b/test/contracts/solidity/Batch.sol new file mode 100644 index 000000000..f24c6146b --- /dev/null +++ b/test/contracts/solidity/Batch.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >=0.8.3; + +/// @dev The Batch contract's address. +address constant BATCH_ADDRESS = 0x0000000000000000000000000000000000000801; + +/// @dev The Batch contract's instance. +Batch constant BATCH_CONTRACT = Batch(BATCH_ADDRESS); + +/// @author The Moonbeam Team +/// @title Batch precompile +/// @dev Allows to perform multiple calls throught one call to the precompile. +/// Can be used by EOA to do multiple calls in a single transaction. +/// @custom:address 0x0000000000000000000000000000000000000801 +interface Batch { + /// @dev Batch multiple calls into a single transaction. + /// All calls are performed from the address calling this precompile. + /// + /// In case of one subcall reverting following subcalls will still be attempted. + /// + /// @param to List of addresses to call. + /// @param value List of values for each subcall. If array is shorter than "to" then additional + /// calls will be performed with a value of 0. + /// @param callData Call data for each `to` address. If array is shorter than "to" then + /// additional calls will be performed with an empty call data. + /// @param gasLimit Gas limit for each `to` address. Use 0 to forward all the remaining gas. + /// If array is shorter than "to" then the remaining gas available will be used. + /// @custom:selector 79df4b9c + function batchSome( + address[] memory to, + uint256[] memory value, + bytes[] memory callData, + uint64[] memory gasLimit + ) external; + + /// @dev Batch multiple calls into a single transaction. + /// All calls are performed from the address calling this precompile. + /// + /// In case of one subcall reverting, no more subcalls will be executed but + /// the batch transaction will succeed. Use batchAll to revert on any subcall revert. + /// + /// @param to List of addresses to call. + /// @param value List of values for each subcall. If array is shorter than "to" then additional + /// calls will be performed with a value of 0. + /// @param callData Call data for each `to` address. If array is shorter than "to" then + /// additional calls will be performed with an empty call data. + /// @param gasLimit Gas limit for each `to` address. Use 0 to forward all the remaining gas. + /// If array is shorter than "to" then the remaining gas available will be used. + /// @custom:selector cf0491c7 + function batchSomeUntilFailure( + address[] memory to, + uint256[] memory value, + bytes[] memory callData, + uint64[] memory gasLimit + ) external; + + /// @dev Batch multiple calls into a single transaction. + /// All calls are performed from the address calling this precompile. + /// + /// In case of one subcall reverting, the entire batch will revert. + /// + /// @param to List of addresses to call. + /// @param value List of values for each subcall. If array is shorter than "to" then additional + /// calls will be performed with a value of 0. + /// @param callData Call data for each `to` address. If array is shorter than "to" then + /// additional calls will be performed with an empty call data. + /// @param gasLimit Gas limit for each `to` address. Use 0 to forward all the remaining gas. + /// If array is shorter than "to" then the remaining gas available will be used. + /// @custom:selector 96e292b8 + function batchAll( + address[] memory to, + uint256[] memory value, + bytes[] memory callData, + uint64[] memory gasLimit + ) external; + + /// Emitted when a subcall succeeds. + event SubcallSucceeded(uint256 index); + + /// Emitted when a subcall fails. + event SubcallFailed(uint256 index); +} diff --git a/test/contracts/solidity/CallPermit.sol b/test/contracts/solidity/CallPermit.sol new file mode 100644 index 000000000..8747a4eac --- /dev/null +++ b/test/contracts/solidity/CallPermit.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >=0.8.3; + +/// @dev The CallPermit contract's address. +address constant CALL_PERMIT_ADDRESS = 0x0000000000000000000000000000000000000802; + +/// @dev The CallPermit contract's instance. +CallPermit constant CALL_PERMIT_CONTRACT = CallPermit(CALL_PERMIT_ADDRESS); + +/// @author The Moonbeam Team +/// @title Call Permit Interface +/// @dev The interface aims to be a general-purpose tool to perform gas-less transactions. It uses the EIP-712 standard, +/// and signed messages can be dispatched by another network participant with a transaction +/// @custom:address 0x0000000000000000000000000000000000000802 +interface CallPermit { + /// @dev Dispatch a call on the behalf of an other user with a EIP712 permit. + /// Will revert if the permit is not valid or if the dispatched call reverts or errors (such as + /// out of gas). + /// If successful the EIP712 nonce is increased to prevent this permit to be replayed. + /// @param from Who made the permit and want its call to be dispatched on their behalf. + /// @param to Which address the call is made to. + /// @param value Value being transferred from the "from" account. + /// @param data Call data + /// @param gaslimit Gaslimit the dispatched call requires. + /// Providing it prevents the dispatcher to manipulate the gaslimit. + /// @param deadline Deadline in UNIX seconds after which the permit will no longer be valid. + /// @param v V part of the signature. + /// @param r R part of the signature. + /// @param s S part of the signature. + /// @return output Output of the call. + /// @custom:selector b5ea0966 + function dispatch( + address from, + address to, + uint256 value, + bytes memory data, + uint64 gaslimit, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external returns (bytes memory output); + + /// @dev Returns the current nonce for given owner. + /// A permit must have this nonce to be consumed, which will + /// increase the nonce by one. + /// @custom:selector 7ecebe00 + function nonces(address owner) external view returns (uint256); + + /// @dev Returns the EIP712 domain separator. It is used to avoid replay + /// attacks across assets or other similar EIP712 message structures. + /// @custom:selector 3644e515 + function DOMAIN_SEPARATOR() external view returns (bytes32); +} diff --git a/test/contracts/solidity/CallPermitDemo.sol b/test/contracts/solidity/CallPermitDemo.sol new file mode 100644 index 000000000..7c5b58865 --- /dev/null +++ b/test/contracts/solidity/CallPermitDemo.sol @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >=0.8.3; + +import "./CallPermit.sol"; + +/// @notice Smart contract to demonstrate how to use Call Permit precompile +contract CallPermitDemo { + /// @notice The bond amount is too low + error BondAmountTooLow(uint256 value, uint256 required); + + /// @notice The bond does not exist + error NoBond(); + + /// @notice The bond already exists + error AlreadyBonded(); + + /// @notice A user bonded + event Bonded(address indexed who, uint256 amount); + + /// @notice A user bonded on behalf of someone else + event BondedFor(address via, address indexed who, uint256 amount); + + /// @notice A user unbonded + event Unbonded(address indexed who, uint256 amount); + + /// @notice The fixed amound that needs to be bonded + uint256 public BOND_AMOUNT = 100; + + /// @notice The total pooled amount + uint256 public bondedAmount; + + /// @notice A mapping of bond per account + mapping(address => uint256) bonds; + + /// @notice The owner of the contract + address owner; + + constructor() { + owner = msg.sender; + bondedAmount = 0; + } + + /// @notice Bonds BOND_AMOUNT on someone else's behalf using a signed EIP712 Message + /// @param from The real signer of the permit + /// @param gaslimit The maximum gas limit + /// @param deadline The deadline for the permit + /// @param v The v parameter of the permit signature + /// @param r The r parameter of the permit signature + /// @param s The s parameter of the permit signature + /// @dev the request is fulfilled + function bondFor( + address from, + uint64 gaslimit, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external { + uint256 bondAmount = bonds[from]; + if (bondAmount != 0) { + revert AlreadyBonded(); + } + + CALL_PERMIT_CONTRACT.dispatch( + from, + address(this), + BOND_AMOUNT, + "", // transfer + gaslimit, + deadline, + v, + r, + s + ); + + bonds[from] = BOND_AMOUNT; + bondedAmount += BOND_AMOUNT; + } + + /// @notice Bonds BOND_AMOUNT towards the pool + function bond() external payable { + address sender = msg.sender; + uint256 amount = msg.value; + uint256 bondAmount = bonds[sender]; + + if (bondAmount != 0) { + revert AlreadyBonded(); + } + + if (amount < BOND_AMOUNT) { + revert BondAmountTooLow(amount, BOND_AMOUNT); + } + + bonds[sender] += amount; + bondedAmount += amount; + } + + /// @notice Unbonds BOND_AMOUNT from the pool + function unbond() external { + address payable sender = payable(msg.sender); + uint256 bondAmount = bonds[sender]; + if (bondAmount == 0) { + revert NoBond(); + } + + bonds[sender] -= bondAmount; + bondedAmount -= bondAmount; + + sender.transfer(bondAmount); + } + + /// @notice Returns the total bonded account + function getBondAmount(address who) external view returns (uint256) { + return bonds[who]; + } + + /// @notice Receive funds + /// @dev This is needed to allow the contract to accept transfers via call permit + receive() external payable {} + + modifier onlyOwner() { + require(msg.sender == owner); + _; + } +} diff --git a/test/contracts/solidity/ERC20.sol b/test/contracts/solidity/ERC20.sol new file mode 100644 index 000000000..a9bbbeaa3 --- /dev/null +++ b/test/contracts/solidity/ERC20.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >=0.8.3; + +/// @dev The IERC20 contract's address. +address constant IERC20_ADDRESS = 0x0000000000000000000000000000000000000800; + +/// @dev The IERC20 contract's instance. +IERC20 constant IERC20_CONTRACT = IERC20(IERC20_ADDRESS); + +/// @title ERC20 interface +/// @dev see https://github.com/ethereum/EIPs/issues/20 +/// @dev copied from https://github.com/OpenZeppelin/openzeppelin-contracts +/// @custom:address 0x0000000000000000000000000000000000000800 +interface IERC20 { + /// @dev Returns the name of the token. + /// @custom:selector 06fdde03 + function name() external view returns (string memory); + + /// @dev Returns the symbol of the token. + /// @custom:selector 95d89b41 + function symbol() external view returns (string memory); + + /// @dev Returns the decimals places of the token. + /// @custom:selector 313ce567 + function decimals() external view returns (uint8); + + /// @dev Total number of tokens in existence + /// @custom:selector 18160ddd + function totalSupply() external view returns (uint256); + + /// @dev Gets the balance of the specified address. + /// @custom:selector 70a08231 + /// @param owner The address to query the balance of. + /// @return An uint256 representing the amount owned by the passed address. + function balanceOf(address owner) external view returns (uint256); + + /// @dev Function to check the amount of tokens that an owner allowed to a spender. + /// @custom:selector dd62ed3e + /// @param owner address The address which owns the funds. + /// @param spender address The address which will spend the funds. + /// @return A uint256 specifying the amount of tokens still available for the spender. + function allowance(address owner, address spender) + external + view + returns (uint256); + + /// @dev Transfer token for a specified address + /// @custom:selector a9059cbb + /// @param to The address to transfer to. + /// @param value The amount to be transferred. + /// @return true if the transfer was succesful, revert otherwise. + function transfer(address to, uint256 value) external returns (bool); + + /// @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. + /// Beware that changing an allowance with this method brings the risk that someone may use both the old + /// and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this + /// race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: + /// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + /// @custom:selector 095ea7b3 + /// @param spender The address which will spend the funds. + /// @param value The amount of tokens to be spent. + /// @return true, this cannot fail + function approve(address spender, uint256 value) external returns (bool); + + /// @dev Transfer tokens from one address to another + /// @custom:selector 23b872dd + /// @param from address The address which you want to send tokens from + /// @param to address The address which you want to transfer to + /// @param value uint256 the amount of tokens to be transferred + /// @return true if the transfer was succesful, revert otherwise. + function transferFrom( + address from, + address to, + uint256 value + ) external returns (bool); + + /// @dev Event emited when a transfer has been performed. + /// @custom:selector ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef + /// @param from address The address sending the tokens + /// @param to address The address receiving the tokens. + /// @param value uint256 The amount of tokens transfered. + event Transfer(address indexed from, address indexed to, uint256 value); + + /// @dev Event emited when an approval has been registered. + /// @custom:selector 8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 + /// @param owner address Owner of the tokens. + /// @param spender address Allowed spender. + /// @param value uint256 Amount of tokens approved. + event Approval( + address indexed owner, + address indexed spender, + uint256 value + ); +} + +/// @title Native currency wrapper interface. +/// @dev Allow compatibility with dApps expecting this precompile to be +/// a WETH-like contract. +interface WrappedNativeCurrency { + /// @dev Provide compatibility for contracts that expect wETH design. + /// Returns funds to sender as this precompile tokens and the native tokens are the same. + /// @custom:selector d0e30db0 + function deposit() external payable; + + /// @dev Provide compatibility for contracts that expect wETH design. + /// Does nothing. + /// @custom:selector 2e1a7d4d + /// @param value uint256 The amount to withdraw/unwrap. + function withdraw(uint256 value) external; + + /// @dev Event emited when deposit() has been called. + /// @custom:selector e1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c + /// @param owner address Owner of the tokens + /// @param value uint256 The amount of tokens "wrapped". + event Deposit(address indexed owner, uint256 value); + + /// @dev Event emited when withdraw(uint256) has been called. + /// @custom:selector 7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65 + /// @param owner address Owner of the tokens + /// @param value uint256 The amount of tokens "unwrapped". + event Withdrawal(address indexed owner, uint256 value); +} diff --git a/test/contracts/solidity/XcmUtils.sol b/test/contracts/solidity/XcmUtils.sol new file mode 100644 index 000000000..dd4afbef4 --- /dev/null +++ b/test/contracts/solidity/XcmUtils.sol @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity >=0.8.3; + +/// @author The Moonbeam Team +/// @title Xcm Utils Interface +/// The interface through which solidity contracts will interact with xcm utils pallet +/// @custom:address 0x0000000000000000000000000000000000000803 +interface XcmUtils { + // A multilocation is defined by its number of parents and the encoded junctions (interior) + struct Multilocation { + uint8 parents; + bytes[] interior; + } + + /// Get retrieve the account associated to a given MultiLocation + /// @custom:selector 343b3e00 + /// @param multilocation The multilocation that we want to know to which account maps to + /// @return account The account the multilocation maps to in this chain + function multilocationToAddress(Multilocation memory multilocation) + external + view + returns (address account); + + /// Get the weight that a message will consume in our chain + /// @custom:selector 25d54154 + /// @param message scale encoded xcm mversioned xcm message + function weightMessage(bytes memory message) + external + view + returns (uint64 weight); + + /// Get units per second charged for a given multilocation + /// @custom:selector 3f0f65db + /// @param multilocation scale encoded xcm mversioned xcm message + function getUnitsPerSecond(Multilocation memory multilocation) + external + view + returns (uint256 unitsPerSecond); + + /// Execute custom xcm message + /// @dev This function CANNOT be called from a smart contract + /// @custom:selector 34334a02 + /// @param message The versioned message to be executed scale encoded + /// @param maxWeight The maximum weight to be consumed + function xcmExecute(bytes memory message, uint64 maxWeight) external; + + /// Send custom xcm message + /// @custom:selector 98600e64 + /// @param dest The destination chain to which send this message + /// @param message The versioned message to be sent scale-encoded + function xcmSend(Multilocation memory dest, bytes memory message) external; +} diff --git a/test/helpers/eth-transactions.ts b/test/helpers/eth-transactions.ts new file mode 100644 index 000000000..6f981f35f --- /dev/null +++ b/test/helpers/eth-transactions.ts @@ -0,0 +1,63 @@ +import "@moonbeam-network/api-augment"; +import { DevModeContext, expect } from "@moonwall/cli"; +import { EventRecord } from "@polkadot/types/interfaces"; +import { + EvmCoreErrorExitError, + EvmCoreErrorExitFatal, + EvmCoreErrorExitReason, + EvmCoreErrorExitRevert, + EvmCoreErrorExitSucceed, +} from "@polkadot/types/lookup"; +export type Errors = { + Succeed: EvmCoreErrorExitSucceed["type"]; + Error: EvmCoreErrorExitError["type"]; + Revert: EvmCoreErrorExitRevert["type"]; + Fatal: EvmCoreErrorExitFatal["type"]; +}; + + +export function expectEVMResult( + events: EventRecord[], + resultType: Type, + reason?: T[Type] +) { + expect(events, `Missing events, probably failed execution`).to.be.length.at.least(1); + const ethereumResult = events.find( + ({ event: { section, method } }) => section == "ethereum" && method == "Executed" + )!.event.data[3] as EvmCoreErrorExitReason; + + const foundReason = ethereumResult.isError + ? ethereumResult.asError.type + : ethereumResult.isFatal + ? ethereumResult.asFatal.type + : ethereumResult.isRevert + ? ethereumResult.asRevert.type + : ethereumResult.asSucceed.type; + + expect( + ethereumResult.type, + `Invalid EVM Execution - (${ethereumResult.type}.${foundReason})` + ).to.equal(resultType); + if (reason) { + if (ethereumResult.isError) { + expect( + ethereumResult.asError.type, + `Invalid EVM Execution ${ethereumResult.type} Reason` + ).to.equal(reason); + } else if (ethereumResult.isFatal) { + expect( + ethereumResult.asFatal.type, + `Invalid EVM Execution ${ethereumResult.type} Reason` + ).to.equal(reason); + } else if (ethereumResult.isRevert) { + expect( + ethereumResult.asRevert.type, + `Invalid EVM Execution ${ethereumResult.type} Reason` + ).to.equal(reason); + } else + expect( + ethereumResult.asSucceed.type, + `Invalid EVM Execution ${ethereumResult.type} Reason` + ).to.equal(reason); + } +} diff --git a/test/helpers/index.ts b/test/helpers/index.ts new file mode 100644 index 000000000..1d1846d1a --- /dev/null +++ b/test/helpers/index.ts @@ -0,0 +1,2 @@ +export * from "./eth-transactions"; +export * from "./xcm"; \ No newline at end of file diff --git a/test/helpers/xcm.ts b/test/helpers/xcm.ts new file mode 100644 index 000000000..b56438867 --- /dev/null +++ b/test/helpers/xcm.ts @@ -0,0 +1,24 @@ +import { DevModeContext } from "@moonwall/cli"; +import { u8aToHex } from "@polkadot/util"; + +export function descendOriginFromAddress20( + context: DevModeContext, + address: `0x${string}` = "0x0101010101010101010101010101010101010101", + paraId: number = 1 +) { + const toHash = new Uint8Array([ + ...new TextEncoder().encode("SiblingChain"), + ...context.polkadotJs().createType("Compact", paraId).toU8a(), + ...context + .polkadotJs() + .createType("Compact", "AccountKey20".length + 20) + .toU8a(), + ...new TextEncoder().encode("AccountKey20"), + ...context.polkadotJs().createType("AccountId", address).toU8a(), + ]); + + return { + originAddress: address, + descendOriginAddress: u8aToHex(context.polkadotJs().registry.hash(toHash).slice(0, 20)), + }; +} diff --git a/test/moonwall.config.json b/test/moonwall.config.json index e637d3194..688922017 100644 --- a/test/moonwall.config.json +++ b/test/moonwall.config.json @@ -27,7 +27,6 @@ "name": "dev_dancebox_specs", "testFileDir": ["suites/dancebox-specs"], "multiThreads": true, - "html": false, "foundation": { "type": "dev", "launchSpec": [ @@ -49,7 +48,7 @@ }, { "name": "dev_frontier_template", - "testFileDir": ["suites/dev-frontier-template", "suites/common"], + "testFileDir": ["suites/dev-frontier-template/test-precompiles", "suites/common"], "runScripts": ["pre-build-contracts.ts"], "multiThreads": true, "reporters": ["basic"], @@ -293,7 +292,7 @@ }, { "name": "chopsticks_stagenet_dancebox_upgrade", - "testFileDir": ["suites/rt-ugprade-chopsticks"], + "testFileDir": ["suites/rt-upgrade-chopsticks"], "foundation": { "type": "chopsticks", "rtUpgradePath": "../target/release/wbuild/dancebox-runtime/dancebox_runtime.compact.compressed.wasm", @@ -315,7 +314,7 @@ }, { "name": "chopsticks_dancebox_upgrade", - "testFileDir": ["suites/rt-ugprade-chopsticks"], + "testFileDir": ["suites/rt-upgrade-chopsticks"], "foundation": { "type": "chopsticks", "rtUpgradePath": "../target/release/wbuild/dancebox-runtime/dancebox_runtime.compact.compressed.wasm", diff --git a/test/package.json b/test/package.json index 1363261c2..2c8c30bc7 100644 --- a/test/package.json +++ b/test/package.json @@ -25,21 +25,21 @@ "devDependencies": { "@acala-network/chopsticks": "npm:@tanssi/chopsticks@^0.8.0-9", "@moonbeam-network/api-augment": "^0.2400.0", - "@moonwall/cli": "^4.1.6", - "@moonwall/util": "^4.1.6", - "@polkadot/api": "^10.9.1", - "@polkadot/api-augment": "^10.9.1", - "@polkadot/keyring": "^12.4.2", - "@polkadot/types": "^10.9.1", - "@polkadot/types-codec": "^10.9.1", - "@polkadot/util": "^12.4.2", - "@polkadot/util-crypto": "^12.4.2", + "@moonwall/cli": "^4.3.1", + "@moonwall/util": "^4.3.1", + "@polkadot/api": "^10.10.1", + "@polkadot/api-augment": "^10.10.1", + "@polkadot/keyring": "^12.5.1", + "@polkadot/types": "^10.10.1", + "@polkadot/types-codec": "^10.10.1", + "@polkadot/util": "^12.5.1", + "@polkadot/util-crypto": "^12.5.1", "@tanssi/api-augment": "workspace:*", "@types/debug": "^4.1.8", "@types/node": "^20.5.6", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", - "@vitest/ui": "^0.33.0", + "@vitest/ui": "1.0.0-beta.3", "@zombienet/utils": "^0.0.19", "bottleneck": "^2.19.5", "chalk": "^5.3.0", @@ -52,8 +52,8 @@ "solc": "^0.8.21", "tsx": "^3.12.7", "typescript": "^5.2.2", - "viem": "^1.7.0", - "vitest": "^0.34.3", + "viem": "^1.18.9", + "vitest": "1.0.0-beta.3", "web3": "4.0.3", "web3-providers-ws": "4.0.3", "yargs": "^17.7.2" diff --git a/test/suites/dev-frontier-template/test-precompiles/test-precompile-batch.ts b/test/suites/dev-frontier-template/test-precompiles/test-precompile-batch.ts new file mode 100644 index 000000000..edba8e294 --- /dev/null +++ b/test/suites/dev-frontier-template/test-precompiles/test-precompile-batch.ts @@ -0,0 +1,95 @@ +import { describeSuite, expect, fetchCompiledContract } from "@moonwall/cli"; +import { + BALTATHAR_ADDRESS, + CHARLETH_ADDRESS, + PRECOMPILE_BATCH_ADDRESS, + createViemTransaction, + sendRawTransaction, +} from "@moonwall/util"; +import { encodeFunctionData } from "viem"; + +describeSuite({ + id: "DF0901", + title: "Batch - All functions should consume the same gas", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + it({ + id: "T01", + title: "should consume the same gas", + test: async function () { + const { abi: batchInterface } = fetchCompiledContract("Batch"); + + // each tx have a different gas limit to ensure it doesn't impact gas used + const batchAllTx = await createViemTransaction(context, { + to: PRECOMPILE_BATCH_ADDRESS, + gas: 1114112n, + data: encodeFunctionData({ + abi: batchInterface, + functionName: "batchAll", + args: [ + [BALTATHAR_ADDRESS, CHARLETH_ADDRESS], + ["1000000000000000000", "2000000000000000000"], + [], + [], + ], + }), + }); + + const batchSomeTx = await createViemTransaction(context, { + to: PRECOMPILE_BATCH_ADDRESS, + gas: 1179648n, + nonce: 1, + data: encodeFunctionData({ + abi: batchInterface, + functionName: "batchSome", + args: [ + [BALTATHAR_ADDRESS, CHARLETH_ADDRESS], + ["1000000000000000000", "2000000000000000000"], + [], + [], + ], + }), + }); + + const batchSomeUntilFailureTx = await createViemTransaction(context, { + to: PRECOMPILE_BATCH_ADDRESS, + gas: 1245184n, + nonce: 2, + data: encodeFunctionData({ + abi: batchInterface, + functionName: "batchSomeUntilFailure", + args: [ + [BALTATHAR_ADDRESS, CHARLETH_ADDRESS], + ["1000000000000000000", "2000000000000000000"], + [], + [], + ], + }), + }); + + const batchAllResult = await sendRawTransaction(context, batchAllTx); + const batchSomeResult = await sendRawTransaction(context, batchSomeTx); + const batchSomeUntilFailureResult = await sendRawTransaction( + context, + batchSomeUntilFailureTx + ); + + await context.createBlock(); + + const batchAllReceipt = await context + .viem("public") + .getTransactionReceipt({ hash: batchAllResult as `0x${string}` }); + const batchSomeReceipt = await context + .viem("public") + .getTransactionReceipt({ hash: batchSomeResult as `0x${string}` }); + const batchSomeUntilFailureReceipt = await context + .viem("public") + .getTransactionReceipt({ hash: batchSomeUntilFailureResult as `0x${string}` }); + + expect(batchAllReceipt["gasUsed"]).to.equal(23320n); + expect(batchSomeReceipt["gasUsed"]).to.equal(23320n); + expect(batchSomeUntilFailureReceipt["gasUsed"]).to.equal(23320n); + }, + }); + }, +}); diff --git a/test/suites/dev-frontier-template/test-precompiles/test-precompile-call-permit.ts b/test/suites/dev-frontier-template/test-precompiles/test-precompile-call-permit.ts new file mode 100644 index 000000000..66fa69ffc --- /dev/null +++ b/test/suites/dev-frontier-template/test-precompiles/test-precompile-call-permit.ts @@ -0,0 +1,220 @@ +import { + expect, + beforeAll, + describeSuite, + fetchCompiledContract, + deployCreateCompiledContract, +} from "@moonwall/cli"; +import { + ALITH_ADDRESS, + BALTATHAR_ADDRESS, + BALTATHAR_PRIVATE_KEY, + createViemTransaction, +} from "@moonwall/util"; +import { Abi, encodeFunctionData, fromHex } from "viem"; +import { expectEVMResult } from "../../../helpers"; + +const PRECOMPILE_CALL_PERMIT_ADDRESS = "0x0000000000000000000000000000000000000802"; + +function getSignatureParameters(signature: string) { + const r = signature.slice(0, 66); // 32 bytes + const s = `0x${signature.slice(66, 130)}`; // 32 bytes + let v = fromHex(`0x${signature.slice(130, 132)}`, "number"); // 1 byte + + if (![27, 28].includes(v)) v += 27; // not sure why we coerce 27 + + return { + r, + s, + v, + }; +} + +describeSuite({ + id: "DF0902", + title: "Precompile - Call Permit - foo", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let callPermitDemoAbi: Abi; + let callPermitDemoAddr: `0x${string}`; + let callPermitAbi: Abi; + + beforeAll(async function () { + const { abi: demoAbi, contractAddress } = await deployCreateCompiledContract( + context, + "CallPermitDemo", + { + gas: 5_000_000n, + } + ); + + callPermitDemoAbi = demoAbi; + callPermitDemoAddr = contractAddress; + + const { abi: precompileAbi } = fetchCompiledContract("CallPermit"); + callPermitAbi = precompileAbi; + + const bondAmount = ( + await context.viem().call({ + to: callPermitDemoAddr, + data: encodeFunctionData({ + abi: callPermitDemoAbi, + functionName: "BOND_AMOUNT", + }), + }) + ).data; + + const { result: baltatharResult } = await context.createBlock( + createViemTransaction(context, { + privateKey: BALTATHAR_PRIVATE_KEY, + to: callPermitDemoAddr, + data: encodeFunctionData({ abi: callPermitDemoAbi, functionName: "bond" }), + value: fromHex(bondAmount!, "bigint"), + }) + ); + expectEVMResult(baltatharResult!.events, "Succeed"); + + // bond alice via baltathar using call permit + const alithNonceResult = ( + await context.viem().call({ + to: PRECOMPILE_CALL_PERMIT_ADDRESS, + data: encodeFunctionData({ + abi: callPermitAbi, + functionName: "nonces", + args: [ALITH_ADDRESS], + }), + }) + ).data; + + const signature = await context.viem().signTypedData({ + types: { + EIP712Domain: [ + { + name: "name", + type: "string", + }, + { + name: "version", + type: "string", + }, + { + name: "chainId", + type: "uint256", + }, + { + name: "verifyingContract", + type: "address", + }, + ], + CallPermit: [ + { + name: "from", + type: "address", + }, + { + name: "to", + type: "address", + }, + { + name: "value", + type: "uint256", + }, + { + name: "data", + type: "bytes", + }, + { + name: "gaslimit", + type: "uint64", + }, + { + name: "nonce", + type: "uint256", + }, + { + name: "deadline", + type: "uint256", + }, + ], + }, + primaryType: "CallPermit", + domain: { + name: "Call Permit Precompile", + version: "1", + chainId: 1281n, + verifyingContract: PRECOMPILE_CALL_PERMIT_ADDRESS, + }, + message: { + from: ALITH_ADDRESS, + to: callPermitDemoAddr, + value: fromHex(bondAmount!, "bigint"), + data: "0x", + gaslimit: 100_000n, + nonce: fromHex(alithNonceResult!, "bigint"), + deadline: 9999999999n, + }, + }); + const { v, r, s } = getSignatureParameters(signature); + + const { result: baltatharForAlithResult } = await context.createBlock( + createViemTransaction(context, { + privateKey: BALTATHAR_PRIVATE_KEY, + to: callPermitDemoAddr, + data: encodeFunctionData({ + abi: callPermitDemoAbi, + functionName: "bondFor", + args: [ALITH_ADDRESS, 100_000, 9999999999, v, r, s], + }), + }) + ); + expectEVMResult(baltatharForAlithResult!.events, "Succeed"); + }); + + it({ + id: "T01", + title: "should have bonds for baltathar and alith in contract balance", + test: async function () { + const freeBalance = ( + await context.polkadotJs().query.system.account(callPermitDemoAddr) + ).data.free.toNumber(); + expect(freeBalance).to.equal(200); + }, + }); + + it({ + id: "T02", + title: "should have bond for baltathar in contract storage", + test: async function () { + const baltatharBond = ( + await context.viem().call({ + to: callPermitDemoAddr, + data: encodeFunctionData({ + abi: callPermitDemoAbi, + functionName: "getBondAmount", + args: [BALTATHAR_ADDRESS], + }), + }) + ).data; + expect(fromHex(baltatharBond!, "bigint")).to.equal(100n); + }, + }); + + it({ + id: "T03", + title: "should have bond for alith in contract storage", + test: async function () { + const alithBond = ( + await context.viem().call({ + to: callPermitDemoAddr, + data: encodeFunctionData({ + abi: callPermitDemoAbi, + functionName: "getBondAmount", + args: [ALITH_ADDRESS], + }), + }) + ).data; + expect(fromHex(alithBond!, "bigint")).to.equal(100n); + }, + }); + }, +}); diff --git a/test/suites/dev-frontier-template/test-precompiles/test-precompile-erc20.ts b/test/suites/dev-frontier-template/test-precompiles/test-precompile-erc20.ts new file mode 100644 index 000000000..609f21832 --- /dev/null +++ b/test/suites/dev-frontier-template/test-precompiles/test-precompile-erc20.ts @@ -0,0 +1,269 @@ +import { beforeEach, describeSuite, expect } from "@moonwall/cli"; +import { + ALITH_ADDRESS, + BALTATHAR_PRIVATE_KEY, + CHARLETH_ADDRESS, + baltathar, + ETHAN_ADDRESS, + BALTATHAR_ADDRESS, +} from "@moonwall/util"; +import { expectEVMResult } from "helpers"; +import { PrivateKeyAccount, keccak256, pad, parseEther, toBytes, toHex } from "viem"; +import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; + +const IERC20_ADDRESS = "0x0000000000000000000000000000000000000800"; + +describeSuite({ + id: "DF0903", + title: "Precompiles - ERC20 Native", + foundationMethods: "dev", + testCases: ({ context, it, log }) => { + let randomAccount: PrivateKeyAccount; + + beforeEach(async () => { + randomAccount = privateKeyToAccount(generatePrivateKey()); + }); + + it({ + id: "T01", + title: "allows to call balanceOf", + test: async function () { + const transferAmount = 1000n; + const signedTx = context + .polkadotJs() + .tx.balances.transfer(ETHAN_ADDRESS, transferAmount) + .signAsync(baltathar); + await context.createBlock(signedTx); + + const balance = await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "balanceOf", + args: [ETHAN_ADDRESS], + }); + + expect(balance).equals(transferAmount); + }, + }); + + it({ + id: "T02", + title: "allows to call totalSupply", + test: async function () { + const totalSupply = await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "totalSupply", + }); + + const totalIssuance = ( + await context.polkadotJs().query.balances.totalIssuance() + ).toBigInt(); + expect(totalSupply).toBe(totalIssuance); + }, + }); + + it({ + id: "T03", + title: "allows to approve transfers, and allowance matches", + test: async function () { + const allowanceBefore = await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "allowance", + args: [ALITH_ADDRESS, BALTATHAR_ADDRESS], + }) as bigint; + + const amount = parseEther("10"); + + const rawTx = await context.writeContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "approve", + args: [BALTATHAR_ADDRESS, amount], + rawTxOnly: true, + }); + const { result } = await context.createBlock(rawTx); + + const allowanceAfter = await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "allowance", + args: [ALITH_ADDRESS, BALTATHAR_ADDRESS], + }) as bigint; + + expect(allowanceAfter - allowanceBefore).equals(BigInt(amount)); + + const { status, logs } = await context + .viem() + .getTransactionReceipt({ hash: result?.hash as `0x${string}` }); + + expect(status).to.equal("success"); + expect(logs.length).to.eq(1); + expect(logs[0].topics[0]).toBe(keccak256(toBytes("Approval(address,address,uint256)"))); + expect(logs[0].topics[1]?.toLowerCase()).toBe( + pad(ALITH_ADDRESS.toLowerCase() as `0x${string}`) + ); + expect(logs[0].topics[2]?.toLowerCase()).toBe( + pad(BALTATHAR_ADDRESS.toLowerCase() as `0x${string}`) + ); + }, + }); + + it({ + id: "T04", + title: "allows to call transfer", + test: async function () { + expect( + await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "balanceOf", + args: [randomAccount.address], + }) + ).equals(0n); + + const balanceBefore = await context.viem().getBalance({ address: BALTATHAR_ADDRESS }); + + const rawTx = await context.writeContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "transfer", + args: [randomAccount.address, parseEther("3")], + privateKey: BALTATHAR_PRIVATE_KEY, + rawTxOnly: true, + }); + const { result } = await context.createBlock(rawTx); + const { status, gasUsed } = await context + .viem() + .getTransactionReceipt({ hash: result?.hash as `0x${string}` }); + expect(status).to.equal("success"); + + const balanceAfter = await context.viem().getBalance({ address: BALTATHAR_ADDRESS }); + const block = await context.viem().getBlock(); + const fees = gasUsed as bigint * block.baseFeePerGas! as bigint; + expect(balanceAfter).toBeLessThanOrEqual(balanceBefore - parseEther("3") - fees); + expect(await context.viem().getBalance({ address: randomAccount.address })).to.equal( + parseEther("3") + ); + }, + }); + + it({ + id: "T05", + title: "allows to approve transfer and use transferFrom", + test: async function () { + const allowedAmount = parseEther("10"); + const transferAmount = parseEther("5"); + + await context.writeContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "approve", + args: [BALTATHAR_ADDRESS, allowedAmount], + }); + await context.createBlock(); + + const fromBalBefore = ( + await context.polkadotJs().query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + const toBalBefore = await context.viem().getBalance({ address: CHARLETH_ADDRESS }); + + const rawTx = await context.writeContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "transferFrom", + args: [ALITH_ADDRESS, CHARLETH_ADDRESS, transferAmount], + privateKey: BALTATHAR_PRIVATE_KEY, + rawTxOnly: true + }); + + const { result } = await context.createBlock(rawTx); + const { logs, status } = await context + .viem() + .getTransactionReceipt({ hash: result?.hash as `0x${string}` }); + + const fromBalAfter = ( + await context.polkadotJs().query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + + const toBalAfter = await context.viem().getBalance({ address: CHARLETH_ADDRESS }); + expect(logs.length).to.eq(1); + expect(logs[0].address).to.eq(IERC20_ADDRESS); + expect(logs[0].data).to.eq(pad(toHex(transferAmount))); + expect(logs[0].topics.length).to.eq(3); + expect(logs[0].topics[0]).toBe(keccak256(toBytes("Transfer(address,address,uint256)"))); + expect(logs[0].topics[1]?.toLowerCase()).toBe( + pad(ALITH_ADDRESS.toLowerCase() as `0x${string}`) + ); + expect(logs[0].topics[2]?.toLowerCase()).toBe( + pad(CHARLETH_ADDRESS.toLowerCase() as `0x${string}`) + ); + expect(status).to.equal("success"); + expect(toBalAfter).toBe(toBalBefore + transferAmount); + expect(fromBalAfter).toBe(fromBalBefore - transferAmount); + const newAllowedAmount = allowedAmount - transferAmount; + expect( + await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "allowance", + args: [ALITH_ADDRESS, BALTATHAR_ADDRESS], + }) + ).toBe(newAllowedAmount); + }, + }); + + it({ + id: "T06", + title: "refuses to transferFrom more than allowed", + test: async function () { + const allowedAmount = parseEther("10"); + const transferAmount = parseEther("15"); + + await context.writeContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "approve", + args: [BALTATHAR_ADDRESS, allowedAmount], + }); + await context.createBlock(); + + const fromBalBefore = ( + await context.polkadotJs().query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + const toBalBefore = await context.viem().getBalance({ address: CHARLETH_ADDRESS }); + + const rawTxn = await context.writeContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "transferFrom", + args: [ALITH_ADDRESS, CHARLETH_ADDRESS, transferAmount], + privateKey: BALTATHAR_PRIVATE_KEY, + rawTxOnly: true, + gas: 200_000n, + web3Library: "ethers", + }); + + const { result } = await context.createBlock(rawTxn); + expectEVMResult(result!.events, "Revert"); + + const fromBalAfter = ( + await context.polkadotJs().query.system.account(ALITH_ADDRESS) + ).data.free.toBigInt(); + + const toBalAfter = await context.viem().getBalance({ address: CHARLETH_ADDRESS }); + expect(toBalAfter).toBe(toBalBefore); + expect(fromBalAfter).toBe(fromBalBefore); + expect( + await context.readContract!({ + contractAddress: IERC20_ADDRESS, + contractName: "IERC20", + functionName: "allowance", + args: [ALITH_ADDRESS, BALTATHAR_ADDRESS], + }) + ).toBe(allowedAmount); + }, + }); + }, +}); diff --git a/test/suites/dev-frontier-template/test-precompiles/test-precompile-xcm-utils.ts b/test/suites/dev-frontier-template/test-precompiles/test-precompile-xcm-utils.ts new file mode 100644 index 000000000..7acffb8f3 --- /dev/null +++ b/test/suites/dev-frontier-template/test-precompiles/test-precompile-xcm-utils.ts @@ -0,0 +1,439 @@ +import "@moonbeam-network/api-augment"; +import { describeSuite, expect } from "@moonwall/cli"; +import { GLMR, extractWeight, generateKeyringPair } from "@moonwall/util"; +import { StagingXcmVersionedXcm } from "@polkadot/types/lookup"; +import { u8aToHex } from "@polkadot/util"; +import { expectEVMResult, descendOriginFromAddress20 } from "../../../helpers"; + +export const CLEAR_ORIGIN_WEIGHT = 1_000_000_000n; +const XCM_UTILS_ADDRESS = "0x0000000000000000000000000000000000000803"; + +describeSuite({ + id: "DF0904", + title: "Precompiles - xcm utils", + foundationMethods: "dev", + testCases: ({ context, it }) => { + // it({ + // id: "T01", + // title: "allows to retrieve parent-based ML account", + // test: async function () { + // const multilocation: [number, any[]] = [1, []]; + // const expectedAddress = u8aToHex(new Uint8Array([...new TextEncoder().encode("Parent")])) + // .padEnd(42, "0") + // .toLowerCase(); + + // expect( + // ( + // (await context.readContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "multilocationToAddress", + // args: [multilocation], + // })) as any + // ).toLowerCase() + // ).to.equal(expectedAddress); + // }, + // }); + + // it({ + // id: "T02", + // title: "allows to retrieve parachain-based ML account", + // test: async function () { + // const x2_parachain_asset_enum_selector = "0x00"; + // const x2_parachain_id = "000007D0"; + // const paraId = context.polkadotJs().createType("ParaId", 2000); + + // const multilocation: [number, any[]] = [ + // 1, + // // Parachain(2000) + // [x2_parachain_asset_enum_selector + x2_parachain_id], + // ]; + + // const expectedAddress = u8aToHex( + // new Uint8Array([...new TextEncoder().encode("sibl"), ...paraId.toU8a()]) + // ).padEnd(42, "0"); + + // expect( + // ( + // (await context.readContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "multilocationToAddress", + // args: [multilocation], + // })) as any + // ).toLowerCase() + // ).to.equal(expectedAddress); + // }, + // }); + + // it({ + // id: "T03", + // title: "allows to retrieve generic ML-based derivated account", + // test: async function () { + // const x2_parachain_asset_enum_selector = "0x00"; + // const x2_parachain_id = "00000001"; + + // // Junction::AccountKey20 + // const account20EnumSelector = "0x03"; + // // [0x01; 20] + // const account20Address = "0101010101010101010101010101010101010101"; + // // NetworkId::Any + // const account20NetworkId = "00"; + + // const multilocation: [number, any[]] = + // // Destination as multilocation + // [ + // // one parent + // 1, + // // X2(Parachain(2000), AccountId32(account32Address)) + // [ + // x2_parachain_asset_enum_selector + x2_parachain_id, + // account20EnumSelector + account20Address + account20NetworkId, + // ], + // ]; + + // const { descendOriginAddress } = descendOriginFromAddress20(context); + // expect( + // ( + // (await context.readContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "multilocationToAddress", + // args: [multilocation], + // })) as any + // ).toLowerCase() + // ).toBe(descendOriginAddress); + // }, + // }); + + // it({ + // id: "T04", + // title: "allows to retrieve weight of message", + // test: async function () { + // const message = { + // V2: [ + // { + // ClearOrigin: null, + // }, + // ], + // }; + // const xcm = context.polkadotJs().createType("VersionedXcm", message); + + // expect( + // await context.readContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "weightMessage", + // args: [xcm.toHex()], + // }) + // ).to.equal(CLEAR_ORIGIN_WEIGHT); + // }, + // }); + + it({ + id: "T05", + title: "allows to retrieve units per second for an asset", + test: async function () { + // Junction::PalletInstance(3) + const x2_pallet_instance_enum_selector = "0x04"; + const x2_instance = "0A"; + + // This represents X1(PalletInstance(3))) + + // This multilocation represents our native token + const asset = [ + // zero parents + 0, + // X1(PalletInstance) + // PalletInstance: Selector (04) + palconst instance 1 byte (03) + [x2_pallet_instance_enum_selector + x2_instance], + ]; + + const baseWeight = extractWeight(context.polkadotJs().consts.system.blockWeights.perClass.normal.baseExtrinsic).toBigInt(); + const expectedUnitsPerSecond = 1_000_000_000_000n * 1_000n / baseWeight * 1_000n; + + expect( + await context.readContract!({ + contractAddress: XCM_UTILS_ADDRESS, + contractName: "XcmUtils", + functionName: "getUnitsPerSecond", + args: [asset], + }) + ).to.equal(expectedUnitsPerSecond); + }, + }); + + // it({ + // id: "T06", + // title: "allows to execute a custom xcm message", + // test: async function () { + // const random = generateKeyringPair(); + + // const transferCall = context.polkadotJs().tx.balances.transfer(random.address, 1n * GLMR); + // const transferCallEncoded = transferCall?.method.toHex(); + + // const xcmMessage = { + // V2: [ + // { + // Transact: { + // originType: "SovereignAccount", + // requireWeightAtMost: 525_000_000n + 100_000_000n, // 21_000 gas limit + // call: { + // encoded: transferCallEncoded, + // }, + // }, + // }, + // ], + // }; + + // const receivedMessage: StagingXcmVersionedXcm = context + // .polkadotJs() + // .createType("StagingXcmVersionedXcm", xcmMessage) as any; + + // const rawTxn = await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmExecute", + // args: [receivedMessage.toHex(), 2_000_000_000n], + // rawTxOnly: true, + // }); + + // const { result } = await context.createBlock(rawTxn); + // expectEVMResult(result!.events, "Succeed"); + + // const testAccountBalance = ( + // await context.polkadotJs().query.system.account(random.address) + // ).data.free.toBigInt(); + + // expect(testAccountBalance).to.eq(1n * GLMR); + // }, + // }); + + // it({ + // id: "T07", + // title: "allows to execute a custom xcm evm to evm, but reentrancy forbids", + // test: async function () { + // const random = generateKeyringPair(); + + // const ethTx = { + // V1: { + // gas_limit: 21000, + // fee_payment: { + // Auto: { + // Low: null, + // }, + // }, + // action: { + // Call: random.address, + // }, + // value: 1n * GLMR, + // input: [], + // access_list: null, + // }, + // }; + // const transferCall = context.polkadotJs().tx.ethereumXcm.transact(ethTx as any); + // const transferCallEncoded = transferCall?.method.toHex(); + + // const xcmMessage = { + // V2: [ + // { + // Transact: { + // originType: "SovereignAccount", + // requireWeightAtMost: 525_000_000n + 25_000_000n, // 21_000 gas limit + // call: { + // encoded: transferCallEncoded, + // }, + // }, + // }, + // ], + // }; + + // const receivedMessage: StagingXcmVersionedXcm = context + // .polkadotJs() + // .createType("StagingXcmVersionedXcm", xcmMessage); + + // const rawTxn = await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmExecute", + // args: [receivedMessage.toHex(), 4_000_000_000], + // rawTxOnly: true, + // gas: 5_000_000n, + // }); + + // const { result } = await context.createBlock(rawTxn); + // expectEVMResult(result!.events, "Succeed"); + + // // Tokens transferred + // const testAccountBalance = ( + // await context.polkadotJs().query.system.account(random.address) + // ).data.free.toBigInt(); + + // expect(testAccountBalance, "Transfer went through, possible EVM re-entrancy").to.eq(0n); + // }, + // }); + + // it({ + // id: "T08", + // title: "does not allow to self-send a custom xcm message", + // test: async function () { + // const ownParaId = (await context.polkadotJs().query.parachainInfo.parachainId()) as any; + // const x1_parachain_asset_enum_selector = "0x00"; + // const x1_parachain_id = ownParaId.toHex().slice(2); + + // // Sending it here + // // { parents:0, Here} + // const destHere: [number, any[]] = [ + // // one parents + // 0, + // // Here + // [], + // ]; + + // // Sending it with the representation of the para as seen by the relay + // // { parents:0, parachain(0)} + // const destParaRelayView: [number, any[]] = [ + // // one parents + // 0, + // // Parachain(0) + // [x1_parachain_asset_enum_selector + x1_parachain_id], + // ]; + + // // Sending it with the representation of the para as seen by other paras + // // { parents:1, parachain(0)} + // const destParaOtherParaView: [number, any[]] = [ + // // one parents + // 1, + // // Parachain(0) + // [x1_parachain_asset_enum_selector + x1_parachain_id], + // ]; + + // const xcmMessage = { + // V2: [ + // { + // ClearOrigin: null, + // }, + // ], + // }; + + // const sentMessage: StagingXcmVersionedXcm = context + // .polkadotJs() + // .createType("StagingXcmVersionedXcm", xcmMessage) as any; + + // // Try sending it with local view + // const localRawTxn = await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [destHere, sentMessage.toHex()], + // rawTxOnly: true, + // gas: 1_000_000n, + // }); + + // const { result: localResult } = await context.createBlock(localRawTxn); + // expectEVMResult(localResult!.events, "Revert"); + // expect( + // async () => + // await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [destHere, sentMessage.toHex()], + // }) + // ).rejects.toThrowError( + // "Dispatched call failed with error: Module(ModuleError " + + // '{ index: 73, error: [0, 0, 0, 0], message: Some("Unreachable") })' + // ); + + // const paraRawTxn = await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [destParaRelayView, sentMessage.toHex()], + // rawTxOnly: true, + // gas: 1_000_000n, + // }); + + // const { result: paraResult } = await context.createBlock(paraRawTxn); + + // expectEVMResult(paraResult!.events, "Revert"); + // expect( + // async () => + // await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [destParaRelayView, sentMessage.toHex()], + // }) + // ).rejects.toThrowError( + // "Dispatched call failed with error: Module(ModuleError " + + // '{ index: 73, error: [0, 0, 0, 0], message: Some("Unreachable") })' + // ); + + // const paraRawTxn2 = await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [destParaOtherParaView, sentMessage.toHex()], + // rawTxOnly: true, + // gas: 1_000_000n, + // }); + + // const { result: paraResult2 } = await context.createBlock(paraRawTxn2); + + // expectEVMResult(paraResult2!.events, "Revert"); + // expect( + // async () => + // await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [destParaOtherParaView, sentMessage.toHex()], + // }) + // ).rejects.toThrowError( + // "Dispatched call failed with error: Module(ModuleError " + + // '{ index: 73, error: [1, 0, 0, 0], message: Some("SendFailure") })' + // ); + // }, + // }); + + // it({ + // id: "T09", + // title: "allows to send a custom xcm message", + // test: async function () { + // // Sending it to the relay + // // { parents:1, Here} + // const dest = [ + // // one parents + // 1, + // // Here + // [], + // ]; + + // const xcmMessage = { + // V2: [ + // { + // ClearOrigin: null, + // }, + // ], + // }; + + // const sentMessage: StagingXcmVersionedXcm = context + // .polkadotJs() + // .createType("StagingXcmVersionedXcm", xcmMessage); + + // const rawTxn = await context.writeContract!({ + // contractAddress: XCM_UTILS_ADDRESS, + // contractName: "XcmUtils", + // functionName: "xcmSend", + // args: [dest, sentMessage.toHex()], + // rawTxOnly: true, + // gas: 1_000_000n, + // }); + + // const { result } = await context.createBlock(rawTxn); + // expectEVMResult(result!.events, "Succeed"); + // }, + // }); + }, +}); diff --git a/test/suites/rt-ugprade-chopsticks/test-upgrade-chain.ts b/test/suites/rt-upgrade-chopsticks/test-upgrade-chain.ts similarity index 100% rename from test/suites/rt-ugprade-chopsticks/test-upgrade-chain.ts rename to test/suites/rt-upgrade-chopsticks/test-upgrade-chain.ts