From 22c176c572bc32e9951348892401d9039b8efef8 Mon Sep 17 00:00:00 2001 From: "Joshua J. Bouw" Date: Fri, 19 Aug 2022 20:32:12 +0700 Subject: [PATCH] Release 2.7.0. (#587) Feat(tracing): Implement callTracer (#538) Add docker as a prerequisites (#542) Update dependencies (#541) Chore: Update js dependencies (#543) Constant error messages (#535) chore: Cargo make integration (#378) Chore: PR template (#548) Chore: Delete binaries (#553) Chore(engine): Update to latest version of SputnikVM (#565) Chore(CI): Update checkout to v3 (#566) Chore: Disallow as_conversions (#561) Chore: Update Rust crypto libraries (#568) Fix(engine-transactions): Prevent panic on empty input (#573) Feat(engine): Get promise results precompile (#575) Fix(engine): Return correct value for get_bridge_prover function (#581) Refactor(Tests): Move test contracts to test etc folder (#577) Co-authored-by: Michael Birch Chore: Cleanup dead dependencies (#571) Chore(Precompiles): Ripemd160 lib deprecated (#570) Feat(precompiles): Use near host functions for alt_bn128 when compiling wasm artifact (#540) Co-authored-by: Joshua J. Bouw Feat(engine): Cross contract calls (#560) Chore(eth-contracts): Update openzeppelin to 4.7.3 (#584) Fix: Make binaries on push (#585) 2.7.0 release prep --- .env/custom_example.env | 47 + .env/local.env | 6 + .env/mainnet.env | 9 + .env/testnet.env | 9 + .github/pull_request_template.md | 65 + .github/workflows/builds.yml | 45 +- .github/workflows/lints.yml | 31 +- .github/workflows/scheduled_lints.yml | 6 +- .github/workflows/tests.yml | 40 +- .gitignore | 17 +- CHANGES.md | 24 +- Cargo.lock | 1540 +++++----- Cargo.toml | 8 +- Makefile | 109 - Makefile.toml | 231 ++ README.md | 101 +- VERSION | 2 +- engine-precompiles/Cargo.toml | 20 +- engine-precompiles/src/account_ids.rs | 13 +- .../src/{bn128.rs => alt_bn256.rs} | 417 ++- engine-precompiles/src/blake2.rs | 4 +- engine-precompiles/src/hash.rs | 19 +- engine-precompiles/src/identity.rs | 7 +- engine-precompiles/src/lib.rs | 256 +- engine-precompiles/src/modexp.rs | 37 +- engine-precompiles/src/native.rs | 12 +- engine-precompiles/src/prepaid_gas.rs | 4 +- engine-precompiles/src/promise_result.rs | 90 + engine-precompiles/src/random.rs | 5 +- engine-precompiles/src/secp256k1.rs | 4 +- engine-precompiles/src/utils.rs | 9 + engine-precompiles/src/xcc.rs | 385 +++ engine-sdk/Cargo.toml | 8 +- engine-sdk/src/error.rs | 15 + engine-sdk/src/io.rs | 29 + engine-sdk/src/lib.rs | 74 +- engine-sdk/src/near_runtime.rs | 16 +- engine-sdk/src/prelude.rs | 2 +- engine-sdk/src/promise.rs | 57 + engine-standalone-storage/Cargo.toml | 4 +- engine-standalone-storage/src/promise.rs | 31 +- .../src/relayer_db/mod.rs | 5 +- engine-standalone-storage/src/sync/mod.rs | 41 +- engine-standalone-storage/src/sync/types.rs | 121 +- engine-standalone-tracing/Cargo.toml | 11 +- engine-standalone-tracing/src/sputnik.rs | 1 + .../src/types/call_tracer.rs | 289 ++ .../src/{types.rs => types/mod.rs} | 2 + engine-tests/Cargo.toml | 33 +- engine-tests/src/test_utils/erc20.rs | 44 + engine-tests/src/test_utils/mod.rs | 33 +- engine-tests/src/test_utils/rust.rs | 1 + engine-tests/src/test_utils/solidity.rs | 6 +- .../test_utils/standalone/mocks/promise.rs | 11 + engine-tests/src/test_utils/standalone/mod.rs | 37 +- .../src/test_utils/standard_precompiles.rs | 3 +- engine-tests/src/test_utils/uniswap.rs | 2 +- engine-tests/src/tests/erc20.rs | 10 +- engine-tests/src/tests/erc20_connector.rs | 10 +- engine-tests/src/tests/eth_connector.rs | 4 +- engine-tests/src/tests/mod.rs | 4 +- .../src/tests/promise_results_precompile.rs | 141 + engine-tests/src/tests/repro.rs | 14 +- engine-tests/src/tests/res/w_near.wasm | Bin 0 -> 191379 bytes engine-tests/src/tests/sanity.rs | 20 +- engine-tests/src/tests/standalone/storage.rs | 1 + engine-tests/src/tests/standalone/sync.rs | 9 + engine-tests/src/tests/standalone/tracing.rs | 1 + .../src/tests/standard_precompiles.rs | 74 +- engine-tests/src/tests/state_migration.rs | 4 +- engine-tests/src/tests/uniswap.rs | 6 +- engine-tests/src/tests/xcc.rs | 600 ++++ engine-transactions/Cargo.toml | 8 +- .../src/backwards_compatibility.rs | 4 +- engine-transactions/src/eip_1559.rs | 5 +- engine-transactions/src/eip_2930.rs | 5 +- engine-transactions/src/legacy.rs | 34 +- engine-transactions/src/lib.rs | 117 +- engine-types/Cargo.toml | 11 +- engine-types/src/lib.rs | 5 +- engine-types/src/parameters.rs | 32 + engine-types/src/storage.rs | 57 +- engine-types/src/types/gas.rs | 32 +- engine-types/src/types/mod.rs | 21 +- engine/Cargo.toml | 32 +- engine/src/connector.rs | 17 +- engine/src/deposit_event.rs | 27 +- engine/src/engine.rs | 148 +- engine/src/errors.rs | 89 + engine/src/fungible_token.rs | 33 +- engine/src/json.rs | 36 +- engine/src/lib.rs | 133 +- engine/src/meta_parsing.rs | 727 ----- engine/src/parameters.rs | 25 +- engine/src/proof.rs | 2 +- engine/src/xcc.rs | 282 ++ etc/benchmark-contract/Cargo.lock | 62 - etc/eth-contracts/contracts/test/Random.sol | 1 + etc/eth-contracts/hardhat.config.js | 2 +- etc/eth-contracts/package.json | 37 +- etc/eth-contracts/res/EvmErc20.bin | Bin 0 -> 6170 bytes etc/eth-contracts/res/EvmErc20.hex | 1 + etc/eth-contracts/res/EvmErc20V2.bin | Bin 0 -> 6199 bytes etc/eth-contracts/res/EvmErc20V2.hex | 1 + etc/eth-contracts/yarn.lock | 2619 ++++++++++------- etc/ft-receiver/Cargo.lock | 648 ---- etc/state-migration-test/Cargo.lock | 243 +- etc/{ => tests}/benchmark-contract/Cargo.toml | 0 etc/{ => tests}/benchmark-contract/src/lib.rs | 0 etc/{ => tests}/ft-receiver/Cargo.toml | 0 etc/{ => tests}/ft-receiver/src/lib.rs | 0 .../self-contained-5bEgfRQ/Cargo.toml | 8 +- .../self-contained-5bEgfRQ/src/lib.rs | 0 .../self-contained-5bEgfRQ/src/promise.rs | 0 .../self-contained-5bEgfRQ/state.bin | Bin .../state-migration-test/Cargo.toml | 8 +- .../state-migration-test/src/lib.rs | 0 etc/{ => tests}/uniswap/package.json | 0 etc/{ => tests}/uniswap/yarn.lock | 0 .../Cargo.lock | 1089 +++---- etc/xcc-router/Cargo.toml | 19 + etc/xcc-router/src/lib.rs | 219 ++ etc/xcc-router/src/tests.rs | 211 ++ verify_evm_erc20.sh | 8 + 124 files changed, 7607 insertions(+), 4797 deletions(-) create mode 100644 .env/custom_example.env create mode 100644 .env/local.env create mode 100644 .env/mainnet.env create mode 100644 .env/testnet.env create mode 100644 .github/pull_request_template.md delete mode 100644 Makefile create mode 100644 Makefile.toml rename engine-precompiles/src/{bn128.rs => alt_bn256.rs} (63%) create mode 100644 engine-precompiles/src/promise_result.rs create mode 100644 engine-precompiles/src/xcc.rs create mode 100644 engine-standalone-tracing/src/types/call_tracer.rs rename engine-standalone-tracing/src/{types.rs => types/mod.rs} (99%) create mode 100644 engine-tests/src/tests/promise_results_precompile.rs create mode 100755 engine-tests/src/tests/res/w_near.wasm create mode 100644 engine-tests/src/tests/xcc.rs create mode 100644 engine/src/errors.rs delete mode 100644 engine/src/meta_parsing.rs create mode 100644 engine/src/xcc.rs delete mode 100644 etc/benchmark-contract/Cargo.lock create mode 100644 etc/eth-contracts/res/EvmErc20.bin create mode 100644 etc/eth-contracts/res/EvmErc20.hex create mode 100644 etc/eth-contracts/res/EvmErc20V2.bin create mode 100644 etc/eth-contracts/res/EvmErc20V2.hex delete mode 100644 etc/ft-receiver/Cargo.lock rename etc/{ => tests}/benchmark-contract/Cargo.toml (100%) rename etc/{ => tests}/benchmark-contract/src/lib.rs (100%) rename etc/{ => tests}/ft-receiver/Cargo.toml (100%) rename etc/{ => tests}/ft-receiver/src/lib.rs (100%) rename etc/{ => tests}/self-contained-5bEgfRQ/Cargo.toml (73%) rename etc/{ => tests}/self-contained-5bEgfRQ/src/lib.rs (100%) rename etc/{ => tests}/self-contained-5bEgfRQ/src/promise.rs (100%) rename etc/{ => tests}/self-contained-5bEgfRQ/state.bin (100%) rename etc/{ => tests}/state-migration-test/Cargo.toml (70%) rename etc/{ => tests}/state-migration-test/src/lib.rs (100%) rename etc/{ => tests}/uniswap/package.json (100%) rename etc/{ => tests}/uniswap/yarn.lock (100%) rename etc/{self-contained-5bEgfRQ => xcc-router}/Cargo.lock (59%) create mode 100644 etc/xcc-router/Cargo.toml create mode 100644 etc/xcc-router/src/lib.rs create mode 100644 etc/xcc-router/src/tests.rs create mode 100644 verify_evm_erc20.sh diff --git a/.env/custom_example.env b/.env/custom_example.env new file mode 100644 index 000000000..03b1a0afd --- /dev/null +++ b/.env/custom_example.env @@ -0,0 +1,47 @@ +# To create a new "custom.env" which is then invoked by `--profile custom`, the available +# environment values are below with an explanation. +# +# Simply remove the prefixed `#` to enable them. + +# The cargo features should either be `mainnet`, `testnet` or something extra in order to make use +# of your own custom features. +#CARGO_FEATURES_BUILD = "mainnet" + +# The cargo test features are used to build a test environment version of the engine WASM and test +# library. Either use `mainnet-test`, `testnet-test` or something extra in order to make use of your +# own custom features. +#CARGO_FEATURES_BUILD_TEST = "mainnet,integration-test" + +# The cargo features to enable for the testing environment which will use the compiled binary for +# testing. +#CARGO_FEATURES_TEST + +# The NEAR evm account where to deploy. +# +# For our own purposes, we have a special `aurora` TLD which only Aurora Labs can deploy to on both +# testnet and mainnet. Otherwise, use a name similar to `aurora-test.near` to deploy locally or +# elsewhere. +#NEAR_EVM_ACCOUNT = "aurora-test.near" + +# The Aurora contract WASM file name. +# +# After building the binary, it will end up in the `bin` folder with this following name. +#WASM_FILE = "aurora-custom.wasm" + +# The Aurora contract WASM test file name. +# +# To avoid confusion with the mainnet binary, it is wise to set this as something different as the +# test binary should never go to production and is only used in testing exclusively. +# +# After building the binary, it will end up in the `bin` folder with this following name. +#WASM_FILE_TEST = "aurora-custom-test.wasm" + +# The NEAR CLI service name to use. +# +# For live purposes, this should be `near` however if you have setup a local development environment +# for the NEAR blockchain following https://docs.near.org/docs/tools/kurtosis-localnet, you should +# instead use `local-near`. +#NEAR_CLI = "local-near" + +# The Rust compilier flags to use when compiling any binary. Does not work for the tests. +#RUSTC_FLAGS_BUILD = "-C link-arg=-s" diff --git a/.env/local.env b/.env/local.env new file mode 100644 index 000000000..ff9305700 --- /dev/null +++ b/.env/local.env @@ -0,0 +1,6 @@ +CARGO_FEATURES_BUILD="testnet" +RUSTC_FLAGS_BUILD="-C link-arg=-s" +NEAR_EVM_ACCOUNT="aurora.test.near" +WASM_FILE="aurora-local.wasm" +NEAR_CLI="local_near" +IS_PROD=false diff --git a/.env/mainnet.env b/.env/mainnet.env new file mode 100644 index 000000000..d32440be1 --- /dev/null +++ b/.env/mainnet.env @@ -0,0 +1,9 @@ +CARGO_FEATURES_BUILD="mainnet" +CARGO_FEATURES_BUILD_TEST="mainnet,integration-test" +CARGO_FEATURES_TEST="mainnet-test" +RUSTC_FLAGS_BUILD="-C link-arg=-s" +NEAR_EVM_ACCOUNT="aurora" +WASM_FILE="aurora-mainnet.wasm" +WASM_FILE_TEST="aurora-mainnet-test.wasm" +NEAR_CLI="near" +IS_PROD=true diff --git a/.env/testnet.env b/.env/testnet.env new file mode 100644 index 000000000..5ee71be5b --- /dev/null +++ b/.env/testnet.env @@ -0,0 +1,9 @@ +CARGO_FEATURES_BUILD="testnet" +CARGO_FEATURES_BUILD_TEST="testnet,integration-test" +CARGO_FEATURES_TEST="testnet-test" +RUSTC_FLAGS_BUILD="-C link-arg=-s" +NEAR_EVM_ACCOUNT="aurora" +WASM_FILE="aurora-testnet.wasm" +WASM_FILE_TEST="aurora-testnet-test.wasm" +NEAR_CLI="near" +IS_PROD=false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..4ea3b316d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,65 @@ + + +## Description + + + +## Performance / NEAR gas cost considerations + + + +## Testing + + + +## How should this be reviewed + + + +## Additional information + + diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index edd6841f1..71cbea518 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -3,49 +3,34 @@ on: push: branches: - master -name: Builds +name: Build jobs: release: name: Release runs-on: [self-hosted, heavy] + strategy: + matrix: + profile: [mainnet, testnet] steps: - name: Clone the repository - uses: actions/checkout@v2 - - run: make release - - run: ls -lH mainnet-release.wasm - - name: Upload the mainnet-release.wasm artifact + uses: actions/checkout@v3 + - run: cargo make --profile ${{ matrix.profile }} build + - run: ls -lH bin/aurora-${{ matrix.profile }}.wasm + - name: Upload the aurora-${{ matrix.profile }}.wasm artifact uses: actions/upload-artifact@v2 with: - name: mainnet-release.wasm - path: mainnet-release.wasm + name: aurora-${{ matrix.profile }}.wasm + path: bin/aurora-${{ matrix.profile }}.wasm - name: Update the latest release uses: svenstaro/upload-release-action@v2 with: tag: latest - file: mainnet-release.wasm - overwrite: true - repo_token: ${{ secrets.GITHUB_TOKEN }} - - name: Update the latest tag - uses: EndBug/latest-tag@latest - debug: - name: Debug - runs-on: [self-hosted, heavy] - steps: - - name: Clone the repository - uses: actions/checkout@v2 - - run: make debug - - run: ls -lH mainnet-debug.wasm - - name: Upload the mainnet-debug.wasm artifact - uses: actions/upload-artifact@v2 - with: - name: mainnet-debug.wasm - path: mainnet-debug.wasm - - name: Update the latest release - uses: svenstaro/upload-release-action@v2 - with: - tag: latest - file: mainnet-debug.wasm + file: bin/aurora-${{ matrix.profile }}.wasm overwrite: true repo_token: ${{ secrets.GITHUB_TOKEN }} - name: Update the latest tag uses: EndBug/latest-tag@latest +env: + CARGO_TERM_COLOR: always + CARGO_INCREMENTAL: 0 + RUSTC_WRAPPER: sccache diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index fdb72e318..8cd2d66d0 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -1,4 +1,3 @@ -# See: https://github.com/actions-rs/example/blob/master/.github/workflows/nightly_lints.yml --- on: push: @@ -10,31 +9,39 @@ on: name: Lints jobs: fmt: - name: rustfmt + name: Format runs-on: [self-hosted, light] steps: - name: Clone the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run cargo fmt - run: cargo fmt --all -- --check + run: cargo make check-fmt clippy: name: Clippy runs-on: [self-hosted, heavy] steps: - name: Clone the repository - uses: actions/checkout@v2 - - run: make etc/eth-contracts/res/EvmErc20.bin + uses: actions/checkout@v3 + - run: cargo make build-contracts - name: Run Contract cargo clippy - run: cargo clippy --no-default-features --features=contract -- -D warnings + run: cargo make clippy - name: Run cargo clippy run: cargo clippy - + udeps: + name: Udeps + runs-on: [self-hosted, heavy] + steps: + - name: Clone the repository + uses: actions/checkout@v3 + - name: Run udeps + run: cargo make udeps contracts: - name: eth-contracts + name: Contracts runs-on: [self-hosted, light] steps: - name: Clone the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run yarn lint - working-directory: etc/eth-contracts - run: yarn && yarn lint + run: cargo make check-contracts + - name: Check committed EvmErc20.bin + run: bash verify_evm_erc20.sh diff --git a/.github/workflows/scheduled_lints.yml b/.github/workflows/scheduled_lints.yml index 02c9bc7c3..44c760f6e 100644 --- a/.github/workflows/scheduled_lints.yml +++ b/.github/workflows/scheduled_lints.yml @@ -2,14 +2,14 @@ on: schedule: - cron: '27 8 * * 1,4' -name: Scheduled_Lints +name: Scheduled lints jobs: clippy: - name: Nightly_Clippy + name: Nightly Clippy runs-on: [self-hosted, heavy] steps: - name: Clone the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - run: make etc/eth-contracts/res/EvmErc20.bin - name: Update toolchain run: rustup update nightly diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f35ca893f..e2d0c60ac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,43 +13,29 @@ jobs: runs-on: [self-hosted, heavy] steps: - name: Clone the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Restore cache run: | cache-util restore cargo_git cargo_registry sccache yarn_cache cache-util restore aurora-engine-target@generic@${{ hashFiles('**/Cargo.lock') }}:target - - - run: make mainnet-test-build - - name: List directories - run: ls -la target/wasm32-unknown-unknown/release && ls -la - - run: cargo test --features mainnet-test - - - run: make testnet-test-build - name: List directories run: ls -la target/wasm32-unknown-unknown/release && ls -la - - run: cargo test --features testnet-test - + - name: Build contracts + run: cargo make build-contracts + - name: Test contracts + run: cargo make test-contracts + - name: Build mainnet test WASM + run: cargo make --profile mainnet build-test + - name: Test mainnet + run: cargo make --profile mainnet test-workspace + - name: Build testnet test WASM + run: cargo make --profile testnet build-test + - name: Test testnet + run: cargo make --profile testnet test-workspace - name: Save cache run: | cache-util save cargo_git cargo_registry sccache yarn_cache cache-util msave aurora-engine-target@generic@${{ hashFiles('**/Cargo.lock') }}:target - - bully-build: - name: Bully build - runs-on: [self-hosted, heavy] - steps: - - name: Clone the repository - uses: actions/checkout@v2 - - name: Restore cache - run: | - cache-util restore cargo_git cargo_registry sccache yarn_cache - cache-util restore aurora-engine-target@bully@${{ hashFiles('**/Cargo.lock') }}:target - - run: make mainnet-debug evm-bully=yes - - run: ls -lH mainnet-debug.wasm - - name: Save cache - run: | - cache-util save cargo_git cargo_registry sccache yarn_cache - cache-util msave aurora-engine-target@bully@${{ hashFiles('**/Cargo.lock') }}:target env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: 0 diff --git a/.gitignore b/.gitignore index dfe333304..08d094464 100644 --- a/.gitignore +++ b/.gitignore @@ -7,24 +7,19 @@ # IDEA .idea -.run/ # Editor backup files *~ +# ENV +.env/custom.env + # Rust artifacts -/*.wasm +bin/ target/ +etc/tests/*/target/ +etc/tests/*/Cargo.lock # Solidity artifacts artifacts/ cache/ node_modules/ -etc/eth-contracts/res/ - -# Other -etc/state-migration-test/target/ -etc/ft-receiver/target/ -etc/self-contained-5bEgfRQ/target/ - -node_modules/* -cache diff --git a/CHANGES.md b/CHANGES.md index 2acbd9809..941193048 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,11 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.7.0] 2022-08-19 + +### Added +- Get promise results precompile at address on `testnet` `0x0a3540f79be10ef14890e87c1a0040a68cc6af71` by [@birchmd]. ([#575]) +- Cross-contract calls to NEAR contracts are now available for `testnet` by [@birchmd] and [@mfornet]. ([#560]) + +### Changes +- Use NEAR host functions for alt bn256 precompile by [@birchmd], [@joshuajbouw], and [@RomanHodulak]. ([#540]) + +### Fixes +- Fixed an issue where a transaction can panic on an empty input by [@birchmd]. ([#573]) +- Return the correct value while using the `get_bridge_prover` method by [@birchmd]. ([#581]) + +[#575]: https://github.com/aurora-is-near/aurora-engine/pull/575 +[#560]: https://github.com/aurora-is-near/aurora-engine/pull/560 +[#540]: https://github.com/aurora-is-near/aurora-engine/pull/540 +[#573]: https://github.com/aurora-is-near/aurora-engine/pull/573 +[#581]: https://github.com/aurora-is-near/aurora-engine/pull/581 + ## [2.6.1] 2022-06-23 ### Fixes -- Fixed an issue with accounting being problematic with the total supply of ETH on Aurora as it could artificially deplete by @[birchmd]. ([#536]) +- Fixed an issue with accounting being problematic with the total supply of ETH on Aurora as it could artificially deplete by [@birchmd]. ([#536]) - Fixed the possibility of forging receipts to allow for withdrawals on the Rainbow Bridge by [@birchmd], [@mfornet], [@sept-en] and [@joshuajbouw]. Written by [@birchmd]. - Fixed the ability the steal funds from those by setting a fee when receiving NEP-141 as ERC-20 by [@birchmd], [@mfornet], and [@joshuajbouw]. Written by [@joshuajbouw]. @@ -281,7 +300,8 @@ struct SubmitResult { ## [1.0.0] - 2021-05-12 -[Unreleased]: https://github.com/aurora-is-near/aurora-engine/compare/2.6.1...develop +[Unreleased]: https://github.com/aurora-is-near/aurora-engine/compare/2.7.0...develop +[2.7.0]: https://github.com/aurora-is-near/aurora-engine/compare/2.6.1...2.7.0 [2.6.1]: https://github.com/aurora-is-near/aurora-engine/compare/2.6.0...2.6.1 [2.6.0]: https://github.com/aurora-is-near/aurora-engine/compare/2.5.3...2.6.0 [2.5.3]: https://github.com/aurora-is-near/aurora-engine/compare/2.5.2...2.5.3 diff --git a/Cargo.lock b/Cargo.lock index 0a82fc9b4..145b5a1ee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,17 +25,11 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - -[[package]] -name = "ahash" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.7", "once_cell", "version_check", ] @@ -60,9 +54,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" [[package]] name = "arrayref" @@ -78,15 +72,15 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a2f58b0bb10c380af2b26e57212856b8c9a59e0925b4c20f4a174a49734eaf7" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -104,44 +98,25 @@ dependencies = [ "winapi", ] -[[package]] -name = "aurora-bn" -version = "0.1.0" -source = "git+https://github.com/aurora-is-near/aurora-bn.git#8f1743884061981cac84388862e2763b2aa09307" -dependencies = [ - "byteorder", - "getrandom 0.2.2", - "rand 0.8.5", - "serde", -] - [[package]] name = "aurora-engine" -version = "2.6.1" +version = "2.7.0" dependencies = [ - "aurora-bn", "aurora-engine-precompiles", "aurora-engine-sdk", "aurora-engine-transactions", "aurora-engine-types", "base64 0.13.0", - "borsh 0.8.2", + "borsh", "byte-slice-cast", "ethabi", "evm", - "evm-core", "hex", - "libsecp256k1", - "logos", - "num", - "primitive-types", "rand 0.7.3", - "ripemd160", "rjson", "rlp", "serde", "serde_json", - "sha3 0.9.1", "wee_alloc", ] @@ -149,24 +124,21 @@ dependencies = [ name = "aurora-engine-precompiles" version = "1.0.0" dependencies = [ - "aurora-bn", "aurora-engine-sdk", "aurora-engine-types", - "base64 0.13.0", - "borsh 0.8.2", + "borsh", "ethabi", "evm", - "evm-core", "hex", "libsecp256k1", "num", - "primitive-types", "rand 0.7.3", - "ripemd160", + "ripemd", "serde", "serde_json", - "sha2", - "sha3 0.9.1", + "sha2 0.10.2", + "sha3 0.10.2", + "zeropool-bn", ] [[package]] @@ -174,9 +146,9 @@ name = "aurora-engine-sdk" version = "1.0.0" dependencies = [ "aurora-engine-types", - "borsh 0.8.2", - "sha2", - "sha3 0.9.1", + "borsh", + "sha2 0.10.2", + "sha3 0.10.2", ] [[package]] @@ -189,7 +161,7 @@ dependencies = [ "aurora-engine-transactions", "aurora-engine-types", "base64 0.13.0", - "borsh 0.8.2", + "borsh", "bstr", "byte-slice-cast", "criterion", @@ -213,7 +185,7 @@ dependencies = [ "rlp", "serde", "serde_json", - "sha3 0.9.1", + "sha3 0.10.2", "tempfile", "walrus", ] @@ -235,15 +207,11 @@ dependencies = [ name = "aurora-engine-types" version = "1.0.0" dependencies = [ - "borsh 0.8.2", - "bstr", - "ethabi", + "borsh", "hex", - "primitive-types", + "primitive-types 0.11.1", "rand 0.7.3", "serde", - "serde_json", - "sha3 0.9.1", ] [[package]] @@ -260,9 +228,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" @@ -291,12 +259,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" -[[package]] -name = "beef" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6736e2428df2ca2848d846c43e88745121a6654696e349ce0054a420815a7409" - [[package]] name = "bincode" version = "1.3.3" @@ -327,9 +289,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitvec" @@ -337,67 +299,67 @@ version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" dependencies = [ - "funty", - "radium", + "funty 1.1.0", + "radium 0.6.2", + "tap", + "wyz 0.2.0", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty 2.0.0", + "radium 0.7.0", "tap", - "wyz", + "wyz 0.5.0", ] [[package]] name = "blake2" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a5720225ef5daecf08657f23791354e1685a8c91a4c60c7f3d3b2892f978f4" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] name = "blake3" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" +checksum = "b64485778c4f16a6a5a9d335e80d449ac6c70cdd6a06d2af18a6f6f775a125b3" dependencies = [ "arrayref", "arrayvec 0.5.2", "cc", "cfg-if 0.1.10", "constant_time_eq", - "crypto-mac 0.8.0", + "crypto-mac", "digest 0.9.0", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.4", + "block-padding", + "generic-array 0.14.5", ] [[package]] -name = "block-padding" -version = "0.1.5" +name = "block-buffer" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "byte-tools", + "generic-array 0.14.5", ] [[package]] @@ -408,45 +370,22 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "borsh" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a7111f797cc721407885a323fb071636aee57f750b1a4ddc27397eba168a74" -dependencies = [ - "borsh-derive 0.8.2", - "hashbrown 0.9.1", -] - -[[package]] -name = "borsh" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18dda7dc709193c0d86a1a51050a926dc3df1cf262ec46a23a25dba421ea1924" -dependencies = [ - "borsh-derive 0.9.1", - "hashbrown 0.9.1", -] - -[[package]] -name = "borsh-derive" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307f3740906bac2c118a8122fe22681232b244f1369273e45f1156b45c43d2dd" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ - "borsh-derive-internal 0.8.2", - "borsh-schema-derive-internal 0.8.2", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn", + "borsh-derive", + "hashbrown 0.11.2", ] [[package]] name = "borsh-derive" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684155372435f578c0fa1acd13ebbb182cc19d6b38b64ae7901da4393217d264" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ - "borsh-derive-internal 0.9.1", - "borsh-schema-derive-internal 0.9.1", + "borsh-derive-internal", + "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", "proc-macro2", "syn", @@ -454,31 +393,9 @@ dependencies = [ [[package]] name = "borsh-derive-internal" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2104c73179359431cc98e016998f2f23bc7a05bc53e79741bcba705f30047bc" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2102f62f8b6d3edeab871830782285b64cc1830168094db05c8e458f209bc5c3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae29eb8418fcd46f723f8691a2ac06857d31179d33d2f2d91eb13967de97c728" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2", "quote", @@ -487,9 +404,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196c978c4c9b0b142d446ef3240690bf5a8a33497074a113ff9a337ccb750483" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2", "quote", @@ -504,9 +421,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "lazy_static", "memchr", @@ -516,27 +433,21 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.6.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byte-slice-cast" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c1bf4a04a88c54f589125563643d773f3254b5c38571395e2b591c693bbc81" - -[[package]] -name = "byte-tools" -version = "0.3.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" [[package]] name = "bytecheck" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314889ea31cda264cb7c3d6e6e5c9415a987ecb0e72c17c00d36fbb881d34abe" +checksum = "3a31f923c2db9513e4298b72df143e6e655a759b3d6a0966df18f81223fff54f" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -544,9 +455,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a2b3b92c135dae665a6f760205b89187638e83bed17ef3e44e83c712cf30600" +checksum = "edb17c862a905d912174daa27ae002326fff56dc8b8ada50a0a5f0976cb174f0" dependencies = [ "proc-macro2", "quote", @@ -561,9 +472,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" [[package]] name = "bytesize" @@ -587,9 +498,9 @@ dependencies = [ [[package]] name = "c2-chacha" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" dependencies = [ "cipher", "ppv-lite86", @@ -597,18 +508,18 @@ dependencies = [ [[package]] name = "cast" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc38c385bfd7e444464011bb24820f40dd1c76bcdfa1b78611cb7c2e5cafab75" +checksum = "4c24dab4283a142afa2fdca129b80ad2c6284e073930f964c3a1293c225ee39a" dependencies = [ - "rustc_version", + "rustc_version 0.4.0", ] [[package]] name = "cc" -version = "1.0.67" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" dependencies = [ "jobserver", ] @@ -644,7 +555,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time 0.1.43", + "time 0.1.44", "winapi", ] @@ -654,14 +565,14 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", ] [[package]] name = "clang-sys" -version = "1.2.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c" +checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" dependencies = [ "glob", "libc", @@ -670,9 +581,9 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "bitflags", "textwrap 0.11.0", @@ -681,16 +592,16 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.18" +version = "3.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" +checksum = "5b7b16274bb247b45177db843202209b12191b631a14a9d06e41b3777d6ecf14" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", "indexmap", - "lazy_static", + "once_cell", "strsim", "termcolor", "textwrap 0.15.0", @@ -698,9 +609,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.18" +version = "3.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +checksum = "759bf187376e1afa7b85b959e6a664a3e7a95203415dba952ad19139e798f902" dependencies = [ "heck 0.4.0", "proc-macro-error", @@ -711,9 +622,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" dependencies = [ "os_str_bytes", ] @@ -741,18 +652,18 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "cpp_demangle" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea47428dc9d2237f3c6bc134472edfd63ebba0af932e783506dcfd66f10d18a" +checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "cpufeatures" -version = "0.1.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec1028182c380cc45a2e2c5ec841134f2dfd0f8f5f0a5bcd68004f81b5efdf4" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] @@ -780,7 +691,7 @@ dependencies = [ "log", "regalloc", "smallvec", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", ] [[package]] @@ -816,7 +727,7 @@ dependencies = [ "cranelift-codegen", "log", "smallvec", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", ] [[package]] @@ -827,7 +738,7 @@ checksum = "8007864b5d0c49b026c861a15761785a2871124e401630c03ef1426e6d0d559e" dependencies = [ "cranelift-codegen", "libc", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", ] [[package]] @@ -839,7 +750,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools 0.10.0", + "itertools", "log", "smallvec", "wasmparser 0.81.0", @@ -848,25 +759,25 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "criterion" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab327ed7354547cc2ef43cbe20ef68b988e70b4b593cbd66a2a61733123a3d23" +checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10" dependencies = [ "atty", "cast", - "clap 2.33.3", + "clap 2.34.0", "criterion-plot", "csv", - "itertools 0.10.0", + "itertools", "lazy_static", "num-traits", "oorandom", @@ -883,19 +794,19 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d" +checksum = "d00996de9f2f7559f7f4dc286073197f83e92256a59ed395f9aac01fe717da57" dependencies = [ "cast", - "itertools 0.9.0", + "itertools", ] [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -914,25 +825,26 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.4" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52fb27eab85b17fbb9f6fd667089e07d6a2eb8743d02639ee7f6a7a7729c9c94" +checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d" dependencies = [ + "autocfg", "cfg-if 1.0.0", "crossbeam-utils", - "lazy_static", "memoffset", + "once_cell", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "7d82ee10ce34d7bc12c2122495e7593a9c41347ecdd64185af4ecf72cb1a7f83" dependencies = [ "cfg-if 1.0.0", - "lazy_static", + "once_cell", ] [[package]] @@ -942,22 +854,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "crypto-mac" -version = "0.8.0" +name = "crypto-common" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" dependencies = [ - "generic-array 0.14.4", - "subtle", + "generic-array 0.14.5", + "typenum", ] [[package]] name = "crypto-mac" -version = "0.11.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", "subtle", ] @@ -969,7 +881,7 @@ checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ "bstr", "csv-core", - "itoa 0.4.7", + "itoa 0.4.8", "ryu", "serde", ] @@ -985,9 +897,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.1.0" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" dependencies = [ "byteorder", "digest 0.9.0", @@ -998,9 +910,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.12.4" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ "darling_core", "darling_macro", @@ -1008,23 +920,22 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.12.4" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim", "syn", ] [[package]] name = "darling_macro" -version = "0.12.4" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", @@ -1033,13 +944,14 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.13" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b1b72f1263f214c0f823371768776c4f5841b942c9883aa8e5ec584fd0ba6" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case", "proc-macro2", "quote", + "rustc_version 0.4.0", "syn", ] @@ -1058,14 +970,25 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.4", + "generic-array 0.14.5", +] + +[[package]] +name = "digest" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +dependencies = [ + "block-buffer 0.10.2", + "crypto-common", + "subtle", ] [[package]] name = "dynasm" -version = "1.1.0" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdc2d9a5e44da60059bd38db2d05cbb478619541b8c79890547861ec1e3194f0" +checksum = "add9a102807b524ec050363f09e06f1504214b0e1c7797f64261c891022dce8b" dependencies = [ "bitflags", "byteorder", @@ -1078,30 +1001,26 @@ dependencies = [ [[package]] name = "dynasmrt" -version = "1.1.0" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42276e3f205fe63887cca255aa9a65a63fb72764c30b9a6252a7c7e46994f689" +checksum = "64fba5a42bd76a17cad4bfa00de168ee1cbfa06a5e8ce992ae880218c05641a9" dependencies = [ "byteorder", "dynasm", - "memmap2 0.2.2", + "memmap2", ] [[package]] name = "easy-ext" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62473f23f4a15690bd64ea37269266ba7b273e7c26b302aef68d3968ae9262a0" -dependencies = [ - "quote", - "syn", -] +checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" [[package]] name = "ed25519" -version = "1.1.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d0860415b12243916284c67a9be413e044ee6668247b99ba26d94b2bc06c8f6" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" dependencies = [ "signature", ] @@ -1116,7 +1035,7 @@ dependencies = [ "ed25519", "rand 0.7.3", "serde", - "sha2", + "sha2 0.9.9", "zeroize", ] @@ -1144,7 +1063,7 @@ dependencies = [ "aurora-engine-transactions", "aurora-engine-types", "base64 0.13.0", - "borsh 0.8.2", + "borsh", "evm-core", "postgres", "rocksdb", @@ -1156,30 +1075,29 @@ dependencies = [ name = "engine-standalone-tracing" version = "0.1.0" dependencies = [ - "aurora-engine", - "aurora-engine-sdk", "aurora-engine-types", "evm", "evm-core", "evm-gasometer", "evm-runtime", + "hex", "serde", ] [[package]] name = "enumset" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd795df6708a599abf1ee10eacc72efd052b7a5f70fdf0715e4d5151a6db9c3" +checksum = "4799cdb24d48f1f8a7a98d06b7fde65a85a2d1e42b25a889f5406aa1fbefe074" dependencies = [ "enumset_derive", ] [[package]] name = "enumset_derive" -version = "0.5.4" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19c52f9ec503c8a68dc04daf71a04b07e690c32ab1a8b68e33897f255269d47" +checksum = "ea83a3fbdc1d999ccfbcbee717eab36f8edf2d71693a23ce0d7cca19e085304c" dependencies = [ "darling", "proc-macro2", @@ -1206,80 +1124,85 @@ dependencies = [ [[package]] name = "errno-dragonfly" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" +checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ - "gcc", + "cc", "libc", ] [[package]] name = "ethabi" -version = "14.1.0" -source = "git+https://github.com/darwinia-network/ethabi?branch=xavier-no-std#09da0834d95f8b43377ca22d7b1c97a2401f4b0c" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f186de076b3e77b8e6d73c99d1b52edc2a229e604f4b5eb6992c06c11d79d537" dependencies = [ - "anyhow", "ethereum-types", "hex", + "once_cell", + "regex", "serde", "serde_json", - "sha3 0.9.1", + "sha3 0.10.2", "thiserror", "uint", ] [[package]] name = "ethbloom" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779864b9c7f7ead1f092972c3257496c6a84b46dba2ce131dd8a282cb2cc5972" +checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" dependencies = [ "crunchy", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", + "impl-serde", + "scale-info", "tiny-keccak", ] [[package]] name = "ethereum" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fb916554a4dba293ea69c69ad5653e21d770a9d0c2496b5fa0a1f5a3946d87" +checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" dependencies = [ "bytes", "ethereum-types", "hash-db", "hash256-std-hasher", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "rlp", "rlp-derive", "scale-info", "serde", - "sha3 0.9.1", + "sha3 0.10.2", "triehash", ] [[package]] name = "ethereum-types" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ "ethbloom", "fixed-hash", - "impl-codec", + "impl-codec 0.6.0", "impl-rlp", - "primitive-types", + "impl-serde", + "primitive-types 0.11.1", "scale-info", "uint", ] [[package]] name = "evm" -version = "0.33.1" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ "auto_impl", "environmental", @@ -1288,47 +1211,46 @@ dependencies = [ "evm-gasometer", "evm-runtime", "log", - "parity-scale-codec", - "primitive-types", + "parity-scale-codec 3.1.5", + "primitive-types 0.11.1", "rlp", "scale-info", "serde", - "sha3 0.8.2", + "sha3 0.10.2", ] [[package]] name = "evm-core" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ - "funty", - "parity-scale-codec", - "primitive-types", + "parity-scale-codec 3.1.5", + "primitive-types 0.11.1", "scale-info", "serde", ] [[package]] name = "evm-gasometer" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ "environmental", "evm-core", "evm-runtime", - "primitive-types", + "primitive-types 0.11.1", ] [[package]] name = "evm-runtime" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ "auto_impl", "environmental", "evm-core", - "primitive-types", - "sha3 0.8.2", + "primitive-types 0.11.1", + "sha3 0.10.2", ] [[package]] @@ -1337,6 +1259,15 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +[[package]] +name = "fastrand" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + [[package]] name = "fixed-hash" version = "0.7.0" @@ -1381,11 +1312,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + [[package]] name = "futures" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" +checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" dependencies = [ "futures-channel", "futures-core", @@ -1398,9 +1335,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" +checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" dependencies = [ "futures-core", "futures-sink", @@ -1408,15 +1345,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" [[package]] name = "futures-executor" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" +checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" dependencies = [ "futures-core", "futures-task", @@ -1425,18 +1362,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" +checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" [[package]] name = "futures-macro" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" +checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -1444,23 +1379,22 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" [[package]] name = "futures-task" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" +checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" [[package]] name = "futures-util" -version = "0.3.15" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" +checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ - "autocfg", "futures-channel", "futures-core", "futures-io", @@ -1470,17 +1404,9 @@ dependencies = [ "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] -[[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - [[package]] name = "generic-array" version = "0.12.4" @@ -1492,9 +1418,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "typenum", "version_check", @@ -1513,15 +1439,13 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.2" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", - "wasm-bindgen", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] @@ -1537,9 +1461,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.13.20" +version = "0.13.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9831e983241f8c5591ed53f17d874833e2fa82cac2625f3888c50cbfe136cba" +checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" dependencies = [ "bitflags", "libc", @@ -1558,9 +1482,9 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "half" -version = "1.7.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62aca2aba2d62b4a7f5b33f3712cb1b0692779a56fb510499d5c0aa594daeaf3" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "hash-db" @@ -1579,20 +1503,20 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.4.7", + "ahash", ] [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" dependencies = [ - "ahash 0.7.4", + "ahash", ] [[package]] @@ -1606,9 +1530,9 @@ dependencies = [ [[package]] name = "heck" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ "unicode-segmentation", ] @@ -1621,9 +1545,9 @@ checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] @@ -1640,18 +1564,17 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "crypto-mac 0.8.0", + "crypto-mac", "digest 0.9.0", ] [[package]] name = "hmac" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac 0.11.1", - "digest 0.9.0", + "digest 0.10.3", ] [[package]] @@ -1661,7 +1584,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array 0.14.5", "hmac 0.8.1", ] @@ -1694,7 +1617,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 2.3.1", +] + +[[package]] +name = "impl-codec" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +dependencies = [ + "parity-scale-codec 3.1.5", ] [[package]] @@ -1708,18 +1640,18 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" dependencies = [ "serde", ] [[package]] name = "impl-trait-for-tuples" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", @@ -1728,29 +1660,29 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.9.1", + "hashbrown 0.12.1", "serde", ] [[package]] name = "instant" -version = "0.1.9" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", ] [[package]] name = "integer-encoding" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e85a1509a128c855368e135cffcde7eac17d8e1083f41e2b98c58bc1a5074be" +checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "io-lifetimes" @@ -1763,27 +1695,18 @@ dependencies = [ [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" +checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" @@ -1793,33 +1716,33 @@ checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "jobserver" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd" +checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "c3fac17f7123a73ca62df411b1bf727ccc805daa070338fda671c86dac1bdc27" dependencies = [ "wasm-bindgen", ] [[package]] name = "keccak" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" [[package]] name = "lazy-static-include" -version = "3.1.1" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6002fe04202bdaf9e8d82929a7c9ebfcf47d027d87f671818e8cf9ccb4029908" +checksum = "e559d5071cbb9743796593a892d96a7cc411d90aad711f57cc7dcbbf3893c10c" dependencies = [ "lazy_static", "manifest-dir-macros", @@ -1831,6 +1754,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] [[package]] name = "lazycell" @@ -1840,21 +1766,21 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "leb128" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.115" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a8d982fa7a96a000f6ec4cfe966de9703eccde29750df2bb8949da91b0e818d" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libgit2-sys" -version = "0.12.21+1.1.0" +version = "0.12.26+1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86271bacd72b2b9e854c3dcfb82efd538f15f870e4c11af66900effb462f6825" +checksum = "19e1c899248e606fbfe68dcb31d8b0176ebab833b103824af31bddf4b7457494" dependencies = [ "cc", "libc", @@ -1866,9 +1792,9 @@ dependencies = [ [[package]] name = "libloading" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if 1.0.0", "winapi", @@ -1904,7 +1830,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand 0.8.5", "serde", - "sha2", + "sha2 0.9.9", "typenum", ] @@ -1939,9 +1865,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.21" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0186af0d8f171ae6b9c4c90ec51898bad5d08a2d5e470903a50d9ad8959cbee" +checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" dependencies = [ "cc", "libc", @@ -1953,9 +1879,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "libc", @@ -1980,46 +1906,23 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "logos" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427e2abca5be13136da9afdbf874e6b34ad9001dd70f2b103b083a85daa7b345" -dependencies = [ - "logos-derive", -] - -[[package]] -name = "logos-derive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a7d287fd2ac3f75b11f19a1c8a874a7d55744bd91f7a1b3e7cf87d4343c36d" -dependencies = [ - "beef", - "fnv", - "proc-macro2", - "quote", - "regex-syntax", - "syn", - "utf8-ranges", -] - [[package]] name = "loupe" version = "0.1.3" @@ -2042,9 +1945,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.7.2" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f" +checksum = "c84e6fe5655adc6ce00787cf7dcaf8dc4f998a0565d23eafc207a8b08ca3349a" dependencies = [ "hashbrown 0.11.2", ] @@ -2060,9 +1963,9 @@ dependencies = [ [[package]] name = "manifest-dir-macros" -version = "0.1.11" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca7bbc41d799583acd24ed05a9c3db3c9275c93491b4e7cde0e609bb9598f2f0" +checksum = "f08150cf2bab1fc47c2196f4f41173a27fcd0f684165e5458c0046b53a472e2f" dependencies = [ "once_cell", "proc-macro2", @@ -2081,44 +1984,33 @@ dependencies = [ [[package]] name = "matches" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "md-5" -version = "0.9.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" +checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.3", ] [[package]] name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memmap" -version = "0.7.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memmap2" -version = "0.2.2" +[[package]] +name = "memmap" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397d1a6d6d0563c0f5462bbdae662cf6c784edf5e828e40c7257f85d82bf56dd" +checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" dependencies = [ "libc", + "winapi", ] [[package]] @@ -2132,9 +2024,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -2153,48 +2045,37 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ "libc", "log", - "miow", - "ntapi", "wasi 0.11.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "windows-sys", ] [[package]] name = "more-asserts" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" +checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "near-account-id" version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ - "borsh 0.9.1", + "borsh", "serde", ] @@ -2219,7 +2100,7 @@ dependencies = [ "num-rational 0.3.2", "serde", "serde_json", - "sha2", + "sha2 0.9.9", "smart-default", "tracing", ] @@ -2231,7 +2112,7 @@ source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0db dependencies = [ "arrayref", "blake2", - "borsh 0.9.1", + "borsh", "bs58", "c2-chacha", "curve25519-dalek", @@ -2241,7 +2122,7 @@ dependencies = [ "near-account-id", "once_cell", "parity-secp256k1", - "primitive-types", + "primitive-types 0.10.1", "rand 0.7.3", "rand_core 0.5.1", "serde", @@ -2266,7 +2147,7 @@ source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0db dependencies = [ "atty", "backtrace", - "clap 3.1.18", + "clap 3.2.7", "once_cell", "opentelemetry", "opentelemetry-jaeger", @@ -2284,7 +2165,7 @@ name = "near-pool" version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ - "borsh 0.9.1", + "borsh", "near-crypto", "near-metrics", "near-primitives", @@ -2297,7 +2178,7 @@ name = "near-primitives" version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ - "borsh 0.9.1", + "borsh", "byteorder", "bytesize", "chrono", @@ -2310,7 +2191,7 @@ dependencies = [ "near-vm-errors", "num-rational 0.3.2", "once_cell", - "primitive-types", + "primitive-types 0.10.1", "rand 0.7.3", "reed-solomon-erasure", "serde", @@ -2326,13 +2207,13 @@ version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ "base64 0.11.0", - "borsh 0.9.1", + "borsh", "bs58", "derive_more", "near-account-id", "num-rational 0.3.2", "serde", - "sha2", + "sha2 0.9.9", "strum", ] @@ -2359,10 +2240,10 @@ dependencies = [ [[package]] name = "near-sdk" version = "3.1.0" -source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07#ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07" +source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=7a3fa3fbff84b712050370d840297df38c925d2d#7a3fa3fbff84b712050370d840297df38c925d2d" dependencies = [ "base64 0.13.0", - "borsh 0.8.2", + "borsh", "bs58", "near-primitives-core", "near-sdk-macros", @@ -2375,7 +2256,7 @@ dependencies = [ [[package]] name = "near-sdk-core" version = "3.1.0" -source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07#ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07" +source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=7a3fa3fbff84b712050370d840297df38c925d2d#7a3fa3fbff84b712050370d840297df38c925d2d" dependencies = [ "Inflector", "proc-macro2", @@ -2386,7 +2267,7 @@ dependencies = [ [[package]] name = "near-sdk-macros" version = "3.1.0" -source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07#ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07" +source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=7a3fa3fbff84b712050370d840297df38c925d2d#7a3fa3fbff84b712050370d840297df38c925d2d" dependencies = [ "near-sdk-core", "proc-macro2", @@ -2397,10 +2278,10 @@ dependencies = [ [[package]] name = "near-sdk-sim" version = "3.2.0" -source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07#ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07" +source = "git+https://github.com/aurora-is-near/near-sdk-rs.git?rev=7a3fa3fbff84b712050370d840297df38c925d2d#7a3fa3fbff84b712050370d840297df38c925d2d" dependencies = [ "chrono", - "funty", + "funty 1.1.0", "lazy-static-include", "near-chain-configs", "near-crypto", @@ -2422,7 +2303,7 @@ name = "near-store" version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ - "borsh 0.9.1", + "borsh", "byteorder", "bytesize", "derive_more", @@ -2450,7 +2331,7 @@ name = "near-vm-errors" version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ - "borsh 0.9.1", + "borsh", "near-account-id", "near-rpc-error-macro", "serde", @@ -2462,7 +2343,7 @@ version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ "base64 0.13.0", - "borsh 0.9.1", + "borsh", "bs58", "byteorder", "near-account-id", @@ -2472,8 +2353,9 @@ dependencies = [ "near-vm-errors", "ripemd160", "serde", - "sha2", + "sha2 0.9.9", "sha3 0.9.1", + "zeropool-bn", ] [[package]] @@ -2482,7 +2364,7 @@ version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ "anyhow", - "borsh 0.9.1", + "borsh", "loupe", "memoffset", "near-cache", @@ -2527,7 +2409,7 @@ name = "node-runtime" version = "0.0.0" source = "git+https://github.com/birchmd/nearcore.git?rev=980bc48dc02878fea1e0dbc5812ae7de49f12dda#980bc48dc02878fea1e0dbc5812ae7de49f12dda" dependencies = [ - "borsh 0.9.1", + "borsh", "byteorder", "hex", "near-chain-configs", @@ -2538,7 +2420,7 @@ dependencies = [ "near-vm-errors", "near-vm-logic", "near-vm-runner", - "num-bigint 0.3.2", + "num-bigint 0.3.3", "num-rational 0.3.2", "num-traits", "once_cell", @@ -2560,34 +2442,25 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - [[package]] name = "num" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" dependencies = [ - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num-complex", "num-integer", "num-iter", - "num-rational 0.4.0", + "num-rational 0.4.1", "num-traits", ] [[package]] name = "num-bigint" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ "autocfg", "num-integer", @@ -2596,9 +2469,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d047c1062aa51e256408c560894e5251f08925980e53cf1aa5bd00eec6512" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", @@ -2607,18 +2480,18 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ "num-traits", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", "num-traits", @@ -2626,9 +2499,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", @@ -2642,7 +2515,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg", - "num-bigint 0.3.2", + "num-bigint 0.3.3", "num-integer", "num-traits", "serde", @@ -2650,30 +2523,30 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -2710,9 +2583,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.7.2" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "oorandom" @@ -2720,12 +2593,6 @@ version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - [[package]] name = "opaque-debug" version = "0.3.0" @@ -2734,15 +2601,15 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.63" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b0d6fb7d80f877617dfcb014e605e2b5ab2fb0afdf27935219bb6bd984cb98" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ "autocfg", "cc", @@ -2823,25 +2690,51 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "2.3.0" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" +dependencies = [ + "arrayvec 0.7.2", + "bitvec 0.20.4", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 2.3.1", + "serde", +] + +[[package]] +name = "parity-scale-codec" +version = "3.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11263a97373b43da4b426edbb52ef99a7b51e2d9752ef56a7f8b356f48495a5" +checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" dependencies = [ - "arrayvec 0.7.0", - "bitvec", + "arrayvec 0.7.2", + "bitvec 1.0.1", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive", + "parity-scale-codec-derive 3.1.3", "serde", ] [[package]] name = "parity-scale-codec-derive" -version = "2.3.0" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "parity-scale-codec-derive" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b157dc92b3db2bae522afb31b3843e91ae097eb01d66c72dda66a2e86bc3ca14" +checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -2883,13 +2776,23 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", - "lock_api 0.4.4", - "parking_lot_core 0.8.3", + "lock_api 0.4.7", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api 0.4.7", + "parking_lot_core 0.9.3", ] [[package]] @@ -2908,23 +2811,36 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" +checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.8", + "redox_syscall 0.2.13", "smallvec", "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.13", + "smallvec", + "windows-sys", +] + [[package]] name = "paste" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] name = "peeking_take_while" @@ -2940,9 +2856,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "phf" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fc3db1018c4b59d7d582a739436478b6035138b6aecbce989fc91c3e98409f" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ "phf_shared", ] @@ -2978,9 +2894,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -2990,15 +2906,15 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "plotters" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ca0ae5f169d0917a7c7f5a9c1a3d3d9598f18f529dd2b8373ed988efea307a" +checksum = "32a3fd9ec30b9749ce28cd91f255d569591cdf937fe280c312143e3c4bad6f2a" dependencies = [ "num-traits", "plotters-backend", @@ -3009,24 +2925,24 @@ dependencies = [ [[package]] name = "plotters-backend" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07fffcddc1cb3a1de753caa4e4df03b79922ba43cf882acc1bdd7e8df9f4590" +checksum = "d88417318da0eaf0fdcdb51a0ee6c3bed624333bff8f946733049380be67ac1c" [[package]] name = "plotters-svg" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b38a02e23bd9604b842a812063aec4ef702b57989c37b655254bb61c471ad211" +checksum = "521fa9638fa597e1dc53e9412a4f9cefb01187ee1f7413076f9e6749e2885ba9" dependencies = [ "plotters-backend", ] [[package]] name = "postgres" -version = "0.19.2" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb76d6535496f633fa799bb872ffb4790e9cbdedda9d35564ca0252f930c0dd5" +checksum = "c8bbcd5f6deb39585a0d9f4ef34c4a41c25b7ad26d23c75d837d78c8e7adc85f" dependencies = [ "bytes", "fallible-iterator", @@ -3038,27 +2954,27 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b145e6a4ed52cb316a27787fc20fe8a25221cb476479f61e4e0327c15b98d91a" +checksum = "878c6cbf956e03af9aa8204b407b9cbf47c072164800aa918c516cd4b056c50c" dependencies = [ "base64 0.13.0", "byteorder", "bytes", "fallible-iterator", - "hmac 0.11.0", + "hmac 0.12.1", "md-5", "memchr", "rand 0.8.5", - "sha2", + "sha2 0.10.2", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04619f94ba0cc80999f4fc7073607cb825bc739a883cb6d20900fc5e009d6b0d" +checksum = "ebd6e8b7189a73169290e89bd24c771071f1012d8fe6f738f5226531f0b03d89" dependencies = [ "bytes", "fallible-iterator", @@ -3067,9 +2983,9 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "primitive-types" @@ -3078,7 +2994,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", - "impl-codec", + "impl-codec 0.5.1", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +dependencies = [ + "fixed-hash", + "impl-codec 0.6.0", "impl-rlp", "impl-serde", "scale-info", @@ -3096,9 +3023,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", "toml", @@ -3128,23 +3055,11 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" dependencies = [ "unicode-ident", ] @@ -3158,7 +3073,7 @@ dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", - "parking_lot 0.11.1", + "parking_lot 0.11.2", "protobuf", "regex", "thiserror", @@ -3166,15 +3081,15 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.23.0" +version = "2.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45604fc7a88158e7d514d8e22e14ac746081e7a70d7690074dd0029ee37458d6" +checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96" [[package]] name = "psm" -version = "0.1.13" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21ff0279b4a85e576b97e4a21d13e437ebcd56612706cde5d3f0d5c9399490c0" +checksum = "871372391786ccec00d3c5d3d6608905b3d4db263639cfe075d3b60a736d115a" dependencies = [ "cc", ] @@ -3212,9 +3127,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.9" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", ] @@ -3225,6 +3140,12 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.7.3" @@ -3245,8 +3166,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.0", - "rand_core 0.6.2", + "rand_chacha 0.3.1", + "rand_core 0.6.3", ] [[package]] @@ -3261,12 +3182,12 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.2", + "rand_core 0.6.3", ] [[package]] @@ -3280,11 +3201,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.2", + "getrandom 0.2.7", ] [[package]] @@ -3298,9 +3219,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.5.0" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ "autocfg", "crossbeam-deque", @@ -3310,14 +3231,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] @@ -3329,9 +3249,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.8" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] @@ -3369,11 +3289,10 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "byteorder", "regex-syntax", ] @@ -3425,6 +3344,15 @@ dependencies = [ "bytecheck", ] +[[package]] +name = "ripemd" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "ripemd160" version = "0.9.1" @@ -3433,7 +3361,7 @@ checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -3443,12 +3371,12 @@ source = "git+https://github.com/aurora-is-near/rjson?rev=cc3da949#cc3da9495e7e5 [[package]] name = "rkyv" -version = "0.7.31" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439655b8d657bcb28264da8e5380d55549e34ffc4149bea9e3521890a122a7bd" +checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" dependencies = [ "bytecheck", - "hashbrown 0.11.2", + "hashbrown 0.12.1", "ptr_meta", "rend", "rkyv_derive", @@ -3457,9 +3385,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.31" +version = "0.7.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cded413ad606a80291ca84bedba137093807cf4f5b36be8c60f57a7e790d48f6" +checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" dependencies = [ "proc-macro2", "quote", @@ -3477,9 +3405,9 @@ dependencies = [ [[package]] name = "rlp" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8" +checksum = "999508abb0ae792aabed2460c45b89106d97fe4adac593bdaef433c2605847b5" dependencies = [ "bytes", "rustc-hex", @@ -3508,9 +3436,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "410f7acf3cb3a44527c5d9546bad4bf4e6c460915d5f9f2fc524498bfe8f70ce" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" @@ -3530,7 +3458,16 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver", + "semver 0.9.0", +] + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver 1.0.11", ] [[package]] @@ -3549,15 +3486,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" +checksum = "a0a5f7c728f5d284929a1cccb5bc19884422bfe6ef4d6c409da2c41838983fcf" [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "same-file" @@ -3570,24 +3507,24 @@ dependencies = [ [[package]] name = "scale-info" -version = "1.0.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +checksum = "c46be926081c9f4dd5dd9b6f1d3e3229f2360bc6502dd8836f84a93b7c75e99a" dependencies = [ - "bitvec", + "bitvec 1.0.1", "cfg-if 1.0.0", "derive_more", - "parity-scale-codec", + "parity-scale-codec 3.1.5", "scale-info-derive", ] [[package]] name = "scale-info-derive" -version = "1.0.0" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c" dependencies = [ - "proc-macro-crate 1.1.0", + "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", @@ -3614,6 +3551,12 @@ dependencies = [ "semver-parser", ] +[[package]] +name = "semver" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d92beeab217753479be2f74e54187a6aed4c125ff0703a866c3147a02f0c6dd" + [[package]] name = "semver-parser" version = "0.7.0" @@ -3622,9 +3565,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] @@ -3641,18 +3584,18 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "212e73464ebcde48d723aa02eb270ba62eff38a9b732df31f33f1b4e145f3a54" dependencies = [ "serde", ] [[package]] name = "serde_cbor" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" dependencies = [ "half", "serde", @@ -3660,9 +3603,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -3671,39 +3614,37 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.72" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa 0.4.7", + "itoa 1.0.2", "ryu", "serde", ] [[package]] name = "sha2" -version = "0.9.5" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] -name = "sha3" -version = "0.8.2" +name = "sha2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "block-buffer 0.7.3", - "byte-tools", - "digest 0.8.1", - "keccak", - "opaque-debug 0.2.3", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.3", ] [[package]] @@ -3715,7 +3656,17 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug 0.3.0", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a31480366ec990f395a61b7c08122d99bd40544fdb5abcfc1b06bb29994312c" +dependencies = [ + "digest 0.10.3", + "keccak", ] [[package]] @@ -3735,27 +3686,27 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "signature" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" [[package]] name = "siphasher" -version = "0.3.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "smallvec" -version = "1.6.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "cc88c725d61fc6c3132893370cac4a0200e3fedf5da8331c570664b1987f5ca2" [[package]] name = "smart-default" @@ -3778,6 +3729,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -3808,18 +3765,18 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.24.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" +checksum = "4faebde00e8ff94316c01800f9054fd2ba77d30d9e922541913051d1d978918b" dependencies = [ "heck 0.4.0", "proc-macro2", @@ -3830,26 +3787,26 @@ dependencies = [ [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.76" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" +checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] name = "synstructure" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", @@ -3871,20 +3828,20 @@ checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" [[package]] name = "target-lexicon" -version = "0.12.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff" +checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.5", - "redox_syscall 0.2.8", + "redox_syscall 0.2.13", "remove_dir_all", "winapi", ] @@ -3966,19 +3923,20 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] [[package]] name = "time" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ "itoa 1.0.2", "libc", @@ -4006,9 +3964,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.2.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -4021,9 +3979,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.2" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ "bytes", "libc", @@ -4038,9 +3996,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6c8b33df661b548dcd8f9bf87debb8c56c05657ed291122e1188698c2ece95" +checksum = "19c88a47a23c5d2dc9ecd28fb38fba5fc7e5ddc1fe64488ec145076b0c71c8ae" dependencies = [ "async-trait", "byteorder", @@ -4048,7 +4006,7 @@ dependencies = [ "fallible-iterator", "futures", "log", - "parking_lot 0.11.1", + "parking_lot 0.12.1", "percent-encoding", "phf", "pin-project-lite", @@ -4061,9 +4019,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" dependencies = [ "futures-core", "pin-project-lite", @@ -4072,32 +4030,32 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ "cfg-if 1.0.0", "pin-project-lite", @@ -4112,15 +4070,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e" dependencies = [ "crossbeam-channel", - "time 0.3.9", + "time 0.3.11", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.15" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" +checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" dependencies = [ "proc-macro2", "quote", @@ -4129,11 +4087,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.26" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54c8ca710e81886d498c2fd3331b56c93aa248d49de2222ad2742247c60072f" +checksum = "7b7358be39f2f274f322d2aaed611acc57f382e8eb1e5b48cb9ae30933495ce7" dependencies = [ - "lazy_static", + "once_cell", "valuable", ] @@ -4150,10 +4108,11 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.17.2" +version = "0.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9378e96a9361190ae297e7f3a8ff644aacd2897f244b1ff81f381669196fa6" +checksum = "93600c803bb15e2a32bd376001b8625587f268fe887669b5ac86af524637c242" dependencies = [ + "once_cell", "opentelemetry", "tracing", "tracing-core", @@ -4207,9 +4166,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" -version = "0.9.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" dependencies = [ "byteorder", "crunchy", @@ -4219,45 +4178,42 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" -dependencies = [ - "matches", -] +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-normalization" -version = "0.1.17" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" +checksum = "81dee68f85cab8cf68dec42158baf3a79a1cdc065a8b103025965d6ccb7f6cbd" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "url" @@ -4271,12 +4227,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "utf8-ranges" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ae116fef2b7fea257ed6440d3cfcff7f190865f170cdad00bb6465bf18ecba" - [[package]] name = "valuable" version = "0.1.0" @@ -4285,15 +4235,15 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "vcpkg" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "void" @@ -4332,7 +4282,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e5bd22c71e77d60140b0bd5be56155a37e5bd14e24f5f87298040d0cc40d7" dependencies = [ - "heck 0.3.2", + "heck 0.3.3", "proc-macro2", "quote", "syn", @@ -4346,9 +4296,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasi" @@ -4358,9 +4308,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -4368,9 +4318,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" dependencies = [ "bumpalo", "lazy_static", @@ -4383,9 +4333,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4393,9 +4343,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" dependencies = [ "proc-macro2", "quote", @@ -4406,9 +4356,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" [[package]] name = "wasmer-compiler-near" @@ -4421,7 +4371,7 @@ dependencies = [ "serde", "serde_bytes", "smallvec", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", "thiserror", "wasmer-types-near", "wasmer-vm-near", @@ -4456,12 +4406,12 @@ dependencies = [ "backtrace", "enumset", "lazy_static", - "memmap2 0.5.2", + "memmap2", "more-asserts", "rustc-demangle", "serde", "serde_bytes", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", "thiserror", "wasmer-compiler-near", "wasmer-types-near", @@ -4495,7 +4445,7 @@ checksum = "5a3fac37da3c625e98708c5dd92d3f642aaf700fd077168d3d0fff277ec6a165" dependencies = [ "bincode", "blake3", - "borsh 0.9.1", + "borsh", "cc", "digest 0.8.1", "errno", @@ -4506,7 +4456,7 @@ dependencies = [ "nix", "page_size", "parking_lot 0.10.2", - "rustc_version", + "rustc_version 0.2.3", "serde", "serde-bench", "serde_bytes", @@ -4538,7 +4488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6edd0ba6c0bcf9b279186d4dbe81649dda3e5ef38f586865943de4dcd653f8" dependencies = [ "bincode", - "borsh 0.9.1", + "borsh", "byteorder", "dynasm", "dynasmrt", @@ -4629,7 +4579,7 @@ dependencies = [ "region 2.2.0", "rustc-demangle", "serde", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", "wasmparser 0.81.0", "wasmtime-cranelift", "wasmtime-environ", @@ -4654,7 +4604,7 @@ dependencies = [ "log", "more-asserts", "object 0.27.1", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", "thiserror", "wasmparser 0.81.0", "wasmtime-environ", @@ -4674,7 +4624,7 @@ dependencies = [ "more-asserts", "object 0.27.1", "serde", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", "thiserror", "wasmparser 0.81.0", "wasmtime-types", @@ -4694,7 +4644,7 @@ dependencies = [ "object 0.27.1", "region 2.2.0", "serde", - "target-lexicon 0.12.2", + "target-lexicon 0.12.4", "thiserror", "wasmtime-environ", "wasmtime-runtime", @@ -4740,9 +4690,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.49" +version = "0.3.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59fe19d70f5dacc03f6e46777213facae5ac3801575d56ca6cbd4c93dcd12310" +checksum = "2fed94beee57daf8dd7d51f2b15dc2bcde92d7a72304cdf662a4371008b71b90" dependencies = [ "js-sys", "wasm-bindgen", @@ -4791,12 +4741,64 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "wyz" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +[[package]] +name = "wyz" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b31594f29d27036c383b53b59ed3476874d518f0efb151b27a4c275141390e" +dependencies = [ + "tap", +] + [[package]] name = "zeroize" version = "1.3.0" @@ -4818,6 +4820,20 @@ dependencies = [ "synstructure", ] +[[package]] +name = "zeropool-bn" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e61de68ede9ffdd69c01664f65a178c5188b73f78faa21f0936016a888ff7c" +dependencies = [ + "borsh", + "byteorder", + "crunchy", + "lazy_static", + "rand 0.8.5", + "rustc-hex", +] + [[package]] name = "zstd-sys" version = "1.6.3+zstd.1.5.2" diff --git a/Cargo.toml b/Cargo.toml index 679e301f2..56c244ec8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,9 @@ members = [ "engine-types", ] exclude = [ - "etc/state-migration-test", - "etc/ft-receiver", - "etc/benchmark-contract", + "etc/tests/state-migration-test", + "etc/tests/ft-receiver", + "etc/tests/benchmark-contract", + "etc/tests/self-contained-5bEgfRQ", + "etc/xcc-router", ] diff --git a/Makefile b/Makefile deleted file mode 100644 index c8222ae4c..000000000 --- a/Makefile +++ /dev/null @@ -1,109 +0,0 @@ -CARGO = cargo -NEAR = near -FEATURES = mainnet -# More strict clippy rules -FEATURES_CLIPPY = contract -ADDITIONAL_FEATURES = - -ifeq ($(evm-bully),yes) - ADDITIONAL_FEATURES := $(ADDITIONAL_FEATURES),evm_bully -endif - -ifeq ($(error-refund),yes) - ADDITIONAL_FEATURES := $(ADDITIONAL_FEATURES),error_refund -endif - -release: mainnet -debug: mainnet-debug -check: test test-sol check-format check-clippy -test: test-mainnet - -deploy: mainnet-release.wasm - $(NEAR) deploy --account-id=$(or $(NEAR_EVM_ACCOUNT),aurora.test.near) --wasm-file=$< - -mainnet: FEATURES=mainnet -mainnet: mainnet-release.wasm -mainnet-release.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm - cp $< $@ - -testnet: FEATURES=testnet -testnet: testnet-release.wasm -testnet-release.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm - cp $< $@ - -mainnet-debug: FEATURES=mainnet -mainnet-debug: mainnet-debug.wasm -mainnet-debug.wasm: target/wasm32-unknown-unknown/debug/aurora_engine.wasm - cp $< $@ - -testnet-debug: FEATURES=testnet -testnet-debug: testnet-debug.wasm -testnet-debug.wasm: target/wasm32-unknown-unknown/debug/aurora_engine.wasm - cp $< $@ - -# test builds depend on release since `tests/test_upgrade.rs` includes `mainnet-release.wasm` - -test-mainnet: mainnet-test-build - $(CARGO) test --features mainnet-test$(ADDITIONAL_FEATURES) -mainnet-test-build: FEATURES=mainnet,integration-test,meta-call -mainnet-test-build: mainnet-test.wasm -mainnet-test.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm - cp $< $@ - -test-testnet: testnet-test-build - $(CARGO) test --features testnet-test$(ADDITIONAL_FEATURES) -testnet-test-build: FEATURES=testnet,integration-test,meta-call -testnet-test-build: testnet-test.wasm -testnet-test.wasm: target/wasm32-unknown-unknown/release/aurora_engine.wasm - cp $< $@ - -target/wasm32-unknown-unknown/release/aurora_engine.wasm: Cargo.toml Cargo.lock $(shell find src -name "*.rs") etc/eth-contracts/res/EvmErc20.bin - RUSTFLAGS='-C link-arg=-s' $(CARGO) build \ - --target wasm32-unknown-unknown \ - --release \ - --verbose \ - -p aurora-engine \ - --no-default-features \ - --features=$(FEATURES)$(ADDITIONAL_FEATURES) \ - -Z avoid-dev-deps - -target/wasm32-unknown-unknown/debug/aurora_engine.wasm: Cargo.toml Cargo.lock $(wildcard src/*.rs) etc/eth-contracts/res/EvmErc20.bin - $(CARGO) build \ - --target wasm32-unknown-unknown \ - -p aurora-engine \ - --no-default-features \ - --features=$(FEATURES)$(ADDITIONAL_FEATURES) \ - -Z avoid-dev-deps - -etc/eth-contracts/res/EvmErc20.bin: $(shell find etc/eth-contracts/contracts -name "*.sol") etc/eth-contracts/package.json - cd etc/eth-contracts && yarn && yarn build - -etc/eth-contracts/artifacts/contracts/test/StateTest.sol/StateTest.json: $(shell find etc/eth-contracts/contracts -name "*.sol") etc/eth-contracts/package.json - cd etc/eth-contracts && yarn && yarn build - -check-format: - $(CARGO) fmt -- --check - -check-clippy: - $(CARGO) clippy --no-default-features --features=$(FEATURES_CLIPPY)$(ADDITIONAL_FEATURES) -- -D warnings - -test-sol: - cd etc/eth-contracts && yarn && yarn test - -format: - $(CARGO) fmt - -clean: - @rm -Rf *.wasm - @rm -Rf etc/eth-contracts/res - cargo clean - -.PHONY: release debug check test deploy -.PHONY: mainnet mainnet-debug test-mainnet mainnet-test-build -.PHONY: testnet testnet-debug test-testnet testnet-test-build -.PHONY: target/wasm32-unknown-unknown/release/aurora_engine.wasm -.PHONY: target/wasm32-unknown-unknown/debug/aurora_engine.wasm -.PHONY: check-format check-clippy test-sol format clean - -.SECONDARY: -.SUFFIXES: diff --git a/Makefile.toml b/Makefile.toml new file mode 100644 index 000000000..7040fd40f --- /dev/null +++ b/Makefile.toml @@ -0,0 +1,231 @@ +env_files = [ + { path = ".env/mainnet.env", profile = "mainnet" }, + { path = ".env/testnet.env", profile = "testnet" }, + { path = ".env/local.env", profile = "local" }, + { path = ".env/custom.env", profile = "custom" }, + { path = ".env/local.env", profile = "development" }, +] + +[config] +default_to_workspace = false +skip_core_tasks = true + +[env] +CARGO = "cargo" +ENGINE_CARGO_TARGET = "wasm32-unknown-unknown" +SWEEP_DAYS = 30 + +[tasks.sweep] +category = "Cleanup" +install_crate = "cargo-sweep" +command = "${CARGO}" +args = [ + "sweep", + "--time", + "${SWEEP_DAYS}", +] + +[tasks.clean-cargo] +category = "Cleanup" +command = "${CARGO}" +args = ["clean"] + +[tasks.clean-contracts] +category = "Cleanup" +script = ''' +rm -Rf etc/eth-contracts/.pnp +rm -Rf etc/eth-contracts/artifacts +rm -Rf etc/eth-contracts/cache +rm -Rf etc/tests/benchmark-contract/target +rm -Rf etc/tests/ft-receiver/target +rm -Rf etc/tests/self-contained-5bEgfRQ/target +''' + +[tasks.clean-bin] +category = "Cleanup" +script = ''' +rm -Rf bin +''' + +[tasks.clean-flow] +category = "Cleanup" +dependencies = [ + "clean-cargo", + "clean-contracts", + "clean-bin", +] + +[tasks.clean] +run_task = "clean-flow" + +[tasks.fmt] +category = "Formatting" +command = "${CARGO}" +args = [ + "fmt", + "--all", +] + +[tasks.udeps] +category = "Check" +env = { "CARGO_MAKE_RUST_CHANNEL" = "nightly", "CARGO_MAKE_CRATE_INSTALLATION_LOCKED" = "true" } +install_crate = { crate_name = "cargo-udeps", binary = "cargo", min_version = "0.1.30", test_arg = ["udeps", "-h"], force = false } +command = "${CARGO}" +args = [ + "udeps", + "--all-targets", +] + +[tasks.clippy] +category = "Check" +command = "${CARGO}" +args = [ + "clippy", + "--no-default-features", + "--features", + "contract", + "--", + "-D", + "warnings", +] + +[tasks.check-fmt] +category = "Check" +command = "${CARGO}" +args = [ + "fmt", + "--", + "--check", +] + +[tasks.check-contracts] +category = "Check" +script = ''' +cd etc/eth-contracts +yarn +yarn lint +''' + +[tasks.check] +category = "Check" +dependencies = [ + "check-contracts", + "check-fmt", + "clippy", + "udeps", +] + +[tasks.post-engine-build-env] +category = "Tools" +script = ''' +echo "Environment:" +echo " CARGO_MAKE_PROFILE: ${CARGO_MAKE_PROFILE}" +echo " IS_PROD: ${IS_PROD}" +echo " CARGO_FEATURES: ${CARGO_FEATURES}" +echo " WASM_FILE: ${WASM_FILE}" +echo " TARGET_DIR: ${TARGET_DIR}" +echo " RUSTFLAGS: ${RUSTFLAGS}" +echo " Extra build args: ${RELEASE} ${@}" +''' + +[tasks.copy-engine-build] +category = "Post" +command = "cp" +args = [ + "target/wasm32-unknown-unknown/${TARGET_DIR}/aurora_engine.wasm", + "bin/${WASM_FILE}", +] + +[tasks.make-bin-directory] +category = "Post" +command = "mkdir" +args = [ + "-p", + "bin", +] + +[tasks.build-contracts] +category = "Build" +script = ''' +cd etc/eth-contracts +yarn +yarn build +''' + +[tasks.build-engine] +category = "Build" +command = "${CARGO}" +args = [ + "build", + "--target", + "${ENGINE_CARGO_TARGET}", + "@@remove-empty(RELEASE)", + "--no-default-features", + "--features=${CARGO_FEATURES}", + "-p", + "aurora-engine", + "-Z", + "avoid-dev-deps", + "${@}", +] + +[tasks.build-engine-flow] +category = "Build" +dependencies = [ + "build-contracts", + "build-engine", + "make-bin-directory", + "copy-engine-build", + "post-engine-build-env", +] + +[tasks.build-test] +condition = { profiles = ["mainnet", "testnet", "custom"] } +env = { "RUSTFLAGS" = "${RUSTC_FLAGS_BUILD}", "CARGO_FEATURES" = "${CARGO_FEATURES_BUILD_TEST}", "WASM_FILE" = "${WASM_FILE_TEST}", "RELEASE" = "--release", "TARGET_DIR" = "release" } +category = "Build" +run_task = "build-engine-flow" + +[tasks.build] +condition = { profiles = ["mainnet", "testnet", "localnet", "development", "custom"] } +env = { "RUSTFLAGS" = "${RUSTC_FLAGS_BUILD}", "CARGO_FEATURES" = "${CARGO_FEATURES_BUILD}", "RELEASE" = "--release", "TARGET_DIR" = "release" } +category = "Build" +run_task = "build-engine-flow" + +[tasks.test-contracts] +category = "Test" +script = ''' +cd etc/eth-contracts +yarn +yarn test +''' + +[tasks.test-workspace] +condition = { profiles = ["mainnet", "testnet", "custom"] } +category = "Test" +command = "${CARGO}" +args = [ + "test", + "--features", + "${CARGO_FEATURES_TEST}", +] + +[tasks.test-flow] +category = "Test" +dependencies = [ + "build-test", + "test-contracts", + "test-workspace", +] + +[tasks.test] +category = "Test" +run_task = "test-flow" + +[tasks.default] +condition = { profiles = ["mainnet", "testnet", "localnet", "development", "custom"] } +run_task = "build" + +[tasks.deploy] +condition = { profiles = ["mainnet", "testnet", "localnet", "development", "custom"] } +category = "Deploy" +script = "${NEAR_CLI} deploy --acount-id${NEAR_EVM_ACCOUNT} --wasm-file=bin/${WASM_FILE}" diff --git a/README.md b/README.md index 15add3e54..f1ecd3f4b 100644 --- a/README.md +++ b/README.md @@ -15,27 +15,31 @@ documentation. Network | Contract ID | Chain ID | Version ------- | ------------------- | ---------- | ------ Mainnet | [`aurora`][Mainnet] | 1313161554 | 2.6.1 -Testnet | [`aurora`][Testnet] | 1313161555 | 2.6.1 -Local | `aurora.test.near` | 1313161556 | 2.6.1 +Testnet | [`aurora`][Testnet] | 1313161555 | 2.7.0 +Local | `aurora.test.near` | 1313161556 | 2.7.0 [Mainnet]: https://explorer.near.org/accounts/aurora [Testnet]: https://explorer.testnet.near.org/accounts/aurora -## Prerequisites +## Development -### Prerequisites for Building +### Prerequisites +- Node.js (v14+) - Rust nightly (2021-03-25) with the WebAssembly toolchain -- GNU Make (3.81+) +- cargo-make ```sh rustup install nightly-2021-03-25 rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-25 +cargo install --force cargo-make ``` ### Prerequisites for Development - Node.js (v14+) +- Docker +- cargo-make ## Development @@ -47,22 +51,87 @@ rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-25 - [`develop`] is our bleeding-edge development branch. In general, kindly target all pull requests to this branch. -### Building the EVM binary +### Building & Make Commands + +Every task with `cargo make` must have a `--profile` argument. +The current available `profile`s are: +- `mainnet`, suitable for mainnet. +- `testnet`, suitable for testnet. +- `local`, suitable for local development. +- `custom`, suitable for custom environments, see note below. + +A custom environment may be required depending on the circumstances. This can +be created in the `.env` folder as `custom.env` following the structure of the +other `.env` files. See `bin/local-custom.env` for more details. + +Every make most follow the following pattern, though `--profile` is not required +for all such as cleanup: ```sh -make release # produces mainnet-release.wasm (300+ KiB) -make -B mainnet # produces Mainnet build -make -B testnet # produces Testnet build +cargo make [--profile ] +``` -make debug # produces mainnet-debug.wasm (1+ MiB), which includes symbols -make -B mainnet-debug # produces Mainnet debug build -make -B testnet-debug # produces Testnet debug build +#### Building the engine and contracts + +To build the binaries there are a few commands to do such following the format. + +The current available build `task`s are: +- `default`, does not need to be specified, runs `build`. Requires a `--profile` + argument. +- `build`, builds all engine smart contract and produces the + `aurora--test.wasm` in the `bin` folder. Requires `build-contracts`. + Requires a `--profile` argument. +- `build-test`, builds all the below using test features. Requires a `--profile` + argument. +- `build-contracts`, builds all the ETH contracts. + +For example, the following will build the mainnet debug binary: +```sh +cargo make --profile mainnet build ``` -### Running unit & integration tests +#### Running unit & integration tests + +To run tests, there are a few cargo make tasks we can run: +- `test`, tests the whole cargo workspace and ETH contracts. Requires a + `--profile` argument. +- `test-workspace`, tests only the cargo workspace. +- `test-contracts`, tests only the contracts. +For example, the following will test the whole workspace and ETH contracts: ```sh -make check +cargo make --profile mainnet test +``` + +#### Running checks & lints + +To run lints and checks, the following tasks are available: +- `check`, checks the format, clippy and ETH contracts. +- `check-contracts`, runs yarn lints on the ETH contracts. +- `check-fmt`, checks the workspace Rust format only. +- `check-clippy`, checks the Rust workspace with clippy only. + +For example the following command will run the checks. `profile` is not required +here: +``` +cargo make check +``` + +#### Cleanup + +To clean up the workspace, the following tasks are available: +- `clean`, cleans all built binaries and ETH contracts. +- `clean-cargo`, cleans with cargo. +- `clean-contracts`, cleans the ETH contracts. +- `clean-bin`, cleans the binaries. + +Additionally, there is also but not included in the `clean` task: +- `sweep`, sweeps the set amount of days in the ENV, default at 30 days. + +For example, the following command will clean everything. `profile` is not +required: +``` +cargo make clean ``` ## Deployment @@ -85,7 +154,7 @@ npm install -g aurora-is-near/aurora-cli export NEAR_ENV=local near delete aurora.test.near test.near # if needed near create-account aurora.test.near --master-account=test.near --initial-balance 1000000 -aurora install --chain 1313161556 --owner test.near mainnet-release.wasm +aurora install --chain 1313161556 --owner test.near bin/mainnet-release.wasm ``` ### Deploying the EVM without the CLI @@ -94,7 +163,7 @@ aurora install --chain 1313161556 --owner test.near mainnet-release.wasm export NEAR_ENV=local near delete aurora.test.near test.near # if needed near create-account aurora.test.near --master-account=test.near --initial-balance 1000000 -near deploy --account-id=aurora.test.near --wasm-file=mainnet-release.wasm +near deploy --account-id=aurora.test.near --wasm-file=bin/mainnet-release.wasm aurora initialize --chain 1313161556 --owner test.near ``` diff --git a/VERSION b/VERSION index 6a6a3d8e3..24ba9a38d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.6.1 +2.7.0 diff --git a/engine-precompiles/Cargo.toml b/engine-precompiles/Cargo.toml index fa9f3e8be..ccdc9232c 100644 --- a/engine-precompiles/Cargo.toml +++ b/engine-precompiles/Cargo.toml @@ -15,18 +15,15 @@ autobenches = false [dependencies] aurora-engine-types = { path = "../engine-types", default-features = false } aurora-engine-sdk = { path = "../engine-sdk", default-features = false } -base64 = { version = "0.13.0", default-features = false, features = ["alloc"] } -borsh = { version = "0.8.2", default-features = false } -bn = { package = "aurora-bn", git = "https://github.com/aurora-is-near/aurora-bn.git", default-features = false } -evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false } -evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false } +borsh = { version = "0.9.3", default-features = false } +bn = { version = "0.5.11", package = "zeropool-bn", default-features = false } +evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false } libsecp256k1 = { version = "0.7.0", default-features = false, features = ["static-context", "hmac"] } num = { version = "0.4.0", default-features = false, features = ["alloc"] } -primitive-types = { version = "0.10.0", default-features = false, features = ["rlp"] } -ripemd160 = { version = "0.9.1", default-features = false } -sha2 = { version = "0.9.3", default-features = false } -sha3 = { version = "0.9.1", default-features = false } -ethabi = { git = "https://github.com/darwinia-network/ethabi", branch = "xavier-no-std", default-features = false } +ripemd = { version = "0.1.1", default-features = false } +sha2 = { version = "0.10.2", default-features = false } +sha3 = { version = "0.10.2", default-features = false } +ethabi = { version = "17.1", default-features = false } hex = { version = "0.4", default-features = false, features = ["alloc"] } [dev-dependencies] @@ -35,7 +32,8 @@ serde_json = "1" rand = "0.7.3" [features] -std = ["aurora-engine-types/std", "aurora-engine-sdk/std", "borsh/std", "bn/std", "evm/std", "evm-core/std", "libsecp256k1/std", "ripemd160/std", "sha2/std", "sha3/std", "ethabi/std"] +default = ["std"] +std = ["aurora-engine-types/std", "aurora-engine-sdk/std", "borsh/std", "bn/std", "evm/std", "libsecp256k1/std", "ripemd/std", "sha2/std", "sha3/std", "ethabi/std"] contract = [] log = [] error_refund = [] diff --git a/engine-precompiles/src/account_ids.rs b/engine-precompiles/src/account_ids.rs index a69c15c0a..19e6477a2 100644 --- a/engine-precompiles/src/account_ids.rs +++ b/engine-precompiles/src/account_ids.rs @@ -55,7 +55,10 @@ impl<'a, E: Env> Precompile for PredecessorAccount<'a, E> { } let predecessor_account_id = self.env.predecessor_account_id(); - Ok(PrecompileOutput::without_logs(cost, predecessor_account_id.as_bytes().to_vec()).into()) + Ok(PrecompileOutput::without_logs( + cost, + predecessor_account_id.as_bytes().to_vec(), + )) } } @@ -95,10 +98,10 @@ impl Precompile for CurrentAccount { } } - Ok( - PrecompileOutput::without_logs(cost, self.current_account_id.as_bytes().to_vec()) - .into(), - ) + Ok(PrecompileOutput::without_logs( + cost, + self.current_account_id.as_bytes().to_vec(), + )) } } diff --git a/engine-precompiles/src/bn128.rs b/engine-precompiles/src/alt_bn256.rs similarity index 63% rename from engine-precompiles/src/bn128.rs rename to engine-precompiles/src/alt_bn256.rs index ccb5073a4..dbb99f528 100644 --- a/engine-precompiles/src/bn128.rs +++ b/engine-precompiles/src/alt_bn256.rs @@ -1,5 +1,6 @@ use crate::prelude::types::{Address, EthGas}; use crate::prelude::{Borrowed, PhantomData, Vec}; +use crate::utils; use crate::{Byzantium, EvmPrecompileResult, HardFork, Istanbul, Precompile, PrecompileOutput}; use evm::{Context, ExitError}; @@ -34,6 +35,9 @@ mod costs { /// bn128 constants. mod consts { + use crate::prelude::Borrowed; + use evm::ExitError; + /// Input length for the add operation. pub(super) const ADD_INPUT_LEN: usize = 128; @@ -42,23 +46,119 @@ mod consts { /// Pair element length. pub(super) const PAIR_ELEMENT_LEN: usize = 192; + + pub(super) const SCALAR_PART_LEN: usize = SCALAR_LEN / 2; + + /// Size of BN scalars. + pub(super) const SCALAR_LEN: usize = 32; + + /// Half the size of a point size. + pub(super) const POINT_PART_LEN: usize = POINT_LEN / 2; + + /// Size of BN points. + pub(super) const POINT_LEN: usize = 64; + + /// Size of BN pairs. + pub(super) const POINT_PAIR_LEN: usize = 128; + + /// Output length. + pub(super) const OUTPUT_LEN: usize = 64; + + // pub(super) const ERR_BIG_ENDIAN: &str = "ERR_BIG_ENDIAN"; + + pub(super) const ERR_BIG_ENDIAN: ExitError = ExitError::Other(Borrowed("ERR_BIG_ENDIAN")); +} + +#[cfg(feature = "contract")] +trait HostFnEncode { + type Encoded; + + fn host_fn_encode(self) -> Self::Encoded; +} + +#[cfg(feature = "contract")] +fn concat_low_high(low: [u8; P], high: [u8; P]) -> [u8; S] { + let mut bytes = [0u8; S]; + bytes[0..P].copy_from_slice(&low); + bytes[P..P * 2].copy_from_slice(&high); + bytes +} + +#[cfg(feature = "contract")] +impl HostFnEncode for bn::Fr { + type Encoded = [u8; consts::SCALAR_LEN]; + + fn host_fn_encode(self) -> Self::Encoded { + let [low, high] = self.into_u256().0; + concat_low_high(low.to_le_bytes(), high.to_le_bytes()) + } +} + +#[cfg(feature = "contract")] +impl HostFnEncode for bn::Fq { + type Encoded = [u8; consts::SCALAR_LEN]; + + fn host_fn_encode(self) -> Self::Encoded { + let [low, high] = self.into_u256().0; + concat_low_high(low.to_le_bytes(), high.to_le_bytes()) + } +} + +#[cfg(feature = "contract")] +impl HostFnEncode for bn::Fq2 { + type Encoded = [u8; consts::SCALAR_LEN * 2]; + + fn host_fn_encode(self) -> Self::Encoded { + let [real_low, real_high] = self.real().into_u256().0; + let real: [u8; consts::SCALAR_LEN] = + concat_low_high(real_low.to_le_bytes(), real_high.to_le_bytes()); + + let [imaginary_low, imaginary_high] = self.imaginary().into_u256().0; + let imaginary: [u8; consts::SCALAR_LEN] = + concat_low_high(imaginary_low.to_le_bytes(), imaginary_high.to_le_bytes()); + concat_low_high(real, imaginary) + } +} + +#[cfg(feature = "contract")] +impl HostFnEncode for bn::G1 { + type Encoded = [u8; consts::POINT_LEN]; + + fn host_fn_encode(self) -> Self::Encoded { + bn::AffineG1::from_jacobian(self) + .map(|p| { + let (px, py) = (p.x().host_fn_encode(), p.y().host_fn_encode()); + concat_low_high(px, py) + }) + .unwrap_or_else(|| [0u8; consts::POINT_LEN]) + } +} + +#[cfg(feature = "contract")] +impl HostFnEncode for bn::G2 { + type Encoded = [u8; consts::POINT_PAIR_LEN]; + + fn host_fn_encode(self) -> Self::Encoded { + bn::AffineG2::from_jacobian(self) + .map(|g2| { + let x = g2.x().host_fn_encode(); + let y = g2.y().host_fn_encode(); + concat_low_high(x, y) + }) + .unwrap_or_else(|| [0u8; consts::POINT_PAIR_LEN]) + } } /// Reads the `x` and `y` points from an input at a given position. fn read_point(input: &[u8], pos: usize) -> Result { use bn::{AffineG1, Fq, Group, G1}; - let mut px_buf = [0u8; 32]; - px_buf.copy_from_slice(&input[pos..(pos + 32)]); - let px = - Fq::interpret(&px_buf).map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_X")))?; - - let mut py_buf = [0u8; 32]; - py_buf.copy_from_slice(&input[(pos + 32)..(pos + 64)]); - let py = - Fq::interpret(&py_buf).map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_Y")))?; + let px = Fq::from_slice(&input[pos..(pos + consts::SCALAR_LEN)]) + .map_err(|_e| ExitError::Other(Borrowed("ERR_FQ_INCORRECT")))?; + let py = Fq::from_slice(&input[(pos + consts::SCALAR_LEN)..(pos + consts::SCALAR_LEN * 2)]) + .map_err(|_e| ExitError::Other(Borrowed("ERR_FQ_INCORRECT")))?; - Ok(if px == Fq::zero() && py == bn::Fq::zero() { + Ok(if px == Fq::zero() && py == Fq::zero() { G1::zero() } else { AffineG1::new(px, py) @@ -67,9 +167,9 @@ fn read_point(input: &[u8], pos: usize) -> Result { }) } -pub(super) struct Bn128Add(PhantomData); +pub(super) struct Bn256Add(PhantomData); -impl Bn128Add { +impl Bn256Add { pub(super) const ADDRESS: Address = super::make_address(0, 6); pub fn new() -> Self { @@ -77,29 +177,42 @@ impl Bn128Add { } } -impl Bn128Add { +impl Bn256Add { fn run_inner(input: &[u8], _context: &Context) -> Result, ExitError> { - use bn::AffineG1; - let mut input = input.to_vec(); input.resize(consts::ADD_INPUT_LEN, 0); let p1 = read_point(&input, 0)?; - let p2 = read_point(&input, 64)?; - - let mut output = [0u8; 64]; - if let Some(sum) = AffineG1::from_jacobian(p1 + p2) { - let x = sum.x().into_u256().to_big_endian(); - let y = sum.y().into_u256().to_big_endian(); - output[0..32].copy_from_slice(&x); - output[32..64].copy_from_slice(&y); - } + let p2 = read_point(&input, consts::POINT_LEN)?; + let output = Self::execute(p1, p2)?; Ok(output.to_vec()) } + + #[cfg(not(feature = "contract"))] + fn execute(p1: bn::G1, p2: bn::G1) -> Result<[u8; consts::OUTPUT_LEN], ExitError> { + let mut output = [0u8; consts::POINT_LEN]; + if let Some(sum) = bn::AffineG1::from_jacobian(p1 + p2) { + sum.x() + .to_big_endian(&mut output[0..consts::SCALAR_LEN]) + .map_err(|_e| consts::ERR_BIG_ENDIAN)?; + sum.y() + .to_big_endian(&mut output[consts::SCALAR_LEN..consts::SCALAR_LEN * 2]) + .map_err(|_e| consts::ERR_BIG_ENDIAN)?; + } + Ok(output) + } + + #[cfg(feature = "contract")] + fn execute(p1: bn::G1, p2: bn::G1) -> Result<[u8; consts::OUTPUT_LEN], ExitError> { + Ok(aurora_engine_sdk::alt_bn128_g1_sum( + p1.host_fn_encode(), + p2.host_fn_encode(), + )) + } } -impl Precompile for Bn128Add { +impl Precompile for Bn256Add { fn required_gas(_input: &[u8]) -> Result { Ok(costs::BYZANTIUM_ADD) } @@ -124,11 +237,11 @@ impl Precompile for Bn128Add { } let output = Self::run_inner(input, context)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } -impl Precompile for Bn128Add { +impl Precompile for Bn256Add { fn required_gas(_input: &[u8]) -> Result { Ok(costs::ISTANBUL_ADD) } @@ -152,13 +265,13 @@ impl Precompile for Bn128Add { } } let output = Self::run_inner(input, context)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } -pub(super) struct Bn128Mul(PhantomData); +pub(super) struct Bn256Mul(PhantomData); -impl Bn128Mul { +impl Bn256Mul { pub(super) const ADDRESS: Address = super::make_address(0, 7); pub fn new() -> Self { @@ -166,32 +279,46 @@ impl Bn128Mul { } } -impl Bn128Mul { +impl Bn256Mul { fn run_inner(input: &[u8], _context: &Context) -> Result, ExitError> { - use bn::AffineG1; - let mut input = input.to_vec(); input.resize(consts::MUL_INPUT_LEN, 0); let p = read_point(&input, 0)?; - let mut fr_buf = [0u8; 32]; - fr_buf.copy_from_slice(&input[64..96]); - let fr = bn::Fr::interpret(&fr_buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_FE")))?; - - let mut output = [0u8; 64]; - if let Some(mul) = AffineG1::from_jacobian(p * fr) { - let x = mul.x().into_u256().to_big_endian(); - let y = mul.y().into_u256().to_big_endian(); - output[0..32].copy_from_slice(&x); - output[32..64].copy_from_slice(&y); - } + let fr = + bn::Fr::from_slice(&input[consts::POINT_LEN..consts::POINT_LEN + consts::SCALAR_LEN]) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_FR")))?; + let output = Self::execute(p, fr)?; Ok(output.to_vec()) } + + #[cfg(not(feature = "contract"))] + fn execute(p: bn::G1, fr: bn::Fr) -> Result<[u8; consts::OUTPUT_LEN], ExitError> { + let mut output = [0u8; consts::OUTPUT_LEN]; + if let Some(mul) = bn::AffineG1::from_jacobian(p * fr) { + mul.x() + .into_u256() + .to_big_endian(&mut output[0..consts::SCALAR_LEN]) + .map_err(|_e| consts::ERR_BIG_ENDIAN)?; + mul.y() + .into_u256() + .to_big_endian(&mut output[consts::SCALAR_LEN..consts::SCALAR_LEN * 2]) + .map_err(|_e| consts::ERR_BIG_ENDIAN)?; + } + Ok(output) + } + + #[cfg(feature = "contract")] + fn execute(g1: bn::G1, fr: bn::Fr) -> Result<[u8; consts::OUTPUT_LEN], ExitError> { + Ok(aurora_engine_sdk::alt_bn128_g1_scalar_multiple( + g1.host_fn_encode(), + fr.host_fn_encode(), + )) + } } -impl Precompile for Bn128Mul { +impl Precompile for Bn256Mul { fn required_gas(_input: &[u8]) -> Result { Ok(costs::BYZANTIUM_MUL) } @@ -215,11 +342,11 @@ impl Precompile for Bn128Mul { } let output = Self::run_inner(input, context)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } -impl Precompile for Bn128Mul { +impl Precompile for Bn256Mul { fn required_gas(_input: &[u8]) -> Result { Ok(costs::ISTANBUL_MUL) } @@ -243,13 +370,13 @@ impl Precompile for Bn128Mul { } let output = Self::run_inner(input, context)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } -pub(super) struct Bn128Pair(PhantomData); +pub(super) struct Bn256Pair(PhantomData); -impl Bn128Pair { +impl Bn256Pair { pub(super) const ADDRESS: Address = super::make_address(0, 8); pub fn new() -> Self { @@ -257,104 +384,99 @@ impl Bn128Pair { } } -impl Bn128Pair { +impl Bn256Pair { fn run_inner(input: &[u8], _context: &Context) -> Result, ExitError> { - use bn::{arith::U256, AffineG1, AffineG2, Fq, Fq2, Group, Gt, G1, G2}; - if input.len() % consts::PAIR_ELEMENT_LEN != 0 { return Err(ExitError::Other(Borrowed("ERR_BN128_INVALID_LEN"))); } let output = if input.is_empty() { - U256::one() + bn::arith::U256::one() } else { let elements = input.len() / consts::PAIR_ELEMENT_LEN; let mut vals = Vec::with_capacity(elements); - for idx in 0..elements { - let mut buf = [0u8; 32]; - - buf.copy_from_slice( - &input[(idx * consts::PAIR_ELEMENT_LEN)..(idx * consts::PAIR_ELEMENT_LEN + 32)], - ); - let ax = Fq::interpret(&buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_AX")))?; - buf.copy_from_slice( - &input[(idx * consts::PAIR_ELEMENT_LEN + 32) - ..(idx * consts::PAIR_ELEMENT_LEN + 64)], - ); - let ay = Fq::interpret(&buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_AY")))?; - buf.copy_from_slice( - &input[(idx * consts::PAIR_ELEMENT_LEN + 64) - ..(idx * consts::PAIR_ELEMENT_LEN + 96)], - ); - let bay = Fq::interpret(&buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_B_AY")))?; - buf.copy_from_slice( - &input[(idx * consts::PAIR_ELEMENT_LEN + 96) - ..(idx * consts::PAIR_ELEMENT_LEN + 128)], - ); - let bax = Fq::interpret(&buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_B_AX")))?; - buf.copy_from_slice( - &input[(idx * consts::PAIR_ELEMENT_LEN + 128) - ..(idx * consts::PAIR_ELEMENT_LEN + 160)], - ); - let bby = Fq::interpret(&buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_B_BY")))?; - buf.copy_from_slice( - &input[(idx * consts::PAIR_ELEMENT_LEN + 160) - ..(idx * consts::PAIR_ELEMENT_LEN + 192)], - ); - let bbx = Fq::interpret(&buf) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_B_BX")))?; - - let a = { - if ax.is_zero() && ay.is_zero() { - G1::zero() - } else { - G1::from( - AffineG1::new(ax, ay) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_A")))?, - ) - } - }; - let b = { - let ba = Fq2::new(bax, bay); - let bb = Fq2::new(bbx, bby); - - if ba.is_zero() && bb.is_zero() { - G2::zero() - } else { - G2::from( - AffineG2::new(ba, bb) - .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_B")))?, - ) - } + let ax = bn::Fq::from_slice( + &input[(idx * consts::PAIR_ELEMENT_LEN) + ..(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN)], + ) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_AX")))?; + let ay = bn::Fq::from_slice( + &input[(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN) + ..(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 2)], + ) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_AY")))?; + let bay = bn::Fq::from_slice( + &input[(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 2) + ..(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 3)], + ) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_BAY")))?; + let bax = bn::Fq::from_slice( + &input[(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 3) + ..(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 4)], + ) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_BAX")))?; + let bby = bn::Fq::from_slice( + &input[(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 4) + ..(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 5)], + ) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_BBY")))?; + let bbx = bn::Fq::from_slice( + &input[(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 5) + ..(idx * consts::PAIR_ELEMENT_LEN + consts::SCALAR_LEN * 6)], + ) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_BBX")))?; + + let g1_a = bn::AffineG1::new(ax, ay) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_A")))? + .into(); + let g1_b = { + let ba = bn::Fq2::new(bax, bay); + let bb = bn::Fq2::new(bbx, bby); + + bn::AffineG2::new(ba, bb) + .map_err(|_e| ExitError::Other(Borrowed("ERR_BN128_INVALID_B")))? + .into() }; - vals.push((a, b)) + vals.push((g1_a, g1_b)) } - let mul = vals - .into_iter() - .fold(Gt::one(), |s, (a, b)| s * bn::pairing(a, b)); - - if mul == Gt::one() { - U256::one() + let result = Self::execute(vals); + if result { + bn::arith::U256::one() } else { - U256::zero() + bn::arith::U256::zero() } }; - Ok(output.to_big_endian().to_vec()) + let mut res = crate::vec![0u8; 32]; + output + .to_big_endian(&mut res[0..32]) + .map_err(|_e| consts::ERR_BIG_ENDIAN)?; + Ok(res) + } + + #[cfg(not(feature = "contract"))] + fn execute(vals: Vec<(bn::G1, bn::G2)>) -> bool { + bn::pairing_batch(&vals) == bn::Gt::one() + } + + #[cfg(feature = "contract")] + fn execute(vals: Vec<(bn::G1, bn::G2)>) -> bool { + let points = vals + .into_iter() + .map(|(g1, g2)| (g1.host_fn_encode(), g2.host_fn_encode())); + aurora_engine_sdk::alt_bn128_pairing(points) } } -impl Precompile for Bn128Pair { +impl Precompile for Bn256Pair { fn required_gas(input: &[u8]) -> Result { + let input_len = u64::try_from(input.len()).map_err(utils::err_usize_conv)?; + let pair_element_len = + u64::try_from(consts::PAIR_ELEMENT_LEN).map_err(utils::err_usize_conv)?; Ok( - costs::BYZANTIUM_PAIR_PER_POINT * input.len() / consts::PAIR_ELEMENT_LEN + costs::BYZANTIUM_PAIR_PER_POINT * input_len / pair_element_len + costs::BYZANTIUM_PAIR_BASE, ) } @@ -378,14 +500,17 @@ impl Precompile for Bn128Pair { } let output = Self::run_inner(input, context)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } -impl Precompile for Bn128Pair { +impl Precompile for Bn256Pair { fn required_gas(input: &[u8]) -> Result { + let input_len = u64::try_from(input.len()).map_err(utils::err_usize_conv)?; + let pair_element_len = + u64::try_from(consts::PAIR_ELEMENT_LEN).map_err(utils::err_usize_conv)?; Ok( - costs::ISTANBUL_PAIR_PER_POINT * input.len() / consts::PAIR_ELEMENT_LEN + costs::ISTANBUL_PAIR_PER_POINT * input_len / pair_element_len + costs::ISTANBUL_PAIR_BASE, ) } @@ -409,7 +534,7 @@ impl Precompile for Bn128Pair { } let output = Self::run_inner(input, context)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } @@ -436,7 +561,7 @@ mod tests { ) .unwrap(); - let res = Bn128Add::::new() + let res = Bn256Add::::new() .run(&input, Some(EthGas::new(500)), &new_context(), false) .unwrap() .output; @@ -458,7 +583,7 @@ mod tests { ) .unwrap(); - let res = Bn128Add::::new() + let res = Bn256Add::::new() .run(&input, Some(EthGas::new(500)), &new_context(), false) .unwrap() .output; @@ -474,7 +599,7 @@ mod tests { ) .unwrap(); let res = - Bn128Add::::new().run(&input, Some(EthGas::new(499)), &new_context(), false); + Bn256Add::::new().run(&input, Some(EthGas::new(499)), &new_context(), false); assert!(matches!(res, Err(ExitError::OutOfGas))); // no input test @@ -486,7 +611,7 @@ mod tests { ) .unwrap(); - let res = Bn128Add::::new() + let res = Bn256Add::::new() .run(&input, Some(EthGas::new(500)), &new_context(), false) .unwrap() .output; @@ -503,7 +628,7 @@ mod tests { .unwrap(); let res = - Bn128Add::::new().run(&input, Some(EthGas::new(500)), &new_context(), false); + Bn256Add::::new().run(&input, Some(EthGas::new(500)), &new_context(), false); assert!(matches!( res, Err(ExitError::Other(Borrowed("ERR_BN128_INVALID_POINT"))) @@ -526,7 +651,7 @@ mod tests { ) .unwrap(); - let res = Bn128Mul::::new() + let res = Bn256Mul::::new() .run(&input, Some(EthGas::new(40_000)), &new_context(), false) .unwrap() .output; @@ -540,7 +665,7 @@ mod tests { 0200000000000000000000000000000000000000000000000000000000000000", ) .unwrap(); - let res = Bn128Mul::::new().run( + let res = Bn256Mul::::new().run( &input, Some(EthGas::new(39_999)), &new_context(), @@ -563,7 +688,7 @@ mod tests { ) .unwrap(); - let res = Bn128Mul::::new() + let res = Bn256Mul::::new() .run(&input, Some(EthGas::new(40_000)), &new_context(), false) .unwrap() .output; @@ -578,7 +703,7 @@ mod tests { ) .unwrap(); - let res = Bn128Mul::::new() + let res = Bn256Mul::::new() .run(&input, Some(EthGas::new(40_000)), &new_context(), false) .unwrap() .output; @@ -593,7 +718,7 @@ mod tests { ) .unwrap(); - let res = Bn128Mul::::new().run( + let res = Bn256Mul::::new().run( &input, Some(EthGas::new(40_000)), &new_context(), @@ -627,7 +752,7 @@ mod tests { hex::decode("0000000000000000000000000000000000000000000000000000000000000001") .unwrap(); - let res = Bn128Pair::::new() + let res = Bn256Pair::::new() .run(&input, Some(EthGas::new(260_000)), &new_context(), false) .unwrap() .output; @@ -650,7 +775,7 @@ mod tests { 12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa", ) .unwrap(); - let res = Bn128Pair::::new().run( + let res = Bn256Pair::::new().run( &input, Some(EthGas::new(259_999)), &new_context(), @@ -664,7 +789,7 @@ mod tests { hex::decode("0000000000000000000000000000000000000000000000000000000000000001") .unwrap(); - let res = Bn128Pair::::new() + let res = Bn256Pair::::new() .run(&input, Some(EthGas::new(260_000)), &new_context(), false) .unwrap() .output; @@ -682,7 +807,7 @@ mod tests { ) .unwrap(); - let res = Bn128Pair::::new().run( + let res = Bn256Pair::::new().run( &input, Some(EthGas::new(260_000)), &new_context(), @@ -703,7 +828,7 @@ mod tests { ) .unwrap(); - let res = Bn128Pair::::new().run( + let res = Bn256Pair::::new().run( &input, Some(EthGas::new(260_000)), &new_context(), diff --git a/engine-precompiles/src/blake2.rs b/engine-precompiles/src/blake2.rs index d953bd374..5d841e668 100644 --- a/engine-precompiles/src/blake2.rs +++ b/engine-precompiles/src/blake2.rs @@ -103,7 +103,7 @@ fn f(mut h: [u64; 8], m: [u64; 16], t: [u64; 2], f: bool, rounds: u32) -> Vec Result { + let input_len = u64::try_from(input.len()).map_err(utils::err_usize_conv)?; Ok( - (input.len() as u64 + consts::SHA256_WORD_LEN - 1) / consts::SHA256_WORD_LEN + (input_len + consts::SHA256_WORD_LEN - 1) / consts::SHA256_WORD_LEN * costs::SHA256_PER_WORD + costs::SHA256_BASE, ) @@ -60,7 +61,7 @@ impl Precompile for SHA256 { } let output = sha2::Sha256::digest(input).to_vec(); - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } /// See: https://ethereum.github.io/yellowpaper/paper.pdf @@ -82,7 +83,7 @@ impl Precompile for SHA256 { } let output = sdk::sha256(input).as_bytes().to_vec(); - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } @@ -94,8 +95,9 @@ impl RIPEMD160 { #[cfg(not(feature = "contract"))] fn internal_impl(input: &[u8]) -> [u8; 20] { - use ripemd160::Digest; - let hash = ripemd160::Ripemd160::digest(input); + use ripemd::{Digest, Ripemd160}; + + let hash = Ripemd160::digest(input); let mut output = [0u8; 20]; output.copy_from_slice(&hash); output @@ -104,8 +106,9 @@ impl RIPEMD160 { impl Precompile for RIPEMD160 { fn required_gas(input: &[u8]) -> Result { + let input_len = u64::try_from(input.len()).map_err(utils::err_usize_conv)?; Ok( - (input.len() as u64 + consts::RIPEMD_WORD_LEN - 1) / consts::RIPEMD_WORD_LEN + (input_len + consts::RIPEMD_WORD_LEN - 1) / consts::RIPEMD_WORD_LEN * costs::RIPEMD160_PER_WORD + costs::RIPEMD160_BASE, ) @@ -136,7 +139,7 @@ impl Precompile for RIPEMD160 { // the evm works with 32-byte words. let mut output = vec![0u8; 32]; output[12..].copy_from_slice(&hash); - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } diff --git a/engine-precompiles/src/identity.rs b/engine-precompiles/src/identity.rs index 27e2b31a5..142dcd874 100644 --- a/engine-precompiles/src/identity.rs +++ b/engine-precompiles/src/identity.rs @@ -1,5 +1,5 @@ use crate::prelude::types::{Address, EthGas}; -use crate::{EvmPrecompileResult, Precompile, PrecompileOutput}; +use crate::{utils, EvmPrecompileResult, Precompile, PrecompileOutput}; use evm::{Context, ExitError}; /// Identity precompile costs. @@ -26,8 +26,9 @@ impl Identity { impl Precompile for Identity { fn required_gas(input: &[u8]) -> Result { + let input_len = u64::try_from(input.len()).map_err(utils::err_usize_conv)?; Ok( - (input.len() as u64 + consts::IDENTITY_WORD_LEN - 1) / consts::IDENTITY_WORD_LEN + (input_len + consts::IDENTITY_WORD_LEN - 1) / consts::IDENTITY_WORD_LEN * costs::IDENTITY_PER_WORD + costs::IDENTITY_BASE, ) @@ -51,7 +52,7 @@ impl Precompile for Identity { } } - Ok(PrecompileOutput::without_logs(cost, input.to_vec()).into()) + Ok(PrecompileOutput::without_logs(cost, input.to_vec())) } } diff --git a/engine-precompiles/src/lib.rs b/engine-precompiles/src/lib.rs index c24286a17..78a956e05 100644 --- a/engine-precompiles/src/lib.rs +++ b/engine-precompiles/src/lib.rs @@ -1,24 +1,26 @@ #![allow(dead_code)] #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] +#![deny(clippy::as_conversions)] pub mod account_ids; +pub mod alt_bn256; pub mod blake2; -pub mod bn128; pub mod hash; pub mod identity; pub mod modexp; pub mod native; mod prelude; pub mod prepaid_gas; +pub mod promise_result; pub mod random; pub mod secp256k1; -#[cfg(test)] mod utils; +pub mod xcc; use crate::account_ids::{predecessor_account, CurrentAccount, PredecessorAccount}; +use crate::alt_bn256::{Bn256Add, Bn256Mul, Bn256Pair}; use crate::blake2::Blake2F; -use crate::bn128::{Bn128Add, Bn128Mul, Bn128Pair}; use crate::hash::{RIPEMD160, SHA256}; use crate::identity::Identity; use crate::modexp::ModExp; @@ -28,12 +30,19 @@ use crate::prelude::{Vec, H160, H256}; use crate::prepaid_gas::PrepaidGas; use crate::random::RandomSeed; use crate::secp256k1::ECRecover; +use crate::xcc::CrossContractCall; use aurora_engine_sdk::env::Env; use aurora_engine_sdk::io::IO; +use aurora_engine_sdk::promise::ReadOnlyPromiseHandler; use aurora_engine_types::{account_id::AccountId, types::Address, vec, BTreeMap, Box}; use evm::backend::Log; -use evm::executor; +use evm::executor::{ + self, + stack::{PrecompileFailure, PrecompileHandle}, +}; use evm::{Context, ExitError, ExitSucceed}; +use promise_result::PromiseResult; +use xcc::cross_contract_call; #[derive(Debug, Default)] pub struct PrecompileOutput { @@ -52,18 +61,7 @@ impl PrecompileOutput { } } -impl From for executor::stack::PrecompileOutput { - fn from(output: PrecompileOutput) -> Self { - executor::stack::PrecompileOutput { - exit_status: ExitSucceed::Returned, - cost: output.cost.as_u64(), - output: output.output, - logs: output.logs, - } - } -} - -type EvmPrecompileResult = Result; +type EvmPrecompileResult = Result; /// A precompiled function for use in the EVM. pub trait Precompile { @@ -82,6 +80,13 @@ pub trait Precompile { ) -> EvmPrecompileResult; } +pub trait HandleBasedPrecompile { + fn run_with_handle( + &self, + handle: &mut impl PrecompileHandle, + ) -> Result; +} + /// Hard fork marker. pub trait HardFork {} @@ -105,47 +110,81 @@ impl HardFork for Istanbul {} impl HardFork for Berlin {} -pub struct Precompiles<'a, I, E> { - pub generic_precompiles: prelude::BTreeMap>, - // Cannot be part of the generic precompiles because the `dyn` type-erasure messes with - // with the lifetime requirements on the type parameter `I`. - pub near_exit: ExitToNear, - pub ethereum_exit: ExitToEthereum, - pub predecessor_account_id: PredecessorAccount<'a, E>, - pub prepaid_gas: PrepaidGas<'a, E>, +pub struct Precompiles<'a, I, E, H> { + pub all_precompiles: prelude::BTreeMap>, } -impl<'a, I: IO + Copy, E: Env> executor::stack::PrecompileSet for Precompiles<'a, I, E> { +impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> executor::stack::PrecompileSet + for Precompiles<'a, I, E, H> +{ fn execute( &self, - address: prelude::H160, - input: &[u8], - gas_limit: Option, - context: &Context, - is_static: bool, - ) -> Option> { - self.precompile_action(Address::new(address), |p| { - p.run(input, gas_limit.map(EthGas::new), context, is_static) - .map_err(|exit_status| executor::stack::PrecompileFailure::Error { exit_status }) - }) + handle: &mut impl PrecompileHandle, + ) -> Option> { + let address = handle.code_address(); + + let result = match self.all_precompiles.get(&Address::new(address))? { + AllPrecompiles::ExitToNear(p) => process_precompile(p, handle), + AllPrecompiles::ExitToEthereum(p) => process_precompile(p, handle), + AllPrecompiles::PredecessorAccount(p) => process_precompile(p, handle), + AllPrecompiles::PrepaidGas(p) => process_precompile(p, handle), + AllPrecompiles::PromiseResult(p) => process_precompile(p, handle), + AllPrecompiles::CrossContractCall(p) => process_handle_based_precompile(p, handle), + AllPrecompiles::Generic(p) => process_precompile(p.as_ref(), handle), + }; + Some(result.and_then(|output| post_process(output, handle))) } fn is_precompile(&self, address: prelude::H160) -> bool { - self.precompile_action(Address::new(address), |_| true) - .unwrap_or(false) + self.all_precompiles.contains_key(&Address::new(address)) } } -pub struct PrecompileConstructorContext<'a, I, E> { +fn process_precompile( + p: &dyn Precompile, + handle: &mut impl PrecompileHandle, +) -> Result { + let input = handle.input(); + let gas_limit = handle.gas_limit(); + let context = handle.context(); + let is_static = handle.is_static(); + + p.run(input, gas_limit.map(EthGas::new), context, is_static) + .map_err(|exit_status| PrecompileFailure::Error { exit_status }) +} + +fn process_handle_based_precompile( + p: &impl HandleBasedPrecompile, + handle: &mut impl PrecompileHandle, +) -> Result { + p.run_with_handle(handle) +} + +fn post_process( + output: PrecompileOutput, + handle: &mut impl PrecompileHandle, +) -> Result { + handle.record_cost(output.cost.as_u64())?; + for log in output.logs { + handle.log(log.address, log.topics, log.data)?; + } + Ok(executor::stack::PrecompileOutput { + exit_status: ExitSucceed::Returned, + output: output.output, + }) +} + +pub struct PrecompileConstructorContext<'a, I, E, H> { pub current_account_id: AccountId, pub random_seed: H256, pub io: I, pub env: &'a E, + pub promise_handler: H, } -impl<'a, I: IO + Copy, E: Env> Precompiles<'a, I, E> { +impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> Precompiles<'a, I, E, H> { #[allow(dead_code)] - pub fn new_homestead(ctx: PrecompileConstructorContext<'a, I, E>) -> Self { + pub fn new_homestead(ctx: PrecompileConstructorContext<'a, I, E, H>) -> Self { let addresses = vec![ ECRecover::ADDRESS, SHA256::ADDRESS, @@ -160,21 +199,25 @@ impl<'a, I: IO + Copy, E: Env> Precompiles<'a, I, E> { Box::new(RandomSeed::new(ctx.random_seed)), Box::new(CurrentAccount::new(ctx.current_account_id.clone())), ]; - let map: BTreeMap> = addresses.into_iter().zip(fun).collect(); + let map = addresses + .into_iter() + .zip(fun) + .map(|(a, f)| (a, AllPrecompiles::Generic(f))) + .collect(); Self::with_generic_precompiles(map, ctx) } #[allow(dead_code)] - pub fn new_byzantium(ctx: PrecompileConstructorContext<'a, I, E>) -> Self { + pub fn new_byzantium(ctx: PrecompileConstructorContext<'a, I, E, H>) -> Self { let addresses = vec![ ECRecover::ADDRESS, SHA256::ADDRESS, RIPEMD160::ADDRESS, Identity::ADDRESS, ModExp::::ADDRESS, - Bn128Add::::ADDRESS, - Bn128Mul::::ADDRESS, - Bn128Pair::::ADDRESS, + Bn256Add::::ADDRESS, + Bn256Mul::::ADDRESS, + Bn256Pair::::ADDRESS, RandomSeed::ADDRESS, CurrentAccount::ADDRESS, ]; @@ -184,27 +227,31 @@ impl<'a, I: IO + Copy, E: Env> Precompiles<'a, I, E> { Box::new(RIPEMD160), Box::new(Identity), Box::new(ModExp::::new()), - Box::new(Bn128Add::::new()), - Box::new(Bn128Mul::::new()), - Box::new(Bn128Pair::::new()), + Box::new(Bn256Add::::new()), + Box::new(Bn256Mul::::new()), + Box::new(Bn256Pair::::new()), Box::new(RandomSeed::new(ctx.random_seed)), Box::new(CurrentAccount::new(ctx.current_account_id.clone())), ]; - let map: BTreeMap> = addresses.into_iter().zip(fun).collect(); + let map = addresses + .into_iter() + .zip(fun) + .map(|(a, f)| (a, AllPrecompiles::Generic(f))) + .collect(); Self::with_generic_precompiles(map, ctx) } - pub fn new_istanbul(ctx: PrecompileConstructorContext<'a, I, E>) -> Self { + pub fn new_istanbul(ctx: PrecompileConstructorContext<'a, I, E, H>) -> Self { let addresses = vec![ ECRecover::ADDRESS, SHA256::ADDRESS, RIPEMD160::ADDRESS, Identity::ADDRESS, ModExp::::ADDRESS, - Bn128Add::::ADDRESS, - Bn128Mul::::ADDRESS, - Bn128Pair::::ADDRESS, + Bn256Add::::ADDRESS, + Bn256Mul::::ADDRESS, + Bn256Pair::::ADDRESS, Blake2F::ADDRESS, RandomSeed::ADDRESS, CurrentAccount::ADDRESS, @@ -215,28 +262,32 @@ impl<'a, I: IO + Copy, E: Env> Precompiles<'a, I, E> { Box::new(RIPEMD160), Box::new(Identity), Box::new(ModExp::::new()), - Box::new(Bn128Add::::new()), - Box::new(Bn128Mul::::new()), - Box::new(Bn128Pair::::new()), + Box::new(Bn256Add::::new()), + Box::new(Bn256Mul::::new()), + Box::new(Bn256Pair::::new()), Box::new(Blake2F), Box::new(RandomSeed::new(ctx.random_seed)), Box::new(CurrentAccount::new(ctx.current_account_id.clone())), ]; - let map: BTreeMap> = addresses.into_iter().zip(fun).collect(); + let map = addresses + .into_iter() + .zip(fun) + .map(|(a, f)| (a, AllPrecompiles::Generic(f))) + .collect(); Self::with_generic_precompiles(map, ctx) } - pub fn new_berlin(ctx: PrecompileConstructorContext<'a, I, E>) -> Self { + pub fn new_berlin(ctx: PrecompileConstructorContext<'a, I, E, H>) -> Self { let addresses = vec![ ECRecover::ADDRESS, SHA256::ADDRESS, RIPEMD160::ADDRESS, Identity::ADDRESS, ModExp::::ADDRESS, - Bn128Add::::ADDRESS, - Bn128Mul::::ADDRESS, - Bn128Pair::::ADDRESS, + Bn256Add::::ADDRESS, + Bn256Mul::::ADDRESS, + Bn256Pair::::ADDRESS, Blake2F::ADDRESS, RandomSeed::ADDRESS, CurrentAccount::ADDRESS, @@ -247,59 +298,74 @@ impl<'a, I: IO + Copy, E: Env> Precompiles<'a, I, E> { Box::new(RIPEMD160), Box::new(Identity), Box::new(ModExp::::new()), - Box::new(Bn128Add::::new()), - Box::new(Bn128Mul::::new()), - Box::new(Bn128Pair::::new()), + Box::new(Bn256Add::::new()), + Box::new(Bn256Mul::::new()), + Box::new(Bn256Pair::::new()), Box::new(Blake2F), Box::new(RandomSeed::new(ctx.random_seed)), Box::new(CurrentAccount::new(ctx.current_account_id.clone())), ]; - let map: BTreeMap> = addresses.into_iter().zip(fun).collect(); + let map = addresses + .into_iter() + .zip(fun) + .map(|(a, f)| (a, AllPrecompiles::Generic(f))) + .collect(); Self::with_generic_precompiles(map, ctx) } - pub fn new_london(ctx: PrecompileConstructorContext<'a, I, E>) -> Self { + pub fn new_london(ctx: PrecompileConstructorContext<'a, I, E, H>) -> Self { // no precompile changes in London HF Self::new_berlin(ctx) } fn with_generic_precompiles( - generic_precompiles: BTreeMap>, - ctx: PrecompileConstructorContext<'a, I, E>, + mut generic_precompiles: BTreeMap>, + ctx: PrecompileConstructorContext<'a, I, E, H>, ) -> Self { let near_exit = ExitToNear::new(ctx.current_account_id.clone(), ctx.io); - let ethereum_exit = ExitToEthereum::new(ctx.current_account_id, ctx.io); + let ethereum_exit = ExitToEthereum::new(ctx.current_account_id.clone(), ctx.io); + let cross_contract_call = CrossContractCall::new(ctx.current_account_id, ctx.io); let predecessor_account_id = PredecessorAccount::new(ctx.env); let prepaid_gas = PrepaidGas::new(ctx.env); + let promise_results = PromiseResult::new(ctx.promise_handler); + + generic_precompiles.insert(exit_to_near::ADDRESS, AllPrecompiles::ExitToNear(near_exit)); + generic_precompiles.insert( + exit_to_ethereum::ADDRESS, + AllPrecompiles::ExitToEthereum(ethereum_exit), + ); + generic_precompiles.insert( + cross_contract_call::ADDRESS, + AllPrecompiles::CrossContractCall(cross_contract_call), + ); + generic_precompiles.insert( + predecessor_account::ADDRESS, + AllPrecompiles::PredecessorAccount(predecessor_account_id), + ); + generic_precompiles.insert( + prepaid_gas::ADDRESS, + AllPrecompiles::PrepaidGas(prepaid_gas), + ); + generic_precompiles.insert( + promise_result::ADDRESS, + AllPrecompiles::PromiseResult(promise_results), + ); Self { - generic_precompiles, - near_exit, - ethereum_exit, - predecessor_account_id, - prepaid_gas, + all_precompiles: generic_precompiles, } } +} - fn precompile_action U>( - &self, - address: Address, - f: F, - ) -> Option { - if address == exit_to_near::ADDRESS { - return Some(f(&self.near_exit)); - } else if address == exit_to_ethereum::ADDRESS { - return Some(f(&self.ethereum_exit)); - } else if address == predecessor_account::ADDRESS { - return Some(f(&self.predecessor_account_id)); - } else if address == prepaid_gas::ADDRESS { - return Some(f(&self.prepaid_gas)); - } - self.generic_precompiles - .get(&address) - .map(|p| f(p.as_ref())) - } +pub enum AllPrecompiles<'a, I, E, H> { + ExitToNear(ExitToNear), + ExitToEthereum(ExitToEthereum), + CrossContractCall(CrossContractCall), + PredecessorAccount(PredecessorAccount<'a, E>), + PrepaidGas(PrepaidGas<'a, E>), + PromiseResult(PromiseResult), + Generic(Box), } /// fn for making an address by concatenating the bytes from two given numbers, @@ -385,9 +451,9 @@ mod tests { assert_eq!(super::hash::RIPEMD160::ADDRESS, u8_to_address(3)); assert_eq!(super::identity::Identity::ADDRESS, u8_to_address(4)); assert_eq!(super::ModExp::::ADDRESS, u8_to_address(5)); - assert_eq!(super::Bn128Add::::ADDRESS, u8_to_address(6)); - assert_eq!(super::Bn128Mul::::ADDRESS, u8_to_address(7)); - assert_eq!(super::Bn128Pair::::ADDRESS, u8_to_address(8)); + assert_eq!(super::Bn256Add::::ADDRESS, u8_to_address(6)); + assert_eq!(super::Bn256Mul::::ADDRESS, u8_to_address(7)); + assert_eq!(super::Bn256Pair::::ADDRESS, u8_to_address(8)); assert_eq!(super::blake2::Blake2F::ADDRESS, u8_to_address(9)); } diff --git a/engine-precompiles/src/modexp.rs b/engine-precompiles/src/modexp.rs index d4605e8d4..bf56d5bf8 100644 --- a/engine-precompiles/src/modexp.rs +++ b/engine-precompiles/src/modexp.rs @@ -1,7 +1,8 @@ -use crate::prelude::{PhantomData, Vec, U256}; -use crate::{Berlin, Byzantium, EvmPrecompileResult, HardFork, Precompile, PrecompileOutput}; - use crate::prelude::types::{Address, EthGas}; +use crate::prelude::{PhantomData, Vec, U256}; +use crate::{ + utils, Berlin, Byzantium, EvmPrecompileResult, HardFork, Precompile, PrecompileOutput, +}; use evm::{Context, ExitError}; use num::{BigUint, Integer}; @@ -17,31 +18,33 @@ impl ModExp { impl ModExp { // Note: the output of this function is bounded by 2^67 - fn calc_iter_count(exp_len: u64, base_len: u64, bytes: &[u8]) -> U256 { - #[allow(clippy::redundant_closure)] + fn calc_iter_count(exp_len: u64, base_len: u64, bytes: &[u8]) -> Result { + let start = usize::try_from(base_len).map_err(utils::err_usize_conv)?; + let exp_len = usize::try_from(exp_len).map_err(utils::err_usize_conv)?; + // #[allow(clippy::redundant_closure)] let exp = parse_bytes( bytes, - (base_len as usize).saturating_add(96), - core::cmp::min(32, exp_len as usize), + start.saturating_add(96), + core::cmp::min(32, exp_len), // I don't understand why I need a closure here, but doesn't compile without one |x| U256::from(x), ); if exp_len <= 32 && exp.is_zero() { - U256::zero() + Ok(U256::zero()) } else if exp_len <= 32 { - U256::from(exp.bits()) - U256::from(1) + Ok(U256::from(exp.bits()) - U256::from(1)) } else { // else > 32 - U256::from(8) * U256::from(exp_len - 32) + U256::from(exp.bits()) - U256::from(1) + Ok(U256::from(8) * U256::from(exp_len - 32) + U256::from(exp.bits()) - U256::from(1)) } } fn run_inner(input: &[u8]) -> Result, ExitError> { let (base_len, exp_len, mod_len) = parse_lengths(input); - let base_len = base_len as usize; - let exp_len = exp_len as usize; - let mod_len = mod_len as usize; + let base_len = usize::try_from(base_len).map_err(utils::err_usize_conv)?; + let exp_len = usize::try_from(exp_len).map_err(utils::err_usize_conv)?; + let mod_len = usize::try_from(mod_len).map_err(utils::err_usize_conv)?; let base_start = 96; let base_end = base_len.saturating_add(base_start); @@ -99,7 +102,7 @@ impl Precompile for ModExp { let (base_len, exp_len, mod_len) = parse_lengths(input); let mul = Self::mul_complexity(core::cmp::max(mod_len, base_len)); - let iter_count = Self::calc_iter_count(exp_len, base_len, input); + let iter_count = Self::calc_iter_count(exp_len, base_len, input)?; // mul * iter_count bounded by 2^195 < 2^256 (no overflow) let gas = mul * core::cmp::max(iter_count, U256::one()) / U256::from(20); @@ -123,7 +126,7 @@ impl Precompile for ModExp { } let output = Self::run_inner(input)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } @@ -141,7 +144,7 @@ impl Precompile for ModExp { let (base_len, exp_len, mod_len) = parse_lengths(input); let mul = Self::mul_complexity(base_len, mod_len); - let iter_count = Self::calc_iter_count(exp_len, base_len, input); + let iter_count = Self::calc_iter_count(exp_len, base_len, input)?; // mul * iter_count bounded by 2^189 (so no overflow) let gas = mul * iter_count / U256::from(3); @@ -163,7 +166,7 @@ impl Precompile for ModExp { } let output = Self::run_inner(input)?; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } diff --git a/engine-precompiles/src/native.rs b/engine-precompiles/src/native.rs index 6f1049ad8..ed3c17699 100644 --- a/engine-precompiles/src/native.rs +++ b/engine-precompiles/src/native.rs @@ -30,12 +30,10 @@ mod costs { // TODO(#483): Determine the correct amount of gas pub(super) const EXIT_TO_ETHEREUM_GAS: EthGas = EthGas::new(0); - // TODO(#332): Determine the correct amount of gas - pub(super) const FT_TRANSFER_GAS: NearGas = NearGas::new(100_000_000_000_000); + pub(super) const FT_TRANSFER_GAS: NearGas = NearGas::new(10_000_000_000_000); - // TODO(#332): Determine the correct amount of gas #[cfg(feature = "error_refund")] - pub(super) const REFUND_ON_ERROR_GAS: NearGas = NearGas::new(60_000_000_000_000); + pub(super) const REFUND_ON_ERROR_GAS: NearGas = NearGas::new(5_000_000_000_000); // TODO(#332): Determine the correct amount of gas pub(super) const WITHDRAWAL_GAS: NearGas = NearGas::new(100_000_000_000_000); @@ -401,8 +399,7 @@ impl Precompile for ExitToNear { Ok(PrecompileOutput { logs: vec![promise_log, exit_event_log], ..Default::default() - } - .into()) + }) } } @@ -573,8 +570,7 @@ impl Precompile for ExitToEthereum { Ok(PrecompileOutput { logs: vec![promise_log, exit_event_log], ..Default::default() - } - .into()) + }) } } diff --git a/engine-precompiles/src/prepaid_gas.rs b/engine-precompiles/src/prepaid_gas.rs index 7aacc8e90..9b59b7988 100644 --- a/engine-precompiles/src/prepaid_gas.rs +++ b/engine-precompiles/src/prepaid_gas.rs @@ -5,7 +5,7 @@ use aurora_engine_sdk::env::Env; use aurora_engine_types::{vec, U256}; use evm::{Context, ExitError}; -/// predecessor_account_id precompile address +/// prepaid_gas precompile address /// /// Address: `0x536822d27de53629ef1f84c60555689e9488609f` /// This address is computed as: `&keccak("prepaidGas")[12..]` @@ -53,7 +53,7 @@ impl<'a, E: Env> Precompile for PrepaidGas<'a, E> { U256::from(prepaid_gas.as_u64()).to_big_endian(&mut buf); buf }; - Ok(PrecompileOutput::without_logs(cost, bytes).into()) + Ok(PrecompileOutput::without_logs(cost, bytes)) } } diff --git a/engine-precompiles/src/promise_result.rs b/engine-precompiles/src/promise_result.rs new file mode 100644 index 000000000..1899f66a6 --- /dev/null +++ b/engine-precompiles/src/promise_result.rs @@ -0,0 +1,90 @@ +use super::{EvmPrecompileResult, Precompile}; +use crate::prelude::types::{Address, EthGas}; +use crate::PrecompileOutput; +use aurora_engine_sdk::promise::ReadOnlyPromiseHandler; +use aurora_engine_types::{Cow, Vec}; +use borsh::BorshSerialize; +use evm::{Context, ExitError}; + +/// get_promise_results precompile address +/// +/// Address: `0x0a3540f79be10ef14890e87c1a0040a68cc6af71` +/// This address is computed as: `&keccak("getPromiseResults")[12..]` +pub const ADDRESS: Address = crate::make_address(0x0a3540f7, 0x9be10ef14890e87c1a0040a68cc6af71); + +pub mod costs { + use crate::prelude::types::EthGas; + + /// This cost is always charged for calling this precompile. + pub const PROMISE_RESULT_BASE_COST: EthGas = EthGas::new(125); + /// This is the cost per byte of promise result data. + pub const PROMISE_RESULT_BYTE_COST: EthGas = EthGas::new(1); +} + +pub struct PromiseResult { + handler: H, +} + +impl PromiseResult { + pub fn new(handler: H) -> Self { + Self { handler } + } +} + +impl Precompile for PromiseResult { + fn required_gas(_input: &[u8]) -> Result { + // Only gives the cost we can know without reading any promise data. + // This allows failing fast in the case the base cost cannot even be covered. + Ok(costs::PROMISE_RESULT_BASE_COST) + } + + fn run( + &self, + input: &[u8], + target_gas: Option, + _context: &Context, + _is_static: bool, + ) -> EvmPrecompileResult { + let mut cost = Self::required_gas(input)?; + let check_cost = |cost: EthGas| -> Result<(), ExitError> { + if let Some(target_gas) = target_gas { + if cost > target_gas { + return Err(ExitError::OutOfGas); + } + } + Ok(()) + }; + check_cost(cost)?; + + let num_promises = self.handler.ro_promise_results_count(); + let n_usize = usize::try_from(num_promises).map_err(crate::utils::err_usize_conv)?; + let mut results = Vec::with_capacity(n_usize); + for i in 0..num_promises { + if let Some(result) = self.handler.ro_promise_result(i) { + let n_bytes = u64::try_from(result.size()).map_err(crate::utils::err_usize_conv)?; + cost += n_bytes * costs::PROMISE_RESULT_BYTE_COST; + check_cost(cost)?; + results.push(result); + } + } + + let bytes = results + .try_to_vec() + .map_err(|_| ExitError::Other(Cow::Borrowed("ERR_PROMISE_RESULT_SERIALIZATION")))?; + Ok(PrecompileOutput::without_logs(cost, bytes)) + } +} + +#[cfg(test)] +mod tests { + use crate::prelude::sdk::types::near_account_to_evm_address; + use crate::promise_result; + + #[test] + fn test_get_promise_results_precompile_id() { + assert_eq!( + promise_result::ADDRESS, + near_account_to_evm_address("getPromiseResults".as_bytes()) + ); + } +} diff --git a/engine-precompiles/src/random.rs b/engine-precompiles/src/random.rs index e46e0f47d..423b26e1f 100644 --- a/engine-precompiles/src/random.rs +++ b/engine-precompiles/src/random.rs @@ -49,7 +49,10 @@ impl Precompile for RandomSeed { } } - Ok(PrecompileOutput::without_logs(cost, self.random_seed.as_bytes().to_vec()).into()) + Ok(PrecompileOutput::without_logs( + cost, + self.random_seed.as_bytes().to_vec(), + )) } } diff --git a/engine-precompiles/src/secp256k1.rs b/engine-precompiles/src/secp256k1.rs index 14b01868b..f66a06a5e 100644 --- a/engine-precompiles/src/secp256k1.rs +++ b/engine-precompiles/src/secp256k1.rs @@ -94,7 +94,7 @@ impl Precompile for ECRecover { let v_bit = match v[31] { 27 | 28 if v[..31] == [0; 31] => v[31] - 27, _ => { - return Ok(PrecompileOutput::without_logs(cost, Vec::new()).into()); + return Ok(PrecompileOutput::without_logs(cost, Vec::new())); } }; signature[64] = v_bit; // v @@ -109,7 +109,7 @@ impl Precompile for ECRecover { Err(_) => Vec::new(), }; - Ok(PrecompileOutput::without_logs(cost, output).into()) + Ok(PrecompileOutput::without_logs(cost, output)) } } diff --git a/engine-precompiles/src/utils.rs b/engine-precompiles/src/utils.rs index 7a62515f8..b0edcb643 100644 --- a/engine-precompiles/src/utils.rs +++ b/engine-precompiles/src/utils.rs @@ -1,5 +1,10 @@ +use crate::prelude::Borrowed; +use core::num::TryFromIntError; +#[cfg(test)] use evm::Context; +use evm::ExitError; +#[cfg(test)] pub fn new_context() -> Context { Context { address: Default::default(), @@ -7,3 +12,7 @@ pub fn new_context() -> Context { apparent_value: Default::default(), } } + +pub fn err_usize_conv(_e: TryFromIntError) -> ExitError { + ExitError::Other(Borrowed("ERR_USIZE_CONVERSION")) +} diff --git a/engine-precompiles/src/xcc.rs b/engine-precompiles/src/xcc.rs new file mode 100644 index 000000000..e8e009ad2 --- /dev/null +++ b/engine-precompiles/src/xcc.rs @@ -0,0 +1,385 @@ +//! Cross contract call precompile. +//! +//! Allow Aurora users interacting with NEAR smart contracts using cross contract call primitives. +//! TODO: How they work (low level explanation with examples) + +use crate::{HandleBasedPrecompile, PrecompileOutput}; +use aurora_engine_sdk::io::IO; +use aurora_engine_types::{ + account_id::AccountId, + format, + parameters::{CrossContractCallArgs, PromiseCreateArgs}, + types::{balance::ZERO_YOCTO, Address, EthGas}, + vec, Cow, Vec, H160, H256, U256, +}; +use borsh::{BorshDeserialize, BorshSerialize}; +use evm::backend::Log; +use evm::executor::stack::{PrecompileFailure, PrecompileHandle}; +use evm::ExitError; + +pub mod costs { + use crate::prelude::types::{EthGas, NearGas}; + + /// Base EVM gas cost for calling this precompile. + /// Value obtained from the following methodology: + /// 1. Estimate the cost of calling this precompile in terms of NEAR gas. + /// This is done by calling the precompile with inputs of different lengths + /// and performing a linear regression to obtain a function + /// `NEAR_gas = CROSS_CONTRACT_CALL_BASE + (input_length) * (CROSS_CONTRACT_CALL_BYTE)`. + /// 2. Convert the NEAR gas cost into an EVM gas cost using the conversion ratio below + /// (`CROSS_CONTRACT_CALL_NEAR_GAS`). + /// + /// This process is done in the `test_xcc_eth_gas_cost` test in + /// `engine-tests/src/tests/xcc.rs`. + pub const CROSS_CONTRACT_CALL_BASE: EthGas = EthGas::new(323_000); + /// Additional EVM gas cost per bytes of input given. + /// See `CROSS_CONTRACT_CALL_BASE` for estimation methodology. + pub const CROSS_CONTRACT_CALL_BYTE: EthGas = EthGas::new(3); + /// EVM gas cost per NEAR gas attached to the created promise. + /// This value is derived from the gas report https://hackmd.io/@birchmd/Sy4piXQ29 + /// The units on this quantity are `NEAR Gas / EVM Gas`. + /// The report gives a value `0.175 T(NEAR_gas) / k(EVM_gas)`. To convert the units to + /// `NEAR Gas / EVM Gas`, we simply multiply `0.175 * 10^12 / 10^3 = 175 * 10^6`. + pub const CROSS_CONTRACT_CALL_NEAR_GAS: u64 = 175_000_000; + + pub const ROUTER_EXEC: NearGas = NearGas::new(7_000_000_000_000); + pub const ROUTER_SCHEDULE: NearGas = NearGas::new(5_000_000_000_000); +} + +mod consts { + pub(super) const ERR_INVALID_INPUT: &str = "ERR_INVALID_XCC_INPUT"; + pub(super) const ERR_SERIALIZE: &str = "ERR_XCC_CALL_SERIALIZE"; + pub(super) const ERR_STATIC: &str = "ERR_INVALID_IN_STATIC"; + pub(super) const ERR_DELEGATE: &str = "ERR_INVALID_IN_DELEGATE"; + pub(super) const ROUTER_EXEC_NAME: &str = "execute"; + pub(super) const ROUTER_SCHEDULE_NAME: &str = "schedule"; + /// Solidity selector for the ERC-20 transferFrom function + /// https://www.4byte.directory/signatures/?bytes4_signature=0x23b872dd + pub(super) const TRANSFER_FROM_SELECTOR: [u8; 4] = [0x23, 0xb8, 0x72, 0xdd]; +} + +pub struct CrossContractCall { + io: I, + engine_account_id: AccountId, +} + +impl CrossContractCall { + pub fn new(engine_account_id: AccountId, io: I) -> Self { + Self { + io, + engine_account_id, + } + } +} + +pub mod cross_contract_call { + use aurora_engine_types::{types::Address, H256}; + + /// Exit to Ethereum precompile address + /// + /// Address: `0x516cded1d16af10cad47d6d49128e2eb7d27b372` + /// This address is computed as: `&keccak("nearCrossContractCall")[12..]` + pub const ADDRESS: Address = + crate::make_address(0x516cded1, 0xd16af10cad47d6d49128e2eb7d27b372); + + /// Sentinel value used to indicate the following topic field is how much NEAR the + /// cross-contract call will require. + pub const AMOUNT_TOPIC: H256 = + crate::make_h256(0x72657175697265645f6e656172, 0x72657175697265645f6e656172); +} + +impl HandleBasedPrecompile for CrossContractCall { + fn run_with_handle( + &self, + handle: &mut impl PrecompileHandle, + ) -> Result { + let input = handle.input(); + let target_gas = handle.gas_limit().map(EthGas::new); + let context = handle.context(); + let is_static = handle.is_static(); + + // This only includes the cost we can easily derive without parsing the input. + // This allows failing fast without wasting computation on parsing. + let input_len = u64::try_from(input.len()).map_err(crate::utils::err_usize_conv)?; + let mut cost = + costs::CROSS_CONTRACT_CALL_BASE + costs::CROSS_CONTRACT_CALL_BYTE * input_len; + let check_cost = |cost: EthGas| -> Result<(), PrecompileFailure> { + if let Some(target_gas) = target_gas { + if cost > target_gas { + return Err(PrecompileFailure::Error { + exit_status: ExitError::OutOfGas, + }); + } + } + Ok(()) + }; + check_cost(cost)?; + + // It's not allowed to call cross contract call precompile in static or delegate mode + if is_static { + return Err(revert_with_message(consts::ERR_STATIC)); + } else if context.address != cross_contract_call::ADDRESS.raw() { + return Err(revert_with_message(consts::ERR_DELEGATE)); + } + + let sender = context.caller; + let target_account_id = create_target_account_id(sender, self.engine_account_id.as_ref()); + let args = CrossContractCallArgs::try_from_slice(input) + .map_err(|_| ExitError::Other(Cow::from(consts::ERR_INVALID_INPUT)))?; + let (promise, attached_near) = match args { + CrossContractCallArgs::Eager(call) => { + let call_gas = call.total_gas(); + let attached_near = call.total_near(); + let promise = PromiseCreateArgs { + target_account_id, + method: consts::ROUTER_EXEC_NAME.into(), + args: call + .try_to_vec() + .map_err(|_| ExitError::Other(Cow::from(consts::ERR_SERIALIZE)))?, + attached_balance: ZERO_YOCTO, + attached_gas: costs::ROUTER_EXEC + call_gas, + }; + (promise, attached_near) + } + CrossContractCallArgs::Delayed(call) => { + let attached_near = call.total_near(); + let promise = PromiseCreateArgs { + target_account_id, + method: consts::ROUTER_SCHEDULE_NAME.into(), + args: call + .try_to_vec() + .map_err(|_| ExitError::Other(Cow::from(consts::ERR_SERIALIZE)))?, + attached_balance: ZERO_YOCTO, + // We don't need to add any gas to the amount need for the schedule call + // since the promise is not executed right away. + attached_gas: costs::ROUTER_SCHEDULE, + }; + (promise, attached_near) + } + }; + cost += EthGas::new(promise.attached_gas.as_u64() / costs::CROSS_CONTRACT_CALL_NEAR_GAS); + check_cost(cost)?; + + let required_near = + match state::get_code_version_of_address(&self.io, &Address::new(sender)) { + // If there is no deployed version of the router contract then we need to charge for storage staking + None => attached_near + state::STORAGE_AMOUNT, + Some(_) => attached_near, + }; + // if some NEAR payment is needed, transfer it from the caller to the engine's implicit address + if required_near != ZERO_YOCTO { + let engine_implicit_address = aurora_engine_sdk::types::near_account_to_evm_address( + self.engine_account_id.as_bytes(), + ); + let tx_data = transfer_from_args( + sender, + engine_implicit_address.raw(), + U256::from(required_near.as_u128()), + ); + let wnear_address = state::get_wnear_address(&self.io); + let context = evm::Context { + address: wnear_address.raw(), + caller: cross_contract_call::ADDRESS.raw(), + apparent_value: U256::zero(), + }; + let (exit_reason, return_value) = + handle.call(wnear_address.raw(), None, tx_data, None, false, &context); + match exit_reason { + // Transfer successful, nothing to do + evm::ExitReason::Succeed(_) => (), + evm::ExitReason::Revert(r) => { + return Err(PrecompileFailure::Revert { + exit_status: r, + output: return_value, + }) + } + evm::ExitReason::Error(e) => { + return Err(PrecompileFailure::Error { exit_status: e }) + } + evm::ExitReason::Fatal(f) => { + return Err(PrecompileFailure::Fatal { exit_status: f }) + } + }; + } + + let topics = vec![ + cross_contract_call::AMOUNT_TOPIC, + H256(aurora_engine_types::types::u256_to_arr(&U256::from( + required_near.as_u128(), + ))), + ]; + + let promise_log = Log { + address: cross_contract_call::ADDRESS.raw(), + topics, + data: promise + .try_to_vec() + .map_err(|_| ExitError::Other(Cow::from(consts::ERR_SERIALIZE)))?, + }; + + Ok(PrecompileOutput { + logs: vec![promise_log], + cost, + ..Default::default() + }) + } +} + +pub mod state { + //! Functions for reading state related to the cross-contract call feature + + use aurora_engine_sdk::error::ReadU32Error; + use aurora_engine_sdk::io::{StorageIntermediate, IO}; + use aurora_engine_types::storage::{self, KeyPrefix}; + use aurora_engine_types::types::{Address, Yocto}; + use borsh::{BorshDeserialize, BorshSerialize}; + + pub const ERR_CORRUPTED_STORAGE: &str = "ERR_CORRUPTED_XCC_STORAGE"; + pub const ERR_MISSING_WNEAR_ADDRESS: &str = "ERR_MISSING_WNEAR_ADDRESS"; + pub const VERSION_KEY: &[u8] = b"version"; + pub const WNEAR_KEY: &[u8] = b"wnear"; + /// Amount of NEAR needed to cover storage for a router contract. + pub const STORAGE_AMOUNT: Yocto = Yocto::new(2_000_000_000_000_000_000_000_000); + + /// Type wrapper for version of router contracts. + #[derive( + Debug, + Clone, + Copy, + Default, + PartialEq, + Eq, + PartialOrd, + Ord, + BorshDeserialize, + BorshSerialize, + )] + pub struct CodeVersion(pub u32); + + impl CodeVersion { + pub fn increment(self) -> Self { + Self(self.0 + 1) + } + } + + /// Get the address of the wNEAR ERC-20 contract + pub fn get_wnear_address(io: &I) -> Address { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, WNEAR_KEY); + match io.read_storage(&key) { + Some(bytes) => Address::try_from_slice(&bytes.to_vec()).expect(ERR_CORRUPTED_STORAGE), + None => panic!("{}", ERR_MISSING_WNEAR_ADDRESS), + } + } + + /// Get the latest router contract version. + pub fn get_latest_code_version(io: &I) -> CodeVersion { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, VERSION_KEY); + read_version(io, &key).unwrap_or_default() + } + + /// Get the version of the currently deploy router for the given address (if it exists). + pub fn get_code_version_of_address(io: &I, address: &Address) -> Option { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, address.as_bytes()); + read_version(io, &key) + } + + /// Private utility method for reading code version from storage. + fn read_version(io: &I, key: &[u8]) -> Option { + match io.read_u32(key) { + Ok(value) => Some(CodeVersion(value)), + Err(ReadU32Error::MissingValue) => None, + Err(ReadU32Error::InvalidU32) => panic!("{}", ERR_CORRUPTED_STORAGE), + } + } +} + +fn transfer_from_args(from: H160, to: H160, amount: U256) -> Vec { + let args = ethabi::encode(&[ + ethabi::Token::Address(from), + ethabi::Token::Address(to), + ethabi::Token::Uint(amount), + ]); + [&consts::TRANSFER_FROM_SELECTOR, args.as_slice()].concat() +} + +fn create_target_account_id(sender: H160, engine_account_id: &str) -> AccountId { + format!("{}.{}", hex::encode(sender.as_bytes()), engine_account_id) + .parse() + .unwrap() +} + +fn revert_with_message(message: &str) -> PrecompileFailure { + PrecompileFailure::Revert { + exit_status: evm::ExitRevert::Reverted, + output: message.as_bytes().to_vec(), + } +} + +#[cfg(test)] +mod tests { + use crate::prelude::sdk::types::near_account_to_evm_address; + use crate::xcc::cross_contract_call; + use aurora_engine_types::{vec, H160, U256}; + use rand::Rng; + + #[test] + fn test_precompile_id() { + assert_eq!( + cross_contract_call::ADDRESS, + near_account_to_evm_address("nearCrossContractCall".as_bytes()) + ); + } + + #[test] + fn test_transfer_from_encoding() { + let mut rng = rand::thread_rng(); + let from: [u8; 20] = rng.gen(); + let to: [u8; 20] = rng.gen(); + let amount: [u8; 32] = rng.gen(); + + let from = H160(from); + let to = H160(to); + let amount = U256::from_big_endian(&amount); + + #[allow(deprecated)] + let transfer_from_function = ethabi::Function { + name: "transferFrom".into(), + inputs: vec![ + ethabi::Param { + name: "from".into(), + kind: ethabi::ParamType::Address, + internal_type: None, + }, + ethabi::Param { + name: "to".into(), + kind: ethabi::ParamType::Address, + internal_type: None, + }, + ethabi::Param { + name: "amount".into(), + kind: ethabi::ParamType::Uint(256), + internal_type: None, + }, + ], + outputs: vec![ethabi::Param { + name: "".into(), + kind: ethabi::ParamType::Bool, + internal_type: None, + }], + constant: None, + state_mutability: ethabi::StateMutability::NonPayable, + }; + let expected_tx_data = transfer_from_function + .encode_input(&[ + ethabi::Token::Address(from), + ethabi::Token::Address(to), + ethabi::Token::Uint(amount), + ]) + .unwrap(); + + assert_eq!( + super::transfer_from_args(from, to, amount), + expected_tx_data + ); + } +} diff --git a/engine-sdk/Cargo.toml b/engine-sdk/Cargo.toml index feb770474..c6a127a03 100644 --- a/engine-sdk/Cargo.toml +++ b/engine-sdk/Cargo.toml @@ -14,12 +14,12 @@ autobenches = false [dependencies] aurora-engine-types = { path = "../engine-types", default-features = false } -borsh = { version = "0.8.2", default-features = false } -sha3 = { version = "0.9.1", default-features = false } -sha2 = { version = "0.9.3", default-features = false } +borsh = { version = "0.9.3", default-features = false } +sha3 = { version = "0.10.2", default-features = false } +sha2 = { version = "0.10.2", default-features = false } [features] -std = ["aurora-engine-types/std"] +std = ["aurora-engine-types/std", "borsh/std", "sha3/std", "sha2/std"] contract = [] log = [] mainnet = [] diff --git a/engine-sdk/src/error.rs b/engine-sdk/src/error.rs index 5e4cffa37..87c61610f 100644 --- a/engine-sdk/src/error.rs +++ b/engine-sdk/src/error.rs @@ -16,6 +16,21 @@ impl AsRef<[u8]> for IncorrectInputLength { } } +#[derive(Debug)] +pub enum ReadU32Error { + InvalidU32, + MissingValue, +} + +impl AsRef<[u8]> for ReadU32Error { + fn as_ref(&self) -> &[u8] { + match self { + Self::InvalidU32 => b"ERR_NOT_U32", + Self::MissingValue => b"ERR_U32_NOT_FOUND", + } + } +} + #[derive(Debug)] pub enum ReadU64Error { InvalidU64, diff --git a/engine-sdk/src/io.rs b/engine-sdk/src/io.rs index 05642d45f..7aeb7aaa8 100644 --- a/engine-sdk/src/io.rs +++ b/engine-sdk/src/io.rs @@ -88,6 +88,19 @@ pub trait IO { Ok(buf) } + /// Convenience function to read the input into a 32-byte array. + fn read_input_arr32(&self) -> Result<[u8; 32], error::IncorrectInputLength> { + let value = self.read_input(); + + if value.len() != 32 { + return Err(error::IncorrectInputLength); + } + + let mut buf = [0u8; 32]; + value.copy_to_slice(&mut buf); + Ok(buf) + } + /// Convenience function to store the input directly in storage under the /// given key (without ever loading it into memory). fn read_input_and_store(&mut self, key: &[u8]) { @@ -95,6 +108,22 @@ pub trait IO { self.write_storage_direct(key, value); } + /// Convenience function to read a 32-bit unsigned integer from storage + /// (assumes little-endian encoding). + fn read_u32(&self, key: &[u8]) -> Result { + let value = self + .read_storage(key) + .ok_or(error::ReadU32Error::MissingValue)?; + + if value.len() != 4 { + return Err(error::ReadU32Error::InvalidU32); + } + + let mut result = [0u8; 4]; + value.copy_to_slice(&mut result); + Ok(u32::from_le_bytes(result)) + } + /// Convenience function to read a 64-bit unsigned integer from storage /// (assumes little-endian encoding). fn read_u64(&self, key: &[u8]) -> Result { diff --git a/engine-sdk/src/lib.rs b/engine-sdk/src/lib.rs index 97beb87e5..fd20909d5 100644 --- a/engine-sdk/src/lib.rs +++ b/engine-sdk/src/lib.rs @@ -2,7 +2,7 @@ #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] #[cfg(feature = "contract")] -use crate::prelude::Address; +use crate::prelude::{Address, Vec, U256}; use crate::prelude::{H256, STORAGE_PRICE_PER_BYTE}; pub use types::keccak; @@ -45,9 +45,10 @@ pub fn log_utf8(bytes: &[u8]) { #[cfg(feature = "contract")] pub fn sha256(input: &[u8]) -> H256 { unsafe { + const REGISTER_ID: u64 = 1; exports::sha256(input.len() as u64, input.as_ptr() as u64, 1); let bytes = H256::zero(); - exports::read_register(1, bytes.0.as_ptr() as *const u64 as u64); + exports::read_register(REGISTER_ID, bytes.0.as_ptr() as *const u64 as u64); bytes } } @@ -72,6 +73,75 @@ pub fn ripemd160(input: &[u8]) -> [u8; 20] { } } +#[cfg(feature = "contract")] +pub fn alt_bn128_g1_sum(left: [u8; 64], right: [u8; 64]) -> [u8; 64] { + let mut bytes = Vec::with_capacity(64 * 2 + 2); // 64 bytes per G1 + 2 positive integer bytes. + + bytes.push(0); // positive sign + bytes.extend_from_slice(&left); + bytes.push(0); + bytes.extend_from_slice(&right); + + let value_ptr = bytes.as_ptr() as u64; + let value_len = bytes.len() as u64; + + unsafe { + const REGISTER_ID: u64 = 1; + exports::alt_bn128_g1_sum(value_len, value_ptr, REGISTER_ID); + let mut output = [0u8; 64]; + exports::read_register(REGISTER_ID, output.as_ptr() as u64); + let x = U256::from_little_endian(&output[0..32]); + let y = U256::from_little_endian(&output[32..64]); + x.to_big_endian(&mut output[0..32]); + y.to_big_endian(&mut output[32..64]); + output + } +} + +#[cfg(feature = "contract")] +pub fn alt_bn128_g1_scalar_multiple(g1: [u8; 64], fr: [u8; 32]) -> [u8; 64] { + let mut bytes = [0u8; 96]; + bytes[0..64].copy_from_slice(&g1); + bytes[64..96].copy_from_slice(&fr); + + let value_ptr = bytes.as_ptr() as u64; + let value_len = bytes.len() as u64; + + unsafe { + const REGISTER_ID: u64 = 1; + exports::alt_bn128_g1_multiexp(value_len, value_ptr, REGISTER_ID); + let mut output = [0u8; 64]; + exports::read_register(REGISTER_ID, output.as_ptr() as u64); + let x = U256::from_little_endian(&output[0..32]); + let y = U256::from_little_endian(&output[32..64]); + x.to_big_endian(&mut output[0..32]); + y.to_big_endian(&mut output[32..64]); + output + } +} + +#[cfg(feature = "contract")] +pub fn alt_bn128_pairing(pairs: I) -> bool +where + I: ExactSizeIterator, +{ + let n = pairs.len(); + let mut bytes = Vec::with_capacity(n * 6 * 32); + let mut buf = [0u8; 64 + 128]; + for (g1, g2) in pairs { + buf[0..64].copy_from_slice(&g1); + buf[64..192].copy_from_slice(&g2); + bytes.extend_from_slice(&buf); + } + + let value_ptr = bytes.as_ptr() as u64; + let value_len = bytes.len() as u64; + + let result = unsafe { exports::alt_bn128_pairing_check(value_len, value_ptr) }; + + result == 1 +} + /// Recover address from message hash and signature. #[cfg(feature = "contract")] pub fn ecrecover(hash: H256, signature: &[u8]) -> Result { diff --git a/engine-sdk/src/near_runtime.rs b/engine-sdk/src/near_runtime.rs index c325d7a7d..a62640f75 100644 --- a/engine-sdk/src/near_runtime.rs +++ b/engine-sdk/src/near_runtime.rs @@ -6,7 +6,7 @@ use aurora_engine_types::parameters::{PromiseAction, PromiseBatchAction, Promise use aurora_engine_types::types::PromiseResult; use aurora_engine_types::H256; -#[cfg(feature = "mainnet")] +#[cfg(all(feature = "mainnet", not(feature = "testnet")))] /// The mainnet eth_custodian address 0x6BFaD42cFC4EfC96f529D786D643Ff4A8B89FA52 const CUSTODIAN_ADDRESS: &[u8] = &[ 107, 250, 212, 44, 252, 78, 252, 150, 245, 41, 215, 134, 214, 67, 255, 74, 139, 137, 250, 82, @@ -260,6 +260,8 @@ impl crate::env::Env for Runtime { } impl crate::promise::PromiseHandler for Runtime { + type ReadOnly = Self; + fn promise_results_count(&self) -> u64 { unsafe { exports::promise_results_count() } } @@ -337,6 +339,9 @@ impl crate::promise::PromiseHandler for Runtime { for action in args.actions.iter() { match action { + PromiseAction::CreateAccount => unsafe { + exports::promise_batch_action_create_account(id); + }, PromiseAction::Transfer { amount } => unsafe { let amount = amount.as_u128(); exports::promise_batch_action_transfer(id, &amount as *const u128 as _); @@ -379,6 +384,10 @@ impl crate::promise::PromiseHandler for Runtime { exports::promise_return(promise.raw()); } } + + fn read_only(&self) -> Self::ReadOnly { + Self + } } /// Some host functions are not usable in NEAR view calls. @@ -472,6 +481,9 @@ pub(crate) mod exports { malleability_flag: u64, register_id: u64, ) -> u64; + pub(crate) fn alt_bn128_g1_sum(value_len: u64, value_ptr: u64, register_id: u64); + pub(crate) fn alt_bn128_g1_multiexp(value_len: u64, value_ptr: u64, register_id: u64); + pub(crate) fn alt_bn128_pairing_check(value_len: u64, value_ptr: u64) -> u64; // ##################### // # Miscellaneous API # // ##################### @@ -511,7 +523,7 @@ pub(crate) mod exports { // ####################### // # Promise API actions # // ####################### - fn promise_batch_action_create_account(promise_index: u64); + pub(crate) fn promise_batch_action_create_account(promise_index: u64); pub(crate) fn promise_batch_action_deploy_contract( promise_index: u64, code_len: u64, diff --git a/engine-sdk/src/prelude.rs b/engine-sdk/src/prelude.rs index 799b5ec86..118ef3ef4 100644 --- a/engine-sdk/src/prelude.rs +++ b/engine-sdk/src/prelude.rs @@ -1,3 +1,3 @@ pub use aurora_engine_types::types::{Address, NearGas, PromiseResult, STORAGE_PRICE_PER_BYTE}; -pub use aurora_engine_types::{vec, Vec, H256}; +pub use aurora_engine_types::{vec, Vec, H256, U256}; pub use borsh::{BorshDeserialize, BorshSerialize}; diff --git a/engine-sdk/src/promise.rs b/engine-sdk/src/promise.rs index 86a2b85bc..c6f0bac73 100644 --- a/engine-sdk/src/promise.rs +++ b/engine-sdk/src/promise.rs @@ -17,6 +17,8 @@ impl PromiseId { } pub trait PromiseHandler { + type ReadOnly: ReadOnlyPromiseHandler; + fn promise_results_count(&self) -> u64; fn promise_result(&self, index: u64) -> Option; @@ -33,4 +35,59 @@ pub trait PromiseHandler { let base = self.promise_create_call(&args.base); self.promise_attach_callback(base, &args.callback) } + + fn read_only(&self) -> Self::ReadOnly; +} + +pub trait ReadOnlyPromiseHandler { + fn ro_promise_results_count(&self) -> u64; + fn ro_promise_result(&self, index: u64) -> Option; +} + +impl ReadOnlyPromiseHandler for T { + fn ro_promise_results_count(&self) -> u64 { + self.promise_results_count() + } + + fn ro_promise_result(&self, index: u64) -> Option { + self.promise_result(index) + } +} + +/// A promise handler which does nothing. Should only be used when promises can be safely ignored. +#[derive(Debug, Copy, Clone)] +pub struct Noop; + +impl PromiseHandler for Noop { + type ReadOnly = Self; + + fn promise_results_count(&self) -> u64 { + 0 + } + + fn promise_result(&self, _index: u64) -> Option { + None + } + + fn promise_create_call(&mut self, _args: &PromiseCreateArgs) -> PromiseId { + PromiseId::new(0) + } + + fn promise_attach_callback( + &mut self, + _base: PromiseId, + _callback: &PromiseCreateArgs, + ) -> PromiseId { + PromiseId::new(0) + } + + fn promise_create_batch(&mut self, _args: &PromiseBatchAction) -> PromiseId { + PromiseId::new(0) + } + + fn promise_return(&mut self, _promise: PromiseId) {} + + fn read_only(&self) -> Self::ReadOnly { + Self + } } diff --git a/engine-standalone-storage/Cargo.toml b/engine-standalone-storage/Cargo.toml index 0a78c5aab..16aefd3e5 100644 --- a/engine-standalone-storage/Cargo.toml +++ b/engine-standalone-storage/Cargo.toml @@ -18,8 +18,8 @@ aurora-engine = { path = "../engine", default-features = false, features = ["std aurora-engine-types = { path = "../engine-types", default-features = false, features = ["std"] } aurora-engine-sdk = { path = "../engine-sdk", default-features = false, features = ["std"] } aurora-engine-transactions = { path = "../engine-transactions", default-features = false, features = ["std"] } -borsh = { version = "0.8.2" } -evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false } +borsh = { version = "0.9.3" } +evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false } rocksdb = { version = "0.18.0", default-features = false } postgres = "0.19.2" serde = "1.0.130" diff --git a/engine-standalone-storage/src/promise.rs b/engine-standalone-storage/src/promise.rs index 2293fa33d..19ff476d9 100644 --- a/engine-standalone-storage/src/promise.rs +++ b/engine-standalone-storage/src/promise.rs @@ -2,16 +2,31 @@ use aurora_engine_sdk::promise::{PromiseHandler, PromiseId}; use aurora_engine_types::parameters::{PromiseBatchAction, PromiseCreateArgs}; use aurora_engine_types::types::PromiseResult; -/// A promise handler which does nothing. Should only be used when promises can be safely ignored. -pub struct Noop; +/// Implements `PromiseHandler` so that it can be used in the standalone engine implementation of +/// methods like `call`, however since the standalone engine cannot schedule promises in a +/// meaningful way, the mutable implementations are no-ops. Functionally, this is only an implementation +/// of `ReadOnlyPromiseHandler`, which is needed for the standalone engine to properly serve the +/// EVM precompile that gives back information on the results of promises (possibly scheduled using +/// the cross-contract calls feature). +#[derive(Debug, Clone, Copy)] +pub struct NoScheduler<'a> { + pub promise_data: &'a [Option>], +} + +impl<'a> PromiseHandler for NoScheduler<'a> { + type ReadOnly = Self; -impl PromiseHandler for Noop { fn promise_results_count(&self) -> u64 { - 0 + u64::try_from(self.promise_data.len()).unwrap_or_default() } - fn promise_result(&self, _index: u64) -> Option { - None + fn promise_result(&self, index: u64) -> Option { + let i = usize::try_from(index).ok()?; + let result = match self.promise_data.get(i)? { + Some(bytes) => PromiseResult::Successful(bytes.clone()), + None => PromiseResult::Failed, + }; + Some(result) } fn promise_create_call(&mut self, _args: &PromiseCreateArgs) -> PromiseId { @@ -31,4 +46,8 @@ impl PromiseHandler for Noop { } fn promise_return(&mut self, _promise: PromiseId) {} + + fn read_only(&self) -> Self::ReadOnly { + *self + } } diff --git a/engine-standalone-storage/src/relayer_db/mod.rs b/engine-standalone-storage/src/relayer_db/mod.rs index 9771b4e75..b2f7b68a6 100644 --- a/engine-standalone-storage/src/relayer_db/mod.rs +++ b/engine-standalone-storage/src/relayer_db/mod.rs @@ -83,7 +83,8 @@ where random_seed: H256::zero(), prepaid_gas: DEFAULT_PREPAID_GAS, }; - let mut handler = crate::promise::Noop; + // We use the Noop handler here since the relayer DB does not contain any promise information. + let mut handler = aurora_engine_sdk::promise::Noop; while let Some(row) = rows.next()? { let near_tx_hash = row.near_hash; @@ -150,6 +151,7 @@ where caller: env.predecessor_account_id(), attached_near: 0, transaction: crate::sync::types::TransactionKind::Submit(tx), + promise_data: Vec::new(), }; storage.set_transaction_included(tx_hash, &tx_msg, &diff)?; } @@ -256,6 +258,7 @@ mod test { caller: "aurora".parse().unwrap(), attached_near: 0, transaction: TransactionKind::Unknown, + promise_data: Vec::new(), }, &diff, ) diff --git a/engine-standalone-storage/src/sync/mod.rs b/engine-standalone-storage/src/sync/mod.rs index 6f233e8a0..407526e2f 100644 --- a/engine-standalone-storage/src/sync/mod.rs +++ b/engine-standalone-storage/src/sync/mod.rs @@ -1,4 +1,4 @@ -use aurora_engine::{connector, engine, parameters::SubmitResult}; +use aurora_engine::{connector, engine, parameters::SubmitResult, xcc}; use aurora_engine_sdk::env::{self, Env, DEFAULT_PREPAID_GAS}; use aurora_engine_types::{ account_id::AccountId, @@ -128,7 +128,9 @@ fn execute_transaction<'db>( TransactionKind::Submit(tx) => { // We can ignore promises in the standalone engine because it processes each receipt separately // and it is fed a stream of receipts (it does not schedule them) - let mut handler = crate::promise::Noop; + let mut handler = crate::promise::NoScheduler { + promise_data: &transaction_message.promise_data, + }; let transaction_bytes: Vec = tx.into(); let tx_hash = aurora_engine_sdk::keccak(&transaction_bytes); @@ -151,7 +153,13 @@ fn execute_transaction<'db>( } other => { - let result = non_submit_execute(other, io, env, relayer_address); + let result = non_submit_execute( + other, + io, + env, + relayer_address, + &transaction_message.promise_data, + ); (near_receipt_id, result) } }; @@ -169,11 +177,12 @@ fn non_submit_execute<'db>( mut io: EngineStateAccess<'db, 'db, 'db>, env: env::Fixed, relayer_address: Address, + promise_data: &[Option>], ) -> Result, error::Error> { let result = match transaction { TransactionKind::Call(args) => { // We can ignore promises in the standalone engine (see above) - let mut handler = crate::promise::Noop; + let mut handler = crate::promise::NoScheduler { promise_data }; let mut engine = engine::Engine::new(relayer_address, env.current_account_id(), io, &env)?; @@ -184,7 +193,7 @@ fn non_submit_execute<'db>( TransactionKind::Deploy(input) => { // We can ignore promises in the standalone engine (see above) - let mut handler = crate::promise::Noop; + let mut handler = crate::promise::NoScheduler { promise_data }; let mut engine = engine::Engine::new(relayer_address, env.current_account_id(), io, &env)?; @@ -195,7 +204,7 @@ fn non_submit_execute<'db>( TransactionKind::DeployErc20(args) => { // No promises can be created by `deploy_erc20_token` - let mut handler = crate::promise::Noop; + let mut handler = crate::promise::NoScheduler { promise_data }; let result = engine::deploy_erc20_token(args.clone(), io, &env, &mut handler)?; Some(TransactionExecutionResult::DeployErc20(result)) @@ -203,7 +212,7 @@ fn non_submit_execute<'db>( TransactionKind::FtOnTransfer(args) => { // No promises can be created by `ft_on_transfer` - let mut handler = crate::promise::Noop; + let mut handler = crate::promise::NoScheduler { promise_data }; let mut engine = engine::Engine::new(relayer_address, env.current_account_id(), io, &env)?; @@ -328,7 +337,7 @@ fn non_submit_execute<'db>( maybe_args .clone() .map(|args| { - let mut handler = crate::promise::Noop; + let mut handler = crate::promise::NoScheduler { promise_data }; let engine_state = engine::get_state(&io)?; let result = engine::refund_on_error(io, &env, engine_state, args, &mut handler); @@ -360,6 +369,22 @@ fn non_submit_execute<'db>( None } + TransactionKind::FactoryUpdate(bytecode) => { + let router_bytecode = xcc::RouterCode::borrowed(bytecode); + xcc::update_router_code(&mut io, &router_bytecode); + + None + } + TransactionKind::FactoryUpdateAddressVersion(args) => { + xcc::set_code_version_of_address(&mut io, &args.address, args.version); + + None + } + TransactionKind::FactorySetWNearAddress(address) => { + xcc::set_wnear_address(&mut io, address); + + None + } TransactionKind::Unknown => None, // Not handled in this function; is handled by the general `execute_transaction` function TransactionKind::Submit(_) => unreachable!(), diff --git a/engine-standalone-storage/src/sync/types.rs b/engine-standalone-storage/src/sync/types.rs index 9e2433495..4d732ab50 100644 --- a/engine-standalone-storage/src/sync/types.rs +++ b/engine-standalone-storage/src/sync/types.rs @@ -1,4 +1,5 @@ use aurora_engine::parameters; +use aurora_engine::xcc::AddressVersionUpdateArgs; use aurora_engine_transactions::EthTransactionKind; use aurora_engine_types::account_id::AccountId; use aurora_engine_types::{types, H256}; @@ -39,6 +40,9 @@ pub struct TransactionMessage { pub attached_near: u128, /// Details of the transaction that was executed pub transaction: TransactionKind, + /// Results from previous NEAR receipts + /// (only present when this transaction is a callback of another transaction). + pub promise_data: Vec>>, } impl TransactionMessage { @@ -48,7 +52,12 @@ impl TransactionMessage { } pub fn try_from_slice(bytes: &[u8]) -> Result { - let borshable = BorshableTransactionMessage::try_from_slice(bytes)?; + let borshable = match BorshableTransactionMessage::try_from_slice(bytes) { + Ok(b) => b, + // To avoid DB migration, allow fallback on deserializing V1 messages + Err(_) => BorshableTransactionMessageV1::try_from_slice(bytes) + .map(BorshableTransactionMessage::V1)?, + }; Self::try_from(borshable).map_err(|e| { let message = e.as_str(); std::io::Error::new(std::io::ErrorKind::Other, message) @@ -100,35 +109,65 @@ pub enum TransactionKind { NewConnector(parameters::InitCallArgs), /// Initialize Engine NewEngine(parameters::NewCallArgs), + /// Update xcc-router bytecode + FactoryUpdate(Vec), + /// Update the version of a deployed xcc-router contract + FactoryUpdateAddressVersion(AddressVersionUpdateArgs), + FactorySetWNearAddress(types::Address), /// Sentinel kind for cases where a NEAR receipt caused a /// change in Aurora state, but we failed to parse the Action. Unknown, } +/// This data type represents `TransactionMessage` above in the way consistent with how it is +/// stored on disk (in the DB). This type implements borsh (de)serialization. The purpose of +/// having a private struct for borsh, which is separate from the main `TransactionMessage` +/// which is used in the actual logic of executing transactions, +/// is to decouple the on-disk representation of the data from how it is used in the code. +/// This allows us to keep the `TransactionMessage` structure clean (no need to worry about +/// backwards compatibility with storage), hiding the complexity which is not important to +/// the logic of processing transactions. +/// +/// V1 is an older version of `TransactionMessage`, before the addition of `promise_data`. +/// +/// V2 is a structurally identical message to `TransactionMessage` above. +/// +/// For details of what the individual fields mean, see the comments on the main +/// `TransactionMessage` type. #[derive(BorshDeserialize, BorshSerialize)] -struct BorshableTransactionMessage<'a> { - /// Hash of the block which included this transaction +enum BorshableTransactionMessage<'a> { + V1(BorshableTransactionMessageV1<'a>), + V2(BorshableTransactionMessageV2<'a>), +} + +#[derive(BorshDeserialize, BorshSerialize)] +struct BorshableTransactionMessageV1<'a> { pub block_hash: [u8; 32], - /// Receipt ID of the receipt that was actually executed on NEAR pub near_receipt_id: [u8; 32], - /// If multiple Aurora transactions are included in the same block, - /// this index gives the order in which they should be executed. pub position: u16, - /// True if the transaction executed successfully on the blockchain, false otherwise. pub succeeded: bool, - /// NEAR account that signed the transaction pub signer: Cow<'a, AccountId>, - /// NEAR account that called the Aurora engine contract pub caller: Cow<'a, AccountId>, - /// Amount of NEAR token attached to the transaction pub attached_near: u128, - /// Details of the transaction that was executed pub transaction: BorshableTransactionKind<'a>, } +#[derive(BorshDeserialize, BorshSerialize)] +struct BorshableTransactionMessageV2<'a> { + pub block_hash: [u8; 32], + pub near_receipt_id: [u8; 32], + pub position: u16, + pub succeeded: bool, + pub signer: Cow<'a, AccountId>, + pub caller: Cow<'a, AccountId>, + pub attached_near: u128, + pub transaction: BorshableTransactionKind<'a>, + pub promise_data: Cow<'a, Vec>>>, +} + impl<'a> From<&'a TransactionMessage> for BorshableTransactionMessage<'a> { fn from(t: &'a TransactionMessage) -> Self { - Self { + Self::V2(BorshableTransactionMessageV2 { block_hash: t.block_hash.0, near_receipt_id: t.near_receipt_id.0, position: t.position, @@ -137,24 +176,39 @@ impl<'a> From<&'a TransactionMessage> for BorshableTransactionMessage<'a> { caller: Cow::Borrowed(&t.caller), attached_near: t.attached_near, transaction: (&t.transaction).into(), - } + promise_data: Cow::Borrowed(&t.promise_data), + }) } } impl<'a> TryFrom> for TransactionMessage { - type Error = aurora_engine_transactions::ParseTransactionError; + type Error = aurora_engine_transactions::Error; fn try_from(t: BorshableTransactionMessage<'a>) -> Result { - Ok(Self { - block_hash: H256(t.block_hash), - near_receipt_id: H256(t.near_receipt_id), - position: t.position, - succeeded: t.succeeded, - signer: t.signer.into_owned(), - caller: t.caller.into_owned(), - attached_near: t.attached_near, - transaction: t.transaction.try_into()?, - }) + match t { + BorshableTransactionMessage::V1(t) => Ok(Self { + block_hash: H256(t.block_hash), + near_receipt_id: H256(t.near_receipt_id), + position: t.position, + succeeded: t.succeeded, + signer: t.signer.into_owned(), + caller: t.caller.into_owned(), + attached_near: t.attached_near, + transaction: t.transaction.try_into()?, + promise_data: Vec::new(), + }), + BorshableTransactionMessage::V2(t) => Ok(Self { + block_hash: H256(t.block_hash), + near_receipt_id: H256(t.near_receipt_id), + position: t.position, + succeeded: t.succeeded, + signer: t.signer.into_owned(), + caller: t.caller.into_owned(), + attached_near: t.attached_near, + transaction: t.transaction.try_into()?, + promise_data: t.promise_data.into_owned(), + }), + } } } @@ -186,6 +240,9 @@ enum BorshableTransactionKind<'a> { SetConnectorData(Cow<'a, parameters::SetContractDataCallArgs>), NewConnector(Cow<'a, parameters::InitCallArgs>), NewEngine(Cow<'a, parameters::NewCallArgs>), + FactoryUpdate(Cow<'a, Vec>), + FactoryUpdateAddressVersion(Cow<'a, AddressVersionUpdateArgs>), + FactorySetWNearAddress(types::Address), Unknown, } @@ -217,13 +274,20 @@ impl<'a> From<&'a TransactionKind> for BorshableTransactionKind<'a> { TransactionKind::SetConnectorData(x) => Self::SetConnectorData(Cow::Borrowed(x)), TransactionKind::NewConnector(x) => Self::NewConnector(Cow::Borrowed(x)), TransactionKind::NewEngine(x) => Self::NewEngine(Cow::Borrowed(x)), + TransactionKind::FactoryUpdate(x) => Self::FactoryUpdate(Cow::Borrowed(x)), + TransactionKind::FactoryUpdateAddressVersion(x) => { + Self::FactoryUpdateAddressVersion(Cow::Borrowed(x)) + } + TransactionKind::FactorySetWNearAddress(address) => { + Self::FactorySetWNearAddress(*address) + } TransactionKind::Unknown => Self::Unknown, } } } impl<'a> TryFrom> for TransactionKind { - type Error = aurora_engine_transactions::ParseTransactionError; + type Error = aurora_engine_transactions::Error; fn try_from(t: BorshableTransactionKind<'a>) -> Result { match t { @@ -261,6 +325,13 @@ impl<'a> TryFrom> for TransactionKind { } BorshableTransactionKind::NewConnector(x) => Ok(Self::NewConnector(x.into_owned())), BorshableTransactionKind::NewEngine(x) => Ok(Self::NewEngine(x.into_owned())), + BorshableTransactionKind::FactoryUpdate(x) => Ok(Self::FactoryUpdate(x.into_owned())), + BorshableTransactionKind::FactoryUpdateAddressVersion(x) => { + Ok(Self::FactoryUpdateAddressVersion(x.into_owned())) + } + BorshableTransactionKind::FactorySetWNearAddress(address) => { + Ok(Self::FactorySetWNearAddress(address)) + } BorshableTransactionKind::Unknown => Ok(Self::Unknown), } } diff --git a/engine-standalone-tracing/Cargo.toml b/engine-standalone-tracing/Cargo.toml index c75c273c3..99aaa2416 100644 --- a/engine-standalone-tracing/Cargo.toml +++ b/engine-standalone-tracing/Cargo.toml @@ -14,13 +14,12 @@ autobenches = false crate-type = ["lib"] [dependencies] -aurora-engine = { path = "../engine", default-features = false, features = ["std"] } aurora-engine-types = { path = "../engine-types", default-features = false, features = ["std"] } -aurora-engine-sdk = { path = "../engine-sdk", default-features = false, features = ["std"] } -evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std"] } -evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std", "tracing"] } -evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std", "tracing"] } -evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std", "tracing"] } +evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std"] } +evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std", "tracing"] } +evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std", "tracing"] } +evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std", "tracing"] } +hex = { version = "0.4", default-features = false, features = ["std"] } serde = { version = "1", features = ["derive"], optional = true } [features] diff --git a/engine-standalone-tracing/src/sputnik.rs b/engine-standalone-tracing/src/sputnik.rs index ba32e55a0..9d82cb3e4 100644 --- a/engine-standalone-tracing/src/sputnik.rs +++ b/engine-standalone-tracing/src/sputnik.rs @@ -207,6 +207,7 @@ impl evm::tracing::EventListener for TransactionTraceBuilder { self.output = return_value.to_vec(); } } + Event::PrecompileSubcall { .. } => (), Event::TransactCall { .. } => (), // no useful information Event::TransactCreate { .. } => (), // no useful information Event::TransactCreate2 { .. } => (), // no useful information diff --git a/engine-standalone-tracing/src/types/call_tracer.rs b/engine-standalone-tracing/src/types/call_tracer.rs new file mode 100644 index 000000000..33a695525 --- /dev/null +++ b/engine-standalone-tracing/src/types/call_tracer.rs @@ -0,0 +1,289 @@ +//! This module defines data structure to produce traces compatible with geths "callTracer": +//! https://github.com/ethereum/go-ethereum/blob/ad15050c7fbedd0f05a49e81400de18c2cc2c284/eth/tracers/native/call.go + +use aurora_engine_types::{types::Address, U256}; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct CallFrame { + call_type: CallType, + from: Address, + to: Option
, + value: U256, + gas: u64, + gas_used: u64, + input: Vec, + output: Vec, + error: Option, + calls: Vec, +} + +#[derive(Debug, Default, Clone, PartialEq, Eq)] +pub struct CallTracer { + call_stack: Vec, +} + +impl CallTracer { + fn end(&mut self, output: Vec, error: Option<&evm::ExitReason>) { + let frame = self.call_stack.first_mut().unwrap(); + match error { + None => frame.output = output, + Some(error) => { + let error_message = format!("{:?}", error); + if error_message.to_lowercase().contains("revert") { + frame.output = output; + } + frame.error = Some(error_message); + } + } + } + + fn enter( + &mut self, + call_type: CallType, + from: Address, + to: Address, + input: Vec, + gas: u64, + value: U256, + ) { + let frame = CallFrame { + call_type, + from, + to: Some(to), + value, + gas, + gas_used: 0, + input, + output: Vec::new(), + error: None, + calls: Vec::new(), + }; + self.call_stack.push(frame); + } + + fn exit(&mut self, output: Vec, error: Option<&evm::ExitReason>) { + if self.call_stack.len() <= 1 { + return self.end(output, error); + } + + let mut frame = self.call_stack.pop().unwrap(); + match error { + None => frame.output = output, + Some(error) => { + frame.error = Some(format!("{:?}", error)); + match frame.call_type { + CallType::Create | CallType::Create2 => frame.to = None, + _ => (), + } + } + } + + self.call_stack.last_mut().unwrap().calls.push(frame); + } + + fn update_gas_from_snapshot(&mut self, snapshot: Option) { + if let Some(snapshot) = snapshot { + if let Some(frame) = self.call_stack.last_mut() { + frame.gas = snapshot.gas_limit; + frame.gas_used = snapshot.used_gas + snapshot.memory_gas; + } + } + } + + #[cfg(feature = "serde")] + pub fn serializable(mut self) -> Option { + if self.call_stack.len() != 1 { + // If there is more than one element in `call_stack` then it must mean the trace did not complete + // because there is only 1 top-level call. Note: additional frames are added as new scopes are entered, + // but then the frames are coalesced as those scopes are existed. + return None; + } + + Some(self.call_stack.pop().unwrap().into()) + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum CallType { + Call, + StaticCall, + DelegateCall, + CallCode, + Create, + Create2, + SelfDestruct, +} + +impl AsRef for CallType { + fn as_ref(&self) -> &str { + match self { + Self::Call => "CALL", + Self::StaticCall => "STATICCALL", + Self::DelegateCall => "DELEGATECALL", + Self::CallCode => "CALLCODE", + Self::Create => "CREATE", + Self::Create2 => "CREATE2", + Self::SelfDestruct => "SELFDESTRUCT", + } + } +} + +impl evm_gasometer::tracing::EventListener for CallTracer { + fn event(&mut self, event: evm_gasometer::tracing::Event) { + match event { + // RecordRefund always comes at the end of an internal transaction and has all the gas information we need. + evm_gasometer::tracing::Event::RecordRefund { + refund: _, + snapshot, + } => self.update_gas_from_snapshot(snapshot), + + // Not useful + evm_gasometer::tracing::Event::RecordCost { .. } => (), + evm_gasometer::tracing::Event::RecordDynamicCost { .. } => (), + evm_gasometer::tracing::Event::RecordStipend { .. } => (), + evm_gasometer::tracing::Event::RecordTransaction { .. } => (), + } + } +} + +impl evm_runtime::tracing::EventListener for CallTracer { + fn event(&mut self, _event: evm_runtime::tracing::Event) {} +} + +impl evm::tracing::EventListener for CallTracer { + fn event(&mut self, event: evm::tracing::Event) { + match event { + evm::tracing::Event::Call { + code_address, + transfer, + input, + target_gas, + is_static, + context, + } => { + let call_type = if is_static { + CallType::StaticCall + } else if transfer.is_none() { + CallType::DelegateCall + } else if code_address == context.address { + CallType::Call + } else { + CallType::CallCode + }; + + self.enter( + call_type, + Address::new(context.caller), + Address::new(context.address), + input.to_vec(), + target_gas.unwrap_or_default(), + context.apparent_value, + ); + } + evm::tracing::Event::Create { + caller, + address, + scheme, + value, + init_code, + target_gas, + } => { + let call_type = match scheme { + evm::CreateScheme::Legacy { .. } => CallType::Create, + evm::CreateScheme::Create2 { .. } => CallType::Create2, + evm::CreateScheme::Fixed(_) => CallType::Create, // is this even possible in production? + }; + + self.enter( + call_type, + Address::new(caller), + Address::new(address), + init_code.to_vec(), + target_gas.unwrap_or_default(), + value, + ); + } + evm::tracing::Event::Suicide { + address, + target, + balance, + } => { + // TODO: gas = 0 is right? + self.enter( + CallType::SelfDestruct, + Address::new(address), + Address::new(target), + Vec::new(), + 0, + balance, + ); + self.exit(Vec::new(), None); + } + // Exit event always comes after RecordRefund, so we don't need to worry about gas here (it's handled in RecordRefund) + evm::tracing::Event::Exit { + reason, + return_value, + } => { + let error = match reason { + evm::ExitReason::Succeed(_) => None, + other => Some(other), + }; + self.exit(return_value.to_vec(), error); + } + + // not useful + evm::tracing::Event::PrecompileSubcall { .. } => (), + evm::tracing::Event::TransactCall { .. } => (), + evm::tracing::Event::TransactCreate { .. } => (), + evm::tracing::Event::TransactCreate2 { .. } => (), + } + } +} + +#[cfg(feature = "serde")] +#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)] +pub struct SerializableCallFrame { + #[serde(rename = "type")] + call_type: String, + from: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + to: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + value: Option, + gas: String, + #[serde(rename = "gasUsed")] + gas_used: String, + input: String, + output: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + error: Option, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + calls: Vec, +} + +#[cfg(feature = "serde")] +impl From for SerializableCallFrame { + fn from(frame: CallFrame) -> Self { + let value = if frame.value.is_zero() { + None + } else { + let value = frame.value; + Some(format!("0x{value:x}")) + }; + + let gas = frame.gas; + let gas_used = frame.gas_used; + Self { + call_type: frame.call_type.as_ref().into(), + from: format!("0x{}", frame.from.encode()), + to: frame.to.map(|addr| format!("0x{}", addr.encode())), + value, + gas: format!("0x{gas:x}"), + gas_used: format!("0x{gas_used:x}"), + input: format!("0x{}", hex::encode(&frame.input)), + output: format!("0x{}", hex::encode(&frame.output)), + error: frame.error, + calls: frame.calls.into_iter().map(Into::into).collect(), + } + } +} diff --git a/engine-standalone-tracing/src/types.rs b/engine-standalone-tracing/src/types/mod.rs similarity index 99% rename from engine-standalone-tracing/src/types.rs rename to engine-standalone-tracing/src/types/mod.rs index abbe2d772..93495b43a 100644 --- a/engine-standalone-tracing/src/types.rs +++ b/engine-standalone-tracing/src/types/mod.rs @@ -5,6 +5,8 @@ use evm_core::Opcode; use serde::{Deserialize, Serialize}; use std::ops::Index; +pub mod call_tracer; + /// Depth of a log. #[derive(Debug, Clone, Copy, Default, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] diff --git a/engine-tests/Cargo.toml b/engine-tests/Cargo.toml index fd91499eb..b74330172 100644 --- a/engine-tests/Cargo.toml +++ b/engine-tests/Cargo.toml @@ -13,6 +13,8 @@ publish = false autobenches = false [dependencies] + +[dev-dependencies] aurora-engine = { path = "../engine", default-features = false, features = ["std", "tracing"] } aurora-engine-types = { path = "../engine-types", default-features = false, features = ["std"] } aurora-engine-sdk = { path = "../engine-sdk", default-features = false, features = ["std"] } @@ -20,28 +22,26 @@ aurora-engine-precompiles = { path = "../engine-precompiles", default-features = aurora-engine-transactions = { path = "../engine-transactions", default-features = false, features = ["std"] } engine-standalone-storage = { path = "../engine-standalone-storage" } engine-standalone-tracing = { path = "../engine-standalone-tracing" } -borsh = { version = "0.8.2", default-features = false } -sha3 = { version = "0.9.1", default-features = false } -evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std", "tracing"] } -evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std", "tracing"] } -evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false, features = ["std", "tracing"] } +borsh = { version = "0.9.3", default-features = false } +sha3 = { version = "0.10.2", default-features = false } +evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std", "tracing"] } +evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std", "tracing"] } +evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false, features = ["std", "tracing"] } rlp = { version = "0.5.0", default-features = false } - -[dev-dependencies] base64 = "0.13.0" bstr = "0.2" byte-slice-cast = { version = "1.0", default-features = false } -ethabi = { git = "https://github.com/darwinia-network/ethabi", branch = "xavier-no-std" } +ethabi = "17.1" serde = { version = "1", features = ["derive"] } serde_json = "1" hex = { version = "0.4.3", default-features = false } -near-sdk = { git = "https://github.com/aurora-is-near/near-sdk-rs.git", rev = "ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07" } -near-sdk-sim = { git = "https://github.com/aurora-is-near/near-sdk-rs.git", rev = "ba2eddbfbf4484ac3e44b4c8119bbac4907d6e07" } +near-sdk = { git = "https://github.com/aurora-is-near/near-sdk-rs.git", rev = "7a3fa3fbff84b712050370d840297df38c925d2d" } +near-sdk-sim = { git = "https://github.com/aurora-is-near/near-sdk-rs.git", rev = "7a3fa3fbff84b712050370d840297df38c925d2d" } near-crypto = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda" } -near-vm-runner = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda", default-features = false, features = [ "wasmer2_vm" ] } -near-vm-logic = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda" } -near-primitives-core = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda" } -near-primitives = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda" } +near-vm-runner = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda", default-features = false, features = [ "wasmer2_vm", "protocol_feature_alt_bn128" ] } +near-vm-logic = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda", default-features = false, features = [ "protocol_feature_alt_bn128" ] } +near-primitives-core = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda", features = [ "protocol_feature_alt_bn128" ] } +near-primitives = { git = "https://github.com/birchmd/nearcore.git", rev = "980bc48dc02878fea1e0dbc5812ae7de49f12dda", default-features = false, features = [ "nightly_protocol" ] } libsecp256k1 = { version = "0.7.0", default-features = false } rand = "0.8.5" criterion = "0.3.4" @@ -50,7 +50,6 @@ tempfile = "3.2.0" walrus = "0.19" [features] -meta-call = ["aurora-engine/meta-call"] -mainnet-test = ["aurora-engine/mainnet-test", "meta-call"] -testnet-test = ["aurora-engine/testnet-test", "meta-call"] +mainnet-test = [] +testnet-test = [] error_refund = ["aurora-engine/error_refund", "aurora-engine-precompiles/error_refund"] diff --git a/engine-tests/src/test_utils/erc20.rs b/engine-tests/src/test_utils/erc20.rs index 22ef14d69..be0b8c893 100644 --- a/engine-tests/src/test_utils/erc20.rs +++ b/engine-tests/src/test_utils/erc20.rs @@ -1,5 +1,6 @@ use crate::prelude::{transactions::legacy::TransactionLegacy, Address, U256}; use crate::test_utils::solidity; +use aurora_engine_transactions::NormalizedEthTransaction; use std::path::{Path, PathBuf}; use std::sync::Once; @@ -114,6 +115,34 @@ impl ERC20 { } } + pub fn transfer_from( + &self, + from: Address, + to: Address, + amount: U256, + nonce: U256, + ) -> TransactionLegacy { + let data = self + .0 + .abi + .function("transferFrom") + .unwrap() + .encode_input(&[ + ethabi::Token::Address(from.raw()), + ethabi::Token::Address(to.raw()), + ethabi::Token::Uint(amount), + ]) + .unwrap(); + TransactionLegacy { + nonce, + gas_price: Default::default(), + gas_limit: u64::MAX.into(), + to: Some(self.0.address), + value: Default::default(), + data, + } + } + pub fn approve(&self, spender: Address, amount: U256, nonce: U256) -> TransactionLegacy { let data = self .0 @@ -153,3 +182,18 @@ impl ERC20 { } } } + +pub(crate) fn legacy_into_normalized_tx(tx: TransactionLegacy) -> NormalizedEthTransaction { + NormalizedEthTransaction { + address: Default::default(), + chain_id: None, + nonce: tx.nonce, + gas_limit: tx.gas_limit, + max_priority_fee_per_gas: tx.gas_price, + max_fee_per_gas: tx.gas_price, + to: tx.to, + value: tx.value, + data: tx.data, + access_list: Vec::new(), + } +} diff --git a/engine-tests/src/test_utils/mod.rs b/engine-tests/src/test_utils/mod.rs index 901cd0aa1..6ed7188a4 100644 --- a/engine-tests/src/test_utils/mod.rs +++ b/engine-tests/src/test_utils/mod.rs @@ -1,6 +1,6 @@ use aurora_engine::parameters::ViewCallArgs; use aurora_engine_types::account_id::AccountId; -use aurora_engine_types::types::NEP141Wei; +use aurora_engine_types::types::{NEP141Wei, PromiseResult}; use borsh::{BorshDeserialize, BorshSerialize}; use libsecp256k1::{self, Message, PublicKey, SecretKey}; use near_primitives::runtime::config_store::RuntimeConfigStore; @@ -87,6 +87,9 @@ pub(crate) struct AuroraRunner { // Use the standalone in parallel if set. This allows checking both // implementations give the same results. pub standalone_runner: Option, + // Empty by default. Can be set in tests if the transaction should be + // executed as if it was a callback. + pub promise_results: Vec, } /// Same as `AuroraRunner`, but consumes `self` on execution (thus preventing building on @@ -188,6 +191,17 @@ impl AuroraRunner { input, ); + let vm_promise_results: Vec<_> = self + .promise_results + .iter() + .map(|p| match p { + PromiseResult::Failed => near_vm_logic::types::PromiseResult::Failed, + PromiseResult::NotReady => near_vm_logic::types::PromiseResult::NotReady, + PromiseResult::Successful(bytes) => { + near_vm_logic::types::PromiseResult::Successful(bytes.clone()) + } + }) + .collect(); let (maybe_outcome, maybe_error) = match near_vm_runner::run( &self.code, method_name, @@ -195,7 +209,7 @@ impl AuroraRunner { self.context.clone(), &self.wasm_config, &self.fees_config, - &[], + &vm_promise_results, self.current_protocol_version, Some(&self.cache), ) { @@ -212,7 +226,7 @@ impl AuroraRunner { && (method_name == SUBMIT || method_name == CALL || method_name == DEPLOY_ERC20) { standalone_runner - .submit_raw(method_name, &self.context) + .submit_raw(method_name, &self.context, &self.promise_results) .unwrap(); self.validate_standalone(); } @@ -520,9 +534,9 @@ impl Default for AuroraRunner { fn default() -> Self { let aurora_account_id = "aurora".to_string(); let evm_wasm_bytes = if cfg!(feature = "mainnet-test") { - std::fs::read("../mainnet-test.wasm").unwrap() + std::fs::read("../bin/aurora-mainnet-test.wasm").unwrap() } else if cfg!(feature = "testnet-test") { - std::fs::read("../testnet-test.wasm").unwrap() + std::fs::read("../bin/aurora-testnet-test.wasm").unwrap() } else { panic!("AuroraRunner requires mainnet-test or testnet-test feature enabled.") }; @@ -561,6 +575,7 @@ impl Default for AuroraRunner { current_protocol_version: u32::MAX, previous_logs: Default::default(), standalone_runner: None, + promise_results: Vec::new(), } } } @@ -846,3 +861,11 @@ pub fn assert_gas_bound(total_gas: u64, tgas_bound: u64) { tgas_bound, ); } + +/// Returns true if `abs(a - b) / max(a, b) <= x / 100`. The implementation is written differently than +/// this simpler formula to avoid floating point arithmetic. +pub fn within_x_percent(x: u64, a: u64, b: u64) -> bool { + let (larger, smaller) = if a < b { (b, a) } else { (a, b) }; + + (100 / x) * (larger - smaller) <= larger +} diff --git a/engine-tests/src/test_utils/rust.rs b/engine-tests/src/test_utils/rust.rs index d02569be0..ce10882df 100644 --- a/engine-tests/src/test_utils/rust.rs +++ b/engine-tests/src/test_utils/rust.rs @@ -4,6 +4,7 @@ use std::process::Command; pub fn compile>(source_path: P) { let output = Command::new("cargo") .current_dir(source_path) + .env("RUSTFLAGS", "-C link-arg=-s") .args(&["build", "--target", "wasm32-unknown-unknown", "--release"]) .output() .unwrap(); diff --git a/engine-tests/src/test_utils/solidity.rs b/engine-tests/src/test_utils/solidity.rs index 53434a2ae..4ec333134 100644 --- a/engine-tests/src/test_utils/solidity.rs +++ b/engine-tests/src/test_utils/solidity.rs @@ -192,8 +192,10 @@ where ]) .output() .unwrap(); - println!("{}", String::from_utf8(output.stdout).unwrap()); if !output.status.success() { - panic!("{}", String::from_utf8(output.stderr).unwrap()); + panic!( + "Could not compile solidity contracts in docker: {}", + String::from_utf8(output.stderr).unwrap() + ); } } diff --git a/engine-tests/src/test_utils/standalone/mocks/promise.rs b/engine-tests/src/test_utils/standalone/mocks/promise.rs index bf9d70b57..a201d1996 100644 --- a/engine-tests/src/test_utils/standalone/mocks/promise.rs +++ b/engine-tests/src/test_utils/standalone/mocks/promise.rs @@ -32,6 +32,8 @@ impl PromiseTracker { } impl PromiseHandler for PromiseTracker { + type ReadOnly = Self; + fn promise_results_count(&self) -> u64 { self.promise_results.len() as u64 } @@ -73,4 +75,13 @@ impl PromiseHandler for PromiseTracker { fn promise_return(&mut self, promise: PromiseId) { self.returned_promise = Some(promise); } + + fn read_only(&self) -> Self::ReadOnly { + Self { + internal_index: 0, + promise_results: self.promise_results.clone(), + scheduled_promises: Default::default(), + returned_promise: Default::default(), + } + } } diff --git a/engine-tests/src/test_utils/standalone/mod.rs b/engine-tests/src/test_utils/standalone/mod.rs index b762f60b4..85e9baeac 100644 --- a/engine-tests/src/test_utils/standalone/mod.rs +++ b/engine-tests/src/test_utils/standalone/mod.rs @@ -2,7 +2,7 @@ use aurora_engine::engine; use aurora_engine::parameters::{CallArgs, DeployErc20TokenArgs, SubmitResult, TransactionStatus}; use aurora_engine_sdk::env::{self, Env}; use aurora_engine_transactions::legacy::{LegacyEthSignedTransaction, TransactionLegacy}; -use aurora_engine_types::types::{Address, NearGas, Wei}; +use aurora_engine_types::types::{Address, NearGas, PromiseResult, Wei}; use aurora_engine_types::{H256, U256}; use borsh::BorshDeserialize; use engine_standalone_storage::{ @@ -43,7 +43,7 @@ impl StandaloneRunner { .unwrap(); env.block_height += 1; let transaction_hash = H256::zero(); - let tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash); + let tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash, &[]); let result = storage.with_engine_access(env.block_height, 0, &[], |io| { mocks::init_evm(io, env, chain_id); }); @@ -77,7 +77,7 @@ impl StandaloneRunner { }; env.block_height += 1; - let tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash); + let tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash, &[]); let result = storage.with_engine_access(env.block_height, 0, &[], |io| { mocks::mint_evm_account(address, balance, nonce, code, io, env) @@ -126,6 +126,7 @@ impl StandaloneRunner { storage, env, &mut self.cumulative_diff, + &[], ) } @@ -144,6 +145,7 @@ impl StandaloneRunner { storage, env, &mut self.cumulative_diff, + &[], ) } @@ -161,7 +163,7 @@ impl StandaloneRunner { let transaction_bytes = rlp::encode(signed_tx).to_vec(); let transaction_hash = aurora_engine_sdk::keccak(&transaction_bytes); - let mut tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash); + let mut tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash, &[]); tx_msg.position = transaction_position; tx_msg.transaction = TransactionKind::Submit(transaction_bytes.as_slice().try_into().unwrap()); @@ -182,6 +184,7 @@ impl StandaloneRunner { &mut self, method_name: &str, ctx: &near_vm_logic::VMContext, + promise_results: &[PromiseResult], ) -> Result { let mut env = self.env.clone(); env.block_height = ctx.block_index; @@ -201,11 +204,13 @@ impl StandaloneRunner { storage, &mut env, &mut self.cumulative_diff, + promise_results, ) } else if method_name == test_utils::CALL { let call_args = CallArgs::try_from_slice(&ctx.input).unwrap(); let transaction_hash = aurora_engine_sdk::keccak(&ctx.input); - let mut tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash); + let mut tx_msg = + Self::template_tx_msg(storage, &env, 0, transaction_hash, promise_results); tx_msg.transaction = TransactionKind::Call(call_args); let outcome = sync::execute_transaction_message(storage, tx_msg).unwrap(); @@ -216,7 +221,8 @@ impl StandaloneRunner { } else if method_name == test_utils::DEPLOY_ERC20 { let deploy_args = DeployErc20TokenArgs::try_from_slice(&ctx.input).unwrap(); let transaction_hash = aurora_engine_sdk::keccak(&ctx.input); - let mut tx_msg = Self::template_tx_msg(storage, &env, 0, transaction_hash); + let mut tx_msg = + Self::template_tx_msg(storage, &env, 0, transaction_hash, promise_results); tx_msg.transaction = TransactionKind::DeployErc20(deploy_args); let outcome = sync::execute_transaction_message(storage, tx_msg).unwrap(); @@ -275,6 +281,7 @@ impl StandaloneRunner { env: &env::Fixed, transaction_position: u16, transaction_hash: H256, + promise_results: &[PromiseResult], ) -> TransactionMessage { let block_hash = mocks::compute_block_hash(env.block_height); let block_metadata = BlockMetadata { @@ -284,6 +291,13 @@ impl StandaloneRunner { storage .set_block_data(block_hash, env.block_height, block_metadata) .unwrap(); + let promise_data = promise_results + .iter() + .map(|p| match p { + PromiseResult::Failed | PromiseResult::NotReady => None, + PromiseResult::Successful(bytes) => Some(bytes.clone()), + }) + .collect(); TransactionMessage { block_hash, near_receipt_id: transaction_hash, @@ -293,6 +307,7 @@ impl StandaloneRunner { caller: env.predecessor_account_id(), attached_near: env.attached_deposit, transaction: TransactionKind::Unknown, + promise_data, } } @@ -302,10 +317,16 @@ impl StandaloneRunner { storage: &'db mut Storage, env: &mut env::Fixed, cumulative_diff: &mut Diff, + promise_results: &[PromiseResult], ) -> Result { let transaction_hash = aurora_engine_sdk::keccak(&transaction_bytes); - let mut tx_msg = - Self::template_tx_msg(storage, env, transaction_position, transaction_hash); + let mut tx_msg = Self::template_tx_msg( + storage, + env, + transaction_position, + transaction_hash, + promise_results, + ); tx_msg.transaction = TransactionKind::Submit(transaction_bytes.try_into().unwrap()); let outcome = sync::execute_transaction_message(storage, tx_msg).unwrap(); diff --git a/engine-tests/src/test_utils/standard_precompiles.rs b/engine-tests/src/test_utils/standard_precompiles.rs index 1468bc0a0..bf85dcdb8 100644 --- a/engine-tests/src/test_utils/standard_precompiles.rs +++ b/engine-tests/src/test_utils/standard_precompiles.rs @@ -49,8 +49,7 @@ impl PrecompilesContract { "test_modexp", "test_ecadd", "test_ecmul", - // TODO(#46): ecpair uses up all the gas (by itself) for some reason, need to look into this. - // "test_ecpair", + "test_ecpair", "test_blake2f", "test_all", ] diff --git a/engine-tests/src/test_utils/uniswap.rs b/engine-tests/src/test_utils/uniswap.rs index 88a42d848..cacb15285 100644 --- a/engine-tests/src/test_utils/uniswap.rs +++ b/engine-tests/src/test_utils/uniswap.rs @@ -392,7 +392,7 @@ fn load_constructor(artifact_path: PathBuf) -> solidity::ContractConstructor { } fn uniswap_root_path() -> PathBuf { - Path::new("..").join("etc").join("uniswap") + Path::new("../etc").join("tests").join("uniswap") } fn download_uniswap_artifacts() { diff --git a/engine-tests/src/tests/erc20.rs b/engine-tests/src/tests/erc20.rs index ff628eb08..b5de18747 100644 --- a/engine-tests/src/tests/erc20.rs +++ b/engine-tests/src/tests/erc20.rs @@ -54,9 +54,7 @@ fn erc20_mint_out_of_gas() { let mut mint_tx = contract.mint(dest_address, mint_amount.into(), nonce.into()); // not enough gas to cover intrinsic cost - let intrinsic_gas = mint_tx - .clone() - .normalize() + let intrinsic_gas = test_utils::erc20::legacy_into_normalized_tx(mint_tx.clone()) .intrinsic_gas(&evm::Config::istanbul()) .unwrap(); mint_tx.gas_limit = (intrinsic_gas - 1).into(); @@ -107,7 +105,7 @@ fn profile_erc20_get_balance() { runner.profiled_view_call(test_utils::as_view_call(balance_tx, source_address)); assert!(result.is_ok()); - // call costs less than 3 Tgas + // call costs less than 2 Tgas test_utils::assert_gas_bound(profile.all_gas(), 2); // at least 70% of the cost is spent on wasm computation (as opposed to host functions) let wasm_fraction = (100 * profile.wasm_gas()) / profile.all_gas(); @@ -213,9 +211,7 @@ fn deploy_erc_20_out_of_gas() { let mut deploy_transaction = constructor.deploy("OutOfGas", "OOG", INITIAL_NONCE.into()); // not enough gas to cover intrinsic cost - let intrinsic_gas = deploy_transaction - .clone() - .normalize() + let intrinsic_gas = test_utils::erc20::legacy_into_normalized_tx(deploy_transaction.clone()) .intrinsic_gas(&evm::Config::istanbul()) .unwrap(); deploy_transaction.gas_limit = (intrinsic_gas - 1).into(); diff --git a/engine-tests/src/tests/erc20_connector.rs b/engine-tests/src/tests/erc20_connector.rs index be83cac26..2e438b15c 100644 --- a/engine-tests/src/tests/erc20_connector.rs +++ b/engine-tests/src/tests/erc20_connector.rs @@ -391,7 +391,7 @@ fn test_transfer_erc20_token() { // Simulation tests for exit to NEAR precompile. // Note: `AuroraRunner` is not suitable for these tests because // it does not execute promises; but `near-sdk-sim` does. -mod sim_tests { +pub mod sim_tests { use crate::prelude::{Wei, WeiU256, U256}; use crate::test_utils; use crate::test_utils::erc20::{ERC20Constructor, ERC20}; @@ -800,7 +800,7 @@ mod sim_tests { .assert_success(); } - fn transfer_nep_141_to_erc_20( + pub(crate) fn transfer_nep_141_to_erc_20( nep_141: &near_sdk_sim::UserAccount, erc20: &ERC20, source: &near_sdk_sim::UserAccount, @@ -865,7 +865,7 @@ mod sim_tests { U256::from_big_endian(&test_utils::unwrap_success(submit_result)) } - fn deploy_erc20_from_nep_141( + pub(crate) fn deploy_erc20_from_nep_141( nep_141: &near_sdk_sim::UserAccount, aurora: &AuroraAccount, ) -> ERC20 { @@ -879,7 +879,7 @@ mod sim_tests { ERC20(crate::test_utils::solidity::DeployedContract { abi, address }) } - fn nep_141_balance_of( + pub fn nep_141_balance_of( account_id: &str, nep_141: &near_sdk_sim::UserAccount, aurora: &AuroraAccount, @@ -902,7 +902,7 @@ mod sim_tests { /// Deploys the standard FT implementation: /// https://github.com/near/near-sdk-rs/blob/master/examples/fungible-token/ft/src/lib.rs - fn deploy_nep_141( + pub fn deploy_nep_141( nep_141_account_id: &str, token_owner: &str, amount: u128, diff --git a/engine-tests/src/tests/eth_connector.rs b/engine-tests/src/tests/eth_connector.rs index ac6aa69ec..9b1a2a4d8 100644 --- a/engine-tests/src/tests/eth_connector.rs +++ b/engine-tests/src/tests/eth_connector.rs @@ -1483,7 +1483,9 @@ fn test_ft_transfer_wrong_u128_json_type() { /// Bytes for a NEAR smart contract implementing `ft_on_transfer` fn dummy_ft_receiver_bytes() -> Vec { - let base_path = std::path::Path::new("../etc").join("ft-receiver"); + let base_path = std::path::Path::new("../etc") + .join("tests") + .join("ft-receiver"); let output_path = base_path.join("target/wasm32-unknown-unknown/release/ft_receiver.wasm"); crate::test_utils::rust::compile(base_path); std::fs::read(output_path).unwrap() diff --git a/engine-tests/src/tests/mod.rs b/engine-tests/src/tests/mod.rs index 7689f5a0d..720c72019 100644 --- a/engine-tests/src/tests/mod.rs +++ b/engine-tests/src/tests/mod.rs @@ -5,13 +5,14 @@ mod ecrecover; mod eip1559; mod erc20; mod erc20_connector; -mod eth_connector; +pub mod eth_connector; mod ghsa_3p69_m8gg_fwmf; #[cfg(feature = "meta-call")] mod meta_parsing; mod multisender; mod one_inch; mod prepaid_gas_precompile; +mod promise_results_precompile; mod random; mod repro; pub(crate) mod sanity; @@ -20,3 +21,4 @@ mod standalone; mod standard_precompiles; mod state_migration; pub(crate) mod uniswap; +mod xcc; diff --git a/engine-tests/src/tests/promise_results_precompile.rs b/engine-tests/src/tests/promise_results_precompile.rs new file mode 100644 index 000000000..f85afbcbe --- /dev/null +++ b/engine-tests/src/tests/promise_results_precompile.rs @@ -0,0 +1,141 @@ +use crate::test_utils::{self, standalone}; +use aurora_engine_precompiles::promise_result::{self, costs}; +use aurora_engine_transactions::legacy::TransactionLegacy; +use aurora_engine_types::{ + types::{Address, EthGas, NearGas, PromiseResult, Wei}, + U256, +}; +use borsh::BorshSerialize; + +const NEAR_GAS_PER_EVM: u64 = 175_000_000; + +#[test] +fn test_promise_results_precompile() { + let mut signer = test_utils::Signer::random(); + let mut runner = test_utils::deploy_evm(); + + let mut standalone = standalone::StandaloneRunner::default(); + standalone.init_evm(); + + let promise_results = vec![ + PromiseResult::Successful(hex::decode("deadbeef").unwrap()), + PromiseResult::Failed, + ]; + + let transaction = TransactionLegacy { + nonce: signer.use_nonce().into(), + gas_price: U256::zero(), + gas_limit: u64::MAX.into(), + to: Some(promise_result::ADDRESS), + value: Wei::zero(), + data: Vec::new(), + }; + + runner.promise_results = promise_results.clone(); + let result = runner + .submit_transaction(&signer.secret_key, transaction.clone()) + .unwrap(); + + let standalone_result = standalone + .submit_raw("submit", &runner.context, &promise_results) + .unwrap(); + + assert_eq!(result, standalone_result); + + assert_eq!( + test_utils::unwrap_success(result), + promise_results.try_to_vec().unwrap(), + ); +} + +#[test] +fn test_promise_result_gas_cost() { + let mut runner = test_utils::deploy_evm(); + let mut standalone = standalone::StandaloneRunner::default(); + standalone.init_evm(); + runner.standalone_runner = Some(standalone); + let mut signer = test_utils::Signer::random(); + runner.context.block_index = aurora_engine::engine::ZERO_ADDRESS_FIX_HEIGHT + 1; + + // Baseline transaction that does essentially nothing. + let (_, baseline) = runner + .submit_with_signer_profiled(&mut signer, |nonce| TransactionLegacy { + nonce, + gas_price: U256::zero(), + gas_limit: u64::MAX.into(), + to: Some(Address::from_array([0; 20])), + value: Wei::zero(), + data: Vec::new(), + }) + .unwrap(); + + let mut profile_for_promises = |promise_data: Vec| -> (u64, u64, u64) { + let input_length: usize = promise_data.iter().map(|p| p.size()).sum(); + runner.promise_results = promise_data; + let (submit_result, profile) = runner + .submit_with_signer_profiled(&mut signer, |nonce| TransactionLegacy { + nonce, + gas_price: U256::zero(), + gas_limit: u64::MAX.into(), + to: Some(promise_result::ADDRESS), + value: Wei::zero(), + data: Vec::new(), + }) + .unwrap(); + assert!(submit_result.status.is_ok()); + // Subtract off baseline transaction to isolate just precompile things + ( + u64::try_from(input_length).unwrap(), + profile.all_gas() - baseline.all_gas(), + submit_result.gas_used, + ) + }; + + let promise_results = vec![ + PromiseResult::Successful(hex::decode("deadbeef").unwrap()), + PromiseResult::Failed, + PromiseResult::Successful(vec![1u8; 100]), + ]; + + let (x1, y1, evm1) = profile_for_promises(Vec::new()); + let (x2, y2, evm2) = profile_for_promises(promise_results); + + let cost_per_byte = (y2 - y1) / (x2 - x1); + let base_cost = NearGas::new(y1 - cost_per_byte * x1); + + let base_cost = EthGas::new(base_cost.as_u64() / NEAR_GAS_PER_EVM); + let cost_per_byte = cost_per_byte / NEAR_GAS_PER_EVM; + + assert!( + test_utils::within_x_percent( + 5, + base_cost.as_u64(), + costs::PROMISE_RESULT_BASE_COST.as_u64() + ), + "Incorrect promise_result base cost. Expected: {} Actual: {}", + base_cost, + costs::PROMISE_RESULT_BASE_COST + ); + + assert!( + test_utils::within_x_percent(5, cost_per_byte, costs::PROMISE_RESULT_BYTE_COST.as_u64()), + "Incorrect promise_result per byte cost. Expected: {} Actual: {}", + cost_per_byte, + costs::PROMISE_RESULT_BYTE_COST + ); + + let total_gas1 = y1 + baseline.all_gas(); + let total_gas2 = y2 + baseline.all_gas(); + assert!( + test_utils::within_x_percent(6, evm1, total_gas1 / NEAR_GAS_PER_EVM), + "Incorrect EVM gas used. Expected: {} Actual: {}", + evm1, + total_gas1 / NEAR_GAS_PER_EVM + ); + assert!( + test_utils::within_x_percent(6, evm2, total_gas2 / NEAR_GAS_PER_EVM), + "Incorrect EVM gas used. Expected: {} Actual: {}", + evm2, + total_gas2 / NEAR_GAS_PER_EVM + ); +} diff --git a/engine-tests/src/tests/repro.rs b/engine-tests/src/tests/repro.rs index 27154587d..d8d628b8a 100644 --- a/engine-tests/src/tests/repro.rs +++ b/engine-tests/src/tests/repro.rs @@ -27,7 +27,7 @@ fn repro_GdASJ3KESs() { block_timestamp: 1645717564644206730, input_path: "src/tests/res/input_GdASJ3KESs.hex", evm_gas_used: 706713, - near_gas_used: 133, + near_gas_used: 132, }); } @@ -52,7 +52,7 @@ fn repro_8ru7VEA() { block_timestamp: 1648829935343349589, input_path: "src/tests/res/input_8ru7VEA.hex", evm_gas_used: 1732181, - near_gas_used: 242, + near_gas_used: 240, }); } @@ -72,7 +72,7 @@ fn repro_FRcorNv() { block_timestamp: 1650960438774745116, input_path: "src/tests/res/input_FRcorNv.hex", evm_gas_used: 1239721, - near_gas_used: 198, + near_gas_used: 196, }); } @@ -89,7 +89,7 @@ fn repro_5bEgfRQ() { block_timestamp: 1651073772931594646, input_path: "src/tests/res/input_5bEgfRQ.hex", evm_gas_used: 6_414_105, - near_gas_used: 720, + near_gas_used: 695, }); } @@ -107,7 +107,7 @@ fn repro_D98vwmi() { block_timestamp: 1651753443421003245, input_path: "src/tests/res/input_D98vwmi.hex", evm_gas_used: 1_035_348, - near_gas_used: 199, + near_gas_used: 198, }); } @@ -152,7 +152,9 @@ fn repro_common<'a>(context: ReproContext<'a>) { .set_engine_account_id(&"aurora".parse().unwrap()) .unwrap(); json_snapshot::initialize_engine_state(&mut standalone.storage, snapshot).unwrap(); - let standalone_result = standalone.submit_raw("submit", &runner.context).unwrap(); + let standalone_result = standalone + .submit_raw("submit", &runner.context, &[]) + .unwrap(); assert_eq!( submit_result.try_to_vec().unwrap(), standalone_result.try_to_vec().unwrap() diff --git a/engine-tests/src/tests/res/w_near.wasm b/engine-tests/src/tests/res/w_near.wasm new file mode 100755 index 0000000000000000000000000000000000000000..4c45e3d87b16d0828f81e383f45c5dd4e04f1080 GIT binary patch literal 191379 zcmeFa3!Gh5dH=mH=QeZZ%xsX@C^YUlr0t}JHny0g)Yj~&NLp>HeyD%metcg@AqvAS zCPDFifebK&sHjmT%QdPv}fnQLSopTGJk?QF;?Nz#;JMp9AL-l^Q5bD+NAxK}#hnv{1u~ zJE~lA2`#pHhYPMCL3oqr)`g=0H4H;N1srbl&@M*Y%MNT;XxG*{fC@5x1drZxfI4L8 zBe_IWPp$V3f7O^?a-C4l4duEO2vm3Qx@v-4|AeOfvzJ3DxHPt1WMrW|`}I`giMoup zC9fD+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fvJ}gmK5YkPTA2cqo>gm)r!QFHLpnF5r1B;HL z(!ru9Xrd9LC^SfyipoTqB8D%>3~DOsMPoo4(X2NF1{zG@s#WiF2&^_V$gma0olPzq zGS8l#XJO}^lFlB9pu*#EPji$CkH-B?2z9cirLEkeLRnJBw-AsY$$pzKHqrh7Y|k z?c|6N&hU{B?s#}4cgQx%{@%l*xKG1Jb0`}C=Y#~nUAQ+OOkG;=QVJ62Okldk zK%otvPRVs9LF;!iS~U*lJDOUWqs3U%O%OWqebDlP5QKWg z@CnFO5cH^b7s15;K+VR3=q)(X6}g<^@6mH2YN?Ba{q`~B&k6UN<8-t6` z9F2TWvAv!*-GuM%CI)~j@Yy0Yq=B#DMN?DOsyyF}4>5}RH%wHK=G3C-CyK=j=YW?1 z*DztMiJnZOw!mAvhz`|r0le@tdL7ijuRv)!UJ8sfuwF6 P)N#gABbQTkf&2deUqTVv literal 0 HcmV?d00001 diff --git a/engine-tests/src/tests/sanity.rs b/engine-tests/src/tests/sanity.rs index e42cb7725..944b78704 100644 --- a/engine-tests/src/tests/sanity.rs +++ b/engine-tests/src/tests/sanity.rs @@ -96,8 +96,8 @@ fn test_transaction_to_zero_address() { let tx_hex = "f8648080836691b79400000000000000000000000000000000000000008080849c8a82caa0464cada9d6a907f5537dcc0f95274a30ddaeff33276e9b3993815586293a2010a07626bd794381ba59f30e26ec6f3448d19f63bb12dcda19acda429b2fb7d3dfba"; let tx_bytes = hex::decode(tx_hex).unwrap(); let tx = aurora_engine_transactions::EthTransactionKind::try_from(tx_bytes.as_slice()).unwrap(); - let normalized_tx = aurora_engine_transactions::NormalizedEthTransaction::from(tx); - let address = normalized_tx.address.as_ref().unwrap(); + let normalized_tx = aurora_engine_transactions::NormalizedEthTransaction::try_from(tx).unwrap(); + let address = normalized_tx.address; let sender = hex::encode(address.as_bytes()); assert_eq!(sender.as_str(), "63eafba871e0bda44be3cde19df5aa1c0f078142"); @@ -110,17 +110,21 @@ fn test_transaction_to_zero_address() { // Prior to the fix the zero address is interpreted as None, causing a contract deployment. // It also incorrectly derives the sender address, so does not increment the right nonce. context.block_index = aurora_engine::engine::ZERO_ADDRESS_FIX_HEIGHT - 1; - let result = runner.submit_raw(test_utils::SUBMIT, &context).unwrap(); + let result = runner + .submit_raw(test_utils::SUBMIT, &context, &[]) + .unwrap(); assert_eq!(result.gas_used, 53_000); runner.env.block_height = aurora_engine::engine::ZERO_ADDRESS_FIX_HEIGHT; - assert_eq!(runner.get_nonce(address), U256::zero()); + assert_eq!(runner.get_nonce(&address), U256::zero()); // After the fix this transaction is simply a transfer of 0 ETH to the zero address context.block_index = aurora_engine::engine::ZERO_ADDRESS_FIX_HEIGHT; - let result = runner.submit_raw(test_utils::SUBMIT, &context).unwrap(); + let result = runner + .submit_raw(test_utils::SUBMIT, &context, &[]) + .unwrap(); assert_eq!(result.gas_used, 21_000); runner.env.block_height = aurora_engine::engine::ZERO_ADDRESS_FIX_HEIGHT + 1; - assert_eq!(runner.get_nonce(address), U256::one()); + assert_eq!(runner.get_nonce(&address), U256::one()); } #[test] @@ -353,7 +357,9 @@ fn test_solidity_pure_bench() { ); // Pure rust version of the same contract - let base_path = std::path::Path::new("../etc").join("benchmark-contract"); + let base_path = std::path::Path::new("../etc") + .join("tests") + .join("benchmark-contract"); let output_path = base_path.join("target/wasm32-unknown-unknown/release/benchmark_contract.wasm"); test_utils::rust::compile(base_path); diff --git a/engine-tests/src/tests/standalone/storage.rs b/engine-tests/src/tests/standalone/storage.rs index 9e5106a8d..b21584da0 100644 --- a/engine-tests/src/tests/standalone/storage.rs +++ b/engine-tests/src/tests/standalone/storage.rs @@ -268,6 +268,7 @@ fn test_transaction_index() { caller: "placeholder.near".parse().unwrap(), attached_near: 0, transaction: TransactionKind::Unknown, + promise_data: Vec::new(), }; let tx_included = engine_standalone_storage::TransactionIncluded { block_hash, diff --git a/engine-tests/src/tests/standalone/sync.rs b/engine-tests/src/tests/standalone/sync.rs index ff1fd1461..6f4252832 100644 --- a/engine-tests/src/tests/standalone/sync.rs +++ b/engine-tests/src/tests/standalone/sync.rs @@ -53,6 +53,7 @@ fn test_consume_deposit_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::Deposit(proof.try_to_vec().unwrap()), + promise_data: Vec::new(), }; let outcome = sync::consume_message( @@ -84,6 +85,7 @@ fn test_consume_deposit_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::FinishDeposit(finish_deposit_args), + promise_data: Vec::new(), }; let outcome = sync::consume_message( @@ -116,6 +118,7 @@ fn test_consume_deposit_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::FtOnTransfer(ft_on_transfer_args), + promise_data: Vec::new(), }; sync::consume_message( @@ -145,6 +148,7 @@ fn test_consume_deploy_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::Deploy(input), + promise_data: Vec::new(), }; sync::consume_message( @@ -196,6 +200,7 @@ fn test_consume_deploy_erc20_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::DeployErc20(args), + promise_data: Vec::new(), }; // Deploy ERC-20 (this would be the flow for bridging a new NEP-141 to Aurora) @@ -233,6 +238,7 @@ fn test_consume_deploy_erc20_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::FtOnTransfer(args), + promise_data: Vec::new(), }; // Mint new tokens (via ft_on_transfer flow, same as the bridge) @@ -289,6 +295,7 @@ fn test_consume_ft_on_transfer_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::FtOnTransfer(args), + promise_data: Vec::new(), }; sync::consume_message( @@ -332,6 +339,7 @@ fn test_consume_call_message() { recipient_address, transfer_amount, )), + promise_data: Vec::new(), }; sync::consume_message( @@ -381,6 +389,7 @@ fn test_consume_submit_message() { caller: runner.env.predecessor_account_id(), attached_near: 0, transaction: sync::types::TransactionKind::Submit(eth_transaction), + promise_data: Vec::new(), }; sync::consume_message( diff --git a/engine-tests/src/tests/standalone/tracing.rs b/engine-tests/src/tests/standalone/tracing.rs index 9d3454de0..0b929b3a5 100644 --- a/engine-tests/src/tests/standalone/tracing.rs +++ b/engine-tests/src/tests/standalone/tracing.rs @@ -74,6 +74,7 @@ fn test_evm_tracing_with_storage() { caller: "system".parse().unwrap(), attached_near: 0, transaction: engine_standalone_storage::sync::types::TransactionKind::Unknown, + promise_data: Vec::new(), }, diff, maybe_result: Ok(None), diff --git a/engine-tests/src/tests/standard_precompiles.rs b/engine-tests/src/tests/standard_precompiles.rs index 3d94293c9..94454ba63 100644 --- a/engine-tests/src/tests/standard_precompiles.rs +++ b/engine-tests/src/tests/standard_precompiles.rs @@ -2,14 +2,22 @@ use crate::prelude::Wei; use crate::test_utils::{ self, standard_precompiles::{PrecompilesConstructor, PrecompilesContract}, - AuroraRunner, Signer, + AuroraRunner, ExecutionProfile, Signer, }; const INITIAL_BALANCE: Wei = Wei::new_u64(1000); const INITIAL_NONCE: u64 = 0; +fn precompile_execution_profile(method: &str) -> ExecutionProfile { + let (mut runner, mut signer, contract) = initialize(); + let (_result, profile) = runner + .submit_with_signer_profiled(&mut signer, |nonce| contract.call_method(method, nonce)) + .unwrap(); + profile +} + #[test] -fn standard_precompiles() { +fn test_standard_precompiles() { let (mut runner, mut signer, contract) = initialize(); let outcome = runner @@ -20,21 +28,57 @@ fn standard_precompiles() { } #[test] -#[ignore] -fn ecpair() { - let (mut runner, mut signer, contract) = initialize(); +fn profile_ecrecover() { + let profile = precompile_execution_profile("test_ecrecover"); + test_utils::assert_gas_bound(profile.all_gas(), 6); +} - // TODO(#46): This should fit into 200 Tgas; we should not need to increase the limit like this. - runner.wasm_config.limit_config.max_gas_burnt = u64::MAX; - let (_result, profile) = runner - .submit_with_signer_profiled(&mut signer, |nonce| { - contract.call_method("test_ecpair", nonce) - }) - .unwrap(); +#[test] +fn profile_sha256() { + let profile = precompile_execution_profile("test_sha256"); + test_utils::assert_gas_bound(profile.all_gas(), 5); +} + +#[test] +fn profile_ripemd160() { + let profile = precompile_execution_profile("test_ripemd160"); + test_utils::assert_gas_bound(profile.all_gas(), 5); +} + +#[test] +fn profile_identity() { + let profile = precompile_execution_profile("test_identity"); + test_utils::assert_gas_bound(profile.all_gas(), 5); +} + +#[test] +fn profile_modexp() { + let profile = precompile_execution_profile("test_modexp"); + test_utils::assert_gas_bound(profile.all_gas(), 7); +} + +#[test] +fn profile_ecadd() { + let profile = precompile_execution_profile("test_ecadd"); + test_utils::assert_gas_bound(profile.all_gas(), 5); +} - // Some day this number should be less than 200 Tgas. - println!("{:?}", profile.all_gas()); - assert!(profile.all_gas() < 200_000_000_000_000); +#[test] +fn profile_ecmul() { + let profile = precompile_execution_profile("test_ecmul"); + test_utils::assert_gas_bound(profile.all_gas(), 6); +} + +#[test] +fn profile_ecpair() { + let profile = precompile_execution_profile("test_ecpair"); + test_utils::assert_gas_bound(profile.all_gas(), 102); +} + +#[test] +fn profile_blake2f() { + let profile = precompile_execution_profile("test_blake2f"); + test_utils::assert_gas_bound(profile.all_gas(), 6); } fn initialize() -> (AuroraRunner, Signer, PrecompilesContract) { diff --git a/engine-tests/src/tests/state_migration.rs b/engine-tests/src/tests/state_migration.rs index 9fdc22599..f96cc7558 100644 --- a/engine-tests/src/tests/state_migration.rs +++ b/engine-tests/src/tests/state_migration.rs @@ -91,7 +91,9 @@ impl AuroraAccount { } fn contract_bytes() -> Vec { - let base_path = Path::new("../etc").join("state-migration-test"); + let base_path = Path::new("../etc") + .join("tests") + .join("state-migration-test"); let output_path = base_path .join("target/wasm32-unknown-unknown/release/aurora_engine_state_migration_test.wasm"); test_utils::rust::compile(base_path); diff --git a/engine-tests/src/tests/uniswap.rs b/engine-tests/src/tests/uniswap.rs index 239ef3c10..8582de8a9 100644 --- a/engine-tests/src/tests/uniswap.rs +++ b/engine-tests/src/tests/uniswap.rs @@ -28,7 +28,7 @@ fn test_uniswap_input_multihop() { let mut context = UniswapTestContext::new("uniswap"); // evm_gas = 970k - // near total gas = 163 Tgas + // near total gas = 122 Tgas let tokens = context.create_tokens(10, MINT_AMOUNT.into()); for (token_a, token_b) in tokens.iter().zip(tokens.iter().skip(1)) { @@ -38,7 +38,7 @@ fn test_uniswap_input_multihop() { let (_amount_out, _evm_gas, profile) = context.exact_input(&tokens, INPUT_AMOUNT.into()); - assert_eq!(123, profile.all_gas() / 1_000_000_000_000); + assert_eq!(122, profile.all_gas() / 1_000_000_000_000); } #[test] @@ -49,7 +49,7 @@ fn test_uniswap_exact_output() { let (_result, profile) = context.add_equal_liquidity(LIQUIDITY_AMOUNT.into(), &token_a, &token_b); - test_utils::assert_gas_bound(profile.all_gas(), 34); + test_utils::assert_gas_bound(profile.all_gas(), 33); let wasm_fraction = 100 * profile.wasm_gas() / profile.all_gas(); assert!( 40 <= wasm_fraction && wasm_fraction <= 50, diff --git a/engine-tests/src/tests/xcc.rs b/engine-tests/src/tests/xcc.rs new file mode 100644 index 000000000..6f9bbad15 --- /dev/null +++ b/engine-tests/src/tests/xcc.rs @@ -0,0 +1,600 @@ +use crate::test_utils::erc20::{ERC20Constructor, ERC20}; +use crate::test_utils::{self, AuroraRunner}; +use crate::tests::erc20_connector::sim_tests; +use crate::tests::state_migration::{deploy_evm, AuroraAccount}; +use aurora_engine_precompiles::xcc::{self, costs, cross_contract_call}; +use aurora_engine_transactions::legacy::TransactionLegacy; +use aurora_engine_types::parameters::{ + CrossContractCallArgs, PromiseArgs, PromiseCreateArgs, PromiseWithCallbackArgs, +}; +use aurora_engine_types::types::{Address, EthGas, NearGas, Wei, Yocto}; +use aurora_engine_types::U256; +use borsh::{BorshDeserialize, BorshSerialize}; +use near_primitives::transaction::Action; +use near_primitives_core::contract::ContractCode; +use near_sdk_sim::UserAccount; +use serde_json::json; +use std::fs; +use std::path::Path; + +const WNEAR_AMOUNT: u128 = 10 * near_sdk_sim::STORAGE_AMOUNT; + +#[test] +fn test_xcc_eth_gas_cost() { + let mut runner = test_utils::deploy_evm(); + runner.standalone_runner = None; + let xcc_wasm_bytes = contract_bytes(); + let _ = runner.call("factory_update", "aurora", xcc_wasm_bytes); + let mut signer = test_utils::Signer::random(); + let mut baseline_signer = test_utils::Signer::random(); + runner.context.block_index = aurora_engine::engine::ZERO_ADDRESS_FIX_HEIGHT + 1; + // Need to use engine's deploy! + let wnear_erc20 = deploy_erc20(&mut runner, &mut signer); + approve_erc20( + &wnear_erc20, + cross_contract_call::ADDRESS, + &mut runner, + &mut signer, + ); + approve_erc20( + &wnear_erc20, + test_utils::address_from_secret_key(&baseline_signer.secret_key), + &mut runner, + &mut signer, + ); + let _ = runner.call( + "factory_set_wnear_address", + "aurora", + wnear_erc20.0.address.as_bytes().to_vec(), + ); + + // Baseline transaction is an ERC-20 transferFrom call since such a call is included as part + // of the precompile execution, but we want to isolate just the precompile logic itself + // (the EVM subcall is charged separately). + let (baseline_result, baseline) = runner + .submit_with_signer_profiled(&mut baseline_signer, |nonce| { + wnear_erc20.transfer_from( + test_utils::address_from_secret_key(&signer.secret_key), + Address::from_array([1u8; 20]), + U256::from(near_sdk_sim::STORAGE_AMOUNT), + nonce, + ) + }) + .unwrap(); + if !baseline_result.status.is_ok() { + panic!("Unexpected baseline status: {:?}", baseline_result); + } + + let mut profile_for_promise = |p: PromiseArgs| -> (u64, u64, u64) { + let data = CrossContractCallArgs::Eager(p).try_to_vec().unwrap(); + let input_length = data.len(); + let (submit_result, profile) = runner + .submit_with_signer_profiled(&mut signer, |nonce| TransactionLegacy { + nonce, + gas_price: U256::zero(), + gas_limit: u64::MAX.into(), + to: Some(cross_contract_call::ADDRESS), + value: Wei::zero(), + data, + }) + .unwrap(); + assert!(submit_result.status.is_ok()); + // Subtract off baseline transaction to isolate just precompile things + ( + u64::try_from(input_length).unwrap(), + profile.all_gas() - baseline.all_gas(), + submit_result.gas_used, + ) + }; + + let promise = PromiseCreateArgs { + target_account_id: "some_account.near".parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(500), + }; + // Shorter input + let (x1, y1, evm1) = profile_for_promise(PromiseArgs::Create(promise.clone())); + // longer input + let (x2, y2, evm2) = profile_for_promise(PromiseArgs::Callback(PromiseWithCallbackArgs { + base: promise.clone(), + callback: promise, + })); + + // NEAR costs (inferred from a line through (x1, y1) and (x2, y2)) + let xcc_cost_per_byte = (y2 - y1) / (x2 - x1); + let xcc_base_cost = NearGas::new(y1 - xcc_cost_per_byte * x1); + + // Convert to EVM cost using conversion ratio + let xcc_base_cost = EthGas::new(xcc_base_cost.as_u64() / costs::CROSS_CONTRACT_CALL_NEAR_GAS); + let xcc_cost_per_byte = xcc_cost_per_byte / costs::CROSS_CONTRACT_CALL_NEAR_GAS; + + assert!( + test_utils::within_x_percent( + 5, + xcc_base_cost.as_u64(), + costs::CROSS_CONTRACT_CALL_BASE.as_u64() + ), + "Incorrect xcc base cost. Expected: {} Actual: {}", + xcc_base_cost, + costs::CROSS_CONTRACT_CALL_BASE + ); + + assert!( + test_utils::within_x_percent( + 5, + xcc_cost_per_byte, + costs::CROSS_CONTRACT_CALL_BYTE.as_u64() + ), + "Incorrect xcc per byte cost. Expected: {} Actual: {}", + xcc_cost_per_byte, + costs::CROSS_CONTRACT_CALL_BYTE + ); + + // As a sanity check, confirm that the total EVM gas spent aligns with expectations + let total_gas1 = y1 + baseline.all_gas(); + let total_gas2 = y2 + baseline.all_gas(); + assert!( + test_utils::within_x_percent(20, evm1, total_gas1 / costs::CROSS_CONTRACT_CALL_NEAR_GAS), + "Incorrect EVM gas used. Expected: {} Actual: {}", + evm1, + total_gas1 / costs::CROSS_CONTRACT_CALL_NEAR_GAS + ); + assert!( + test_utils::within_x_percent(20, evm2, total_gas2 / costs::CROSS_CONTRACT_CALL_NEAR_GAS), + "Incorrect EVM gas used. Expected: {} Actual: {}", + evm2, + total_gas2 / costs::CROSS_CONTRACT_CALL_NEAR_GAS + ); +} + +#[test] +fn test_xcc_precompile_eager() { + test_xcc_precompile_common(false) +} + +#[test] +fn test_xcc_precompile_scheduled() { + test_xcc_precompile_common(true) +} + +fn test_xcc_precompile_common(is_scheduled: bool) { + let aurora = deploy_evm(); + let chain_id = AuroraRunner::default().chain_id; + let xcc_wasm_bytes = contract_bytes(); + aurora + .user + .call( + aurora.contract.account_id(), + "factory_update", + &xcc_wasm_bytes, + near_sdk_sim::DEFAULT_GAS, + 0, + ) + .assert_success(); + + let mut signer = test_utils::Signer::random(); + let signer_address = test_utils::address_from_secret_key(&signer.secret_key); + + // Setup wNEAR contract and bridge it to Aurora + let wnear_account = deploy_wnear(&aurora); + let wnear_erc20 = sim_tests::deploy_erc20_from_nep_141(&wnear_account, &aurora); + sim_tests::transfer_nep_141_to_erc_20( + &wnear_account, + &wnear_erc20, + &aurora.user, + signer_address, + WNEAR_AMOUNT, + &aurora, + ); + aurora + .user + .call( + aurora.contract.account_id(), + "factory_set_wnear_address", + wnear_erc20.0.address.as_bytes(), + near_sdk_sim::DEFAULT_GAS, + 0, + ) + .assert_success(); + let approve_tx = wnear_erc20.approve( + cross_contract_call::ADDRESS, + WNEAR_AMOUNT.into(), + signer.use_nonce().into(), + ); + let signed_transaction = + test_utils::sign_transaction(approve_tx, Some(chain_id), &signer.secret_key); + aurora + .user + .call( + aurora.contract.account_id(), + "submit", + &rlp::encode(&signed_transaction), + near_sdk_sim::DEFAULT_GAS, + 0, + ) + .assert_success(); + + let router_account = format!( + "{}.{}", + hex::encode(signer_address.as_bytes()), + aurora.contract.account_id.as_str() + ); + + // 1. Deploy NEP-141 token. + let ft_owner = aurora.user.create_user( + "ft_owner.root".parse().unwrap(), + near_sdk_sim::STORAGE_AMOUNT, + ); + let nep_141_supply = 500; + let nep_141_token = sim_tests::deploy_nep_141( + "test_token.root", + ft_owner.account_id.as_ref(), + nep_141_supply, + &aurora, + ); + + // 2. Register EVM router contract + let args = serde_json::json!({ + "account_id": router_account, + }) + .to_string(); + aurora + .user + .call( + nep_141_token.account_id(), + "storage_deposit", + args.as_bytes(), + near_sdk_sim::DEFAULT_GAS, + near_sdk_sim::STORAGE_AMOUNT, + ) + .assert_success(); + + // 3. Give router some tokens + let transfer_amount: u128 = 199; + let args = serde_json::json!({ + "receiver_id": router_account, + "amount": format!("{}", transfer_amount), + }) + .to_string(); + ft_owner + .call( + nep_141_token.account_id(), + "ft_transfer", + args.as_bytes(), + near_sdk_sim::DEFAULT_GAS, + 1, + ) + .assert_success(); + assert_eq!( + sim_tests::nep_141_balance_of(ft_owner.account_id.as_str(), &nep_141_token, &aurora), + nep_141_supply - transfer_amount + ); + + // 4. Use xcc precompile to send those tokens back + let args = serde_json::json!({ + "receiver_id": ft_owner.account_id.as_str(), + "amount": format!("{}", transfer_amount), + }) + .to_string(); + let promise = PromiseCreateArgs { + target_account_id: nep_141_token.account_id.as_str().parse().unwrap(), + method: "ft_transfer".into(), + args: args.into_bytes(), + attached_balance: Yocto::new(1), + attached_gas: NearGas::new(100_000_000_000_000), + }; + let xcc_args = if is_scheduled { + CrossContractCallArgs::Delayed(PromiseArgs::Create(promise)) + } else { + CrossContractCallArgs::Eager(PromiseArgs::Create(promise)) + }; + let transaction = TransactionLegacy { + nonce: signer.use_nonce().into(), + gas_price: 0u64.into(), + gas_limit: u64::MAX.into(), + to: Some(cross_contract_call::ADDRESS), + value: Wei::zero(), + data: xcc_args.try_to_vec().unwrap(), + }; + let signed_transaction = + test_utils::sign_transaction(transaction, Some(chain_id), &signer.secret_key); + let engine_balance_before_xcc = get_engine_near_balance(&aurora); + let result = aurora.user.call( + aurora.contract.account_id(), + "submit", + &rlp::encode(&signed_transaction), + near_sdk_sim::DEFAULT_GAS, + 0, + ); + result.assert_success(); + let submit_result: aurora_engine::parameters::SubmitResult = result.unwrap_borsh(); + if !submit_result.status.is_ok() { + panic!("Unexpected result {:?}", submit_result); + } + + print_outcomes(&aurora); + let engine_balance_after_xcc = get_engine_near_balance(&aurora); + assert!( + // engine loses less than 0.01 NEAR + engine_balance_after_xcc.max(engine_balance_before_xcc) + - engine_balance_after_xcc.min(engine_balance_before_xcc) + < 10_000_000_000_000_000_000_000, + "Engine lost too much NEAR funding xcc: Before={:?} After={:?}", + engine_balance_before_xcc, + engine_balance_after_xcc, + ); + let router_balance = aurora + .user + .borrow_runtime() + .view_account(&router_account) + .unwrap() + .amount(); + assert!( + // router loses less than 0.01 NEAR from its allocated funds + xcc::state::STORAGE_AMOUNT.as_u128() - router_balance < 10_000_000_000_000_000_000_000, + "Router lost too much NEAR: Balance={:?}", + router_balance, + ); + // Router has no wNEAR balance because it all was unwrapped to actual NEAR + assert_eq!( + sim_tests::nep_141_balance_of(&router_account, &wnear_account, &aurora), + 0, + ); + + if is_scheduled { + // The promise was only scheduled, not executed immediately. So the FT balance has not changed yet. + assert_eq!( + sim_tests::nep_141_balance_of(ft_owner.account_id.as_str(), &nep_141_token, &aurora), + nep_141_supply - transfer_amount + ); + + // Now we execute the scheduled promise + aurora + .user + .call( + router_account.parse().unwrap(), + "execute_scheduled", + b"{\"nonce\": \"0\"}", + near_sdk_sim::DEFAULT_GAS, + 0, + ) + .assert_success(); + } + + assert_eq!( + sim_tests::nep_141_balance_of(ft_owner.account_id.as_str(), &nep_141_token, &aurora), + nep_141_supply + ); +} + +fn get_engine_near_balance(aurora: &AuroraAccount) -> u128 { + aurora + .user + .borrow_runtime() + .view_account(&aurora.contract.account_id.as_str()) + .unwrap() + .amount() +} + +fn print_outcomes(aurora: &AuroraAccount) { + let rt = aurora.user.borrow_runtime(); + for id in rt.last_outcomes.iter() { + println!("{:?}=={:?}\n\n", id, rt.outcome(id).unwrap()); + } +} + +#[test] +fn test_xcc_schedule_gas() { + let mut router = deploy_router(); + + let promise = PromiseCreateArgs { + target_account_id: "some_account.near".parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(100_000_000_000_000), + }; + + let (maybe_outcome, maybe_error) = router.call( + "schedule", + "aurora", + PromiseArgs::Create(promise.clone()).try_to_vec().unwrap(), + ); + assert!(maybe_error.is_none()); + let outcome = maybe_outcome.unwrap(); + assert!( + outcome.burnt_gas < costs::ROUTER_SCHEDULE.as_u64(), + "{:?} not less than {:?}", + outcome.burnt_gas, + costs::ROUTER_SCHEDULE + ); + assert_eq!(outcome.logs.len(), 1); + assert_eq!(outcome.logs[0], "Promise scheduled at nonce 0"); +} + +#[test] +fn test_xcc_exec_gas() { + let mut router = deploy_router(); + + let promise = PromiseCreateArgs { + target_account_id: "some_account.near".parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(100_000_000_000_000), + }; + + let (maybe_outcome, maybe_error) = router.call( + "execute", + "aurora", + PromiseArgs::Create(promise.clone()).try_to_vec().unwrap(), + ); + assert!(maybe_error.is_none()); + let outcome = maybe_outcome.unwrap(); + + assert!( + outcome.burnt_gas < costs::ROUTER_EXEC.as_u64(), + "{:?} not less than {:?}", + outcome.burnt_gas, + costs::ROUTER_EXEC + ); + assert_eq!(outcome.action_receipts.len(), 1); + assert_eq!( + outcome.action_receipts[0].0.as_str(), + promise.target_account_id.as_ref() + ); + let receipt = &outcome.action_receipts[0].1; + assert_eq!(receipt.actions.len(), 1); + let action = &receipt.actions[0]; + match action { + Action::FunctionCall(function_call) => { + assert_eq!(function_call.method_name, promise.method); + assert_eq!(function_call.args, promise.args); + assert_eq!(function_call.deposit, promise.attached_balance.as_u128()); + assert_eq!(function_call.gas, promise.attached_gas.as_u64()); + } + other => panic!("Unexpected action {:?}", other), + }; +} + +fn deploy_router() -> AuroraRunner { + let mut router = AuroraRunner::default(); + router.code = ContractCode::new(contract_bytes(), None); + + router.context.current_account_id = "some_address.aurora".parse().unwrap(); + router.context.predecessor_account_id = "aurora".parse().unwrap(); + + let init_args = r#"{"wnear_account": "wrap.near", "must_register": true}"#; + let (maybe_outcome, maybe_error) = + router.call("initialize", "aurora", init_args.as_bytes().to_vec()); + assert!(maybe_error.is_none()); + let outcome = maybe_outcome.unwrap(); + assert!(outcome.used_gas < aurora_engine::xcc::INITIALIZE_GAS.as_u64()); + + router +} + +fn deploy_wnear(aurora: &AuroraAccount) -> UserAccount { + let contract_bytes = std::fs::read("src/tests/res/w_near.wasm").unwrap(); + + let account_id = format!("wrap.{}", aurora.user.account_id.as_str()); + let contract_account = aurora.user.deploy( + &contract_bytes, + account_id.parse().unwrap(), + 5 * near_sdk_sim::STORAGE_AMOUNT, + ); + + aurora + .user + .call( + contract_account.account_id(), + "new", + &[], + near_sdk_sim::DEFAULT_GAS, + 0, + ) + .assert_success(); + + // Need to register Aurora contract so that it can receive tokens + let args = json!({ + "account_id": &aurora.contract.account_id, + }) + .to_string(); + aurora + .user + .call( + contract_account.account_id(), + "storage_deposit", + args.as_bytes(), + near_sdk_sim::DEFAULT_GAS, + near_sdk_sim::STORAGE_AMOUNT, + ) + .assert_success(); + + // Need to also register root account + let args = json!({ + "account_id": &aurora.user.account_id, + }) + .to_string(); + aurora + .user + .call( + contract_account.account_id(), + "storage_deposit", + args.as_bytes(), + near_sdk_sim::DEFAULT_GAS, + near_sdk_sim::STORAGE_AMOUNT, + ) + .assert_success(); + + // Mint some wNEAR for the root account to use + aurora + .user + .call( + contract_account.account_id(), + "near_deposit", + &[], + near_sdk_sim::DEFAULT_GAS, + WNEAR_AMOUNT, + ) + .assert_success(); + + contract_account +} + +fn deploy_erc20(runner: &mut AuroraRunner, signer: &mut test_utils::Signer) -> ERC20 { + let engine_account = runner.aurora_account_id.clone(); + let args = aurora_engine::parameters::DeployErc20TokenArgs { + nep141: "wrap.near".parse().unwrap(), + }; + let (maybe_output, maybe_error) = runner.call( + "deploy_erc20_token", + &engine_account, + args.try_to_vec().unwrap(), + ); + assert!(maybe_error.is_none()); + let output = maybe_output.unwrap(); + let address = { + let bytes: Vec = + BorshDeserialize::try_from_slice(output.return_data.as_value().as_ref().unwrap()) + .unwrap(); + Address::try_from_slice(&bytes).unwrap() + }; + + let contract = ERC20(ERC20Constructor::load().0.deployed_at(address)); + let dest_address = test_utils::address_from_secret_key(&signer.secret_key); + let call_args = + aurora_engine::parameters::CallArgs::V1(aurora_engine::parameters::FunctionCallArgsV1 { + contract: address, + input: contract + .mint(dest_address, WNEAR_AMOUNT.into(), U256::zero()) + .data, + }); + let (_, maybe_error) = runner.call("call", &engine_account, call_args.try_to_vec().unwrap()); + assert!(maybe_error.is_none()); + + contract +} + +fn approve_erc20( + token: &ERC20, + spender: Address, + runner: &mut AuroraRunner, + signer: &mut test_utils::Signer, +) { + let approve_result = runner + .submit_with_signer(signer, |nonce| { + token.approve(spender, WNEAR_AMOUNT.into(), nonce) + }) + .unwrap(); + assert!(approve_result.status.is_ok()); +} + +fn contract_bytes() -> Vec { + let base_path = Path::new("../etc").join("xcc-router"); + let output_path = base_path.join("target/wasm32-unknown-unknown/release/xcc_router.wasm"); + test_utils::rust::compile(base_path); + fs::read(output_path).unwrap() +} diff --git a/engine-transactions/Cargo.toml b/engine-transactions/Cargo.toml index a52ce7129..8b7351786 100644 --- a/engine-transactions/Cargo.toml +++ b/engine-transactions/Cargo.toml @@ -16,11 +16,13 @@ autobenches = false aurora-engine-types = { path = "../engine-types", default-features = false } aurora-engine-sdk = { path = "../engine-sdk", default-features = false } aurora-engine-precompiles = { path = "../engine-precompiles", default-features = false } -evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false } +evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false } rlp = { version = "0.5.0", default-features = false } -hex = { version = "0.4", default-features = false, features = ["alloc"] } serde = { version = "1", features = ["derive"], optional = true } +[dev-dependencies] +hex = { version = "0.4", default-features = false, features = ["alloc"] } + [features] -std = ["aurora-engine-types/std", "aurora-engine-precompiles/std", "evm/std", "rlp/std", "hex/std"] +std = ["aurora-engine-types/std", "aurora-engine-sdk/std", "aurora-engine-precompiles/std", "evm/std", "rlp/std", "hex/std"] impl-serde = ["aurora-engine-types/impl-serde", "serde"] diff --git a/engine-transactions/src/backwards_compatibility.rs b/engine-transactions/src/backwards_compatibility.rs index 46cfbf043..9ba17d6e5 100644 --- a/engine-transactions/src/backwards_compatibility.rs +++ b/engine-transactions/src/backwards_compatibility.rs @@ -4,7 +4,7 @@ //! https://github.com/aurora-is-near/aurora-engine/pull/458 for more details, but external //! users of this library should _never_ use the adapter in this module. -use crate::{EthTransactionKind, ParseTransactionError}; +use crate::{Error, EthTransactionKind}; use aurora_engine_types::{types::Address, H160}; const ZERO_ADDRESS: Option
= Some(Address::new(H160::zero())); @@ -26,7 +26,7 @@ impl EthTransactionKindAdapter { &self, bytes: &[u8], block_height: u64, - ) -> Result { + ) -> Result { let mut result = EthTransactionKind::try_from(bytes)?; // Prior to the bug fix, the zero address was always parsed as None if diff --git a/engine-transactions/src/eip_1559.rs b/engine-transactions/src/eip_1559.rs index 8eaefbf43..17a9d9732 100644 --- a/engine-transactions/src/eip_1559.rs +++ b/engine-transactions/src/eip_1559.rs @@ -1,4 +1,5 @@ use crate::eip_2930::AccessTuple; +use crate::Error; use aurora_engine_precompiles::secp256k1::ecrecover; use aurora_engine_types::types::{Address, Wei}; use aurora_engine_types::{Vec, U256}; @@ -70,7 +71,7 @@ pub struct SignedTransaction1559 { } impl SignedTransaction1559 { - pub fn sender(&self) -> Option
{ + pub fn sender(&self) -> Result { let mut rlp_stream = RlpStream::new(); rlp_stream.append(&TYPE_BYTE); self.transaction.rlp_append_unsigned(&mut rlp_stream); @@ -79,7 +80,7 @@ impl SignedTransaction1559 { message_hash, &super::vrs_to_arr(self.parity, self.r, self.s), ) - .ok() + .map_err(|_e| Error::EcRecover) } } diff --git a/engine-transactions/src/eip_2930.rs b/engine-transactions/src/eip_2930.rs index dea7e7b97..5e2be5707 100644 --- a/engine-transactions/src/eip_2930.rs +++ b/engine-transactions/src/eip_2930.rs @@ -1,3 +1,4 @@ +use crate::Error; use aurora_engine_precompiles::secp256k1::ecrecover; use aurora_engine_sdk as sdk; use aurora_engine_types::types::{Address, Wei}; @@ -86,7 +87,7 @@ pub struct SignedTransaction2930 { } impl SignedTransaction2930 { - pub fn sender(&self) -> Option
{ + pub fn sender(&self) -> Result { let mut rlp_stream = RlpStream::new(); rlp_stream.append(&TYPE_BYTE); self.transaction.rlp_append_unsigned(&mut rlp_stream); @@ -95,7 +96,7 @@ impl SignedTransaction2930 { message_hash, &super::vrs_to_arr(self.parity, self.r, self.s), ) - .ok() + .map_err(|_e| Error::EcRecover) } } diff --git a/engine-transactions/src/legacy.rs b/engine-transactions/src/legacy.rs index 4baf3afd6..0f83f2050 100644 --- a/engine-transactions/src/legacy.rs +++ b/engine-transactions/src/legacy.rs @@ -1,3 +1,4 @@ +use crate::Error; use aurora_engine_precompiles::secp256k1::ecrecover; use aurora_engine_sdk as sdk; use aurora_engine_types::types::{Address, Wei}; @@ -44,21 +45,6 @@ impl TransactionLegacy { pub fn get_gas_limit(&self) -> Option { self.gas_limit.try_into().ok() } - - pub fn normalize(self) -> super::NormalizedEthTransaction { - super::NormalizedEthTransaction { - address: None, - chain_id: None, - nonce: self.nonce, - gas_limit: self.gas_limit, - max_priority_fee_per_gas: self.gas_price, - max_fee_per_gas: self.gas_price, - to: self.to, - value: self.value, - data: self.data, - access_list: Vec::new(), - } - } } #[derive(Debug, Eq, PartialEq, Clone)] @@ -75,19 +61,25 @@ pub struct LegacyEthSignedTransaction { impl LegacyEthSignedTransaction { /// Returns sender of given signed transaction by doing ecrecover on the signature. - pub fn sender(&self) -> Option
{ + pub fn sender(&self) -> Result { let mut rlp_stream = RlpStream::new(); // See details of CHAIN_ID computation here - https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md#specification let (chain_id, rec_id) = match self.v { - 0..=26 => return None, - 27..=28 => (None, (self.v - 27) as u8), - 29..=34 => return None, - _ => (Some((self.v - 35) / 2), ((self.v - 35) % 2) as u8), + 0..=26 | 29..=34 => return Err(Error::InvalidV), + 27..=28 => ( + None, + u8::try_from(self.v - 27).map_err(|_e| Error::InvalidV)?, + ), + _ => ( + Some((self.v - 35) / 2), + u8::try_from((self.v - 35) % 2).map_err(|_e| Error::InvalidV)?, + ), }; self.transaction .rlp_append_unsigned(&mut rlp_stream, chain_id); let message_hash = sdk::keccak(rlp_stream.as_raw()); - ecrecover(message_hash, &super::vrs_to_arr(rec_id, self.r, self.s)).ok() + ecrecover(message_hash, &super::vrs_to_arr(rec_id, self.r, self.s)) + .map_err(|_e| Error::EcRecover) } /// Returns chain id encoded in `v` parameter of the signature if that was done, otherwise None. diff --git a/engine-transactions/src/lib.rs b/engine-transactions/src/lib.rs index 8688adaad..03d250cc5 100644 --- a/engine-transactions/src/lib.rs +++ b/engine-transactions/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] +#![deny(clippy::as_conversions)] use aurora_engine_types::types::{Address, Wei}; use aurora_engine_types::{vec, Vec, H160, U256}; @@ -20,10 +21,12 @@ pub enum EthTransactionKind { } impl TryFrom<&[u8]> for EthTransactionKind { - type Error = ParseTransactionError; + type Error = Error; fn try_from(bytes: &[u8]) -> Result { - if bytes[0] == eip_2930::TYPE_BYTE { + if bytes.is_empty() { + Err(Error::EmptyInput) + } else if bytes[0] == eip_2930::TYPE_BYTE { Ok(Self::Eip2930(eip_2930::SignedTransaction2930::decode( &Rlp::new(&bytes[1..]), )?)) @@ -32,9 +35,9 @@ impl TryFrom<&[u8]> for EthTransactionKind { &Rlp::new(&bytes[1..]), )?)) } else if bytes[0] <= 0x7f { - Err(ParseTransactionError::UnknownTransactionType) + Err(Error::UnknownTransactionType) } else if bytes[0] == 0xff { - Err(ParseTransactionError::ReservedSentinel) + Err(Error::ReservedSentinel) } else { let legacy = legacy::LegacyEthSignedTransaction::decode(&Rlp::new(bytes))?; Ok(Self::Legacy(legacy)) @@ -65,7 +68,7 @@ impl<'a> From<&'a EthTransactionKind> for Vec { /// A normalized Ethereum transaction which can be created from older /// transactions. pub struct NormalizedEthTransaction { - pub address: Option
, + pub address: Address, pub chain_id: Option, pub nonce: U256, pub gas_limit: U256, @@ -77,12 +80,14 @@ pub struct NormalizedEthTransaction { pub access_list: Vec, } -impl From for NormalizedEthTransaction { - fn from(kind: EthTransactionKind) -> Self { +impl TryFrom for NormalizedEthTransaction { + type Error = Error; + + fn try_from(kind: EthTransactionKind) -> Result { use EthTransactionKind::*; - match kind { + Ok(match kind { Legacy(tx) => Self { - address: tx.sender(), + address: tx.sender()?, chain_id: tx.chain_id(), nonce: tx.transaction.nonce, gas_limit: tx.transaction.gas_limit, @@ -94,7 +99,7 @@ impl From for NormalizedEthTransaction { access_list: vec![], }, Eip2930(tx) => Self { - address: tx.sender(), + address: tx.sender()?, chain_id: Some(tx.transaction.chain_id), nonce: tx.transaction.nonce, gas_limit: tx.transaction.gas_limit, @@ -106,7 +111,7 @@ impl From for NormalizedEthTransaction { access_list: tx.transaction.access_list, }, Eip1559(tx) => Self { - address: tx.sender(), + address: tx.sender()?, chain_id: Some(tx.transaction.chain_id), nonce: tx.transaction.nonce, gas_limit: tx.transaction.gas_limit, @@ -117,12 +122,12 @@ impl From for NormalizedEthTransaction { data: tx.transaction.data, access_list: tx.transaction.access_list, }, - } + }) } } impl NormalizedEthTransaction { - pub fn intrinsic_gas(&self, config: &evm::Config) -> Option { + pub fn intrinsic_gas(&self, config: &evm::Config) -> Result { let is_contract_creation = self.to.is_none(); let base_gas = if is_contract_creation { @@ -131,40 +136,60 @@ impl NormalizedEthTransaction { config.gas_transaction_call }; - let num_zero_bytes = self.data.iter().filter(|b| **b == 0).count(); - let num_non_zero_bytes = self.data.len() - num_zero_bytes; - + let num_zero_bytes = u64::try_from(self.data.iter().filter(|b| **b == 0).count()) + .map_err(|_e| Error::IntegerConversion)?; let gas_zero_bytes = config .gas_transaction_zero_data - .checked_mul(num_zero_bytes as u64)?; + .checked_mul(num_zero_bytes) + .ok_or(Error::GasOverflow)?; + + let data_len = u64::try_from(self.data.len()).map_err(|_e| Error::IntegerConversion)?; + let num_non_zero_bytes = data_len - num_zero_bytes; let gas_non_zero_bytes = config .gas_transaction_non_zero_data - .checked_mul(num_non_zero_bytes as u64)?; + .checked_mul(num_non_zero_bytes) + .ok_or(Error::GasOverflow)?; + let access_list_len = + u64::try_from(self.access_list.len()).map_err(|_e| Error::IntegerConversion)?; let gas_access_list_address = config .gas_access_list_address - .checked_mul(self.access_list.len() as u64)?; - let gas_access_list_storage = config.gas_access_list_storage_key.checked_mul( - self.access_list - .iter() - .map(|a| a.storage_keys.len() as u64) - .sum(), - )?; + .checked_mul(access_list_len) + .ok_or(Error::GasOverflow)?; + + let gas_access_list_storage = config + .gas_access_list_storage_key + .checked_mul( + u64::try_from( + self.access_list + .iter() + .map(|a| a.storage_keys.len()) + .sum::(), + ) + .map_err(|_e| Error::IntegerConversion)?, + ) + .ok_or(Error::GasOverflow)?; base_gas .checked_add(gas_zero_bytes) .and_then(|gas| gas.checked_add(gas_non_zero_bytes)) .and_then(|gas| gas.checked_add(gas_access_list_address)) .and_then(|gas| gas.checked_add(gas_access_list_storage)) + .ok_or(Error::GasOverflow) } } #[derive(Debug, Clone, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize))] -pub enum ParseTransactionError { +pub enum Error { UnknownTransactionType, + EmptyInput, // Per the EIP-2718 spec 0xff is a reserved value ReservedSentinel, + InvalidV, + EcRecover, + GasOverflow, + IntegerConversion, #[cfg_attr(feature = "serde", serde(serialize_with = "decoder_err_to_str"))] RlpDecodeError(DecoderError), } @@ -174,23 +199,28 @@ fn decoder_err_to_str(err: &DecoderError, ser: S) -> Resul ser.serialize_str(&format!("{:?}", err)) } -impl ParseTransactionError { +impl Error { pub fn as_str(&self) -> &'static str { match self { Self::UnknownTransactionType => "ERR_UNKNOWN_TX_TYPE", + Self::EmptyInput => "ERR_EMPTY_TX_INPUT", Self::ReservedSentinel => "ERR_RESERVED_LEADING_TX_BYTE", + Self::InvalidV => "ERR_INVALID_V", + Self::EcRecover => "ERR_ECRECOVER", + Self::GasOverflow => "ERR_GAS_OVERFLOW", + Self::IntegerConversion => "ERR_INTEGER_CONVERSION", Self::RlpDecodeError(_) => "ERR_TX_RLP_DECODE", } } } -impl From for ParseTransactionError { +impl From for Error { fn from(e: DecoderError) -> Self { Self::RlpDecodeError(e) } } -impl AsRef<[u8]> for ParseTransactionError { +impl AsRef<[u8]> for Error { fn as_ref(&self) -> &[u8] { self.as_str().as_bytes() } @@ -218,3 +248,32 @@ fn vrs_to_arr(v: u8, r: U256, s: U256) -> [u8; 65] { result[64] = v; result } + +#[cfg(test)] +mod tests { + use super::{Error, EthTransactionKind}; + use crate::{eip_1559, eip_2930}; + + #[test] + fn test_try_parse_empty_input() { + assert!(matches!( + EthTransactionKind::try_from([].as_ref()), + Err(Error::EmptyInput) + )); + + // If the first byte is present, then empty bytes will be passed in to + // the RLP parsing. Let's also check this is not a problem. + assert!(matches!( + EthTransactionKind::try_from([eip_1559::TYPE_BYTE].as_ref()), + Err(Error::RlpDecodeError(_)) + )); + assert!(matches!( + EthTransactionKind::try_from([eip_2930::TYPE_BYTE].as_ref()), + Err(Error::RlpDecodeError(_)) + )); + assert!(matches!( + EthTransactionKind::try_from([0x80].as_ref()), + Err(Error::RlpDecodeError(_)) + )); + } +} diff --git a/engine-types/Cargo.toml b/engine-types/Cargo.toml index d1f971cfb..4494c0580 100644 --- a/engine-types/Cargo.toml +++ b/engine-types/Cargo.toml @@ -13,20 +13,15 @@ publish = false autobenches = false [dependencies] -borsh = { version = "0.8.2", default-features = false } -ethabi = { git = "https://github.com/darwinia-network/ethabi", branch = "xavier-no-std", default-features = false } +borsh = { version = "0.9.3", default-features = false } hex = { version = "0.4", default-features = false, features = ["alloc"] } -primitive-types = { version = "0.10.0", default-features = false, features = ["rlp"] } -sha3 = { version = "0.9.1", default-features = false } +primitive-types = { version = "0.11", default-features = false, features = ["rlp"] } serde = { version = "1", features = ["derive"], optional = true } [dev-dependencies] -bstr = "0.2" -serde = { version = "1", features = ["derive"] } -serde_json = "1" rand = "0.7.3" [features] default = ["std"] -std = ["primitive-types/std"] +std = ["borsh/std", "hex/std", "primitive-types/std"] impl-serde = ["primitive-types/impl-serde", "serde"] diff --git a/engine-types/src/lib.rs b/engine-types/src/lib.rs index 7250dab40..f2cf3590b 100644 --- a/engine-types/src/lib.rs +++ b/engine-types/src/lib.rs @@ -1,6 +1,7 @@ #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] #![cfg_attr(feature = "log", feature(panic_info_message))] +#![deny(clippy::as_conversions)] pub mod account_id; pub mod parameters; @@ -24,8 +25,8 @@ mod v0 { vec::Vec, }; pub use core::{ - cmp::Ordering, fmt::Display, marker::PhantomData, mem, ops::Add, ops::Div, ops::Mul, - ops::Sub, ops::SubAssign, + cmp::Ordering, fmt::Display, marker::PhantomData, mem, ops::Add, ops::AddAssign, ops::Div, + ops::Mul, ops::Sub, ops::SubAssign, }; pub use primitive_types::{H160, H256, U256}; } diff --git a/engine-types/src/parameters.rs b/engine-types/src/parameters.rs index 82ea30dcd..0c78fb1b7 100644 --- a/engine-types/src/parameters.rs +++ b/engine-types/src/parameters.rs @@ -10,6 +10,22 @@ pub enum PromiseArgs { Callback(PromiseWithCallbackArgs), } +impl PromiseArgs { + pub fn total_gas(&self) -> NearGas { + match self { + Self::Create(call) => call.attached_gas, + Self::Callback(cb) => cb.base.attached_gas + cb.callback.attached_gas, + } + } + + pub fn total_near(&self) -> Yocto { + match self { + Self::Create(call) => call.attached_balance, + Self::Callback(cb) => cb.base.attached_balance + cb.callback.attached_balance, + } + } +} + #[must_use] #[derive(Debug, BorshSerialize, BorshDeserialize, Clone, PartialEq, Eq)] pub struct PromiseCreateArgs { @@ -29,6 +45,7 @@ pub struct PromiseWithCallbackArgs { #[derive(Debug, BorshSerialize, BorshDeserialize, Clone)] pub enum PromiseAction { + CreateAccount, Transfer { amount: Yocto, }, @@ -64,3 +81,18 @@ pub struct RefundCallArgs { pub erc20_address: Option
, pub amount: RawU256, } + +/// Args passed to the the cross contract call precompile. +/// That precompile is used by Aurora contracts to make calls to the broader NEAR ecosystem. +/// See https://github.com/aurora-is-near/AIPs/pull/2 for design details. +#[derive(Debug, BorshSerialize, BorshDeserialize)] +pub enum CrossContractCallArgs { + /// The promise is to be executed immediately (as part of the same NEAR transaction as the EVM call). + Eager(PromiseArgs), + /// The promise is to be stored in the router contract, and can be executed in a future transaction. + /// The purpose of this is to expand how much NEAR gas can be made available to a cross contract call. + /// For example, if an expensive EVM call ends with a NEAR cross contract call, then there may not be + /// much gas left to perform it. In this case, the promise could be `Delayed` (stored in the router) + /// and executed in a separate transaction with a fresh 300 Tgas available for it. + Delayed(PromiseArgs), +} diff --git a/engine-types/src/storage.rs b/engine-types/src/storage.rs index ce287542b..e1b1be281 100644 --- a/engine-types/src/storage.rs +++ b/engine-types/src/storage.rs @@ -8,6 +8,14 @@ pub enum VersionPrefix { V1 = 0x7, } +impl From for u8 { + fn from(v: VersionPrefix) -> Self { + match v { + VersionPrefix::V1 => 0x7, + } + } +} + #[allow(dead_code)] #[derive(Clone, Copy, BorshSerialize, BorshDeserialize)] pub enum KeyPrefix { @@ -21,6 +29,26 @@ pub enum KeyPrefix { Generation = 0x7, Nep141Erc20Map = 0x8, Erc20Nep141Map = 0x9, + CrossContractCall = 0xa, +} + +impl From for u8 { + fn from(k: KeyPrefix) -> Self { + use KeyPrefix::*; + match k { + Config => 0x0, + Nonce => 0x1, + Balance => 0x2, + Code => 0x3, + Storage => 0x4, + RelayerEvmAddressMap => 0x5, + EthConnector => 0x6, + Generation => 0x7, + Nep141Erc20Map => 0x8, + Erc20Nep141Map => 0x9, + CrossContractCall => 0xa, + } + } } /// Enum used to differentiate different storage keys used by eth-connector @@ -34,6 +62,20 @@ pub enum EthConnectorStorageId { FungibleTokenMetadata = 0x5, } +impl From for u8 { + fn from(id: EthConnectorStorageId) -> Self { + use EthConnectorStorageId::*; + match id { + Contract => 0x0, + FungibleToken => 0x1, + UsedEvent => 0x2, + PausedMask => 0x3, + StatisticsAuroraAccountsCounter => 0x4, + FungibleTokenMetadata => 0x5, + } + } +} + /// We can't use const generic over Enum, but we can do it over integral type pub type KeyPrefixU8 = u8; @@ -51,6 +93,7 @@ impl From for KeyPrefix { 0x7 => Self::Generation, 0x8 => Self::Nep141Erc20Map, 0x9 => Self::Erc20Nep141Map, + 0xa => Self::CrossContractCall, _ => unreachable!(), } } @@ -58,14 +101,14 @@ impl From for KeyPrefix { #[allow(dead_code)] pub fn bytes_to_key(prefix: KeyPrefix, bytes: &[u8]) -> Vec { - [&[VersionPrefix::V1 as u8], &[prefix as u8], bytes].concat() + [&[u8::from(VersionPrefix::V1)], &[u8::from(prefix)], bytes].concat() } #[allow(dead_code)] pub fn address_to_key(prefix: KeyPrefix, address: &Address) -> [u8; 22] { let mut result = [0u8; 22]; - result[0] = VersionPrefix::V1 as u8; - result[1] = prefix as u8; + result[0] = u8::from(VersionPrefix::V1); + result[1] = u8::from(prefix); result[2..22].copy_from_slice(address.as_bytes()); result } @@ -96,8 +139,8 @@ pub fn storage_to_key(address: &Address, key: &H256, generation: u32) -> Storage #[allow(dead_code)] fn normal_storage_key(address: &Address, key: &H256) -> [u8; 54] { let mut result = [0u8; 54]; - result[0] = VersionPrefix::V1 as u8; - result[1] = KeyPrefix::Storage as u8; + result[0] = u8::from(VersionPrefix::V1); + result[1] = u8::from(KeyPrefix::Storage); result[2..22].copy_from_slice(address.as_bytes()); result[22..54].copy_from_slice(&key.0); result @@ -106,8 +149,8 @@ fn normal_storage_key(address: &Address, key: &H256) -> [u8; 54] { #[allow(dead_code)] fn generation_storage_key(address: &Address, key: &H256, generation: u32) -> [u8; 58] { let mut result = [0u8; 58]; - result[0] = VersionPrefix::V1 as u8; - result[1] = KeyPrefix::Storage as u8; + result[0] = u8::from(VersionPrefix::V1); + result[1] = u8::from(KeyPrefix::Storage); result[2..22].copy_from_slice(address.as_bytes()); result[22..26].copy_from_slice(&generation.to_le_bytes()); result[26..58].copy_from_slice(&key.0); diff --git a/engine-types/src/types/gas.rs b/engine-types/src/types/gas.rs index 18e32f749..0232b776d 100644 --- a/engine-types/src/types/gas.rs +++ b/engine-types/src/types/gas.rs @@ -1,5 +1,5 @@ use crate::fmt::Formatter; -use crate::{Add, Display, Div, Mul, Sub}; +use crate::{Add, AddAssign, Display, Div, Mul, Sub}; use borsh::{BorshDeserialize, BorshSerialize}; #[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; @@ -24,6 +24,14 @@ impl Sub for NearGas { } } +impl Add for NearGas { + type Output = NearGas; + + fn add(self, rhs: NearGas) -> Self::Output { + Self(self.0 + rhs.0) + } +} + impl NearGas { /// Constructs a new `NearGas` with a given u64 value. pub const fn new(gas: u64) -> NearGas { @@ -67,11 +75,17 @@ impl Add for EthGas { } } -impl Div for EthGas { +impl AddAssign for EthGas { + fn add_assign(&mut self, rhs: EthGas) { + self.0 += rhs.0 + } +} + +impl Div for EthGas { type Output = EthGas; - fn div(self, rhs: usize) -> Self::Output { - EthGas(self.0 / rhs as u64) + fn div(self, rhs: u64) -> Self::Output { + EthGas(self.0 / rhs) } } @@ -79,7 +93,7 @@ impl Mul for u32 { type Output = EthGas; fn mul(self, rhs: EthGas) -> Self::Output { - EthGas(self as u64 * rhs.0) + EthGas(u64::from(self) * rhs.0) } } @@ -87,15 +101,15 @@ impl Mul for EthGas { type Output = EthGas; fn mul(self, rhs: u32) -> Self::Output { - EthGas(self.0 * rhs as u64) + EthGas(self.0 * u64::from(rhs)) } } -impl Mul for EthGas { +impl Mul for EthGas { type Output = EthGas; - fn mul(self, rhs: usize) -> Self::Output { - EthGas(self.0 * rhs as u64) + fn mul(self, rhs: u64) -> Self::Output { + EthGas(self.0 * rhs) } } diff --git a/engine-types/src/types/mod.rs b/engine-types/src/types/mod.rs index 24e1e3a5b..82e666199 100644 --- a/engine-types/src/types/mod.rs +++ b/engine-types/src/types/mod.rs @@ -70,28 +70,29 @@ pub enum PromiseResult { Failed, } +impl PromiseResult { + pub fn size(&self) -> usize { + match self { + Self::Failed | Self::NotReady => 1, + Self::Successful(bytes) => bytes.len(), + } + } +} + /// ft_resolve_transfer result of eth-connector pub struct FtResolveTransferResult { pub amount: Balance, pub refund_amount: Balance, } -/// Internal errors to propagate up and format in the single place. -pub enum ErrorKind { - ArgumentParseError, - InvalidMetaTransactionMethodName, - InvalidMetaTransactionFunctionArg, - InvalidEcRecoverSignature, -} - const HEX_ALPHABET: &[u8; 16] = b"0123456789abcdef"; #[allow(dead_code)] pub fn bytes_to_hex(v: &[u8]) -> String { let mut result = String::new(); for x in v { - result.push(HEX_ALPHABET[(x / 16) as usize] as char); - result.push(HEX_ALPHABET[(x % 16) as usize] as char); + result.push(char::from(HEX_ALPHABET[usize::from(x / 16)])); + result.push(char::from(HEX_ALPHABET[usize::from(x % 16)])); } result } diff --git a/engine/Cargo.toml b/engine/Cargo.toml index b9c77c623..b0ba09372 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aurora-engine" -version = "2.6.1" +version = "2.7.0" authors = ["Aurora Labs "] edition = "2021" description = "" @@ -21,41 +21,31 @@ aurora-engine-sdk = { path = "../engine-sdk", default-features = false } aurora-engine-precompiles = { path = "../engine-precompiles", default-features = false } aurora-engine-transactions = { path = "../engine-transactions", default-features = false } base64 = { version = "0.13.0", default-features = false, features = ["alloc"] } -borsh = { version = "0.8.2", default-features = false } -bn = { package = "aurora-bn", git = "https://github.com/aurora-is-near/aurora-bn.git", default-features = false } -evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false } -evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", rev = "37448b6cacd98b06282cff5a559684505c29bd2b", default-features = false } -libsecp256k1 = { version = "0.7.0", default-features = false } -num = { version = "0.4.0", default-features = false, features = ["alloc"] } -primitive-types = { version = "0.10.0", default-features = false, features = ["rlp"] } -ripemd160 = { version = "0.9.1", default-features = false } -rlp = { version = "0.5.0", default-features = false } -sha3 = { version = "0.9.1", default-features = false } -wee_alloc = { version = "0.4.5", default-features = false } -logos = { version = "0.12", default-features = false, features = ["export_derive"] } -ethabi = { git = "https://github.com/darwinia-network/ethabi", branch = "xavier-no-std", default-features = false } -hex = { version = "0.4", default-features = false, features = ["alloc"] } +borsh = { version = "0.9.3", default-features = false } byte-slice-cast = { version = "1.0", default-features = false } +ethabi = { version = "17.1", default-features = false } +evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.36.0-aurora", default-features = false } +hex = { version = "0.4", default-features = false, features = ["alloc"] } rjson = { git = "https://github.com/aurora-is-near/rjson", rev = "cc3da949", default-features = false, features = ["integer"] } +rlp = { version = "0.5.0", default-features = false } serde = { version = "1", features = ["derive"], optional = true } +[target.'cfg(target_arch = "wasm32")'.dependencies] +wee_alloc = { version = "0.4.5", default-features = false } + [dev-dependencies] -serde = { version = "1", features = ["derive"] } serde_json = "1" rand = "0.7.3" [features] default = ["std"] -std = ["borsh/std", "evm/std", "primitive-types/std", "rlp/std", "sha3/std", "ethabi/std", "logos/std", "bn/std", "aurora-engine-types/std", "rjson/std", "aurora-engine-precompiles/std", "aurora-engine-transactions/std"] +std = ["aurora-engine-types/std", "aurora-engine-sdk/std", "aurora-engine-precompiles/std", "aurora-engine-transactions/std", "base64/std", "borsh/std", "byte-slice-cast/std", "ethabi/std", "evm/std", "hex/std", "rjson/std", "rlp/std"] contract = ["aurora-engine-sdk/contract", "aurora-engine-precompiles/contract"] evm_bully = [] log = ["aurora-engine-sdk/log", "aurora-engine-precompiles/log"] tracing = ["evm/tracing"] -meta-call = [] error_refund = ["aurora-engine-precompiles/error_refund"] integration-test = ["log"] mainnet = ["contract", "log", "aurora-engine-sdk/mainnet"] testnet = ["contract", "log", "aurora-engine-sdk/testnet"] -mainnet-test = ["meta-call"] -testnet-test = ["meta-call"] -impl-serde = ["aurora-engine-types/impl-serde", "serde", "aurora-engine-transactions/impl-serde", "evm-core/with-serde"] +impl-serde = ["aurora-engine-types/impl-serde", "serde", "aurora-engine-transactions/impl-serde", "evm/with-serde"] diff --git a/engine/src/connector.rs b/engine/src/connector.rs index 4fac3a218..2fdadcdaa 100644 --- a/engine/src/connector.rs +++ b/engine/src/connector.rs @@ -619,6 +619,10 @@ impl EthConnectorContract { .return_output(&self.ft.get_accounts_counter().to_le_bytes()); } + pub fn get_bridge_prover(&self) -> &AccountId { + &self.contract.prover_account + } + /// Save eth-connector fungible token contract data fn save_ft_contract(&mut self) { self.io.write_borsh( @@ -677,7 +681,7 @@ impl AdminControlled for EthConnectorContract { } fn construct_contract_key(suffix: &EthConnectorStorageId) -> Vec { - crate::prelude::bytes_to_key(KeyPrefix::EthConnector, &[*suffix as u8]) + crate::prelude::bytes_to_key(KeyPrefix::EthConnector, &[u8::from(*suffix)]) } fn get_contract_data( @@ -725,13 +729,14 @@ pub fn get_metadata(io: &I) -> Option { } pub mod error { + use crate::errors; use aurora_engine_types::types::address::error::AddressError; use aurora_engine_types::types::balance::error::BalanceOverflowError; use crate::deposit_event::error::ParseOnTransferMessageError; use crate::{deposit_event, fungible_token}; - const PROOF_EXIST: &[u8; 15] = b"ERR_PROOF_EXIST"; + const PROOF_EXIST: &[u8; 15] = errors::ERR_PROOF_EXIST; #[cfg_attr(not(target_arch = "wasm32"), derive(Debug))] pub enum StorageReadError { @@ -742,8 +747,8 @@ pub mod error { impl AsRef<[u8]> for StorageReadError { fn as_ref(&self) -> &[u8] { match self { - Self::KeyNotFound => b"ERR_CONNECTOR_STORAGE_KEY_NOT_FOUND", - Self::BorshDeserialize => b"ERR_FAILED_DESERIALIZE_CONNECTOR_DATA", + Self::KeyNotFound => errors::ERR_CONNECTOR_STORAGE_KEY_NOT_FOUND, + Self::BorshDeserialize => errors::ERR_FAILED_DESERIALIZE_CONNECTOR_DATA, } } } @@ -764,7 +769,7 @@ pub mod error { Self::Paused => crate::admin_controlled::ERR_PAUSED.as_bytes(), Self::ProofParseFailed => super::ERR_FAILED_PARSE.as_bytes(), Self::EventParseFailed(e) => e.as_ref(), - Self::CustodianAddressMismatch => b"ERR_WRONG_EVENT_ADDRESS", + Self::CustodianAddressMismatch => errors::ERR_WRONG_EVENT_ADDRESS, Self::InsufficientAmountForFee => super::ERR_NOT_ENOUGH_BALANCE_FOR_FEE.as_bytes(), Self::InvalidAddress(e) => e.as_ref(), } @@ -871,7 +876,7 @@ pub mod error { impl AsRef<[u8]> for InitContractError { fn as_ref(&self) -> &[u8] { match self { - Self::AlreadyInitialized => b"ERR_CONTRACT_INITIALIZED", + Self::AlreadyInitialized => errors::ERR_CONTRACT_INITIALIZED, Self::InvalidCustodianAddress(e) => e.as_ref(), } } diff --git a/engine/src/deposit_event.rs b/engine/src/deposit_event.rs index 815182f03..055e139bd 100644 --- a/engine/src/deposit_event.rs +++ b/engine/src/deposit_event.rs @@ -303,6 +303,7 @@ impl DepositedEvent { pub mod error { use super::*; + use crate::errors; #[derive(Debug)] pub enum DecodeError { @@ -312,8 +313,8 @@ pub mod error { impl AsRef<[u8]> for DecodeError { fn as_ref(&self) -> &[u8] { match self { - Self::RlpFailed => b"ERR_RLP_FAILED", - Self::SchemaMismatch => b"ERR_PARSE_DEPOSIT_EVENT", + Self::RlpFailed => errors::ERR_RLP_FAILED, + Self::SchemaMismatch => errors::ERR_PARSE_DEPOSIT_EVENT, } } } @@ -329,8 +330,8 @@ pub mod error { impl AsRef<[u8]> for ParseEventMessageError { fn as_ref(&self) -> &[u8] { match self { - Self::TooManyParts => b"ERR_INVALID_EVENT_MESSAGE_FORMAT", - Self::InvalidAccount => b"ERR_INVALID_ACCOUNT_ID", + Self::TooManyParts => errors::ERR_INVALID_EVENT_MESSAGE_FORMAT, + Self::InvalidAccount => errors::ERR_INVALID_ACCOUNT_ID, Self::EthAddressValidationError(e) => e.as_ref(), Self::ParseMessageError(e) => e.as_ref(), } @@ -356,11 +357,11 @@ pub mod error { fn as_ref(&self) -> &[u8] { match self { Self::LogParseFailed(e) => e.as_ref(), - Self::InvalidSender => b"ERR_INVALID_SENDER", - Self::InvalidAmount => b"ERR_INVALID_AMOUNT", - Self::InvalidFee => b"ERR_INVALID_FEE", + Self::InvalidSender => errors::ERR_INVALID_SENDER, + Self::InvalidAmount => errors::ERR_INVALID_AMOUNT, + Self::InvalidFee => errors::ERR_INVALID_FEE, Self::MessageParseFailed(e) => e.as_ref(), - Self::OverflowNumber => b"ERR_OVERFLOW_NUMBER", + Self::OverflowNumber => errors::ERR_OVERFLOW_NUMBER, } } } @@ -377,11 +378,11 @@ pub mod error { impl AsRef<[u8]> for ParseOnTransferMessageError { fn as_ref(&self) -> &[u8] { match self { - Self::TooManyParts => b"ERR_INVALID_ON_TRANSFER_MESSAGE_FORMAT", - Self::InvalidHexData => b"ERR_INVALID_ON_TRANSFER_MESSAGE_HEX", - Self::WrongMessageFormat => b"ERR_INVALID_ON_TRANSFER_MESSAGE_DATA", - Self::InvalidAccount => b"ERR_INVALID_ACCOUNT_ID", - Self::OverflowNumber => b"ERR_OVERFLOW_NUMBER", + Self::TooManyParts => errors::ERR_INVALID_ON_TRANSFER_MESSAGE_FORMAT, + Self::InvalidHexData => errors::ERR_INVALID_ON_TRANSFER_MESSAGE_HEX, + Self::WrongMessageFormat => errors::ERR_INVALID_ON_TRANSFER_MESSAGE_DATA, + Self::InvalidAccount => errors::ERR_INVALID_ACCOUNT_ID, + Self::OverflowNumber => errors::ERR_OVERFLOW_NUMBER, } } } diff --git a/engine/src/engine.rs b/engine/src/engine.rs index d8ea9a0b7..7172881fc 100644 --- a/engine/src/engine.rs +++ b/engine/src/engine.rs @@ -5,22 +5,24 @@ use evm::executor; use evm::{Config, CreateScheme, ExitError, ExitFatal, ExitReason}; use crate::connector::EthConnectorContract; +use crate::errors; use crate::map::BijectionMap; use aurora_engine_sdk::caching::FullCache; use aurora_engine_sdk::env::Env; use aurora_engine_sdk::io::{StorageIntermediate, IO}; -use aurora_engine_sdk::promise::{PromiseHandler, PromiseId}; +use aurora_engine_sdk::promise::{PromiseHandler, PromiseId, ReadOnlyPromiseHandler}; use crate::accounting; use crate::parameters::{DeployErc20TokenArgs, NewCallArgs, TransactionStatus}; use crate::prelude::parameters::RefundCallArgs; use crate::prelude::precompiles::native::{exit_to_ethereum, exit_to_near}; +use crate::prelude::precompiles::xcc::cross_contract_call; use crate::prelude::precompiles::Precompiles; use crate::prelude::transactions::{EthTransactionKind, NormalizedEthTransaction}; use crate::prelude::{ address_to_key, bytes_to_key, sdk, storage_to_key, u256_to_arr, vec, AccountId, Address, BTreeMap, BorshDeserialize, BorshSerialize, KeyPrefix, PromiseArgs, PromiseCreateArgs, - ToString, Vec, Wei, ERC20_MINT_SELECTOR, H160, H256, U256, + ToString, Vec, Wei, Yocto, ERC20_MINT_SELECTOR, H160, H256, U256, }; use aurora_engine_precompiles::PrecompileConstructorContext; use core::cell::RefCell; @@ -94,7 +96,7 @@ pub enum EngineErrorKind { EvmFatal(ExitFatal), /// Incorrect nonce. IncorrectNonce, - FailedTransactionParse(crate::prelude::transactions::ParseTransactionError), + FailedTransactionParse(crate::prelude::transactions::Error), InvalidChainId, InvalidSignature, IntrinsicGasNotMet, @@ -114,31 +116,31 @@ impl EngineErrorKind { pub fn as_bytes(&self) -> &[u8] { use EngineErrorKind::*; match self { - EvmError(ExitError::StackUnderflow) => b"ERR_STACK_UNDERFLOW", - EvmError(ExitError::StackOverflow) => b"ERR_STACK_OVERFLOW", - EvmError(ExitError::InvalidJump) => b"ERR_INVALID_JUMP", - EvmError(ExitError::InvalidRange) => b"ERR_INVALID_RANGE", - EvmError(ExitError::DesignatedInvalid) => b"ERR_DESIGNATED_INVALID", - EvmError(ExitError::CallTooDeep) => b"ERR_CALL_TOO_DEEP", - EvmError(ExitError::CreateCollision) => b"ERR_CREATE_COLLISION", - EvmError(ExitError::CreateContractLimit) => b"ERR_CREATE_CONTRACT_LIMIT", - EvmError(ExitError::OutOfOffset) => b"ERR_OUT_OF_OFFSET", - EvmError(ExitError::OutOfGas) => b"ERR_OUT_OF_GAS", - EvmError(ExitError::OutOfFund) => b"ERR_OUT_OF_FUND", + EvmError(ExitError::StackUnderflow) => errors::ERR_STACK_UNDERFLOW, + EvmError(ExitError::StackOverflow) => errors::ERR_STACK_OVERFLOW, + EvmError(ExitError::InvalidJump) => errors::ERR_INVALID_JUMP, + EvmError(ExitError::InvalidRange) => errors::ERR_INVALID_RANGE, + EvmError(ExitError::DesignatedInvalid) => errors::ERR_DESIGNATED_INVALID, + EvmError(ExitError::CallTooDeep) => errors::ERR_CALL_TOO_DEEP, + EvmError(ExitError::CreateCollision) => errors::ERR_CREATE_COLLISION, + EvmError(ExitError::CreateContractLimit) => errors::ERR_CREATE_CONTRACT_LIMIT, + EvmError(ExitError::OutOfOffset) => errors::ERR_OUT_OF_OFFSET, + EvmError(ExitError::OutOfGas) => errors::ERR_OUT_OF_GAS, + EvmError(ExitError::OutOfFund) => errors::ERR_OUT_OF_FUND, EvmError(ExitError::Other(m)) => m.as_bytes(), EvmError(_) => unreachable!(), // unused misc - EvmFatal(ExitFatal::NotSupported) => b"ERR_NOT_SUPPORTED", - EvmFatal(ExitFatal::UnhandledInterrupt) => b"ERR_UNHANDLED_INTERRUPT", + EvmFatal(ExitFatal::NotSupported) => errors::ERR_NOT_SUPPORTED, + EvmFatal(ExitFatal::UnhandledInterrupt) => errors::ERR_UNHANDLED_INTERRUPT, EvmFatal(ExitFatal::Other(m)) => m.as_bytes(), EvmFatal(_) => unreachable!(), // unused misc - IncorrectNonce => b"ERR_INCORRECT_NONCE", + IncorrectNonce => errors::ERR_INCORRECT_NONCE, FailedTransactionParse(e) => e.as_ref(), - InvalidChainId => b"ERR_INVALID_CHAIN_ID", - InvalidSignature => b"ERR_INVALID_ECDSA_SIGNATURE", - IntrinsicGasNotMet => b"ERR_INTRINSIC_GAS", - MaxPriorityGasFeeTooLarge => b"ERR_MAX_PRIORITY_FEE_GREATER", + InvalidChainId => errors::ERR_INVALID_CHAIN_ID, + InvalidSignature => errors::ERR_INVALID_ECDSA_SIGNATURE, + IntrinsicGasNotMet => errors::ERR_INTRINSIC_GAS, + MaxPriorityGasFeeTooLarge => errors::ERR_MAX_PRIORITY_FEE_GREATER, GasPayment(e) => e.as_ref(), - GasOverflow => b"ERR_GAS_OVERFLOW", + GasOverflow => errors::ERR_GAS_OVERFLOW, } } } @@ -190,7 +192,7 @@ pub struct BalanceOverflow; impl AsRef<[u8]> for BalanceOverflow { fn as_ref(&self) -> &[u8] { - b"ERR_BALANCE_OVERFLOW" + errors::ERR_BALANCE_OVERFLOW } } @@ -210,8 +212,8 @@ impl AsRef<[u8]> for GasPaymentError { fn as_ref(&self) -> &[u8] { match self { Self::BalanceOverflow(overflow) => overflow.as_ref(), - Self::EthAmountOverflow => b"ERR_GAS_ETH_AMOUNT_OVERFLOW", - Self::OutOfFund => b"ERR_OUT_OF_FUND", + Self::EthAmountOverflow => errors::ERR_GAS_ETH_AMOUNT_OVERFLOW, + Self::OutOfFund => errors::ERR_OUT_OF_FUND, } } } @@ -241,7 +243,7 @@ impl AsRef<[u8]> for DeployErc20Error { } } -pub struct ERC20Address(Address); +pub struct ERC20Address(pub Address); impl AsRef<[u8]> for ERC20Address { fn as_ref(&self) -> &[u8] { @@ -267,11 +269,11 @@ pub struct AddressParseError; impl AsRef<[u8]> for AddressParseError { fn as_ref(&self) -> &[u8] { - b"ERR_PARSE_ADDRESS" + errors::ERR_PARSE_ADDRESS } } -pub struct NEP141Account(AccountId); +pub struct NEP141Account(pub AccountId); impl AsRef<[u8]> for NEP141Account { fn as_ref(&self) -> &[u8] { @@ -340,32 +342,50 @@ pub enum EngineStateError { impl AsRef<[u8]> for EngineStateError { fn as_ref(&self) -> &[u8] { match self { - Self::NotFound => b"ERR_STATE_NOT_FOUND", - Self::DeserializationFailed => b"ERR_STATE_CORRUPTED", + Self::NotFound => errors::ERR_STATE_NOT_FOUND, + Self::DeserializationFailed => errors::ERR_STATE_CORRUPTED, } } } -struct StackExecutorParams<'a, I, E> { - precompiles: Precompiles<'a, I, E>, +struct StackExecutorParams<'a, I, E, H> { + precompiles: Precompiles<'a, I, E, H>, gas_limit: u64, } -impl<'env, I: IO + Copy, E: Env> StackExecutorParams<'env, I, E> { +impl<'env, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> StackExecutorParams<'env, I, E, H> { fn new( gas_limit: u64, current_account_id: AccountId, random_seed: H256, io: I, env: &'env E, + ro_promise_handler: H, ) -> Self { - Self { - precompiles: Precompiles::new_london(PrecompileConstructorContext { + let precompiles = if cfg!(all(feature = "mainnet", not(feature = "integration-test"))) { + let mut tmp = Precompiles::new_london(PrecompileConstructorContext { current_account_id, random_seed, io, env, - }), + promise_handler: ro_promise_handler, + }); + // Cross contract calls are not enabled on mainnet yet. + tmp.all_precompiles + .remove(&aurora_engine_precompiles::xcc::cross_contract_call::ADDRESS); + tmp + } else { + Precompiles::new_london(PrecompileConstructorContext { + current_account_id, + random_seed, + io, + env, + promise_handler: ro_promise_handler, + }) + }; + + Self { + precompiles, gas_limit, } } @@ -377,7 +397,7 @@ impl<'env, I: IO + Copy, E: Env> StackExecutorParams<'env, I, E> { 'static, 'a, executor::stack::MemoryStackState>, - Precompiles<'env, I, E>, + Precompiles<'env, I, E, H>, > { let metadata = executor::stack::StackSubstateMetadata::new(self.gas_limit, CONFIG); let state = executor::stack::MemoryStackState::new(metadata, engine); @@ -527,6 +547,7 @@ impl<'env, I: IO + Copy, E: Env> Engine<'env, I, E> { self.env.random_seed(), self.io, self.env, + handler.read_only(), ); let mut executor = executor_params.make_executor(self); let address = executor.create_address(CreateScheme::Legacy { @@ -550,7 +571,7 @@ impl<'env, I: IO + Copy, E: Env> Engine<'env, I, E> { }; let (values, logs) = executor.into_state().deconstruct(); - let logs = filter_promises_from_logs(handler, logs); + let logs = filter_promises_from_logs(&self.io, handler, logs, &self.current_account_id); self.apply(values, Vec::::new(), true); @@ -613,6 +634,7 @@ impl<'env, I: IO + Copy, E: Env> Engine<'env, I, E> { self.env.random_seed(), self.io, self.env, + handler.read_only(), ); let mut executor = executor_params.make_executor(self); let (exit_reason, result) = executor.transact_call( @@ -634,7 +656,7 @@ impl<'env, I: IO + Copy, E: Env> Engine<'env, I, E> { }; let (values, logs) = executor.into_state().deconstruct(); - let logs = filter_promises_from_logs(handler, logs); + let logs = filter_promises_from_logs(&self.io, handler, logs, &self.current_account_id); // There is no way to return the logs to the NEAR log method as it only // allows a return of UTF-8 strings. @@ -664,6 +686,8 @@ impl<'env, I: IO + Copy, E: Env> Engine<'env, I, E> { self.env.random_seed(), self.io, self.env, + // View calls cannot interact with promises + aurora_engine_sdk::promise::Noop, ); let mut executor = executor_params.make_executor(self); let (status, result) = executor.transact_call( @@ -877,9 +901,11 @@ pub fn submit( handler: &mut P, ) -> EngineResult { #[cfg(feature = "contract")] - let transaction: NormalizedEthTransaction = EthTransactionKind::try_from(transaction_bytes) - .map_err(EngineErrorKind::FailedTransactionParse)? - .into(); + let transaction = NormalizedEthTransaction::try_from( + EthTransactionKind::try_from(transaction_bytes) + .map_err(EngineErrorKind::FailedTransactionParse)?, + ) + .map_err(|_e| EngineErrorKind::InvalidSignature)?; #[cfg(not(feature = "contract"))] // The standalone engine must use the backwards compatible parser to reproduce the NEAR state, @@ -894,7 +920,8 @@ pub fn submit( let tx: EthTransactionKind = adapter .try_parse_bytes(transaction_bytes, block_height) .map_err(EngineErrorKind::FailedTransactionParse)?; - tx.into() + tx.try_into() + .map_err(|_e| EngineErrorKind::InvalidSignature)? }; // Validate the chain ID, if provided inside the signature: @@ -905,9 +932,7 @@ pub fn submit( } // Retrieve the signer of the transaction: - let sender = transaction - .address - .ok_or(EngineErrorKind::InvalidSignature)?; + let sender = transaction.address; sdk::log!(crate::prelude::format!("signer_address {:?}", sender).as_str()); @@ -915,10 +940,10 @@ pub fn submit( // Check intrinsic gas is covered by transaction gas limit match transaction.intrinsic_gas(crate::engine::CONFIG) { - None => { + Err(_e) => { return Err(EngineErrorKind::GasOverflow.into()); } - Some(intrinsic_gas) => { + Ok(intrinsic_gas) => { if transaction.gas_limit < intrinsic_gas.into() { return Err(EngineErrorKind::IntrinsicGasNotMet.into()); } @@ -1348,10 +1373,16 @@ fn remove_account(io: &mut I, address: &Address, generation: u32) remove_all_storage(io, address, generation); } -fn filter_promises_from_logs(handler: &mut P, logs: T) -> Vec +fn filter_promises_from_logs( + io: &I, + handler: &mut P, + logs: T, + current_account_id: &AccountId, +) -> Vec where T: IntoIterator, P: PromiseHandler, + I: IO + Copy, { logs.into_iter() .filter_map(|log| { @@ -1376,6 +1407,25 @@ where // `topics` field. Some(log.into()) } + } else if log.address == cross_contract_call::ADDRESS.raw() { + if log.topics[0] == cross_contract_call::AMOUNT_TOPIC { + // NEAR balances are 128-bit, so the leading 16 bytes of the 256-bit topic + // value should always be zero. + assert_eq!(&log.topics[1].as_bytes()[0..16], &[0; 16]); + let required_near = + Yocto::new(U256::from_big_endian(log.topics[1].as_bytes()).low_u128()); + if let Ok(promise) = PromiseCreateArgs::try_from_slice(&log.data) { + crate::xcc::handle_precompile_promise( + io, + handler, + promise, + required_near, + current_account_id, + ); + } + } + // do not pass on these "internal logs" to caller + None } else { Some(log.into()) } diff --git a/engine/src/errors.rs b/engine/src/errors.rs new file mode 100644 index 000000000..57993de31 --- /dev/null +++ b/engine/src/errors.rs @@ -0,0 +1,89 @@ +pub const ERR_NOT_A_JSON_TYPE: &[u8; 19] = b"ERR_NOT_A_JSON_TYPE"; +pub const ERR_JSON_MISSING_VALUE: &[u8; 22] = b"ERR_JSON_MISSING_VALUE"; +pub const ERR_FAILED_PARSE_U8: &[u8; 19] = b"ERR_FAILED_PARSE_U8"; +pub const ERR_FAILED_PARSE_U64: &[u8; 20] = b"ERR_FAILED_PARSE_U64"; +pub const ERR_FAILED_PARSE_U128: &[u8; 21] = b"ERR_FAILED_PARSE_U128"; +pub const ERR_FAILED_PARSE_BOOL: &[u8; 21] = b"ERR_FAILED_PARSE_BOOL"; +pub const ERR_FAILED_PARSE_STRING: &[u8; 23] = b"ERR_FAILED_PARSE_STRING"; +pub const ERR_FAILED_PARSE_ARRAY: &[u8; 22] = b"ERR_FAILED_PARSE_ARRAY"; +pub const ERR_EXPECTED_STRING_GOT_NUMBER: &[u8; 30] = b"ERR_EXPECTED_STRING_GOT_NUMBER"; +pub const ERR_OUT_OF_RANGE_U8: &[u8; 19] = b"ERR_OUT_OF_RANGE_U8"; +pub const ERR_OUT_OF_RANGE_U128: &[u8; 21] = b"ERR_OUT_OF_RANGE_U128"; + +pub const ERR_PROMISE_COUNT: &[u8; 17] = b"ERR_PROMISE_COUNT"; +pub const ERR_REFUND_FAILURE: &[u8; 18] = b"ERR_REFUND_FAILURE"; +pub const ERR_NOT_ALLOWED_TOO_EARLY: &[u8; 25] = b"ERR_NOT_ALLOWED:TOO_EARLY"; +pub const ERR_PROMISE_FAILED: &[u8; 18] = b"ERR_PROMISE_FAILED"; +pub const ERR_VERIFY_PROOF: &[u8; 16] = b"ERR_VERIFY_PROOF"; +pub const ERR_INVALID_UPGRADE: &[u8; 19] = b"ERR_INVALID_UPGRADE"; +pub const ERR_NO_UPGRADE: &[u8; 14] = b"ERR_NO_UPGRADE"; +pub const ERR_NOT_ALLOWED: &[u8; 15] = b"ERR_NOT_ALLOWED"; + +pub const ERR_SERIALIZE: &str = "ERR_SERIALIZE"; +pub const ERR_PROMISE_ENCODING: &str = "ERR_PROMISE_ENCODING"; +pub const ERR_ARGS: &str = "ERR_ARGS"; +pub const ERR_VALUE_CONVERSION: &str = "ERR_VALUE_CONVERSION"; + +pub const ERR_BORSH_DESERIALIZE: &str = "ERR_BORSH_DESERIALIZE"; +pub const ERR_META_TX_PARSE: &str = "ERR_META_TX_PARSE"; + +pub const ERR_STACK_UNDERFLOW: &[u8; 19] = b"ERR_STACK_UNDERFLOW"; +pub const ERR_STACK_OVERFLOW: &[u8; 18] = b"ERR_STACK_OVERFLOW"; +pub const ERR_INVALID_JUMP: &[u8; 16] = b"ERR_INVALID_JUMP"; +pub const ERR_INVALID_RANGE: &[u8; 17] = b"ERR_INVALID_RANGE"; +pub const ERR_DESIGNATED_INVALID: &[u8; 22] = b"ERR_DESIGNATED_INVALID"; +pub const ERR_CALL_TOO_DEEP: &[u8; 17] = b"ERR_CALL_TOO_DEEP"; +pub const ERR_CREATE_COLLISION: &[u8; 20] = b"ERR_CREATE_COLLISION"; +pub const ERR_CREATE_CONTRACT_LIMIT: &[u8; 25] = b"ERR_CREATE_CONTRACT_LIMIT"; +pub const ERR_OUT_OF_OFFSET: &[u8; 17] = b"ERR_OUT_OF_OFFSET"; +pub const ERR_OUT_OF_GAS: &[u8; 14] = b"ERR_OUT_OF_GAS"; +pub const ERR_OUT_OF_FUND: &[u8; 15] = b"ERR_OUT_OF_FUND"; +pub const ERR_NOT_SUPPORTED: &[u8; 17] = b"ERR_NOT_SUPPORTED"; +pub const ERR_UNHANDLED_INTERRUPT: &[u8; 23] = b"ERR_UNHANDLED_INTERRUPT"; +pub const ERR_INCORRECT_NONCE: &[u8; 19] = b"ERR_INCORRECT_NONCE"; +pub const ERR_INVALID_CHAIN_ID: &[u8; 20] = b"ERR_INVALID_CHAIN_ID"; +pub const ERR_INVALID_ECDSA_SIGNATURE: &[u8; 27] = b"ERR_INVALID_ECDSA_SIGNATURE"; +pub const ERR_INTRINSIC_GAS: &[u8; 17] = b"ERR_INTRINSIC_GAS"; +pub const ERR_MAX_PRIORITY_FEE_GREATER: &[u8; 28] = b"ERR_MAX_PRIORITY_FEE_GREATER"; +pub const ERR_GAS_OVERFLOW: &[u8; 16] = b"ERR_GAS_OVERFLOW"; +pub const ERR_BALANCE_OVERFLOW: &[u8; 20] = b"ERR_BALANCE_OVERFLOW"; +pub const ERR_GAS_ETH_AMOUNT_OVERFLOW: &[u8; 27] = b"ERR_GAS_ETH_AMOUNT_OVERFLOW"; +pub const ERR_PARSE_ADDRESS: &[u8; 17] = b"ERR_PARSE_ADDRESS"; +pub const ERR_STATE_NOT_FOUND: &[u8; 19] = b"ERR_STATE_NOT_FOUND"; +pub const ERR_STATE_CORRUPTED: &[u8; 19] = b"ERR_STATE_CORRUPTED"; + +pub const ERR_CONNECTOR_STORAGE_KEY_NOT_FOUND: &[u8; 35] = b"ERR_CONNECTOR_STORAGE_KEY_NOT_FOUND"; +pub const ERR_FAILED_DESERIALIZE_CONNECTOR_DATA: &[u8; 37] = + b"ERR_FAILED_DESERIALIZE_CONNECTOR_DATA"; +pub const ERR_PROOF_EXIST: &[u8; 15] = b"ERR_PROOF_EXIST"; +pub const ERR_WRONG_EVENT_ADDRESS: &[u8; 23] = b"ERR_WRONG_EVENT_ADDRESS"; +pub const ERR_CONTRACT_INITIALIZED: &[u8; 24] = b"ERR_CONTRACT_INITIALIZED"; + +pub const ERR_RLP_FAILED: &[u8; 14] = b"ERR_RLP_FAILED"; +pub const ERR_PARSE_DEPOSIT_EVENT: &[u8; 23] = b"ERR_PARSE_DEPOSIT_EVENT"; +pub const ERR_INVALID_EVENT_MESSAGE_FORMAT: &[u8; 32] = b"ERR_INVALID_EVENT_MESSAGE_FORMAT"; +pub const ERR_INVALID_SENDER: &[u8; 18] = b"ERR_INVALID_SENDER"; +pub const ERR_INVALID_AMOUNT: &[u8; 18] = b"ERR_INVALID_AMOUNT"; +pub const ERR_INVALID_FEE: &[u8; 15] = b"ERR_INVALID_FEE"; +pub const ERR_INVALID_ON_TRANSFER_MESSAGE_FORMAT: &[u8; 38] = + b"ERR_INVALID_ON_TRANSFER_MESSAGE_FORMAT"; +pub const ERR_INVALID_ON_TRANSFER_MESSAGE_HEX: &[u8; 35] = b"ERR_INVALID_ON_TRANSFER_MESSAGE_HEX"; +pub const ERR_INVALID_ON_TRANSFER_MESSAGE_DATA: &[u8; 36] = b"ERR_INVALID_ON_TRANSFER_MESSAGE_DATA"; +pub const ERR_INVALID_ACCOUNT_ID: &[u8; 22] = b"ERR_INVALID_ACCOUNT_ID"; +pub const ERR_OVERFLOW_NUMBER: &[u8; 19] = b"ERR_OVERFLOW_NUMBER"; + +pub const ERR_TOTAL_SUPPLY_OVERFLOW: &[u8; 25] = b"ERR_TOTAL_SUPPLY_OVERFLOW"; +pub const ERR_NOT_ENOUGH_BALANCE: &[u8; 22] = b"ERR_NOT_ENOUGH_BALANCE"; +pub const ERR_TOTAL_SUPPLY_UNDERFLOW: &[u8; 26] = b"ERR_TOTAL_SUPPLY_UNDERFLOW"; +pub const ERR_ZERO_AMOUNT: &[u8; 15] = b"ERR_ZERO_AMOUNT"; +pub const ERR_SENDER_EQUALS_RECEIVER: &[u8; 26] = b"ERR_SENDER_EQUALS_RECEIVER"; +pub const ERR_ACCOUNT_NOT_REGISTERED: &[u8; 26] = b"ERR_ACCOUNT_NOT_REGISTERED"; +pub const ERR_NO_AVAILABLE_BALANCE: &[u8; 24] = b"ERR_NO_AVAILABLE_BALANCE"; +pub const ERR_ATTACHED_DEPOSIT_NOT_ENOUGH: &[u8; 31] = b"ERR_ATTACHED_DEPOSIT_NOT_ENOUGH"; +pub const ERR_FAILED_UNREGISTER_ACCOUNT_POSITIVE_BALANCE: &[u8; 46] = + b"ERR_FAILED_UNREGISTER_ACCOUNT_POSITIVE_BALANCE"; + +pub const ERR_ACCOUNTS_COUNTER_OVERFLOW: &str = "ERR_ACCOUNTS_COUNTER_OVERFLOW"; + +pub const ERR_REVERT: &[u8; 10] = b"ERR_REVERT"; +pub const ERR_OUT_OF_FUNDS: &[u8; 16] = b"ERR_OUT_OF_FUNDS"; diff --git a/engine/src/fungible_token.rs b/engine/src/fungible_token.rs index 5f3326b31..fd73dc778 100644 --- a/engine/src/fungible_token.rs +++ b/engine/src/fungible_token.rs @@ -127,7 +127,7 @@ impl From for JsonValue { ); kvs.insert( "decimals".to_string(), - JsonValue::U64(metadata.decimals as u64), + JsonValue::U64(u64::from(metadata.decimals)), ); JsonValue::Object(kvs) @@ -444,7 +444,7 @@ impl FungibleTokenOps { pub fn storage_balance_bounds(&self) -> StorageBalanceBounds { let required_storage_balance = - Yocto::new(self.account_storage_usage as u128 * sdk::storage_byte_cost() as u128); + Yocto::new(u128::from(self.account_storage_usage) * sdk::storage_byte_cost()); StorageBalanceBounds { min: required_storage_balance, max: Some(required_storage_balance), @@ -541,7 +541,7 @@ impl FungibleTokenOps { .read_u64(&key) .unwrap_or(0) .checked_add(1) - .expect("ERR_ACCOUNTS_COUNTER_OVERFLOW"); + .expect(crate::errors::ERR_ACCOUNTS_COUNTER_OVERFLOW); self.io.write_storage(&key, &accounts_counter.to_le_bytes()); } self.io @@ -573,7 +573,7 @@ impl FungibleTokenOps { fn account_to_key(account_id: &AccountId) -> Vec { let mut key = storage::bytes_to_key( storage::KeyPrefix::EthConnector, - &[storage::EthConnectorStorageId::FungibleToken as u8], + &[u8::from(storage::EthConnectorStorageId::FungibleToken)], ); key.extend_from_slice(account_id.as_bytes()); key @@ -583,20 +583,23 @@ impl FungibleTokenOps { fn get_statistic_key() -> Vec { storage::bytes_to_key( crate::prelude::storage::KeyPrefix::EthConnector, - &[crate::prelude::EthConnectorStorageId::StatisticsAuroraAccountsCounter as u8], + &[u8::from( + crate::prelude::EthConnectorStorageId::StatisticsAuroraAccountsCounter, + )], ) } } pub mod error { + use crate::errors; use crate::prelude::types::balance::error::BalanceOverflowError; - const TOTAL_SUPPLY_OVERFLOW: &[u8; 25] = b"ERR_TOTAL_SUPPLY_OVERFLOW"; - const BALANCE_OVERFLOW: &[u8; 20] = b"ERR_BALANCE_OVERFLOW"; - const NOT_ENOUGH_BALANCE: &[u8; 22] = b"ERR_NOT_ENOUGH_BALANCE"; - const TOTAL_SUPPLY_UNDERFLOW: &[u8; 26] = b"ERR_TOTAL_SUPPLY_UNDERFLOW"; - const ZERO_AMOUNT: &[u8; 15] = b"ERR_ZERO_AMOUNT"; - const SELF_TRANSFER: &[u8; 26] = b"ERR_SENDER_EQUALS_RECEIVER"; + const TOTAL_SUPPLY_OVERFLOW: &[u8; 25] = errors::ERR_TOTAL_SUPPLY_OVERFLOW; + const BALANCE_OVERFLOW: &[u8; 20] = errors::ERR_BALANCE_OVERFLOW; + const NOT_ENOUGH_BALANCE: &[u8; 22] = errors::ERR_NOT_ENOUGH_BALANCE; + const TOTAL_SUPPLY_UNDERFLOW: &[u8; 26] = errors::ERR_TOTAL_SUPPLY_UNDERFLOW; + const ZERO_AMOUNT: &[u8; 15] = errors::ERR_ZERO_AMOUNT; + const SELF_TRANSFER: &[u8; 26] = errors::ERR_SENDER_EQUALS_RECEIVER; #[derive(Debug)] pub enum DepositError { @@ -683,11 +686,11 @@ pub mod error { impl AsRef<[u8]> for StorageFundingError { fn as_ref(&self) -> &[u8] { match self { - Self::NotRegistered => b"ERR_ACCOUNT_NOT_REGISTERED", - Self::NoAvailableBalance => b"ERR_NO_AVAILABLE_BALANCE", - Self::InsufficientDeposit => b"ERR_ATTACHED_DEPOSIT_NOT_ENOUGH", + Self::NotRegistered => errors::ERR_ACCOUNT_NOT_REGISTERED, + Self::NoAvailableBalance => errors::ERR_NO_AVAILABLE_BALANCE, + Self::InsufficientDeposit => errors::ERR_ATTACHED_DEPOSIT_NOT_ENOUGH, Self::UnRegisterPositiveBalance => { - b"ERR_FAILED_UNREGISTER_ACCOUNT_POSITIVE_BALANCE" + errors::ERR_FAILED_UNREGISTER_ACCOUNT_POSITIVE_BALANCE } } } diff --git a/engine/src/json.rs b/engine/src/json.rs index 7883e8239..2759a82b3 100644 --- a/engine/src/json.rs +++ b/engine/src/json.rs @@ -1,5 +1,6 @@ use crate::prelude::{BTreeMap, String, Vec}; +use crate::errors; use core::convert::From; use rjson::{Array, Null, Object, Value}; @@ -88,13 +89,10 @@ impl JsonValue { #[allow(dead_code)] pub fn parse_u8(v: &JsonValue) -> Result { match v { - JsonValue::U64(n) => { - if *n > u8::MAX as u64 { - Err(JsonError::OutOfRange(JsonOutOfRangeError::OutOfRangeU8)) - } else { - Ok(*n as u8) - } - } + JsonValue::U64(n) => match u8::try_from(*n) { + Ok(v) => Ok(v), + Err(_e) => Err(JsonError::OutOfRange(JsonOutOfRangeError::OutOfRangeU8)), + }, _ => Err(JsonError::InvalidU8), } } @@ -103,15 +101,15 @@ impl JsonValue { impl AsRef<[u8]> for JsonError { fn as_ref(&self) -> &[u8] { match self { - Self::NotJsonType => b"ERR_NOT_A_JSON_TYPE", - Self::MissingValue => b"ERR_JSON_MISSING_VALUE", - Self::InvalidU8 => b"ERR_FAILED_PARSE_U8", - Self::InvalidU64 => b"ERR_FAILED_PARSE_U64", - Self::InvalidU128 => b"ERR_FAILED_PARSE_U128", - Self::InvalidBool => b"ERR_FAILED_PARSE_BOOL", - Self::InvalidString => b"ERR_FAILED_PARSE_STRING", - Self::InvalidArray => b"ERR_FAILED_PARSE_ARRAY", - Self::ExpectedStringGotNumber => b"ERR_EXPECTED_STRING_GOT_NUMBER", + Self::NotJsonType => errors::ERR_NOT_A_JSON_TYPE, + Self::MissingValue => errors::ERR_JSON_MISSING_VALUE, + Self::InvalidU8 => errors::ERR_FAILED_PARSE_U8, + Self::InvalidU64 => errors::ERR_FAILED_PARSE_U64, + Self::InvalidU128 => errors::ERR_FAILED_PARSE_U128, + Self::InvalidBool => errors::ERR_FAILED_PARSE_BOOL, + Self::InvalidString => errors::ERR_FAILED_PARSE_STRING, + Self::InvalidArray => errors::ERR_FAILED_PARSE_ARRAY, + Self::ExpectedStringGotNumber => errors::ERR_EXPECTED_STRING_GOT_NUMBER, Self::OutOfRange(err) => err.as_ref(), } } @@ -120,8 +118,8 @@ impl AsRef<[u8]> for JsonError { impl AsRef<[u8]> for JsonOutOfRangeError { fn as_ref(&self) -> &[u8] { match self { - Self::OutOfRangeU8 => b"ERR_OUT_OF_RANGE_U8", - Self::OutOfRangeU128 => b"ERR_OUT_OF_RANGE_U128", + Self::OutOfRangeU8 => errors::ERR_OUT_OF_RANGE_U8, + Self::OutOfRangeU128 => errors::ERR_OUT_OF_RANGE_U128, } } } @@ -275,7 +273,7 @@ impl core::fmt::Display for JsonValue { } pub fn parse_json(data: &[u8]) -> Option { - let data_array: Vec = data.iter().map(|b| *b as char).collect::>(); + let data_array: Vec = data.iter().map(|b| char::from(*b)).collect::>(); let mut index = 0; rjson::parse::(&*data_array, &mut index) } diff --git a/engine/src/lib.rs b/engine/src/lib.rs index 735fd0074..96be012ff 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -4,6 +4,7 @@ all(feature = "log", target_arch = "wasm32"), feature(panic_info_message) )] +#![deny(clippy::as_conversions)] use aurora_engine_types::parameters::PromiseCreateArgs; @@ -13,8 +14,6 @@ extern crate alloc; extern crate core; mod map; -#[cfg(feature = "meta-call")] -pub mod meta_parsing; pub mod parameters; pub mod proof; @@ -24,10 +23,12 @@ pub mod admin_controlled; pub mod connector; pub mod deposit_event; pub mod engine; +pub mod errors; pub mod fungible_token; pub mod json; pub mod log_entry; mod prelude; +pub mod xcc; #[cfg(target_arch = "wasm32")] #[global_allocator] @@ -70,6 +71,7 @@ mod contract { use crate::connector::{self, EthConnectorContract}; use crate::engine::{self, Engine, EngineState}; + use crate::errors; use crate::fungible_token::FungibleTokenMetadata; use crate::json::parse_json; use crate::parameters::{ @@ -99,7 +101,6 @@ mod contract { const CODE_KEY: &[u8; 4] = b"CODE"; const CODE_STAGE_KEY: &[u8; 10] = b"CODE_STAGE"; - const PROMISE_COUNT_ERR: &str = "ERR_PROMISE_COUNT"; /// /// ADMINISTRATIVE METHODS @@ -141,8 +142,8 @@ mod contract { #[no_mangle] pub extern "C" fn get_bridge_prover() { let mut io = Runtime; - let state = engine::get_state(&io).sdk_unwrap(); - io.return_output(state.bridge_prover_id.as_bytes()); + let connector = EthConnectorContract::init_instance(io).sdk_unwrap(); + io.return_output(connector.get_bridge_prover().as_bytes()); } /// Get chain id for this contract. @@ -182,7 +183,7 @@ mod contract { require_owner_only(&state, &io.predecessor_account_id()); let index = internal_get_upgrade_index(); if io.block_height() <= index + state.upgrade_delay_blocks { - sdk::panic_utf8(b"ERR_NOT_ALLOWED:TOO_EARLY"); + sdk::panic_utf8(errors::ERR_NOT_ALLOWED_TOO_EARLY); } Runtime::self_deploy(&bytes_to_key(KeyPrefix::Config, CODE_KEY)); } @@ -213,7 +214,7 @@ mod contract { ) .sdk_unwrap(); Engine::deploy_code_with_input(&mut engine, input, &mut Runtime) - .map(|res| res.try_to_vec().sdk_expect("ERR_SERIALIZE")) + .map(|res| res.try_to_vec().sdk_expect(errors::ERR_SERIALIZE)) .sdk_process(); // TODO: charge for storage } @@ -223,7 +224,7 @@ mod contract { pub extern "C" fn call() { let io = Runtime; let bytes = io.read_input().to_vec(); - let args = CallArgs::deserialize(&bytes).sdk_expect("ERR_BORSH_DESERIALIZE"); + let args = CallArgs::deserialize(&bytes).sdk_expect(errors::ERR_BORSH_DESERIALIZE); let current_account_id = io.current_account_id(); let mut engine = Engine::new( predecessor_address(&io.predecessor_account_id()), @@ -233,7 +234,7 @@ mod contract { ) .sdk_unwrap(); Engine::call_with_args(&mut engine, args, &mut Runtime) - .map(|res| res.try_to_vec().sdk_expect("ERR_SERIALIZE")) + .map(|res| res.try_to_vec().sdk_expect(errors::ERR_SERIALIZE)) .sdk_process(); // TODO: charge for storage } @@ -258,41 +259,7 @@ mod contract { ); result - .map(|res| res.try_to_vec().sdk_expect("ERR_SERIALIZE")) - .sdk_process(); - } - - #[cfg(feature = "meta-call")] - #[no_mangle] - pub extern "C" fn meta_call() { - use crate::prelude::U256; - let io = Runtime; - let input = io.read_input().to_vec(); - let state = engine::get_state(&io).sdk_unwrap(); - let domain_separator = crate::meta_parsing::near_erc712_domain(U256::from(state.chain_id)); - let meta_call_args = crate::meta_parsing::parse_meta_call( - &domain_separator, - io.current_account_id().as_bytes(), - input, - ) - .sdk_expect("ERR_META_TX_PARSE"); - - engine::check_nonce(&io, &meta_call_args.sender, &meta_call_args.nonce).sdk_unwrap(); - - let current_account_id = io.current_account_id(); - let mut engine = - Engine::new_with_state(state, meta_call_args.sender, current_account_id, io, &io); - let result = engine.call( - &meta_call_args.sender, - &meta_call_args.contract_address, - meta_call_args.value, - meta_call_args.input, - u64::MAX, // TODO: is there a gas limit with meta calls? - crate::prelude::Vec::new(), - &mut Runtime, - ); - result - .map(|res| res.try_to_vec().sdk_expect("ERR_SERIALIZE")) + .map(|res| res.try_to_vec().sdk_expect(errors::ERR_SERIALIZE)) .sdk_process(); } @@ -316,6 +283,40 @@ mod contract { ); } + /// Updates the bytecode for user's router contracts created by the engine. + /// These contracts are where cross-contract calls initiated by the EVM precompile + /// will be sent from. + #[no_mangle] + pub extern "C" fn factory_update() { + let mut io = Runtime; + let state = engine::get_state(&io).sdk_unwrap(); + require_owner_only(&state, &io.predecessor_account_id()); + let bytes = io.read_input().to_vec(); + let router_bytecode = crate::xcc::RouterCode::new(bytes); + crate::xcc::update_router_code(&mut io, &router_bytecode); + } + + /// Updates the bytecode version for the given account. This is only called as a callback + /// when a new version of the router contract is deployed to an account. + #[no_mangle] + pub extern "C" fn factory_update_address_version() { + let mut io = Runtime; + io.assert_private_call().sdk_unwrap(); + let args: crate::xcc::AddressVersionUpdateArgs = io.read_input_borsh().sdk_unwrap(); + crate::xcc::set_code_version_of_address(&mut io, &args.address, args.version); + } + + /// Sets the address for the wNEAR ERC-20 contract. This contract will be used by the + /// cross-contract calls feature to have users pay for their NEAR transactions. + #[no_mangle] + pub extern "C" fn factory_set_wnear_address() { + let mut io = Runtime; + let state = engine::get_state(&io).sdk_unwrap(); + require_owner_only(&state, &io.predecessor_account_id()); + let address = io.read_input_arr20().sdk_unwrap(); + crate::xcc::set_wnear_address(&mut io, &Address::from_array(address)); + } + /// Allow receiving NEP141 tokens to the EVM contract. /// /// This function returns the amount of tokens to return to the sender. @@ -365,7 +366,12 @@ mod contract { let address = engine::deploy_erc20_token(args, io, &io, &mut Runtime).sdk_unwrap(); - io.return_output(&address.as_bytes().try_to_vec().sdk_expect("ERR_SERIALIZE")); + io.return_output( + &address + .as_bytes() + .try_to_vec() + .sdk_expect(errors::ERR_SERIALIZE), + ); // TODO: charge for storage } @@ -380,7 +386,7 @@ mod contract { // This function should only be called as the callback of // exactly one promise. if io.promise_results_count() != 1 { - sdk::panic_utf8(PROMISE_COUNT_ERR.as_bytes()); + sdk::panic_utf8(errors::ERR_PROMISE_COUNT); } if let Some(PromiseResult::Successful(_)) = io.promise_result(0) { @@ -393,7 +399,7 @@ mod contract { engine::refund_on_error(io, &io, state, args, &mut Runtime).sdk_unwrap(); if !refund_result.status.is_ok() { - sdk::panic_utf8(b"ERR_REFUND_FAILURE"); + sdk::panic_utf8(errors::ERR_REFUND_FAILURE); } } } @@ -409,7 +415,7 @@ mod contract { let current_account_id = io.current_account_id(); let engine = Engine::new(args.sender, current_account_id, io, &env).sdk_unwrap(); let result = Engine::view_with_args(&engine, args).sdk_unwrap(); - io.return_output(&result.try_to_vec().sdk_expect("ERR_SERIALIZE")); + io.return_output(&result.try_to_vec().sdk_expect(errors::ERR_SERIALIZE)); } #[no_mangle] @@ -517,6 +523,7 @@ mod contract { } #[no_mangle] + pub extern "C" fn withdraw() { let io = Runtime; io.assert_one_yocto().sdk_unwrap(); @@ -527,11 +534,15 @@ mod contract { .sdk_unwrap() .withdraw_eth_from_near(¤t_account_id, &predecessor_account_id, args) .sdk_unwrap(); - let result_bytes = result.try_to_vec().sdk_expect("ERR_SERIALIZE"); + let result_bytes = result.try_to_vec().sdk_expect(errors::ERR_SERIALIZE); // We intentionally do not go through the `io` struct here because we must bypass // the check that prevents output that is accepted by the eth_custodian + #[allow(clippy::as_conversions)] unsafe { - exports::value_return(result_bytes.len() as u64, result_bytes.as_ptr() as u64); + exports::value_return( + u64::try_from(result_bytes.len()).sdk_expect(errors::ERR_VALUE_CONVERSION), + result_bytes.as_ptr() as u64, + ); } } @@ -556,16 +567,16 @@ mod contract { // Check result from proof verification call if io.promise_results_count() != 1 { - sdk::panic_utf8(PROMISE_COUNT_ERR.as_bytes()); + sdk::panic_utf8(errors::ERR_PROMISE_COUNT); } let promise_result = match io.promise_result(0) { Some(PromiseResult::Successful(bytes)) => { - bool::try_from_slice(&bytes).sdk_expect("ERR_PROMISE_ENCODING") + bool::try_from_slice(&bytes).sdk_expect(errors::ERR_PROMISE_ENCODING) } - _ => sdk::panic_utf8(b"ERR_PROMISE_FAILED"), + _ => sdk::panic_utf8(errors::ERR_PROMISE_FAILED), }; if !promise_result { - sdk::panic_utf8(b"ERR_VERIFY_PROOF"); + sdk::panic_utf8(errors::ERR_VERIFY_PROOF); } let data = io.read_input_borsh().sdk_unwrap(); @@ -666,7 +677,7 @@ mod contract { io.assert_private_call().sdk_unwrap(); if io.promise_results_count() != 1 { - sdk::panic_utf8(PROMISE_COUNT_ERR.as_bytes()); + sdk::panic_utf8(errors::ERR_PROMISE_COUNT); } let args: ResolveTransferCallArgs = io.read_input().to_value().sdk_unwrap(); @@ -840,10 +851,10 @@ mod contract { const GAS_FOR_FINISH: NearGas = NearGas::new(50_000_000_000_000); let mut io = Runtime; - let args: ([u8; 20], u64, u64) = io.read_input_borsh().sdk_expect("ERR_ARGS"); + let args: ([u8; 20], u64, u64) = io.read_input_borsh().sdk_expect(errors::ERR_ARGS); let address = Address::from_array(args.0); let nonce = U256::from(args.1); - let balance = NEP141Wei::new(args.2 as u128); + let balance = NEP141Wei::new(u128::from(args.2)); let current_account_id = io.current_account_id(); let mut engine = Engine::new(address, current_account_id, io, &io).sdk_unwrap(); let state_change = evm::backend::Apply::Modify { @@ -899,14 +910,16 @@ mod contract { let io = Runtime; match io.read_u64(&bytes_to_key(KeyPrefix::Config, CODE_STAGE_KEY)) { Ok(index) => index, - Err(sdk::error::ReadU64Error::InvalidU64) => sdk::panic_utf8(b"ERR_INVALID_UPGRADE"), - Err(sdk::error::ReadU64Error::MissingValue) => sdk::panic_utf8(b"ERR_NO_UPGRADE"), + Err(sdk::error::ReadU64Error::InvalidU64) => { + sdk::panic_utf8(errors::ERR_INVALID_UPGRADE) + } + Err(sdk::error::ReadU64Error::MissingValue) => sdk::panic_utf8(errors::ERR_NO_UPGRADE), } } fn require_owner_only(state: &EngineState, predecessor_account_id: &AccountId) { if &state.owner_id != predecessor_account_id { - sdk::panic_utf8(b"ERR_NOT_ALLOWED"); + sdk::panic_utf8(errors::ERR_NOT_ALLOWED); } } diff --git a/engine/src/meta_parsing.rs b/engine/src/meta_parsing.rs deleted file mode 100644 index f464f36cc..000000000 --- a/engine/src/meta_parsing.rs +++ /dev/null @@ -1,727 +0,0 @@ -use crate::parameters::MetaCallArgs; -use crate::prelude::precompiles::secp256k1::ecrecover; -use crate::prelude::{ - keccak, u256_to_arr, vec, Address, BorshDeserialize, Box, HashMap, InternalMetaCallArgs, - RawU256, String, ToOwned, ToString, Vec, Wei, H160, H256, U256, -}; -use ethabi::{encode, Token as ABIToken}; -use logos::Logos; -use rlp::{Decodable, DecoderError, Rlp}; - -/// Internal errors to propagate up and format in the single place. -pub enum ParsingError { - ArgumentParseError, - InvalidMetaTransactionMethodName, - InvalidMetaTransactionFunctionArg, - InvalidEcRecoverSignature, - ArgsLengthMismatch, -} - -pub type ParsingResult = core::result::Result; - -mod type_lexer { - use logos::{Lexer, Logos}; - - #[derive(Logos, Debug, PartialEq)] - pub(super) enum Token { - #[regex("byte|bytes[1-2][0-9]?|bytes3[0-2]?|bytes[4-9]", fixed_bytes_size)] - FixedBytes(u8), - #[regex("uint(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?", |lex| fixed_int_size(lex, "uint"))] - Uint(usize), - #[regex("int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?", |lex| fixed_int_size(lex, "int"))] - Int(usize), - #[regex("bool")] - Bool, - #[regex("address")] - Address, - #[regex("bytes")] - Bytes, - #[regex("string")] - String, - #[regex("\\[[0-9]*\\]", reference_type_size)] - ReferenceType(Option), - #[regex("[a-zA-Z_$][a-zA-Z0-9_$]*")] - Identifier, - - #[error] - Error, - } - - fn fixed_bytes_size(lex: &mut Lexer) -> u8 { - let slice = lex.slice(); - - if slice == "byte" { - return 1; - } - - let n = slice["bytes".len()..].parse(); - n.ok().unwrap_or(1) - } - - fn fixed_int_size(lex: &mut Lexer, prefix: &str) -> usize { - let slice = lex.slice(); - - if slice == prefix { - // the default int size is 32 - return 32; - } - - let n = slice[prefix.len()..].parse(); - n.unwrap_or(32) - } - - fn reference_type_size(lex: &mut Lexer) -> Option { - let slice = lex.slice(); - - if slice == "[]" { - return None; - } - - let end_index = slice.len() - 1; - let n = slice[1..end_index].parse(); - n.ok() - } -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub enum ArgType { - Address, - Uint, - Int, - String, - Bool, - Bytes, - Byte(u8), - Custom(String), - Array { - length: Option, - inner: Box, - }, -} - -/// the type string is being validated before it's parsed. -/// field_type: A single evm function arg type in string, without the argument name -/// e.g. "bytes" "uint256[][3]" "CustomStructName" -pub fn parse_type(field_type: &str) -> ParsingResult { - let mut lexer = type_lexer::Token::lexer(field_type); - let mut current_token = lexer.next(); - let mut inner_type: Option = None; - - loop { - let typ = match current_token { - None => break, - Some(type_lexer::Token::Address) => ArgType::Address, - Some(type_lexer::Token::Bool) => ArgType::Bool, - Some(type_lexer::Token::String) => ArgType::String, - Some(type_lexer::Token::Bytes) => ArgType::Bytes, - Some(type_lexer::Token::Identifier) => ArgType::Custom(lexer.slice().to_owned()), - Some(type_lexer::Token::FixedBytes(size)) => ArgType::Byte(size), - Some(type_lexer::Token::Int(_)) => ArgType::Int, - Some(type_lexer::Token::Uint(_)) => ArgType::Uint, - Some(type_lexer::Token::ReferenceType(length)) => match inner_type { - None => return Err(ParsingError::ArgumentParseError), - Some(t) => ArgType::Array { - length, - inner: Box::new(t), - }, - }, - Some(type_lexer::Token::Error) => return Err(ParsingError::ArgumentParseError), - }; - inner_type = Some(typ); - current_token = lexer.next(); - } - - inner_type.ok_or(ParsingError::ArgumentParseError) -} - -/// NEAR's domainSeparator -/// See https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator -/// and https://eips.ethereum.org/EIPS/eip-712#rationale-for-domainseparator -/// for definition and rationale for domainSeparator. -pub fn near_erc712_domain(chain_id: U256) -> RawU256 { - let mut bytes = Vec::with_capacity(70); - bytes.extend_from_slice( - keccak("EIP712Domain(string name,string version,uint256 chainId)".as_bytes()).as_bytes(), - ); - let near: RawU256 = keccak(b"NEAR").into(); - bytes.extend_from_slice(&near); - let version: RawU256 = keccak(b"1").into(); - bytes.extend_from_slice(&version); - bytes.extend_from_slice(&u256_to_arr(&chain_id)); - keccak(&bytes).into() -} - -/// method_sig: format like "adopt(uint256,PetObj)" (no additional PetObj definition) -pub fn method_sig_to_abi(method_sig: &str) -> [u8; 4] { - let mut result = [0u8; 4]; - result.copy_from_slice(&keccak(method_sig.as_bytes())[..4]); - result -} - -pub fn encode_address(addr: Address) -> Vec { - let mut bytes = vec![0u8; 12]; - bytes.extend_from_slice(&addr.raw().as_bytes()); - bytes -} - -#[allow(dead_code)] -pub fn encode_string(s: &str) -> Vec { - let mut bytes = vec![]; - bytes.extend_from_slice(keccak(s.as_bytes()).as_bytes()); - bytes -} - -#[derive(Debug, Eq, PartialEq)] -pub enum RlpValue { - Bytes(Vec), - List(Vec), -} - -impl Decodable for RlpValue { - fn decode(rlp: &Rlp<'_>) -> core::result::Result { - if rlp.is_list() { - Ok(RlpValue::List(rlp.as_list()?)) - } else { - Ok(RlpValue::Bytes( - rlp.decoder().decode_value(|bytes| Ok(bytes.to_vec()))?, - )) - } - } -} - -#[derive(Debug, Eq, PartialEq)] -/// An argument specified in a evm method definition -pub struct Arg { - #[allow(dead_code)] - pub name: String, - pub type_raw: String, - pub t: ArgType, -} - -#[derive(Debug, Eq, PartialEq)] -/// A parsed evm method definition -pub struct Method { - pub name: String, - pub raw: String, - pub args: Vec, -} - -#[derive(Debug, Eq, PartialEq)] -pub struct MethodAndTypes { - pub method: Method, - pub type_sequences: Vec, - pub types: HashMap, -} - -impl Arg { - fn parse(text: &str) -> ParsingResult<(Arg, &str)> { - let (type_raw, remains) = parse_type_raw(text)?; - let t = parse_type(&type_raw)?; - let remains = consume(remains, ' ')?; - let (name, remains) = parse_ident(remains)?; - Ok((Arg { name, type_raw, t }, remains)) - } - - fn parse_args(text: &str) -> ParsingResult<(Vec, &str)> { - let mut remains = consume(text, '(')?; - if remains.is_empty() { - return Err(ParsingError::InvalidMetaTransactionMethodName); - } - let mut args = vec![]; - let first = remains.chars().next().unwrap(); - if is_arg_start(first) { - let (arg, r) = Arg::parse(remains)?; - remains = r; - args.push(arg); - while remains.starts_with(',') { - remains = consume(remains, ',')?; - let (arg, r) = Arg::parse(remains)?; - remains = r; - args.push(arg); - } - } - - let remains = consume(remains, ')')?; - - Ok((args, remains)) - } -} - -impl Method { - fn parse(method_def: &str) -> ParsingResult<(Method, &str)> { - let (name, remains) = parse_ident(method_def)?; - let (args, remains) = Arg::parse_args(remains)?; - Ok(( - Method { - name, - args, - raw: method_def[..method_def.len() - remains.len()].to_string(), - }, - remains, - )) - } -} - -impl MethodAndTypes { - pub fn parse(method_def: &str) -> ParsingResult { - let method_def = method_def; - let mut parsed_types = HashMap::new(); - let mut type_sequences = vec![]; - let (method, mut types) = Method::parse(method_def)?; - while !types.is_empty() { - let (ty, remains) = Method::parse(types)?; - type_sequences.push(ty.name.clone()); - parsed_types.insert(ty.name.clone(), ty); - types = remains; - } - Ok(MethodAndTypes { - method, - types: parsed_types, - type_sequences, - }) - } -} - -fn parse_ident(text: &str) -> ParsingResult<(String, &str)> { - let mut chars = text.chars(); - if text.is_empty() || !is_arg_start(chars.next().unwrap()) { - return Err(ParsingError::InvalidMetaTransactionMethodName); - } - - let mut i = 1; - for c in chars { - if !is_arg_char(c) { - break; - } - i += 1; - } - Ok((text[..i].to_string(), &text[i..])) -} - -/// Tokenizer a type specifier from a method definition -/// E.g. text: "uint256[] petIds,..." -/// returns: "uint256[]", " petIds,..." -/// "uint256[]" is not parsed further to "an array of uint256" in this fn -fn parse_type_raw(text: &str) -> ParsingResult<(String, &str)> { - let i = text - .find(' ') - .ok_or(ParsingError::InvalidMetaTransactionMethodName)?; - Ok((text[..i].to_string(), &text[i..])) -} - -/// Consume next char in text, it must be c or return parse error -/// return text without the first char -fn consume(text: &str, c: char) -> ParsingResult<&str> { - let first = text.chars().next(); - if first.is_none() || first.unwrap() != c { - return Err(ParsingError::InvalidMetaTransactionMethodName); - } - - Ok(&text[1..]) -} - -/// Return true if c can be used as first char of a evm method arg -fn is_arg_start(c: char) -> bool { - c.is_ascii_alphabetic() || c == '_' -} - -/// Return true if c can be used as consequent char of a evm method arg -fn is_arg_char(c: char) -> bool { - c.is_ascii_alphanumeric() || c == '_' -} - -/// Return a signature of the method_def with additional args -/// E.g. methods_signature(Methods before parse: "adopt(uint256 petId,PetObj petobj)PetObj(string name)") -/// -> "adopt(uint256,PetObj)" -fn method_signature(method_and_type: &MethodAndTypes) -> String { - let mut result = method_and_type.method.name.clone(); - result.push('('); - for (i, arg) in method_and_type.method.args.iter().enumerate() { - if i > 0 { - result.push(','); - } - result.push_str(&arg.type_raw); - } - result.push(')'); - result -} - -/// Decode rlp-encoded args into vector of Values -fn rlp_decode(args: &[u8]) -> ParsingResult> { - let rlp = Rlp::new(args); - let res: core::result::Result, DecoderError> = rlp.as_list(); - res.map_err(|_| ParsingError::InvalidMetaTransactionFunctionArg) -} - -/// eip-712 hash a single argument, whose type is ty, and value is value. -/// Definition of all types is in `types`. -fn eip_712_hash_argument( - ty: &ArgType, - value: &RlpValue, - types: &HashMap, -) -> ParsingResult> { - match ty { - ArgType::String | ArgType::Bytes => { - eip_712_rlp_value(value, |b| Ok(keccak(b).as_bytes().to_vec())) - } - ArgType::Byte(_) => eip_712_rlp_value(value, |b| Ok(b.clone())), - // TODO: ensure rlp int is encoded as sign extended uint256, otherwise this is wrong - ArgType::Uint | ArgType::Int | ArgType::Bool => eip_712_rlp_value(value, |b| { - Ok(u256_to_arr(&U256::from_big_endian(b)).to_vec()) - }), - ArgType::Address => eip_712_rlp_value(value, |b| { - Ok(encode_address( - Address::try_from_slice(b).map_err(|_| ParsingError::ArgumentParseError)?, - )) - }), - ArgType::Array { inner, .. } => eip_712_rlp_list(value, |l| { - let mut r = vec![]; - for element in l { - r.extend_from_slice(&eip_712_hash_argument(inner, element, types)?); - } - Ok(keccak(&r).as_bytes().to_vec()) - }), - ArgType::Custom(type_name) => eip_712_rlp_list(value, |l| { - let struct_type = types - .get(type_name) - .ok_or(ParsingError::InvalidMetaTransactionFunctionArg)?; - // struct_type.raw is with struct type with argument names (a "method_def"), so it follows - // EIP-712 typeHash. - let mut r = keccak(struct_type.raw.as_bytes()).as_bytes().to_vec(); - for (i, element) in l.iter().enumerate() { - r.extend_from_slice(&eip_712_hash_argument( - &struct_type.args[i].t, - element, - types, - )?); - } - Ok(keccak(&r).as_bytes().to_vec()) - }), - } -} - -/// EIP-712 hash a RLP list. f must contain actual logic of EIP-712 encoding -/// This function serves as a guard to assert value is a List instead of Value -fn eip_712_rlp_list(value: &RlpValue, f: F) -> ParsingResult> -where - F: Fn(&Vec) -> ParsingResult>, -{ - match value { - RlpValue::Bytes(_) => Err(ParsingError::InvalidMetaTransactionFunctionArg), - RlpValue::List(l) => f(l), - } -} - -/// EIP-712 hash a RLP value. f must contain actual logic of EIP-712 encoding -/// This function serves as a guard to assert value is a Value instead of List -fn eip_712_rlp_value(value: &RlpValue, f: F) -> ParsingResult> -where - F: Fn(&Vec) -> ParsingResult>, -{ - match value { - RlpValue::List(_) => Err(ParsingError::InvalidMetaTransactionFunctionArg), - RlpValue::Bytes(b) => f(b), - } -} - -fn eth_abi_encode_args( - args_decoded: &[RlpValue], - methods: &MethodAndTypes, -) -> ParsingResult> { - let mut tokens = vec![]; - for (i, arg) in args_decoded.iter().enumerate() { - tokens.push(arg_to_abi_token(&methods.method.args[i].t, arg, methods)?); - } - Ok(encode(&tokens)) -} - -fn arg_to_abi_token( - ty: &ArgType, - arg: &RlpValue, - methods: &MethodAndTypes, -) -> ParsingResult { - match ty { - ArgType::String | ArgType::Bytes => { - value_to_abi_token(arg, |b| Ok(ABIToken::Bytes(b.clone()))) - } - ArgType::Byte(_) => value_to_abi_token(arg, |b| Ok(ABIToken::FixedBytes(b.clone()))), - ArgType::Uint | ArgType::Int | ArgType::Bool => { - value_to_abi_token(arg, |b| Ok(ABIToken::Uint(U256::from_big_endian(b)))) - } - ArgType::Address => { - value_to_abi_token(arg, |b| Ok(ABIToken::Address(H160::from_slice(&b[..])))) - } - ArgType::Array { - inner, - length: None, - } => list_to_abi_token(arg, |l| { - let mut tokens = vec![]; - for arg in l { - tokens.push(arg_to_abi_token(inner, arg, methods)?); - } - Ok(ABIToken::Array(tokens)) - }), - ArgType::Array { - inner, - length: Some(_), - } => list_to_abi_token(arg, |l| { - let mut tokens = vec![]; - for arg in l { - tokens.push(arg_to_abi_token(inner, arg, methods)?); - } - Ok(ABIToken::FixedArray(tokens)) - }), - ArgType::Custom(type_name) => list_to_abi_token(arg, |l| { - let struct_type = methods - .types - .get(type_name) - .ok_or(ParsingError::InvalidMetaTransactionFunctionArg)?; - let mut tokens = vec![]; - for (i, element) in l.iter().enumerate() { - tokens.push(arg_to_abi_token(&struct_type.args[i].t, element, methods)?); - } - Ok(ABIToken::Tuple(tokens)) - }), - } -} - -fn value_to_abi_token(value: &RlpValue, f: F) -> ParsingResult -where - F: Fn(&Vec) -> ParsingResult, -{ - match value { - RlpValue::List(_) => Err(ParsingError::InvalidMetaTransactionFunctionArg), - RlpValue::Bytes(b) => f(b), - } -} - -fn list_to_abi_token(value: &RlpValue, f: F) -> ParsingResult -where - F: Fn(&Vec) -> ParsingResult, -{ - match value { - RlpValue::Bytes(_) => Err(ParsingError::InvalidMetaTransactionFunctionArg), - RlpValue::List(l) => f(l), - } -} - -/// eip-712 hash struct of entire meta txn and abi-encode function args to evm input -pub fn prepare_meta_call_args( - domain_separator: &RawU256, - account_id: &[u8], - method_def: String, - input: &InternalMetaCallArgs, -) -> ParsingResult<(RawU256, Vec)> { - let mut bytes = Vec::new(); - let method_arg_start = match method_def.find('(') { - Some(index) => index, - None => return Err(ParsingError::InvalidMetaTransactionMethodName), - }; - let arguments = "Arguments".to_string() + &method_def[method_arg_start..]; - // Note: method_def is like "adopt(uint256 petId,PetObj petObj)PetObj(string name,address owner)", - // MUST have no space after `,`. EIP-712 requires hashStruct start by packing the typeHash, - // See "Rationale for typeHash" in https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct - // method_def is used here for typeHash - let types = "NearTx(string evmId,uint256 nonce,uint256 feeAmount,address feeAddress,address contractAddress,uint256 value,string contractMethod,Arguments arguments)".to_string() + &arguments; - bytes.extend_from_slice(keccak(types.as_bytes()).as_bytes()); - bytes.extend_from_slice(keccak(account_id).as_bytes()); - bytes.extend_from_slice(&u256_to_arr(&input.nonce)); - bytes.extend_from_slice(&input.fee_amount.to_bytes()); - bytes.extend_from_slice(&encode_address(input.fee_address)); - bytes.extend_from_slice(&encode_address(input.contract_address)); - bytes.extend_from_slice(&input.value.to_bytes()); - - let methods = MethodAndTypes::parse(&method_def)?; - let method_sig = method_signature(&methods); - bytes.extend_from_slice(keccak(method_sig.as_bytes()).as_bytes()); - - let mut arg_bytes = Vec::new(); - arg_bytes.extend_from_slice(keccak(arguments.as_bytes()).as_bytes()); - let args_decoded: Vec = rlp_decode(&input.input)?; - if methods.method.args.len() != args_decoded.len() { - return Err(ParsingError::ArgsLengthMismatch); - } - for (i, arg) in args_decoded.iter().enumerate() { - arg_bytes.extend_from_slice(&eip_712_hash_argument( - &methods.method.args[i].t, - arg, - &methods.types, - )?); - } - - // ETH-ABI require function selector to use method_sig, instead of method_name, - // See https://docs.soliditylang.org/en/v0.7.5/abi-spec.html#function-selector - // Above spec is not completely clear, this implementation shows signature is the one without - // argument name: - // https://github.com/rust-ethereum/ethabi/blob/69285cf6b6202d9faa19c7d0239df6a2bd79d55f/ethabi/src/signature.rs#L28 - let method_selector = method_sig_to_abi(&method_sig); - let args_eth_abi = eth_abi_encode_args(&args_decoded, &methods)?; - let input = [method_selector.to_vec(), args_eth_abi.to_vec()].concat(); - - let arg_bytes_hash: RawU256 = keccak(&arg_bytes).into(); - bytes.extend_from_slice(&arg_bytes_hash); - - let message: RawU256 = keccak(&bytes).into(); - let mut bytes = Vec::with_capacity(2 + 32 + 32); - bytes.extend_from_slice(&[0x19, 0x01]); - bytes.extend_from_slice(domain_separator); - bytes.extend_from_slice(&message); - Ok((keccak(&bytes).into(), input)) -} - -/// Parse encoded `MetaCallArgs`, validate with given domain and account and recover the sender's address from the signature. -/// Returns error if method definition or arguments are wrong, invalid signature or EC recovery failed. -pub fn parse_meta_call( - domain_separator: &RawU256, - account_id: &[u8], - args: Vec, -) -> ParsingResult { - let meta_tx = - MetaCallArgs::try_from_slice(&args).map_err(|_| ParsingError::ArgumentParseError)?; - let nonce = U256::from(meta_tx.nonce); - let fee_amount = Wei::new(U256::from(meta_tx.fee_amount)); - let fee_address = meta_tx.fee_address; - let contract_address = meta_tx.contract_address; - let value = Wei::new(U256::from(meta_tx.value)); - - let mut result = InternalMetaCallArgs { - sender: Address::zero(), - nonce, - fee_amount, - fee_address, - contract_address, - value, - input: meta_tx.args, - }; - let (msg, input) = - prepare_meta_call_args(domain_separator, account_id, meta_tx.method_def, &result)?; - let mut signature: [u8; 65] = [0; 65]; - signature[64] = meta_tx.v; - signature[..64].copy_from_slice(&meta_tx.signature); - match ecrecover(H256::from_slice(&msg), &signature) { - Ok(sender) => { - result.sender = sender; - result.input = input; - Ok(result) - } - Err(_) => Err(ParsingError::InvalidEcRecoverSignature), - } -} - -#[cfg(test)] -mod tests { - use super::ArgType; - use rand::Rng; - - #[test] - fn test_parse_type() { - // # atomic types - - // ## bytesN - for n in 1..=32 { - let s = format!("bytes{}", n); - assert_arg_type(&s, ArgType::Byte(n)); - } - assert_arg_type("byte", ArgType::Byte(1)); - - // ## uintN - for n in 1..=32 { - let s = format!("uint{}", 8 * n); - assert_arg_type(&s, ArgType::Uint); - } - assert_arg_type("uint", ArgType::Uint); - - // ## intN - for n in 1..=32 { - let s = format!("int{}", 8 * n); - assert_arg_type(&s, ArgType::Int); - } - assert_arg_type("int", ArgType::Int); - - // ## bool - assert_arg_type("bool", ArgType::Bool); - - // ## address - assert_arg_type("address", ArgType::Address); - - // ## custom - let mut rng = rand::thread_rng(); - for _ in 0..u8::MAX { - let name = rand_identifier(&mut rng); - assert_arg_type(&name, ArgType::Custom(name.clone())); - } - - // # dynamic types - - // ## bytes - assert_arg_type("bytes", ArgType::Bytes); - - // ## string - assert_arg_type("string", ArgType::String); - - // # arrays - let inner_types: Vec = (1..=32) - .map(|n| format!("bytes{}", n)) - .chain((1..=32).map(|n| format!("uint{}", 8 * n))) - .chain((1..=32).map(|n| format!("int{}", 8 * n))) - .chain(std::iter::once("bool".to_string())) - .chain(std::iter::once("address".to_string())) - .chain(std::iter::once(rand_identifier(&mut rng))) - .chain(std::iter::once("bytes".to_string())) - .chain(std::iter::once("string".to_string())) - .collect(); - for t in inner_types { - let inner_type = super::parse_type(&t).ok().unwrap(); - let size: Option = rng.gen(); - - // single array - let single_array_string = create_array_type_string(&t, size); - let expected = ArgType::Array { - length: size.map(|x| x as u64), - inner: Box::new(inner_type), - }; - assert_arg_type(&single_array_string, expected.clone()); - - // nested array - let inner_type = expected; - let size: Option = rng.gen(); - let nested_array_string = create_array_type_string(&single_array_string, size); - let expected = ArgType::Array { - length: size.map(|x| x as u64), - inner: Box::new(inner_type), - }; - assert_arg_type(&nested_array_string, expected); - } - - // # errors - // ## only numbers - super::parse_type("27182818").unwrap_err(); - // ## invalid characters - super::parse_type("Some.InvalidType").unwrap_err(); - super::parse_type("Some::NotType").unwrap_err(); - super::parse_type("*AThing*").unwrap_err(); - } - - fn create_array_type_string(inner_type: &str, size: Option) -> String { - format!( - "{}[{}]", - inner_type, - size.map(|x| x.to_string()).unwrap_or(String::new()) - ) - } - - fn assert_arg_type(s: &str, expected: ArgType) { - assert_eq!(super::parse_type(s).ok().unwrap(), expected); - } - - fn rand_identifier(rng: &mut T) -> String { - use rand::distributions::Alphanumeric; - use rand::seq::IteratorRandom; - - // The first character must be a letter, so we sample that separately. - let first_char = ('a'..='z').chain('A'..='Z').choose(rng).unwrap(); - let other_letters = (0..7).map(|_| char::from(rng.sample(Alphanumeric))); - - std::iter::once(first_char).chain(other_letters).collect() - } -} diff --git a/engine/src/parameters.rs b/engine/src/parameters.rs index 9f3088af3..caa9c5e08 100644 --- a/engine/src/parameters.rs +++ b/engine/src/parameters.rs @@ -1,4 +1,5 @@ use crate::admin_controlled::PausedMask; +use crate::errors; use crate::fungible_token::FungibleTokenMetadata; use crate::json::{JsonError, JsonValue}; use crate::prelude::account_id::AccountId; @@ -27,20 +28,6 @@ pub struct NewCallArgs { pub upgrade_delay_blocks: u64, } -/// Borsh-encoded parameters for the `meta_call` function. -#[derive(Debug, BorshSerialize, BorshDeserialize)] -pub struct MetaCallArgs { - pub signature: [u8; 64], - pub v: u8, - pub nonce: RawU256, - pub fee_amount: RawU256, - pub fee_address: Address, - pub contract_address: Address, - pub value: RawU256, - pub method_def: String, - pub args: Vec, -} - /// Borsh-encoded log for use in a `SubmitResult`. #[derive(Debug, Clone, PartialEq, Eq, BorshSerialize, BorshDeserialize)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] @@ -98,11 +85,11 @@ impl AsRef<[u8]> for TransactionStatus { fn as_ref(&self) -> &[u8] { match self { Self::Succeed(_) => b"SUCCESS", - Self::Revert(_) => b"ERR_REVERT", - Self::OutOfFund => b"ERR_OUT_OF_FUNDS", - Self::OutOfGas => b"ERR_OUT_OF_GAS", - Self::OutOfOffset => b"ERR_OUT_OF_OFFSET", - Self::CallTooDeep => b"ERR_CALL_TOO_DEEP", + Self::Revert(_) => errors::ERR_REVERT, + Self::OutOfFund => errors::ERR_OUT_OF_FUNDS, + Self::OutOfGas => errors::ERR_OUT_OF_GAS, + Self::OutOfOffset => errors::ERR_OUT_OF_OFFSET, + Self::CallTooDeep => errors::ERR_CALL_TOO_DEEP, } } } diff --git a/engine/src/proof.rs b/engine/src/proof.rs index 47eb40233..00fccd8f6 100644 --- a/engine/src/proof.rs +++ b/engine/src/proof.rs @@ -1,7 +1,7 @@ use crate::prelude::{sdk, BorshDeserialize, BorshSerialize, String, ToString, Vec}; #[derive(Debug, Default, BorshDeserialize, BorshSerialize, Clone)] -#[cfg_attr(test, derive(serde::Deserialize, serde::Serialize))] +#[cfg_attr(feature = "impl-serde", derive(serde::Deserialize, serde::Serialize))] pub struct Proof { pub log_index: u64, pub log_entry_data: Vec, diff --git a/engine/src/xcc.rs b/engine/src/xcc.rs new file mode 100644 index 000000000..564dae3a0 --- /dev/null +++ b/engine/src/xcc.rs @@ -0,0 +1,282 @@ +use crate::parameters::{CallArgs, FunctionCallArgsV2}; +use aurora_engine_precompiles::xcc::state; +use aurora_engine_sdk::io::{StorageIntermediate, IO}; +use aurora_engine_sdk::promise::PromiseHandler; +use aurora_engine_types::account_id::AccountId; +use aurora_engine_types::parameters::{PromiseAction, PromiseBatchAction, PromiseCreateArgs}; +use aurora_engine_types::storage::{self, KeyPrefix}; +use aurora_engine_types::types::{Address, NearGas, Yocto, ZERO_YOCTO}; +use aurora_engine_types::{format, Cow, Vec, U256}; +use borsh::{BorshDeserialize, BorshSerialize}; + +pub const ERR_NO_ROUTER_CODE: &str = "ERR_MISSING_XCC_BYTECODE"; +pub const ERR_INVALID_ACCOUNT: &str = "ERR_INVALID_XCC_ACCOUNT"; +pub const ERR_ATTACHED_NEAR: &str = "ERR_ATTACHED_XCC_NEAR"; +pub const CODE_KEY: &[u8] = b"router_code"; +pub const VERSION_UPDATE_GAS: NearGas = NearGas::new(5_000_000_000_000); +pub const INITIALIZE_GAS: NearGas = NearGas::new(15_000_000_000_000); +pub const UNWRAP_AND_REFUND_GAS: NearGas = NearGas::new(25_000_000_000_000); +pub const WITHDRAW_GAS: NearGas = NearGas::new(30_000_000_000_000); +pub const WITHDRAW_TO_NEAR_SELECTOR: [u8; 4] = [0x6b, 0x35, 0x18, 0x48]; + +pub use aurora_engine_precompiles::xcc::state::{ + get_code_version_of_address, get_latest_code_version, get_wnear_address, CodeVersion, + ERR_CORRUPTED_STORAGE, STORAGE_AMOUNT, VERSION_KEY, WNEAR_KEY, +}; + +/// Type wrapper for router bytecode. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RouterCode<'a>(pub Cow<'a, [u8]>); + +impl<'a> RouterCode<'a> { + pub fn new(bytes: Vec) -> Self { + Self(Cow::Owned(bytes)) + } + + pub fn borrowed(bytes: &'a [u8]) -> Self { + Self(Cow::Borrowed(bytes)) + } +} + +#[derive(Debug, Clone, PartialEq, Eq, BorshDeserialize, BorshSerialize)] +pub struct AddressVersionUpdateArgs { + pub address: Address, + pub version: CodeVersion, +} + +pub fn handle_precompile_promise( + io: &I, + handler: &mut P, + promise: PromiseCreateArgs, + required_near: Yocto, + current_account_id: &AccountId, +) where + P: PromiseHandler, + I: IO + Copy, +{ + let target_account: &str = promise.target_account_id.as_ref(); + let sender = Address::decode(&target_account[0..40]).expect(ERR_INVALID_ACCOUNT); + + // Confirm target_account is of the form `{address}.{aurora}` + // Address prefix parsed above, so only need to check `.{aurora}` + assert_eq!(&target_account[40..41], ".", "{}", ERR_INVALID_ACCOUNT); + assert_eq!( + &target_account[41..], + current_account_id.as_ref(), + "{}", + ERR_INVALID_ACCOUNT + ); + // Confirm there is 0 NEAR attached to the promise + // (the precompile should not drain the engine's balance). + assert_eq!( + promise.attached_balance, ZERO_YOCTO, + "{}", + ERR_ATTACHED_NEAR + ); + + let latest_code_version = get_latest_code_version(io); + let sender_code_version = get_code_version_of_address(io, &sender); + let deploy_needed = match sender_code_version { + None => AddressVersionStatus::DeployNeeded { + create_needed: true, + }, + Some(version) if version < latest_code_version => AddressVersionStatus::DeployNeeded { + create_needed: false, + }, + Some(_version) => AddressVersionStatus::UpToDate, + }; + // 1. If the router contract account does not exist or is out of date then we start + // with a batch transaction to deploy the router. This batch also has an attached + // callback to update the engine's storage with the new version of that router account. + let setup_id = match &deploy_needed { + AddressVersionStatus::DeployNeeded { create_needed } => { + let mut promise_actions = Vec::with_capacity(4); + if *create_needed { + promise_actions.push(PromiseAction::CreateAccount); + promise_actions.push(PromiseAction::Transfer { + amount: STORAGE_AMOUNT, + }); + } + promise_actions.push(PromiseAction::DeployConotract { + code: get_router_code(io).0.into_owned(), + }); + // After a deploy we call the contract's initialize function + let wnear_address = state::get_wnear_address(io); + let wnear_account = crate::engine::nep141_erc20_map(*io) + .lookup_right(&crate::engine::ERC20Address(wnear_address)) + .unwrap(); + let init_args = format!( + r#"{{"wnear_account": "{}", "must_register": {}}}"#, + wnear_account.0.as_ref(), + create_needed, + ); + promise_actions.push(PromiseAction::FunctionCall { + name: "initialize".into(), + args: init_args.into_bytes(), + attached_yocto: ZERO_YOCTO, + gas: INITIALIZE_GAS, + }); + let batch = PromiseBatchAction { + target_account_id: promise.target_account_id.clone(), + actions: promise_actions, + }; + let promise_id = handler.promise_create_batch(&batch); + // Add a callback here to update the version of the account + let args = AddressVersionUpdateArgs { + address: sender, + version: latest_code_version, + }; + let callback = PromiseCreateArgs { + target_account_id: current_account_id.clone(), + method: "factory_update_address_version".into(), + args: args.try_to_vec().unwrap(), + attached_balance: ZERO_YOCTO, + attached_gas: VERSION_UPDATE_GAS, + }; + + Some(handler.promise_attach_callback(promise_id, &callback)) + } + AddressVersionStatus::UpToDate => None, + }; + // 2. If some NEAR is required for this call (from storage staking for a new account + // and/or attached NEAR to the call the user wants to make), then we need to have the + // engine withdraw that amount of wNEAR to the router account and then have the router + // unwrap it into actual NEAR. In the case of storage staking, the engine contract + // covered the cost initially (see setup batch above), so the unwrapping also sends + // a refund back to the engine. + let withdraw_id = if required_near == ZERO_YOCTO { + setup_id + } else { + let wnear_address = state::get_wnear_address(io); + let withdraw_call_args = CallArgs::V2(FunctionCallArgsV2 { + contract: wnear_address, + value: [0u8; 32], + input: withdraw_to_near_args(&promise.target_account_id, required_near), + }); + let withdraw_call = PromiseCreateArgs { + target_account_id: current_account_id.clone(), + method: "call".into(), + args: withdraw_call_args.try_to_vec().unwrap(), + attached_balance: ZERO_YOCTO, + attached_gas: WITHDRAW_GAS, + }; + let id = match setup_id { + None => handler.promise_create_call(&withdraw_call), + Some(setup_id) => handler.promise_attach_callback(setup_id, &withdraw_call), + }; + let refund_needed = match deploy_needed { + AddressVersionStatus::DeployNeeded { create_needed } => create_needed, + AddressVersionStatus::UpToDate => false, + }; + let args = format!( + r#"{{"amount": "{}", "refund_needed": {}}}"#, + required_near.as_u128(), + refund_needed, + ); + let unwrap_call = PromiseCreateArgs { + target_account_id: promise.target_account_id.clone(), + method: "unwrap_and_refund_storage".into(), + args: args.into_bytes(), + attached_balance: ZERO_YOCTO, + attached_gas: UNWRAP_AND_REFUND_GAS, + }; + Some(handler.promise_attach_callback(id, &unwrap_call)) + }; + // 3. Finally we can do the call the user wanted to do. + let _promise_id = match withdraw_id { + None => handler.promise_create_call(&promise), + Some(withdraw_id) => handler.promise_attach_callback(withdraw_id, &promise), + }; +} + +/// Read the current wasm bytecode for the router contracts +pub fn get_router_code(io: &I) -> RouterCode { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, CODE_KEY); + let bytes = io.read_storage(&key).expect(ERR_NO_ROUTER_CODE).to_vec(); + RouterCode::new(bytes) +} + +/// Set new router bytecode, and update increment the version by 1. +pub fn update_router_code(io: &mut I, code: &RouterCode) { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, CODE_KEY); + io.write_storage(&key, &code.0); + + let current_version = get_latest_code_version(io); + set_latest_code_version(io, current_version.increment()); +} + +/// Set the address of the wNEAR ERC-20 contract +pub fn set_wnear_address(io: &mut I, address: &Address) { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, WNEAR_KEY); + io.write_storage(&key, address.as_bytes()); +} + +/// Set the version of the router contract deployed for the given address. +pub fn set_code_version_of_address(io: &mut I, address: &Address, version: CodeVersion) { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, address.as_bytes()); + let value_bytes = version.0.to_le_bytes(); + io.write_storage(&key, &value_bytes); +} + +/// Sets the latest router contract version. This function is intentionally private because +/// it should never be set manually. The version is managed automatically by `update_router_code`. +fn set_latest_code_version(io: &mut I, version: CodeVersion) { + let key = storage::bytes_to_key(KeyPrefix::CrossContractCall, VERSION_KEY); + let value_bytes = version.0.to_le_bytes(); + io.write_storage(&key, &value_bytes); +} + +/// Private enum used for bookkeeping what actions are needed in the call to the router contract. +enum AddressVersionStatus { + UpToDate, + DeployNeeded { create_needed: bool }, +} + +fn withdraw_to_near_args(recipient: &AccountId, amount: Yocto) -> Vec { + let args = ethabi::encode(&[ + ethabi::Token::Bytes(recipient.as_bytes().to_vec()), + ethabi::Token::Uint(U256::from(amount.as_u128())), + ]); + [&WITHDRAW_TO_NEAR_SELECTOR, args.as_slice()].concat() +} + +#[cfg(test)] +mod tests { + use aurora_engine_types::{account_id::AccountId, types::Yocto, U256}; + + #[test] + fn test_withdraw_to_near_encoding() { + let recipient: AccountId = "some_account.near".parse().unwrap(); + let amount = Yocto::new(1332654); + #[allow(deprecated)] + let withdraw_function = ethabi::Function { + name: "withdrawToNear".into(), + inputs: vec![ + ethabi::Param { + name: "recipient".into(), + kind: ethabi::ParamType::Bytes, + internal_type: None, + }, + ethabi::Param { + name: "amount".into(), + kind: ethabi::ParamType::Uint(256), + internal_type: None, + }, + ], + outputs: vec![], + constant: None, + state_mutability: ethabi::StateMutability::NonPayable, + }; + let expected_tx_data = withdraw_function + .encode_input(&[ + ethabi::Token::Bytes(recipient.as_bytes().to_vec()), + ethabi::Token::Uint(U256::from(amount.as_u128())), + ]) + .unwrap(); + + assert_eq!( + super::withdraw_to_near_args(&recipient, amount), + expected_tx_data + ); + } +} diff --git a/etc/benchmark-contract/Cargo.lock b/etc/benchmark-contract/Cargo.lock deleted file mode 100644 index 86705c0e0..000000000 --- a/etc/benchmark-contract/Cargo.lock +++ /dev/null @@ -1,62 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "benchmark_contract" -version = "1.0.0" -dependencies = [ - "wee_alloc", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "libc" -version = "0.2.119" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/etc/eth-contracts/contracts/test/Random.sol b/etc/eth-contracts/contracts/test/Random.sol index 6639bddf7..3cb86da10 100644 --- a/etc/eth-contracts/contracts/test/Random.sol +++ b/etc/eth-contracts/contracts/test/Random.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; + contract Random { function randomSeed() public returns (uint256) { bytes32[1] memory value; diff --git a/etc/eth-contracts/hardhat.config.js b/etc/eth-contracts/hardhat.config.js index fde0d36a5..aeb3b08c3 100644 --- a/etc/eth-contracts/hardhat.config.js +++ b/etc/eth-contracts/hardhat.config.js @@ -8,7 +8,7 @@ require('./tasks/storage'); module.exports = { newStorageLayoutPath: './storageLayout', solidity: { - version: '0.8.3', + version: '0.8.15', settings: { optimizer: { enabled: true, diff --git a/etc/eth-contracts/package.json b/etc/eth-contracts/package.json index 4ef00f678..077a11b4a 100644 --- a/etc/eth-contracts/package.json +++ b/etc/eth-contracts/package.json @@ -3,27 +3,28 @@ "version": "0.1.0", "description": "ERC20 token implementation on EVM mapped from Native NEP-141", "dependencies": { - "@openzeppelin/contracts": "^4.3.3" + "@openzeppelin/contracts": "^4.7.3" }, "devDependencies": { - "@nomiclabs/hardhat-ethers": "^2.0.1", - "@nomiclabs/hardhat-waffle": "^2.0.1", + "@nomiclabs/hardhat-ethers": "^2.0.6", + "@nomiclabs/hardhat-waffle": "^2.0.3", + "chai": "^4.3.6", + "eslint": "^8.18.0", + "eslint-config-standard": "^17.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^6.0.0", + "eth-gas-reporter": "^0.2.25", + "ethereum-waffle": "^3.4.4", + "ethers": "^5.6.9", + "hardhat": "^2.9.9", "hardhat-storage-layout": "^0.1.6", - "chai": "^4.3.3", - "eslint": "^6.3.0", - "eslint-config-standard": "^14.1.0", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-promise": "^4.0.1", - "eslint-plugin-standard": "^4.0.0", - "eth-gas-reporter": "^0.2.11", - "ethereum-waffle": "^3.4.0", - "ethers": "^5.0.31", - "hardhat": "^2.1.1", - "rainbow-bridge-lib": "^2.0.0", - "solc": "0.8.3", - "solidity-coverage": "^0.7.16", - "solium": "^1.2.5" + "rainbow-bridge-lib": "^3.0.0", + "solc": "0.8.15", + "solidity-coverage": "^0.7.21", + "solium": "^1.2.5", + "typescript": ">=3.7.0" }, "scripts": { "compile": "hardhat compile", diff --git a/etc/eth-contracts/res/EvmErc20.bin b/etc/eth-contracts/res/EvmErc20.bin new file mode 100644 index 0000000000000000000000000000000000000000..b0786ce5d16be967749b2ea0b81e3800496546d5 GIT binary patch literal 6170 zcmb7I4RBP|6@GW$CRq@Y>?SP4Q1ei93jT{xv7$k((m#E>CcDa7dT)|NQ;|Rd){2Gq zyGi}2cQ=VY)fQWHoYK*zU|X%DwJ3w5b{wmWPG?Z8io+;63R;E=^tG9cs|F^=A6RPC(jBVA6tskddi`XP#+QcDAZV`^n@1+3tPTYzU zwrdlT%-lVqdmqT5z@`Q@+yONvX#7f&b;ij~{v`K-@!X*Oa{|d;No7WKstu4tUY81z ze@P@*itHY+27Rm{9iDYbf*v;GW+S{tBpRhTlHdhBaFGvfkO3O+vMtuv_S^ zv~B>=+qDR2o2IuvnzqaiN}xvQegvAXi@#K6%&(@fYiK)s71}O+h1DJtKf9cE{LW2f z9Q<1fF*F12jzSX{Ks^z{I5?_KN$YS(0$ymMYK}M06ank<=IL$+&W#H9xPj13xp+Qf zd6KEA^dM|!bqqUXm=c~R+<}y8E2MP2SWs7|2ZYH5-9g?=_s2on><|jT8-$z91QDIe zutpbFRY#~YpDKF~Q3J6?!{^j9vKlhB(w#Gnt{YlsEQ&JarL@uYyQ&AC!g3v!J39AV zh~+i@vXQADVY%yPdwCy<@wT`@+`3K1L%p}tGF9%q6 zp7r8BkR1g`ECIR{%aJ$lUx;NlmJg-3yn*FUg9AdkMi%-QpcM~VX983kfX=+&{p+HP zoC;9e-|L#NtnrsPa4(iug(9C}`2?2N-m~~AEZ;0Wi|2CyI`^MjAV=tGEa&S(2`q08 zux7-k?f}^(0EuNIBipe&;fX%6+=t~!g{|vxpfNa5eef+6pj!Z%wB(V^SU#K>=`L(?r}5 zoK8u6KPl-n)Go;Ka&Sl~As4Fi$bBrx&6LMOS^y87%|fROc>U=D-j>QJ9)r-uJ_eoC zE|S|}o{x{?(OpWT-=p!NpmD9w!wKMID+>*csr0Z9e<*+p88(l>-}B+mm%?8w!mB6w z@b>~Z*+r|{O@H@5unV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y?nLWN4@oYZj(u(4oR9PH$WAAF1 zJ$rLkHrw5=bxLvAGLd2?j{AzHFx)bE3`=uem3QP_^o88ijCQBM*_1Whk+~g3*2FuB z6?hRDCFrr%?f5MDX!E~cxW8x1==EQod*{ZHlOOrC>-pcrzxny%AAEko=1;ujGi6&| zA9W($q&Qy{bs`=sic@|OOwG0tcQhm; zu6B>`LF0MoCVU@Q@BwPRZ$~%&|N1}_d?n*m@4Bmy=t#mA^;ILR?pv6?U`ikoAYwzw zlcc~k6G*?T?p6~M2xQG15Fw7}d|R60m^fjN6i_y?rwQ3u-3F>*sKe^IQ<B%j%1FUk+J$-iEXxC7qnnv zgv9D^OXH8#F9K=2FHAHbWA&SWx5>jZ(L!K4mP1eIjmB90OTHdrHYLnn6rCZ7vFPjpdyugDC9ol^k|V8h>cyh|fJ0}|%X8L%L_sd2ZLpji zd9mmcNyUIq3*swH@4G1~26LDISYy0J$V7(%*6UphAtG3hPz{4j((36^YX0c664`{S zH%Mm*=LQ_!3OKOnZV5#b2Gf*tj8*v@W6>fw{`)UN zFP16e$YM9hXWtke>0rReVz-sg_gHM>(Z_q@WkdEjM@;uv?2SspJr?`IpY5^OyW)jM ze8gn07>>dN4KvdC^P-G3oMN(ulbm+%CDmcEQCMFq&h%IVg9Hwad}rc`9+(Q39XZfr z4ZOlUk2S1>WMZ7h8Xo(4)4bAK7cCA#QKp*2U_W&o&i~}NQ##tGigyGvXx>b zSYxe8XW`Wf7sty;;+oT0WADELv9$l{<73*U zGvA%Q_UY^Q-gljT#+qw(PCey|JqOwga~l`T+`e|UbMlhz{@!I>mne}sW#0b)8Ex~Z literal 0 HcmV?d00001 diff --git a/etc/eth-contracts/res/EvmErc20.hex b/etc/eth-contracts/res/EvmErc20.hex new file mode 100644 index 000000000..c444e090c --- /dev/null +++ b/etc/eth-contracts/res/EvmErc20.hex @@ -0,0 +1 @@ +0x60806040523480156200001157600080fd5b506040516200181a3803806200181a833981016040819052620000349162000186565b80600085856003620000478382620002b9565b506004620000568282620002b9565b5050600580546001600160a01b0319166001600160a01b0394909416939093179092556006555060076200008b8582620002b9565b5060086200009a8482620002b9565b50506009805460ff191660ff9290921691909117905550620003859050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000e157600080fd5b81516001600160401b0380821115620000fe57620000fe620000b9565b604051601f8301601f19908116603f01168101908282118183101715620001295762000129620000b9565b816040528381526020925086838588010111156200014657600080fd5b600091505b838210156200016a57858201830151818301840152908201906200014b565b838211156200017c5760008385830101525b9695505050505050565b600080600080608085870312156200019d57600080fd5b84516001600160401b0380821115620001b557600080fd5b620001c388838901620000cf565b95506020870151915080821115620001da57600080fd5b50620001e987828801620000cf565b935050604085015160ff811681146200020157600080fd5b60608601519092506001600160a01b03811681146200021f57600080fd5b939692955090935050565b600181811c908216806200023f57607f821691505b6020821081036200026057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002b457600081815260208120601f850160051c810160208610156200028f5750805b601f850160051c820191505b81811015620002b0578281556001016200029b565b5050505b505050565b81516001600160401b03811115620002d557620002d5620000b9565b620002ed81620002e684546200022a565b8462000266565b602080601f8311600181146200032557600084156200030c5750858301515b600019600386901b1c1916600185901b178555620002b0565b600085815260208120601f198616915b82811015620003565788860151825594840194600190910190840162000335565b5085821015620003755787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61148580620003956000396000f3fe6080604052600436106101755760003560e01c80636b351848116100cb578063a9059cbb1161007f578063dd62ed3e11610059578063dd62ed3e146103ec578063f48ab4e014610432578063f851a4401461043a57600080fd5b8063a9059cbb14610399578063b8e9744c146103b9578063be831a2e146103cc57600080fd5b80638d32caf4116100b05780638d32caf41461034457806395d89b4114610364578063a457c2d71461037957600080fd5b80636b351848146102ee57806370a082311461030e57600080fd5b8063313ce5671161012d57806340c10f191161010757806340c10f1914610298578063530208f2146102b85780635c975abb146102d857600080fd5b8063313ce5671461023657806337d2c2f414610258578063395093511461027857600080fd5b806318160ddd1161015e57806318160ddd146101d557806323b872dd146101f45780632692c59f1461021457600080fd5b806306fdde031461017a578063095ea7b3146101a5575b600080fd5b34801561018657600080fd5b5061018f610472565b60405161019c9190610f90565b60405180910390f35b3480156101b157600080fd5b506101c56101c0366004610fc2565b610504565b604051901515815260200161019c565b3480156101e157600080fd5b506002545b60405190815260200161019c565b34801561020057600080fd5b506101c561020f366004610fee565b61051c565b34801561022057600080fd5b5061023461022f36600461102f565b610540565b005b34801561024257600080fd5b5060095460405160ff909116815260200161019c565b34801561026457600080fd5b506102346102733660046110eb565b61055c565b34801561028457600080fd5b506101c5610293366004610fc2565b6105a5565b3480156102a457600080fd5b506102346102b3366004610fc2565b6105e4565b3480156102c457600080fd5b506102346102d3366004610fc2565b610609565b3480156102e457600080fd5b506101e660065481565b3480156102fa57600080fd5b50610234610309366004611169565b61065b565b34801561031a57600080fd5b506101e66103293660046111ae565b6001600160a01b031660009081526020819052604090205490565b34801561035057600080fd5b5061023461035f366004610fc2565b6106cb565b34801561037057600080fd5b5061018f610747565b34801561038557600080fd5b506101c5610394366004610fc2565b610756565b3480156103a557600080fd5b506101c56103b4366004610fc2565b610805565b61018f6103c73660046111cb565b610813565b3480156103d857600080fd5b506102346103e736600461121b565b61089f565b3480156103f857600080fd5b506101e661040736600461123d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102346108ba565b34801561044657600080fd5b5060055461045a906001600160a01b031681565b6040516001600160a01b03909116815260200161019c565b60606007805461048190611276565b80601f01602080910402602001604051908101604052809291908181526020018280546104ad90611276565b80156104fa5780601f106104cf576101008083540402835291602001916104fa565b820191906000526020600020905b8154815290600101906020018083116104dd57829003601f168201915b5050505050905090565b6000336105128185856108d3565b5060019392505050565b60003361052a858285610a2b565b610535858585610abd565b506001949350505050565b6005546001600160a01b0316331461055757600080fd5b600655565b6005546001600160a01b0316331461057357600080fd5b600761057f84826112fe565b50600861058c83826112fe565b506009805460ff191660ff929092169190911790555050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061051290829086906105df9087906113d4565b6108d3565b6005546001600160a01b031633146105fb57600080fd5b6106058282610cd4565b5050565b6005546001600160a01b0316331461062057600080fd5b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610656573d6000803e3d6000fd5b505050565b610666335b82610db3565b604051819060009061067e90839086906020016113ec565b604051602081830303815290604052905060008451602161069f91906113d4565b9050602060008260208501600073e9217bc70b7ed1f598ddd3199e80b093fa71124f5af1505050505050565b6106d433610660565b604051600160f81b602082015260218101829052606083901b6bffffffffffffffffffffffff1981166041830152829160009060550160408051601f198184030181529190529050603560206000828285018273b0bd02f6a392af548bdf1cfaee5dfa0eefcc8eab5af150505050505050565b60606008805461048190611276565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156107f85760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61053582868684036108d3565b600033610512818585610abd565b6005546060906001600160a01b0316331461082d57600080fd5b600080846001600160a01b031684604051610848919061141c565b600060405180830381855af49150503d8060008114610883576040519150601f19603f3d011682016040523d82523d6000602084013e610888565b606091505b50915091508161089757600080fd5b949350505050565b6005546001600160a01b031633146108b657600080fd5b9055565b6005546001600160a01b031633146108d157600080fd5b565b6001600160a01b03831661094e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b0382166109ca5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610ab75781811015610aaa5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016107ef565b610ab784848484036108d3565b50505050565b6001600160a01b038316610b395760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b038216610bb55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b03831660009081526020819052604090205481811015610c445760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610c7b9084906113d4565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cc791815260200190565b60405180910390a3610ab7565b6001600160a01b038216610d2a5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107ef565b8060026000828254610d3c91906113d4565b90915550506001600160a01b03821660009081526020819052604081208054839290610d699084906113d4565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216610e2f5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b03821660009081526020819052604090205481811015610ebe5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016107ef565b6001600160a01b0383166000908152602081905260408120838303905560028054849290610eed908490611438565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b83811015610f53578181015183820152602001610f3b565b83811115610ab75750506000910152565b60008151808452610f7c816020860160208601610f38565b601f01601f19169290920160200192915050565b602081526000610fa36020830184610f64565b9392505050565b6001600160a01b0381168114610fbf57600080fd5b50565b60008060408385031215610fd557600080fd5b8235610fe081610faa565b946020939093013593505050565b60008060006060848603121561100357600080fd5b833561100e81610faa565b9250602084013561101e81610faa565b929592945050506040919091013590565b60006020828403121561104157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261106f57600080fd5b813567ffffffffffffffff8082111561108a5761108a611048565b604051601f8301601f19908116603f011681019082821181831017156110b2576110b2611048565b816040528381528660208588010111156110cb57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561110057600080fd5b833567ffffffffffffffff8082111561111857600080fd5b6111248783880161105e565b9450602086013591508082111561113a57600080fd5b506111478682870161105e565b925050604084013560ff8116811461115e57600080fd5b809150509250925092565b6000806040838503121561117c57600080fd5b823567ffffffffffffffff81111561119357600080fd5b61119f8582860161105e565b95602094909401359450505050565b6000602082840312156111c057600080fd5b8135610fa381610faa565b600080604083850312156111de57600080fd5b82356111e981610faa565b9150602083013567ffffffffffffffff81111561120557600080fd5b6112118582860161105e565b9150509250929050565b6000806040838503121561122e57600080fd5b50508035926020909101359150565b6000806040838503121561125057600080fd5b823561125b81610faa565b9150602083013561126b81610faa565b809150509250929050565b600181811c9082168061128a57607f821691505b6020821081036112aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561065657600081815260208120601f850160051c810160208610156112d75750805b601f850160051c820191505b818110156112f6578281556001016112e3565b505050505050565b815167ffffffffffffffff81111561131857611318611048565b61132c816113268454611276565b846112b0565b602080601f83116001811461136157600084156113495750858301515b600019600386901b1c1916600185901b1785556112f6565b600085815260208120601f198616915b8281101561139057888601518255948401946001909101908401611371565b50858210156113ae5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600082198211156113e7576113e76113be565b500190565b600160f81b81528260018201526000825161140e816021850160208701610f38565b919091016021019392505050565b6000825161142e818460208701610f38565b9190910192915050565b60008282101561144a5761144a6113be565b50039056fea2646970667358221220b231e3177ebd68f3996750307b59e00d2cf6edfa54922a143d1cd57e24842b5e64736f6c634300080f0033 \ No newline at end of file diff --git a/etc/eth-contracts/res/EvmErc20V2.bin b/etc/eth-contracts/res/EvmErc20V2.bin new file mode 100644 index 0000000000000000000000000000000000000000..72bf8d39c25d48821f4e1a6958241c481d5797f5 GIT binary patch literal 6199 zcmb7I32Fj!*DeRZN?>}-@ZeZ9GQSL zmiO)d?|<+A|L><7ZBL%7HFil-BuyplNJgdYi7x4c1>cr6@y}eS6WXrxBrwj+cS$6d z%4k%wZ7O5uJEqYk1$LxxDu~CF;XkUhO6#Bm-%ZVOQ_NqD^3m7`ADPVyowT}Br8PKo zhwUGtAw2%v@*h=N3mQjp`e=a{VtJmQ%{$dDNw&F~%5;DCvRl{Ex0(02)*sZAU1Rr=(M$o>oK~7#B{<9Bchw(*+3<8 zflB7Os5%T~>Pe~;)SPJ#6C#L_OI;>Z%BvaE2#c-nr)`6nB%zzcB1vu#j?K$c06Qms zj1#795|Yf^Gp0Hp$RWX|8rAF}IVx!U!X;}>lAZj)-3P{V!{+S-lD(SBjHy%^B8j}} zDoFm}BEeGRgCS$s!x~ZHS(_y2Q9Y(Nz-z=sqclenyrB9n@}R9QbmX4Gn96Y$G7?>H z;YJK$5m=I@gGLNGQ^g4DGInUX)FE?<4pH;MS+vzrKCm5BbzwwZp{+KdRV_N9N>11< zaCchOfavTR1hjSC+258n^iE2kMqncXO;yETDl_3%UD!3S8@>wcc727_$2xxYSsnPD zm&#c9*9$Qe4epLW6Bs}~4Z>JBD$hu(a7Y4PXrgkCH@Ap@wR!VwyA$WO3HR8(&`r5m zK4UnN$*J@(Y-e(fKREQ1Agy-_1>gfkTFi*YSFrHil1;zhGAwss`LucBnOMH; zW8FFbFNZ*O8$epc=+fK+4xC+aK>PQ01 zn|-VkV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e;a_$Ebo~CW$+Gl$t-{z5nWP^;Xwe z!nr<&cYF>k^05m=69&_ibBxw{9HWgzj;_SKJg}nkT|`yY;sv}NA{g?MFgl7Hqt};l zWYIqN*)xVi+8^?<=w0PAJ{EoC_#-~?!r}Hf$4vNG^q-Xmd@MTd&G%UJeeu#GK4Q98 z^uF*weM=gDPL#3wvvpQK&+2eqR4o?W4(lt$xgM*}LIMj%u9$kN2d2Vh#}4&a{b+@m z9;;su$;3#H)j#^xCVHi}E>awZqD(c3%T@m&)cKIr?*v(=NQ##tJz4%1WKr6TIVAFz zK^sLDlZ*swn5WY?Ub=9hoJ=LIKaG=OSMK0ku3KdY{w*_v1`Ri)@#pfEdFqP?dseLJ z9k^;vRJnG;rY%=5.0.0-beta.128", "@ethersproject/address@^5.4.0": version "5.4.0" @@ -292,12 +313,27 @@ "@ethersproject/logger" "^5.4.0" "@ethersproject/rlp" "^5.4.0" -"@ethersproject/base64@5.1.0", "@ethersproject/base64@^5.1.0": +"@ethersproject/address@5.6.1", "@ethersproject/address@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d" + integrity sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q== + dependencies: + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/rlp" "^5.6.1" + +"@ethersproject/address@^5.0.4", "@ethersproject/address@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.1.0.tgz#27240c174d0a4e13f6eae87416fd876caf7f42b6" - integrity sha512-npD1bLvK4Bcxz+m4EMkx+F8Rd7CnqS9DYnhNu0/GlQBXhWjvfoAZzk5HJ0f1qeyp8d+A86PTuzLOGOXf4/CN8g== + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.1.0.tgz#3854fd7ebcb6af7597de66f847c3345dae735b58" + integrity sha512-rfWQR12eHn2cpstCFS4RF7oGjfbkZb0oqep+BfrT+gWEGWG2IowJvIsacPOvzyS1jhNF4MQ4BS59B04Mbovteg== dependencies: + "@ethersproject/bignumber" "^5.1.0" "@ethersproject/bytes" "^5.1.0" + "@ethersproject/keccak256" "^5.1.0" + "@ethersproject/logger" "^5.1.0" + "@ethersproject/rlp" "^5.1.0" "@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": version "5.4.0" @@ -306,13 +342,19 @@ dependencies: "@ethersproject/bytes" "^5.4.0" -"@ethersproject/basex@5.1.0", "@ethersproject/basex@^5.1.0": +"@ethersproject/base64@5.6.1", "@ethersproject/base64@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb" + integrity sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw== + dependencies: + "@ethersproject/bytes" "^5.6.1" + +"@ethersproject/base64@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.1.0.tgz#80da2e86f9da0cb5ccd446b337364d791f6a131c" - integrity sha512-vBKr39bum7DDbOvkr1Sj19bRMEPA4FnST6Utt6xhDzI7o7L6QNkDn2yrCfP+hnvJGhZFKtLygWwqlTBZoBXYLg== + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.1.0.tgz#27240c174d0a4e13f6eae87416fd876caf7f42b6" + integrity sha512-npD1bLvK4Bcxz+m4EMkx+F8Rd7CnqS9DYnhNu0/GlQBXhWjvfoAZzk5HJ0f1qeyp8d+A86PTuzLOGOXf4/CN8g== dependencies: "@ethersproject/bytes" "^5.1.0" - "@ethersproject/properties" "^5.1.0" "@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": version "5.4.0" @@ -322,14 +364,13 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/properties" "^5.4.0" -"@ethersproject/bignumber@5.1.1", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.1.1.tgz#84812695253ccbc639117f7ac49ee1529b68e637" - integrity sha512-AVz5iqz7+70RIqoQTznsdJ6DOVBYciNlvO+AlQmPTB6ofCvoihI9bQdr6wljsX+d5W7Yc4nyvQvP4JMzg0Agig== +"@ethersproject/basex@5.6.1", "@ethersproject/basex@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.1.tgz#badbb2f1d4a6f52ce41c9064f01eab19cc4c5305" + integrity sha512-a52MkVz4vuBXR06nvflPMotld1FJWSj2QT0985v7P/emPZO00PucFAkbcmq2vpVU7Ts7umKiSI6SppiLykVWsA== dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - bn.js "^4.4.0" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/properties" "^5.6.0" "@ethersproject/bignumber@5.4.0", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.4.0": version "5.4.0" @@ -340,12 +381,23 @@ "@ethersproject/logger" "^5.4.0" bn.js "^4.11.9" -"@ethersproject/bytes@5.1.0", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.1.0.tgz#55dfa9c4c21df1b1b538be3accb50fb76d5facfd" - integrity sha512-sGTxb+LVjFxJcJeUswAIK6ncgOrh3D8c192iEJd7mLr95V6du119rRfYT/b87WPkZ5I3gRBUYIYXtdgCWACe8g== +"@ethersproject/bignumber@5.6.2", "@ethersproject/bignumber@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66" + integrity sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw== dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + bn.js "^5.2.1" + +"@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.1.1.tgz#84812695253ccbc639117f7ac49ee1529b68e637" + integrity sha512-AVz5iqz7+70RIqoQTznsdJ6DOVBYciNlvO+AlQmPTB6ofCvoihI9bQdr6wljsX+d5W7Yc4nyvQvP4JMzg0Agig== + dependencies: + "@ethersproject/bytes" "^5.1.0" "@ethersproject/logger" "^5.1.0" + bn.js "^4.4.0" "@ethersproject/bytes@5.4.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.4.0": version "5.4.0" @@ -354,12 +406,19 @@ dependencies: "@ethersproject/logger" "^5.4.0" -"@ethersproject/constants@5.1.0", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.1.0": +"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" + integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== + dependencies: + "@ethersproject/logger" "^5.6.0" + +"@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.1.0.tgz#4e7da6367ea0e9be87585d8b09f3fccf384b1452" - integrity sha512-0/SuHrxc8R8k+JiLmJymxHJbojUDWBQqO+b+XFdwaP0jGzqC09YDy/CAlSZB6qHsBifY8X3I89HcK/oMqxRdBw== + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.1.0.tgz#55dfa9c4c21df1b1b538be3accb50fb76d5facfd" + integrity sha512-sGTxb+LVjFxJcJeUswAIK6ncgOrh3D8c192iEJd7mLr95V6du119rRfYT/b87WPkZ5I3gRBUYIYXtdgCWACe8g== dependencies: - "@ethersproject/bignumber" "^5.1.0" + "@ethersproject/logger" "^5.1.0" "@ethersproject/constants@5.4.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.4.0": version "5.4.0" @@ -368,21 +427,19 @@ dependencies: "@ethersproject/bignumber" "^5.4.0" -"@ethersproject/contracts@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.1.1.tgz#c66cb6d618fcbd73e20a6b808e8f768b2b781d0b" - integrity sha512-6WwktLJ0DFWU8pDkgH4IGttQHhQN4SnwKFu9h+QYVe48VGWtbDu4W8/q/7QA1u/HWlWMrKxqawPiZUJj0UMvOw== +"@ethersproject/constants@5.6.1", "@ethersproject/constants@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370" + integrity sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg== + dependencies: + "@ethersproject/bignumber" "^5.6.2" + +"@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.1.0.tgz#4e7da6367ea0e9be87585d8b09f3fccf384b1452" + integrity sha512-0/SuHrxc8R8k+JiLmJymxHJbojUDWBQqO+b+XFdwaP0jGzqC09YDy/CAlSZB6qHsBifY8X3I89HcK/oMqxRdBw== dependencies: - "@ethersproject/abi" "^5.1.0" - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" "@ethersproject/contracts@5.4.0": version "5.4.0" @@ -400,19 +457,21 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/transactions" "^5.4.0" -"@ethersproject/hash@5.1.0", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.1.0.tgz#40961d64837d57f580b7b055e0d74174876d891e" - integrity sha512-fNwry20yLLPpnRRwm3fBL+2ksgO+KMadxM44WJmRIoTKzy4269+rbq9KFoe2LTqq2CXJM2CE70beGaNrpuqflQ== - dependencies: - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/strings" "^5.1.0" +"@ethersproject/contracts@5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.2.tgz#20b52e69ebc1b74274ff8e3d4e508de971c287bc" + integrity sha512-hguUA57BIKi6WY0kHvZp6PwPlWF87MCeB4B7Z7AbUpTxfFXFdn/3b0GmjZPagIHS+3yhcBJDnuEfU4Xz+Ks/8g== + dependencies: + "@ethersproject/abi" "^5.6.3" + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/transactions" "^5.6.2" "@ethersproject/hash@5.4.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.4.0": version "5.4.0" @@ -428,23 +487,33 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/hdnode@5.1.0", "@ethersproject/hdnode@^5.1.0": +"@ethersproject/hash@5.6.1", "@ethersproject/hash@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4" + integrity sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA== + dependencies: + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/strings" "^5.6.1" + +"@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.1.0.tgz#2bf5c4048935136ce83e9242e1bd570afcc0bc83" - integrity sha512-obIWdlujloExPHWJGmhJO/sETOOo7SEb6qemV4f8kyFoXg+cJK+Ta9SvBrj7hsUK85n3LZeZJZRjjM7oez3Clg== + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.1.0.tgz#40961d64837d57f580b7b055e0d74174876d891e" + integrity sha512-fNwry20yLLPpnRRwm3fBL+2ksgO+KMadxM44WJmRIoTKzy4269+rbq9KFoe2LTqq2CXJM2CE70beGaNrpuqflQ== dependencies: "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/basex" "^5.1.0" + "@ethersproject/address" "^5.1.0" "@ethersproject/bignumber" "^5.1.0" "@ethersproject/bytes" "^5.1.0" + "@ethersproject/keccak256" "^5.1.0" "@ethersproject/logger" "^5.1.0" - "@ethersproject/pbkdf2" "^5.1.0" "@ethersproject/properties" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - "@ethersproject/signing-key" "^5.1.0" "@ethersproject/strings" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/wordlists" "^5.1.0" "@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": version "5.4.0" @@ -464,24 +533,23 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/json-wallets@5.1.0", "@ethersproject/json-wallets@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.1.0.tgz#bba7af2e520e8aea4d3829d80520db5d2e4fb8d2" - integrity sha512-00n2iBy27w8zrGZSiU762UOVuzCQZxUZxopsZC47++js6xUFuI74DHcJ5K/2pddlF1YBskvmMuboEu1geK8mnA== - dependencies: - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/hdnode" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/pbkdf2" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/random" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - aes-js "3.0.0" - scrypt-js "3.0.1" +"@ethersproject/hdnode@5.6.2", "@ethersproject/hdnode@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.2.tgz#26f3c83a3e8f1b7985c15d1db50dc2903418b2d2" + integrity sha512-tERxW8Ccf9CxW2db3WsN01Qao3wFeRsfYY9TCuhmG0xNpl2IO8wgXU3HtWIZ49gUWPggRy4Yg5axU0ACaEKf1Q== + dependencies: + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/basex" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/pbkdf2" "^5.6.1" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/wordlists" "^5.6.1" "@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0": version "5.4.0" @@ -502,13 +570,24 @@ aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.1.0", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.1.0.tgz#fdcd88fb13bfef4271b225cdd8dec4d315c8e60e" - integrity sha512-vrTB1W6AEYoadww5c9UyVJ2YcSiyIUTNDRccZIgwTmFFoSHwBtcvG1hqy9RzJ1T0bMdATbM9Hfx2mJ6H0i7Hig== - dependencies: - "@ethersproject/bytes" "^5.1.0" - js-sha3 "0.5.7" +"@ethersproject/json-wallets@5.6.1", "@ethersproject/json-wallets@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.1.tgz#3f06ba555c9c0d7da46756a12ac53483fe18dd91" + integrity sha512-KfyJ6Zwz3kGeX25nLihPwZYlDqamO6pfGKNnVMWWfEVVp42lTfCZVXXy5Ie8IZTN0HKwAngpIPi7gk4IJzgmqQ== + dependencies: + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hdnode" "^5.6.2" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/pbkdf2" "^5.6.1" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" + aes-js "3.0.0" + scrypt-js "3.0.1" "@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.4.0": version "5.4.0" @@ -518,22 +597,36 @@ "@ethersproject/bytes" "^5.4.0" js-sha3 "0.5.7" -"@ethersproject/logger@5.1.0", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.1.0": +"@ethersproject/keccak256@5.6.1", "@ethersproject/keccak256@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc" + integrity sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA== + dependencies: + "@ethersproject/bytes" "^5.6.1" + js-sha3 "0.8.0" + +"@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.1.0.tgz#4cdeeefac029373349d5818f39c31b82cc6d9bbf" - integrity sha512-wtUaD1lBX10HBXjjKV9VHCBnTdUaKQnQ2XSET1ezglqLdPdllNOIlLfhyCRqXm5xwcjExVI5ETokOYfjPtaAlw== + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.1.0.tgz#fdcd88fb13bfef4271b225cdd8dec4d315c8e60e" + integrity sha512-vrTB1W6AEYoadww5c9UyVJ2YcSiyIUTNDRccZIgwTmFFoSHwBtcvG1hqy9RzJ1T0bMdATbM9Hfx2mJ6H0i7Hig== + dependencies: + "@ethersproject/bytes" "^5.1.0" + js-sha3 "0.5.7" "@ethersproject/logger@5.4.0", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ== -"@ethersproject/networks@5.1.0", "@ethersproject/networks@^5.1.0": +"@ethersproject/logger@5.6.0", "@ethersproject/logger@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" + integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== + +"@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.1.0.tgz#f537290cb05aa6dc5e81e910926c04cfd5814bca" - integrity sha512-A/NIrIED/G/IgU1XUukOA3WcFRxn2I4O5GxsYGA5nFlIi+UZWdGojs85I1VXkR1gX9eFnDXzjE6OtbgZHjFhIA== - dependencies: - "@ethersproject/logger" "^5.1.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.1.0.tgz#4cdeeefac029373349d5818f39c31b82cc6d9bbf" + integrity sha512-wtUaD1lBX10HBXjjKV9VHCBnTdUaKQnQ2XSET1ezglqLdPdllNOIlLfhyCRqXm5xwcjExVI5ETokOYfjPtaAlw== "@ethersproject/networks@5.4.1", "@ethersproject/networks@^5.4.0": version "5.4.1" @@ -542,13 +635,19 @@ dependencies: "@ethersproject/logger" "^5.4.0" -"@ethersproject/pbkdf2@5.1.0", "@ethersproject/pbkdf2@^5.1.0": +"@ethersproject/networks@5.6.4", "@ethersproject/networks@^5.6.3": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07" + integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ== + dependencies: + "@ethersproject/logger" "^5.6.0" + +"@ethersproject/networks@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.1.0.tgz#6b740a85dc780e879338af74856ca2c0d3b24d19" - integrity sha512-B8cUbHHTgs8OtgJIafrRcz/YPDobVd5Ru8gTnShOiM9EBuFpYHQpq3+8iQJ6pyczDu6HP/oc/njAsIBhwFZYew== + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.1.0.tgz#f537290cb05aa6dc5e81e910926c04cfd5814bca" + integrity sha512-A/NIrIED/G/IgU1XUukOA3WcFRxn2I4O5GxsYGA5nFlIi+UZWdGojs85I1VXkR1gX9eFnDXzjE6OtbgZHjFhIA== dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" + "@ethersproject/logger" "^5.1.0" "@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": version "5.4.0" @@ -558,12 +657,13 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/sha2" "^5.4.0" -"@ethersproject/properties@5.1.0", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.1.0.tgz#9484bd6def16595fc6e4bdc26f29dff4d3f6ac42" - integrity sha512-519KKTwgmH42AQL3+GFV3SX6khYEfHsvI6v8HYejlkigSDuqttdgVygFTDsGlofNFchhDwuclrxQnD5B0YLNMg== +"@ethersproject/pbkdf2@5.6.1", "@ethersproject/pbkdf2@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.1.tgz#f462fe320b22c0d6b1d72a9920a3963b09eb82d1" + integrity sha512-k4gRQ+D93zDRPNUfmduNKq065uadC2YjMP/CqwwX5qG6R05f47boq6pLZtV/RnC4NZAYOPH1Cyo54q0c9sshRQ== dependencies: - "@ethersproject/logger" "^5.1.0" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/sha2" "^5.6.1" "@ethersproject/properties@5.4.0", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.4.0": version "5.4.0" @@ -572,30 +672,19 @@ dependencies: "@ethersproject/logger" "^5.4.0" -"@ethersproject/providers@5.1.2": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.1.2.tgz#4e4459698903f911402fe91aa7544eb07f3921ed" - integrity sha512-GqsS8rd+eyd4eNkcNgzZ4l9IRULBPUZa7JPnv22k4MHflMobUseyhfbVnmoN5bVNNkOxjV1IPTw9i0sV1hwdpg== +"@ethersproject/properties@5.6.0", "@ethersproject/properties@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" + integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg== + dependencies: + "@ethersproject/logger" "^5.6.0" + +"@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.1.0.tgz#9484bd6def16595fc6e4bdc26f29dff4d3f6ac42" + integrity sha512-519KKTwgmH42AQL3+GFV3SX6khYEfHsvI6v8HYejlkigSDuqttdgVygFTDsGlofNFchhDwuclrxQnD5B0YLNMg== dependencies: - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/basex" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/hash" "^5.1.0" "@ethersproject/logger" "^5.1.0" - "@ethersproject/networks" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/random" "^5.1.0" - "@ethersproject/rlp" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/web" "^5.1.0" - bech32 "1.1.4" - ws "7.2.3" "@ethersproject/providers@5.4.1": version "5.4.1" @@ -622,13 +711,31 @@ bech32 "1.1.4" ws "7.4.6" -"@ethersproject/random@5.1.0", "@ethersproject/random@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.1.0.tgz#0bdff2554df03ebc5f75689614f2d58ea0d9a71f" - integrity sha512-+uuczLQZ4+no9cP6TCoCktXx0u2YbNaRT7lRkSt12d8263e702f0u+4JnnRO8Qmv5nylWJebnqCHzyxP+6mLqw== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" +"@ethersproject/providers@5.6.8": + version "5.6.8" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.8.tgz#22e6c57be215ba5545d3a46cf759d265bb4e879d" + integrity sha512-Wf+CseT/iOJjrGtAOf3ck9zS7AgPmr2fZ3N97r4+YXN3mBePTG2/bJ8DApl9mVwYL+RpYbNxMEkEp4mPGdwG/w== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/base64" "^5.6.1" + "@ethersproject/basex" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/networks" "^5.6.3" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/web" "^5.6.1" + bech32 "1.1.4" + ws "7.4.6" "@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0": version "5.4.0" @@ -638,13 +745,13 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/rlp@5.1.0", "@ethersproject/rlp@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.1.0.tgz#700f4f071c27fa298d3c1d637485fefe919dd084" - integrity sha512-vDTyHIwNPrecy55gKGZ47eJZhBm8LLBxihzi5ou+zrSvYTpkSTWRcKUlXFDFQVwfWB+P5PGyERAdiDEI76clxw== +"@ethersproject/random@5.6.1", "@ethersproject/random@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.1.tgz#66915943981bcd3e11bbd43733f5c3ba5a790255" + integrity sha512-/wtPNHwbmng+5yi3fkipA8YBT59DdkGRoC2vWk09Dci/q5DlgnMkhIycjHlavrvrjJBkFjO/ueLyT+aUDfc4lA== dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" "@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.4.0": version "5.4.0" @@ -654,14 +761,21 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/sha2@5.1.0", "@ethersproject/sha2@^5.1.0": +"@ethersproject/rlp@5.6.1", "@ethersproject/rlp@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8" + integrity sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + +"@ethersproject/rlp@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.1.0.tgz#6ca42d1a26884b3e32ffa943fe6494af7211506c" - integrity sha512-+fNSeZRstOpdRJpdGUkRONFCaiAqWkc91zXgg76Nlp5ndBQE25Kk5yK8gCPG1aGnCrbariiPr5j9DmrYH78JCA== + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.1.0.tgz#700f4f071c27fa298d3c1d637485fefe919dd084" + integrity sha512-vDTyHIwNPrecy55gKGZ47eJZhBm8LLBxihzi5ou+zrSvYTpkSTWRcKUlXFDFQVwfWB+P5PGyERAdiDEI76clxw== dependencies: "@ethersproject/bytes" "^5.1.0" "@ethersproject/logger" "^5.1.0" - hash.js "1.1.3" "@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": version "5.4.0" @@ -672,16 +786,14 @@ "@ethersproject/logger" "^5.4.0" hash.js "1.1.7" -"@ethersproject/signing-key@5.1.0", "@ethersproject/signing-key@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.1.0.tgz#6eddfbddb6826b597b9650e01acf817bf8991b9c" - integrity sha512-tE5LFlbmdObG8bY04NpuwPWSRPgEswfxweAI1sH7TbP0ml1elNfqcq7ii/3AvIN05i5U0Pkm3Tf8bramt8MmLw== +"@ethersproject/sha2@5.6.1", "@ethersproject/sha2@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" + integrity sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g== dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - bn.js "^4.4.0" - elliptic "6.5.4" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + hash.js "1.1.7" "@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.4.0": version "5.4.0" @@ -695,16 +807,28 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.1.0": +"@ethersproject/signing-key@5.6.2", "@ethersproject/signing-key@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3" + integrity sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/signing-key@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.1.0.tgz#095a9c75244edccb26c452c155736d363399b954" - integrity sha512-kPodsGyo9zg1g9XSXp1lGhFaezBAUUsAUB1Vf6OkppE5Wksg4Et+x3kG4m7J/uShDMP2upkJtHNsIBK2XkVpKQ== + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.1.0.tgz#6eddfbddb6826b597b9650e01acf817bf8991b9c" + integrity sha512-tE5LFlbmdObG8bY04NpuwPWSRPgEswfxweAI1sH7TbP0ml1elNfqcq7ii/3AvIN05i5U0Pkm3Tf8bramt8MmLw== dependencies: - "@ethersproject/bignumber" "^5.1.0" "@ethersproject/bytes" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - "@ethersproject/strings" "^5.1.0" + "@ethersproject/logger" "^5.1.0" + "@ethersproject/properties" "^5.1.0" + bn.js "^4.4.0" + elliptic "6.5.4" "@ethersproject/solidity@5.4.0": version "5.4.0" @@ -717,14 +841,17 @@ "@ethersproject/sha2" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/strings@5.1.0", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.1.0.tgz#0f95a56c3c8c9d5510a06c241d818779750e2da5" - integrity sha512-perBZy0RrmmL0ejiFGUOlBVjMsUceqLut3OBP3zP96LhiJWWbS8u1NqQVgN4/Gyrbziuda66DxiQocXhsvx+Sw== +"@ethersproject/solidity@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.1.tgz#5845e71182c66d32e6ec5eefd041fca091a473e2" + integrity sha512-KWqVLkUUoLBfL1iwdzUVlkNqAUIFMpbbeH0rgCfKmJp0vFtY4AsaN91gHKo9ZZLkC4UOm3cI3BmMV4N53BOq4g== dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/logger" "^5.1.0" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/sha2" "^5.6.1" + "@ethersproject/strings" "^5.6.1" "@ethersproject/strings@5.4.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.4.0": version "5.4.0" @@ -735,20 +862,23 @@ "@ethersproject/constants" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/transactions@5.1.1", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.1.1.tgz#5a6bbb25fb062c3cc75eb0db12faefcdd3870813" - integrity sha512-Nwgbp09ttIVN0OoUBatCXaHxR7grWPHbozJN8v7AXDLrl6nnOIBEMDh+yJTnosSQlFhcyjfTGGN+Mx6R8HdvMw== +"@ethersproject/strings@5.6.1", "@ethersproject/strings@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952" + integrity sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + +"@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.1.0.tgz#0f95a56c3c8c9d5510a06c241d818779750e2da5" + integrity sha512-perBZy0RrmmL0ejiFGUOlBVjMsUceqLut3OBP3zP96LhiJWWbS8u1NqQVgN4/Gyrbziuda66DxiQocXhsvx+Sw== dependencies: - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" "@ethersproject/bytes" "^5.1.0" "@ethersproject/constants" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/rlp" "^5.1.0" - "@ethersproject/signing-key" "^5.1.0" "@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.4.0": version "5.4.0" @@ -765,14 +895,35 @@ "@ethersproject/rlp" "^5.4.0" "@ethersproject/signing-key" "^5.4.0" -"@ethersproject/units@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.1.0.tgz#b6ab3430ebc22adc3cb4839516496f167bee3ad5" - integrity sha512-isvJrx6qG0nKWfxsGORNjmOq/nh175fStfvRTA2xEKrGqx8JNJY83fswu4GkILowfriEM/eYpretfJnfzi7YhA== +"@ethersproject/transactions@5.6.2", "@ethersproject/transactions@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b" + integrity sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q== + dependencies: + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + +"@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.1.1.tgz#5a6bbb25fb062c3cc75eb0db12faefcdd3870813" + integrity sha512-Nwgbp09ttIVN0OoUBatCXaHxR7grWPHbozJN8v7AXDLrl6nnOIBEMDh+yJTnosSQlFhcyjfTGGN+Mx6R8HdvMw== dependencies: + "@ethersproject/address" "^5.1.0" "@ethersproject/bignumber" "^5.1.0" + "@ethersproject/bytes" "^5.1.0" "@ethersproject/constants" "^5.1.0" + "@ethersproject/keccak256" "^5.1.0" "@ethersproject/logger" "^5.1.0" + "@ethersproject/properties" "^5.1.0" + "@ethersproject/rlp" "^5.1.0" + "@ethersproject/signing-key" "^5.1.0" "@ethersproject/units@5.4.0": version "5.4.0" @@ -783,26 +934,14 @@ "@ethersproject/constants" "^5.4.0" "@ethersproject/logger" "^5.4.0" -"@ethersproject/wallet@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.1.0.tgz#134c5816eaeaa586beae9f9ff67891104a2c9a15" - integrity sha512-ULmUtiYQLTUS+y3DgkLzRhFEK10zMwmjOthnjiZxee3Q/MVwr3rnmuAnXIUZrPjna6hvUPnyRIdW5XuF0Ld0YQ== +"@ethersproject/units@5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.1.tgz#ecc590d16d37c8f9ef4e89e2005bda7ddc6a4e6f" + integrity sha512-rEfSEvMQ7obcx3KWD5EWWx77gqv54K6BKiZzKxkQJqtpriVsICrktIQmKl8ReNToPeIYPnFHpXvKpi068YFZXw== dependencies: - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/hash" "^5.1.0" - "@ethersproject/hdnode" "^5.1.0" - "@ethersproject/json-wallets" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/random" "^5.1.0" - "@ethersproject/signing-key" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/wordlists" "^5.1.0" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/logger" "^5.6.0" "@ethersproject/wallet@5.4.0": version "5.4.0" @@ -825,16 +964,26 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/wordlists" "^5.4.0" -"@ethersproject/web@5.1.0", "@ethersproject/web@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.1.0.tgz#ed56bbe4e3d9a8ffe3b2ed882da5c62d3551381b" - integrity sha512-LTeluWgTq04+RNqAkVhpydPcRZK/kKxD2Vy7PYGrAD27ABO9kTqTBKwiOuzTyAHKUQHfnvZbXmxBXJAGViSDcA== - dependencies: - "@ethersproject/base64" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/strings" "^5.1.0" +"@ethersproject/wallet@5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.2.tgz#cd61429d1e934681e413f4bc847a5f2f87e3a03c" + integrity sha512-lrgh0FDQPuOnHcF80Q3gHYsSUODp6aJLAdDmDV0xKCN/T7D99ta1jGVhulg3PY8wiXEngD0DfM0I2XKXlrqJfg== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/hdnode" "^5.6.2" + "@ethersproject/json-wallets" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/random" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/wordlists" "^5.6.1" "@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0": version "5.4.0" @@ -847,13 +996,24 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" -"@ethersproject/wordlists@5.1.0", "@ethersproject/wordlists@^5.1.0": +"@ethersproject/web@5.6.1", "@ethersproject/web@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d" + integrity sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA== + dependencies: + "@ethersproject/base64" "^5.6.1" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/strings" "^5.6.1" + +"@ethersproject/web@^5.1.0": version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.1.0.tgz#54eb9ef3a00babbff90ffe124e19c89e07e6aace" - integrity sha512-NsUCi/TpBb+oTFvMSccUkJGtp5o/84eOyqp5q5aBeiNBSLkYyw21znRn9mAmxZgySpxgruVgKbaapnYPgvctPQ== + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.1.0.tgz#ed56bbe4e3d9a8ffe3b2ed882da5c62d3551381b" + integrity sha512-LTeluWgTq04+RNqAkVhpydPcRZK/kKxD2Vy7PYGrAD27ABO9kTqTBKwiOuzTyAHKUQHfnvZbXmxBXJAGViSDcA== dependencies: + "@ethersproject/base64" "^5.1.0" "@ethersproject/bytes" "^5.1.0" - "@ethersproject/hash" "^5.1.0" "@ethersproject/logger" "^5.1.0" "@ethersproject/properties" "^5.1.0" "@ethersproject/strings" "^5.1.0" @@ -869,6 +1029,57 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" +"@ethersproject/wordlists@5.6.1", "@ethersproject/wordlists@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.1.tgz#1e78e2740a8a21e9e99947e47979d72e130aeda1" + integrity sha512-wiPRgBpNbNwCQFoCr8bcWO8o5I810cqO6mkdtKfLKFlLxeCWcnzDi4Alu8iyNzlhYuS9npCwivMbRWF19dyblw== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/strings" "^5.6.1" + +"@humanwhocodes/config-array@^0.9.2": + version "0.9.5" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" + integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" + +"@noble/hashes@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.1.tgz#c056d9b7166c1e7387a7453c2aff199bf7d88e5f" + integrity sha512-Lkp9+NijmV7eSVZqiUvt3UCuuHeJpUVmRrvh430gyJjJiuJMqkeHf6/A9lQ/smmbWV/0spDeJscscPzyB4waZg== + +"@noble/hashes@~1.1.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" + integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== + +"@noble/secp256k1@1.6.0", "@noble/secp256k1@~1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.0.tgz#602afbbfcfb7e169210469b697365ef740d7e930" + integrity sha512-DWSsg8zMHOYMYBqIQi96BQuthZrp98LCeMNcUOaffCIVYQ5yxDbNikLF+H7jEnmNNmXbtVic46iCuVWzar+MgA== + "@nodelib/fs.scandir@2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" @@ -890,23 +1101,23 @@ "@nodelib/fs.scandir" "2.1.4" fastq "^1.6.0" -"@nomiclabs/hardhat-ethers@^2.0.1": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" - integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== +"@nomiclabs/hardhat-ethers@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.6.tgz#1c695263d5b46a375dcda48c248c4fba9dfe2fc2" + integrity sha512-q2Cjp20IB48rEn2NPjR1qxsIQBvFVYW9rFRCFq+bC4RUrn1Ljz3g4wM8uSlgIBZYBi2JMXxmOzFqHraczxq4Ng== -"@nomiclabs/hardhat-waffle@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz#5d43654fba780720c5033dea240fe14f70ef4bd2" - integrity sha512-2YR2V5zTiztSH9n8BYWgtv3Q+EL0N5Ltm1PAr5z20uAY4SkkfylJ98CIqt18XFvxTD5x4K2wKBzddjV9ViDAZQ== +"@nomiclabs/hardhat-waffle@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.3.tgz#9c538a09c5ed89f68f5fd2dc3f78f16ed1d6e0b1" + integrity sha512-049PHSnI1CZq6+XTbrMbMv5NaL7cednTfPenx02k3cEh8wBMLa6ys++dBETJa6JjfwgA9nBhhHQ173LJv6k2Pg== dependencies: "@types/sinon-chai" "^3.2.3" "@types/web3" "1.0.19" -"@openzeppelin/contracts@^4.3.3": - version "4.3.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.3.3.tgz#ff6ee919fc2a1abaf72b22814bfb72ed129ec137" - integrity sha512-tDBopO1c98Yk7Cv/PZlHqrvtVjlgK5R4J6jxLwoO7qxK4xqOiZG+zSkIvGFpPZ0ikc3QOED3plgdqjgNTnBc7g== +"@openzeppelin/contracts@^4.7.3": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" + integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== "@resolver-engine/core@^0.3.3": version "0.3.3" @@ -945,6 +1156,28 @@ path-browserify "^1.0.0" url "^0.11.0" +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.0.tgz#dea45875e7fbc720c2b4560325f1cf5d2246d95b" + integrity sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q== + dependencies: + "@noble/hashes" "~1.1.1" + "@noble/secp256k1" "~1.6.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.0.tgz#92f11d095bae025f166bef3defcc5bf4945d419a" + integrity sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w== + dependencies: + "@noble/hashes" "~1.1.1" + "@scure/base" "~1.1.0" + "@sentry/core@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" @@ -1032,15 +1265,12 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@solidity-parser/parser@^0.11.0": - version "0.11.1" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.11.1.tgz#fa840af64840c930f24a9c82c08d4a092a068add" - integrity sha512-H8BSBoKE8EubJa0ONqecA2TviT3TnHeC4NpgnAHSUiuhZoQBfPB4L2P9bs8R6AoTW10Endvh3vc+fomVMIDIYQ== - -"@solidity-parser/parser@^0.12.0": - version "0.12.2" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.12.2.tgz#1afad367cb29a2ed8cdd4a3a62701c2821fb578f" - integrity sha512-d7VS7PxgMosm5NyaiyDJRNID5pK4AWj1l64Dbz0147hJgy5k2C0/ZiKK/9u5c5K+HRUVHmp+RMvGEjGh84oA5Q== +"@solidity-parser/parser@^0.14.0", "@solidity-parser/parser@^0.14.1": + version "0.14.2" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.2.tgz#2d8f2bddb217621df882ceeae7d7b42ae8664db3" + integrity sha512-10cr0s+MtRtqjEw0WFJrm2rwULN30xx7btd/v9cmqME2617/2M5MbHDkFIGIGTa7lwNw4bN9mVGfhlLzrYw8pA== + dependencies: + antlr4ts "^0.5.0-alpha.4" "@szmarczak/http-timer@^1.1.2": version "1.1.2" @@ -1242,6 +1472,11 @@ "@types/bn.js" "*" "@types/underscore" "*" +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + "@web3-js/scrypt-shim@^0.1.0": version "0.1.0" resolved "https://registry.yarnpkg.com/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz#0bf7529ab6788311d3e07586f7d89107c3bea2cc" @@ -1341,15 +1576,15 @@ accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-jsx@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" - integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^7.1.1: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn@^8.7.1: + version "8.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" + integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== address@^1.0.1: version "1.1.2" @@ -1378,6 +1613,14 @@ agent-base@6: dependencies: debug "4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv@^5.2.2: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" @@ -1388,7 +1631,7 @@ ajv@^5.2.2: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1408,12 +1651,12 @@ ansi-colors@3.2.3: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== -ansi-colors@^4.1.1: +ansi-colors@4.1.1, ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: +ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -1440,6 +1683,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -1452,13 +1700,18 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-styles@^4.1.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + any-promise@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -1472,7 +1725,7 @@ anymatch@^1.3.0: micromatch "^2.1.5" normalize-path "^2.0.0" -anymatch@~3.1.1: +anymatch@~3.1.1, anymatch@~3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -1487,6 +1740,11 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -1533,16 +1791,16 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= -array-includes@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" - integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== +array-includes@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" get-intrinsic "^1.1.1" - is-string "^1.0.5" + is-string "^1.0.7" array-union@^2.1.0: version "2.1.0" @@ -1559,14 +1817,15 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= -array.prototype.flat@^1.2.3: - version "1.2.4" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" - integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== dependencies: - call-bind "^1.0.0" + call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.1" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" asap@~2.0.6: version "2.0.6" @@ -1605,11 +1864,6 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== - async-each@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -2274,13 +2528,6 @@ bip39@2.5.0: safe-buffer "^5.0.1" unorm "^1.3.3" -bip66@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" - integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= - dependencies: - safe-buffer "^5.0.1" - bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -2319,6 +2566,11 @@ bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + body-parser@1.19.0, body-parser@^1.16.0: version "1.19.0" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" @@ -2390,7 +2642,7 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6, browserify-aes@^1.2.0: +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== @@ -2533,6 +2785,13 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.2.0" +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + bytes@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" @@ -2625,6 +2884,11 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + caniuse-lite@^1.0.30000844: version "1.0.30001243" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001243.tgz#d9250155c91e872186671c523f3ae50cfc94a3aa" @@ -2649,15 +2913,16 @@ caseless@^0.12.0, caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chai@^4.3.3: - version "4.3.4" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" - integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== +chai@^4.3.6: + version "4.3.6" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" + integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== dependencies: assertion-error "^1.1.0" check-error "^1.0.2" deep-eql "^3.0.1" get-func-name "^2.0.0" + loupe "^2.3.1" pathval "^1.1.1" type-detect "^4.0.5" @@ -2672,7 +2937,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2681,6 +2946,14 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" @@ -2707,11 +2980,6 @@ change-case@^4.1.1: snake-case "^3.0.4" tslib "^2.0.3" -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - "charenc@>= 0.0.1": version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" @@ -2744,6 +3012,21 @@ chokidar@3.3.0: optionalDependencies: fsevents "~2.1.1" +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chokidar@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" @@ -2819,12 +3102,10 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== cli-table3@^0.5.0: version "0.5.1" @@ -2836,11 +3117,6 @@ cli-table3@^0.5.0: optionalDependencies: colors "^1.1.2" -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== - cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -2868,6 +3144,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" @@ -2922,7 +3207,7 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colors@^1.1.2: +colors@1.4.0, colors@^1.1.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -2963,6 +3248,11 @@ commander@^2.8.1, commander@^2.9.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^8.1.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -3011,11 +3301,6 @@ constant-case@^3.0.4: tslib "^2.0.3" upper-case "^2.0.2" -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= - content-disposition@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" @@ -3148,7 +3433,7 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -3159,6 +3444,15 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + "crypt@>= 0.0.1": version "0.0.2" resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" @@ -3227,25 +3521,44 @@ debug@3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@^4.0.1, debug@^4.1.1: +debug@4, debug@^4.1.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" -debug@^3.1.0: +debug@4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" +debug@^4.3.2, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -3330,6 +3643,11 @@ deep-equal@~1.1.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -3370,6 +3688,14 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -3450,6 +3776,11 @@ diff@3.5.0, diff@^3.5.0: resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -3466,13 +3797,12 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -doctrine@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" - integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== dependencies: esutils "^2.0.2" - isarray "^1.0.0" doctrine@^3.0.0: version "3.0.0" @@ -3508,15 +3838,6 @@ dotignore@~0.1.2: dependencies: minimatch "^3.0.4" -drbg.js@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" - integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= - dependencies: - browserify-aes "^1.0.6" - create-hash "^1.1.2" - create-hmac "^1.1.4" - duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -3688,6 +4009,42 @@ es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.0" +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -3723,6 +4080,11 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -3733,6 +4095,11 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" @@ -3745,26 +4112,26 @@ escodegen@1.8.x: optionalDependencies: source-map "~0.2.0" -eslint-config-standard@^14.1.0: - version "14.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz#830a8e44e7aef7de67464979ad06b406026c56ea" - integrity sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== +eslint-config-standard@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz#fd5b6cf1dcf6ba8d29f200c461de2e19069888cf" + integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== -eslint-import-resolver-node@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" - integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== dependencies: - debug "^2.6.9" - resolve "^1.13.1" + debug "^3.2.7" + resolve "^1.20.0" -eslint-module-utils@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" - integrity sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA== +eslint-module-utils@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" + integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== dependencies: - debug "^2.6.9" - pkg-dir "^2.0.0" + debug "^3.2.7" + find-up "^2.1.0" eslint-plugin-es@^3.0.0: version "3.0.1" @@ -3774,26 +4141,48 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-import@^2.14.0: - version "2.22.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz#0896c7e6a0cf44109a2d97b95903c2bb689d7702" - integrity sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw== +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== dependencies: - array-includes "^3.1.1" - array.prototype.flat "^1.2.3" - contains-path "^0.1.0" + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" debug "^2.6.9" - doctrine "1.5.0" - eslint-import-resolver-node "^0.3.4" - eslint-module-utils "^2.6.0" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" has "^1.0.3" - minimatch "^3.0.4" - object.values "^1.1.1" - read-pkg-up "^2.0.0" - resolve "^1.17.0" - tsconfig-paths "^3.9.0" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-n@^15.0.0: + version "15.2.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.3.tgz#b8850b90a8c27d3d880521ad90dbf537ac0a9830" + integrity sha512-H+KC7U5R+3IWTeRnACm/4wlqLvS1Q7M6t7BGhn89qXDkZan8HTAEv3ouIONA0ifDwc2YzPFmyPzHuNLddNK4jw== + dependencies: + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" + ignore "^5.1.1" + is-core-module "^2.9.0" + minimatch "^3.1.2" + resolve "^1.10.1" + semver "^7.3.7" -eslint-plugin-node@^11.0.0: +eslint-plugin-node@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== @@ -3805,30 +4194,18 @@ eslint-plugin-node@^11.0.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-promise@^4.0.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz#61485df2a359e03149fdafc0a68b0e030ad2ac45" - integrity sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ== - -eslint-plugin-standard@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz#0c3bf3a67e853f8bbbc580fb4945fbf16f41b7c5" - integrity sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ== +eslint-plugin-promise@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz#017652c07c9816413a41e11c30adc42c3d55ff18" + integrity sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw== -eslint-scope@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== dependencies: esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-utils@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" - integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== - dependencies: - eslint-visitor-keys "^1.1.0" + estraverse "^5.2.0" eslint-utils@^2.0.0: version "2.1.0" @@ -3837,62 +4214,77 @@ eslint-utils@^2.0.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint@^6.3.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" - integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.18.0.tgz#78d565d16c993d0b73968c523c0446b13da784fd" + integrity sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA== dependencies: - "@babel/code-frame" "^7.0.0" + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" - chalk "^2.1.0" - cross-spawn "^6.0.5" - debug "^4.0.1" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" doctrine "^3.0.0" - eslint-scope "^5.0.0" - eslint-utils "^1.4.3" - eslint-visitor-keys "^1.1.0" - espree "^6.1.2" - esquery "^1.0.1" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.2" + esquery "^1.4.0" esutils "^2.0.2" - file-entry-cache "^5.0.1" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" - globals "^12.1.0" - ignore "^4.0.6" + glob-parent "^6.0.1" + globals "^13.15.0" + ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^7.0.0" is-glob "^4.0.0" - js-yaml "^3.13.1" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.3.0" - lodash "^4.17.14" - minimatch "^3.0.4" - mkdirp "^0.5.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.8.3" - progress "^2.0.0" - regexpp "^2.0.1" - semver "^6.1.2" - strip-ansi "^5.2.0" - strip-json-comments "^3.0.1" - table "^5.2.3" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^6.1.2: - version "6.2.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" - integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== +espree@^9.3.2: + version "9.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" + integrity sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA== dependencies: - acorn "^7.1.1" - acorn-jsx "^5.2.0" - eslint-visitor-keys "^1.1.0" + acorn "^8.7.1" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" esprima@2.7.x, esprima@^2.7.1: version "2.7.3" @@ -3904,7 +4296,7 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.0.1: +esquery@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== @@ -3923,11 +4315,6 @@ estraverse@^1.9.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - estraverse@^5.1.0, estraverse@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" @@ -3964,16 +4351,16 @@ eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" -eth-gas-reporter@^0.2.11: - version "0.2.22" - resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.22.tgz#bbe91f5d7b22433d26f099eeb5b20118ced0e575" - integrity sha512-L1FlC792aTf3j/j+gGzSNlGrXKSxNPXQNk6TnV5NNZ2w3jnQCRyJjDl0zUo25Cq2t90IS5vGdbkwqFQK7Ce+kw== +eth-gas-reporter@^0.2.25: + version "0.2.25" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz#546dfa946c1acee93cb1a94c2a1162292d6ff566" + integrity sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ== dependencies: "@ethersproject/abi" "^5.0.0-beta.146" - "@solidity-parser/parser" "^0.12.0" + "@solidity-parser/parser" "^0.14.0" cli-table3 "^0.5.0" - colors "^1.1.2" - ethereumjs-util "6.2.0" + colors "1.4.0" + ethereum-cryptography "^1.0.3" ethers "^4.0.40" fs-readdir-recursive "^1.1.0" lodash "^4.17.14" @@ -4080,16 +4467,6 @@ eth-sig-util@^1.4.2: ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" ethereumjs-util "^5.1.1" -eth-sig-util@^2.5.2: - version "2.5.4" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.4.tgz#577b01fe491b6bf59b0464be09633e20c1677bc5" - integrity sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A== - dependencies: - ethereumjs-abi "0.6.8" - ethereumjs-util "^5.1.1" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.0" - eth-tx-summary@^3.1.2: version "3.2.4" resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" @@ -4163,15 +4540,25 @@ ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" -ethereum-waffle@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.4.0.tgz#990b3c6c26db9c2dd943bf26750a496f60c04720" - integrity sha512-ADBqZCkoSA5Isk486ntKJVjFEawIiC+3HxNqpJqONvh3YXBTNiRfXvJtGuAFLXPG91QaqkGqILEHANAo7j/olQ== - dependencies: - "@ethereum-waffle/chai" "^3.4.0" - "@ethereum-waffle/compiler" "^3.4.0" - "@ethereum-waffle/mock-contract" "^3.3.0" - "@ethereum-waffle/provider" "^3.4.0" +ethereum-cryptography@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.1.0.tgz#7048d184ff365a5255ced5cc9eb7682a273c4db7" + integrity sha512-wyNVTBR4wIR2yoXdMv4Qt44mTVBpPgSW/DQCTmNO6nQluwpyrAIvmL4mxPbziFuc6VWJQa3rwUxn0nUFU03nyQ== + dependencies: + "@noble/hashes" "1.1.1" + "@noble/secp256k1" "1.6.0" + "@scure/bip32" "1.1.0" + "@scure/bip39" "1.1.0" + +ethereum-waffle@^3.4.4: + version "3.4.4" + resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.4.4.tgz#1378b72040697857b7f5e8f473ca8f97a37b5840" + integrity sha512-PA9+jCjw4WC3Oc5ocSMBj5sXvueWQeAbvCA+hUlb6oFgwwKyq5ka3bWQ7QZcjzIX+TdFkxP4IbFmoY2D8Dkj9Q== + dependencies: + "@ethereum-waffle/chai" "^3.4.4" + "@ethereum-waffle/compiler" "^3.4.4" + "@ethereum-waffle/mock-contract" "^3.4.4" + "@ethereum-waffle/provider" "^3.4.4" ethers "^5.0.1" ethereumjs-abi@0.6.5: @@ -4279,20 +4666,7 @@ ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@ ethereum-common "^0.0.18" ethereumjs-util "^5.0.0" -ethereumjs-util@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" - integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - ethjs-util "0.1.6" - keccak "^2.0.0" - rlp "^2.2.3" - secp256k1 "^3.0.1" - -ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0: +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0, ethereumjs-util@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== @@ -4329,7 +4703,19 @@ ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereum rlp "^2.0.0" safe-buffer "^5.1.1" -ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.3, ethereumjs-util@^7.0.7, ethereumjs-util@^7.0.8, ethereumjs-util@^7.0.9: +ethereumjs-util@^7.0.2: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" + integrity sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.4" + +ethereumjs-util@^7.0.3: version "7.0.10" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz#5fb7b69fa1fda0acc59634cf39d6b0291180fc1f" integrity sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw== @@ -4341,16 +4727,15 @@ ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.3, ethereumjs-util@^7.0.7, ethereu ethjs-util "0.1.6" rlp "^2.2.4" -ethereumjs-util@^7.0.2: - version "7.1.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" - integrity sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw== +ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: + version "7.1.5" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" + integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== dependencies: "@types/bn.js" "^5.1.0" bn.js "^5.1.2" create-hash "^1.1.2" ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" rlp "^2.2.4" ethereumjs-vm@4.2.0: @@ -4437,7 +4822,7 @@ ethers@^4.0.32, ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2: +ethers@^5.0.1, ethers@^5.0.2: version "5.4.1" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.1.tgz#bcff1e9f45bf1a061bf313ec04e8d9881d2d53f9" integrity sha512-SrcddMdCgP1hukDvCPd87Aipbf4NWjQvdfAbZ65XSZGbfyuYPtIrUJPDH5B1SBRsdlfiEgX3eoz28DdBDzMNFg== @@ -4473,41 +4858,41 @@ ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2: "@ethersproject/web" "5.4.0" "@ethersproject/wordlists" "5.4.0" -ethers@^5.0.31: - version "5.1.4" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.1.4.tgz#8ae973705ed962f8f41dc59693704002a38dd18b" - integrity sha512-EAPQ/fgGRu0PoR/VNFnHTMOtG/IZ0AItdW55C9T8ffmVu0rnyllZL404eBF66elJehOLz2kxnUrhXpE7TCpW7g== - dependencies: - "@ethersproject/abi" "5.1.2" - "@ethersproject/abstract-provider" "5.1.0" - "@ethersproject/abstract-signer" "5.1.0" - "@ethersproject/address" "5.1.0" - "@ethersproject/base64" "5.1.0" - "@ethersproject/basex" "5.1.0" - "@ethersproject/bignumber" "5.1.1" - "@ethersproject/bytes" "5.1.0" - "@ethersproject/constants" "5.1.0" - "@ethersproject/contracts" "5.1.1" - "@ethersproject/hash" "5.1.0" - "@ethersproject/hdnode" "5.1.0" - "@ethersproject/json-wallets" "5.1.0" - "@ethersproject/keccak256" "5.1.0" - "@ethersproject/logger" "5.1.0" - "@ethersproject/networks" "5.1.0" - "@ethersproject/pbkdf2" "5.1.0" - "@ethersproject/properties" "5.1.0" - "@ethersproject/providers" "5.1.2" - "@ethersproject/random" "5.1.0" - "@ethersproject/rlp" "5.1.0" - "@ethersproject/sha2" "5.1.0" - "@ethersproject/signing-key" "5.1.0" - "@ethersproject/solidity" "5.1.0" - "@ethersproject/strings" "5.1.0" - "@ethersproject/transactions" "5.1.1" - "@ethersproject/units" "5.1.0" - "@ethersproject/wallet" "5.1.0" - "@ethersproject/web" "5.1.0" - "@ethersproject/wordlists" "5.1.0" +ethers@^5.5.2, ethers@^5.6.9: + version "5.6.9" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.9.tgz#4e12f8dfcb67b88ae7a78a9519b384c23c576a4d" + integrity sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA== + dependencies: + "@ethersproject/abi" "5.6.4" + "@ethersproject/abstract-provider" "5.6.1" + "@ethersproject/abstract-signer" "5.6.2" + "@ethersproject/address" "5.6.1" + "@ethersproject/base64" "5.6.1" + "@ethersproject/basex" "5.6.1" + "@ethersproject/bignumber" "5.6.2" + "@ethersproject/bytes" "5.6.1" + "@ethersproject/constants" "5.6.1" + "@ethersproject/contracts" "5.6.2" + "@ethersproject/hash" "5.6.1" + "@ethersproject/hdnode" "5.6.2" + "@ethersproject/json-wallets" "5.6.1" + "@ethersproject/keccak256" "5.6.1" + "@ethersproject/logger" "5.6.0" + "@ethersproject/networks" "5.6.4" + "@ethersproject/pbkdf2" "5.6.1" + "@ethersproject/properties" "5.6.0" + "@ethersproject/providers" "5.6.8" + "@ethersproject/random" "5.6.1" + "@ethersproject/rlp" "5.6.1" + "@ethersproject/sha2" "5.6.1" + "@ethersproject/signing-key" "5.6.2" + "@ethersproject/solidity" "5.6.1" + "@ethersproject/strings" "5.6.1" + "@ethersproject/transactions" "5.6.2" + "@ethersproject/units" "5.6.1" + "@ethersproject/wallet" "5.6.2" + "@ethersproject/web" "5.6.1" + "@ethersproject/wordlists" "5.6.1" ethjs-unit@0.1.6: version "0.1.6" @@ -4517,7 +4902,7 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" -ethjs-util@0.1.6, ethjs-util@^0.1.3: +ethjs-util@0.1.6, ethjs-util@^0.1.3, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== @@ -4566,19 +4951,6 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -4674,15 +5046,6 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -4726,7 +5089,7 @@ fast-deep-equal@^1.0.0: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -4748,10 +5111,10 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: version "1.11.0" @@ -4774,19 +5137,12 @@ fetch-ponyfill@^4.0.0: dependencies: node-fetch "~1.7.1" -figures@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" - integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: - flat-cache "^2.0.1" + flat-cache "^3.0.4" file-type@^3.8.0: version "3.9.0" @@ -4869,6 +5225,14 @@ find-up@3.0.0, find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -4877,7 +5241,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.0.0, find-up@^2.1.0: +find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= @@ -4899,14 +5263,13 @@ find-yarn-workspace-root@^2.0.0: dependencies: micromatch "^4.0.2" -flat-cache@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" - integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== dependencies: - flatted "^2.0.0" - rimraf "2.6.3" - write "1.0.3" + flatted "^3.1.0" + rimraf "^3.0.2" flat@^4.1.0: version "4.1.1" @@ -4915,10 +5278,15 @@ flat@^4.1.0: dependencies: is-buffer "~2.0.3" -flatted@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" - integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" + integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ== flow-stoplight@^1.0.0: version "1.0.0" @@ -5086,7 +5454,7 @@ fsevents@~2.1.1: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -fsevents@~2.3.1: +fsevents@~2.3.1, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -5096,19 +5464,25 @@ function-bind@^1.1.1, function-bind@~1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= -ganache-cli@^6.11.0: - version "6.12.2" - resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" - integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== - dependencies: - ethereumjs-util "6.2.1" - source-map-support "0.5.12" - yargs "13.2.4" +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== ganache-core@^2.13.2: version "2.13.2" @@ -5152,7 +5526,7 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -5171,6 +5545,15 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: has "^1.0.3" has-symbols "^1.0.1" +get-intrinsic@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + get-port@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" @@ -5189,7 +5572,7 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-stream@^4.0.0, get-stream@^4.1.0: +get-stream@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== @@ -5203,6 +5586,14 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -5238,13 +5629,20 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: +glob-parent@^5.1.0, glob-parent@~5.1.0, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -5269,6 +5667,18 @@ glob@7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -5328,12 +5738,12 @@ global@~4.4.0: min-document "^2.19.0" process "^0.11.10" -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== dependencies: - type-fest "^0.8.1" + type-fest "^0.20.2" globals@^9.18.0: version "9.18.0" @@ -5438,22 +5848,25 @@ hardhat-storage-layout@^0.1.6: dependencies: console-table-printer "^2.9.0" -hardhat@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.2.1.tgz#bef0031b994e3f60a88d428f2097195c58cf9ed2" - integrity sha512-8s7MtGXdh0NDwQKdlA8m8QdloVIN1+hv5aFpn0G5Ljj9vfNY9kUoc0a9pMboeGbd9WrS+XrZs5YlsPgQjaW/Tg== - dependencies: - "@ethereumjs/block" "^3.2.1" - "@ethereumjs/blockchain" "^5.2.1" - "@ethereumjs/common" "^2.2.0" - "@ethereumjs/tx" "^3.1.3" - "@ethereumjs/vm" "^5.3.2" +hardhat@^2.9.9: + version "2.9.9" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.9.tgz#05c1015eb73e0230309534b00deeb080724aace0" + integrity sha512-Qv7SXnRc0zq1kGXruNnSKpP3eFccXMR5Qv6GVX9hBIJ5efN0PflKPq92aQ5Cv3jrjJeRevLznWZVz7bttXhVfw== + dependencies: + "@ethereumjs/block" "^3.6.2" + "@ethereumjs/blockchain" "^5.5.2" + "@ethereumjs/common" "^2.6.4" + "@ethereumjs/tx" "^3.5.1" + "@ethereumjs/vm" "^5.9.0" + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" "@sentry/node" "^5.18.1" - "@solidity-parser/parser" "^0.11.0" + "@solidity-parser/parser" "^0.14.1" "@types/bn.js" "^5.1.0" "@types/lru-cache" "^5.1.0" abort-controller "^3.0.0" adm-zip "^0.4.16" + aggregate-error "^3.0.0" ansi-escapes "^4.3.0" chalk "^2.4.2" chokidar "^3.4.0" @@ -5461,21 +5874,20 @@ hardhat@^2.1.1: debug "^4.1.1" enquirer "^2.3.0" env-paths "^2.2.0" - eth-sig-util "^2.5.2" ethereum-cryptography "^0.1.2" ethereumjs-abi "^0.6.8" - ethereumjs-util "^7.0.10" + ethereumjs-util "^7.1.4" find-up "^2.1.0" fp-ts "1.19.3" fs-extra "^7.0.1" - glob "^7.1.3" + glob "7.2.0" immutable "^4.0.0-rc.12" io-ts "1.10.4" lodash "^4.17.11" - merkle-patricia-tree "^4.1.0" + merkle-patricia-tree "^4.2.4" mnemonist "^0.38.0" - mocha "^7.1.2" - node-fetch "^2.6.0" + mocha "^9.2.0" + p-map "^4.0.0" qs "^6.7.0" raw-body "^2.4.1" resolve "1.17.0" @@ -5486,8 +5898,9 @@ hardhat@^2.1.1: stacktrace-parser "^0.1.10" "true-case-path" "^2.2.1" tsort "0.0.1" - uuid "^3.3.2" - ws "^7.2.1" + undici "^5.4.0" + uuid "^8.3.2" + ws "^7.4.6" has-ansi@^2.0.0: version "2.0.0" @@ -5501,6 +5914,11 @@ has-bigints@^1.0.1: resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" @@ -5521,6 +5939,13 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" @@ -5531,6 +5956,11 @@ has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" @@ -5538,6 +5968,13 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" @@ -5723,7 +6160,7 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -iconv-lite@0.4.24, iconv-lite@^0.4.24: +iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -5749,16 +6186,16 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - ignore@^5.1.1: version "5.1.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + immediate@^3.2.3: version "3.3.0" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" @@ -5774,7 +6211,7 @@ immutable@^4.0.0-rc.12: resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.12.tgz#ca59a7e4c19ae8d9bf74a97bdf0f6e2f2a5d0217" integrity sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A== -import-fresh@^3.0.0: +import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -5787,6 +6224,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -5810,24 +6252,14 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -inquirer@^7.0.0: - version "7.3.3" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" - integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.19" - mute-stream "0.0.8" - run-async "^2.4.0" - rxjs "^6.6.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" interpret@^1.0.0: version "1.4.0" @@ -5846,11 +6278,6 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - io-ts@1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" @@ -5930,6 +6357,11 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -5944,7 +6376,7 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" -is-core-module@^2.8.1: +is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== @@ -6078,6 +6510,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" @@ -6093,6 +6532,11 @@ is-negative-zero@^2.0.1: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + is-number-object@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197" @@ -6137,6 +6581,11 @@ is-plain-obj@^1.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -6170,6 +6619,14 @@ is-regex@^1.1.2: call-bind "^1.0.2" has-symbols "^1.0.1" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regex@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" @@ -6182,6 +6639,13 @@ is-retry-allowed@^1.0.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -6192,6 +6656,13 @@ is-string@^1.0.5: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== +is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" @@ -6215,6 +6686,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-url@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" @@ -6225,6 +6701,13 @@ is-utf8@^0.2.0: resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -6242,7 +6725,7 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -6297,7 +6780,7 @@ js-string-escape@^1.0.1: resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" integrity sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8= -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: +"js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -6315,7 +6798,7 @@ js-yaml@3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@3.x, js-yaml@^3.13.1: +js-yaml@3.x: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -6323,6 +6806,13 @@ js-yaml@3.x, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@4.1.0, js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -6453,16 +6943,6 @@ keccak@3.0.1, keccak@^3.0.0: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -keccak@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" - integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== - dependencies: - bindings "^1.5.0" - inherits "^2.0.4" - nan "^2.14.0" - safe-buffer "^5.2.0" - keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" @@ -6515,13 +6995,6 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - level-codec@^9.0.0: version "9.0.2" resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" @@ -6719,7 +7192,15 @@ levelup@^4.3.2: level-supports "~1.0.0" xtend "~4.0.0" -levn@^0.3.0, levn@~0.3.0: +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= @@ -6738,16 +7219,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -6764,11 +7235,23 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash.assign@^4.0.3, lodash.assign@^4.0.6: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.toarray@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" @@ -6791,6 +7274,14 @@ log-symbols@3.0.0: dependencies: chalk "^2.4.2" +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + looper@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" @@ -6808,6 +7299,13 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +loupe@^2.3.1: + version "2.3.4" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" + integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== + dependencies: + get-func-name "^2.0.0" + lower-case@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" @@ -6883,13 +7381,6 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -6938,15 +7429,6 @@ mem@^1.1.0: dependencies: mimic-fn "^1.0.0" -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - memdown@^1.0.0: version "1.4.1" resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" @@ -7025,17 +7507,16 @@ merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: rlp "^2.0.0" semaphore ">=1.0.1" -merkle-patricia-tree@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.1.0.tgz#010636c4cfd68682df33a2e3186b7d0be7b98b9d" - integrity sha512-vmP1J7FwIpprFMVjjSMM1JAwFce85Q+tp0TYIedYv8qaMh2oLUZ3ETXn9wbgi9S6elySzKzGa+Ai6VNKGEwSlg== +merkle-patricia-tree@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz#ff988d045e2bf3dfa2239f7fabe2d59618d57413" + integrity sha512-eHbf/BG6eGNsqqfbLED9rIqbsF4+sykEaBn6OLNs71tjclbMcMOk1tEPmJKcNcNCLkvbpY/lwyOlizWsqPNo8w== dependencies: "@types/levelup" "^4.3.0" - ethereumjs-util "^7.0.8" + ethereumjs-util "^7.1.4" level-mem "^5.0.1" level-ws "^2.0.0" readable-stream "^3.6.0" - rlp "^2.2.3" semaphore-async-await "^1.5.1" methods@~1.1.2: @@ -7119,11 +7600,6 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== -mimic-fn@^2.0.0, mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -7153,7 +7629,14 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" -minimatch@^3.1.1: +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -7170,6 +7653,11 @@ minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -7242,7 +7730,7 @@ mocha@^4.0.1: mkdirp "0.5.1" supports-color "4.4.0" -mocha@^7.1.1, mocha@^7.1.2: +mocha@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== @@ -7272,6 +7760,36 @@ mocha@^7.1.1, mocha@^7.1.2: yargs-parser "13.1.2" yargs-unparser "1.6.0" +mocha@^9.2.0: + version "9.2.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.3" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + growl "1.10.5" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "4.2.1" + ms "2.1.3" + nanoid "3.3.1" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + workerpool "6.2.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + mock-fs@^4.1.0: version "4.14.0" resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" @@ -7292,7 +7810,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@2.1.3, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -7342,11 +7860,6 @@ mustache@^4.0.0: resolved "https://registry.yarnpkg.com/mustache/-/mustache-4.2.0.tgz#e5892324d60a12ec9c2a73359edca52972bf6f64" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - nan@^2.12.1, nan@^2.14.0: version "2.14.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" @@ -7357,6 +7870,11 @@ nano-json-stream-parser@^0.1.2: resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -7544,6 +8062,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.12.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + object-inspect@^1.9.0: version "1.10.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.2.tgz#b6385a3e2b7cae0b5eafcf90cddf85d128767f30" @@ -7623,15 +8146,14 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.3.tgz#eaa8b1e17589f02f698db093f7c62ee1699742ee" - integrity sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw== +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - has "^1.0.3" + es-abstract "^1.19.1" obliterator@^1.6.1: version "1.6.1" @@ -7666,13 +8188,6 @@ once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - open@^7.4.2: version "7.4.2" resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" @@ -7681,7 +8196,7 @@ open@^7.4.2: is-docker "^2.0.0" is-wsl "^2.1.1" -optionator@^0.8.1, optionator@^0.8.3: +optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -7693,6 +8208,18 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" @@ -7714,15 +8241,6 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-locale@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== - dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" - os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -7738,21 +8256,11 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -7767,6 +8275,13 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -7781,6 +8296,20 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" @@ -7931,6 +8460,11 @@ path-exists@^3.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -7941,6 +8475,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -7960,13 +8499,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -8035,13 +8567,6 @@ pinkie@^2.0.0: resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -8057,6 +8582,11 @@ precond@0.2: resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -8102,11 +8632,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise-to-callback@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" @@ -8269,10 +8794,10 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -rainbow-bridge-lib@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/rainbow-bridge-lib/-/rainbow-bridge-lib-2.0.0.tgz#5e7224f91320a49d5f53a8079b8ce9c7d5940dc4" - integrity sha512-vOWluXk7T9tkYza4QDfjthH/MZddr9TW8bC7OgoD4I7cxn6ZjXlp8Po8hXaEA2yQlcM+IbyPxQpHtSelPf0GNA== +rainbow-bridge-lib@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/rainbow-bridge-lib/-/rainbow-bridge-lib-3.0.0.tgz#28eca17ac6b4953598ef20b2ff1a030b92da9ba7" + integrity sha512-AXPvlqcNR4Pttcp7feMPdV1Su2j1N1RB28I/kNnn0Q1BzO5G7JombnO0Qmny2yAGna5LHmgArfx3QieJBArfDg== dependencies: bn.js "^5.1.3" bs58 "^4.0.1" @@ -8349,14 +8874,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -8366,15 +8883,6 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - readable-stream@^1.0.33: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -8440,6 +8948,13 @@ readdirp@~3.5.0: dependencies: picomatch "^2.2.1" +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -8496,16 +9011,25 @@ regexp.prototype.flags@^1.2.0: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" - integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" regexpp@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + regexpu-core@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -8666,7 +9190,7 @@ resolve@^1.1.6: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.8.1: +resolve@^1.10.0, resolve@^1.10.1, resolve@^1.8.1: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -8674,6 +9198,15 @@ resolve@^1.10.0, resolve@^1.10.1, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.8 is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.20.0, resolve@^1.22.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -8681,14 +9214,6 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - resumer@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" @@ -8706,13 +9231,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@2.6.3: - version "2.6.3" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" - integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - dependencies: - glob "^7.1.3" - rimraf@^2.2.8, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -8720,6 +9238,13 @@ rimraf@^2.2.8, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -8735,11 +9260,6 @@ rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4: dependencies: bn.js "^4.11.1" -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -8752,13 +9272,6 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@^6.6.0: - version "6.6.7" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -8835,20 +9348,6 @@ scryptsy@^2.1.0: resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== -secp256k1@^3.0.1: - version "3.8.0" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" - integrity sha512-k5ke5avRZbtl9Tqx/SA7CbY3NF6Ro+Sj9cZxezFzuBlLDmyqPiL8hJJ+EmzD8Ig4LUDByHJ3/iPOVoRixs/hmw== - dependencies: - bindings "^1.5.0" - bip66 "^1.1.5" - bn.js "^4.11.8" - create-hash "^1.2.0" - drbg.js "^1.0.1" - elliptic "^6.5.2" - nan "^2.14.0" - safe-buffer "^5.1.2" - secp256k1@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" @@ -8885,11 +9384,18 @@ semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.0.0, semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + semver@^7.3.4: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" @@ -8930,6 +9436,13 @@ sentence-case@^3.0.4: tslib "^2.0.3" upper-case-first "^2.0.2" +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + serve-static@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" @@ -9014,11 +9527,23 @@ shebang-command@^1.2.0: dependencies: shebang-regex "^1.0.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + shelljs@^0.8.3: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -9076,15 +9601,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" - integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== - dependencies: - ansi-styles "^3.2.0" - astral-regex "^1.0.0" - is-fullwidth-code-point "^2.0.0" - snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" @@ -9148,18 +9664,16 @@ solc@0.7.3: semver "^5.5.0" tmp "0.0.33" -solc@0.8.3: - version "0.8.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.3.tgz#896fdca2f0c4ccf18ff7a99f8183a5a1a8f6345c" - integrity sha512-VZvSHtwe2zAsoviClIpWjvrg22bIZ0pLtzFrYD9BtPfR7mhMZYwpptnzRizNaSvMngTR+gB9Ul8IyL5xaC7+jw== +solc@0.8.15: + version "0.8.15" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.15.tgz#d274dca4d5a8b7d3c9295d4cbdc9291ee1c52152" + integrity sha512-Riv0GNHNk/SddN/JyEuFKwbcWcEeho15iyupTSHw5Np6WuXA5D8kEHbyzDHi6sqmvLzu2l+8b1YmL8Ytple+8w== dependencies: command-exists "^1.2.8" - commander "3.0.2" + commander "^8.1.0" follow-redirects "^1.12.1" - fs-extra "^0.30.0" js-sha3 "0.8.0" memorystream "^0.3.1" - require-from-string "^2.0.0" semver "^5.5.0" tmp "0.0.33" @@ -9188,18 +9702,17 @@ solc@^0.6.3: semver "^5.5.0" tmp "0.0.33" -solidity-coverage@^0.7.16: - version "0.7.16" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.16.tgz#c8c8c46baa361e2817bbf275116ddd2ec90a55fb" - integrity sha512-ttBOStywE6ZOTJmmABSg4b8pwwZfYKG8zxu40Nz+sRF5bQX7JULXWj/XbX0KXps3Fsp8CJXg8P29rH3W54ipxw== +solidity-coverage@^0.7.21: + version "0.7.21" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.21.tgz#20c5615a3a543086b243c2ca36e2951a75316b40" + integrity sha512-O8nuzJ9yXiKUx3NdzVvHrUW0DxoNVcGzq/I7NzewNO9EZE3wYAQ4l8BwcnV64r4aC/HB6Vnw/q2sF0BQHv/3fg== dependencies: - "@solidity-parser/parser" "^0.12.0" + "@solidity-parser/parser" "^0.14.0" "@truffle/provider" "^0.2.24" chalk "^2.4.2" death "^1.1.0" detect-port "^1.3.0" fs-extra "^8.1.0" - ganache-cli "^6.11.0" ghost-testrpc "^0.0.2" global-modules "^2.0.0" globby "^10.0.1" @@ -9428,6 +9941,15 @@ string-width@^4.1.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string.prototype.trim@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" @@ -9445,6 +9967,15 @@ string.prototype.trimend@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string.prototype.trimstart@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" @@ -9453,6 +9984,15 @@ string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -9500,6 +10040,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -9536,7 +10083,7 @@ strip-json-comments@2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strip-json-comments@^3.0.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -9555,6 +10102,13 @@ supports-color@6.0.0: dependencies: has-flag "^3.0.0" +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -9637,16 +10191,6 @@ sync-rpc@^1.2.1: dependencies: get-port "^3.1.0" -table@^5.2.3: - version "5.4.6" - resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" - integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== - dependencies: - ajv "^6.10.2" - lodash "^4.17.14" - slice-ansi "^2.1.0" - string-width "^3.0.0" - tape@^4.6.3: version "4.13.3" resolved "https://registry.yarnpkg.com/tape/-/tape-4.13.3.tgz#51b3d91c83668c7a45b1a594b607dee0a0b46278" @@ -9742,7 +10286,7 @@ through2@^2.0.3: readable-stream "~2.3.6" xtend "~4.0.1" -through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8: +through@^2.3.8, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -9866,17 +10410,17 @@ ts-generator@^0.1.1: resolve "^1.8.1" ts-essentials "^1.0.0" -tsconfig-paths@^3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz#098547a6c4448807e8fcb8eae081064ee9a3c90b" - integrity sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw== +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" - minimist "^1.2.0" + minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -9898,7 +10442,7 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tweetnacl-util@^0.15.0: +tweetnacl-util@^0.15.0, tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== @@ -9913,6 +10457,13 @@ tweetnacl@^1.0.0, tweetnacl@^1.0.1, tweetnacl@^1.0.3: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -9925,6 +10476,11 @@ type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -9935,11 +10491,6 @@ type-fest@^0.7.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -9983,6 +10534,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@>=3.7.0: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" @@ -10030,6 +10586,16 @@ unbox-primitive@^1.0.0: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unbzip2-stream@^1.0.9: version "1.4.3" resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz#b0da04c4371311df771cdc215e87f2130991ace7" @@ -10048,6 +10614,11 @@ underscore@1.9.1: resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== +undici@^5.4.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.5.1.tgz#baaf25844a99eaa0b22e1ef8d205bffe587c8f43" + integrity sha512-MEvryPLf18HvlCbLSzCW0U00IMftKGI5udnjrQbC5D4P0Hodwffhv+iGfWuJwg16Y/TK11ZFK8i+BPVW2z/eAw== + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -10168,7 +10739,7 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util.promisify@^1.0.0, util.promisify@^1.0.1: +util.promisify@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== @@ -10211,6 +10782,11 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -11083,6 +11659,13 @@ which@1.3.1, which@^1.1.1, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" +which@2.0.2, which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + wide-align@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -11095,7 +11678,7 @@ window-size@^0.2.0: resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= -word-wrap@~1.2.3: +word-wrap@^1.2.3, word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== @@ -11105,6 +11688,11 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -11122,6 +11710,15 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -11137,18 +11734,6 @@ write-file-atomic@^3.0.0: signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" -write@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" - integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== - dependencies: - mkdirp "^0.5.1" - -ws@7.2.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" - integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== - ws@7.4.6: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" @@ -11170,10 +11755,10 @@ ws@^5.1.1: dependencies: async-limiter "~1.0.0" -ws@^7.2.1: - version "7.4.5" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" - integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== +ws@^7.4.6: + version "7.5.8" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.8.tgz#ac2729881ab9e7cbaf8787fe3469a48c5c7f636a" + integrity sha512-ri1Id1WinAX5Jqn9HejiGb8crfRio0Qgu8+MtL36rlTA6RLsMdWt1Az/19A2Qij6uSHUMphEFaTKa4WG+UNHNw== xdg-basedir@^4.0.0: version "4.0.0" @@ -11244,6 +11829,11 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" @@ -11264,7 +11854,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: +yargs-parser@13.1.2, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== @@ -11272,6 +11862,11 @@ yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-parser@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" @@ -11280,6 +11875,11 @@ yargs-parser@^2.4.1: camelcase "^3.0.0" lodash.assign "^4.0.6" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs-parser@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" @@ -11296,22 +11896,15 @@ yargs-unparser@1.6.0: lodash "^4.17.15" yargs "^13.3.0" -yargs@13.2.4: - version "13.2.4" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" - integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - os-locale "^3.1.0" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.0" + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" yargs@13.3.2, yargs@^13.3.0: version "13.3.2" @@ -11329,6 +11922,19 @@ yargs@13.3.2, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.2" +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^10.0.3: version "10.1.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" @@ -11374,3 +11980,8 @@ yauzl@^2.4.2: dependencies: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/etc/ft-receiver/Cargo.lock b/etc/ft-receiver/Cargo.lock deleted file mode 100644 index 58d902391..000000000 --- a/etc/ft-receiver/Cargo.lock +++ /dev/null @@ -1,648 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" - -[[package]] -name = "ahash" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" - -[[package]] -name = "aho-corasick" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" -dependencies = [ - "memchr", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "borsh" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a7111f797cc721407885a323fb071636aee57f750b1a4ddc27397eba168a74" -dependencies = [ - "borsh-derive", - "hashbrown 0.9.1", -] - -[[package]] -name = "borsh-derive" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307f3740906bac2c118a8122fe22681232b244f1369273e45f1156b45c43d2dd" -dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", - "proc-macro-crate", - "proc-macro2", - "syn", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2104c73179359431cc98e016998f2f23bc7a05bc53e79741bcba705f30047bc" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae29eb8418fcd46f723f8691a2ac06857d31179d33d2f2d91eb13967de97c728" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "cpufeatures" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" -dependencies = [ - "libc", -] - -[[package]] -name = "derive_more" -version = "0.99.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "ft_receiver" -version = "1.0.0" -dependencies = [ - "near-contract-standards", - "near-sdk", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "hashbrown" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "indexmap" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" -dependencies = [ - "autocfg", - "hashbrown 0.11.2", -] - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "keccak" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673" - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - -[[package]] -name = "near-contract-standards" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7421d0a5c7aeb57b37a0cf3a71a7aefbbdc7727f9811d9dd86fa55e4f0de4d3" -dependencies = [ - "near-sdk", -] - -[[package]] -name = "near-primitives-core" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2b3fb5acf3a494aed4e848446ef2d6ebb47dbe91c681105d4d1786c2ee63e52" -dependencies = [ - "base64", - "borsh", - "bs58", - "derive_more", - "hex", - "lazy_static", - "num-rational", - "serde", - "serde_json", - "sha2", -] - -[[package]] -name = "near-rpc-error-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa8dbf8437a28ac40fcb85859ab0d0b8385013935b000c7a51ae79631dd74d9" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", -] - -[[package]] -name = "near-rpc-error-macro" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6111d713e90c7c551dee937f4a06cb9ea2672243455a4454cc7566387ba2d9" -dependencies = [ - "near-rpc-error-core", - "proc-macro2", - "quote", - "serde", - "serde_json", - "syn", -] - -[[package]] -name = "near-runtime-utils" -version = "4.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a48d80c4ca1d4cf99bc16490e1e3d49826c150dfc4410ac498918e45c7d98e07" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "near-sdk" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7383e242d3e07bf0951e8589d6eebd7f18bb1c1fc5fbec3fad796041a6aebd1" -dependencies = [ - "base64", - "borsh", - "bs58", - "near-primitives-core", - "near-sdk-macros", - "near-vm-logic", - "serde", - "serde_json", - "wee_alloc", -] - -[[package]] -name = "near-sdk-core" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284a78d9eb8eda58330462fa0023a6d7014c941df1f0387095e7dfd1dc0f2bce" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-sdk-macros" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2037337438f97d1ce5f7c896cf229dc56dacd5c01142d1ef95a7d778cde6ce7d" -dependencies = [ - "near-sdk-core", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "near-vm-errors" -version = "4.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e281d8730ed8cb0e3e69fb689acee6b93cdb43824cd69a8ffd7e1bfcbd1177d7" -dependencies = [ - "borsh", - "hex", - "near-rpc-error-macro", - "serde", -] - -[[package]] -name = "near-vm-logic" -version = "4.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11cb28a2d07f37680efdaf860f4c9802828c44fc50c08009e7884de75d982c5" -dependencies = [ - "base64", - "borsh", - "bs58", - "byteorder", - "near-primitives-core", - "near-runtime-utils", - "near-vm-errors", - "serde", - "sha2", - "sha3", -] - -[[package]] -name = "num-bigint" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", - "serde", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro2" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quote" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha2" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" -dependencies = [ - "block-buffer", - "cfg-if 1.0.0", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer", - "digest", - "keccak", - "opaque-debug", -] - -[[package]] -name = "syn" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" -dependencies = [ - "serde", -] - -[[package]] -name = "typenum" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" - -[[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/etc/state-migration-test/Cargo.lock b/etc/state-migration-test/Cargo.lock index f65c71a92..43f8a1762 100644 --- a/etc/state-migration-test/Cargo.lock +++ b/etc/state-migration-test/Cargo.lock @@ -8,12 +8,6 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" -[[package]] -name = "anyhow" -version = "1.0.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" - [[package]] name = "arrayref" version = "0.3.6" @@ -37,7 +31,7 @@ dependencies = [ [[package]] name = "aurora-engine" -version = "2.1.0" +version = "2.6.1" dependencies = [ "aurora-bn", "aurora-engine-precompiles", @@ -54,7 +48,7 @@ dependencies = [ "libsecp256k1", "logos", "num", - "primitive-types", + "primitive-types 0.10.1", "ripemd160", "rjson", "rlp", @@ -66,7 +60,6 @@ dependencies = [ name = "aurora-engine-precompiles" version = "1.0.0" dependencies = [ - "aurora-bn", "aurora-engine-sdk", "aurora-engine-types", "base64", @@ -77,10 +70,11 @@ dependencies = [ "hex", "libsecp256k1", "num", - "primitive-types", + "primitive-types 0.11.1", "ripemd160", "sha2", "sha3 0.9.1", + "zeropool-bn", ] [[package]] @@ -122,7 +116,7 @@ dependencies = [ "borsh", "ethabi", "hex", - "primitive-types", + "primitive-types 0.11.1", "sha3 0.9.1", ] @@ -156,35 +150,23 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6736e2428df2ca2848d846c43e88745121a6654696e349ce0054a420815a7409" -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.4", + "block-padding", + "generic-array", ] [[package]] -name = "block-padding" -version = "0.1.5" +name = "block-buffer" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "byte-tools", + "generic-array", ] [[package]] @@ -250,12 +232,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65c1bf4a04a88c54f589125563643d773f3254b5c38571395e2b591c693bbc81" -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - [[package]] name = "byteorder" version = "1.4.3" @@ -295,13 +271,23 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.4", + "generic-array", "subtle", ] @@ -318,52 +304,53 @@ dependencies = [ [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.12.4", + "generic-array", ] [[package]] name = "digest" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "generic-array 0.14.4", + "block-buffer 0.10.2", + "crypto-common", ] [[package]] name = "ethabi" -version = "14.1.0" -source = "git+https://github.com/darwinia-network/ethabi?branch=xavier-no-std#09da0834d95f8b43377ca22d7b1c97a2401f4b0c" +version = "17.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f186de076b3e77b8e6d73c99d1b52edc2a229e604f4b5eb6992c06c11d79d537" dependencies = [ - "anyhow", "ethereum-types", "hex", - "sha3 0.9.1", - "uint", + "sha3 0.10.2", ] [[package]] name = "ethbloom" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779864b9c7f7ead1f092972c3257496c6a84b46dba2ce131dd8a282cb2cc5972" +checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" dependencies = [ "crunchy", "fixed-hash", "impl-codec", "impl-rlp", + "scale-info", "tiny-keccak", ] [[package]] name = "ethereum" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fb916554a4dba293ea69c69ad5653e21d770a9d0c2496b5fa0a1f5a3946d87" +checksum = "23750149fe8834c0e24bb9adcbacbe06c45b9861f15df53e09f26cb7c4ab91ef" dependencies = [ "bytes", "ethereum-types", @@ -371,29 +358,29 @@ dependencies = [ "hash256-std-hasher", "rlp", "rlp-derive", - "sha3 0.9.1", + "sha3 0.10.2", "triehash", ] [[package]] name = "ethereum-types" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" dependencies = [ "ethbloom", "fixed-hash", "impl-codec", "impl-rlp", - "primitive-types", + "primitive-types 0.11.1", "scale-info", "uint", ] [[package]] name = "evm" -version = "0.33.1" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ "auto_impl", "ethereum", @@ -401,39 +388,38 @@ dependencies = [ "evm-gasometer", "evm-runtime", "log", - "primitive-types", + "primitive-types 0.11.1", "rlp", - "sha3 0.8.2", + "sha3 0.10.2", ] [[package]] name = "evm-core" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ - "funty", - "primitive-types", + "primitive-types 0.11.1", ] [[package]] name = "evm-gasometer" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ "evm-core", "evm-runtime", - "primitive-types", + "primitive-types 0.11.1", ] [[package]] name = "evm-runtime" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +version = "0.35.0" +source = "git+https://github.com/aurora-is-near/sputnikvm.git?tag=v0.36.0-aurora#7dfbeb535e7105a7531a4e6c559f0f5d45f20014" dependencies = [ "auto_impl", "evm-core", - "primitive-types", - "sha3 0.8.2", + "primitive-types 0.11.1", + "sha3 0.10.2", ] [[package]] @@ -453,21 +439,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.4" @@ -538,17 +509,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.4", + "generic-array", "hmac", ] [[package]] name = "impl-codec" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ - "parity-scale-codec", + "parity-scale-codec 3.1.5", ] [[package]] @@ -591,6 +562,9 @@ name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +dependencies = [ + "spin", +] [[package]] name = "libc" @@ -761,12 +735,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - [[package]] name = "opaque-debug" version = "0.3.0" @@ -782,7 +750,19 @@ dependencies = [ "arrayvec", "byte-slice-cast", "impl-trait-for-tuples", - "parity-scale-codec-derive", + "parity-scale-codec-derive 2.3.1", +] + +[[package]] +name = "parity-scale-codec" +version = "3.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9182e4a71cae089267ab03e67c99368db7cd877baf50f931e5d6d4b71e195ac0" +dependencies = [ + "arrayvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive 3.1.3", ] [[package]] @@ -797,11 +777,34 @@ dependencies = [ "syn", ] +[[package]] +name = "parity-scale-codec-derive" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9299338969a3d2f491d65f140b00ddec470858402f888af98e8642fb5e8965cd" +dependencies = [ + "proc-macro-crate 1.1.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "primitive-types" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" +dependencies = [ + "fixed-hash", + "impl-rlp", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" dependencies = [ "fixed-hash", "impl-codec", @@ -900,7 +903,7 @@ checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -943,7 +946,7 @@ checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" dependencies = [ "cfg-if 1.0.0", "derive_more", - "parity-scale-codec", + "parity-scale-codec 2.3.1", "scale-info-derive", ] @@ -989,34 +992,37 @@ dependencies = [ "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] name = "sha3" -version = "0.8.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" dependencies = [ - "block-buffer 0.7.3", - "byte-tools", - "digest 0.8.1", + "block-buffer 0.9.0", + "digest 0.9.0", "keccak", - "opaque-debug 0.2.3", + "opaque-debug", ] [[package]] name = "sha3" -version = "0.9.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +checksum = "0a31480366ec990f395a61b7c08122d99bd40544fdb5abcfc1b06bb29994312c" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", + "digest 0.10.3", "keccak", - "opaque-debug 0.3.0", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "static_assertions" version = "1.1.0" @@ -1090,9 +1096,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "uint" @@ -1217,3 +1223,16 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "zeropool-bn" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e61de68ede9ffdd69c01664f65a178c5188b73f78faa21f0936016a888ff7c" +dependencies = [ + "byteorder", + "crunchy", + "lazy_static", + "rand", + "rustc-hex", +] diff --git a/etc/benchmark-contract/Cargo.toml b/etc/tests/benchmark-contract/Cargo.toml similarity index 100% rename from etc/benchmark-contract/Cargo.toml rename to etc/tests/benchmark-contract/Cargo.toml diff --git a/etc/benchmark-contract/src/lib.rs b/etc/tests/benchmark-contract/src/lib.rs similarity index 100% rename from etc/benchmark-contract/src/lib.rs rename to etc/tests/benchmark-contract/src/lib.rs diff --git a/etc/ft-receiver/Cargo.toml b/etc/tests/ft-receiver/Cargo.toml similarity index 100% rename from etc/ft-receiver/Cargo.toml rename to etc/tests/ft-receiver/Cargo.toml diff --git a/etc/ft-receiver/src/lib.rs b/etc/tests/ft-receiver/src/lib.rs similarity index 100% rename from etc/ft-receiver/src/lib.rs rename to etc/tests/ft-receiver/src/lib.rs diff --git a/etc/self-contained-5bEgfRQ/Cargo.toml b/etc/tests/self-contained-5bEgfRQ/Cargo.toml similarity index 73% rename from etc/self-contained-5bEgfRQ/Cargo.toml rename to etc/tests/self-contained-5bEgfRQ/Cargo.toml index 968113612..8a69714e0 100644 --- a/etc/self-contained-5bEgfRQ/Cargo.toml +++ b/etc/tests/self-contained-5bEgfRQ/Cargo.toml @@ -37,7 +37,7 @@ codegen-units = 1 rpath = false [dependencies] -borsh = { version = "0.8.2", default-features = false } -aurora-engine = { path = "../../engine", default-features = false } -aurora-engine-sdk = { path = "../../engine-sdk", default-features = false, features = ["contract"] } -aurora-engine-types = { path = "../../engine-types", default-features = false } +borsh = { version = "0.9.3", default-features = false } +aurora-engine = { path = "../../../engine", default-features = false } +aurora-engine-sdk = { path = "../../../engine-sdk", default-features = false, features = ["contract"] } +aurora-engine-types = { path = "../../../engine-types", default-features = false } diff --git a/etc/self-contained-5bEgfRQ/src/lib.rs b/etc/tests/self-contained-5bEgfRQ/src/lib.rs similarity index 100% rename from etc/self-contained-5bEgfRQ/src/lib.rs rename to etc/tests/self-contained-5bEgfRQ/src/lib.rs diff --git a/etc/self-contained-5bEgfRQ/src/promise.rs b/etc/tests/self-contained-5bEgfRQ/src/promise.rs similarity index 100% rename from etc/self-contained-5bEgfRQ/src/promise.rs rename to etc/tests/self-contained-5bEgfRQ/src/promise.rs diff --git a/etc/self-contained-5bEgfRQ/state.bin b/etc/tests/self-contained-5bEgfRQ/state.bin similarity index 100% rename from etc/self-contained-5bEgfRQ/state.bin rename to etc/tests/self-contained-5bEgfRQ/state.bin diff --git a/etc/state-migration-test/Cargo.toml b/etc/tests/state-migration-test/Cargo.toml similarity index 70% rename from etc/state-migration-test/Cargo.toml rename to etc/tests/state-migration-test/Cargo.toml index 0c3f92502..bf645e4b0 100644 --- a/etc/state-migration-test/Cargo.toml +++ b/etc/tests/state-migration-test/Cargo.toml @@ -37,7 +37,7 @@ codegen-units = 1 rpath = false [dependencies] -borsh = { version = "0.8.2", default-features = false } -aurora-engine = { path = "../../engine", default-features = false } -aurora-engine-sdk = { path = "../../engine-sdk", default-features = false, features = ["contract"] } -aurora-engine-types = { path = "../../engine-types", default-features = false } +borsh = { version = "0.9.3", default-features = false } +aurora-engine = { path = "../../../engine", default-features = false } +aurora-engine-sdk = { path = "../../../engine-sdk", default-features = false, features = ["contract"] } +aurora-engine-types = { path = "../../../engine-types", default-features = false } diff --git a/etc/state-migration-test/src/lib.rs b/etc/tests/state-migration-test/src/lib.rs similarity index 100% rename from etc/state-migration-test/src/lib.rs rename to etc/tests/state-migration-test/src/lib.rs diff --git a/etc/uniswap/package.json b/etc/tests/uniswap/package.json similarity index 100% rename from etc/uniswap/package.json rename to etc/tests/uniswap/package.json diff --git a/etc/uniswap/yarn.lock b/etc/tests/uniswap/yarn.lock similarity index 100% rename from etc/uniswap/yarn.lock rename to etc/tests/uniswap/yarn.lock diff --git a/etc/self-contained-5bEgfRQ/Cargo.lock b/etc/xcc-router/Cargo.lock similarity index 59% rename from etc/self-contained-5bEgfRQ/Cargo.lock rename to etc/xcc-router/Cargo.lock index 7b05cad08..615e1bbef 100644 --- a/etc/self-contained-5bEgfRQ/Cargo.lock +++ b/etc/xcc-router/Cargo.lock @@ -3,16 +3,21 @@ version = 3 [[package]] -name = "ahash" -version = "0.4.7" +name = "Inflector" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" [[package]] -name = "anyhow" -version = "1.0.57" +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.7", + "once_cell", + "version_check", +] [[package]] name = "arrayref" @@ -22,121 +27,23 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" - -[[package]] -name = "aurora-blake2" -version = "0.9.1" -source = "git+https://github.com/aurora-is-near/aurora-blake2.git#05a0b5f7a544c527c0118f8afe2f943b3de4bb03" -dependencies = [ - "crypto-mac", - "digest 0.9.0", - "opaque-debug 0.3.0", -] - -[[package]] -name = "aurora-bn" -version = "0.1.0" -source = "git+https://github.com/aurora-is-near/aurora-bn.git#8f1743884061981cac84388862e2763b2aa09307" -dependencies = [ - "byteorder", - "getrandom", -] - -[[package]] -name = "aurora-engine" -version = "2.1.0" -dependencies = [ - "aurora-bn", - "aurora-engine-precompiles", - "aurora-engine-sdk", - "aurora-engine-transactions", - "aurora-engine-types", - "base64", - "borsh", - "byte-slice-cast", - "ethabi", - "evm", - "evm-core", - "hex", - "libsecp256k1", - "logos", - "num", - "primitive-types", - "ripemd160", - "rjson", - "rlp", - "sha3 0.9.1", - "wee_alloc", -] +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] -name = "aurora-engine-precompiles" -version = "1.0.0" -dependencies = [ - "aurora-blake2", - "aurora-bn", - "aurora-engine-sdk", - "aurora-engine-types", - "base64", - "borsh", - "ethabi", - "evm", - "evm-core", - "hex", - "libsecp256k1", - "num", - "primitive-types", - "ripemd160", - "sha2", - "sha3 0.9.1", -] - -[[package]] -name = "aurora-engine-sdk" -version = "1.0.0" -dependencies = [ - "aurora-engine-types", - "borsh", - "sha2", - "sha3 0.9.1", -] - -[[package]] -name = "aurora-engine-transactions" -version = "1.0.0" -dependencies = [ - "aurora-engine-precompiles", - "aurora-engine-sdk", - "aurora-engine-types", - "evm", - "hex", - "rlp", -] +name = "arrayvec" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "aurora-engine-types" version = "1.0.0" dependencies = [ "borsh", - "ethabi", "hex", - "primitive-types", - "sha3 0.9.1", -] - -[[package]] -name = "auto_impl" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn", + "primitive-types 0.11.1", ] [[package]] @@ -145,6 +52,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" + [[package]] name = "base64" version = "0.13.0" @@ -152,21 +65,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] -name = "beef" -version = "0.5.1" +name = "bitvec" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed554bd50246729a1ec158d08aa3235d1b69d94ad120ebe187e28894787e736" +checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] [[package]] -name = "block-buffer" -version = "0.7.3" +name = "blake2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174" dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", + "crypto-mac", + "digest 0.9.0", + "opaque-debug", ] [[package]] @@ -175,17 +93,17 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.5", + "block-padding", + "generic-array", ] [[package]] -name = "block-padding" -version = "0.1.5" +name = "block-buffer" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "byte-tools", + "generic-array", ] [[package]] @@ -196,9 +114,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "borsh" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a7111f797cc721407885a323fb071636aee57f750b1a4ddc27397eba168a74" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ "borsh-derive", "hashbrown", @@ -206,9 +124,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307f3740906bac2c118a8122fe22681232b244f1369273e45f1156b45c43d2dd" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", @@ -219,9 +137,9 @@ dependencies = [ [[package]] name = "borsh-derive-internal" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2104c73179359431cc98e016998f2f23bc7a05bc53e79741bcba705f30047bc" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2", "quote", @@ -230,9 +148,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae29eb8418fcd46f723f8691a2ac06857d31179d33d2f2d91eb13967de97c728" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2", "quote", @@ -240,10 +158,10 @@ dependencies = [ ] [[package]] -name = "bumpalo" -version = "3.9.1" +name = "bs58" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "byte-slice-cast" @@ -251,12 +169,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e" -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - [[package]] name = "byteorder" version = "1.4.3" @@ -265,9 +177,31 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0b3de4a0c5e67e16066a0715723abd91edc2f9001d09c46e1dca929351e130e" + +[[package]] +name = "bytesize" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" + +[[package]] +name = "c2-chacha" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27dae93fe7b1e0424dc57179ac396908c26b035a87234809f5c4dfd1b47dc80" +dependencies = [ + "cipher", + "ppv-lite86", +] + +[[package]] +name = "cc" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -281,6 +215,35 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +dependencies = [ + "libc", + "num-integer", + "num-traits", + "serde", + "time", + "winapi", +] + +[[package]] +name = "cipher" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" +dependencies = [ + "generic-array", +] + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "cpufeatures" version = "0.2.2" @@ -296,146 +259,98 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "crypto-mac" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.5", + "generic-array", "subtle", ] +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + [[package]] name = "derive_more" version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version", "syn", ] -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.5", -] - -[[package]] -name = "ethabi" -version = "14.1.0" -source = "git+https://github.com/darwinia-network/ethabi?branch=xavier-no-std#09da0834d95f8b43377ca22d7b1c97a2401f4b0c" -dependencies = [ - "anyhow", - "ethereum-types", - "hex", - "sha3 0.9.1", - "uint", + "generic-array", ] [[package]] -name = "ethbloom" -version = "0.11.1" +name = "digest" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb684ac8fa8f6c5759f788862bb22ec6fe3cb392f6bfd08e3c64b603661e3f8" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "scale-info", - "tiny-keccak", + "block-buffer 0.10.2", + "crypto-common", ] [[package]] -name = "ethereum" -version = "0.11.1" +name = "easy-ext" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34c90e0a755da706ce0970ec0fa8cc48aabcc8e8efa1245336acf718dab06ffe" -dependencies = [ - "bytes", - "ethereum-types", - "hash-db", - "hash256-std-hasher", - "rlp", - "rlp-derive", - "sha3 0.9.1", - "triehash", -] +checksum = "53aff6fdc1b181225acdcb5b14c47106726fd8e486707315b1b138baed68ee31" [[package]] -name = "ethereum-types" -version = "0.12.1" +name = "ed25519" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05136f7057fe789f06e6d41d07b34e6f70d8c86e5693b60f97aaa6553553bdaf" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "evm" -version = "0.33.1" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" -dependencies = [ - "auto_impl", - "ethereum", - "evm-core", - "evm-gasometer", - "evm-runtime", - "log", - "primitive-types", - "rlp", - "sha3 0.8.2", + "signature", ] [[package]] -name = "evm-core" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" -dependencies = [ - "funty", - "primitive-types", -] - -[[package]] -name = "evm-gasometer" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" -dependencies = [ - "evm-core", - "evm-runtime", - "primitive-types", -] - -[[package]] -name = "evm-runtime" -version = "0.33.0" -source = "git+https://github.com/aurora-is-near/sputnikvm.git?rev=37448b6cacd98b06282cff5a559684505c29bd2b#37448b6cacd98b06282cff5a559684505c29bd2b" +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "auto_impl", - "evm-core", - "primitive-types", - "sha3 0.8.2", + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -445,31 +360,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ "byteorder", + "rand 0.8.5", "rustc-hex", "static_assertions", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "funty" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - [[package]] name = "generic-array" version = "0.14.5" @@ -482,41 +383,41 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.6" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", - "wasi", - "wasm-bindgen", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] -name = "hash-db" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" - -[[package]] -name = "hash256-std-hasher" -version = "0.15.2" +name = "getrandom" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "crunchy", + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "hashbrown" -version = "0.9.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ "ahash", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hex" version = "0.4.3" @@ -553,13 +454,10 @@ dependencies = [ ] [[package]] -name = "js-sys" -version = "0.3.57" +name = "itoa" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" -dependencies = [ - "wasm-bindgen", -] +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "keccak" @@ -567,12 +465,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" version = "0.2.126" @@ -580,122 +472,219 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] -name = "libsecp256k1" -version = "0.3.5" +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[package]] +name = "near-account-id" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc1e2c808481a63dc6da2074752fdd4336a3c8fcc68b83db6f1fd5224ae7962" +checksum = "de83d74a9241be8cc4eb3055216966b58bf8c463e8e285c0dc553925acdd19fa" +dependencies = [ + "borsh", + "serde", +] + +[[package]] +name = "near-crypto" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8ecf0b8b31aa7f4e60f629f72213a2617ca4a5f45cd1ae9ed2cf7cecfebdbb7" dependencies = [ "arrayref", - "crunchy", - "digest 0.8.1", - "rand", + "blake2", + "borsh", + "bs58", + "c2-chacha", + "curve25519-dalek", + "derive_more", + "ed25519-dalek", + "libc", + "near-account-id", + "once_cell", + "parity-secp256k1", + "primitive-types 0.10.1", + "rand 0.7.3", + "rand_core 0.5.1", + "serde", + "serde_json", "subtle", + "thiserror", ] [[package]] -name = "log" -version = "0.4.17" +name = "near-primitives" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "0a2ba19282e79a4485a77736b679d276b09870bbf8042a18e0f0ae36347489c5" dependencies = [ - "cfg-if 1.0.0", + "borsh", + "byteorder", + "bytesize", + "chrono", + "derive_more", + "easy-ext", + "hex", + "near-crypto", + "near-primitives-core", + "near-rpc-error-macro", + "near-vm-errors", + "num-rational", + "once_cell", + "primitive-types 0.10.1", + "rand 0.7.3", + "reed-solomon-erasure", + "serde", + "serde_json", + "smart-default", + "strum", + "thiserror", ] [[package]] -name = "logos" -version = "0.12.0" +name = "near-primitives-core" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427e2abca5be13136da9afdbf874e6b34ad9001dd70f2b103b083a85daa7b345" +checksum = "bb561feb392bb8c4f540256073446e6689af087bf6356e8dddcf75fc279f201f" dependencies = [ - "logos-derive", + "base64 0.11.0", + "borsh", + "bs58", + "derive_more", + "near-account-id", + "num-rational", + "serde", + "sha2 0.10.2", + "strum", ] [[package]] -name = "logos-derive" -version = "0.12.0" +name = "near-rpc-error-core" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a7d287fd2ac3f75b11f19a1c8a874a7d55744bd91f7a1b3e7cf87d4343c36d" +checksum = "77fdd7ea8d8f786878651c37691515d5053f827ae60894aa40c16882b78f77c9" dependencies = [ - "beef", - "fnv", - "proc-macro2", "quote", - "regex-syntax", + "serde", "syn", - "utf8-ranges", ] [[package]] -name = "memory_units" -version = "0.4.0" +name = "near-rpc-error-macro" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" +checksum = "e521842b6ae864dfe5391afbbe2df9e9d8427c26e9333b2e0b65cd42094f7607" +dependencies = [ + "near-rpc-error-core", + "serde", + "syn", +] [[package]] -name = "num" -version = "0.4.0" +name = "near-sdk" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +checksum = "bda34e06e28fb9a09ac54efbdc49f0c9308780fc932aaa81c49c493fde974045" dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", + "base64 0.13.0", + "borsh", + "bs58", + "near-crypto", + "near-primitives", + "near-primitives-core", + "near-sdk-macros", + "near-sys", + "near-vm-logic", + "serde", + "serde_json", + "wee_alloc", ] [[package]] -name = "num-bigint" -version = "0.4.3" +name = "near-sdk-macros" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "72064fcc15a623a0d40a6c199ea5cbdc30a83cae4816889d46f218acf31bfba8" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "Inflector", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "num-complex" -version = "0.4.1" +name = "near-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e307313276eaeced2ca95740b5639e1f3125b7c97f0a1151809d105f1aa8c6d3" + +[[package]] +name = "near-vm-errors" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fbc387afefefd5e9e39493299f3069e14a140dd34dc19b4c1c1a8fddb6a790" +checksum = "0e02faf2bc1f6ef82b965cfe44389808fb5594f7aca4b596766117f4ce74df20" dependencies = [ - "num-traits", + "borsh", + "near-account-id", + "near-rpc-error-macro", + "serde", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "near-vm-logic" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "f024d90451cd3c24d7a0a5cabf3636b192a60eb8e3ff0456f6c18b91152c346d" +dependencies = [ + "base64 0.13.0", + "borsh", + "bs58", + "byteorder", + "near-account-id", + "near-crypto", + "near-primitives", + "near-primitives-core", + "near-vm-errors", + "ripemd", + "serde", + "sha2 0.10.2", + "sha3", +] + +[[package]] +name = "num-bigint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ "autocfg", + "num-integer", "num-traits", ] [[package]] -name = "num-iter" -version = "0.1.43" +name = "num-integer" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", - "num-integer", "num-traits", ] [[package]] name = "num-rational" -version = "0.4.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg", "num-bigint", "num-integer", "num-traits", + "serde", ] [[package]] @@ -708,10 +697,10 @@ dependencies = [ ] [[package]] -name = "opaque-debug" -version = "0.2.3" +name = "once_cell" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "opaque-debug" @@ -725,10 +714,12 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ - "arrayvec", + "arrayvec 0.7.2", + "bitvec", "byte-slice-cast", "impl-trait-for-tuples", "parity-scale-codec-derive", + "serde", ] [[package]] @@ -737,12 +728,24 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" dependencies = [ - "proc-macro-crate 1.1.3", + "proc-macro-crate 1.2.0", "proc-macro2", "quote", "syn", ] +[[package]] +name = "parity-secp256k1" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fca4f82fccae37e8bbdaeb949a4a218a1bbc485d11598f193d2a908042e5fc1" +dependencies = [ + "arrayvec 0.5.2", + "cc", + "cfg-if 0.1.10", + "rand 0.7.3", +] + [[package]] name = "ppv-lite86" version = "0.2.16" @@ -757,8 +760,17 @@ checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", + "uint", +] + +[[package]] +name = "primitive-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" +dependencies = [ + "fixed-hash", "impl-rlp", - "scale-info", "uint", ] @@ -773,65 +785,61 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +checksum = "26d50bfb8c23f23915855a00d98b5a35ef2e0b871bb52937bacadb798fbb66c8" dependencies = [ + "once_cell", "thiserror", "toml", ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro2" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "c278e965f1d8cf32d6e0e96de3d3e79712178ae67986d9cf9151f51e95aac89b" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", + "unicode-ident", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "quote" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" dependencies = [ "proc-macro2", - "quote", - "version_check", ] [[package]] -name = "proc-macro2" -version = "1.0.39" +name = "radium" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" -dependencies = [ - "unicode-ident", -] +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] -name = "quote" -version = "1.0.18" +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "proc-macro2", + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", ] [[package]] name = "rand" -version = "0.7.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "rand_chacha", - "rand_core", - "rand_hc", + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", ] [[package]] @@ -841,7 +849,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", ] [[package]] @@ -849,6 +867,18 @@ name = "rand_core" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.7", +] [[package]] name = "rand_hc" @@ -856,31 +886,27 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] [[package]] -name = "regex-syntax" -version = "0.6.26" +name = "reed-solomon-erasure" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +dependencies = [ + "smallvec", +] [[package]] -name = "ripemd160" -version = "0.9.1" +name = "ripemd" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +checksum = "1facec54cb5e0dc08553501fa740091086d0259ad0067e0d4103448e4cb22ed3" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "opaque-debug 0.3.0", + "digest 0.10.3", ] -[[package]] -name = "rjson" -version = "0.3.2" -source = "git+https://github.com/aurora-is-near/rjson?rev=cc3da949#cc3da9495e7e520900d66d2b517539f74fff93cf" - [[package]] name = "rlp" version = "0.5.1" @@ -892,62 +918,69 @@ dependencies = [ ] [[package]] -name = "rlp-derive" -version = "0.1.0" +name = "rustc-hex" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" + +[[package]] +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "proc-macro2", - "quote", - "syn", + "semver", ] [[package]] -name = "rustc-hex" -version = "2.1.0" +name = "rustversion" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +checksum = "24c8ad4f0c00e1eb5bc7614d236a7f1300e3dbd76b68cac8e06fb00b015ad8d8" [[package]] -name = "scale-info" -version = "1.0.0" +name = "ryu" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55b744399c25532d63a0d2789b109df8d46fc93752d46b0782991a931a782f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" + +[[package]] +name = "semver" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2333e6df6d6598f2b1974829f853c2b4c5f4a6e503c10af918081aa6f8564e1" + +[[package]] +name = "serde" +version = "1.0.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" dependencies = [ - "cfg-if 1.0.0", - "derive_more", - "parity-scale-codec", - "scale-info-derive", + "serde_derive", ] [[package]] -name = "scale-info-derive" -version = "1.0.0" +name = "serde_derive" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baeb2780690380592f86205aa4ee49815feb2acad8c2f59e6dd207148c3f1fcd" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" dependencies = [ - "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn", ] [[package]] -name = "self-contained-5bEgfRQ" -version = "1.0.0" +name = "serde_json" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82c2c1fdcd807d1098552c5b9a36e425e42e9fbd7c6a37a8425f390f781f7fa7" dependencies = [ - "aurora-engine", - "aurora-engine-sdk", - "aurora-engine-types", - "borsh", + "itoa", + "ryu", + "serde", ] -[[package]] -name = "serde" -version = "1.0.137" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" - [[package]] name = "sha2" version = "0.9.9" @@ -958,20 +991,18 @@ dependencies = [ "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] -name = "sha3" -version = "0.8.2" +name = "sha2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "block-buffer 0.7.3", - "byte-tools", - "digest 0.8.1", - "keccak", - "opaque-debug 0.2.3", + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.3", ] [[package]] @@ -983,7 +1014,30 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug 0.3.0", + "opaque-debug", +] + +[[package]] +name = "signature" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" + +[[package]] +name = "smallvec" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" + +[[package]] +name = "smart-default" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -992,6 +1046,28 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4faebde00e8ff94316c01800f9054fd2ba77d30d9e922541913051d1d978918b" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + [[package]] name = "subtle" version = "2.4.1" @@ -1000,15 +1076,33 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.95" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "unicode-xid", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "thiserror" version = "1.0.31" @@ -1030,12 +1124,14 @@ dependencies = [ ] [[package]] -name = "tiny-keccak" -version = "2.0.2" +name = "time" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ - "crunchy", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", ] [[package]] @@ -1047,16 +1143,6 @@ dependencies = [ "serde", ] -[[package]] -name = "triehash" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" -dependencies = [ - "hash-db", - "rlp", -] - [[package]] name = "typenum" version = "1.15.0" @@ -1077,15 +1163,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "15c61ba63f9235225a22310255a29b806b907c9b8c964bcbd0a2c70f3f2deea7" [[package]] -name = "utf8-ranges" -version = "1.0.5" +name = "unicode-xid" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcfc827f90e53a02eaef5e535ee14266c1d569214c6aa70133a624d8a3164ba" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "version_check" @@ -1095,63 +1181,21 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasm-bindgen" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.80" +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] -name = "wasm-bindgen-shared" -version = "0.2.80" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wee_alloc" @@ -1186,3 +1230,38 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "wyz" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" + +[[package]] +name = "xcc_router" +version = "1.0.0" +dependencies = [ + "aurora-engine-types", + "near-sdk", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] diff --git a/etc/xcc-router/Cargo.toml b/etc/xcc-router/Cargo.toml new file mode 100644 index 000000000..ba56690af --- /dev/null +++ b/etc/xcc-router/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "xcc_router" +version = "1.0.0" +authors = ["Aurora "] +edition = "2021" + +[lib] +crate-type = ["cdylib"] + +[profile.release] +codegen-units = 1 +opt-level = "z" +lto = true +debug = false +panic = "abort" + +[dependencies] +aurora-engine-types = { path = "../../engine-types", default-features = false } +near-sdk = "4.0.0" diff --git a/etc/xcc-router/src/lib.rs b/etc/xcc-router/src/lib.rs new file mode 100644 index 000000000..1e6308b98 --- /dev/null +++ b/etc/xcc-router/src/lib.rs @@ -0,0 +1,219 @@ +use aurora_engine_types::parameters::{PromiseArgs, PromiseCreateArgs, PromiseWithCallbackArgs}; +use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; +use near_sdk::collections::{LazyOption, LookupMap}; +use near_sdk::json_types::{U128, U64}; +use near_sdk::BorshStorageKey; +use near_sdk::{env, near_bindgen, AccountId, Gas, PanicOnDefault, Promise, PromiseIndex}; + +#[cfg(not(target_arch = "wasm32"))] +#[cfg(test)] +mod tests; + +#[derive(BorshSerialize, BorshStorageKey)] +enum StorageKey { + Version, + Parent, + Nonce, + Map, +} + +const CURRENT_VERSION: u32 = 1; + +const ERR_ILLEGAL_CALLER: &str = "ERR_ILLEGAL_CALLER"; +const WNEAR_WITHDRAW_GAS: Gas = Gas(5_000_000_000_000); +const WNEAR_REGISTER_GAS: Gas = Gas(5_000_000_000_000); +const REFUND_GAS: Gas = Gas(5_000_000_000_000); +const WNEAR_REGISTER_AMOUNT: u128 = 1_250_000_000_000_000_000_000; +/// Must match arora_engine_precompiles::xcc::state::STORAGE_AMOUNT +const REFUND_AMOUNT: u128 = 2_000_000_000_000_000_000_000_000; + +#[near_bindgen] +#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault)] +pub struct Router { + /// The account id of the Aurora Engine instance that controls this router. + parent: LazyOption, + /// The version of the router contract that was last deployed + version: LazyOption, + /// A sequential id to keep track of how many scheduled promises this router has executed. + /// This allows multiple promises to be scheduled before any of them are executed. + nonce: LazyOption, + /// The storage for the scheduled promises. + scheduled_promises: LookupMap, + /// Account ID for the wNEAR contract. + wnear_account: AccountId, +} + +#[near_bindgen] +impl Router { + #[init(ignore_state)] + pub fn initialize(wnear_account: AccountId, must_register: bool) -> Self { + // The first time this function is called there is no state and the parent is set to be + // the predecessor account id. In subsequent calls, only the original parent is allowed to + // call this function. The idea is that the Create, Deploy and Initialize actions are done in a single + // NEAR batch when a new router is deployed by the engine, so the caller will be the Aurora + // engine instance that the user's address belongs to. If we update this contract and deploy + // a new version of it, again the Deploy and Initialize actions will be done in a single batch + // by the engine. + let caller = env::predecessor_account_id(); + let mut parent = LazyOption::new(StorageKey::Parent, None); + match parent.get() { + None => { + parent.set(&caller); + } + Some(parent) => { + if caller != parent { + env::panic_str(ERR_ILLEGAL_CALLER); + } + } + } + + if must_register { + env::promise_create( + wnear_account.clone(), + "storage_deposit", + b"{}", + WNEAR_REGISTER_AMOUNT, + WNEAR_REGISTER_GAS, + ); + } + + let mut version = LazyOption::new(StorageKey::Version, None); + if version.get().unwrap_or_default() != CURRENT_VERSION { + // Future migrations would go here + + version.set(&CURRENT_VERSION); + } + + let nonce = LazyOption::new(StorageKey::Nonce, None); + let scheduled_promises = LookupMap::new(StorageKey::Map); + Self { + parent, + version, + nonce, + scheduled_promises, + wnear_account, + } + } + + /// This function can only be called by the parent account (i.e. Aurora engine) to ensure that + /// no one can create calls on behalf of the user this router contract is deployed for. + /// The engine only calls this function when the special precompile in the EVM for NEAR cross + /// contract calls is used by the address associated with the sub-account this router contract + /// is deployed at. + pub fn execute(&self, #[serializer(borsh)] promise: PromiseArgs) { + self.require_parent_caller(); + + let promise_id = Router::promise_create(promise); + env::promise_return(promise_id) + } + + /// Similar security considerations here as for `execute`. + pub fn schedule(&mut self, #[serializer(borsh)] promise: PromiseArgs) { + self.require_parent_caller(); + + let nonce = self.nonce.get().unwrap_or_default(); + self.scheduled_promises.insert(&nonce, &promise); + self.nonce.set(&(nonce + 1)); + + near_sdk::log!("Promise scheduled at nonce {}", nonce); + } + + /// It is intentional that this function can be called by anyone (not just the parent). + /// There is no security risk to allowing this function to be open because it can only + /// act on promises that were created via `schedule`. + #[payable] + pub fn execute_scheduled(&mut self, nonce: U64) { + let promise = match self.scheduled_promises.remove(&nonce.0) { + Some(promise) => promise, + None => env::panic_str("ERR_PROMISE_NOT_FOUND"), + }; + + let promise_id = Router::promise_create(promise); + env::promise_return(promise_id) + } + + /// The router will receive wNEAR deposits from its user. This function is to + /// unwrap that wNEAR into NEAR. Additionally, this function will transfer some + /// NEAR back to its parent, if needed. This transfer is done because the parent + /// must cover the storage staking cost with the router account is first created, + /// but the user ultimately is responsible to pay for it. + pub fn unwrap_and_refund_storage(&self, amount: U128, refund_needed: bool) { + self.require_parent_caller(); + + let args = format!(r#"{{"amount": "{}"}}"#, amount.0); + let id = env::promise_create( + self.wnear_account.clone(), + "near_withdraw", + args.as_bytes(), + 1, + WNEAR_WITHDRAW_GAS, + ); + let final_id = if refund_needed { + env::promise_then( + id, + env::current_account_id(), + "send_refund", + &[], + 0, + REFUND_GAS, + ) + } else { + id + }; + env::promise_return(final_id); + } + + #[private] + pub fn send_refund(&self) -> Promise { + let parent = self + .parent + .get() + .unwrap_or_else(|| env::panic_str("ERR_CONTRACT_NOT_INITIALIZED")); + + Promise::new(parent).transfer(REFUND_AMOUNT) + } +} + +impl Router { + fn require_parent_caller(&self) { + let caller = env::predecessor_account_id(); + let parent = self + .parent + .get() + .unwrap_or_else(|| env::panic_str("ERR_CONTRACT_NOT_INITIALIZED")); + if caller != parent { + env::panic_str(ERR_ILLEGAL_CALLER) + } + } + + fn promise_create(promise: PromiseArgs) -> PromiseIndex { + match promise { + PromiseArgs::Create(call) => Self::base_promise_create(call), + PromiseArgs::Callback(cb) => Self::cb_promise_create(cb), + } + } + + fn cb_promise_create(promise: PromiseWithCallbackArgs) -> PromiseIndex { + let base = Self::base_promise_create(promise.base); + let promise = promise.callback; + + env::promise_then( + base, + near_sdk::AccountId::new_unchecked(promise.target_account_id.to_string()), + promise.method.as_str(), + &promise.args, + promise.attached_balance.as_u128(), + promise.attached_gas.as_u64().into(), + ) + } + + fn base_promise_create(promise: PromiseCreateArgs) -> PromiseIndex { + env::promise_create( + near_sdk::AccountId::new_unchecked(promise.target_account_id.to_string()), + promise.method.as_str(), + &promise.args, + promise.attached_balance.as_u128(), + promise.attached_gas.as_u64().into(), + ) + } +} diff --git a/etc/xcc-router/src/tests.rs b/etc/xcc-router/src/tests.rs new file mode 100644 index 000000000..ab9ee2a04 --- /dev/null +++ b/etc/xcc-router/src/tests.rs @@ -0,0 +1,211 @@ +use super::Router; +use aurora_engine_types::parameters::{PromiseArgs, PromiseCreateArgs, PromiseWithCallbackArgs}; +use aurora_engine_types::types::{NearGas, Yocto}; +use near_sdk::mock::VmAction; +use near_sdk::test_utils::test_env::{alice, bob, carol}; +use near_sdk::test_utils::{self, VMContextBuilder}; +use near_sdk::testing_env; + +const WNEAR_ACCOUNT: &str = "wrap.near"; + +#[test] +fn test_initialize() { + let (parent, contract) = create_contract(); + + assert_eq!(contract.parent.get().unwrap(), parent); +} + +/// `initialize` should be able to be called multiple times without resetting the state. +#[test] +fn test_reinitialize() { + let (_parent, mut contract) = create_contract(); + + let nonce = 8; + contract.nonce.set(&nonce); + drop(contract); + + let contract = Router::initialize(WNEAR_ACCOUNT.parse().unwrap(), false); + assert_eq!(contract.nonce.get().unwrap(), nonce); +} + +// If an account other than the parent calls `initialize` it panics. +#[test] +#[should_panic] +fn test_reinitialize_wrong_caller() { + let (parent, contract) = create_contract(); + + assert_eq!(contract.parent.get().unwrap(), parent); + drop(contract); + + testing_env!(VMContextBuilder::new() + .predecessor_account_id(bob()) + .build()); + let _contract = Router::initialize(WNEAR_ACCOUNT.parse().unwrap(), false); +} + +#[test] +#[should_panic] +fn test_execute_wrong_caller() { + let (_parent, contract) = create_contract(); + + let promise = PromiseCreateArgs { + target_account_id: bob().as_str().parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(100_000_000_000_000), + }; + + testing_env!(VMContextBuilder::new() + .predecessor_account_id(bob()) + .build()); + contract.execute(PromiseArgs::Create(promise)); +} + +#[test] +fn test_execute() { + let (_parent, contract) = create_contract(); + + let promise = PromiseCreateArgs { + target_account_id: bob().as_str().parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(100_000_000_000_000), + }; + + contract.execute(PromiseArgs::Create(promise.clone())); + + let mut receipts = test_utils::get_created_receipts(); + assert_eq!(receipts.len(), 1); + let receipt = receipts.pop().unwrap(); + assert_eq!( + receipt.receiver_id.as_str(), + promise.target_account_id.as_ref() + ); + + validate_function_call_action(&receipt.actions, promise); +} + +#[test] +fn test_execute_callback() { + let (_parent, contract) = create_contract(); + + let promise = PromiseWithCallbackArgs { + base: PromiseCreateArgs { + target_account_id: bob().as_str().parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(5678), + attached_gas: NearGas::new(100_000_000_000_000), + }, + callback: PromiseCreateArgs { + target_account_id: carol().as_str().parse().unwrap(), + method: "another_method".into(), + args: b"goodbye_world".to_vec(), + attached_balance: Yocto::new(567), + attached_gas: NearGas::new(10_000_000_000_000), + }, + }; + + contract.execute(PromiseArgs::Callback(promise.clone())); + + let receipts = test_utils::get_created_receipts(); + assert_eq!(receipts.len(), 2); + let base = &receipts[0]; + let callback = &receipts[1]; + + validate_function_call_action(&base.actions, promise.base); + validate_function_call_action(&callback.actions, promise.callback); +} + +#[test] +#[should_panic] +fn test_schedule_wrong_caller() { + let (_parent, mut contract) = create_contract(); + + let promise = PromiseCreateArgs { + target_account_id: bob().as_str().parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(100_000_000_000_000), + }; + + testing_env!(VMContextBuilder::new() + .predecessor_account_id(bob()) + .build()); + contract.schedule(PromiseArgs::Create(promise)); +} + +#[test] +fn test_schedule_and_execute() { + let (_parent, mut contract) = create_contract(); + + let promise = PromiseCreateArgs { + target_account_id: bob().as_str().parse().unwrap(), + method: "some_method".into(), + args: b"hello_world".to_vec(), + attached_balance: Yocto::new(56), + attached_gas: NearGas::new(100_000_000_000_000), + }; + + contract.schedule(PromiseArgs::Create(promise.clone())); + + // no promise actually create yet + let receipts = test_utils::get_created_receipts(); + assert!(receipts.is_empty()); + + // promise stored and nonce incremented instead + assert_eq!(contract.nonce.get().unwrap(), 1); + let stored_promise = match contract.scheduled_promises.get(&0) { + Some(PromiseArgs::Create(promise)) => promise, + _ => unreachable!(), + }; + assert_eq!(stored_promise, promise); + + // promise executed after calling `execute_scheduled` + // anyone can call this function + testing_env!(VMContextBuilder::new() + .predecessor_account_id(bob()) + .build()); + contract.execute_scheduled(0.into()); + + assert_eq!(contract.nonce.get().unwrap(), 1); + assert!(!contract.scheduled_promises.contains_key(&0)); + + let mut receipts = test_utils::get_created_receipts(); + assert_eq!(receipts.len(), 1); + let receipt = receipts.pop().unwrap(); + assert_eq!( + receipt.receiver_id.as_str(), + promise.target_account_id.as_ref() + ); + validate_function_call_action(&receipt.actions, promise); +} + +fn validate_function_call_action(actions: &[VmAction], promise: PromiseCreateArgs) { + assert_eq!(actions.len(), 1); + let action = &actions[0]; + + assert_eq!( + *action, + VmAction::FunctionCall { + function_name: promise.method, + args: promise.args, + gas: promise.attached_gas.as_u64().into(), + deposit: promise.attached_balance.as_u128() + } + ); +} + +fn create_contract() -> (near_sdk::AccountId, Router) { + let parent = alice(); + testing_env!(VMContextBuilder::new() + .current_account_id(format!("some_address.{}", parent).try_into().unwrap()) + .predecessor_account_id(parent.clone()) + .build()); + let contract = Router::initialize(WNEAR_ACCOUNT.parse().unwrap(), false); + + (parent, contract) +} diff --git a/verify_evm_erc20.sh b/verify_evm_erc20.sh new file mode 100644 index 000000000..9fa13505b --- /dev/null +++ b/verify_evm_erc20.sh @@ -0,0 +1,8 @@ +rm etc/eth-contracts/res/*.bin etc/eth-contracts/res/*.hex +cargo make build-contracts +if [[ $(git diff etc/eth-contracts/res/) ]]; then + echo "Error EvmErc20.bin not up to date" + exit 1 +else + exit 0 +fi