diff --git a/.github/workflows/protocol.yml b/.github/workflows/protocol.yml
index 4c8d74bb55e..839ec7f8942 100644
--- a/.github/workflows/protocol.yml
+++ b/.github/workflows/protocol.yml
@@ -20,47 +20,46 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
+ with:
+ submodules: recursive
+
+ - name: Install Foundry
+ uses: foundry-rs/foundry-toolchain@v1
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies
- name: protocol - Unit Tests
working-directory: ./packages/protocol
- run: pnpm clean && pnpm test
-
- - name: protocol - Integration Tests
- working-directory: ./packages/protocol
- run: pnpm test:integration
-
- - name: protocol - Tokenomics Tests
- working-directory: ./packages/protocol
- run: pnpm test:tokenomics
-
- - name: protocol - Bridge Tests
- working-directory: ./packages/protocol
- run: pnpm test:bridge
-
- - name: protocol - Test Coverage
- working-directory: ./packages/protocol
- run: pnpm test:coverage
+ run: pnpm clean && pnpm compile:hardhat && pnpm test
- name: protocol - Generate Genesis
working-directory: ./packages/protocol
run: pnpm test:genesis
- - name: protocol - Export ABIs
+ # TODO: CompilerError: Stack too deep
+ # - name: protocol - Test Coverage
+ # working-directory: ./packages/protocol
+ # run: pnpm test:coverage
+
+ - name: protocol - Run snapshot (foundry)
working-directory: ./packages/protocol
- run: pnpm export:abi
+ run: pnpm snapshot
- name: protocol - Deploy L1 Contracts
working-directory: ./packages/protocol
- run: pnpm deploy:hardhat
-
- - name: protocol - Upload coverage to Codecov
- uses: codecov/codecov-action@v3
- with:
- directory: ./packages/protocol/coverage
- flags: protocol
+ run: |
+ anvil &
+ while ! nc -z localhost 8545; do
+ sleep 1
+ done
+ pnpm deploy:foundry
+
+ # - name: protocol - Upload coverage to Codecov
+ # uses: codecov/codecov-action@v3
+ # with:
+ # directory: ./packages/protocol/coverage
+ # flags: protocol
post-merge:
if: github.event.pull_request.merged == true
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000000..d4741407013
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,20 @@
+[submodule "packages/protocol/lib/solmate"]
+ path = packages/protocol/lib/solmate
+ url = https://github.com/rari-capital/solmate
+ branch = v1.5.0
+[submodule "packages/protocol/lib/openzeppelin-contracts-upgradeable"]
+ path = packages/protocol/lib/openzeppelin-contracts-upgradeable
+ url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
+ branch = v4.8.2
+[submodule "packages/protocol/lib/openzeppelin-contracts"]
+ path = packages/protocol/lib/openzeppelin-contracts
+ url = https://github.com/OpenZeppelin/openzeppelin-contracts
+ branch = v4.8.2
+[submodule "packages/protocol/lib/forge-std"]
+ path = packages/protocol/lib/forge-std
+ url = https://github.com/foundry-rs/forge-std
+ branch = chore/v1.5.1
+[submodule "packages/protocol/lib/foundry-random"]
+ path = packages/protocol/lib/foundry-random
+ url = https://github.com/joejordan/foundry-random
+ branch = v1.0.2
diff --git a/README.md b/README.md
index 15b6f82be37..970d1b96508 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,10 @@
[![Twitter Follow](https://img.shields.io/twitter/follow/taikoxyz?style=social)](https://twitter.com/taikoxyz)
[![Discord](https://img.shields.io/discord/984015101017346058?color=%235865F2&label=Discord&logo=discord&logoColor=%23fff)](https://discord.gg/taikoxyz)
[![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/taikoxyz/taiko-mono/badge)](https://www.gitpoap.io/gh/taikoxyz/taiko-mono)
+[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/taikoxyz/taiko-mono/protocol.yml?branch=main&label=Protocol&logo=github)](https://github.com/taikoxyz/taiko-mono/actions/workflows/protocol.yml)
+[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/taikoxyz/taiko-mono/relayer.yml?branch=main&label=Relayer&logo=github)](https://github.com/taikoxyz/taiko-mono/actions/workflows/relayer.yml)
+[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/taikoxyz/taiko-mono/bridge-ui.yml?branch=main&label=Bridge%20UI&logo=github)](https://github.com/taikoxyz/taiko-mono/actions/workflows/bridge-ui.yml)
+[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/taikoxyz/taiko-mono/website.yml?branch=main&label=Website&logo=github)](https://github.com/taikoxyz/taiko-mono/actions/workflows/website.yml)
[![License](https://img.shields.io/github/license/taikoxyz/taiko-mono)](https://github.com/taikoxyz/taiko-mono/blob/main/LICENSE.md)
@@ -41,7 +45,6 @@ taiko-mono/
│ ├── relayer: Bridge backend relayer in Go
│ ├── starter-dapp: Template for Taiko dapps
│ ├── status-page: Taiko protocol status page
-│ ├── tokenomics: Taiko tokenomics simulations
│ ├── website: Main documentation website at taiko.xyz (https://taiko.xyz/)
│ └── whitepaper: Whitepaper source files with automated publishing
...
diff --git a/packages/bridge-ui/CHANGELOG.md b/packages/bridge-ui/CHANGELOG.md
index 12365be5982..9d5ddaf1c37 100644
--- a/packages/bridge-ui/CHANGELOG.md
+++ b/packages/bridge-ui/CHANGELOG.md
@@ -39,20 +39,18 @@
## [0.3.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.2.0...bridge-ui-v0.3.0) (2023-03-15)
-
### Features
-* **bridge-ui:** custom recipient address ([#13309](https://github.com/taikoxyz/taiko-mono/issues/13309)) ([56d8848](https://github.com/taikoxyz/taiko-mono/commit/56d884812b3f12a52895bc666cb25e6edbe6eba0))
-* **bridge-ui:** fetch transactions from relayer api ([#13244](https://github.com/taikoxyz/taiko-mono/issues/13244)) ([9732cc0](https://github.com/taikoxyz/taiko-mono/commit/9732cc084ed99196a4cd2ccedf9187af4d289ed6))
-* **bridge-ui:** support both bull and horse tokens on the bridge UI ([#13249](https://github.com/taikoxyz/taiko-mono/issues/13249)) ([f9f38bb](https://github.com/taikoxyz/taiko-mono/commit/f9f38bb075c02c7976e0d04c84e4b8b5ac255644))
-* **bridge-ui:** support route param to directly open transactions tab ([#13281](https://github.com/taikoxyz/taiko-mono/issues/13281)) ([b4c31cd](https://github.com/taikoxyz/taiko-mono/commit/b4c31cd8566b834cbf83a434c705fb281d375d12))
-
+- **bridge-ui:** custom recipient address ([#13309](https://github.com/taikoxyz/taiko-mono/issues/13309)) ([56d8848](https://github.com/taikoxyz/taiko-mono/commit/56d884812b3f12a52895bc666cb25e6edbe6eba0))
+- **bridge-ui:** fetch transactions from relayer api ([#13244](https://github.com/taikoxyz/taiko-mono/issues/13244)) ([9732cc0](https://github.com/taikoxyz/taiko-mono/commit/9732cc084ed99196a4cd2ccedf9187af4d289ed6))
+- **bridge-ui:** support both bull and horse tokens on the bridge UI ([#13249](https://github.com/taikoxyz/taiko-mono/issues/13249)) ([f9f38bb](https://github.com/taikoxyz/taiko-mono/commit/f9f38bb075c02c7976e0d04c84e4b8b5ac255644))
+- **bridge-ui:** support route param to directly open transactions tab ([#13281](https://github.com/taikoxyz/taiko-mono/issues/13281)) ([b4c31cd](https://github.com/taikoxyz/taiko-mono/commit/b4c31cd8566b834cbf83a434c705fb281d375d12))
### Bug Fixes
-* **bridge-ui:** minor transactions list fix ([#13266](https://github.com/taikoxyz/taiko-mono/issues/13266)) ([4e78865](https://github.com/taikoxyz/taiko-mono/commit/4e788655ebd508eca3e1665ecb50f3010d2f51af))
-* **bridge-ui:** transaction and pendingTransaction refactor ([#13307](https://github.com/taikoxyz/taiko-mono/issues/13307)) ([9d215cf](https://github.com/taikoxyz/taiko-mono/commit/9d215cfe5ac6863405390444672a1e70e7501032))
-* **website,bridge-ui:** broken docs link + remove deprecated note in docs ([#13259](https://github.com/taikoxyz/taiko-mono/issues/13259)) ([912c155](https://github.com/taikoxyz/taiko-mono/commit/912c15595d7b0e3e2b4ec62fbcebeaf9dbc9db66))
+- **bridge-ui:** minor transactions list fix ([#13266](https://github.com/taikoxyz/taiko-mono/issues/13266)) ([4e78865](https://github.com/taikoxyz/taiko-mono/commit/4e788655ebd508eca3e1665ecb50f3010d2f51af))
+- **bridge-ui:** transaction and pendingTransaction refactor ([#13307](https://github.com/taikoxyz/taiko-mono/issues/13307)) ([9d215cf](https://github.com/taikoxyz/taiko-mono/commit/9d215cfe5ac6863405390444672a1e70e7501032))
+- **website,bridge-ui:** broken docs link + remove deprecated note in docs ([#13259](https://github.com/taikoxyz/taiko-mono/issues/13259)) ([912c155](https://github.com/taikoxyz/taiko-mono/commit/912c15595d7b0e3e2b4ec62fbcebeaf9dbc9db66))
## [0.2.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v0.1.2...bridge-ui-v0.2.0) (2023-03-01)
diff --git a/packages/bridge-ui/src/proof/ProofService.spec.ts b/packages/bridge-ui/src/proof/ProofService.spec.ts
index 343a1820f83..3d6bc517bdc 100644
--- a/packages/bridge-ui/src/proof/ProofService.spec.ts
+++ b/packages/bridge-ui/src/proof/ProofService.spec.ts
@@ -105,11 +105,9 @@ const invalidStorageProof2: EthGetProofResponse = {
};
const expectedProof =
- '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000380a7881266ca0a344c43cb24175d9dbd243b58d45d6ae6ad71310a273a3d1d3afb1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000ea674fdde714fd979de3edf0f56aa9716b898ec8c0dcf937b3f6136dd70a1ad11cc57b040fd410f3c49a5146f20c732895a3cc217273ade6b6ed865a9975ac281da23b90b141a8b607d874d2cd95e65e81336f8e74bb61e381e9238a08b169580f3cbf9b8b79d7d5ee708d3e286103eb291dfd0800000000000400000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000020000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b0000000000000000000000000000000000000000000000000000000000000300f5ba25df1e92e89a09e0b32063b81795f631100801158f5fa733f2ba26843bd0000000000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001265746865726d696e652d75732d7765737431000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e1a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
-
+ '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000380a7881266ca0a344c43cb24175d9dbd243b58d45d6ae6ad71310a273a3d1d3afb1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000ea674fdde714fd979de3edf0f56aa9716b898ec8c0dcf937b3f6136dd70a1ad11cc57b040fd410f3c49a5146f20c732895a3cc217273ade6b6ed865a9975ac281da23b90b141a8b607d874d2cd95e65e81336f8e74bb61e381e9238a08b169580f3cbf9b8b79d7d5ee708d3e286103eb291dfd0800000000000400000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000020000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b0000000000000000000000000000000000000000000000000000000000000300f5ba25df1e92e89a09e0b32063b81795f631100801158f5fa733f2ba26843bd0000000000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001265746865726d696e652d75732d776573743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e1a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
const expectedProofWithBaseFee =
- '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000380a7881266ca0a344c43cb24175d9dbd243b58d45d6ae6ad71310a273a3d1d3afb1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000ea674fdde714fd979de3edf0f56aa9716b898ec8c0dcf937b3f6136dd70a1ad11cc57b040fd410f3c49a5146f20c732895a3cc217273ade6b6ed865a9975ac281da23b90b141a8b607d874d2cd95e65e81336f8e74bb61e381e9238a08b169580f3cbf9b8b79d7d5ee708d3e286103eb291dfd0800000000000400000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000020000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b0000000000000000000000000000000000000000000000000000000000000300f5ba25df1e92e89a09e0b32063b81795f631100801158f5fa733f2ba26843bd0000000000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001265746865726d696e652d75732d7765737431000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e1a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
-
+ '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000380a7881266ca0a344c43cb24175d9dbd243b58d45d6ae6ad71310a273a3d1d3afb1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000ea674fdde714fd979de3edf0f56aa9716b898ec8c0dcf937b3f6136dd70a1ad11cc57b040fd410f3c49a5146f20c732895a3cc217273ade6b6ed865a9975ac281da23b90b141a8b607d874d2cd95e65e81336f8e74bb61e381e9238a08b169580f3cbf9b8b79d7d5ee708d3e286103eb291dfd0800000000000400000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000020000000000000000000000000000000000000000000000000100000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000007b0000000000000000000000000000000000000000000000000000000000000300f5ba25df1e92e89a09e0b32063b81795f631100801158f5fa733f2ba26843bd0000000000000000000000000000000000000000000000000000000000000007b00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001265746865726d696e652d75732d776573743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022e1a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
const srcChain = 167001;
const destChain = 31336;
diff --git a/packages/bridge-ui/src/proof/ProofService.ts b/packages/bridge-ui/src/proof/ProofService.ts
index e1fce0dffb4..dee7ba67cd5 100644
--- a/packages/bridge-ui/src/proof/ProofService.ts
+++ b/packages/bridge-ui/src/proof/ProofService.ts
@@ -73,10 +73,7 @@ export class ProofService implements Prover {
blockHeader: BlockHeader,
) {
// RLP encode the proof together for LibTrieProof to decode
- const encodedProof = ethers.utils.defaultAbiCoder.encode(
- ['bytes', 'bytes'],
- [RLP.encode(proof.accountProof), RLP.encode(proof.storageProof[0].proof)],
- );
+ const encodedProof = RLP.encode(proof.storageProof[0].proof);
// encode the SignalProof struct from LibBridgeSignal
const signalProof = ethers.utils.defaultAbiCoder.encode(
diff --git a/packages/protocol/.eslintignore b/packages/protocol/.eslintignore
index a51367fe352..fcece9835f3 100644
--- a/packages/protocol/.eslintignore
+++ b/packages/protocol/.eslintignore
@@ -1,4 +1,5 @@
node_modules
artifacts
cache
-coverage
\ No newline at end of file
+coverage
+lib
\ No newline at end of file
diff --git a/packages/protocol/.gas-snapshot b/packages/protocol/.gas-snapshot
new file mode 100644
index 00000000000..9c77a8c5dd8
--- /dev/null
+++ b/packages/protocol/.gas-snapshot
@@ -0,0 +1,31 @@
+GasComparisonTest:testCompare_hashKey() (gas: 8911)
+GasComparisonTest:testCompare_hashString(uint256) (runs: 256, μ: 13091, ~: 12617)
+GasComparisonTest:testCompare_hashTwo() (gas: 6991)
+GasComparisonTest:testCompare_increment(uint256) (runs: 256, μ: 256896, ~: 210364)
+GasComparisonTest:testCompare_loadBlockMetadata() (gas: 16191)
+GasComparisonTest:testCompare_return() (gas: 8617)
+GasComparisonTest:testCompare_send0Ether() (gas: 6531)
+LibFixedPointMathTest:testExp1() (gas: 697)
+LibFixedPointMathTest:testExp3() (gas: 1533)
+LibFixedPointMathTest:testExpGas() (gas: 5328)
+LibFixedPointMathTest:testExpLargest() (gas: 3929)
+LibFixedPointMathTest:testExpSmallest() (gas: 3909)
+LibFixedPointMathTest:testExpSome() (gas: 3827)
+TaikoL1Test:test_block_time_decreases_but_fee_remains() (gas: 14868515)
+TaikoL1Test:test_block_time_increases_and_fee_decreases() (gas: 14862630)
+TaikoL1Test:test_more_blocks_than_ring_buffer_size() (gas: 16845131)
+TaikoL1Test:test_multiple_blocks_in_one_L1_block() (gas: 671686)
+TaikoL1Test:test_verifying_multiple_blocks_once() (gas: 2827699)
+TestLib1559Math:test1559_2X1XRatio(uint16) (runs: 256, μ: 489986, ~: 489986)
+TestLib1559Math:test1559_SpecalCases(uint16) (runs: 256, μ: 19937, ~: 19937)
+TestLibTokenomics:testTokenomicsFeeCalcWithNonZeroStartBips() (gas: 4930)
+TestLibTokenomics:testTokenomicsFeeCalcWithZeroStartBips() (gas: 4875)
+TestLibTokenomics:testTokenomicsRewardCalcWithNonZeroStartBips() (gas: 5571)
+TestLibTokenomics:testTokenomicsRewardCalcWithZeroStartBips() (gas: 4799)
+TestTaikoL2:testAnchorSigning(bytes32) (runs: 256, μ: 23542, ~: 23563)
+TestTaikoL2:testAnchorTxsBlocktimeConstant() (gas: 7245201)
+TestTaikoL2:testAnchorTxsBlocktimeDecreasing() (gas: 2184915)
+TestTaikoL2:testAnchorTxsBlocktimeIncreasing() (gas: 2046549)
+TestTaikoL2:testAnchorTxsFailByNonTaikoL2Signer() (gas: 62542)
+TestTaikoL2:testAnchorTxsFailInTheSameBlock() (gas: 161344)
+TestTaikoL2:testGetBasefee() (gas: 229572)
\ No newline at end of file
diff --git a/packages/protocol/.gitignore b/packages/protocol/.gitignore
index b660994e1f3..968e3fd962d 100644
--- a/packages/protocol/.gitignore
+++ b/packages/protocol/.gitignore
@@ -2,6 +2,7 @@ node_modules
.env
coverage
coverage.json
+.gas-snapshot
typechain
abis
abi
@@ -16,7 +17,16 @@ npm-debug.log*
# Hardhat files
cache
artifacts
+cache
+cache_forge
+cache_hardhat
out
+# Foundry
+broadcast
+
# Editors
.vscode
+
+#coverage
+lcov.info
\ No newline at end of file
diff --git a/packages/protocol/.prettierignore b/packages/protocol/.prettierignore
index 4b910ac3a6a..3fadde88a77 100644
--- a/packages/protocol/.prettierignore
+++ b/packages/protocol/.prettierignore
@@ -1,6 +1,6 @@
node_modules
+lib
artifacts
cache
coverage*
gasReporterOutput.json
-contracts/thirdparty/LibBlockHeaderDecoder.sol
diff --git a/packages/protocol/.solcover.js b/packages/protocol/.solcover.js
index 8064404e0ca..0cc5bfc493b 100644
--- a/packages/protocol/.solcover.js
+++ b/packages/protocol/.solcover.js
@@ -1,10 +1,6 @@
module.exports = {
configureYulOptimizer: true,
skipFiles: [
- "thirdparty/LibBlockHeaderDecoder.sol", // assembly too long
- "libs/LibReceiptDecoder.sol", //integration test,
- "test/libs/TestLibReceiptDecoder.sol", //integration tests
- "test/thirdparty/TestLibBlockHeaderDecoder.sol", // assembly too long
],
mocha: {
grep: "^[^integration]",
diff --git a/packages/protocol/.solhint.json b/packages/protocol/.solhint.json
index 46c6ff69ac8..1ccc385aed2 100644
--- a/packages/protocol/.solhint.json
+++ b/packages/protocol/.solhint.json
@@ -9,6 +9,7 @@
"no-inline-assembly": "off",
"not-rely-on-time": "off",
"ordering": "warn",
- "payable-fallback": "off"
+ "payable-fallback": "off",
+ "no-console": "off"
}
}
diff --git a/packages/protocol/.solhintignore b/packages/protocol/.solhintignore
index 871b9009a80..ef1c8c9a147 100644
--- a/packages/protocol/.solhintignore
+++ b/packages/protocol/.solhintignore
@@ -1,10 +1,7 @@
node_modules/
-contracts/aux/tokens/ERC20Upgradeable.sol
+lib/
contracts/test/TestLibRLPReader.sol
contracts/test/TestLibRLPWriter.sol
-contracts/libs/Lib1559Math.sol
-contracts/libs/LibAddress.sol
-contracts/libs/LibMath.sol
-contracts/libs/LibUint512Math.sol
-contracts/libs/LibSharedConfig.sol
-**/contracts/thirdparty/**/*.sol
\ No newline at end of file
+**/contracts/thirdparty/**/*.sol
+test/GasComparison.t.sol
+test/TestLn.sol
\ No newline at end of file
diff --git a/packages/protocol/CHANGELOG.md b/packages/protocol/CHANGELOG.md
index 8116840369b..b63a3fcd6ac 100644
--- a/packages/protocol/CHANGELOG.md
+++ b/packages/protocol/CHANGELOG.md
@@ -2,40 +2,35 @@
## [0.6.1](https://github.com/taikoxyz/taiko-mono/compare/protocol-v0.6.0...protocol-v0.6.1) (2023-04-08)
-
### Bug Fixes
-* **repo:** fix multiple typos ([#13558](https://github.com/taikoxyz/taiko-mono/issues/13558)) ([f54242a](https://github.com/taikoxyz/taiko-mono/commit/f54242aa95e5c5563f8f0a7f9af0a1eab20ab67b))
+- **repo:** fix multiple typos ([#13558](https://github.com/taikoxyz/taiko-mono/issues/13558)) ([f54242a](https://github.com/taikoxyz/taiko-mono/commit/f54242aa95e5c5563f8f0a7f9af0a1eab20ab67b))
## [0.6.0](https://github.com/taikoxyz/taiko-mono/compare/protocol-v0.5.0...protocol-v0.6.0) (2023-03-29)
-
### Features
-* **protocol:** merge alpha 2 to main ([#13369](https://github.com/taikoxyz/taiko-mono/issues/13369)) ([2b9cc64](https://github.com/taikoxyz/taiko-mono/commit/2b9cc6466509372f35109b48c00948d2234b0d59))
-* **relayer:** merge alpha-2 to main ([#13376](https://github.com/taikoxyz/taiko-mono/issues/13376)) ([3148f6b](https://github.com/taikoxyz/taiko-mono/commit/3148f6ba955e1b3918289332d2ee30f139edea8b))
-
+- **protocol:** merge alpha 2 to main ([#13369](https://github.com/taikoxyz/taiko-mono/issues/13369)) ([2b9cc64](https://github.com/taikoxyz/taiko-mono/commit/2b9cc6466509372f35109b48c00948d2234b0d59))
+- **relayer:** merge alpha-2 to main ([#13376](https://github.com/taikoxyz/taiko-mono/issues/13376)) ([3148f6b](https://github.com/taikoxyz/taiko-mono/commit/3148f6ba955e1b3918289332d2ee30f139edea8b))
### Bug Fixes
-* **relayer:** new abi gen bindings ([#13342](https://github.com/taikoxyz/taiko-mono/issues/13342)) ([8655ff1](https://github.com/taikoxyz/taiko-mono/commit/8655ff16f3de7445f01b4fd502d183d93e394e1a))
+- **relayer:** new abi gen bindings ([#13342](https://github.com/taikoxyz/taiko-mono/issues/13342)) ([8655ff1](https://github.com/taikoxyz/taiko-mono/commit/8655ff16f3de7445f01b4fd502d183d93e394e1a))
## [0.5.0](https://github.com/taikoxyz/taiko-mono/compare/protocol-v0.4.0...protocol-v0.5.0) (2023-03-15)
-
### Features
-* **protocol:** let `PlonkVerifier` return `keccak256("taiko")` ([#13277](https://github.com/taikoxyz/taiko-mono/issues/13277)) ([8ca632c](https://github.com/taikoxyz/taiko-mono/commit/8ca632ce9263219a37368d1f0f84a44cbb369794))
-* **protocol:** optimize gas for processMessage & retryMessage ([#13181](https://github.com/taikoxyz/taiko-mono/issues/13181)) ([178e382](https://github.com/taikoxyz/taiko-mono/commit/178e3823d9ca8a0396ef2a7198c064368feaca90))
-* **protocol:** tokens can only mint once ([#13252](https://github.com/taikoxyz/taiko-mono/issues/13252)) ([72d152b](https://github.com/taikoxyz/taiko-mono/commit/72d152b7d998b9f306a12823df964a2da18687dd))
-* **protocol:** update `LibBlockHeader` to hash post Shanghai fork blocks ([#13278](https://github.com/taikoxyz/taiko-mono/issues/13278)) ([2e34634](https://github.com/taikoxyz/taiko-mono/commit/2e34634560a28c356404f2d837d21f2e5e85bfa3))
-
+- **protocol:** let `PlonkVerifier` return `keccak256("taiko")` ([#13277](https://github.com/taikoxyz/taiko-mono/issues/13277)) ([8ca632c](https://github.com/taikoxyz/taiko-mono/commit/8ca632ce9263219a37368d1f0f84a44cbb369794))
+- **protocol:** optimize gas for processMessage & retryMessage ([#13181](https://github.com/taikoxyz/taiko-mono/issues/13181)) ([178e382](https://github.com/taikoxyz/taiko-mono/commit/178e3823d9ca8a0396ef2a7198c064368feaca90))
+- **protocol:** tokens can only mint once ([#13252](https://github.com/taikoxyz/taiko-mono/issues/13252)) ([72d152b](https://github.com/taikoxyz/taiko-mono/commit/72d152b7d998b9f306a12823df964a2da18687dd))
+- **protocol:** update `LibBlockHeader` to hash post Shanghai fork blocks ([#13278](https://github.com/taikoxyz/taiko-mono/issues/13278)) ([2e34634](https://github.com/taikoxyz/taiko-mono/commit/2e34634560a28c356404f2d837d21f2e5e85bfa3))
### Bug Fixes
-* **protocol:** fix config.slotSmoothingFactor and getTimeAdjustedFee bug ([#13293](https://github.com/taikoxyz/taiko-mono/issues/13293)) ([18f3d9f](https://github.com/taikoxyz/taiko-mono/commit/18f3d9fcf99691f54b65198618c49e57590b0a84))
-* **protocol:** make download solc script can run outside the protocol dir ([#13263](https://github.com/taikoxyz/taiko-mono/issues/13263)) ([7cd7787](https://github.com/taikoxyz/taiko-mono/commit/7cd77873d0ce1e5f8b43167a8009327cca4200c3))
-* **protocol:** Wrong calculation when minting ERC20 tokens ([#13250](https://github.com/taikoxyz/taiko-mono/issues/13250)) ([5920b7e](https://github.com/taikoxyz/taiko-mono/commit/5920b7eee377e913c10b5b78384f24712808f179))
+- **protocol:** fix config.slotSmoothingFactor and getTimeAdjustedFee bug ([#13293](https://github.com/taikoxyz/taiko-mono/issues/13293)) ([18f3d9f](https://github.com/taikoxyz/taiko-mono/commit/18f3d9fcf99691f54b65198618c49e57590b0a84))
+- **protocol:** make download solc script can run outside the protocol dir ([#13263](https://github.com/taikoxyz/taiko-mono/issues/13263)) ([7cd7787](https://github.com/taikoxyz/taiko-mono/commit/7cd77873d0ce1e5f8b43167a8009327cca4200c3))
+- **protocol:** Wrong calculation when minting ERC20 tokens ([#13250](https://github.com/taikoxyz/taiko-mono/issues/13250)) ([5920b7e](https://github.com/taikoxyz/taiko-mono/commit/5920b7eee377e913c10b5b78384f24712808f179))
## [0.4.0](https://github.com/taikoxyz/taiko-mono/compare/protocol-v0.3.0...protocol-v0.4.0) (2023-03-01)
@@ -127,7 +122,7 @@
- **protocol:** fix `BlockVerified` event ([#381](https://github.com/taikoxyz/taiko-mono/issues/381)) ([fe479c8](https://github.com/taikoxyz/taiko-mono/commit/fe479c8ff22b0da59ec75cc9e0dea04e38ebbb92))
- **protocol:** fix `TokenVault.sendERC20` ([#420](https://github.com/taikoxyz/taiko-mono/issues/420)) ([d42b953](https://github.com/taikoxyz/taiko-mono/commit/d42b953c51e66948d7a6563042f7a521ee2d557a))
- **protocol:** fix an occasional error in `test:tokenomics` ([#12950](https://github.com/taikoxyz/taiko-mono/issues/12950)) ([005364c](https://github.com/taikoxyz/taiko-mono/commit/005364c11c327f6dcaad7872c5064eb81e52f35b))
-- **protocol:** Fix bug in getProposedBlock ([#11679](https://github.com/taikoxyz/taiko-mono/issues/11679)) ([a6a596c](https://github.com/taikoxyz/taiko-mono/commit/a6a596cf10ecfa517a781e8c487b2d74f05a9526))
+- **protocol:** Fix bug in getBlock ([#11679](https://github.com/taikoxyz/taiko-mono/issues/11679)) ([a6a596c](https://github.com/taikoxyz/taiko-mono/commit/a6a596cf10ecfa517a781e8c487b2d74f05a9526))
- **protocol:** let `LibZKP.verify` return `true` ([#12676](https://github.com/taikoxyz/taiko-mono/issues/12676)) ([d0f17a6](https://github.com/taikoxyz/taiko-mono/commit/d0f17a6dc8921df49a63831d91170a7c11476bd9))
- **protocol:** Remove enableDestChain functionality ([#12341](https://github.com/taikoxyz/taiko-mono/issues/12341)) ([362d083](https://github.com/taikoxyz/taiko-mono/commit/362d083497cc74b3bcd05a406beeff2101a422ef))
- **protocol:** update avg proof time and avg block time ([#391](https://github.com/taikoxyz/taiko-mono/issues/391)) ([3681483](https://github.com/taikoxyz/taiko-mono/commit/3681483efe97c38a488563594c003dabfa23b2de))
diff --git a/packages/protocol/README.md b/packages/protocol/README.md
index 47ed575f7a8..8ccc9a135f9 100644
--- a/packages/protocol/README.md
+++ b/packages/protocol/README.md
@@ -32,16 +32,20 @@ Start by creating a `config.json`, for example:
{
// Owner address of the pre-deployed L2 contracts.
"contractOwner": "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39",
-
// Chain ID of the Taiko L2 network.
"chainId": 167,
-
// Account address and pre-mint ETH amount as key-value pairs.
"seedAccounts": [
{ "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39": 1024 },
{ "0x79fcdef22feed20eddacbb2587640e45491b757f": 1024 }
],
-
+ // L2 EIP-1559 baseFee calculation related fields.
+ "param1559": {
+ "yscale": "358298803609133338137582400989",
+ "xscale": "1488514844",
+ "gasIssuedPerSecond": "12500000",
+ "gasExcess": "45450000000"
+ },
// Option to pre-deploy an ERC-20 token.
"predeployERC20": true
}
@@ -57,3 +61,12 @@ The script will output two JSON files under `./deployments`:
- `l2_genesis_alloc.json`: the `alloc` field which will be used in L2 genesis JSON file
- `l2_genesis_storage_layout.json`: the storage layout of those pre-deployed contracts
+
+## Using Foundry
+
+This project also integrates with Foundry for building and testing contracts.
+
+- To compile using foundry: `forge build` or `pnpm compile`
+- To run foundry tests: `forge test --gas-report -vvv` or `pnpm test:foundry`
+
+Note that compiling with foundry uses dependencies inside the `lib` dir (instead of `node_modules`).
diff --git a/packages/protocol/contracts/L1/ProofVerifier.sol b/packages/protocol/contracts/L1/ProofVerifier.sol
deleted file mode 100644
index 4b82a284b3a..00000000000
--- a/packages/protocol/contracts/L1/ProofVerifier.sol
+++ /dev/null
@@ -1,60 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {EssentialContract} from "../common/EssentialContract.sol";
-import {LibZKP} from "../libs/LibZKP.sol";
-import {LibMerkleTrie} from "../thirdparty/LibMerkleTrie.sol";
-
-interface IProofVerifier {
- function verifyZKP(
- string memory verifierId,
- bytes calldata zkproof,
- bytes32 instance
- ) external view returns (bool verified);
-
- function verifyMKP(
- bytes memory key,
- bytes memory value,
- bytes memory proof,
- bytes32 root
- ) external pure returns (bool verified);
-}
-
-contract ProofVerifier is IProofVerifier, EssentialContract {
- function init(address addressManager) external initializer {
- EssentialContract._init(addressManager);
- }
-
- function verifyZKP(
- string memory verifierId,
- bytes calldata zkproof,
- bytes32 instance
- ) external view returns (bool) {
- return
- LibZKP.verify({
- plonkVerifier: resolve(verifierId, false),
- zkproof: zkproof,
- instance: instance
- });
- }
-
- function verifyMKP(
- bytes memory key,
- bytes memory value,
- bytes memory proof,
- bytes32 root
- ) external pure returns (bool) {
- return
- LibMerkleTrie.verifyInclusionProof({
- _key: key,
- _value: value,
- _proof: proof,
- _root: root
- });
- }
-}
diff --git a/packages/protocol/contracts/L1/TaikoConfig.sol b/packages/protocol/contracts/L1/TaikoConfig.sol
new file mode 100644
index 00000000000..f8708b832b8
--- /dev/null
+++ b/packages/protocol/contracts/L1/TaikoConfig.sol
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+import {TaikoData} from "../L1/TaikoData.sol";
+
+library TaikoConfig {
+ function getConfig() internal pure returns (TaikoData.Config memory) {
+ return
+ TaikoData.Config({
+ chainId: 167,
+ // Two weeks if avg block time is 10 seconds
+ maxNumProposedBlocks: 120960,
+ ringBufferSize: 120960 + 10,
+ maxNumVerifiedBlocks: 4096,
+ // Each time one more block is verified, there will be ~20k
+ // more gas cost.
+ maxVerificationsPerTx: 10,
+ // Set it to 6M, since its the upper limit of the Alpha-2
+ // testnet's circuits.
+ blockMaxGasLimit: 6000000,
+ // Set it to 79 (+1 TaikoL2.anchor transaction = 80),
+ // and 80 is the upper limit of the Alpha-2 testnet's circuits.
+ maxTransactionsPerBlock: 79,
+ minEthDepositsPerBlock: 8,
+ maxEthDepositsPerBlock: 32,
+ maxEthDepositAmount: 10000 ether,
+ minEthDepositAmount: 1 ether,
+ // Set it to 120KB, since 128KB is the upper size limit
+ // of a geth transaction, so using 120KB for the proposed
+ // transactions list calldata, 8K for the remaining tx fields.
+ maxBytesPerTxList: 120000,
+ minTxGasLimit: 21000,
+ proofCooldownPeriod: 5 minutes,
+ txListCacheExpiry: 0,
+ proofTimeTarget: 1800, // 85s based on A2 testnet status, or set to 1800 for 30mins (mainnet mock)
+ adjustmentQuotient: 16,
+ relaySignalRoot: false,
+ enableSoloProposer: false
+ });
+ }
+}
diff --git a/packages/protocol/contracts/L1/TaikoCustomErrors.sol b/packages/protocol/contracts/L1/TaikoCustomErrors.sol
deleted file mode 100644
index 059a924e2fd..00000000000
--- a/packages/protocol/contracts/L1/TaikoCustomErrors.sol
+++ /dev/null
@@ -1,48 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-abstract contract TaikoCustomErrors {
- // The following custom errors must match the definitions in other V1 libraries.
- error L1_0_FEE_BASE();
- error L1_ALREADY_PROVEN();
- error L1_ANCHOR_CALLDATA();
- error L1_ANCHOR_DEST();
- error L1_ANCHOR_GAS_LIMIT();
- error L1_ANCHOR_RECEIPT_ADDR();
- error L1_ANCHOR_RECEIPT_DATA();
- error L1_ANCHOR_RECEIPT_LOGS();
- error L1_ANCHOR_RECEIPT_PROOF();
- error L1_ANCHOR_RECEIPT_STATUS();
- error L1_ANCHOR_RECEIPT_TOPICS();
- error L1_ANCHOR_SIG_R();
- error L1_ANCHOR_SIG_S();
- error L1_ANCHOR_TX_PROOF();
- error L1_ANCHOR_TYPE();
- error L1_BLOCK_NUMBER();
- error L1_CANNOT_BE_FIRST_PROVER();
- error L1_COMMITTED();
- error L1_CONFLICT_PROOF();
- error L1_CONTRACT_NOT_ALLOWED();
- error L1_DUP_PROVERS();
- error L1_EXTRA_DATA();
- error L1_GAS_LIMIT();
- error L1_ID();
- error L1_INPUT_SIZE();
- error L1_INVALID_CONFIG();
- error L1_INVALID_PARAM();
- error L1_METADATA_FIELD();
- error L1_META_MISMATCH();
- error L1_NOT_COMMITTED();
- error L1_NOT_ORACLE_PROVER();
- error L1_PROOF_LENGTH();
- error L1_PROVER();
- error L1_SOLO_PROPOSER();
- error L1_TOO_MANY_BLOCKS();
- error L1_TX_LIST();
- error L1_ZKP();
-}
diff --git a/packages/protocol/contracts/L1/TaikoData.sol b/packages/protocol/contracts/L1/TaikoData.sol
index 25f97083af8..c490728e9e4 100644
--- a/packages/protocol/contracts/L1/TaikoData.sol
+++ b/packages/protocol/contracts/L1/TaikoData.sol
@@ -6,110 +6,147 @@
pragma solidity ^0.8.18;
-import {BlockHeader} from "../libs/LibBlockHeader.sol";
-
library TaikoData {
struct Config {
uint256 chainId;
- // up to 2048 pending blocks
- uint256 maxNumBlocks;
- uint256 blockHashHistory;
- // This number is calculated from maxNumBlocks to make
+ uint256 maxNumProposedBlocks;
+ uint256 ringBufferSize;
+ uint256 maxNumVerifiedBlocks;
+ // This number is calculated from maxNumProposedBlocks to make
// the 'the maximum value of the multiplier' close to 20.0
uint256 maxVerificationsPerTx;
- uint256 commitConfirmations;
uint256 blockMaxGasLimit;
uint256 maxTransactionsPerBlock;
uint256 maxBytesPerTxList;
uint256 minTxGasLimit;
- uint256 anchorTxGasLimit;
- uint256 slotSmoothingFactor;
- uint256 rewardBurnBips;
- uint256 proposerDepositPctg;
- // Moving average factors
- uint256 feeBaseMAF;
- uint256 blockTimeMAF;
- uint256 proofTimeMAF;
- uint64 rewardMultiplierPctg;
- uint64 feeGracePeriodPctg;
- uint64 feeMaxPeriodPctg;
- uint64 blockTimeCap;
- uint64 proofTimeCap;
- uint64 bootstrapDiscountHalvingPeriod;
- bool enableTokenomics;
- bool enablePublicInputsCheck;
- bool enableAnchorValidation;
+ uint256 txListCacheExpiry;
+ uint256 proofCooldownPeriod;
+ uint64 minEthDepositsPerBlock;
+ uint64 maxEthDepositsPerBlock;
+ uint96 maxEthDepositAmount;
+ uint96 minEthDepositAmount;
+ uint64 proofTimeTarget;
+ uint8 adjustmentQuotient;
+ bool relaySignalRoot;
+ bool enableSoloProposer;
}
- struct BlockMetadata {
- uint256 id;
- uint256 l1Height;
- bytes32 l1Hash;
- address beneficiary;
+ struct StateVariables {
+ uint64 basefee;
+ uint64 accBlockFees;
+ uint64 genesisHeight;
+ uint64 genesisTimestamp;
+ uint64 numBlocks;
+ uint64 proofTimeIssued;
+ uint64 lastVerifiedBlockId;
+ uint64 accProposedAt;
+ uint64 nextEthDepositToProcess;
+ uint64 numEthDeposits;
+ }
+
+ // 3 slots
+ struct BlockMetadataInput {
bytes32 txListHash;
- bytes32 mixHash;
- bytes extraData;
- uint64 gasLimit;
- uint64 timestamp;
- uint64 commitHeight;
- uint64 commitSlot;
+ address beneficiary;
+ uint32 gasLimit;
+ uint24 txListByteStart; // byte-wise start index (inclusive)
+ uint24 txListByteEnd; // byte-wise end index (exclusive)
+ uint8 cacheTxListInfo; // non-zero = True
}
- struct Evidence {
- TaikoData.BlockMetadata meta;
- BlockHeader header;
- address prover;
- bytes[] proofs;
- uint16 circuitId;
+ // Changing this struct requires changing LibUtils.hashMetadata accordingly.
+ struct BlockMetadata {
+ uint64 id;
+ uint64 timestamp;
+ uint64 l1Height;
+ bytes32 l1Hash;
+ bytes32 mixHash;
+ bytes32 depositsRoot; // match L2 header's withdrawalsRoot
+ bytes32 txListHash;
+ uint24 txListByteStart;
+ uint24 txListByteEnd;
+ uint32 gasLimit;
+ address beneficiary;
+ uint8 cacheTxListInfo;
+ address treasure;
+ TaikoData.EthDeposit[] depositsProcessed;
}
- // 3 slots
- struct ProposedBlock {
+ struct BlockEvidence {
bytes32 metaHash;
- uint256 deposit;
- address proposer;
- uint64 proposedAt;
+ bytes32 parentHash;
+ bytes32 blockHash;
+ bytes32 signalRoot;
+ bytes32 graffiti;
+ address prover;
+ uint32 parentGasUsed;
+ uint32 gasUsed;
+ uint16 verifierId;
+ bytes proof;
}
- // 3 + n slots
+ // 4 slots
struct ForkChoice {
+ // Key is only written/read for the 1st fork choice.
+ bytes32 key;
bytes32 blockHash;
- address prover;
+ bytes32 signalRoot;
uint64 provenAt;
+ address prover; // 0x0 to mark as 'oracle proof'
+ uint32 gasUsed;
+ }
+
+ // 4 slots
+ struct Block {
+ // ForkChoice storage are reusable
+ mapping(uint256 forkChoiceId => ForkChoice) forkChoices;
+ uint64 blockId;
+ uint64 proposedAt;
+ uint64 deposit;
+ uint24 nextForkChoiceId;
+ uint24 verifiedForkChoiceId;
+ bytes32 metaHash;
+ address proposer;
}
// This struct takes 9 slots.
+ struct TxListInfo {
+ uint64 validSince;
+ uint24 size;
+ }
+
+ // 1 slot
+ struct EthDeposit {
+ address recipient;
+ uint96 amount;
+ }
+
struct State {
- // some blocks' hashes won't be persisted,
- // only the latest one if verified in a batch
- mapping(uint256 blockId => bytes32 blockHash) l2Hashes;
- mapping(uint256 blockId => ProposedBlock proposedBlock) proposedBlocks;
- // solhint-disable-next-line max-line-length
- mapping(uint256 blockId => mapping(bytes32 parentHash => ForkChoice forkChoice)) forkChoices;
- // solhint-disable-next-line max-line-length
- mapping(address proposerAddress => mapping(uint256 commitSlot => bytes32 commitHash)) commits;
+ // Ring buffer for proposed blocks and a some recent verified blocks.
+ mapping(uint256 blockId_mode_ringBufferSize => Block) blocks;
// solhint-disable-next-line max-line-length
- mapping(address prover => uint256 outstandingReward) balances;
+ mapping(uint256 blockId => mapping(bytes32 parentHash => mapping(uint32 parentGasUsed => uint256 forkChoiceId))) forkChoiceIds;
+ mapping(address account => uint256 balance) taikoTokenBalances;
+ mapping(bytes32 txListHash => TxListInfo) txListInfo;
+ EthDeposit[] ethDeposits;
+ bytes32 staticRefs;
// Never or rarely changed
+ // Slot 7: never or rarely changed
uint64 genesisHeight;
uint64 genesisTimestamp;
- uint64 __reservedA1;
- uint64 __reservedA2;
- // Changed when a block is proposed or proven/finalized
- uint256 feeBase;
- // Changed when a block is proposed
- uint64 nextBlockId;
- uint64 lastProposedAt; // Timestamp when the last block is proposed.
- uint64 avgBlockTime; // The block time moving average
- uint64 __avgGasLimit; // the block gaslimit moving average, not updated.
- // Changed when a block is proven/finalized
- uint64 latestVerifiedHeight;
- uint64 latestVerifiedId;
- // the proof time moving average, note that for each block, only the
- // first proof's time is considered.
- uint64 avgProofTime;
- uint64 __reservedC1;
+ uint64 __reserved71;
+ uint64 __reserved72;
+ // Slot 8
+ uint64 accProposedAt;
+ uint64 accBlockFees;
+ uint64 numBlocks;
+ uint64 nextEthDepositToProcess;
+ // Slot 9
+ uint64 basefee;
+ uint64 proofTimeIssued;
+ uint64 lastVerifiedBlockId;
+ uint64 __reserved91;
// Reserved
- uint256[42] __gap;
+ uint256[41] __gap;
}
}
diff --git a/packages/protocol/contracts/L1/TaikoErrors.sol b/packages/protocol/contracts/L1/TaikoErrors.sol
new file mode 100644
index 00000000000..32bc0d06e86
--- /dev/null
+++ b/packages/protocol/contracts/L1/TaikoErrors.sol
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+abstract contract TaikoErrors {
+ // The following custom errors must match the definitions in other V1 libraries.
+ error L1_1559_X_SCALE_TOO_LARGE();
+ error L1_1559_Y_SCALE_TOO_LARGE();
+ error L1_ALREADY_PROVEN();
+ error L1_BLOCK_ID();
+ error L1_CONTRACT_NOT_ALLOWED();
+ error L1_EVIDENCE_MISMATCH(bytes32 expected, bytes32 actual);
+ error L1_FORK_CHOICE_NOT_FOUND();
+ error L1_INSUFFICIENT_ETHER();
+ error L1_INSUFFICIENT_TOKEN();
+ error L1_INVALID_CONFIG();
+ error L1_INVALID_ETH_DEPOSIT();
+ error L1_INVALID_EVIDENCE();
+ error L1_INVALID_L21559_PARAMS();
+ error L1_INVALID_METADATA();
+
+ error L1_INVALID_PARAM();
+ error L1_INVALID_PROOF();
+
+ error L1_NOT_ORACLE_PROVER();
+ error L1_NOT_SOLO_PROPOSER();
+ error L1_ORACLE_DISABLED();
+ error L1_TOO_MANY_BLOCKS();
+ error L1_TX_LIST_NOT_EXIST();
+ error L1_TX_LIST_HASH();
+ error L1_TX_LIST_RANGE();
+ error L1_TX_LIST();
+}
diff --git a/packages/protocol/contracts/L1/TaikoEvents.sol b/packages/protocol/contracts/L1/TaikoEvents.sol
index 78110b830d0..63a0ef1fad1 100644
--- a/packages/protocol/contracts/L1/TaikoEvents.sol
+++ b/packages/protocol/contracts/L1/TaikoEvents.sol
@@ -9,18 +9,18 @@ pragma solidity ^0.8.18;
import {TaikoData} from "./TaikoData.sol";
abstract contract TaikoEvents {
- // The following events must match the definitions in other V1 libraries.
- event BlockVerified(uint256 indexed id, bytes32 blockHash);
-
- event BlockCommitted(uint64 commitSlot, bytes32 commitHash);
-
+ // The following events must match the definitions in corresponding L1 libraries.
event BlockProposed(uint256 indexed id, TaikoData.BlockMetadata meta);
event BlockProven(
uint256 indexed id,
bytes32 parentHash,
bytes32 blockHash,
- address prover,
- uint64 provenAt
+ bytes32 signalRoot,
+ address prover
);
+
+ event BlockVerified(uint256 indexed id, bytes32 blockHash);
+
+ event EthDeposited(TaikoData.EthDeposit deposit);
}
diff --git a/packages/protocol/contracts/L1/TaikoL1.sol b/packages/protocol/contracts/L1/TaikoL1.sol
index b862ca1fb00..7689ae0571f 100644
--- a/packages/protocol/contracts/L1/TaikoL1.sol
+++ b/packages/protocol/contracts/L1/TaikoL1.sol
@@ -6,103 +6,85 @@
pragma solidity ^0.8.18;
+import {AddressResolver} from "../common/AddressResolver.sol";
import {EssentialContract} from "../common/EssentialContract.sol";
-import {IHeaderSync} from "../common/IHeaderSync.sol";
-import {LibAnchorSignature} from "../libs/LibAnchorSignature.sol";
-import {LibSharedConfig} from "../libs/LibSharedConfig.sol";
-import {TaikoData} from "./TaikoData.sol";
-import {TaikoEvents} from "./TaikoEvents.sol";
-import {TaikoCustomErrors} from "./TaikoCustomErrors.sol";
+import {IXchainSync} from "../common/IXchainSync.sol";
+import {LibEthDepositing} from "./libs/LibEthDepositing.sol";
+import {LibTokenomics} from "./libs/LibTokenomics.sol";
import {LibProposing} from "./libs/LibProposing.sol";
import {LibProving} from "./libs/LibProving.sol";
import {LibUtils} from "./libs/LibUtils.sol";
import {LibVerifying} from "./libs/LibVerifying.sol";
-import {AddressResolver} from "../common/AddressResolver.sol";
+import {TaikoConfig} from "./TaikoConfig.sol";
+import {TaikoErrors} from "./TaikoErrors.sol";
+import {TaikoData} from "./TaikoData.sol";
+import {TaikoEvents} from "./TaikoEvents.sol";
-contract TaikoL1 is
- EssentialContract,
- IHeaderSync,
- TaikoEvents,
- TaikoCustomErrors
-{
+contract TaikoL1 is EssentialContract, IXchainSync, TaikoEvents, TaikoErrors {
using LibUtils for TaikoData.State;
TaikoData.State public state;
uint256[100] private __gap;
- modifier onlyFromEOA() {
- // solhint-disable-next-line avoid-tx-origin
- if (msg.sender != tx.origin) revert L1_CONTRACT_NOT_ALLOWED();
- _;
+ receive() external payable {
+ depositEtherToL2();
}
+ /**
+ * Initialize the rollup.
+ *
+ * @param _addressManager The AddressManager address.
+ * @param _genesisBlockHash The block hash of the genesis block.
+ * @param _initBasefee Initial (reasonable) basefee value.
+ * @param _initProofTimeIssued Initial proof time which keeps the inflow/outflow in balance
+ */
function init(
address _addressManager,
bytes32 _genesisBlockHash,
- uint256 _feeBase
+ uint64 _initBasefee,
+ uint64 _initProofTimeIssued
) external initializer {
EssentialContract._init(_addressManager);
LibVerifying.init({
state: state,
- genesisBlockHash: _genesisBlockHash,
config: getConfig(),
- feeBase: _feeBase
- });
- }
-
- /**
- * Write a _commit hash_ so a few blocks later a L2 block can be proposed
- * such that `calculateCommitHash(meta.beneficiary, meta.txListHash)` equals
- * to this commit hash.
- *
- * @param commitSlot A slot to save this commit. Slot 0 will always be reset
- * to zero for refund.
- * @param commitHash Calculated with:
- * `calculateCommitHash(beneficiary, txListHash)`.
- */
- function commitBlock(uint64 commitSlot, bytes32 commitHash) external {
- LibProposing.commitBlock({
- state: state,
- config: getConfig(),
- commitSlot: commitSlot,
- commitHash: commitHash
+ genesisBlockHash: _genesisBlockHash,
+ initBasefee: _initBasefee,
+ initProofTimeIssued: _initProofTimeIssued
});
}
/**
* Propose a Taiko L2 block.
*
- * @param inputs A list of data input:
- * - inputs[0] is abi-encoded BlockMetadata that the actual L2 block
- * header must satisfy.
- * Note the following fields in the provided meta object must
- * be zeros -- their actual values will be provisioned by Ethereum.
- * - id
- * - l1Height
- * - l1Hash
- * - mixHash
- * - timestamp
- * - inputs[1] is a list of transactions in this block, encoded with
- * RLP. Note, in the corresponding L2 block an _anchor transaction_
- * will be the first transaction in the block -- if there are
- * n transactions in `txList`, then there will be up to n+1
- * transactions in the L2 block.
+ * @param input An abi-encoded BlockMetadataInput that the actual L2
+ * block header must satisfy.
+ * @param txList A list of transactions in this block, encoded with RLP.
+ * Note, in the corresponding L2 block an _anchor transaction_
+ * will be the first transaction in the block -- if there are
+ * `n` transactions in `txList`, then there will be up to `n + 1`
+ * transactions in the L2 block.
*/
function proposeBlock(
- bytes[] calldata inputs
- ) external onlyFromEOA nonReentrant {
+ bytes calldata input,
+ bytes calldata txList
+ ) external nonReentrant returns (TaikoData.BlockMetadata memory meta) {
TaikoData.Config memory config = getConfig();
- LibProposing.proposeBlock({
+ meta = LibProposing.proposeBlock({
state: state,
config: config,
resolver: AddressResolver(this),
- inputs: inputs
- });
- LibVerifying.verifyBlocks({
- state: state,
- config: config,
- maxBlocks: config.maxVerificationsPerTx
+ input: abi.decode(input, (TaikoData.BlockMetadataInput)),
+ txList: txList
});
+ if (config.maxVerificationsPerTx > 0) {
+ LibVerifying.verifyBlocks({
+ state: state,
+ config: config,
+ resolver: AddressResolver(this),
+ maxBlocks: config.maxVerificationsPerTx
+ });
+ }
}
/**
@@ -111,168 +93,159 @@ contract TaikoL1 is
*
* @param blockId The index of the block to prove. This is also used
* to select the right implementation version.
- * @param inputs A list of data input:
- * - inputs[0] is an abi-encoded object with various information
- * regarding the block to be proven and the actual proofs.
- * - inputs[1] is the actual anchor transaction in this L2 block.
- * Note that the anchor transaction is always the first transaction
- * in the block.
- * - inputs[2] is the receipt of the anchor transaction.
+ * @param input An abi-encoded TaikoData.ValidBlockEvidence object.
*/
-
function proveBlock(
uint256 blockId,
- bytes[] calldata inputs
- ) external onlyFromEOA nonReentrant {
+ bytes calldata input
+ ) external nonReentrant {
TaikoData.Config memory config = getConfig();
LibProving.proveBlock({
state: state,
config: config,
resolver: AddressResolver(this),
blockId: blockId,
- inputs: inputs
- });
- LibVerifying.verifyBlocks({
- state: state,
- config: config,
- maxBlocks: config.maxVerificationsPerTx
- });
- }
-
- /**
- * Prove a block is invalid with a zero-knowledge proof and a receipt
- * merkel proof.
- *
- * @param blockId The index of the block to prove. This is also used to
- * select the right implementation version.
- * @param inputs A list of data input:
- * - inputs[0] An Evidence object with various information regarding
- * the block to be proven and the actual proofs.
- * - inputs[1] The target block to be proven invalid.
- * - inputs[2] The receipt for the `invalidBlock` transaction
- * on L2. Note that the `invalidBlock` transaction is supposed to
- * be the only transaction in the L2 block.
- */
- function proveBlockInvalid(
- uint256 blockId,
- bytes[] calldata inputs
- ) external onlyFromEOA nonReentrant {
- TaikoData.Config memory config = getConfig();
-
- LibProving.proveBlockInvalid({
- state: state,
- config: config,
- resolver: AddressResolver(this),
- blockId: blockId,
- inputs: inputs
- });
- LibVerifying.verifyBlocks({
- state: state,
- config: config,
- maxBlocks: config.maxVerificationsPerTx
+ evidence: abi.decode(input, (TaikoData.BlockEvidence))
});
+ if (config.maxVerificationsPerTx > 0) {
+ LibVerifying.verifyBlocks({
+ state: state,
+ config: config,
+ resolver: AddressResolver(this),
+ maxBlocks: config.maxVerificationsPerTx
+ });
+ }
}
/**
* Verify up to N blocks.
* @param maxBlocks Max number of blocks to verify.
*/
- function verifyBlocks(uint256 maxBlocks) external onlyFromEOA nonReentrant {
+ function verifyBlocks(uint256 maxBlocks) external nonReentrant {
if (maxBlocks == 0) revert L1_INVALID_PARAM();
LibVerifying.verifyBlocks({
state: state,
config: getConfig(),
+ resolver: AddressResolver(this),
maxBlocks: maxBlocks
});
}
- function withdrawBalance() external nonReentrant {
- LibVerifying.withdrawBalance(state, AddressResolver(this));
+ function depositTaikoToken(uint256 amount) external nonReentrant {
+ LibTokenomics.depositTaikoToken(state, AddressResolver(this), amount);
}
- function getRewardBalance(address addr) public view returns (uint256) {
- return state.balances[addr];
+ function withdrawTaikoToken(uint256 amount) external nonReentrant {
+ LibTokenomics.withdrawTaikoToken(state, AddressResolver(this), amount);
}
- function getBlockFee() public view returns (uint256) {
- (, uint256 fee, uint256 deposit) = LibProposing.getBlockFee(
+ function depositEtherToL2() public payable {
+ LibEthDepositing.depositEtherToL2(
state,
- getConfig()
+ getConfig(),
+ AddressResolver(this)
);
- return fee + deposit;
+ }
+
+ function getTaikoTokenBalance(address addr) public view returns (uint256) {
+ return state.taikoTokenBalances[addr];
+ }
+
+ function getBlockFee() public view returns (uint64) {
+ return state.basefee;
}
function getProofReward(
uint64 provenAt,
uint64 proposedAt
- ) public view returns (uint256 reward) {
- (, reward, ) = LibVerifying.getProofReward({
+ ) public view returns (uint64) {
+ return
+ LibTokenomics.getProofReward({
+ state: state,
+ proofTime: provenAt - proposedAt
+ });
+ }
+
+ function getBlock(
+ uint256 blockId
+ )
+ public
+ view
+ returns (
+ bytes32 _metaHash,
+ uint256 _deposit,
+ address _proposer,
+ uint64 _proposedAt
+ )
+ {
+ TaikoData.Block storage blk = LibProposing.getBlock({
state: state,
config: getConfig(),
- provenAt: provenAt,
- proposedAt: proposedAt
+ blockId: blockId
});
+ _metaHash = blk.metaHash;
+ _deposit = blk.deposit;
+ _proposer = blk.proposer;
+ _proposedAt = blk.proposedAt;
}
- function isCommitValid(
- uint256 commitSlot,
- uint256 commitHeight,
- bytes32 commitHash
- ) public view returns (bool) {
+ function getForkChoice(
+ uint256 blockId,
+ bytes32 parentHash,
+ uint32 parentGasUsed
+ ) public view returns (TaikoData.ForkChoice memory) {
return
- LibProposing.isCommitValid(
- state,
- getConfig().commitConfirmations,
- commitSlot,
- commitHeight,
- commitHash
- );
+ LibProving.getForkChoice({
+ state: state,
+ config: getConfig(),
+ blockId: blockId,
+ parentHash: parentHash,
+ parentGasUsed: parentGasUsed
+ });
}
- function getProposedBlock(
- uint256 id
- ) public view returns (TaikoData.ProposedBlock memory) {
+ function getXchainBlockHash(
+ uint256 blockId
+ ) public view override returns (bytes32) {
+ (bool found, TaikoData.Block storage blk) = LibUtils.getL2ChainData({
+ state: state,
+ config: getConfig(),
+ blockId: blockId
+ });
return
- LibProposing.getProposedBlock(state, getConfig().maxNumBlocks, id);
+ found
+ ? blk.forkChoices[blk.verifiedForkChoiceId].blockHash
+ : bytes32(0);
}
- function getSyncedHeader(
- uint256 number
+ function getXchainSignalRoot(
+ uint256 blockId
) public view override returns (bytes32) {
- return state.getL2BlockHash(number, getConfig().blockHashHistory);
- }
+ (bool found, TaikoData.Block storage blk) = LibUtils.getL2ChainData({
+ state: state,
+ config: getConfig(),
+ blockId: blockId
+ });
- function getLatestSyncedHeader() public view override returns (bytes32) {
return
- state.getL2BlockHash(
- state.latestVerifiedHeight,
- getConfig().blockHashHistory
- );
+ found
+ ? blk.forkChoices[blk.verifiedForkChoiceId].signalRoot
+ : bytes32(0);
}
function getStateVariables()
public
view
- returns (LibUtils.StateVariables memory)
+ returns (TaikoData.StateVariables memory)
{
return state.getStateVariables();
}
- function signWithGoldenTouch(
- bytes32 hash,
- uint8 k
- ) public view returns (uint8 v, uint256 r, uint256 s) {
- return LibAnchorSignature.signTransaction(hash, k);
- }
-
- function getForkChoice(
- uint256 id,
- bytes32 parentHash
- ) public view returns (TaikoData.ForkChoice memory) {
- return state.forkChoices[id][parentHash];
+ function getConfig() public pure virtual returns (TaikoData.Config memory) {
+ return TaikoConfig.getConfig();
}
- function getConfig() public pure virtual returns (TaikoData.Config memory) {
- return LibSharedConfig.getConfig();
+ function getVerifierName(uint16 id) public pure returns (string memory) {
+ return LibUtils.getVerifierName(id);
}
}
diff --git a/packages/protocol/contracts/L1/TaikoToken.sol b/packages/protocol/contracts/L1/TaikoToken.sol
index 6d45ac303f6..9b2159f73a8 100644
--- a/packages/protocol/contracts/L1/TaikoToken.sol
+++ b/packages/protocol/contracts/L1/TaikoToken.sol
@@ -7,16 +7,15 @@
pragma solidity ^0.8.18;
import {
- SafeCastUpgradeable
-} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-
+ ERC20Upgradeable,
+ IERC20Upgradeable
+} from "../thirdparty/ERC20Upgradeable.sol";
import {EssentialContract} from "../common/EssentialContract.sol";
import {IMintableERC20} from "../common/IMintableERC20.sol";
import {LibMath} from "../libs/LibMath.sol";
import {
- ERC20Upgradeable,
- IERC20Upgradeable
-} from "../thirdparty/ERC20Upgradeable.sol";
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
/// @dev This is Taiko's governance and fee token.
contract TaikoToken is EssentialContract, ERC20Upgradeable, IMintableERC20 {
@@ -36,6 +35,8 @@ contract TaikoToken is EssentialContract, ERC20Upgradeable, IMintableERC20 {
event Burn(address account, uint256 amount);
error TKO_INVALID_ADDR();
+ error TKO_INVALID_PREMINT_PARAMS();
+ error TKO_MINT_DISALLOWED();
/*********************
* External Functions*
@@ -45,16 +46,25 @@ contract TaikoToken is EssentialContract, ERC20Upgradeable, IMintableERC20 {
/// Based on our simulation in simulate/tokenomics/index.js, both
/// amountMintToDAO and amountMintToDev shall be set to ~150,000,000.
function init(
- string memory _name,
- string memory _symbol,
- address _addressManager
+ address _addressManager,
+ string calldata _name,
+ string calldata _symbol,
+ address[] calldata _premintRecipients,
+ uint256[] calldata _premintAmounts
) external initializer {
+ if (_premintRecipients.length != _premintAmounts.length)
+ revert TKO_INVALID_PREMINT_PARAMS();
+
EssentialContract._init(_addressManager);
ERC20Upgradeable.__ERC20_init({
name_: _name,
symbol_: _symbol,
- decimals_: 18
+ decimals_: 8
});
+
+ for (uint256 i = 0; i < _premintRecipients.length; ++i) {
+ _mint(_premintRecipients[i], _premintAmounts[i]);
+ }
}
/*********************
@@ -107,4 +117,9 @@ contract TaikoToken is EssentialContract, ERC20Upgradeable, IMintableERC20 {
_burn(account, amount);
emit Burn(account, amount);
}
+
+ function _mint(address account, uint256 amount) internal override {
+ ERC20Upgradeable._mint(account, amount);
+ if (totalSupply() > type(uint64).max) revert TKO_MINT_DISALLOWED();
+ }
}
diff --git a/packages/protocol/contracts/L1/libs/LibEthDepositing.sol b/packages/protocol/contracts/L1/libs/LibEthDepositing.sol
new file mode 100644
index 00000000000..5eed33594f2
--- /dev/null
+++ b/packages/protocol/contracts/L1/libs/LibEthDepositing.sol
@@ -0,0 +1,130 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+import {LibAddress} from "../../libs/LibAddress.sol";
+import {LibMath} from "../../libs/LibMath.sol";
+import {AddressResolver} from "../../common/AddressResolver.sol";
+import {
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+import {TaikoData} from "../TaikoData.sol";
+
+library LibEthDepositing {
+ using LibAddress for address;
+ using LibMath for uint256;
+ using SafeCastUpgradeable for uint256;
+
+ // When maxEthDepositsPerBlock is 32, the average gas cost per
+ // EthDeposit is about 2700 gas. We use 21000 so the proposer may
+ // earn a small profit if there are 32 deposits included
+ // in the block; if there are less EthDeposit to process, the
+ // proposer may suffer a loss so the proposer should simply wait
+ // for more EthDeposit be become available.
+ uint256 public constant GAS_PER_ETH_DEPOSIT = 21000;
+ uint256 public constant MAX_FEE_PER_ETH_DEPOSIT = 1 ether / 10; // 0.1 Ether.
+
+ error L1_INVALID_ETH_DEPOSIT();
+
+ event EthDeposited(TaikoData.EthDeposit deposit);
+
+ function depositEtherToL2(
+ TaikoData.State storage state,
+ TaikoData.Config memory config,
+ AddressResolver resolver
+ ) public {
+ if (
+ msg.value < config.minEthDepositAmount ||
+ msg.value > config.maxEthDepositAmount
+ ) revert L1_INVALID_ETH_DEPOSIT();
+
+ TaikoData.EthDeposit memory deposit = TaikoData.EthDeposit({
+ recipient: msg.sender,
+ amount: uint96(msg.value)
+ });
+
+ address to = resolver.resolve("ether_vault", true);
+ if (to == address(0)) {
+ to = resolver.resolve("bridge", false);
+ }
+ to.sendEther(msg.value);
+
+ state.ethDeposits.push(deposit);
+ emit EthDeposited(deposit);
+ }
+
+ function processDeposits(
+ TaikoData.State storage state,
+ TaikoData.Config memory config,
+ address beneficiary
+ )
+ internal
+ returns (
+ bytes32 depositsRoot,
+ TaikoData.EthDeposit[] memory depositsProcessed
+ )
+ {
+ // Allocate one extra slot for collecting fees on L2
+ depositsProcessed = new TaikoData.EthDeposit[](
+ config.maxEthDepositsPerBlock + 1
+ );
+
+ uint256 j; // number of deposits to process on L2
+ if (
+ state.ethDeposits.length >=
+ state.nextEthDepositToProcess + config.minEthDepositsPerBlock
+ ) {
+ unchecked {
+ uint96 feePerDeposit = uint96(
+ MAX_FEE_PER_ETH_DEPOSIT.min(
+ block.basefee * GAS_PER_ETH_DEPOSIT
+ )
+ );
+ uint96 totalFee;
+ uint64 i = state.nextEthDepositToProcess;
+ while (
+ i < state.ethDeposits.length &&
+ i <
+ state.nextEthDepositToProcess +
+ config.maxEthDepositsPerBlock
+ ) {
+ TaikoData.EthDeposit storage deposit = state.ethDeposits[i];
+ if (deposit.amount > feePerDeposit) {
+ totalFee += feePerDeposit;
+ depositsProcessed[j].recipient = deposit.recipient;
+ depositsProcessed[j].amount =
+ deposit.amount -
+ feePerDeposit;
+ ++j;
+ } else {
+ totalFee += deposit.amount;
+ }
+
+ // delete the deposit
+ deposit.recipient = address(0);
+ deposit.amount = 0;
+ ++i;
+ }
+
+ // Fee collecting deposit
+ if (totalFee > 0) {
+ depositsProcessed[j].recipient = beneficiary;
+ depositsProcessed[j].amount = totalFee;
+ ++j;
+ }
+ // Advance cursor
+ state.nextEthDepositToProcess = i;
+ }
+ }
+
+ // resize the length of depositsProcessed to j.
+ assembly {
+ mstore(depositsProcessed, j)
+ depositsRoot := keccak256(depositsProcessed, mul(j, 32))
+ }
+ }
+}
diff --git a/packages/protocol/contracts/L1/libs/LibProposing.sol b/packages/protocol/contracts/L1/libs/LibProposing.sol
index 1fe78827784..060f70df549 100644
--- a/packages/protocol/contracts/L1/libs/LibProposing.sol
+++ b/packages/protocol/contracts/L1/libs/LibProposing.sol
@@ -6,265 +6,179 @@
pragma solidity ^0.8.18;
+import {AddressResolver} from "../../common/AddressResolver.sol";
+import {LibAddress} from "../../libs/LibAddress.sol";
+import {LibEthDepositing} from "./LibEthDepositing.sol";
+import {LibTokenomics} from "./LibTokenomics.sol";
+import {LibUtils} from "./LibUtils.sol";
import {
SafeCastUpgradeable
} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-
-import {LibTxDecoder} from "../../libs/LibTxDecoder.sol";
-import {TaikoToken} from "../TaikoToken.sol";
-import {LibUtils} from "./LibUtils.sol";
import {TaikoData} from "../TaikoData.sol";
-import {AddressResolver} from "../../common/AddressResolver.sol";
library LibProposing {
- using LibTxDecoder for bytes;
using SafeCastUpgradeable for uint256;
- using LibUtils for TaikoData.BlockMetadata;
+ using LibAddress for address;
+ using LibAddress for address payable;
using LibUtils for TaikoData.State;
- event BlockCommitted(uint64 commitSlot, bytes32 commitHash);
event BlockProposed(uint256 indexed id, TaikoData.BlockMetadata meta);
- error L1_COMMITTED();
- error L1_EXTRA_DATA();
- error L1_GAS_LIMIT();
- error L1_ID();
- error L1_INPUT_SIZE();
- error L1_METADATA_FIELD();
- error L1_NOT_COMMITTED();
- error L1_SOLO_PROPOSER();
+ error L1_BLOCK_ID();
+ error L1_INSUFFICIENT_ETHER();
+ error L1_INSUFFICIENT_TOKEN();
+ error L1_INVALID_METADATA();
+ error L1_NOT_SOLO_PROPOSER();
error L1_TOO_MANY_BLOCKS();
+ error L1_TX_LIST_NOT_EXIST();
+ error L1_TX_LIST_HASH();
+ error L1_TX_LIST_RANGE();
error L1_TX_LIST();
- function commitBlock(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- uint64 commitSlot,
- bytes32 commitHash
- ) public {
- assert(config.commitConfirmations > 0);
-
- bytes32 hash = _aggregateCommitHash(block.number, commitHash);
-
- if (state.commits[msg.sender][commitSlot] == hash)
- revert L1_COMMITTED();
-
- state.commits[msg.sender][commitSlot] = hash;
-
- emit BlockCommitted({commitSlot: commitSlot, commitHash: commitHash});
- }
-
function proposeBlock(
TaikoData.State storage state,
TaikoData.Config memory config,
AddressResolver resolver,
- bytes[] calldata inputs
- ) public {
- // For alpha-2 testnet, the network only allows an special address
- // to propose but anyone to prove. This is the first step of testing
- // the tokenomics.
-
- // TODO(daniel): remove this special address.
- address soloProposer = resolver.resolve("solo_proposer", true);
- if (soloProposer != address(0) && soloProposer != msg.sender)
- revert L1_SOLO_PROPOSER();
-
- if (inputs.length != 2) revert L1_INPUT_SIZE();
- TaikoData.BlockMetadata memory meta = abi.decode(
- inputs[0],
- (TaikoData.BlockMetadata)
- );
- _verifyBlockCommit({
+ TaikoData.BlockMetadataInput memory input,
+ bytes calldata txList
+ ) internal returns (TaikoData.BlockMetadata memory meta) {
+ uint8 cacheTxListInfo = _validateBlock({
state: state,
- commitConfirmations: config.commitConfirmations,
- meta: meta
+ config: config,
+ resolver: resolver,
+ input: input,
+ txList: txList
});
- _validateMetadata(config, meta);
-
- {
- bytes calldata txList = inputs[1];
- // perform validation and populate some fields
- if (
- txList.length < 0 ||
- txList.length > config.maxBytesPerTxList ||
- meta.txListHash != txList.hashTxList()
- ) revert L1_TX_LIST();
-
- if (
- state.nextBlockId >=
- state.latestVerifiedId + config.maxNumBlocks
- ) revert L1_TOO_MANY_BLOCKS();
- meta.id = state.nextBlockId;
- meta.l1Height = block.number - 1;
- meta.l1Hash = blockhash(block.number - 1);
- meta.timestamp = uint64(block.timestamp);
-
- // After The Merge, L1 mixHash contains the prevrandao
- // from the beacon chain. Since multiple Taiko blocks
- // can be proposed in one Ethereum block, we need to
- // add salt to this random number as L2 mixHash
- meta.mixHash = keccak256(
- abi.encodePacked(block.prevrandao, state.nextBlockId)
- );
- }
-
- uint256 deposit;
- if (config.enableTokenomics) {
- uint256 newFeeBase;
- {
- uint256 fee;
- (newFeeBase, fee, deposit) = getBlockFee(state, config);
- TaikoToken(resolver.resolve("tko_token", false)).burn(
- msg.sender,
- fee + deposit
- );
- }
- // Update feeBase and avgBlockTime
- state.feeBase = LibUtils.movingAverage({
- maValue: state.feeBase,
- newValue: newFeeBase,
- maf: config.feeBaseMAF
+ if (cacheTxListInfo != 0) {
+ state.txListInfo[input.txListHash] = TaikoData.TxListInfo({
+ validSince: uint64(block.timestamp),
+ size: uint24(txList.length)
});
}
- _saveProposedBlock(
- state,
- config.maxNumBlocks,
- state.nextBlockId,
- TaikoData.ProposedBlock({
- metaHash: meta.hashMetadata(),
- deposit: deposit,
- proposer: msg.sender,
- proposedAt: meta.timestamp
- })
- );
+ // After The Merge, L1 mixHash contains the prevrandao
+ // from the beacon chain. Since multiple Taiko blocks
+ // can be proposed in one Ethereum block, we need to
+ // add salt to this random number as L2 mixHash
- state.avgBlockTime = LibUtils
- .movingAverage({
- maValue: state.avgBlockTime,
- newValue: meta.timestamp - state.lastProposedAt,
- maf: config.blockTimeMAF
- })
- .toUint64();
+ meta.id = state.numBlocks;
+ meta.txListHash = input.txListHash;
+ meta.txListByteStart = input.txListByteStart;
+ meta.txListByteEnd = input.txListByteEnd;
+ meta.gasLimit = input.gasLimit;
+ meta.beneficiary = input.beneficiary;
+ meta.treasure = resolver.resolve(config.chainId, "treasure", false);
+ meta.cacheTxListInfo = cacheTxListInfo;
- state.lastProposedAt = meta.timestamp;
+ (meta.depositsRoot, meta.depositsProcessed) = LibEthDepositing
+ .processDeposits(state, config, input.beneficiary);
- emit BlockProposed(state.nextBlockId++, meta);
- }
-
- function getBlockFee(
- TaikoData.State storage state,
- TaikoData.Config memory config
- ) public view returns (uint256 newFeeBase, uint256 fee, uint256 deposit) {
- (newFeeBase, ) = LibUtils.getTimeAdjustedFee({
- state: state,
- config: config,
- isProposal: true,
- tNow: uint64(block.timestamp),
- tLast: state.lastProposedAt,
- tAvg: state.avgBlockTime,
- tCap: config.blockTimeCap
- });
- fee = LibUtils.getSlotsAdjustedFee({
- state: state,
- config: config,
- isProposal: true,
- feeBase: newFeeBase
- });
- fee = LibUtils.getBootstrapDiscountedFee(state, config, fee);
- deposit = (fee * config.proposerDepositPctg) / 100;
- }
+ unchecked {
+ meta.timestamp = uint64(block.timestamp);
+ meta.l1Height = uint64(block.number - 1);
+ meta.l1Hash = blockhash(block.number - 1);
+ meta.mixHash = bytes32(block.prevrandao * state.numBlocks);
+ }
- function isCommitValid(
- TaikoData.State storage state,
- uint256 commitConfirmations,
- uint256 commitSlot,
- uint256 commitHeight,
- bytes32 commitHash
- ) public view returns (bool) {
- assert(commitConfirmations > 0);
- bytes32 hash = _aggregateCommitHash(commitHeight, commitHash);
- return
- state.commits[msg.sender][commitSlot] == hash &&
- block.number >= commitHeight + commitConfirmations;
- }
+ TaikoData.Block storage blk = state.blocks[
+ state.numBlocks % config.ringBufferSize
+ ];
+
+ blk.blockId = state.numBlocks;
+ blk.proposedAt = meta.timestamp;
+ blk.deposit = 0;
+ blk.nextForkChoiceId = 1;
+ blk.verifiedForkChoiceId = 0;
+ blk.metaHash = LibUtils.hashMetadata(meta);
+ blk.proposer = msg.sender;
+
+ if (state.taikoTokenBalances[msg.sender] < state.basefee)
+ revert L1_INSUFFICIENT_TOKEN();
+
+ unchecked {
+ state.taikoTokenBalances[msg.sender] -= state.basefee;
+ state.accBlockFees += state.basefee;
+ state.accProposedAt += meta.timestamp;
+ }
- function getProposedBlock(
- TaikoData.State storage state,
- uint256 maxNumBlocks,
- uint256 id
- ) internal view returns (TaikoData.ProposedBlock storage) {
- if (id <= state.latestVerifiedId || id >= state.nextBlockId) {
- revert L1_ID();
+ emit BlockProposed(state.numBlocks, meta);
+ unchecked {
+ ++state.numBlocks;
}
- return state.getProposedBlock(maxNumBlocks, id);
}
- function _saveProposedBlock(
+ function getBlock(
TaikoData.State storage state,
- uint256 maxNumBlocks,
- uint256 id,
- TaikoData.ProposedBlock memory blk
- ) private {
- state.proposedBlocks[id % maxNumBlocks] = blk;
+ TaikoData.Config memory config,
+ uint256 blockId
+ ) internal view returns (TaikoData.Block storage blk) {
+ blk = state.blocks[blockId % config.ringBufferSize];
+ if (blk.blockId != blockId) revert L1_BLOCK_ID();
}
- function _verifyBlockCommit(
+ function _validateBlock(
TaikoData.State storage state,
- uint256 commitConfirmations,
- TaikoData.BlockMetadata memory meta
- ) private view {
- if (commitConfirmations == 0) {
- return;
- }
- bytes32 commitHash = _calculateCommitHash(
- meta.beneficiary,
- meta.txListHash
- );
+ TaikoData.Config memory config,
+ AddressResolver resolver,
+ TaikoData.BlockMetadataInput memory input,
+ bytes calldata txList
+ ) private view returns (uint8 cacheTxListInfo) {
+ // For alpha-2 testnet, the network only allows an special address
+ // to propose but anyone to prove. This is the first step of testing
+ // the tokenomics.
+ if (
+ config.enableSoloProposer &&
+ msg.sender != resolver.resolve("solo_proposer", false)
+ ) revert L1_NOT_SOLO_PROPOSER();
if (
- !isCommitValid({
- state: state,
- commitConfirmations: commitConfirmations,
- commitSlot: meta.commitSlot,
- commitHeight: meta.commitHeight,
- commitHash: commitHash
- })
- ) revert L1_NOT_COMMITTED();
- }
+ input.beneficiary == address(0) ||
+ input.gasLimit == 0 ||
+ input.gasLimit > config.blockMaxGasLimit
+ ) revert L1_INVALID_METADATA();
- function _validateMetadata(
- TaikoData.Config memory config,
- TaikoData.BlockMetadata memory meta
- ) private pure {
if (
- meta.id != 0 ||
- meta.l1Height != 0 ||
- meta.l1Hash != 0 ||
- meta.mixHash != 0 ||
- meta.timestamp != 0 ||
- meta.beneficiary == address(0) ||
- meta.txListHash == 0
- ) revert L1_METADATA_FIELD();
+ state.numBlocks >=
+ state.lastVerifiedBlockId + config.maxNumProposedBlocks + 1
+ ) revert L1_TOO_MANY_BLOCKS();
- if (meta.gasLimit > config.blockMaxGasLimit) revert L1_GAS_LIMIT();
- if (meta.extraData.length > 32) {
- revert L1_EXTRA_DATA();
+ uint64 timeNow = uint64(block.timestamp);
+ // hanlding txList
+ {
+ uint24 size = uint24(txList.length);
+ if (size > config.maxBytesPerTxList) revert L1_TX_LIST();
+
+ if (input.txListByteStart > input.txListByteEnd)
+ revert L1_TX_LIST_RANGE();
+
+ if (config.txListCacheExpiry == 0) {
+ // caching is disabled
+ if (input.txListByteStart != 0 || input.txListByteEnd != size)
+ revert L1_TX_LIST_RANGE();
+ } else {
+ // caching is enabled
+ if (size == 0) {
+ // This blob shall have been submitted earlier
+ TaikoData.TxListInfo memory info = state.txListInfo[
+ input.txListHash
+ ];
+
+ if (input.txListByteEnd > info.size)
+ revert L1_TX_LIST_RANGE();
+
+ if (
+ info.size == 0 ||
+ info.validSince + config.txListCacheExpiry < timeNow
+ ) revert L1_TX_LIST_NOT_EXIST();
+ } else {
+ if (input.txListByteEnd > size) revert L1_TX_LIST_RANGE();
+ if (input.txListHash != keccak256(txList))
+ revert L1_TX_LIST_HASH();
+
+ cacheTxListInfo = input.cacheTxListInfo;
+ }
+ }
}
}
-
- function _calculateCommitHash(
- address beneficiary,
- bytes32 txListHash
- ) private pure returns (bytes32) {
- return keccak256(abi.encodePacked(beneficiary, txListHash));
- }
-
- function _aggregateCommitHash(
- uint256 commitHeight,
- bytes32 commitHash
- ) private pure returns (bytes32) {
- return keccak256(abi.encodePacked(commitHash, commitHeight));
- }
}
diff --git a/packages/protocol/contracts/L1/libs/LibProving.sol b/packages/protocol/contracts/L1/libs/LibProving.sol
index 99417aa308e..fc5115ddd0d 100644
--- a/packages/protocol/contracts/L1/libs/LibProving.sol
+++ b/packages/protocol/contracts/L1/libs/LibProving.sol
@@ -6,372 +6,204 @@
pragma solidity ^0.8.18;
-import {IProofVerifier} from "../ProofVerifier.sol";
import {AddressResolver} from "../../common/AddressResolver.sol";
-import {LibAnchorSignature} from "../../libs/LibAnchorSignature.sol";
-import {LibBlockHeader, BlockHeader} from "../../libs/LibBlockHeader.sol";
-import {LibReceiptDecoder} from "../../libs/LibReceiptDecoder.sol";
-import {LibTxDecoder} from "../../libs/LibTxDecoder.sol";
-import {LibTxUtils} from "../../libs/LibTxUtils.sol";
-import {LibBytesUtils} from "../../thirdparty/LibBytesUtils.sol";
-import {LibRLPWriter} from "../../thirdparty/LibRLPWriter.sol";
+import {LibTokenomics} from "./LibTokenomics.sol";
import {LibUtils} from "./LibUtils.sol";
import {TaikoData} from "../../L1/TaikoData.sol";
library LibProving {
- using LibBlockHeader for BlockHeader;
- using LibUtils for TaikoData.BlockMetadata;
using LibUtils for TaikoData.State;
- bool private constant FLAG_VALIDATE_ANCHOR_TX_SIGNATURE = true;
- bool private constant FLAG_CHECK_METADATA = true;
- bool private constant FLAG_VALIDATE_HEADER_FOR_METADATA = true;
-
- bytes32 public constant INVALIDATE_BLOCK_LOG_TOPIC =
- keccak256("BlockInvalidated(bytes32)");
-
- bytes4 public constant ANCHOR_TX_SELECTOR =
- bytes4(keccak256("anchor(uint256,bytes32)"));
-
event BlockProven(
uint256 indexed id,
bytes32 parentHash,
bytes32 blockHash,
- address prover,
- uint64 provenAt
+ bytes32 signalRoot,
+ address prover
);
error L1_ALREADY_PROVEN();
- error L1_ANCHOR_CALLDATA();
- error L1_ANCHOR_DEST();
- error L1_ANCHOR_GAS_LIMIT();
- error L1_ANCHOR_RECEIPT_ADDR();
- error L1_ANCHOR_RECEIPT_DATA();
- error L1_ANCHOR_RECEIPT_LOGS();
- error L1_ANCHOR_RECEIPT_PROOF();
- error L1_ANCHOR_RECEIPT_STATUS();
- error L1_ANCHOR_RECEIPT_TOPICS();
- error L1_ANCHOR_SIG_R();
- error L1_ANCHOR_SIG_S();
- error L1_ANCHOR_TX_PROOF();
- error L1_ANCHOR_TYPE();
- error L1_CANNOT_BE_FIRST_PROVER();
- error L1_CONFLICT_PROOF();
- error L1_ID();
- error L1_INPUT_SIZE();
- error L1_META_MISMATCH();
+ error L1_BLOCK_ID();
+ error L1_EVIDENCE_MISMATCH(bytes32 expected, bytes32 actual);
+ error L1_FORK_CHOICE_NOT_FOUND();
+ error L1_INVALID_PROOF();
+ error L1_INVALID_EVIDENCE();
+ error L1_ORACLE_DISABLED();
error L1_NOT_ORACLE_PROVER();
- error L1_PROOF_LENGTH();
- error L1_PROVER();
- error L1_ZKP();
function proveBlock(
TaikoData.State storage state,
TaikoData.Config memory config,
AddressResolver resolver,
uint256 blockId,
- bytes[] calldata inputs
- ) public {
- // Check and decode inputs
- if (inputs.length != 3) revert L1_INPUT_SIZE();
- TaikoData.Evidence memory evidence = abi.decode(
- inputs[0],
- (TaikoData.Evidence)
- );
-
- // Check evidence
- if (evidence.meta.id != blockId) revert L1_ID();
+ TaikoData.BlockEvidence memory evidence
+ ) internal {
+ if (
+ evidence.parentHash == 0 ||
+ evidence.blockHash == 0 ||
+ evidence.blockHash == evidence.parentHash ||
+ evidence.signalRoot == 0 ||
+ evidence.gasUsed == 0
+ ) revert L1_INVALID_EVIDENCE();
+
+ if (blockId <= state.lastVerifiedBlockId || blockId >= state.numBlocks)
+ revert L1_BLOCK_ID();
+
+ TaikoData.Block storage blk = state.blocks[
+ blockId % config.ringBufferSize
+ ];
- if (evidence.proofs.length != 3) revert L1_PROOF_LENGTH();
+ // Check the metadata hash matches the proposed block's. This is
+ // necessary to handle chain reorgs.
+ if (blk.metaHash != evidence.metaHash)
+ revert L1_EVIDENCE_MISMATCH(blk.metaHash, evidence.metaHash);
- IProofVerifier proofVerifier = IProofVerifier(
- resolver.resolve("proof_verifier", false)
- );
+ bool isOracleProof = evidence.prover == address(0);
- if (config.enableAnchorValidation) {
- _proveAnchorForValidBlock({
- config: config,
- resolver: resolver,
- proofVerifier: proofVerifier,
- evidence: evidence,
- anchorTx: inputs[1],
- anchorReceipt: inputs[2]
- });
+ if (isOracleProof) {
+ address oracleProver = resolver.resolve("oracle_prover", true);
+ if (oracleProver == address(0)) revert L1_ORACLE_DISABLED();
+ if (msg.sender != oracleProver) {
+ if (evidence.proof.length == 64) {
+ uint8 v = uint8(evidence.verifierId);
+ bytes32 r;
+ bytes32 s;
+ bytes memory data = evidence.proof;
+ assembly {
+ r := mload(add(data, 32))
+ s := mload(add(data, 64))
+ }
+
+ // clear the proof before hasing evidence
+ evidence.verifierId = 0;
+ evidence.proof = new bytes(0);
+
+ if (
+ oracleProver !=
+ ecrecover(keccak256(abi.encode(evidence)), v, r, s)
+ ) revert L1_NOT_ORACLE_PROVER();
+ }
+ } else {
+ revert L1_NOT_ORACLE_PROVER();
+ }
}
- // ZK-prove block and mark block proven to be valid.
- _proveBlock({
- state: state,
- config: config,
- resolver: resolver,
- proofVerifier: proofVerifier,
- evidence: evidence,
- target: evidence.meta,
- blockHashOverride: 0
- });
- }
+ TaikoData.ForkChoice storage fc;
- function proveBlockInvalid(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- AddressResolver resolver,
- uint256 blockId,
- bytes[] calldata inputs
- ) public {
- // Check and decode inputs
- if (inputs.length != 3) revert L1_INPUT_SIZE();
- TaikoData.Evidence memory evidence = abi.decode(
- inputs[0],
- (TaikoData.Evidence)
+ uint256 fcId = LibUtils.getForkChoiceId(
+ state,
+ blk,
+ evidence.parentHash,
+ evidence.parentGasUsed
);
- TaikoData.BlockMetadata memory target = abi.decode(
- inputs[1],
- (TaikoData.BlockMetadata)
- );
-
- // Check evidence
- if (evidence.meta.id != blockId) revert L1_ID();
- if (evidence.proofs.length != 2) revert L1_PROOF_LENGTH();
-
- IProofVerifier proofVerifier = IProofVerifier(
- resolver.resolve("proof_verifier", false)
- );
-
- if (config.enableAnchorValidation) {
- _proveAnchorForInvalidBlock({
- config: config,
- resolver: resolver,
- target: target,
- proofVerifier: proofVerifier,
- evidence: evidence,
- invalidateBlockReceipt: inputs[2]
- });
- }
-
- // ZK-prove block and mark block proven as invalid.
- _proveBlock({
- state: state,
- config: config,
- resolver: resolver,
- proofVerifier: proofVerifier,
- evidence: evidence,
- target: target,
- blockHashOverride: LibUtils.BLOCK_DEADEND_HASH
- });
- }
-
- function _proveBlock(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- AddressResolver resolver,
- IProofVerifier proofVerifier,
- TaikoData.Evidence memory evidence,
- TaikoData.BlockMetadata memory target,
- bytes32 blockHashOverride
- ) private {
- if (evidence.meta.id != target.id) revert L1_ID();
- if (evidence.prover == address(0)) revert L1_PROVER();
-
- if (FLAG_CHECK_METADATA) {
- if (
- target.id <= state.latestVerifiedId ||
- target.id >= state.nextBlockId
- ) revert L1_ID();
- if (
- state
- .getProposedBlock(config.maxNumBlocks, target.id)
- .metaHash != target.hashMetadata()
- ) revert L1_META_MISMATCH();
- }
-
- if (FLAG_VALIDATE_HEADER_FOR_METADATA) {
- if (
- evidence.header.parentHash == 0 ||
- evidence.header.beneficiary != evidence.meta.beneficiary ||
- evidence.header.difficulty != 0 ||
- evidence.header.gasLimit !=
- evidence.meta.gasLimit + config.anchorTxGasLimit ||
- evidence.header.gasUsed == 0 ||
- evidence.header.timestamp != evidence.meta.timestamp ||
- evidence.header.extraData.length !=
- evidence.meta.extraData.length ||
- keccak256(evidence.header.extraData) !=
- keccak256(evidence.meta.extraData) ||
- evidence.header.mixHash != evidence.meta.mixHash
- ) revert L1_META_MISMATCH();
- }
- // For alpha-2 testnet, the network allows any address to submit ZKP,
- // but a special prover can skip ZKP verification if the ZKP is empty.
+ if (fcId == 0) {
+ fcId = blk.nextForkChoiceId;
- bool oracleProving;
-
- TaikoData.ForkChoice storage fc = state.forkChoices[target.id][
- evidence.header.parentHash
- ];
+ unchecked {
+ ++blk.nextForkChoiceId;
+ }
- bytes32 blockHash = evidence.header.hashBlockHeader();
- bytes32 _blockHash = blockHashOverride == 0
- ? blockHash
- : blockHashOverride;
+ fc = blk.forkChoices[fcId];
- if (fc.blockHash == 0) {
- address oracleProver = resolver.resolve("oracle_prover", true);
- if (msg.sender == oracleProver) {
- oracleProving = true;
+ if (fcId == 1) {
+ // We only write the key when fcId is 1.
+ fc.key = LibUtils.keyForForkChoice(
+ evidence.parentHash,
+ evidence.parentGasUsed
+ );
} else {
- if (oracleProver != address(0)) revert L1_NOT_ORACLE_PROVER();
- fc.prover = evidence.prover;
- fc.provenAt = uint64(block.timestamp);
+ state.forkChoiceIds[blk.blockId][evidence.parentHash][
+ evidence.parentGasUsed
+ ] = fcId;
}
- fc.blockHash = _blockHash;
+ } else if (isOracleProof) {
+ fc = blk.forkChoices[fcId];
} else {
- if (fc.blockHash != _blockHash) revert L1_CONFLICT_PROOF();
- if (fc.prover != address(0)) revert L1_ALREADY_PROVEN();
-
- fc.prover = evidence.prover;
- fc.provenAt = uint64(block.timestamp);
+ revert L1_ALREADY_PROVEN();
}
- if (oracleProving) {
- // do not verify zkp
- } else {
- bool verified = proofVerifier.verifyZKP({
- verifierId: string(
- abi.encodePacked("plonk_verifier_", evidence.circuitId)
- ),
- zkproof: evidence.proofs[0],
- instance: _getInstance(evidence)
- });
- if (!verified) revert L1_ZKP();
- }
+ fc.blockHash = evidence.blockHash;
+ fc.signalRoot = evidence.signalRoot;
+ fc.gasUsed = evidence.gasUsed;
+ fc.provenAt = uint64(block.timestamp);
+ fc.prover = evidence.prover;
+
+ if (!isOracleProof) {
+ bytes32 instance;
+
+ // Set state.staticRefs
+ if (state.staticRefs == 0) {
+ address[3] memory addresses;
+ addresses[0] = resolver.resolve("signal_service", false);
+ addresses[1] = resolver.resolve(
+ config.chainId,
+ "signal_service",
+ false
+ );
+ addresses[2] = resolver.resolve(config.chainId, "taiko", false);
+ bytes32 staticRefs;
+ assembly {
+ staticRefs := keccak256(addresses, mul(32, 3))
+ }
+ state.staticRefs = staticRefs;
+ }
- emit BlockProven({
- id: target.id,
- parentHash: evidence.header.parentHash,
- blockHash: _blockHash,
- prover: fc.prover,
- provenAt: fc.provenAt
- });
- }
+ uint256[7] memory inputs;
+ inputs[0] = uint256(state.staticRefs);
+ inputs[1] = uint256(blk.metaHash);
+ inputs[2] = uint256(evidence.parentHash);
+ inputs[3] = uint256(evidence.blockHash);
+ inputs[4] = uint256(evidence.signalRoot);
+ inputs[5] = uint256(evidence.graffiti);
+ inputs[6] =
+ (uint256(uint160(evidence.prover)) << 96) |
+ (uint256(evidence.parentGasUsed) << 64) |
+ (uint256(evidence.gasUsed) << 32);
+
+ assembly {
+ instance := keccak256(inputs, mul(32, 7))
+ }
- function _proveAnchorForValidBlock(
- TaikoData.Config memory config,
- AddressResolver resolver,
- IProofVerifier proofVerifier,
- TaikoData.Evidence memory evidence,
- bytes calldata anchorTx,
- bytes calldata anchorReceipt
- ) private view {
- // Check anchor tx is valid
- LibTxDecoder.Tx memory _tx = LibTxDecoder.decodeTx(
- config.chainId,
- anchorTx
- );
- if (_tx.txType != 0) revert L1_ANCHOR_TYPE();
- if (_tx.destination != resolver.resolve(config.chainId, "taiko", false))
- revert L1_ANCHOR_DEST();
- if (_tx.gasLimit != config.anchorTxGasLimit)
- revert L1_ANCHOR_GAS_LIMIT();
+ (bool verified, bytes memory ret) = resolver
+ .resolve(LibUtils.getVerifierName(evidence.verifierId), false)
+ .staticcall(bytes.concat(instance, evidence.proof));
- if (FLAG_VALIDATE_ANCHOR_TX_SIGNATURE) {
- // Check anchor tx's signature is valid and deterministic
if (
- _tx.r != LibAnchorSignature.GX &&
- _tx.r != LibAnchorSignature.GX2
- ) revert L1_ANCHOR_SIG_R();
-
- if (_tx.r == LibAnchorSignature.GX2) {
- (, , uint256 s) = LibAnchorSignature.signTransaction(
- LibTxUtils.hashUnsignedTx(config.chainId, _tx),
- 1
- );
- if (s != 0) revert L1_ANCHOR_SIG_S();
- }
+ !verified ||
+ ret.length != 32 ||
+ bytes32(ret) != keccak256("taiko")
+ ) revert L1_INVALID_PROOF();
}
- // Check anchor tx's calldata is valid
- if (
- !LibBytesUtils.equal(
- _tx.data,
- bytes.concat(
- ANCHOR_TX_SELECTOR,
- bytes32(evidence.meta.l1Height),
- evidence.meta.l1Hash
- )
- )
- ) revert L1_ANCHOR_CALLDATA();
-
- // Check anchor tx is the 1st tx in the block
- if (
- !proofVerifier.verifyMKP({
- key: LibRLPWriter.writeUint(0),
- value: anchorTx,
- proof: evidence.proofs[1],
- root: evidence.header.transactionsRoot
- })
- ) revert L1_ANCHOR_TX_PROOF();
- // Check anchor tx does not throw
- LibReceiptDecoder.Receipt memory receipt = LibReceiptDecoder
- .decodeReceipt(anchorReceipt);
- if (receipt.status != 1) revert L1_ANCHOR_RECEIPT_STATUS();
- if (
- !proofVerifier.verifyMKP({
- key: LibRLPWriter.writeUint(0),
- value: anchorReceipt,
- proof: evidence.proofs[2],
- root: evidence.header.receiptsRoot
- })
- ) revert L1_ANCHOR_RECEIPT_PROOF();
+ emit BlockProven({
+ id: blk.blockId,
+ parentHash: evidence.parentHash,
+ blockHash: evidence.blockHash,
+ signalRoot: evidence.signalRoot,
+ prover: evidence.prover
+ });
}
- function _proveAnchorForInvalidBlock(
+ function getForkChoice(
+ TaikoData.State storage state,
TaikoData.Config memory config,
- AddressResolver resolver,
- TaikoData.BlockMetadata memory target,
- IProofVerifier proofVerifier,
- TaikoData.Evidence memory evidence,
- bytes calldata invalidateBlockReceipt
- ) private view {
- if (
- !proofVerifier.verifyMKP({
- key: LibRLPWriter.writeUint(0),
- value: invalidateBlockReceipt,
- proof: evidence.proofs[1],
- root: evidence.header.receiptsRoot
- })
- ) revert L1_ANCHOR_RECEIPT_PROOF();
- // Check the 1st receipt is for an InvalidateBlock tx with
- // a BlockInvalidated event
- LibReceiptDecoder.Receipt memory receipt = LibReceiptDecoder
- .decodeReceipt(invalidateBlockReceipt);
- if (receipt.status != 1) revert L1_ANCHOR_RECEIPT_STATUS();
- if (receipt.logs.length != 1) revert L1_ANCHOR_RECEIPT_LOGS();
- LibReceiptDecoder.Log memory log = receipt.logs[0];
- if (
- log.contractAddress !=
- resolver.resolve(config.chainId, "taiko", false)
- ) revert L1_ANCHOR_RECEIPT_ADDR();
- if (log.data.length != 0) revert L1_ANCHOR_RECEIPT_DATA();
- if (
- log.topics.length != 2 ||
- log.topics[0] != INVALIDATE_BLOCK_LOG_TOPIC ||
- log.topics[1] != target.txListHash
- ) revert L1_ANCHOR_RECEIPT_TOPICS();
- }
+ uint256 blockId,
+ bytes32 parentHash,
+ uint32 parentGasUsed
+ ) internal view returns (TaikoData.ForkChoice storage fc) {
+ TaikoData.Block storage blk = state.blocks[
+ blockId % config.ringBufferSize
+ ];
+ if (blk.blockId != blockId) revert L1_BLOCK_ID();
- function _getInstance(
- TaikoData.Evidence memory evidence
- ) internal pure returns (bytes32) {
- bytes[] memory list = LibBlockHeader.getBlockHeaderRLPItemsList(
- evidence.header,
- 2
+ uint256 fcId = LibUtils.getForkChoiceId(
+ state,
+ blk,
+ parentHash,
+ parentGasUsed
);
-
- uint256 len = list.length;
- list[len - 2] = LibRLPWriter.writeAddress(evidence.prover);
- list[len - 1] = LibRLPWriter.writeHash(evidence.meta.txListHash);
-
- return keccak256(LibRLPWriter.writeList(list));
+ if (fcId == 0) revert L1_FORK_CHOICE_NOT_FOUND();
+ fc = blk.forkChoices[fcId];
}
}
diff --git a/packages/protocol/contracts/L1/libs/LibTokenomics.sol b/packages/protocol/contracts/L1/libs/LibTokenomics.sol
new file mode 100644
index 00000000000..b1c6c3a495a
--- /dev/null
+++ b/packages/protocol/contracts/L1/libs/LibTokenomics.sol
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+import {AddressResolver} from "../../common/AddressResolver.sol";
+import {LibMath} from "../../libs/LibMath.sol";
+import {
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+import {TaikoData} from "../TaikoData.sol";
+import {TaikoToken} from "../TaikoToken.sol";
+import {
+ LibFixedPointMath as Math
+} from "../../thirdparty/LibFixedPointMath.sol";
+
+library LibTokenomics {
+ using LibMath for uint256;
+
+ error L1_INSUFFICIENT_TOKEN();
+ error L1_INVALID_PARAM();
+
+ function withdrawTaikoToken(
+ TaikoData.State storage state,
+ AddressResolver resolver,
+ uint256 amount
+ ) internal {
+ uint256 balance = state.taikoTokenBalances[msg.sender];
+ if (balance < amount) revert L1_INSUFFICIENT_TOKEN();
+
+ unchecked {
+ state.taikoTokenBalances[msg.sender] -= amount;
+ }
+
+ TaikoToken(resolver.resolve("taiko_token", false)).mint(
+ msg.sender,
+ amount
+ );
+ }
+
+ function depositTaikoToken(
+ TaikoData.State storage state,
+ AddressResolver resolver,
+ uint256 amount
+ ) internal {
+ if (amount > 0) {
+ TaikoToken(resolver.resolve("taiko_token", false)).burn(
+ msg.sender,
+ amount
+ );
+ state.taikoTokenBalances[msg.sender] += amount;
+ }
+ }
+
+ /**
+ * Update the baseFee for proofs
+ *
+ * @param state The actual state data
+ * @param proofTime The actual proof time
+ * @return reward Amount of reward given - if blocked is proved and verified
+ */
+ function getProofReward(
+ TaikoData.State storage state,
+ uint64 proofTime
+ ) internal view returns (uint64) {
+ uint64 numBlocksUnverified = state.numBlocks -
+ state.lastVerifiedBlockId -
+ 1;
+
+ if (numBlocksUnverified == 0) {
+ return 0;
+ } else {
+ uint64 totalNumProvingSeconds = uint64(
+ uint256(numBlocksUnverified) *
+ block.timestamp -
+ state.accProposedAt
+ );
+ // If block timestamp is equal to state.accProposedAt (not really, but theoretically possible)
+ // there will be division by 0 error
+ if (totalNumProvingSeconds == 0) {
+ totalNumProvingSeconds = 1;
+ }
+
+ return
+ uint64(
+ (uint256(state.accBlockFees) * proofTime) /
+ totalNumProvingSeconds
+ );
+ }
+ }
+
+ /**
+ * Calculate the newProofTimeIssued and newBasefee
+ *
+ * @param state The actual state data
+ * @param config Config data
+ * @param proofTime The actual proof time
+ * @return newProofTimeIssued Accumulated proof time
+ * @return newBasefee New basefee
+ */
+ function getNewBaseFeeandProofTimeIssued(
+ TaikoData.State storage state,
+ TaikoData.Config memory config,
+ uint64 proofTime
+ ) internal view returns (uint64 newProofTimeIssued, uint64 newBasefee) {
+ newProofTimeIssued = (state.proofTimeIssued > config.proofTimeTarget)
+ ? state.proofTimeIssued - config.proofTimeTarget
+ : uint64(0);
+ newProofTimeIssued += proofTime;
+
+ uint256 x = (newProofTimeIssued * Math.SCALING_FACTOR_1E18) /
+ (config.proofTimeTarget * config.adjustmentQuotient);
+
+ if (Math.MAX_EXP_INPUT <= x) {
+ x = Math.MAX_EXP_INPUT;
+ }
+
+ uint256 result = (uint256(Math.exp(int256(x))) /
+ Math.SCALING_FACTOR_1E18) /
+ (config.proofTimeTarget * config.adjustmentQuotient);
+
+ newBasefee = uint64(result.min(type(uint64).max));
+ }
+
+ /**
+ * Calculating the exponential smoothened with (target/quotient)
+ *
+ * @param value Result of cumulativeProofTime
+ * @param target Target proof time
+ * @param quotient Quotient
+ * @return uint64 Calculated new basefee
+ */
+ function _calcBasefee(
+ uint256 value,
+ uint256 target,
+ uint256 quotient
+ ) private pure returns (uint64) {
+ uint256 x = (value * Math.SCALING_FACTOR_1E18) / (target * quotient);
+
+ if (Math.MAX_EXP_INPUT <= x) {
+ x = Math.MAX_EXP_INPUT;
+ }
+
+ uint256 result = (uint256(Math.exp(int256(x))) /
+ Math.SCALING_FACTOR_1E18) / (target * quotient);
+
+ if (result > type(uint64).max) return type(uint64).max;
+
+ return uint64(result);
+ }
+}
diff --git a/packages/protocol/contracts/L1/libs/LibUtils.sol b/packages/protocol/contracts/L1/libs/LibUtils.sol
index 1694a299a96..08499ae1ec5 100644
--- a/packages/protocol/contracts/L1/libs/LibUtils.sol
+++ b/packages/protocol/contracts/L1/libs/LibUtils.sol
@@ -6,141 +6,66 @@
pragma solidity ^0.8.18;
+import {LibMath} from "../../libs/LibMath.sol";
+import {LibTokenomics} from "./LibTokenomics.sol";
import {
SafeCastUpgradeable
} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-
-import {LibMath} from "../../libs/LibMath.sol";
import {TaikoData} from "../TaikoData.sol";
library LibUtils {
using LibMath for uint256;
- bytes32 public constant BLOCK_DEADEND_HASH = bytes32(uint256(1));
-
- error L1_BLOCK_NUMBER();
+ error L1_BLOCK_ID();
- struct StateVariables {
- uint256 feeBase;
- uint64 genesisHeight;
- uint64 genesisTimestamp;
- uint64 nextBlockId;
- uint64 lastProposedAt;
- uint64 avgBlockTime;
- uint64 latestVerifiedHeight;
- uint64 latestVerifiedId;
- uint64 avgProofTime;
- }
-
- function getProposedBlock(
+ function getL2ChainData(
TaikoData.State storage state,
- uint256 maxNumBlocks,
- uint256 id
- ) internal view returns (TaikoData.ProposedBlock storage) {
- return state.proposedBlocks[id % maxNumBlocks];
+ TaikoData.Config memory config,
+ uint256 blockId
+ ) internal view returns (bool found, TaikoData.Block storage blk) {
+ uint256 id = blockId == 0 ? state.lastVerifiedBlockId : blockId;
+ blk = state.blocks[id % config.ringBufferSize];
+ found = (blk.blockId == id && blk.verifiedForkChoiceId != 0);
}
- function getL2BlockHash(
+ function getForkChoiceId(
TaikoData.State storage state,
- uint256 number,
- uint256 blockHashHistory
- ) internal view returns (bytes32) {
+ TaikoData.Block storage blk,
+ bytes32 parentHash,
+ uint32 parentGasUsed
+ ) internal view returns (uint256 fcId) {
if (
- number + blockHashHistory <= state.latestVerifiedHeight ||
- number > state.latestVerifiedHeight
- ) revert L1_BLOCK_NUMBER();
+ blk.forkChoices[1].key ==
+ keyForForkChoice(parentHash, parentGasUsed)
+ ) {
+ fcId = 1;
+ } else {
+ fcId = state.forkChoiceIds[blk.blockId][parentHash][parentGasUsed];
+ }
- return state.l2Hashes[number % blockHashHistory];
+ if (fcId >= blk.nextForkChoiceId) {
+ fcId = 0;
+ }
}
function getStateVariables(
TaikoData.State storage state
- ) internal view returns (StateVariables memory) {
+ ) internal view returns (TaikoData.StateVariables memory) {
return
- StateVariables({
- feeBase: state.feeBase,
+ TaikoData.StateVariables({
+ basefee: state.basefee,
+ accBlockFees: state.accBlockFees,
genesisHeight: state.genesisHeight,
genesisTimestamp: state.genesisTimestamp,
- nextBlockId: state.nextBlockId,
- lastProposedAt: state.lastProposedAt,
- avgBlockTime: state.avgBlockTime,
- latestVerifiedHeight: state.latestVerifiedHeight,
- latestVerifiedId: state.latestVerifiedId,
- avgProofTime: state.avgProofTime
+ numBlocks: state.numBlocks,
+ proofTimeIssued: state.proofTimeIssued,
+ lastVerifiedBlockId: state.lastVerifiedBlockId,
+ accProposedAt: state.accProposedAt,
+ nextEthDepositToProcess: state.nextEthDepositToProcess,
+ numEthDeposits: uint64(state.ethDeposits.length)
});
}
- // Implement "Incentive Multipliers", see the whitepaper.
- function getTimeAdjustedFee(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- bool isProposal,
- uint64 tNow,
- uint64 tLast,
- uint64 tAvg,
- uint64 tCap
- ) internal view returns (uint256 newFeeBase, uint256 tRelBp) {
- if (
- tCap == 0 ||
- tAvg == 0 ||
- config.feeMaxPeriodPctg <= config.feeGracePeriodPctg ||
- config.rewardMultiplierPctg <= 100
- ) {
- newFeeBase = state.feeBase;
- // tRelBp = 0;
- } else {
- uint256 _tAvg = uint256(tAvg).min(tCap);
- uint256 grace = (config.feeGracePeriodPctg * _tAvg) / 100;
- uint256 max = (config.feeMaxPeriodPctg * _tAvg) / 100;
- uint256 t = uint256(tNow - tLast).max(grace).min(max);
- tRelBp = ((t - grace) * 10000) / (max - grace); // [0 - 10000]
- uint256 alpha = 10000 +
- ((config.rewardMultiplierPctg - 100) * tRelBp) /
- 100;
- if (isProposal) {
- newFeeBase = (state.feeBase * 10000) / alpha; // fee
- } else {
- newFeeBase = (state.feeBase * alpha) / 10000; // reward
- }
- }
- }
-
- // Implement "Slot-availability Multipliers", see the whitepaper.
- function getSlotsAdjustedFee(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- bool isProposal,
- uint256 feeBase
- ) internal view returns (uint256) {
- // m is the `n'` in the whitepaper
- uint256 m = 1000 *
- (config.maxNumBlocks - 1) +
- config.slotSmoothingFactor;
- // n is the number of unverified blocks
- uint256 n = 1000 * (state.nextBlockId - state.latestVerifiedId - 1);
- // k is `m − n + 1` or `m − n - 1`in the whitepaper
- uint256 k = isProposal ? m - n - 1000 : m - n + 1000;
- return (feeBase * (m - 1000) * m) / (m - n) / k;
- }
-
- // Implement "Bootstrap Discount Multipliers", see the whitepaper.
- function getBootstrapDiscountedFee(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- uint256 feeBase
- ) internal view returns (uint256) {
- uint256 halves = uint256(block.timestamp - state.genesisTimestamp) /
- config.bootstrapDiscountHalvingPeriod;
- uint256 gamma = 1024 - (1024 >> halves);
- return (feeBase * gamma) / 1024;
- }
-
- function hashMetadata(
- TaikoData.BlockMetadata memory meta
- ) internal pure returns (bytes32) {
- return keccak256(abi.encode(meta));
- }
-
function movingAverage(
uint256 maValue,
uint256 newValue,
@@ -152,4 +77,68 @@ library LibUtils {
uint256 _ma = (maValue * (maf - 1) + newValue) / maf;
return _ma > 0 ? _ma : maValue;
}
+
+ struct BlockMetadata {
+ uint64 id;
+ uint64 timestamp;
+ uint64 l1Height;
+ uint64 basefee;
+ bytes32 l1Hash;
+ bytes32 mixHash;
+ bytes32 txListHash;
+ uint24 txListByteStart;
+ uint24 txListByteEnd;
+ uint32 gasLimit;
+ address beneficiary;
+ address treasure;
+ }
+
+ function hashMetadata(
+ TaikoData.BlockMetadata memory meta
+ ) internal pure returns (bytes32 hash) {
+ uint256[7] memory inputs;
+
+ inputs[0] =
+ (uint256(meta.id) << 192) |
+ (uint256(meta.timestamp) << 128) |
+ (uint256(meta.l1Height) << 64);
+
+ inputs[1] = uint256(meta.l1Hash);
+ inputs[2] = uint256(meta.mixHash);
+ inputs[3] = uint256(meta.depositsRoot);
+ inputs[4] = uint256(meta.txListHash);
+
+ inputs[5] =
+ (uint256(meta.txListByteStart) << 232) |
+ (uint256(meta.txListByteEnd) << 208) |
+ (uint256(meta.gasLimit) << 176) |
+ (uint256(uint160(meta.beneficiary)) << 16) |
+ (uint256(meta.cacheTxListInfo) << 8);
+
+ inputs[6] = (uint256(uint160(meta.treasure)) << 96);
+
+ // Ignoring `meta.depositsProcessed` as `meta.depositsRoot`
+ // is a hash of it.
+
+ assembly {
+ hash := keccak256(inputs, mul(7, 32))
+ }
+ }
+
+ function keyForForkChoice(
+ bytes32 parentHash,
+ uint32 parentGasUsed
+ ) internal pure returns (bytes32 key) {
+ assembly {
+ let ptr := mload(0x40)
+ mstore(ptr, parentGasUsed)
+ mstore(add(ptr, 32), parentHash)
+ key := keccak256(add(ptr, 28), 36)
+ mstore(0x40, add(ptr, 64))
+ }
+ }
+
+ function getVerifierName(uint16 id) public pure returns (string memory) {
+ return string(bytes.concat(bytes("verifier_"), bytes2(id)));
+ }
}
diff --git a/packages/protocol/contracts/L1/libs/LibVerifying.sol b/packages/protocol/contracts/L1/libs/LibVerifying.sol
index a39fef8cddc..0fe877d8eee 100644
--- a/packages/protocol/contracts/L1/libs/LibVerifying.sol
+++ b/packages/protocol/contracts/L1/libs/LibVerifying.sol
@@ -6,238 +6,184 @@
pragma solidity ^0.8.18;
+import {AddressResolver} from "../../common/AddressResolver.sol";
+import {ISignalService} from "../../signal/ISignalService.sol";
+import {LibTokenomics} from "./LibTokenomics.sol";
+import {LibUtils} from "./LibUtils.sol";
import {
SafeCastUpgradeable
} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-
-import {AddressResolver} from "../../common/AddressResolver.sol";
-import {TaikoToken} from "../TaikoToken.sol";
-import {LibUtils} from "./LibUtils.sol";
import {TaikoData} from "../../L1/TaikoData.sol";
-/**
- * LibVerifying.
- */
library LibVerifying {
using SafeCastUpgradeable for uint256;
using LibUtils for TaikoData.State;
- event BlockVerified(uint256 indexed id, bytes32 blockHash);
- event HeaderSynced(uint256 indexed srcHeight, bytes32 srcHash);
-
- error L1_0_FEE_BASE();
error L1_INVALID_CONFIG();
- error L1_INVALID_PARAM();
+ error L1_INVALID_L21559_PARAMS();
+
+ event BlockVerified(uint256 indexed id, bytes32 blockHash);
+ event XchainSynced(
+ uint256 indexed srcHeight,
+ bytes32 blockHash,
+ bytes32 signalRoot
+ );
function init(
TaikoData.State storage state,
TaikoData.Config memory config,
bytes32 genesisBlockHash,
- uint feeBase
+ uint64 initBasefee,
+ uint64 initProofTimeIssued
) internal {
- if (
- config.chainId <= 1 ||
- config.maxNumBlocks <= 1 ||
- config.blockHashHistory == 0 ||
- config.blockMaxGasLimit == 0 ||
- config.maxTransactionsPerBlock == 0 ||
- config.maxBytesPerTxList == 0 ||
- config.minTxGasLimit == 0 ||
- config.slotSmoothingFactor == 0 ||
- config.rewardBurnBips >= 10000 ||
- config.feeBaseMAF == 0 ||
- config.blockTimeMAF == 0 ||
- config.proofTimeMAF == 0 ||
- config.blockTimeCap == 0 ||
- config.proofTimeCap == 0 ||
- config.feeGracePeriodPctg > config.feeMaxPeriodPctg ||
- config.rewardMultiplierPctg < 100
- ) revert L1_INVALID_CONFIG();
-
- if (feeBase == 0) revert L1_0_FEE_BASE();
+ _checkConfig(config);
+ uint64 timeNow = uint64(block.timestamp);
state.genesisHeight = uint64(block.number);
- state.genesisTimestamp = uint64(block.timestamp);
- state.feeBase = feeBase;
- state.nextBlockId = 1;
- state.lastProposedAt = uint64(block.timestamp);
- state.l2Hashes[0] = genesisBlockHash;
+ state.genesisTimestamp = timeNow;
+
+ state.basefee = initBasefee;
+ state.proofTimeIssued = initProofTimeIssued;
+ state.numBlocks = 1;
+
+ TaikoData.Block storage blk = state.blocks[0];
+ blk.proposedAt = timeNow;
+ blk.nextForkChoiceId = 2;
+ blk.verifiedForkChoiceId = 1;
+
+ TaikoData.ForkChoice storage fc = state.blocks[0].forkChoices[1];
+ fc.blockHash = genesisBlockHash;
+ fc.provenAt = timeNow;
emit BlockVerified(0, genesisBlockHash);
- emit HeaderSynced(0, genesisBlockHash);
}
function verifyBlocks(
TaikoData.State storage state,
TaikoData.Config memory config,
+ AddressResolver resolver,
uint256 maxBlocks
- ) public {
- uint64 latestL2Height = state.latestVerifiedHeight;
- bytes32 latestL2Hash = state.l2Hashes[
- latestL2Height % config.blockHashHistory
- ];
+ ) internal {
+ uint256 i = state.lastVerifiedBlockId;
+ TaikoData.Block storage blk = state.blocks[i % config.ringBufferSize];
+
+ uint256 fcId = blk.verifiedForkChoiceId;
+ assert(fcId > 0);
+ bytes32 blockHash = blk.forkChoices[fcId].blockHash;
+ uint32 gasUsed = blk.forkChoices[fcId].gasUsed;
+ bytes32 signalRoot;
+
uint64 processed;
+ unchecked {
+ ++i;
+ }
- for (
- uint256 i = state.latestVerifiedId + 1;
- i < state.nextBlockId && processed < maxBlocks;
-
- ) {
- TaikoData.ForkChoice storage fc = state.forkChoices[i][
- latestL2Hash
- ];
- TaikoData.ProposedBlock storage target = state.getProposedBlock(
- config.maxNumBlocks,
- i
- );
-
- if (fc.prover == address(0)) {
- break;
- } else {
- (latestL2Height, latestL2Hash) = _verifyBlock({
- state: state,
- config: config,
- fc: fc,
- target: target,
- latestL2Height: latestL2Height,
- latestL2Hash: latestL2Hash
- });
- processed += 1;
- emit BlockVerified(i, fc.blockHash);
-
- // clean up the fork choice
- fc.blockHash = 0;
- fc.prover = address(0);
- fc.provenAt = 0;
- }
+ while (i < state.numBlocks && processed < maxBlocks) {
+ blk = state.blocks[i % config.ringBufferSize];
+ assert(blk.blockId == i);
+
+ fcId = LibUtils.getForkChoiceId(state, blk, blockHash, gasUsed);
+
+ if (fcId == 0) break;
+
+ TaikoData.ForkChoice storage fc = blk.forkChoices[fcId];
+
+ if (
+ fc.prover == address(0) || // oracle proof
+ block.timestamp < fc.provenAt + config.proofCooldownPeriod // too young
+ ) break;
+
+ blockHash = fc.blockHash;
+ gasUsed = fc.gasUsed;
+ signalRoot = fc.signalRoot;
+
+ _markBlockVerified({
+ state: state,
+ config: config,
+ blk: blk,
+ fcId: uint24(fcId),
+ fc: fc
+ });
unchecked {
++i;
+ ++processed;
}
}
if (processed > 0) {
- state.latestVerifiedId += processed;
-
- if (latestL2Height > state.latestVerifiedHeight) {
- state.latestVerifiedHeight = latestL2Height;
-
- // Note: Not all L2 hashes are stored on L1, only the last
- // verified one in a batch. This is sufficient because the last
- // verified hash is the only one needed checking the existence
- // of a cross-chain message with a merkle proof.
- state.l2Hashes[
- latestL2Height % config.blockHashHistory
- ] = latestL2Hash;
- emit HeaderSynced(latestL2Height, latestL2Hash);
+ unchecked {
+ state.lastVerifiedBlockId += processed;
}
- }
- }
-
- function withdrawBalance(
- TaikoData.State storage state,
- AddressResolver resolver
- ) public {
- uint256 balance = state.balances[msg.sender];
- if (balance <= 1) return;
-
- state.balances[msg.sender] = 1;
- TaikoToken(resolver.resolve("tko_token", false)).mint(
- msg.sender,
- balance - 1
- );
- }
- function getProofReward(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- uint64 provenAt,
- uint64 proposedAt
- ) public view returns (uint256 newFeeBase, uint256 reward, uint256 tRelBp) {
- if (proposedAt > provenAt) revert L1_INVALID_PARAM();
- (newFeeBase, tRelBp) = LibUtils.getTimeAdjustedFee({
- state: state,
- config: config,
- isProposal: false,
- tNow: provenAt,
- tLast: proposedAt,
- tAvg: state.avgProofTime,
- tCap: config.proofTimeCap
- });
- reward = LibUtils.getSlotsAdjustedFee({
- state: state,
- config: config,
- isProposal: false,
- feeBase: newFeeBase
- });
- reward = (reward * (10000 - config.rewardBurnBips)) / 10000;
+ if (config.relaySignalRoot) {
+ // Send the L2's signal root to the signal service so other TaikoL1
+ // deployments, if they share the same signal service, can relay the
+ // signal to their corresponding TaikoL2 contract.
+ ISignalService(resolver.resolve("signal_service", false))
+ .sendSignal(signalRoot);
+ }
+ emit XchainSynced(state.lastVerifiedBlockId, blockHash, signalRoot);
+ }
}
- function _verifyBlock(
+ function _markBlockVerified(
TaikoData.State storage state,
TaikoData.Config memory config,
+ TaikoData.Block storage blk,
TaikoData.ForkChoice storage fc,
- TaikoData.ProposedBlock storage target,
- uint64 latestL2Height,
- bytes32 latestL2Hash
- ) private returns (uint64 _latestL2Height, bytes32 _latestL2Hash) {
- if (config.enableTokenomics) {
- uint256 newFeeBase;
- {
- uint256 reward;
- uint256 tRelBp; // [0-10000], see the whitepaper
- (newFeeBase, reward, tRelBp) = getProofReward({
- state: state,
- config: config,
- provenAt: fc.provenAt,
- proposedAt: target.proposedAt
- });
-
- // reward the prover
- if (reward > 0) {
- if (state.balances[fc.prover] == 0) {
- // Reduce reward to 1 wei as a penalty if the prover
- // has 0 TKO outstanding balance.
- state.balances[fc.prover] = 1;
- } else {
- state.balances[fc.prover] += reward;
- }
- }
-
- // refund proposer deposit
- uint256 refund = (target.deposit * (10000 - tRelBp)) / 10000;
- if (refund > 0) {
- if (state.balances[target.proposer] == 0) {
- // Reduce refund to 1 wei as a penalty if the proposer
- // has 0 TKO outstanding balance.
- state.balances[target.proposer] = 1;
- } else {
- state.balances[target.proposer] += refund;
- }
- }
- }
- // Update feeBase and avgProofTime
- state.feeBase = LibUtils.movingAverage({
- maValue: state.feeBase,
- newValue: newFeeBase,
- maf: config.feeBaseMAF
- });
+ uint24 fcId
+ ) private {
+ uint64 proofTime;
+ unchecked {
+ proofTime = uint64(fc.provenAt - blk.proposedAt);
}
- state.avgProofTime = LibUtils
- .movingAverage({
- maValue: state.avgProofTime,
- newValue: fc.provenAt - target.proposedAt,
- maf: config.proofTimeMAF
- })
- .toUint64();
-
- if (fc.blockHash != LibUtils.BLOCK_DEADEND_HASH) {
- _latestL2Height = latestL2Height + 1;
- _latestL2Hash = fc.blockHash;
- } else {
- _latestL2Height = latestL2Height;
- _latestL2Hash = latestL2Hash;
+ uint64 reward = LibTokenomics.getProofReward(state, proofTime);
+
+ (state.proofTimeIssued, state.basefee) = LibTokenomics
+ .getNewBaseFeeandProofTimeIssued(state, config, proofTime);
+
+ unchecked {
+ state.accBlockFees -= reward;
+ state.accProposedAt -= blk.proposedAt;
}
+
+ // reward the prover
+ if (reward != 0) {
+ if (state.taikoTokenBalances[fc.prover] == 0) {
+ // Reduce refund to 1 wei as a penalty if the proposer
+ // has 0 TKO outstanding balance.
+ state.taikoTokenBalances[fc.prover] = 1;
+ } else {
+ state.taikoTokenBalances[fc.prover] += reward;
+ }
+ }
+
+ blk.nextForkChoiceId = 1;
+ blk.verifiedForkChoiceId = fcId;
+
+ emit BlockVerified(blk.blockId, fc.blockHash);
+ }
+
+ function _checkConfig(TaikoData.Config memory config) private pure {
+ if (
+ config.chainId <= 1 ||
+ config.maxNumProposedBlocks == 1 ||
+ config.ringBufferSize <= config.maxNumProposedBlocks + 1 ||
+ config.maxNumVerifiedBlocks == 0 ||
+ config.blockMaxGasLimit == 0 ||
+ config.maxTransactionsPerBlock == 0 ||
+ config.maxBytesPerTxList == 0 ||
+ // EIP-4844 blob size up to 128K
+ config.maxBytesPerTxList > 128 * 1024 ||
+ config.minTxGasLimit == 0 ||
+ config.maxEthDepositsPerBlock == 0 ||
+ config.maxEthDepositsPerBlock < config.minEthDepositsPerBlock ||
+ // EIP-4844 blob deleted after 30 days
+ config.txListCacheExpiry > 30 * 24 hours ||
+ config.proofTimeTarget == 0 ||
+ config.adjustmentQuotient == 0
+ ) revert L1_INVALID_CONFIG();
}
}
diff --git a/packages/protocol/contracts/L2/LibL2Consts.sol b/packages/protocol/contracts/L2/LibL2Consts.sol
new file mode 100644
index 00000000000..b24997851c4
--- /dev/null
+++ b/packages/protocol/contracts/L2/LibL2Consts.sol
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+library LibL2Consts {
+ uint64 public constant ANCHOR_GAS_COST = 150000; // owner:david
+}
diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol
index 356543d69f6..9730f61dd19 100644
--- a/packages/protocol/contracts/L2/TaikoL2.sol
+++ b/packages/protocol/contracts/L2/TaikoL2.sol
@@ -6,22 +6,32 @@
pragma solidity ^0.8.18;
-import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
+import {EssentialContract} from "../common/EssentialContract.sol";
+import {IXchainSync} from "../common/IXchainSync.sol";
+import {LibL2Consts} from "./LibL2Consts.sol";
+import {LibMath} from "../libs/LibMath.sol";
+import {Lib1559Math} from "../libs/Lib1559Math.sol";
+import {TaikoL2Signer} from "./TaikoL2Signer.sol";
import {
- ReentrancyGuard
-} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
-import {AddressResolver} from "../common/AddressResolver.sol";
-import {IHeaderSync} from "../common/IHeaderSync.sol";
-import {LibAnchorSignature} from "../libs/LibAnchorSignature.sol";
-import {LibInvalidTxList} from "../libs/LibInvalidTxList.sol";
-import {LibSharedConfig} from "../libs/LibSharedConfig.sol";
-import {LibTxDecoder} from "../libs/LibTxDecoder.sol";
-import {TaikoData} from "../L1/TaikoData.sol";
+contract TaikoL2 is EssentialContract, TaikoL2Signer, IXchainSync {
+ using SafeCastUpgradeable for uint256;
+ using LibMath for uint256;
-contract TaikoL2 is AddressResolver, ReentrancyGuard, IHeaderSync {
- using LibTxDecoder for bytes;
+ struct VerifiedBlock {
+ bytes32 blockHash;
+ bytes32 signalRoot;
+ }
+ struct EIP1559Params {
+ uint64 basefee;
+ uint64 gasIssuedPerSecond;
+ uint64 gasExcessMax;
+ uint64 gasTarget;
+ uint64 ratio2x1x;
+ }
/**********************
* State Variables *
**********************/
@@ -30,50 +40,95 @@ contract TaikoL2 is AddressResolver, ReentrancyGuard, IHeaderSync {
// All L2 block hashes will be saved in this mapping.
mapping(uint256 blockNumber => bytes32 blockHash) private _l2Hashes;
- // Mapping from L1 block numbers to their block hashes.
- // Note that only hashes of L1 blocks where at least one L2
- // block has been proposed will be saved in this mapping.
- mapping(uint256 blockNumber => bytes32 blockHash) private _l1Hashes;
+ mapping(uint256 blockNumber => VerifiedBlock) private _l1VerifiedBlocks;
// A hash to check te integrity of public inputs.
- bytes32 private _publicInputHash;
+ bytes32 public publicInputHash;
+
+ uint128 public yscale;
+ uint64 public xscale;
+ uint64 public gasIssuedPerSecond;
- // The latest L1 block where a L2 block has been proposed.
- uint256 public latestSyncedL1Height;
+ uint64 public parentTimestamp;
+ uint64 public latestSyncedL1Height;
+ uint64 public gasExcess;
+ uint64 public __reserved1;
- uint256[46] private __gap;
+ uint256[45] private __gap;
/**********************
* Events and Errors *
**********************/
- event BlockInvalidated(bytes32 indexed txListHash);
-
- error L2_INVALID_SENDER();
+ // Captures all block variables mentioned in
+ // https://docs.soliditylang.org/en/v0.8.18/units-and-global-variables.html
+ event Anchored(
+ uint64 number,
+ uint64 basefee,
+ uint64 gaslimit,
+ uint64 timestamp,
+ bytes32 parentHash,
+ uint256 prevrandao,
+ address coinbase,
+ uint32 chainid
+ );
+
+ error L2_BASEFEE_MISMATCH(uint64 expected, uint64 actual);
+ error L2_INVALID_1559_PARAMS();
error L2_INVALID_CHAIN_ID();
- error L2_INVALID_GAS_PRICE();
- error L2_PUBLIC_INPUT_HASH_MISMATCH();
+ error L2_INVALID_SENDER();
+ error L2_PUBLIC_INPUT_HASH_MISMATCH(bytes32 expected, bytes32 actual);
+ error L2_TOO_LATE();
+
+ error M1559_UNEXPECTED_CHANGE(uint64 expected, uint64 actual);
+ error M1559_OUT_OF_STOCK();
/**********************
* Constructor *
**********************/
- constructor(address _addressManager) {
- if (block.chainid == 0) revert L2_INVALID_CHAIN_ID();
- AddressResolver._init(_addressManager);
-
- bytes32[255] memory ancestors;
- uint256 number = block.number;
- for (uint256 i; i < 255 && number >= i + 2; ++i) {
- ancestors[i] = blockhash(number - i - 2);
+ function init(
+ address _addressManager,
+ EIP1559Params calldata _param1559
+ ) external initializer {
+ if (block.chainid <= 1 || block.chainid >= type(uint32).max)
+ revert L2_INVALID_CHAIN_ID();
+ if (block.number > 1) revert L2_TOO_LATE();
+
+ if (_param1559.gasIssuedPerSecond != 0) {
+ if (
+ _param1559.basefee == 0 ||
+ _param1559.gasExcessMax == 0 ||
+ _param1559.gasTarget == 0 ||
+ _param1559.ratio2x1x == 0
+ ) revert L2_INVALID_1559_PARAMS();
+
+ uint128 _xscale;
+ (_xscale, yscale) = Lib1559Math.calculateScales({
+ xExcessMax: _param1559.gasExcessMax,
+ price: _param1559.basefee,
+ target: _param1559.gasTarget,
+ ratio2x1x: _param1559.ratio2x1x
+ });
+
+ if (_xscale == 0 || _xscale >= type(uint64).max || yscale == 0)
+ revert L2_INVALID_1559_PARAMS();
+ xscale = uint64(_xscale);
+
+ // basefee = _param1559.basefee;
+ gasIssuedPerSecond = _param1559.gasIssuedPerSecond;
+ gasExcess = _param1559.gasExcessMax / 2;
}
- _publicInputHash = _hashPublicInputs({
- chainId: block.chainid,
- number: number,
- baseFee: 0,
- ancestors: ancestors
- });
+ parentTimestamp = uint64(block.timestamp);
+
+ EssentialContract._init(_addressManager);
+
+ (publicInputHash, ) = _calcPublicInputHash(block.number);
+ if (block.number > 0) {
+ uint256 parentHeight = block.number - 1;
+ _l2Hashes[parentHeight] = blockhash(parentHeight);
+ }
}
/**********************
@@ -86,77 +141,99 @@ contract TaikoL2 is AddressResolver, ReentrancyGuard, IHeaderSync {
* certain block-level global variables because they are not part of the
* Trie structure.
*
- * Note: This transaction shall be the first transaction in every L2 block.
+ * A circuit will verify the integrity among:
+ * - l1Hash, l1SignalRoot, and l1SignalServiceAddress
+ * - (l1Hash and l1SignalServiceAddress) are both hashed into of the
+ * ZKP's instance.
+ *
+ * This transaction shall be the first transaction in every L2 block.
*
- * @param l1Height The latest L1 block height when this block was proposed.
* @param l1Hash The latest L1 block hash when this block was proposed.
+ * @param l1SignalRoot The latest value of the L1 "signal service storage root".
+ * @param l1Height The latest L1 block height when this block was proposed.
+ * @param parentGasUsed the gas used in the parent block.
*/
- function anchor(uint256 l1Height, bytes32 l1Hash) external {
- TaikoData.Config memory config = getConfig();
- if (config.enablePublicInputsCheck) {
- _checkPublicInputs();
- }
- latestSyncedL1Height = l1Height;
- _l1Hashes[l1Height] = l1Hash;
- emit HeaderSynced(l1Height, l1Hash);
- }
-
- /**
- * Invalidate a L2 block by verifying its txList is not intrinsically valid.
- *
- * @param txList The L2 block's txlist.
- * @param hint A hint for this method to invalidate the txList.
- * @param txIdx If the hint is for a specific transaction in txList,
- * txIdx specifies which transaction to check.
- */
- function invalidateBlock(
- bytes calldata txList,
- LibInvalidTxList.Hint hint,
- uint256 txIdx
+ function anchor(
+ bytes32 l1Hash,
+ bytes32 l1SignalRoot,
+ uint64 l1Height,
+ uint64 parentGasUsed
) external {
- if (msg.sender != LibAnchorSignature.K_GOLDEN_TOUCH_ADDRESS)
- revert L2_INVALID_SENDER();
+ if (msg.sender != GOLDEN_TOUCH_ADDRESS) revert L2_INVALID_SENDER();
- if (tx.gasprice != 0) revert L2_INVALID_GAS_PRICE();
+ uint256 parentHeight = block.number - 1;
+ bytes32 parentHash = blockhash(parentHeight);
- TaikoData.Config memory config = getConfig();
- LibInvalidTxList.verifyTxListInvalid({
- config: config,
- encoded: txList,
- hint: hint,
- txIdx: txIdx
- });
+ (bytes32 prevPIH, bytes32 currPIH) = _calcPublicInputHash(parentHeight);
- if (config.enablePublicInputsCheck) {
- _checkPublicInputs();
+ if (publicInputHash != prevPIH) {
+ revert L2_PUBLIC_INPUT_HASH_MISMATCH(publicInputHash, prevPIH);
}
- emit BlockInvalidated(txList.hashTxList());
+ // replace the oldest block hash with the parent's blockhash
+ publicInputHash = currPIH;
+ _l2Hashes[parentHeight] = parentHash;
+
+ latestSyncedL1Height = l1Height;
+ _l1VerifiedBlocks[l1Height] = VerifiedBlock(l1Hash, l1SignalRoot);
+
+ emit XchainSynced(l1Height, l1Hash, l1SignalRoot);
+
+ // Check EIP-1559 basefee
+ uint256 basefee;
+ if (gasIssuedPerSecond != 0) {
+ (basefee, gasExcess) = _calcBasefee(
+ block.timestamp - parentTimestamp,
+ uint64(block.gaslimit),
+ parentGasUsed
+ );
+ }
+
+ if (block.basefee != basefee)
+ revert L2_BASEFEE_MISMATCH(uint64(basefee), uint64(block.basefee));
+
+ parentTimestamp = uint64(block.timestamp);
+
+ // We emit this event so circuits can grab its data to verify block variables.
+ // If plonk lookup table already has all these data, we can still use this
+ // event for debugging purpose.
+ emit Anchored({
+ number: uint64(block.number),
+ basefee: uint64(basefee),
+ gaslimit: uint64(block.gaslimit),
+ timestamp: uint64(block.timestamp),
+ parentHash: parentHash,
+ prevrandao: block.prevrandao,
+ coinbase: block.coinbase,
+ chainid: uint32(block.chainid)
+ });
}
/**********************
* Public Functions *
**********************/
- function getConfig()
- public
- view
- virtual
- returns (TaikoData.Config memory config)
- {
- config = LibSharedConfig.getConfig();
- config.chainId = block.chainid;
+ function getBasefee(
+ uint32 timeSinceParent,
+ uint64 gasLimit,
+ uint64 parentGasUsed
+ ) public view returns (uint256 _basefee) {
+ (_basefee, ) = _calcBasefee(timeSinceParent, gasLimit, parentGasUsed);
}
- function getSyncedHeader(
+ function getXchainBlockHash(
uint256 number
) public view override returns (bytes32) {
- return _l1Hashes[number];
+ uint256 _number = number == 0 ? latestSyncedL1Height : number;
+ return _l1VerifiedBlocks[_number].blockHash;
}
- function getLatestSyncedHeader() public view override returns (bytes32) {
- return _l1Hashes[latestSyncedL1Height];
+ function getXchainSignalRoot(
+ uint256 number
+ ) public view override returns (bytes32) {
+ uint256 _number = number == 0 ? latestSyncedL1Height : number;
+ return _l1VerifiedBlocks[_number].signalRoot;
}
function getBlockHash(uint256 number) public view returns (bytes32) {
@@ -173,51 +250,53 @@ contract TaikoL2 is AddressResolver, ReentrancyGuard, IHeaderSync {
* Private Functions *
**********************/
- function _checkPublicInputs() private {
- // Check the latest 256 block hashes (excluding the parent hash).
- bytes32[255] memory ancestors;
- uint256 number = block.number;
- uint256 chainId = block.chainid;
-
- // put the previous 255 blockhashes (excluding the parent's) into a
- // ring buffer.
- for (uint256 i = 2; i <= 256 && number >= i; ++i) {
- ancestors[(number - i) % 255] = blockhash(number - i);
+ function _calcPublicInputHash(
+ uint256 blockNumber
+ ) private view returns (bytes32 prevPIH, bytes32 currPIH) {
+ bytes32[256] memory inputs;
+ unchecked {
+ // put the previous 255 blockhashes (excluding the parent's) into a
+ // ring buffer.
+ for (uint256 i; i < 255 && blockNumber >= i + 1; ++i) {
+ uint256 j = blockNumber - i - 1;
+ inputs[j % 255] = blockhash(j);
+ }
}
- uint256 parentHeight = number - 1;
- bytes32 parentHash = blockhash(parentHeight);
+ inputs[255] = bytes32(block.chainid);
- if (
- _publicInputHash !=
- _hashPublicInputs({
- chainId: chainId,
- number: parentHeight,
- baseFee: 0,
- ancestors: ancestors
- })
- ) {
- revert L2_PUBLIC_INPUT_HASH_MISMATCH();
+ assembly {
+ prevPIH := keccak256(inputs, mul(256, 32))
}
- // replace the oldest block hash with the parent's blockhash
- ancestors[parentHeight % 255] = parentHash;
- _publicInputHash = _hashPublicInputs({
- chainId: chainId,
- number: number,
- baseFee: 0,
- ancestors: ancestors
- });
-
- _l2Hashes[parentHeight] = parentHash;
+ inputs[blockNumber % 255] = blockhash(blockNumber);
+ assembly {
+ currPIH := keccak256(inputs, mul(256, 32))
+ }
}
- function _hashPublicInputs(
- uint256 chainId,
- uint256 number,
- uint256 baseFee,
- bytes32[255] memory ancestors
- ) private pure returns (bytes32) {
- return keccak256(abi.encodePacked(chainId, number, baseFee, ancestors));
+ function _calcBasefee(
+ uint256 timeSinceParent,
+ uint64 gasLimit,
+ uint64 parentGasUsed
+ ) private view returns (uint256 _basefee, uint64 _gasExcess) {
+ // Very important to cap _gasExcess uint64
+ unchecked {
+ uint64 parentGasUsedNet = parentGasUsed >
+ LibL2Consts.ANCHOR_GAS_COST
+ ? parentGasUsed - LibL2Consts.ANCHOR_GAS_COST
+ : 0;
+
+ uint256 a = uint256(gasExcess) + parentGasUsedNet;
+ uint256 b = gasIssuedPerSecond * timeSinceParent;
+ _gasExcess = uint64((a.max(b) - b).min(type(uint64).max));
+ }
+
+ _basefee = Lib1559Math.calculatePrice({
+ xscale: xscale,
+ yscale: yscale,
+ xExcess: _gasExcess,
+ xPurchase: gasLimit
+ });
}
}
diff --git a/packages/protocol/contracts/libs/LibAnchorSignature.sol b/packages/protocol/contracts/L2/TaikoL2Signer.sol
similarity index 71%
rename from packages/protocol/contracts/libs/LibAnchorSignature.sol
rename to packages/protocol/contracts/L2/TaikoL2Signer.sol
index a2a8c3b713e..4a42d6b0b5f 100644
--- a/packages/protocol/contracts/libs/LibAnchorSignature.sol
+++ b/packages/protocol/contracts/L2/TaikoL2Signer.sol
@@ -6,54 +6,56 @@
pragma solidity ^0.8.18;
-import {LibUint512Math} from "./LibUint512Math.sol";
+import {LibUint512Math} from "../libs/LibUint512Math.sol";
-library LibAnchorSignature {
- address public constant K_GOLDEN_TOUCH_ADDRESS =
+abstract contract TaikoL2Signer {
+ address public constant GOLDEN_TOUCH_ADDRESS =
0x0000777735367b36bC9B61C50022d9D0700dB4Ec;
- uint256 public constant K_GOLDEN_TOUCH_PRIVATEKEY =
+ uint256 public constant GOLDEN_TOUCH_PRIVATEKEY =
0x92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38;
- uint256 public constant GX =
+ uint256 private constant GX =
0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798;
- uint256 public constant GY =
+ uint256 private constant GY =
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8;
- uint256 public constant GX2 =
+ uint256 private constant GX2 =
0xc6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5;
- uint256 public constant GY2 =
+ uint256 private constant GY2 =
0x1ae168fea63dc339a3c58419466ceaeef7f632653266d0e1236431a950cfe52a;
- uint256 public constant N =
+ uint256 private constant N =
0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141;
// (
// uint256 GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW,
// uint256 GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH
- // ) = LibUint512Math.mul(GX, K_GOLDEN_TOUCH_PRIVATEKEY);
- uint256 public constant GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW =
+ // ) = LibUint512Math.mul(GX, GOLDEN_TOUCH_PRIVATEKEY);
+ uint256 private constant GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW =
0xb4a95509ce05fe8d45987859a067780d16a367c0e2cacf79cd301b93fb717940;
- uint256 public constant GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH =
+ uint256 private constant GX_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH =
0x45b59254b0320fd853f3f38ac574999e91bd75fd5e6cab9c22c5e71fc6d276e4;
// (
// uint256 GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW,
// uint256 GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH
- // ) = LibUint512Math.mul(GX2, K_GOLDEN_TOUCH_PRIVATEKEY);
- uint256 public constant GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW =
+ // ) = LibUint512Math.mul(GX2, GOLDEN_TOUCH_PRIVATEKEY);
+ uint256 private constant GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_LOW =
0xad77eceea844778cb4376153fc8f06f12f1695df4585bf75bfb17ec19ce90818;
- uint256 public constant GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH =
+ uint256 private constant GX2_MUL_GOLDEN_TOUCH_PRIVATEKEY_HIGH =
0x71620584f61c57e688bbd3fd7a39a036e588d962c4c830f3dacbc15c917e02f2;
// Invert K (= 2) in the field F(N)
- uint256 public constant K_2_INVM_N =
+ uint256 private constant K_2_INVM_N =
0x7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1;
- function signTransaction(
+ error L2_INVALID_GOLDEN_TOUCH_K();
+
+ function signAnchor(
bytes32 digest,
uint8 k
- ) internal view returns (uint8 v, uint256 r, uint256 s) {
- require(k == 1 || k == 2, "invalid k value");
+ ) public view returns (uint8 v, uint256 r, uint256 s) {
+ if (k != 1 && k != 2) revert L2_INVALID_GOLDEN_TOUCH_K();
r = k == 1 ? GX : GX2;
@@ -73,13 +75,13 @@ library LibAnchorSignature {
);
if (k == 1) {
- s = expmod(low256, high256, 1, N);
+ s = _expmod(low256, high256, 1, N);
} else {
(low256, high256) = LibUint512Math.mul(
K_2_INVM_N,
- expmod(low256, high256, 1, N)
+ _expmod(low256, high256, 1, N)
);
- s = expmod(low256, high256, 1, N);
+ s = _expmod(low256, high256, 1, N);
}
if (s > N >> 1) {
@@ -88,12 +90,12 @@ library LibAnchorSignature {
}
}
- function expmod(
+ function _expmod(
uint256 baseLow,
uint256 baseHigh,
uint256 e,
uint256 m
- ) internal view returns (uint256 o) {
+ ) private view returns (uint256 o) {
assembly {
// define pointer
let p := mload(0x40)
diff --git a/packages/protocol/contracts/bridge/Bridge.sol b/packages/protocol/contracts/bridge/Bridge.sol
index 900f7485b3e..681b1b170ce 100644
--- a/packages/protocol/contracts/bridge/Bridge.sol
+++ b/packages/protocol/contracts/bridge/Bridge.sol
@@ -30,7 +30,6 @@ contract Bridge is EssentialContract, IBridge, BridgeErrors {
*********************/
LibBridgeData.State private _state; // 50 slots reserved
- uint256[50] private __gap;
/*********************
* Events *
diff --git a/packages/protocol/contracts/bridge/TokenVault.sol b/packages/protocol/contracts/bridge/TokenVault.sol
index 2f8a2fb1958..2c1add56e93 100644
--- a/packages/protocol/contracts/bridge/TokenVault.sol
+++ b/packages/protocol/contracts/bridge/TokenVault.sol
@@ -19,6 +19,7 @@ import {EssentialContract} from "../common/EssentialContract.sol";
import {TaikoToken} from "../L1/TaikoToken.sol";
import {BridgedERC20} from "./BridgedERC20.sol";
import {IBridge} from "./IBridge.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
/**
* This vault holds all ERC20 tokens (but not Ether) that users have deposited.
@@ -120,7 +121,6 @@ contract TokenVault is EssentialContract {
error TOKENVAULT_INVALID_TO();
error TOKENVAULT_INVALID_VALUE();
- error TOKENVAULT_INVALID_CALL_VALUE();
error TOKENVAULT_INVALID_TOKEN();
error TOKENVAULT_INVALID_AMOUNT();
error TOKENVAULT_CANONICAL_TOKEN_NOT_FOUND();
@@ -137,56 +137,6 @@ contract TokenVault is EssentialContract {
EssentialContract._init(addressManager);
}
- /**
- * Receives Ether and constructs a Bridge message. Sends the Ether and
- * message along to the Bridge.
- * @param destChainId @custom:see IBridge.Message
- * @param to @custom:see IBridge.Message
- * @param gasLimit @custom:see IBridge.Message
- * @param processingFee @custom:see IBridge.Message
- * @param refundAddress @custom:see IBridge.Message
- * @param memo @custom:see IBridge.Message
- */
- function sendEther(
- uint256 destChainId,
- address to,
- uint256 gasLimit,
- uint256 processingFee,
- address refundAddress,
- string memory memo
- ) external payable nonReentrant {
- if (
- to == address(0) || to == resolve(destChainId, "token_vault", false)
- ) revert TOKENVAULT_INVALID_TO();
-
- if (msg.value <= processingFee) revert TOKENVAULT_INVALID_VALUE();
-
- IBridge.Message memory message;
- message.destChainId = destChainId;
- message.owner = msg.sender;
- message.to = to;
- message.gasLimit = gasLimit;
- message.processingFee = processingFee;
- message.depositValue = msg.value - processingFee;
- message.refundAddress = refundAddress;
- message.memo = memo;
-
- // prevent future PRs from changing the callValue when it must be zero
- if (message.callValue != 0) revert TOKENVAULT_INVALID_CALL_VALUE();
-
- bytes32 msgHash = IBridge(resolve("bridge", false)).sendMessage{
- value: msg.value
- }(message);
-
- emit EtherSent({
- msgHash: msgHash,
- from: message.owner,
- to: message.to,
- destChainId: destChainId,
- amount: message.depositValue
- });
- }
-
/**
* Transfers ERC20 tokens to this vault and sends a message to the
* destination chain so the user can receive the same amount of tokens
@@ -388,7 +338,10 @@ contract TokenVault is EssentialContract {
bridgedToken = Create2Upgradeable.deploy(
0, // amount of Ether to send
keccak256(
- abi.encodePacked(canonicalToken.chainId, canonicalToken.addr)
+ bytes.concat(
+ bytes32(canonicalToken.chainId),
+ bytes32(uint256(uint160(canonicalToken.addr)))
+ )
),
type(BridgedERC20).creationCode
);
@@ -399,14 +352,11 @@ contract TokenVault is EssentialContract {
_srcChainId: canonicalToken.chainId,
_decimals: canonicalToken.decimals,
_symbol: canonicalToken.symbol,
- _name: string(
- abi.encodePacked(
- canonicalToken.name,
- "(bridged",
- hex"F09F8C88", // 🌈
- canonicalToken.chainId,
- ")"
- )
+ _name: string.concat(
+ canonicalToken.name,
+ unicode"(bridged🌈",
+ Strings.toString(canonicalToken.chainId),
+ ")"
)
});
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeData.sol b/packages/protocol/contracts/bridge/libs/LibBridgeData.sol
index 0a16cc06a5c..a48d62593cb 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeData.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeData.sol
@@ -7,10 +7,10 @@
pragma solidity ^0.8.18;
import {AddressResolver} from "../../common/AddressResolver.sol";
+import {BlockHeader} from "../../libs/LibBlockHeader.sol";
+import {IBridge} from "../IBridge.sol";
import {LibAddress} from "../../libs/LibAddress.sol";
-import {LibBlockHeader, BlockHeader} from "../../libs/LibBlockHeader.sol";
import {LibMath} from "../../libs/LibMath.sol";
-import {IBridge} from "../IBridge.sol";
/**
* Stores message metadata on the Bridge.
@@ -38,12 +38,11 @@ library LibBridgeData {
event DestChainEnabled(uint256 indexed chainId, bool enabled);
/**
- * @return msgHash The keccak256 hash of the message encoded with
- * "TAIKO_BRIDGE_MESSAGE".
+ * @return msgHash The keccak256 hash of the message.
*/
function hashMessage(
IBridge.Message memory message
) internal pure returns (bytes32) {
- return keccak256(abi.encode("TAIKO_BRIDGE_MESSAGE", message));
+ return keccak256(abi.encode(message));
}
}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol b/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol
index 5bfff9dc5ce..85501323e7d 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeInvoke.sol
@@ -6,7 +6,9 @@
pragma solidity ^0.8.18;
-import {LibBridgeData, IBridge, LibAddress} from "./LibBridgeData.sol";
+import {IBridge} from "../IBridge.sol";
+import {LibAddress} from "../../libs/LibAddress.sol";
+import {LibBridgeData} from "./LibBridgeData.sol";
library LibBridgeInvoke {
using LibAddress for address;
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol b/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol
index f5dcdfeac5d..17b205284d2 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeProcess.sol
@@ -6,15 +6,15 @@
pragma solidity ^0.8.18;
-import {ISignalService} from "../../signal/ISignalService.sol";
+import {AddressResolver} from "../../common/AddressResolver.sol";
import {EtherVault} from "../EtherVault.sol";
+import {IBridge} from "../IBridge.sol";
+import {ISignalService} from "../../signal/ISignalService.sol";
+import {LibAddress} from "../../libs/LibAddress.sol";
import {LibBridgeData} from "./LibBridgeData.sol";
import {LibBridgeInvoke} from "./LibBridgeInvoke.sol";
import {LibBridgeStatus} from "./LibBridgeStatus.sol";
import {LibMath} from "../../libs/LibMath.sol";
-import {LibAddress} from "../../libs/LibAddress.sol";
-import {IBridge} from "../IBridge.sol";
-import {AddressResolver} from "../../common/AddressResolver.sol";
/**
* Process bridge messages on the destination chain.
@@ -27,8 +27,8 @@ library LibBridgeProcess {
using LibBridgeData for LibBridgeData.State;
error B_FORBIDDEN();
- error B_STATUS_MISMTACH();
error B_SIGNAL_NOT_RECEIVED();
+ error B_STATUS_MISMTACH();
error B_WRONG_CHAIN_ID();
/**
@@ -97,9 +97,7 @@ library LibBridgeProcess {
}
// We send the Ether before the message call in case the call will
// actually consume Ether.
- if (message.depositValue > 0) {
- message.owner.sendEther(message.depositValue);
- }
+ message.owner.sendEther(message.depositValue);
LibBridgeStatus.MessageStatus status;
uint256 refundAmount;
@@ -117,7 +115,6 @@ library LibBridgeProcess {
? gasleft()
: message.gasLimit;
- // this will call receiveERC20 on the tokenVault, sending the tokens to the user
bool success = LibBridgeInvoke.invokeMessageCall({
state: state,
message: message,
@@ -129,9 +126,7 @@ library LibBridgeProcess {
status = LibBridgeStatus.MessageStatus.DONE;
} else {
status = LibBridgeStatus.MessageStatus.RETRIABLE;
- if (ethVault != address(0)) {
- ethVault.sendEther(message.callValue);
- }
+ ethVault.sendEther(message.callValue);
}
}
@@ -144,7 +139,8 @@ library LibBridgeProcess {
// if sender is the refundAddress
if (msg.sender == refundAddress) {
- refundAddress.sendEther(message.processingFee + refundAmount);
+ uint256 amount = message.processingFee + refundAmount;
+ refundAddress.sendEther(amount);
} else {
// if sender is another address (eg. the relayer)
// First attempt relayer is rewarded the processingFee
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeRelease.sol b/packages/protocol/contracts/bridge/libs/LibBridgeRelease.sol
index 77314312b18..6be97cb6ed2 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeRelease.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeRelease.sol
@@ -6,20 +6,20 @@
pragma solidity ^0.8.18;
+import {AddressResolver} from "../../common/AddressResolver.sol";
import {EtherVault} from "../EtherVault.sol";
+import {IBridge} from "../IBridge.sol";
import {LibBridgeData} from "./LibBridgeData.sol";
import {LibBridgeStatus} from "./LibBridgeStatus.sol";
-import {IBridge} from "../IBridge.sol";
-import {AddressResolver} from "../../common/AddressResolver.sol";
library LibBridgeRelease {
using LibBridgeData for IBridge.Message;
- error B_OWNER_IS_NULL();
- error B_WRONG_CHAIN_ID();
error B_ETHER_RELEASED_ALREADY();
- error B_MSG_NOT_FAILED();
error B_FAILED_TRANSFER();
+ error B_MSG_NOT_FAILED();
+ error B_OWNER_IS_NULL();
+ error B_WRONG_CHAIN_ID();
event EtherReleased(bytes32 indexed msgHash, address to, uint256 amount);
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol b/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol
index 9bbee27c901..af8143b7fee 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeRetry.sol
@@ -6,13 +6,13 @@
pragma solidity ^0.8.18;
+import {AddressResolver} from "../../common/AddressResolver.sol";
import {EtherVault} from "../EtherVault.sol";
-import {LibBridgeInvoke} from "./LibBridgeInvoke.sol";
+import {IBridge} from "../IBridge.sol";
+import {LibAddress} from "../../libs/LibAddress.sol";
import {LibBridgeData} from "./LibBridgeData.sol";
+import {LibBridgeInvoke} from "./LibBridgeInvoke.sol";
import {LibBridgeStatus} from "./LibBridgeStatus.sol";
-import {LibAddress} from "../../libs/LibAddress.sol";
-import {IBridge} from "../IBridge.sol";
-import {AddressResolver} from "../../common/AddressResolver.sol";
/**
* Retry bridge messages.
@@ -91,7 +91,7 @@ library LibBridgeRetry {
: message.refundAddress;
refundAddress.sendEther(message.callValue);
- } else if (ethVault != address(0)) {
+ } else {
ethVault.sendEther(message.callValue);
}
}
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol b/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol
index a38fa0425f7..3d1de931337 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeSend.sol
@@ -7,10 +7,10 @@
pragma solidity ^0.8.18;
import {AddressResolver} from "../../common/AddressResolver.sol";
-import {LibAddress} from "../../libs/LibAddress.sol";
+import {IBridge} from "../IBridge.sol";
import {ISignalService} from "../../signal/ISignalService.sol";
+import {LibAddress} from "../../libs/LibAddress.sol";
import {LibBridgeData} from "./LibBridgeData.sol";
-import {IBridge} from "../IBridge.sol";
/**
* Entry point for starting a bridge transaction.
@@ -21,10 +21,10 @@ library LibBridgeSend {
using LibAddress for address;
using LibBridgeData for IBridge.Message;
+ error B_INCORRECT_VALUE();
error B_OWNER_IS_NULL();
error B_WRONG_CHAIN_ID();
error B_WRONG_TO_ADDRESS();
- error B_INCORRECT_VALUE();
/**
* Send a message to the Bridge with the details of the request. The Bridge
@@ -74,9 +74,7 @@ library LibBridgeSend {
// store it here on the Bridge. Processing will release Ether from the
// EtherVault or the Bridge on the destination chain.
address ethVault = resolver.resolve("ether_vault", true);
- if (ethVault != address(0)) {
- ethVault.sendEther(expectedAmount);
- }
+ ethVault.sendEther(expectedAmount);
message.id = state.nextMessageId++;
message.sender = msg.sender;
diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol b/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol
index dddff1d5534..c6a91d29b47 100644
--- a/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol
+++ b/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol
@@ -7,10 +7,10 @@
pragma solidity ^0.8.18;
import {AddressResolver} from "../../common/AddressResolver.sol";
-import {IHeaderSync} from "../../common/IHeaderSync.sol";
-import {LibBlockHeader, BlockHeader} from "../../libs/LibBlockHeader.sol";
-import {LibTrieProof} from "../../libs/LibTrieProof.sol";
+import {BlockHeader, LibBlockHeader} from "../../libs/LibBlockHeader.sol";
+import {IXchainSync} from "../../common/IXchainSync.sol";
import {LibBridgeData} from "./LibBridgeData.sol";
+import {LibTrieProof} from "../../libs/LibTrieProof.sol";
library LibBridgeStatus {
using LibBlockHeader for BlockHeader;
@@ -28,8 +28,8 @@ library LibBridgeStatus {
address transactor
);
- error B_WRONG_CHAIN_ID();
error B_MSG_HASH_NULL();
+ error B_WRONG_CHAIN_ID();
/**
* @dev If messageStatus is same as in the messageStatus mapping,
@@ -75,8 +75,9 @@ library LibBridgeStatus {
proof,
(LibBridgeData.StatusProof)
);
- bytes32 syncedHeaderHash = IHeaderSync(resolver.resolve("taiko", false))
- .getSyncedHeader(sp.header.height);
+
+ bytes32 syncedHeaderHash = IXchainSync(resolver.resolve("taiko", false))
+ .getXchainBlockHash(sp.header.height);
if (
syncedHeaderHash == 0 ||
@@ -86,7 +87,7 @@ library LibBridgeStatus {
}
return
- LibTrieProof.verify({
+ LibTrieProof.verifyWithAccountProof({
stateRoot: sp.header.stateRoot,
addr: resolver.resolve(destChainId, "bridge", false),
slot: getMessageStatusSlot(msgHash),
@@ -98,7 +99,7 @@ library LibBridgeStatus {
function getMessageStatusSlot(
bytes32 msgHash
) internal pure returns (bytes32) {
- return keccak256(abi.encodePacked("MESSAGE_STATUS", msgHash));
+ return keccak256(bytes.concat(bytes("MESSAGE_STATUS"), msgHash));
}
function _setMessageStatus(bytes32 msgHash, MessageStatus status) private {
diff --git a/packages/protocol/contracts/common/AddressManager.sol b/packages/protocol/contracts/common/AddressManager.sol
new file mode 100644
index 00000000000..fc37b76dd4d
--- /dev/null
+++ b/packages/protocol/contracts/common/AddressManager.sol
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+/* External Imports */
+import {
+ OwnableUpgradeable
+} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
+
+/**
+ * @notice Interface to set and get an address for a name.
+ */
+interface IAddressManager {
+ /**
+ * Changes the address associated with a particular name.
+ * @param domain Uint256 domain to assiciate an address with.
+ * @param name String name to associate an address with.
+ * @param newAddress Address to associate with the name.
+ */
+ function setAddress(
+ uint256 domain,
+ string memory name,
+ address newAddress
+ ) external;
+
+ /**
+ * Retrieves the address associated with a given name.
+ * @param domain Class to retrieve an address for.
+ * @param name Name to retrieve an address for.
+ * @return Address associated with the given name.
+ */
+ function getAddress(
+ uint256 domain,
+ string memory name
+ ) external view returns (address);
+}
+
+/**
+ * @title AddressManager
+ */
+contract AddressManager is OwnableUpgradeable, IAddressManager {
+ mapping(uint256 domain => mapping(bytes32 nameHash => address addr))
+ private addresses;
+
+ event AddressSet(
+ uint256 indexed _domain,
+ string indexed _name,
+ address _newAddress,
+ address _oldAddress
+ );
+
+ /// @dev Initializer to be called after being deployed behind a proxy.
+ function init() external initializer {
+ OwnableUpgradeable.__Ownable_init();
+ }
+
+ function setAddress(
+ uint256 domain,
+ string memory name,
+ address newAddress
+ ) external onlyOwner {
+ address oldAddress = addresses[domain][_stringToBytes32(name)];
+ addresses[domain][_stringToBytes32(name)] = newAddress;
+ emit AddressSet(domain, name, newAddress, oldAddress);
+ }
+
+ function getAddress(
+ uint256 domain,
+ string memory name
+ ) external view returns (address addr) {
+ addr = addresses[domain][_stringToBytes32(name)];
+ }
+
+ function _stringToBytes32(
+ string memory source
+ ) private pure returns (bytes32 result) {
+ if (bytes(source).length == 0) {
+ return 0x0;
+ }
+
+ assembly {
+ result := mload(add(source, 32))
+ }
+ }
+}
diff --git a/packages/protocol/contracts/common/AddressResolver.sol b/packages/protocol/contracts/common/AddressResolver.sol
index f9ff185d03f..668429f0ea0 100644
--- a/packages/protocol/contracts/common/AddressResolver.sol
+++ b/packages/protocol/contracts/common/AddressResolver.sol
@@ -6,8 +6,8 @@
pragma solidity ^0.8.18;
+import {IAddressManager} from "./AddressManager.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
-import {IAddressManager} from "./IAddressManager.sol";
/**
* This abstract contract provides a name-to-address lookup. Under the hood,
@@ -79,18 +79,14 @@ abstract contract AddressResolver {
string memory name,
bool allowZeroAddress
) private view returns (address payable addr) {
- bytes memory key = abi.encodePacked(
- Strings.toString(chainId),
- ".",
- name
- );
- addr = payable(_addressManager.getAddress(string(key)));
+ addr = payable(_addressManager.getAddress(chainId, name));
+
if (!allowZeroAddress) {
// We do not use custom error so this string-based
// error message is more helpful for diagnosis.
require(
addr != address(0),
- string(abi.encodePacked("AR:zeroAddr:", key))
+ string(abi.encode("AR:zeroAddr:", chainId, ".", name))
);
}
}
diff --git a/packages/protocol/contracts/common/IAddressManager.sol b/packages/protocol/contracts/common/IAddressManager.sol
deleted file mode 100644
index 6f90c7c757e..00000000000
--- a/packages/protocol/contracts/common/IAddressManager.sol
+++ /dev/null
@@ -1,29 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-/**
- * @notice Interface to set and get an address for a name.
- */
-interface IAddressManager {
- /**
- * @notice Associate an address to a name.
- * @dev The original address associated with the name, if exists, will be
- * replaced.
- * @param name The name which an address will be associated with.
- * @param addr The address to be associated with the given name.
- */
- function setAddress(string memory name, address addr) external;
-
- /**
- * @notice Returns the address associated with the given name.
- * @param name The name for which an address will be returned.
- * @return The address associated with the given name. If no address is
- * found, `address(0)` will be returned.
- */
- function getAddress(string memory name) external view returns (address);
-}
diff --git a/packages/protocol/contracts/common/IHeaderSync.sol b/packages/protocol/contracts/common/IHeaderSync.sol
deleted file mode 100644
index 741d26e1307..00000000000
--- a/packages/protocol/contracts/common/IHeaderSync.sol
+++ /dev/null
@@ -1,19 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-/**
- * Interface implemented by both the TaikoL1 and TaikoL2 contracts. It exposes
- * the methods needed to access the block hashes of the other chain.
- */
-interface IHeaderSync {
- event HeaderSynced(uint256 indexed srcHeight, bytes32 srcHash);
-
- function getSyncedHeader(uint256 number) external view returns (bytes32);
-
- function getLatestSyncedHeader() external view returns (bytes32);
-}
diff --git a/packages/protocol/contracts/common/IXchainSync.sol b/packages/protocol/contracts/common/IXchainSync.sol
new file mode 100644
index 00000000000..26a21e375da
--- /dev/null
+++ b/packages/protocol/contracts/common/IXchainSync.sol
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+/**
+ * Interface implemented by both the TaikoL1 and TaikoL2 contracts. It exposes
+ * the methods needed to access the block hashes of the other chain.
+ */
+
+interface IXchainSync {
+ event XchainSynced(
+ uint256 indexed srcHeight,
+ bytes32 blockHash,
+ bytes32 signalRoot
+ );
+
+ /**
+ * @notice Returns the cross-chain block hash at the given block number.
+ * @param number The block number. Use 0 for the latest block.
+ * @return The cross-chain block hash.
+ */
+ function getXchainBlockHash(uint256 number) external view returns (bytes32);
+
+ /**
+ * @notice Returns the cross-chain signal service storage root at the given
+ * block number.
+ * @param number The block number. Use 0 for the latest block.
+ * @return The cross-chain signal service storage root.
+ */
+ function getXchainSignalRoot(
+ uint256 number
+ ) external view returns (bytes32);
+}
diff --git a/packages/protocol/contracts/libs/Lib1559Math.sol b/packages/protocol/contracts/libs/Lib1559Math.sol
index dc67773aeab..e36c838a91d 100644
--- a/packages/protocol/contracts/libs/Lib1559Math.sol
+++ b/packages/protocol/contracts/libs/Lib1559Math.sol
@@ -6,68 +6,60 @@
pragma solidity ^0.8.18;
-/**
- * @notice This library offers two functions for EIP-1559-style math.
- * See more at https://dankradfeist.de/ethereum/2022/03/16/exponential-eip1559.html
- */
+import {LibFixedPointMath} from "../thirdparty/LibFixedPointMath.sol";
+import {
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+
library Lib1559Math {
- /**
- * @notice Calculates and returns the next round's target value using the equation below:
- *
- * `nextTarget = prevTarget * ((A-1) * T + prevMeasured / (A * T)`
- * which implies if `prevMeasured` is larger than `T`, `nextTarget` will
- * become larger than `prevTarget`.
- *
- * @param prevTarget The previous round's target value.
- * @param prevMeasured The previous round's measured value. It must be in the same unit as `T`.
- * @param T The base target value. It must be in the same unit as `prevMeasured`.
- * @param A The adjustment factor. Bigger values change the next round's target more slowly.
- * @return nextTarget The next round's target value.
- */
- function adjustTarget(
- uint256 prevTarget,
- uint256 prevMeasured,
- uint256 T,
- uint256 A
- ) internal pure returns (uint256 nextTarget) {
- assert(prevTarget != 0 && T != 0 && A > 1);
+ using SafeCastUpgradeable for uint256;
- uint256 x = prevTarget * ((A - 1) * T + prevMeasured);
- uint256 y = A * T;
- nextTarget = x / y;
+ error M1559_UNEXPECTED_CHANGE(uint64 expected, uint64 actual);
+ error M1559_OUT_OF_STOCK();
- if (nextTarget == 0) {
- nextTarget = prevTarget;
- }
- }
+ function calculateScales(
+ uint64 xExcessMax,
+ uint64 price,
+ uint64 target,
+ uint64 ratio2x1x
+ ) internal pure returns (uint128 xscale, uint128 yscale) {
+ assert(xExcessMax != 0);
+ uint64 x = xExcessMax / 2;
+
+ // calculate xscale
+ xscale = LibFixedPointMath.MAX_EXP_INPUT / xExcessMax;
- /**
- * @notice Calculates and returns the next round's target value using the equation below:
- *
- * `nextTarget = prevTarget * A * T / ((A-1) * T + prevMeasured)`
- * which implies if `prevMeasured` is larger than `T`, `nextTarget` will
- * become smaller than `prevTarget`.
- *
- * @param prevTarget The previous round's target value.
- * @param prevMeasured The previous round's measured value. It must be in the same unit as `T`.
- * @param T The base target value. It must be in the same unit as `prevMeasured`.
- * @param A The adjustment factor. Bigger values change the next round's target more slowly.
- * @return nextTarget The next round's target value.
- */
- function adjustTargetReverse(
- uint256 prevTarget,
- uint256 prevMeasured,
- uint256 T,
- uint256 A
- ) internal pure returns (uint256 nextTarget) {
- assert(prevTarget != 0 && T != 0 && A > 1);
+ // calculate yscale
+ yscale = calculatePrice(xscale, price, x, target).toUint128();
- uint256 x = prevTarget * A * T;
- uint256 y = (A - 1) * T + prevMeasured;
- nextTarget = x / y;
+ // Verify the gas price ratio between two blocks, one has
+ // 2*target gas and the other one has target gas.
+ uint256 price1x = calculatePrice(xscale, yscale, x, target);
+ uint256 price2x = calculatePrice(xscale, yscale, x, target * 2);
+ uint64 ratio = uint64((price2x * 10000) / price1x);
+
+ if (ratio2x1x != ratio)
+ revert M1559_UNEXPECTED_CHANGE(ratio2x1x, ratio);
+ }
+
+ function calculatePrice(
+ uint128 xscale,
+ uint128 yscale,
+ uint64 xExcess,
+ uint64 xPurchase
+ ) internal pure returns (uint256) {
+ assert(xscale != 0 && yscale != 0);
+ uint64 _xPurchase = xPurchase == 0 ? 1 : xPurchase;
+ uint256 _before = _calcY(xExcess, xscale);
+ uint256 _after = _calcY(xExcess + _xPurchase, xscale);
+ return (_after - _before) / _xPurchase / yscale;
+ }
- if (nextTarget == 0) {
- nextTarget = prevTarget;
+ function _calcY(uint256 x, uint128 xscale) private pure returns (uint256) {
+ uint256 _x = x * xscale;
+ if (_x >= LibFixedPointMath.MAX_EXP_INPUT) {
+ revert M1559_OUT_OF_STOCK();
}
+ return uint256(LibFixedPointMath.exp(int256(_x)));
}
}
diff --git a/packages/protocol/contracts/libs/LibAddress.sol b/packages/protocol/contracts/libs/LibAddress.sol
index b1a625dad75..314c3d4c0ab 100644
--- a/packages/protocol/contracts/libs/LibAddress.sol
+++ b/packages/protocol/contracts/libs/LibAddress.sol
@@ -18,10 +18,9 @@ library LibAddress {
* @param amount The amount of Ether to send.
*/
function sendEther(address to, uint256 amount) internal {
- if (amount > 0) {
- (bool success, ) = payable(to).call{value: amount}("");
- require(success, "ETH transfer failed");
- }
+ if (amount == 0 || to == address(0)) return;
+ (bool success, ) = payable(to).call{value: amount}("");
+ require(success, "ETH transfer failed");
}
function codeHash(address addr) internal view returns (bytes32 codehash) {
diff --git a/packages/protocol/contracts/libs/LibBlockHeader.sol b/packages/protocol/contracts/libs/LibBlockHeader.sol
index 4525b8cb5fa..697fa11a573 100644
--- a/packages/protocol/contracts/libs/LibBlockHeader.sol
+++ b/packages/protocol/contracts/libs/LibBlockHeader.sol
@@ -29,7 +29,7 @@ struct BlockHeader {
}
library LibBlockHeader {
- bytes32 private constant EMPTY_OMMERS_HASH =
+ bytes32 public constant EMPTY_OMMERS_HASH =
0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347;
function hashBlockHeader(
@@ -81,17 +81,4 @@ library LibBlockHeader {
list[16] = LibRLPWriter.writeHash(header.withdrawalsRoot);
}
}
-
- function isPartiallyValidForTaiko(
- uint256 blockMaxGasLimit,
- BlockHeader calldata header
- ) internal pure returns (bool) {
- return
- header.parentHash != 0 &&
- header.ommersHash == EMPTY_OMMERS_HASH &&
- header.gasLimit <= blockMaxGasLimit &&
- header.extraData.length <= 32 &&
- header.difficulty == 0 &&
- header.nonce == 0;
- }
}
diff --git a/packages/protocol/contracts/libs/LibInvalidTxList.sol b/packages/protocol/contracts/libs/LibInvalidTxList.sol
deleted file mode 100644
index cb688031fdc..00000000000
--- a/packages/protocol/contracts/libs/LibInvalidTxList.sol
+++ /dev/null
@@ -1,106 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {TaikoData} from "../L1/TaikoData.sol";
-import {LibTxDecoder} from "../libs/LibTxDecoder.sol";
-import {LibTxUtils} from "../libs/LibTxUtils.sol";
-import {LibRLPReader} from "../thirdparty/LibRLPReader.sol";
-import {LibRLPWriter} from "../thirdparty/LibRLPWriter.sol";
-
-/**
- * A library to invalidate a txList using the following rules:
- *
- * A txList is valid if and only if:
- * 1. The txList's length is no more than `maxBytesPerTxList`.
- * 2. The txList is well-formed RLP, with no additional trailing bytes.
- * 3. The total number of transactions is no more than
- * `maxTransactionsPerBlock`.
- * 4. The sum of all transaction gas limit is no more than
- * `blockMaxGasLimit`.
- *
- * A transaction is valid if and only if:
- * 1. The transaction is well-formed RLP, with no additional trailing bytes
- * (rule #1 in Ethereum yellow paper).
- * 2. The transaction's signature is valid (rule #2 in Ethereum yellow paper).
- * 3. The transaction's the gas limit is no smaller than the intrinsic gas
- * `minTxGasLimit` (rule #5 in Ethereum yellow paper).
- *
- * @title LibInvalidTxList
- */
-library LibInvalidTxList {
- // NOTE: If the order of this enum changes, then some test cases that using
- // this enum in generate_genesis.test.ts may also needs to be
- // modified accordingly.
- error ERR_PARAMS_NOT_DEFAULTS();
- error ERR_INVALID_TX_IDX();
- error ERR_INVALID_HINT();
- error ERR_VERIFICATION_FAILURE();
-
- enum Hint {
- NONE,
- TX_INVALID_SIG,
- TX_GAS_LIMIT_TOO_SMALL
- }
-
- function verifyTxListInvalid(
- TaikoData.Config memory config,
- bytes calldata encoded,
- Hint hint,
- uint256 txIdx
- ) internal pure {
- if (encoded.length > config.maxBytesPerTxList) {
- _checkParams(hint, txIdx);
- return;
- }
-
- try LibTxDecoder.decodeTxList(config.chainId, encoded) returns (
- LibTxDecoder.TxList memory txList
- ) {
- if (txList.items.length > config.maxTransactionsPerBlock) {
- _checkParams(hint, txIdx);
- return;
- }
-
- if (LibTxDecoder.sumGasLimit(txList) > config.blockMaxGasLimit) {
- _checkParams(hint, txIdx);
- return;
- }
-
- if (txIdx >= txList.items.length) {
- revert ERR_INVALID_TX_IDX();
- }
-
- LibTxDecoder.Tx memory _tx = txList.items[txIdx];
-
- if (hint == Hint.TX_INVALID_SIG) {
- if (
- LibTxUtils.recoverSender(config.chainId, _tx) != address(0)
- ) {
- revert ERR_INVALID_HINT();
- }
- return;
- }
-
- if (hint == Hint.TX_GAS_LIMIT_TOO_SMALL) {
- if (_tx.gasLimit >= config.minTxGasLimit) {
- revert ERR_INVALID_HINT();
- }
- return;
- }
-
- revert ERR_VERIFICATION_FAILURE();
- } catch (bytes memory) {
- _checkParams(hint, txIdx);
- }
- }
-
- // Checks hint and txIdx both have 0 values.
- function _checkParams(Hint hint, uint256 txIdx) private pure {
- if (hint != Hint.NONE || txIdx != 0) revert ERR_PARAMS_NOT_DEFAULTS();
- }
-}
diff --git a/packages/protocol/contracts/libs/LibMath.sol b/packages/protocol/contracts/libs/LibMath.sol
index da96e245c53..e6f20e92d95 100644
--- a/packages/protocol/contracts/libs/LibMath.sol
+++ b/packages/protocol/contracts/libs/LibMath.sol
@@ -30,39 +30,4 @@ library LibMath {
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
-
- /**
- * @notice Returns the ceil value.
- * @param a The numerator.
- * @param b The denominator.
- * @return c The ceil value of (a/b).
- */
- function divceil(uint256 a, uint256 b) internal pure returns (uint256 c) {
- c = a / b;
- if (c * b < a) {
- c += 1;
- }
- }
-
- /**
- * @notice Returns the square root of a given uint256.
- * This method is taken from:
- * https://github.com/Uniswap/v2-core/blob/v1.0.1/contracts/libraries/Math.sol.
- * It is based on the Babylonian method:
- * https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method).
- * @param y The given number.
- * @return z The square root of y.
- */
- function sqrt(uint256 y) internal pure returns (uint256 z) {
- if (y > 3) {
- z = y;
- uint256 x = y / 2 + 1;
- while (x < z) {
- z = x;
- x = (y / x + x) / 2;
- }
- } else if (y != 0) {
- z = 1;
- }
- }
}
diff --git a/packages/protocol/contracts/libs/LibReceiptDecoder.sol b/packages/protocol/contracts/libs/LibReceiptDecoder.sol
deleted file mode 100644
index ea564d6d3a6..00000000000
--- a/packages/protocol/contracts/libs/LibReceiptDecoder.sol
+++ /dev/null
@@ -1,83 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {LibBytesUtils} from "../thirdparty/LibBytesUtils.sol";
-import {LibRLPReader} from "../thirdparty/LibRLPReader.sol";
-
-library LibReceiptDecoder {
- struct Receipt {
- uint64 status;
- uint64 cumulativeGasUsed;
- bytes32[8] logsBloom;
- Log[] logs;
- }
-
- struct Log {
- address contractAddress;
- bytes32[] topics;
- bytes data;
- }
-
- function decodeReceipt(
- bytes calldata encoded
- ) public pure returns (Receipt memory receipt) {
- // Non-legacy transaction receipts should first remove the type prefix.
- LibRLPReader.RLPItem[] memory rlpItems = LibRLPReader.readList(
- encoded[0] >= 0x0 && encoded[0] <= 0x7f
- ? LibBytesUtils.slice(encoded, 1)
- : encoded
- );
-
- require(rlpItems.length == 4, "invalid items length");
-
- receipt.status = uint64(LibRLPReader.readUint256(rlpItems[0]));
- receipt.cumulativeGasUsed = uint64(
- LibRLPReader.readUint256(rlpItems[1])
- );
- receipt.logsBloom = decodeLogsBloom(rlpItems[2]);
- receipt.logs = decodeLogs(LibRLPReader.readList(rlpItems[3]));
- }
-
- function decodeLogsBloom(
- LibRLPReader.RLPItem memory logsBloomRlp
- ) internal pure returns (bytes32[8] memory logsBloom) {
- bytes memory bloomBytes = LibRLPReader.readBytes(logsBloomRlp);
- require(bloomBytes.length == 256, "invalid logs bloom");
-
- return abi.decode(bloomBytes, (bytes32[8]));
- }
-
- function decodeLogs(
- LibRLPReader.RLPItem[] memory logsRlp
- ) internal pure returns (Log[] memory) {
- Log[] memory logs = new Log[](logsRlp.length);
-
- for (uint256 i; i < logsRlp.length; ++i) {
- LibRLPReader.RLPItem[] memory rlpItems = LibRLPReader.readList(
- logsRlp[i]
- );
- logs[i].contractAddress = LibRLPReader.readAddress(rlpItems[0]);
- logs[i].topics = decodeTopics(LibRLPReader.readList(rlpItems[1]));
- logs[i].data = LibRLPReader.readBytes(rlpItems[2]);
- }
-
- return logs;
- }
-
- function decodeTopics(
- LibRLPReader.RLPItem[] memory topicsRlp
- ) internal pure returns (bytes32[] memory) {
- bytes32[] memory topics = new bytes32[](topicsRlp.length);
-
- for (uint256 i; i < topicsRlp.length; ++i) {
- topics[i] = LibRLPReader.readBytes32(topicsRlp[i]);
- }
-
- return topics;
- }
-}
diff --git a/packages/protocol/contracts/libs/LibSharedConfig.sol b/packages/protocol/contracts/libs/LibSharedConfig.sol
deleted file mode 100644
index 53e028a611b..00000000000
--- a/packages/protocol/contracts/libs/LibSharedConfig.sol
+++ /dev/null
@@ -1,44 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {TaikoData} from "../L1/TaikoData.sol";
-
-library LibSharedConfig {
- /// Returns shared configs for both TaikoL1 and TaikoL2 for production.
- function getConfig() internal pure returns (TaikoData.Config memory) {
- return
- TaikoData.Config({
- chainId: 167,
- maxNumBlocks: 2049, // owner:daniel
- blockHashHistory: 40, // owner:daniel
- maxVerificationsPerTx: 10, //owner:david. Each time one more block is verified, there will be ~20k more gas cost.
- commitConfirmations: 0, // owner:daniel
- blockMaxGasLimit: 6000000, // owner:david. Set it to 6M, since its the upper limit of the Alpha-2 testnet's circuits.
- maxTransactionsPerBlock: 79, // owner:david. Set it to 79 (+1 TaikoL2.anchor transaction = 80), and 80 is the upper limit of the Alpha-2 testnet's circuits.
- maxBytesPerTxList: 120000, // owner:david. Set it to 120KB, since 128KB is the upper size limit of a geth transaction, so using 120KB for the proposed transactions list calldata, 8K for the remaining tx fields.
- minTxGasLimit: 21000, // owner:david
- anchorTxGasLimit: 250000, // owner:david
- slotSmoothingFactor: 946649, // owner:daniel
- rewardBurnBips: 100, // owner:daniel. 100 basis points or 1%
- proposerDepositPctg: 25, // owner:daniel - 25%
- // Moving average factors
- feeBaseMAF: 1024,
- blockTimeMAF: 1024,
- proofTimeMAF: 1024,
- rewardMultiplierPctg: 400, // owner:daniel - 400%
- feeGracePeriodPctg: 200, // owner:daniel - 200%
- feeMaxPeriodPctg: 400, // owner:daniel - 400%
- blockTimeCap: 60 seconds, // owner:daniel
- proofTimeCap: 30 minutes, // owner:daniel
- bootstrapDiscountHalvingPeriod: 1 seconds, // owner:daniel
- enableTokenomics: true,
- enablePublicInputsCheck: true,
- enableAnchorValidation: true
- });
- }
-}
diff --git a/packages/protocol/contracts/libs/LibTrieProof.sol b/packages/protocol/contracts/libs/LibTrieProof.sol
index 44c46ea5cd4..749ddbf048f 100644
--- a/packages/protocol/contracts/libs/LibTrieProof.sol
+++ b/packages/protocol/contracts/libs/LibTrieProof.sol
@@ -27,18 +27,15 @@ library LibTrieProof {
*********************/
/**
- * Verifies that the value of a slot in the storage tree of `addr`
- * is `value`.
+ * Verifies that the value of a slot in the storage of an account is value.
*
- * @param stateRoot The merkle root of state tree.
- * @param addr The contract address.
+ * @param stateRoot The merkle root of state tree..
* @param slot The slot in the contract.
* @param value The value to be verified.
- * @param mkproof The proof obtained by encoding state proof and storage
- * proof.
+ * @param mkproof The proof obtained by encoding storage proof.
* @return verified The verification result.
*/
- function verify(
+ function verifyWithAccountProof(
bytes32 stateRoot,
address addr,
bytes32 slot,
diff --git a/packages/protocol/contracts/libs/LibTxDecoder.sol b/packages/protocol/contracts/libs/LibTxDecoder.sol
deleted file mode 100644
index a7660611c82..00000000000
--- a/packages/protocol/contracts/libs/LibTxDecoder.sol
+++ /dev/null
@@ -1,237 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {LibBytesUtils} from "../thirdparty/LibBytesUtils.sol";
-import {LibRLPReader} from "../thirdparty/LibRLPReader.sol";
-
-library LibTxDecoder {
- struct TransactionLegacy {
- uint256 nonce;
- uint256 gasPrice;
- uint256 gasLimit;
- address destination;
- uint256 amount;
- bytes data;
- uint8 v;
- uint256 r;
- uint256 s;
- }
-
- struct Transaction2930 {
- uint256 chainId;
- uint256 nonce;
- uint256 gasPrice;
- uint256 gasLimit;
- address destination;
- uint256 amount;
- bytes data;
- AccessItem[] accessList;
- uint8 signatureYParity;
- uint256 signatureR;
- uint256 signatureS;
- }
-
- struct Transaction1559 {
- uint256 chainId;
- uint256 nonce;
- uint256 maxPriorityFeePerGas;
- uint256 maxFeePerGas;
- uint256 gasLimit;
- address destination;
- uint256 amount;
- bytes data;
- AccessItem[] accessList;
- uint8 signatureYParity;
- uint256 signatureR;
- uint256 signatureS;
- }
-
- struct AccessItem {
- address addr;
- bytes32[] slots;
- }
-
- struct Tx {
- uint8 txType;
- address destination;
- bytes data;
- uint256 gasLimit;
- uint8 v;
- uint256 r;
- uint256 s;
- bytes txData;
- }
-
- struct TxList {
- Tx[] items;
- }
-
- function decodeTxList(
- uint256 chainId,
- bytes calldata encoded
- ) public pure returns (TxList memory txList) {
- if (encoded.length == 0) {
- return txList;
- }
- LibRLPReader.RLPItem[] memory txs = LibRLPReader.readList(encoded);
-
- Tx[] memory _txList = new Tx[](txs.length);
- for (uint256 i; i < txs.length; ++i) {
- _txList[i] = decodeTx(chainId, LibRLPReader.readBytes(txs[i]));
- }
-
- txList = TxList(_txList);
- }
-
- function decodeTx(
- uint256 chainId,
- bytes memory txBytes
- ) public pure returns (Tx memory _tx) {
- uint8 txType;
- assembly {
- txType := byte(0, mload(add(txBytes, 32)))
- }
-
- _tx.txData = txBytes;
-
- // @see https://eips.ethereum.org/EIPS/eip-2718#backwards-compatibility
- if (txType >= 0xc0 && txType <= 0xfe) {
- // Legacy tx:
- _tx.txType = 0;
- LibRLPReader.RLPItem[] memory txBody = LibRLPReader.readList(
- txBytes
- );
- TransactionLegacy memory txLegacy = decodeLegacyTx(chainId, txBody);
- _tx.gasLimit = txLegacy.gasLimit;
- _tx.destination = txLegacy.destination;
- _tx.v = txLegacy.v;
- _tx.r = txLegacy.r;
- _tx.s = txLegacy.s;
- _tx.data = txLegacy.data;
- } else if (txType <= 0x7f) {
- _tx.txType = txType;
- LibRLPReader.RLPItem[] memory txBody = LibRLPReader.readList(
- LibBytesUtils.slice(txBytes, 1)
- );
-
- if (txType == 1) {
- Transaction2930 memory tx2930 = decodeTx2930(txBody);
- _tx.gasLimit = tx2930.gasLimit;
- _tx.destination = tx2930.destination;
- _tx.v = tx2930.signatureYParity;
- _tx.r = tx2930.signatureR;
- _tx.s = tx2930.signatureS;
- _tx.data = tx2930.data;
- } else if (_tx.txType == 2) {
- Transaction1559 memory tx1559 = decodeTx1559(txBody);
- _tx.gasLimit = tx1559.gasLimit;
- _tx.destination = tx1559.destination;
- _tx.v = tx1559.signatureYParity;
- _tx.r = tx1559.signatureR;
- _tx.s = tx1559.signatureS;
- _tx.data = tx1559.data;
- } else {
- revert("invalid txType");
- }
- } else {
- revert("invalid prefix");
- }
- }
-
- function hashTxList(
- bytes calldata encoded
- ) internal pure returns (bytes32) {
- return keccak256(encoded);
- }
-
- function decodeLegacyTx(
- uint256 chainId,
- LibRLPReader.RLPItem[] memory body
- ) internal pure returns (TransactionLegacy memory txLegacy) {
- require(body.length == 9, "invalid items length");
-
- txLegacy.nonce = LibRLPReader.readUint256(body[0]);
- txLegacy.gasPrice = LibRLPReader.readUint256(body[1]);
- txLegacy.gasLimit = LibRLPReader.readUint256(body[2]);
- txLegacy.destination = LibRLPReader.readAddress(body[3]);
- txLegacy.amount = LibRLPReader.readUint256(body[4]);
- txLegacy.data = LibRLPReader.readBytes(body[5]);
- // EIP-155 is enabled on L2
- txLegacy.v = uint8(
- LibRLPReader.readUint256(body[6]) - chainId * 2 + 35
- );
- txLegacy.r = LibRLPReader.readUint256(body[7]);
- txLegacy.s = LibRLPReader.readUint256(body[8]);
- }
-
- function decodeTx2930(
- LibRLPReader.RLPItem[] memory body
- ) internal pure returns (Transaction2930 memory tx2930) {
- require(body.length == 11, "invalid items length");
-
- tx2930.chainId = LibRLPReader.readUint256(body[0]);
- tx2930.nonce = LibRLPReader.readUint256(body[1]);
- tx2930.gasPrice = LibRLPReader.readUint256(body[2]);
- tx2930.gasLimit = LibRLPReader.readUint256(body[3]);
- tx2930.destination = LibRLPReader.readAddress(body[4]);
- tx2930.amount = LibRLPReader.readUint256(body[5]);
- tx2930.data = LibRLPReader.readBytes(body[6]);
- tx2930.accessList = decodeAccessList(LibRLPReader.readList(body[7]));
- tx2930.signatureYParity = uint8(LibRLPReader.readUint256(body[8]));
- tx2930.signatureR = LibRLPReader.readUint256(body[9]);
- tx2930.signatureS = LibRLPReader.readUint256(body[10]);
- }
-
- function decodeTx1559(
- LibRLPReader.RLPItem[] memory body
- ) internal pure returns (Transaction1559 memory tx1559) {
- require(body.length == 12, "invalid items length");
-
- tx1559.chainId = LibRLPReader.readUint256(body[0]);
- tx1559.nonce = LibRLPReader.readUint256(body[1]);
- tx1559.maxPriorityFeePerGas = LibRLPReader.readUint256(body[2]);
- tx1559.maxFeePerGas = LibRLPReader.readUint256(body[3]);
- tx1559.gasLimit = LibRLPReader.readUint256(body[4]);
- tx1559.destination = LibRLPReader.readAddress(body[5]);
- tx1559.amount = LibRLPReader.readUint256(body[6]);
- tx1559.data = LibRLPReader.readBytes(body[7]);
- tx1559.accessList = decodeAccessList(LibRLPReader.readList(body[8]));
- tx1559.signatureYParity = uint8(LibRLPReader.readUint256(body[9]));
- tx1559.signatureR = LibRLPReader.readUint256(body[10]);
- tx1559.signatureS = LibRLPReader.readUint256(body[11]);
- }
-
- function decodeAccessList(
- LibRLPReader.RLPItem[] memory accessListRLP
- ) internal pure returns (AccessItem[] memory accessList) {
- accessList = new AccessItem[](accessListRLP.length);
- for (uint256 i; i < accessListRLP.length; ++i) {
- LibRLPReader.RLPItem[] memory items = LibRLPReader.readList(
- accessListRLP[i]
- );
- address addr = LibRLPReader.readAddress(items[0]);
- LibRLPReader.RLPItem[] memory slotListRLP = LibRLPReader.readList(
- items[1]
- );
- bytes32[] memory slots = new bytes32[](slotListRLP.length);
- for (uint256 j; j < slotListRLP.length; ++j) {
- slots[j] = LibRLPReader.readBytes32(slotListRLP[j]);
- }
- accessList[i] = AccessItem(addr, slots);
- }
- }
-
- function sumGasLimit(
- TxList memory txList
- ) internal pure returns (uint256 sum) {
- Tx[] memory items = txList.items;
- for (uint256 i; i < items.length; ++i) {
- sum += items[i].gasLimit;
- }
- }
-}
diff --git a/packages/protocol/contracts/libs/LibTxUtils.sol b/packages/protocol/contracts/libs/LibTxUtils.sol
deleted file mode 100644
index eb37d2df7ac..00000000000
--- a/packages/protocol/contracts/libs/LibTxUtils.sol
+++ /dev/null
@@ -1,104 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
-
-import {LibTxDecoder} from "../libs/LibTxDecoder.sol";
-import {LibBytesUtils} from "../thirdparty/LibBytesUtils.sol";
-import {LibRLPReader} from "../thirdparty/LibRLPReader.sol";
-import {LibRLPWriter} from "../thirdparty/LibRLPWriter.sol";
-
-library LibTxUtils {
- function hashUnsignedTx(
- uint256 chainId,
- LibTxDecoder.Tx memory transaction
- )
- internal
- pure
- returns (
- // transaction hash (without signature values)
- bytes32 hash
- )
- {
- LibRLPReader.RLPItem[] memory txRLPItems;
- if (transaction.txType == 0) {
- // Legacy transactions do not have the EIP-2718 type prefix.
- txRLPItems = LibRLPReader.readList(transaction.txData);
- } else {
- txRLPItems = LibRLPReader.readList(
- LibBytesUtils.slice(transaction.txData, 1)
- );
- }
-
- if (transaction.txType == 0) {
- // Legacy transactions
- require(txRLPItems.length == 9, "invalid rlp items");
- } else if (transaction.txType == 1) {
- // EIP-2930 transactions
- require(txRLPItems.length == 11, "invalid rlp items");
- } else if (transaction.txType == 2) {
- // EIP-1559 transactions
- require(txRLPItems.length == 12, "invalid rlp items");
- } else {
- revert("invalid txType");
- }
-
- // Signature values are always last three RLP items for all kinds of
- // transactions.
- bytes[] memory list = new bytes[](
- transaction.txType == 0 ? txRLPItems.length : txRLPItems.length - 3
- );
-
- for (uint256 i; i < list.length; ++i) {
- // For Non-legacy transactions, accessList is always the
- // fourth to last item.
- if (transaction.txType != 0 && i == list.length - 1) {
- list[i] = LibRLPReader.readRawBytes(txRLPItems[i]);
- continue;
- }
-
- list[i] = LibRLPWriter.writeBytes(
- LibRLPReader.readBytes(txRLPItems[i])
- );
-
- // For legacy transactions, there are three more RLP items to
- // encode defined in EIP-155.
- if (transaction.txType == 0 && i == list.length - 4) {
- list[i + 1] = LibRLPWriter.writeUint(chainId);
- list[i + 2] = LibRLPWriter.writeUint64(0);
- list[i + 3] = LibRLPWriter.writeUint64(0);
- break;
- }
- }
-
- bytes memory unsignedTxRlp = LibRLPWriter.writeList(list);
-
- // Add the EIP-2718 type prefix for non-legacy transactions.
- if (transaction.txType != 0) {
- unsignedTxRlp = bytes.concat(
- bytes1(transaction.txType),
- unsignedTxRlp
- );
- }
-
- hash = keccak256(unsignedTxRlp);
- }
-
- function recoverSender(
- uint256 chainId,
- LibTxDecoder.Tx memory transaction
- ) internal pure returns (address) {
- return
- ecrecover(
- hashUnsignedTx(chainId, transaction),
- transaction.v + 27,
- bytes32(transaction.r),
- bytes32(transaction.s)
- );
- }
-}
diff --git a/packages/protocol/contracts/libs/LibZKP.sol b/packages/protocol/contracts/libs/LibZKP.sol
deleted file mode 100644
index c035613dc52..00000000000
--- a/packages/protocol/contracts/libs/LibZKP.sol
+++ /dev/null
@@ -1,31 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-library LibZKP {
- /*********************
- * Public Functions *
- *********************/
-
- function verify(
- address plonkVerifier,
- bytes calldata zkproof,
- bytes32 instance
- ) internal view returns (bool verified) {
- (bool isCallSuccess, bytes memory response) = plonkVerifier.staticcall(
- bytes.concat(
- bytes16(0),
- bytes16(instance), // left 16 bytes of the given instance
- bytes16(0),
- bytes16(uint128(uint256(instance))), // right 16 bytes of the given instance
- zkproof
- )
- );
-
- return isCallSuccess && bytes32(response) == keccak256("taiko");
- }
-}
diff --git a/packages/protocol/contracts/signal/SignalService.sol b/packages/protocol/contracts/signal/SignalService.sol
index d5b62b9581b..9c1525fafa2 100644
--- a/packages/protocol/contracts/signal/SignalService.sol
+++ b/packages/protocol/contracts/signal/SignalService.sol
@@ -7,16 +7,13 @@
pragma solidity ^0.8.18;
import {EssentialContract} from "../common/EssentialContract.sol";
-import {IHeaderSync} from "../common/IHeaderSync.sol";
-import {LibBlockHeader, BlockHeader} from "../libs/LibBlockHeader.sol";
-import {LibTrieProof} from "../libs/LibTrieProof.sol";
import {ISignalService} from "./ISignalService.sol";
+import {IXchainSync} from "../common/IXchainSync.sol";
+import {LibSecureMerkleTrie} from "../thirdparty/LibSecureMerkleTrie.sol";
contract SignalService is ISignalService, EssentialContract {
- using LibBlockHeader for BlockHeader;
-
struct SignalProof {
- BlockHeader header;
+ uint256 height;
bytes proof;
}
@@ -66,33 +63,23 @@ contract SignalService is ISignalService, EssentialContract {
bytes32 signal,
bytes calldata proof
) public view returns (bool) {
- if (srcChainId == block.chainid) {
- revert B_WRONG_CHAIN_ID();
- }
-
- if (app == address(0)) {
- revert B_NULL_APP_ADDR();
- }
-
- if (signal == 0) {
- revert B_ZERO_SIGNAL();
- }
+ if (srcChainId == block.chainid) revert B_WRONG_CHAIN_ID();
+ if (app == address(0)) revert B_NULL_APP_ADDR();
+ if (signal == 0) revert B_ZERO_SIGNAL();
SignalProof memory sp = abi.decode(proof, (SignalProof));
+
// Resolve the TaikoL1 or TaikoL2 contract if on Ethereum or Taiko.
- bytes32 syncedHeaderHash = IHeaderSync(resolve("taiko", false))
- .getSyncedHeader(sp.header.height);
+ bytes32 syncedSignalRoot = IXchainSync(resolve("taiko", false))
+ .getXchainSignalRoot(sp.height);
return
- syncedHeaderHash != 0 &&
- syncedHeaderHash == sp.header.hashBlockHeader() &&
- LibTrieProof.verify({
- stateRoot: sp.header.stateRoot,
- addr: resolve(srcChainId, "signal_service", false),
- slot: getSignalSlot(app, signal),
- value: bytes32(uint256(1)),
- mkproof: sp.proof
- });
+ LibSecureMerkleTrie.verifyInclusionProof(
+ bytes.concat(getSignalSlot(app, signal)),
+ hex"01",
+ sp.proof,
+ syncedSignalRoot
+ );
}
/**
@@ -104,6 +91,20 @@ contract SignalService is ISignalService, EssentialContract {
address app,
bytes32 signal
) public pure returns (bytes32 signalSlot) {
- signalSlot = keccak256(abi.encodePacked(app, signal));
+ // Equivilance to `keccak256(abi.encodePacked(app, signal))`
+ assembly {
+ // Load the free memory pointer and allocate memory for the concatenated arguments
+ let ptr := mload(0x40)
+
+ // Store the app address and signal bytes32 value in the allocated memory
+ mstore(ptr, app)
+ mstore(add(ptr, 32), signal)
+
+ // Calculate the hash of the concatenated arguments using keccak256
+ signalSlot := keccak256(add(ptr, 12), 52)
+
+ // Update free memory pointer
+ mstore(0x40, add(ptr, 64))
+ }
}
}
diff --git a/packages/protocol/contracts/test/L1/TestTaikoL1.sol b/packages/protocol/contracts/test/L1/TestTaikoL1.sol
index 8ec2f5d17f4..dc587b86a73 100644
--- a/packages/protocol/contracts/test/L1/TestTaikoL1.sol
+++ b/packages/protocol/contracts/test/L1/TestTaikoL1.sol
@@ -6,11 +6,11 @@
pragma solidity ^0.8.18;
-import {IProofVerifier} from "../../L1/ProofVerifier.sol";
import {TaikoL1} from "../../L1/TaikoL1.sol";
import {TaikoData} from "../../L1/TaikoData.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
-contract TestTaikoL1 is TaikoL1, IProofVerifier {
+contract TestTaikoL1 is TaikoL1 {
function getConfig()
public
pure
@@ -19,50 +19,14 @@ contract TestTaikoL1 is TaikoL1, IProofVerifier {
{
config.chainId = 167;
// up to 2048 pending blocks
- config.maxNumBlocks = 4;
- config.blockHashHistory = 3;
- // This number is calculated from maxNumBlocks to make
+ config.maxNumProposedBlocks = 4;
+ config.ringBufferSize = 6;
+ // This number is calculated from maxNumProposedBlocks to make
// the 'the maximum value of the multiplier' close to 20.0
config.maxVerificationsPerTx = 0;
- config.commitConfirmations = 1;
- config.blockMaxGasLimit = 30000000; // TODO
- config.maxTransactionsPerBlock = 20; // TODO
- config.maxBytesPerTxList = 10240; // TODO
- config.minTxGasLimit = 21000; // TODO
- config.anchorTxGasLimit = 250000;
- config.slotSmoothingFactor = 590000;
- config.rewardBurnBips = 100; // 100 basis points or 1%
- config.proposerDepositPctg = 25; // 25%
-
- // Moving average factors
- config.feeBaseMAF = 1024;
- config.blockTimeMAF = 64;
- config.proofTimeMAF = 64;
-
- config.rewardMultiplierPctg = 400; // 400%
- config.feeGracePeriodPctg = 125; // 125%
- config.feeMaxPeriodPctg = 375; // 375%
- config.blockTimeCap = 48 seconds;
- config.proofTimeCap = 4 seconds;
- config.bootstrapDiscountHalvingPeriod = 1 seconds;
- config.enableTokenomics = false;
- config.enablePublicInputsCheck = false;
- }
-
- function verifyZKP(
- string memory /*verifierId*/,
- bytes calldata /*zkproof*/,
- bytes32 /*instance*/
- ) public pure override returns (bool) {
- return true;
- }
-
- function verifyMKP(
- bytes memory /*key*/,
- bytes memory /*value*/,
- bytes memory /*proof*/,
- bytes32 /*root*/
- ) public pure override returns (bool) {
- return true;
+ config.blockMaxGasLimit = 30000000;
+ config.maxTransactionsPerBlock = 20;
+ config.maxBytesPerTxList = 120000;
+ config.minTxGasLimit = 21000;
}
}
diff --git a/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol b/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol
index 6e5f561eb7c..40fd9147328 100644
--- a/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol
+++ b/packages/protocol/contracts/test/L1/TestTaikoL1EnableTokenomics.sol
@@ -6,11 +6,11 @@
pragma solidity ^0.8.18;
-import {IProofVerifier} from "../../L1/ProofVerifier.sol";
import {TaikoL1} from "../../L1/TaikoL1.sol";
import {TaikoData} from "../../L1/TaikoData.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
-contract TestTaikoL1EnableTokenomics is TaikoL1, IProofVerifier {
+contract TestTaikoL1EnableTokenomics is TaikoL1 {
function getConfig()
public
pure
@@ -19,51 +19,14 @@ contract TestTaikoL1EnableTokenomics is TaikoL1, IProofVerifier {
{
config.chainId = 167;
// up to 2048 pending blocks
- config.maxNumBlocks = 6;
- config.blockHashHistory = 10;
- // This number is calculated from maxNumBlocks to make
+ config.maxNumProposedBlocks = 6;
+ config.ringBufferSize = 8;
+ // This number is calculated from maxNumProposedBlocks to make
// the 'the maximum value of the multiplier' close to 20.0
config.maxVerificationsPerTx = 0; // dont verify blocks automatically
- config.commitConfirmations = 1;
- config.blockMaxGasLimit = 30000000; // TODO
- config.maxTransactionsPerBlock = 20; // TODO
- config.maxBytesPerTxList = 10240; // TODO
- config.minTxGasLimit = 21000; // TODO
- config.anchorTxGasLimit = 250000;
- config.slotSmoothingFactor = 590000;
- config.rewardBurnBips = 100; // 100 basis points or 1%
- config.proposerDepositPctg = 25; // 25%
-
- // Moving average factors
- config.feeBaseMAF = 1024;
- config.blockTimeMAF = 64;
- config.proofTimeMAF = 64;
-
- config.rewardMultiplierPctg = 400; // 400%
- config.feeGracePeriodPctg = 125; // 125%
- config.feeMaxPeriodPctg = 375; // 375%
- config.blockTimeCap = 48 seconds;
- config.proofTimeCap = 5 seconds;
- config.bootstrapDiscountHalvingPeriod = 1 seconds;
- config.enableTokenomics = true;
- config.enablePublicInputsCheck = false;
- config.enableAnchorValidation = false;
- }
-
- function verifyZKP(
- string memory /*verifierId*/,
- bytes calldata /*zkproof*/,
- bytes32 /*instance*/
- ) public pure override returns (bool) {
- return true;
- }
-
- function verifyMKP(
- bytes memory /*key*/,
- bytes memory /*value*/,
- bytes memory /*proof*/,
- bytes32 /*root*/
- ) public pure override returns (bool) {
- return true;
+ config.blockMaxGasLimit = 30000000;
+ config.maxTransactionsPerBlock = 20;
+ config.maxBytesPerTxList = 120000;
+ config.minTxGasLimit = 21000;
}
}
diff --git a/packages/protocol/contracts/test/L1/TestTaikoL2.sol b/packages/protocol/contracts/test/L1/TestTaikoL2.sol
deleted file mode 100644
index 0dc2684e012..00000000000
--- a/packages/protocol/contracts/test/L1/TestTaikoL2.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {TaikoL2} from "../../L2/TaikoL2.sol";
-import {TaikoData} from "../../L1/TaikoData.sol";
-
-contract TestTaikoL2 is TaikoL2 {
- constructor(address _addressManager) TaikoL2(_addressManager) {}
-
- function getConfig()
- public
- pure
- override
- returns (TaikoData.Config memory config)
- {
- config.chainId = 167;
- // up to 2048 pending blocks
- config.maxNumBlocks = 4;
- config.blockHashHistory = 3;
- // This number is calculated from maxNumBlocks to make
- // the 'the maximum value of the multiplier' close to 20.0
- config.maxVerificationsPerTx = 2;
- config.commitConfirmations = 1;
- config.blockMaxGasLimit = 30000000; // TODO
- config.maxTransactionsPerBlock = 20; // TODO
- config.maxBytesPerTxList = 10240; // TODO
- config.minTxGasLimit = 21000; // TODO
- config.anchorTxGasLimit = 250000;
- config.slotSmoothingFactor = 590000;
- config.rewardBurnBips = 100; // 100 basis points or 1%
- config.proposerDepositPctg = 25; // 25%
-
- // Moving average factors
- config.feeBaseMAF = 1024;
- config.blockTimeMAF = 64;
- config.proofTimeMAF = 64;
-
- config.rewardMultiplierPctg = 400; // 400%
- config.feeGracePeriodPctg = 125; // 125%
- config.feeMaxPeriodPctg = 375; // 375%
- config.blockTimeCap = 48 seconds;
- config.proofTimeCap = 60 minutes;
- config.bootstrapDiscountHalvingPeriod = 1 seconds;
- config.enableTokenomics = true;
- config.enablePublicInputsCheck = false;
- config.enableAnchorValidation = false;
- }
-}
diff --git a/packages/protocol/contracts/test/L1/TestTaikoL2EnablePublicInputsCheck.sol b/packages/protocol/contracts/test/L1/TestTaikoL2EnablePublicInputsCheck.sol
deleted file mode 100644
index 9856a7fe251..00000000000
--- a/packages/protocol/contracts/test/L1/TestTaikoL2EnablePublicInputsCheck.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {TaikoL2} from "../../L2/TaikoL2.sol";
-import {TaikoData} from "../../L1/TaikoData.sol";
-
-contract TestTaikoL2EnablePublicInputsCheck is TaikoL2 {
- constructor(address _addressManager) TaikoL2(_addressManager) {}
-
- function getConfig()
- public
- pure
- override
- returns (TaikoData.Config memory config)
- {
- config.chainId = 167;
- // up to 2048 pending blocks
- config.maxNumBlocks = 4;
- config.blockHashHistory = 3;
- // This number is calculated from maxNumBlocks to make
- // the 'the maximum value of the multiplier' close to 20.0
- config.maxVerificationsPerTx = 2;
- config.commitConfirmations = 1;
- config.blockMaxGasLimit = 30000000; // TODO
- config.maxTransactionsPerBlock = 20; // TODO
- config.maxBytesPerTxList = 10240; // TODO
- config.minTxGasLimit = 21000; // TODO
- config.anchorTxGasLimit = 250000;
- config.slotSmoothingFactor = 590000;
- config.rewardBurnBips = 100; // 100 basis points or 1%
- config.proposerDepositPctg = 25; // 25%
-
- // Moving average factors
- config.feeBaseMAF = 1024;
- config.blockTimeMAF = 64;
- config.proofTimeMAF = 64;
-
- config.rewardMultiplierPctg = 400; // 400%
- config.feeGracePeriodPctg = 125; // 125%
- config.feeMaxPeriodPctg = 375; // 375%
- config.blockTimeCap = 48 seconds;
- config.proofTimeCap = 60 minutes;
- config.bootstrapDiscountHalvingPeriod = 1 seconds;
- config.enableTokenomics = true;
- config.enablePublicInputsCheck = true;
- config.enableAnchorValidation = true;
- }
-}
diff --git a/packages/protocol/contracts/test/TestContracts.sol b/packages/protocol/contracts/test/TestContracts.sol
new file mode 100644
index 00000000000..106daa05dae
--- /dev/null
+++ b/packages/protocol/contracts/test/TestContracts.sol
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
+import {SignalService} from "../signal/SignalService.sol";
+import {TokenVault} from "../bridge/TokenVault.sol";
+import {EtherVault} from "../bridge/EtherVault.sol";
+import {BridgedERC20} from "../bridge/BridgedERC20.sol";
+import {Bridge} from "../bridge/Bridge.sol";
+import {TaikoToken} from "../L1/TaikoToken.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+
+// The old implementation that is also used in hardhat tests.
+
+contract TestERC20 is ERC20 {
+ constructor(uint256 initialSupply) ERC20("TestERC20", "TEST") {
+ _mint(msg.sender, initialSupply);
+ }
+}
+
+contract TestSignalService is SignalService {}
+
+contract TestTokenVault is TokenVault {}
+
+contract TestEtherVault is EtherVault {}
+
+contract TestBridgedERC20 is BridgedERC20 {}
+
+contract TestBridge is Bridge {}
+
+contract TestTaikoToken is TaikoToken {
+ function mintAnyone(address account, uint256 amount) public {
+ _mint(account, amount);
+ }
+}
diff --git a/packages/protocol/contracts/test/bridge/TestHeaderSync.sol b/packages/protocol/contracts/test/bridge/TestHeaderSync.sol
index 88c2c593f2b..22916ccf4d1 100644
--- a/packages/protocol/contracts/test/bridge/TestHeaderSync.sol
+++ b/packages/protocol/contracts/test/bridge/TestHeaderSync.sol
@@ -6,23 +6,27 @@
pragma solidity ^0.8.18;
-import {IHeaderSync} from "../../common/IHeaderSync.sol";
+import {IXchainSync} from "../../common/IXchainSync.sol";
// TODO(roger): remove this file. If you need extra functionality in
// the Bridge contract, create a TestBridge.sol contract instead.
-contract TestHeaderSync is IHeaderSync {
- bytes32 public headerHash;
+contract TestXchainSync is IXchainSync {
+ bytes32 private _blockHash;
+ bytes32 private _signalRoot;
- function setSyncedHeader(bytes32 header) external {
- headerHash = header;
+ function setXchainBlockHeader(bytes32 blockHash) external {
+ _blockHash = blockHash;
}
- function getSyncedHeader(uint256 number) external view returns (bytes32) {
- number;
- return headerHash;
+ function setXchainSignalRoot(bytes32 signalRoot) external {
+ _signalRoot = signalRoot;
}
- function getLatestSyncedHeader() external view returns (bytes32) {
- return headerHash;
+ function getXchainBlockHash(uint256) external view returns (bytes32) {
+ return _blockHash;
+ }
+
+ function getXchainSignalRoot(uint256) external view returns (bytes32) {
+ return _signalRoot;
}
}
diff --git a/packages/protocol/contracts/test/bridge/libs/TestBadReceiver.sol b/packages/protocol/contracts/test/bridge/libs/TestBadReceiver.sol
deleted file mode 100644
index 3deadd43611..00000000000
--- a/packages/protocol/contracts/test/bridge/libs/TestBadReceiver.sol
+++ /dev/null
@@ -1,22 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-// TODO(roger): Merge this file into TestReceiver.sol.
-contract TestBadReceiver {
- receive() external payable {
- revert("can not send to this contract");
- }
-
- fallback() external payable {
- revert("can not send to this contract");
- }
-
- function transfer() public pure {
- revert("this fails");
- }
-}
diff --git a/packages/protocol/contracts/test/erc20/FreeMintERC20.sol b/packages/protocol/contracts/test/erc20/FreeMintERC20.sol
index b6f0025b358..2c6bc266240 100644
--- a/packages/protocol/contracts/test/erc20/FreeMintERC20.sol
+++ b/packages/protocol/contracts/test/erc20/FreeMintERC20.sol
@@ -18,11 +18,11 @@ contract FreeMintERC20 is ERC20 {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
function mint(address to) public {
- if (minters[msg.sender]) {
+ if (minters[to]) {
revert HasMinted();
}
- minters[msg.sender] = true;
+ minters[to] = true;
_mint(to, 50 * (10 ** decimals()));
}
}
diff --git a/packages/protocol/contracts/test/thirdparty/TestERC20.sol b/packages/protocol/contracts/test/erc20/RegularERC20.sol
similarity index 63%
rename from packages/protocol/contracts/test/thirdparty/TestERC20.sol
rename to packages/protocol/contracts/test/erc20/RegularERC20.sol
index 52039565ea0..e4239c1cc52 100644
--- a/packages/protocol/contracts/test/thirdparty/TestERC20.sol
+++ b/packages/protocol/contracts/test/erc20/RegularERC20.sol
@@ -4,8 +4,8 @@ pragma solidity ^0.8.18;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
-contract TestERC20 is ERC20 {
- constructor(uint256 initialSupply) ERC20("TestERC20", "TEST") {
+contract RegularERC20 is ERC20 {
+ constructor(uint256 initialSupply) ERC20("RegularERC20", "RGL") {
_mint(msg.sender, initialSupply);
}
}
diff --git a/packages/protocol/contracts/test/libs/TestLib1559Math.sol b/packages/protocol/contracts/test/libs/TestLib1559Math.sol
deleted file mode 100644
index 0bbb57b9a05..00000000000
--- a/packages/protocol/contracts/test/libs/TestLib1559Math.sol
+++ /dev/null
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {Lib1559Math} from "../../libs/Lib1559Math.sol";
-
-contract TestLib1559Math {
- function adjustTarget(
- uint256 firstTarget,
- uint256 startingMeasurement,
- uint256 baseTargetVal,
- uint256 adjustmentFactor
- ) public pure returns (uint256 nextTarget) {
- nextTarget = Lib1559Math.adjustTarget(
- firstTarget,
- startingMeasurement,
- baseTargetVal,
- adjustmentFactor
- );
- }
-
- function adjustTargetReverse(
- uint256 firstTarget,
- uint256 startingMeasurement,
- uint256 baseTargetVal,
- uint256 adjustmentFactor
- ) public pure returns (uint256 nextTarget) {
- nextTarget = Lib1559Math.adjustTargetReverse(
- firstTarget,
- startingMeasurement,
- baseTargetVal,
- adjustmentFactor
- );
- }
-}
diff --git a/packages/protocol/contracts/test/libs/TestLibAnchorSignature.sol b/packages/protocol/contracts/test/libs/TestLibAnchorSignature.sol
deleted file mode 100644
index aeac784ebce..00000000000
--- a/packages/protocol/contracts/test/libs/TestLibAnchorSignature.sol
+++ /dev/null
@@ -1,34 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {LibAnchorSignature} from "../../libs/LibAnchorSignature.sol";
-
-library TestLibAnchorSignature {
- function signTransaction(
- bytes32 digest,
- uint8 k
- ) public view returns (uint8 v, uint256 r, uint256 s) {
- return LibAnchorSignature.signTransaction(digest, k);
- }
-
- function recover(
- bytes32 hash,
- uint8 v,
- bytes32 r,
- bytes32 s
- ) public pure returns (address) {
- return ecrecover(hash, v, r, s);
- }
-
- function goldenTouchAddress() public pure returns (address, uint256) {
- return (
- LibAnchorSignature.K_GOLDEN_TOUCH_ADDRESS,
- LibAnchorSignature.K_GOLDEN_TOUCH_PRIVATEKEY
- );
- }
-}
diff --git a/packages/protocol/contracts/test/libs/TestLibProving.sol b/packages/protocol/contracts/test/libs/TestLibProving.sol
deleted file mode 100644
index b03c84b5712..00000000000
--- a/packages/protocol/contracts/test/libs/TestLibProving.sol
+++ /dev/null
@@ -1,386 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-// This file is an exact copy of LibProving.sol
-// except the implementation of the following flags are false:
-
-// FLAG_VALIDATE_ANCHOR_TX_SIGNATURE
-// FLAG_CHECK_METADATA
-// FLAG_VALIDATE_HEADER_FOR_METADATA
-
-// @dev we need to update this when we update LibProving.sol
-
-pragma solidity ^0.8.18;
-
-import {LibProving, IProofVerifier} from "../../L1/libs/LibProving.sol";
-import {AddressResolver} from "../../common/AddressResolver.sol";
-import {LibAnchorSignature} from "../../libs/LibAnchorSignature.sol";
-import {LibBlockHeader, BlockHeader} from "../../libs/LibBlockHeader.sol";
-import {LibReceiptDecoder} from "../../libs/LibReceiptDecoder.sol";
-import {LibTxDecoder} from "../../libs/LibTxDecoder.sol";
-import {LibTxUtils} from "../../libs/LibTxUtils.sol";
-import {LibBytesUtils} from "../../thirdparty/LibBytesUtils.sol";
-import {LibRLPWriter} from "../../thirdparty/LibRLPWriter.sol";
-import {LibUtils} from "../../L1/libs/LibUtils.sol";
-import {TaikoData} from "../../L1/TaikoData.sol";
-
-library TestLibProving {
- using LibBlockHeader for BlockHeader;
- using LibUtils for TaikoData.BlockMetadata;
- using LibUtils for TaikoData.State;
-
- bool private constant FLAG_VALIDATE_ANCHOR_TX_SIGNATURE = false;
- bool private constant FLAG_CHECK_METADATA = false;
- bool private constant FLAG_VALIDATE_HEADER_FOR_METADATA = false;
-
- bytes32 public constant INVALIDATE_BLOCK_LOG_TOPIC =
- keccak256("BlockInvalidated(bytes32)");
-
- bytes4 public constant ANCHOR_TX_SELECTOR =
- bytes4(keccak256("anchor(uint256,bytes32)"));
-
- event BlockProven(
- uint256 indexed id,
- bytes32 parentHash,
- bytes32 blockHash,
- address prover,
- uint64 provenAt
- );
-
- error L1_ALREADY_PROVEN();
- error L1_ANCHOR_CALLDATA();
- error L1_ANCHOR_DEST();
- error L1_ANCHOR_GAS_LIMIT();
- error L1_ANCHOR_RECEIPT_ADDR();
- error L1_ANCHOR_RECEIPT_DATA();
- error L1_ANCHOR_RECEIPT_LOGS();
- error L1_ANCHOR_RECEIPT_PROOF();
- error L1_ANCHOR_RECEIPT_STATUS();
- error L1_ANCHOR_RECEIPT_TOPICS();
- error L1_ANCHOR_SIG_R();
- error L1_ANCHOR_SIG_S();
- error L1_ANCHOR_TX_PROOF();
- error L1_ANCHOR_TYPE();
- error L1_CANNOT_BE_FIRST_PROVER();
- error L1_CONFLICT_PROOF();
- error L1_ID();
- error L1_INPUT_SIZE();
- error L1_META_MISMATCH();
- error L1_NOT_ORACLE_PROVER();
- error L1_PROOF_LENGTH();
- error L1_PROVER();
- error L1_ZKP();
-
- function proveBlock(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- AddressResolver resolver,
- uint256 blockId,
- bytes[] calldata inputs
- ) public {
- // Check and decode inputs
- if (inputs.length != 3) revert L1_INPUT_SIZE();
- TaikoData.Evidence memory evidence = abi.decode(
- inputs[0],
- (TaikoData.Evidence)
- );
-
- // Check evidence
- if (evidence.meta.id != blockId) revert L1_ID();
-
- if (evidence.proofs.length != 3) revert L1_PROOF_LENGTH();
-
- IProofVerifier proofVerifier = IProofVerifier(
- resolver.resolve("proof_verifier", false)
- );
-
- if (config.enableAnchorValidation) {
- _proveAnchorForValidBlock({
- config: config,
- resolver: resolver,
- proofVerifier: proofVerifier,
- evidence: evidence,
- anchorTx: inputs[1],
- anchorReceipt: inputs[2]
- });
- }
-
- // ZK-prove block and mark block proven to be valid.
- _proveBlock({
- state: state,
- config: config,
- resolver: resolver,
- proofVerifier: proofVerifier,
- evidence: evidence,
- target: evidence.meta,
- blockHashOverride: 0
- });
- }
-
- function proveBlockInvalid(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- AddressResolver resolver,
- uint256 blockId,
- bytes[] calldata inputs
- ) public {
- // Check and decode inputs
- if (inputs.length != 3) revert L1_INPUT_SIZE();
- TaikoData.Evidence memory evidence = abi.decode(
- inputs[0],
- (TaikoData.Evidence)
- );
- TaikoData.BlockMetadata memory target = abi.decode(
- inputs[1],
- (TaikoData.BlockMetadata)
- );
-
- // Check evidence
- if (evidence.meta.id != blockId) revert L1_ID();
- if (evidence.proofs.length != 2) revert L1_PROOF_LENGTH();
-
- IProofVerifier proofVerifier = IProofVerifier(
- resolver.resolve("proof_verifier", false)
- );
-
- if (config.enableAnchorValidation) {
- _proveAnchorForInvalidBlock({
- config: config,
- resolver: resolver,
- target: target,
- proofVerifier: proofVerifier,
- evidence: evidence,
- invalidateBlockReceipt: inputs[2]
- });
- }
-
- // ZK-prove block and mark block proven as invalid.
- _proveBlock({
- state: state,
- config: config,
- resolver: resolver,
- proofVerifier: proofVerifier,
- evidence: evidence,
- target: target,
- blockHashOverride: LibUtils.BLOCK_DEADEND_HASH
- });
- }
-
- function _proveBlock(
- TaikoData.State storage state,
- TaikoData.Config memory config,
- AddressResolver resolver,
- IProofVerifier proofVerifier,
- TaikoData.Evidence memory evidence,
- TaikoData.BlockMetadata memory target,
- bytes32 blockHashOverride
- ) private {
- if (evidence.meta.id != target.id) revert L1_ID();
- if (evidence.prover == address(0)) revert L1_PROVER();
-
- if (FLAG_CHECK_METADATA) {
- if (
- target.id <= state.latestVerifiedId ||
- target.id >= state.nextBlockId
- ) revert L1_ID();
- if (
- state
- .getProposedBlock(config.maxNumBlocks, target.id)
- .metaHash != target.hashMetadata()
- ) revert L1_META_MISMATCH();
- }
-
- if (FLAG_VALIDATE_HEADER_FOR_METADATA) {
- if (
- evidence.header.parentHash == 0 ||
- evidence.header.beneficiary != evidence.meta.beneficiary ||
- evidence.header.difficulty != 0 ||
- evidence.header.gasLimit !=
- evidence.meta.gasLimit + config.anchorTxGasLimit ||
- evidence.header.gasUsed == 0 ||
- evidence.header.timestamp != evidence.meta.timestamp ||
- evidence.header.extraData.length !=
- evidence.meta.extraData.length ||
- keccak256(evidence.header.extraData) !=
- keccak256(evidence.meta.extraData) ||
- evidence.header.mixHash != evidence.meta.mixHash
- ) revert L1_META_MISMATCH();
- }
-
- // For alpha-2 testnet, the network allows any address to submit ZKP,
- // but a special prover can skip ZKP verification if the ZKP is empty.
-
- bool oracleProving;
-
- TaikoData.ForkChoice storage fc = state.forkChoices[target.id][
- evidence.header.parentHash
- ];
-
- bytes32 blockHash = evidence.header.hashBlockHeader();
- bytes32 _blockHash = blockHashOverride == 0
- ? blockHash
- : blockHashOverride;
-
- if (fc.blockHash == 0) {
- address oracleProver = resolver.resolve("oracle_prover", true);
- if (msg.sender == oracleProver) {
- oracleProving = true;
- } else {
- if (oracleProver != address(0)) revert L1_NOT_ORACLE_PROVER();
- fc.prover = evidence.prover;
- fc.provenAt = uint64(block.timestamp);
- }
- fc.blockHash = _blockHash;
- } else {
- if (fc.blockHash != _blockHash) revert L1_CONFLICT_PROOF();
- if (fc.prover != address(0)) revert L1_ALREADY_PROVEN();
-
- fc.prover = evidence.prover;
- fc.provenAt = uint64(block.timestamp);
- }
-
- if (oracleProving) {
- // do not verify zkp
- } else {
- bool verified = proofVerifier.verifyZKP({
- verifierId: string(
- abi.encodePacked("plonk_verifier_", evidence.circuitId)
- ),
- zkproof: evidence.proofs[0],
- instance: _getInstance(evidence)
- });
- if (!verified) revert L1_ZKP();
- }
-
- emit BlockProven({
- id: target.id,
- parentHash: evidence.header.parentHash,
- blockHash: _blockHash,
- prover: fc.prover,
- provenAt: fc.provenAt
- });
- }
-
- function _proveAnchorForValidBlock(
- TaikoData.Config memory config,
- AddressResolver resolver,
- IProofVerifier proofVerifier,
- TaikoData.Evidence memory evidence,
- bytes calldata anchorTx,
- bytes calldata anchorReceipt
- ) private view {
- // Check anchor tx is valid
- LibTxDecoder.Tx memory _tx = LibTxDecoder.decodeTx(
- config.chainId,
- anchorTx
- );
- if (_tx.txType != 0) revert L1_ANCHOR_TYPE();
- if (_tx.destination != resolver.resolve(config.chainId, "taiko", false))
- revert L1_ANCHOR_DEST();
- if (_tx.gasLimit != config.anchorTxGasLimit)
- revert L1_ANCHOR_GAS_LIMIT();
-
- if (FLAG_VALIDATE_ANCHOR_TX_SIGNATURE) {
- // Check anchor tx's signature is valid and deterministic
- if (
- _tx.r != LibAnchorSignature.GX &&
- _tx.r != LibAnchorSignature.GX2
- ) revert L1_ANCHOR_SIG_R();
-
- if (_tx.r == LibAnchorSignature.GX2) {
- (, , uint256 s) = LibAnchorSignature.signTransaction(
- LibTxUtils.hashUnsignedTx(config.chainId, _tx),
- 1
- );
- if (s != 0) revert L1_ANCHOR_SIG_S();
- }
- }
-
- // Check anchor tx's calldata is valid
- if (
- !LibBytesUtils.equal(
- _tx.data,
- bytes.concat(
- ANCHOR_TX_SELECTOR,
- bytes32(evidence.meta.l1Height),
- evidence.meta.l1Hash
- )
- )
- ) revert L1_ANCHOR_CALLDATA();
-
- // Check anchor tx is the 1st tx in the block
- if (
- !proofVerifier.verifyMKP({
- key: LibRLPWriter.writeUint(0),
- value: anchorTx,
- proof: evidence.proofs[1],
- root: evidence.header.transactionsRoot
- })
- ) revert L1_ANCHOR_TX_PROOF();
- // Check anchor tx does not throw
- LibReceiptDecoder.Receipt memory receipt = LibReceiptDecoder
- .decodeReceipt(anchorReceipt);
- if (receipt.status != 1) revert L1_ANCHOR_RECEIPT_STATUS();
- if (
- !proofVerifier.verifyMKP({
- key: LibRLPWriter.writeUint(0),
- value: anchorReceipt,
- proof: evidence.proofs[2],
- root: evidence.header.receiptsRoot
- })
- ) revert L1_ANCHOR_RECEIPT_PROOF();
- }
-
- function _proveAnchorForInvalidBlock(
- TaikoData.Config memory config,
- AddressResolver resolver,
- TaikoData.BlockMetadata memory target,
- IProofVerifier proofVerifier,
- TaikoData.Evidence memory evidence,
- bytes calldata invalidateBlockReceipt
- ) private view {
- if (
- !proofVerifier.verifyMKP({
- key: LibRLPWriter.writeUint(0),
- value: invalidateBlockReceipt,
- proof: evidence.proofs[1],
- root: evidence.header.receiptsRoot
- })
- ) revert L1_ANCHOR_RECEIPT_PROOF();
- // Check the 1st receipt is for an InvalidateBlock tx with
- // a BlockInvalidated event
- LibReceiptDecoder.Receipt memory receipt = LibReceiptDecoder
- .decodeReceipt(invalidateBlockReceipt);
- if (receipt.status != 1) revert L1_ANCHOR_RECEIPT_STATUS();
- if (receipt.logs.length != 1) revert L1_ANCHOR_RECEIPT_LOGS();
- LibReceiptDecoder.Log memory log = receipt.logs[0];
- if (
- log.contractAddress !=
- resolver.resolve(config.chainId, "taiko", false)
- ) revert L1_ANCHOR_RECEIPT_ADDR();
- if (log.data.length != 0) revert L1_ANCHOR_RECEIPT_DATA();
- if (
- log.topics.length != 2 ||
- log.topics[0] != INVALIDATE_BLOCK_LOG_TOPIC ||
- log.topics[1] != target.txListHash
- ) revert L1_ANCHOR_RECEIPT_TOPICS();
- }
-
- function _getInstance(
- TaikoData.Evidence memory evidence
- ) internal pure returns (bytes32) {
- bytes[] memory list = LibBlockHeader.getBlockHeaderRLPItemsList(
- evidence.header,
- 2
- );
-
- uint256 len = list.length;
- list[len - 2] = LibRLPWriter.writeAddress(evidence.prover);
- list[len - 1] = LibRLPWriter.writeHash(evidence.meta.txListHash);
-
- return keccak256(LibRLPWriter.writeList(list));
- }
-}
diff --git a/packages/protocol/contracts/test/libs/TestLibReceiptDecoder.sol b/packages/protocol/contracts/test/libs/TestLibReceiptDecoder.sol
deleted file mode 100644
index 3b5ad45e67d..00000000000
--- a/packages/protocol/contracts/test/libs/TestLibReceiptDecoder.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {LibReceiptDecoder} from "../../libs/LibReceiptDecoder.sol";
-
-contract TestLibReceiptDecoder {
- event TestLibReceiptDecoderEvent(uint256 indexed a, bytes32 b);
-
- function emitTestEvent(uint256 a, bytes32 b) public {
- emit TestLibReceiptDecoderEvent(a, b);
- }
-
- function decodeReceipt(
- bytes calldata encoded
- ) public pure returns (LibReceiptDecoder.Receipt memory receipt) {
- return LibReceiptDecoder.decodeReceipt(encoded);
- }
-}
diff --git a/packages/protocol/contracts/test/libs/TestLibTrieProof.sol b/packages/protocol/contracts/test/libs/TestLibTrieProof.sol
index b935445456b..d549b8c342c 100644
--- a/packages/protocol/contracts/test/libs/TestLibTrieProof.sol
+++ b/packages/protocol/contracts/test/libs/TestLibTrieProof.sol
@@ -14,14 +14,4 @@ contract TestLibTrieProof {
sstore(slot, val)
}
}
-
- function verify(
- bytes32 stateRoot,
- address addr,
- bytes32 slot,
- bytes32 value,
- bytes calldata mkproof
- ) public pure returns (bool) {
- return LibTrieProof.verify(stateRoot, addr, slot, value, mkproof);
- }
}
diff --git a/packages/protocol/contracts/test/libs/TestLibTxUtils.sol b/packages/protocol/contracts/test/libs/TestLibTxUtils.sol
deleted file mode 100644
index 5082ccdd57b..00000000000
--- a/packages/protocol/contracts/test/libs/TestLibTxUtils.sol
+++ /dev/null
@@ -1,26 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {LibTxUtils} from "../../libs/LibTxUtils.sol";
-import {LibTxDecoder} from "../../libs/LibTxDecoder.sol";
-
-contract TestLibTxUtils {
- function hashUnsignedTx(
- uint256 chainId,
- LibTxDecoder.Tx memory transaction
- ) public pure returns (bytes32 hash) {
- return LibTxUtils.hashUnsignedTx(chainId, transaction);
- }
-
- function recoverSender(
- uint256 chainId,
- LibTxDecoder.Tx memory transaction
- ) public pure returns (address) {
- return LibTxUtils.recoverSender(chainId, transaction);
- }
-}
diff --git a/packages/protocol/contracts/test/libs/TestLibZKP.sol b/packages/protocol/contracts/test/libs/TestLibZKP.sol
deleted file mode 100644
index c9e8cef6ec3..00000000000
--- a/packages/protocol/contracts/test/libs/TestLibZKP.sol
+++ /dev/null
@@ -1,19 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {LibZKP} from "../../libs/LibZKP.sol";
-
-contract TestLibZKP {
- function verify(
- address plonkVerifier,
- bytes calldata zkproof,
- bytes32 instance
- ) public view returns (bool verified) {
- return LibZKP.verify(plonkVerifier, zkproof, instance);
- }
-}
diff --git a/packages/protocol/contracts/test/thirdparty/TestLibBlockHeaderDecoder.sol b/packages/protocol/contracts/test/thirdparty/TestLibBlockHeaderDecoder.sol
deleted file mode 100644
index 44583a40040..00000000000
--- a/packages/protocol/contracts/test/thirdparty/TestLibBlockHeaderDecoder.sol
+++ /dev/null
@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: MIT
-// _____ _ _ _ _
-// |_ _|_ _(_) |_____ | | __ _| |__ ___
-// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
-// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
-
-pragma solidity ^0.8.18;
-
-import {
- LibBlockHeaderDecoder
-} from "../../thirdparty/LibBlockHeaderDecoder.sol";
-
-contract TestLibBlockHeaderDecoder {
- function decodeBlockHeader(
- bytes calldata blockHeader,
- bytes32 blockHash,
- bool postEIP1559
- )
- public
- pure
- returns (
- bytes32 _stateRoot,
- uint256 _timestamp,
- bytes32 _transactionsRoot,
- bytes32 _receiptsRoot
- )
- {
- return
- LibBlockHeaderDecoder.decodeBlockHeader(
- blockHeader,
- blockHash,
- postEIP1559
- );
- }
-}
diff --git a/packages/protocol/contracts/test/thirdparty/TestTaikoToken.sol b/packages/protocol/contracts/test/thirdparty/TestTaikoToken.sol
deleted file mode 100644
index 2fe5e1da777..00000000000
--- a/packages/protocol/contracts/test/thirdparty/TestTaikoToken.sol
+++ /dev/null
@@ -1,10 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.18;
-import {TaikoToken} from "../../L1/TaikoToken.sol";
-
-contract TestTaikoToken is TaikoToken {
- function mintAnyone(address account, uint256 amount) public {
- _mint(account, amount);
- }
-}
diff --git a/packages/protocol/contracts/thirdparty/AddressManager.sol b/packages/protocol/contracts/thirdparty/AddressManager.sol
deleted file mode 100644
index 83a6b102a6f..00000000000
--- a/packages/protocol/contracts/thirdparty/AddressManager.sol
+++ /dev/null
@@ -1,94 +0,0 @@
-// SPDX-License-Identifier: MIT
-// Taken from https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/libraries/resolver/LibAddressManager.sol
-// Modified:
-// - contract name `LibAddressManager` modified to `AddressManager` to obey `lint:sol`
-// - `Ownable.sol` modified to `OwnableUpgradeable.sol`
-// - `init()` added to initialize
-// - `setAddress` modified to `addAddress` to conform to ABI of `IAddressManager.sol`
-// (The MIT License)
-//
-// Copyright 2020-2021 Optimism
-// Copyright 2022-2023 Taiko Labs
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-pragma solidity ^0.8.18;
-
-/* External Imports */
-import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
-
-/**
- * @title AddressManager
- */
-contract AddressManager is OwnableUpgradeable {
- /*************
- * Variables *
- *************/
-
- mapping(bytes32 nameHash => address addr) private addresses;
-
- /**********
- * Events *
- **********/
-
- event AddressSet(
- string indexed _name,
- address _newAddress,
- address _oldAddress
- );
-
- /********************
- * External Functions*
- ********************/
-
- /// @dev Initializer to be called after being deployed behind a proxy.
- function init() external initializer {
- OwnableUpgradeable.__Ownable_init();
- }
-
- /**
- * Changes the address associated with a particular name.
- * @param name String name to associate an address with.
- * @param newAddress Address to associate with the name.
- */
- function setAddress(
- string memory name,
- address newAddress
- ) external onlyOwner {
- bytes32 nameHash = keccak256(bytes(name));
- address oldAddress = addresses[nameHash];
- addresses[nameHash] = newAddress;
- emit AddressSet(name, newAddress, oldAddress);
- }
-
- /********************
- * Public Functions *
- ********************/
-
- /**
- * Retrieves the address associated with a given name.
- * @param name Name to retrieve an address for.
- * @return Address associated with the given name.
- */
- function getAddress(string memory name) external view returns (address) {
- bytes32 nameHash = keccak256(bytes(name));
- return addresses[nameHash];
- }
-}
diff --git a/packages/protocol/contracts/thirdparty/ERC20Upgradeable.sol b/packages/protocol/contracts/thirdparty/ERC20Upgradeable.sol
index a758f08c5e8..f218b25b9b1 100644
--- a/packages/protocol/contracts/thirdparty/ERC20Upgradeable.sol
+++ b/packages/protocol/contracts/thirdparty/ERC20Upgradeable.sol
@@ -28,7 +28,7 @@
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-pragma solidity ^0.8.0;
+pragma solidity ^0.8.18;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol";
diff --git a/packages/protocol/contracts/thirdparty/LibBlockHeaderDecoder.sol b/packages/protocol/contracts/thirdparty/LibBlockHeaderDecoder.sol
deleted file mode 100644
index 74c2a4e9686..00000000000
--- a/packages/protocol/contracts/thirdparty/LibBlockHeaderDecoder.sol
+++ /dev/null
@@ -1,234 +0,0 @@
-// SPDX-License-Identifier: MIT
-// Taken from https://github.com/privacy-scaling-explorations/zkevm-chain/blob/master/contracts/ZkEvmL2MessageDeliverer.sol#L23
-// NOTE: No MIT license provided at the time, only SPDX-License-Identifier
-
-pragma solidity ^0.8.18;
-
-/**
- * @title LibBlockHeaderDecoder
- */
-library LibBlockHeaderDecoder {
- /// @notice This method extracts [stateRoot, timestamp] of a block header.
- /// @param blockHeader RLP encoded block header
- /// @param blockHash The expected block hash
- /// @param postEIP1559 True to check header to have 16 fields, 15 otherwise
- /// @return _stateRoot The state root
- /// @return _timestamp The timestamp
- /// @return _transactionsRoot The transactionsRoot
- /// @return _receiptsRoot The receiptsRoot
- function decodeBlockHeader(
- bytes calldata blockHeader,
- bytes32 blockHash,
- bool postEIP1559
- )
- public
- pure
- returns (
- bytes32 _stateRoot,
- uint256 _timestamp,
- bytes32 _transactionsRoot,
- bytes32 _receiptsRoot
- )
- {
- uint256 numFields = postEIP1559 ? 16 : 15;
- assembly {
- // TODO: use templating techniques and DRY code (with PatriciaValidator).
-
- // function Error(string)
- function revertWith(msg) {
- mstore(0, shl(224, 0x08c379a0))
- mstore(4, 32)
- mstore(68, msg)
- let msgLen
- for {
-
- } msg {
-
- } {
- msg := shl(8, msg)
- msgLen := add(msgLen, 1)
- }
- mstore(36, msgLen)
- revert(0, 100)
- }
-
- // loads and aligns a value from calldata
- // given the `len|offset` stored at `memPtr`
- function loadValue(memPtr) -> value, len {
- let tmp := mload(memPtr)
- // assuming 0xffffff is sufficient for storing calldata offset
- let offset := and(tmp, 0xffffff)
- len := shr(128, tmp)
-
- if gt(len, 31) {
- // special case - truncating the value is intended.
- // this matches the behavior in `derivePath` that truncates to 256 bits.
- offset := add(offset, sub(len, 32))
- value := calldataload(offset)
- leave
- }
-
- // everything else is
- // < 32 bytes - align the value
- let bits := mul(sub(32, len), 8)
- value := calldataload(offset)
- value := shr(bits, value)
- }
-
- // returns the `len` of the whole RLP list at `ptr`
- // and the offset for the first value inside the list.
- function decodeListLength(ptr) -> len, startOffset {
- let firstByte := byte(0, calldataload(ptr))
-
- // SHORT LIST
- // 0 - 55 bytes
- // 0xc0 - 0xf7
- if lt(firstByte, 0xf8) {
- len := sub(firstByte, 0xbf)
- startOffset := add(ptr, 1)
- leave
- }
-
- // LONG LIST
- // 0xf8 - 0xff
- // > 55 bytes
- {
- let lenOf := sub(firstByte, 0xf7)
-
- // load the extended length
- startOffset := add(ptr, 1)
- let extendedLen := calldataload(startOffset)
- let bits := sub(256, mul(lenOf, 8))
- extendedLen := shr(bits, extendedLen)
-
- len := add(extendedLen, lenOf)
- len := add(len, 1)
- startOffset := add(startOffset, lenOf)
- leave
- }
- }
-
- // returns the calldata offset of the value and the length in bytes
- // for the RLP encoded data item at `ptr`.
- // used in `decodeFlat`
- function decodeValue(ptr) -> dataLen, valueOffset, isData {
- let firstByte := byte(0, calldataload(ptr))
-
- // SINGLE BYTE
- // 0x00 - 0x7f
- if lt(firstByte, 0x80) {
- dataLen := 1
- valueOffset := ptr
- isData := 1
- leave
- }
-
- // DATA ITEM
- // 0 - 55 bytes long
- // 0x80 - 0xb7
- if lt(firstByte, 0xb8) {
- dataLen := sub(firstByte, 0x80)
- valueOffset := add(ptr, 1)
- isData := 1
- leave
- }
-
- // LONG DATA ITEM
- // > 55 bytes
- // 0xb8 - 0xbf
- if lt(firstByte, 0xc0) {
- // the extended length is ignored
- dataLen := sub(firstByte, 0xb7)
-
- // load the extended length
- valueOffset := add(ptr, 1)
- let extendedLen := calldataload(valueOffset)
- let bits := sub(256, mul(dataLen, 8))
- valueOffset := add(ptr, dataLen)
- dataLen := shr(bits, extendedLen)
- leave
- }
-
- // everything else is unexpected
- revertWith("RLP")
- }
-
- // decodes all RLP encoded data and stores their DATA items
- // [length, calldata offset] in a continuous memory region.
- // Expects that the RLP starts with a list that defines the length
- // of the whole RLP region.
- function decodeFlat(_ptr) -> ptr, memStart, nItems, hash {
- ptr := _ptr
-
- // load free memory ptr
- // doesn't update the ptr and leaves the memory region dirty
- memStart := mload(64)
-
- let payloadLen, startOffset := decodeListLength(ptr)
- // reuse memStart region and hash
- calldatacopy(memStart, ptr, payloadLen)
- hash := keccak256(memStart, payloadLen)
-
- let memPtr := memStart
- let ptrStop := add(ptr, payloadLen)
- ptr := startOffset
-
- // decode until the end of the list
- for {
-
- } lt(ptr, ptrStop) {
-
- } {
- let len, valuePtr, isData := decodeValue(ptr)
- ptr := add(len, valuePtr)
-
- if isData {
- // store the length of the data and the calldata offset
- let tmp := or(shl(128, len), valuePtr)
- mstore(memPtr, tmp)
- memPtr := add(memPtr, 32)
- }
- }
-
- nItems := div(sub(memPtr, memStart), 32)
- }
-
- // expecting 16 individual items from the block header
- let calldataPtr, memStart, nItems, hash := decodeFlat(
- blockHeader.offset
- )
-
- // boundary check
- if iszero(
- eq(calldataPtr, add(blockHeader.offset, blockHeader.length))
- ) {
- revertWith("BOUNDS")
- }
- if iszero(eq(hash, blockHash)) {
- revertWith("HASH")
- }
-
- // Depends on if EIP1559 is enabled, check the item size to be 15 or 16.
- if iszero(eq(nItems, numFields)) {
- revertWith("ITEMS")
- }
-
- // at position 11 should be the timestamp
- let len
- _timestamp, len := loadValue(add(memStart, mul(32, 11)))
- // sstore(originTimestamp.slot, value)
-
- // at position 3 should be the stateRoot
- _stateRoot, len := loadValue(add(memStart, mul(32, 3)))
- // sstore(originStateRoot.slot, value)
-
- // at position 4 should be transactionsRoot
- _transactionsRoot, len := loadValue(add(memStart, mul(32, 4)))
- // sstore(originTransactionsRoot.slot, value)
-
- // at position 5 should be receiptsRoot
- _receiptsRoot, len := loadValue(add(memStart, mul(32, 5)))
- // sstore(originReceiptsRoot.slot, value)
- }
- }
-}
diff --git a/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol b/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol
new file mode 100644
index 00000000000..57931c6e889
--- /dev/null
+++ b/packages/protocol/contracts/thirdparty/LibFixedPointMath.sol
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: UNLICENSED
+// Taken from: https://github.com/recmo/experiment-solexp/blob/main/src/FixedPointMathLib.sol
+pragma solidity ^0.8.18;
+
+library LibFixedPointMath {
+ uint128 public constant MAX_EXP_INPUT = 135305999368893231588;
+ uint256 public constant SCALING_FACTOR_1E18 = 1e18; // For fixed point representation factor
+
+ error Overflow();
+
+ // Computes e^x in 1e18 fixed point.
+ function exp(int256 x) internal pure returns (int256 r) {
+ unchecked {
+ // Input x is in fixed point format, with scale factor 1/1e18.
+
+ // When the result is < 0.5 we return zero. This happens when
+ // x <= floor(log(0.5e18) * 1e18) ~ -42e18
+ if (x <= -42139678854452767551) {
+ return 0;
+ }
+
+ // When the result is > (2**255 - 1) / 1e18 we can not represent it
+ // as an int256. This happens when x >= floor(log((2**255 -1) / 1e18) * 1e18) ~ 135.
+ if (x >= 135305999368893231589) revert Overflow();
+
+ // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96
+ // for more intermediate precision and a binary basis. This base conversion
+ // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.
+ x = (x << 78) / 5 ** 18;
+
+ // Reduce range of x to (-½ ln 2, ½ ln 2) * 2**96 by factoring out powers of two
+ // such that exp(x) = exp(x') * 2**k, where k is an integer.
+ // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).
+ int256 k = ((x << 96) / 54916777467707473351141471128 + 2 ** 95) >>
+ 96;
+ x = x - k * 54916777467707473351141471128;
+ // k is in the range [-61, 195].
+
+ // Evaluate using a (6, 7)-term rational approximation
+ // p is made monic, we will multiply by a scale factor later
+ int256 p = x + 2772001395605857295435445496992;
+ p = ((p * x) >> 96) + 44335888930127919016834873520032;
+ p = ((p * x) >> 96) + 398888492587501845352592340339721;
+ p = ((p * x) >> 96) + 1993839819670624470859228494792842;
+ p = p * x + (4385272521454847904632057985693276 << 96);
+ // We leave p in 2**192 basis so we don't need to scale it back up for the division.
+ // Evaluate using using Knuth's scheme from p. 491.
+ int256 z = x + 750530180792738023273180420736;
+ z = ((z * x) >> 96) + 32788456221302202726307501949080;
+ int256 w = x - 2218138959503481824038194425854;
+ w = ((w * z) >> 96) + 892943633302991980437332862907700;
+ int256 q = z + w - 78174809823045304726920794422040;
+ q = ((q * w) >> 96) + 4203224763890128580604056984195872;
+ assembly {
+ // Div in assembly because solidity adds a zero check despite the `unchecked`.
+ // The q polynomial is known not to have zeros in the domain. (All roots are complex)
+ // No scaling required because p is already 2**96 too large.
+ r := sdiv(p, q)
+ }
+ // r should be in the range (0.09, 0.25) * 2**96.
+
+ // We now need to multiply r by
+ // * the scale factor s = ~6.031367120...,
+ // * the 2**k factor from the range reduction, and
+ // * the 1e18 / 2**96 factor for base converison.
+ // We do all of this at once, with an intermediate result in 2**213 basis
+ // so the final right shift is always by a positive amount.
+ r = int256(
+ (uint256(r) *
+ 3822833074963236453042738258902158003155416615667) >>
+ uint256(195 - k)
+ );
+ }
+ }
+}
diff --git a/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol b/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol
index f00a74a04cc..ce19ee47f97 100644
--- a/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol
+++ b/packages/protocol/contracts/thirdparty/LibMerkleTrie.sol
@@ -55,24 +55,24 @@ library LibMerkleTrie {
**********************/
// TREE_RADIX determines the number of elements per branch node.
- uint8 constant TREE_RADIX = 16;
+ uint8 private constant TREE_RADIX = 16;
// Branch nodes have TREE_RADIX elements plus an additional `value` slot.
- uint8 constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;
+ uint8 private constant BRANCH_NODE_LENGTH = TREE_RADIX + 1;
// Leaf nodes and extension nodes always have two elements, a `path` and a `value`.
- uint8 constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;
+ uint8 private constant LEAF_OR_EXTENSION_NODE_LENGTH = 2;
// Prefixes are prepended to the `path` within a leaf or extension node and
// allow us to differentiate between the two node types. `ODD` or `EVEN` is
// determined by the number of nibbles within the unprefixed `path`. If the
// number of nibbles if even, we need to insert an extra padding nibble so
// the resulting prefixed `path` has an even number of nibbles.
- uint8 constant PREFIX_EXTENSION_EVEN = 0;
- uint8 constant PREFIX_EXTENSION_ODD = 1;
- uint8 constant PREFIX_LEAF_EVEN = 2;
- uint8 constant PREFIX_LEAF_ODD = 3;
+ uint8 private constant PREFIX_EXTENSION_EVEN = 0;
+ uint8 private constant PREFIX_EXTENSION_ODD = 1;
+ uint8 private constant PREFIX_LEAF_EVEN = 2;
+ uint8 private constant PREFIX_LEAF_ODD = 3;
// Just a utility constant. RLP represents `NULL` as 0x80.
- bytes1 constant RLP_NULL = bytes1(0x80);
+ bytes1 private constant RLP_NULL = bytes1(0x80);
/**********************
* Internal Functions *
diff --git a/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol b/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol
index 8a8f63f597f..d79657ef7f5 100644
--- a/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol
+++ b/packages/protocol/contracts/thirdparty/LibSecureMerkleTrie.sol
@@ -88,6 +88,6 @@ library LibSecureMerkleTrie {
function _getSecureKey(
bytes memory _key
) private pure returns (bytes memory _secureKey) {
- return abi.encodePacked(keccak256(_key));
+ return bytes.concat(keccak256(_key));
}
}
diff --git a/packages/protocol/docs/L2EIP1559.md b/packages/protocol/docs/L2EIP1559.md
new file mode 100644
index 00000000000..3ff6502a02c
--- /dev/null
+++ b/packages/protocol/docs/L2EIP1559.md
@@ -0,0 +1,35 @@
+# Taiko L2 EIP-1559
+
+## The overall design
+
+The EIP-1559 base fee per gas (basefee) on Taiko L2 is calculated by Taiko L1 protocol contracts and injected into the block's metadata. The Taiko client should skip calculating the basefee value, and stop burning the basefee, and send it to a named address ("treasure") specified in Taiko L1 protocol contracts, which will be verified by Taiko ZKP.
+
+## Basefee Calculation
+
+We use Vitalik's idea proposed here: https://ethresear.ch/t/make-eip-1559-more-like-an-amm-curve/9082 (read it first!). The x-axis represents the current gas _excess_, the y-axis is the ether amount. When some gas are sold, excess goes up, and the difference of the new and the old y value is the total cost of the gas purchase, or $$cost(gasAmount) = e^{(gasExcess + gasAmount)} -e^{gasExcess}$$, and $$basefee(gasAmount) = cost(gasAmount)/gasAmount$$.
+
+A nice property of the $e^x$ curve is that for a chosen gas target $T$, the basefee ($basefee(T)$) for a block with $T$ gas and the basefee ($basefee(2T)$) for a block with $2T$ gas always have the fixed ratio: $$R == basefee(2T)/basefee(T)$$ regardless of the current _gas excess_ value, $T$ and $R$ together determine the shape of the curve. In Ethereum, $T$ is 15 million and $R$ is 12.5%; it's yet to be decided what value we should use in Taiko.
+
+![4f785d35722c2f255a448c7803d511a0bb2b148c](https://user-images.githubusercontent.com/99078276/229010491-a3fcddd5-1798-47af-bafc-5d680fbb574c.png)
+
+### Implementation of $e^x$
+
+We steal the `exp(x)` implementation from https://github.com/recmo/experiment-solexp/blob/main/src/test/FixedPointMathLib.t.sol. This implementation has a limitation: the range is input parameter `x` is `[-42.139678854, + 135.305999369]` with 18 decimals/precision. In our case, we need to map gas excess to the range of `[0, K]` where `K` equals `135.305999369` or `135305999368893231588` in fixed point integer form.
+
+The $e^x$ curve can be expressed using $$py=e^{qx}$$, as you can see below: the two parameters $p$ and $q$ defines the shape/slope of the curve. We need to find the right value for them, otherwise, the basefee movement will not be as expected.
+
+
+
+(the plot above is available at https://www.desmos.com/calculator/yncurfx3ar)
+
+## Scaling
+
+The following is how we calculate $p$ and $q$. Assuming the max gas excess $M$, a uint64. then $q = 135305999368893231588/M$ (internally we keep $q'=q <<64$ as it fits into a uint64).
+
+We also assuming the initial value of gasExcess is $M/2$; and the initial basefee (the fee for purchasing 1 gas) is $b_0$, or $$b_0=p e^{(M/2 + 1)} + p e^{M/2}$$, so $$p = b_0/(e^{(M/2 + 1)} + e^{M/2})$$.
+
+It turns out the initial value of gasExcess doesn't really matter for the above calculation due to the nature of the e-curve. But choosing $M/2$ allows price to go up and down by the same max amount.
+
+## Adjust the slope
+
+To adjust the slope of the curve to satisfy $R == basefee(2T)/basefee(T)$, we simply need to chose $M$ and $b_0$. $b_0$ is simply to decide -- if we believe the cost of a L2 transaction is $1/n$ of the same L1 transaction, we simply use the current L1 base fee divided by $n$. Then we can simply tune $M$ to make sure $R == basefee(2T)/basefee(T)$ holds. This is very simply manually a try-and-adjust approach as shown in `Lib1559Math.t.sol`. The TaikoL1 contract will check if $R == basefee(2T)/basefee(T)$ holds but will not calculate $M$ for us.
diff --git a/packages/protocol/foundry.toml b/packages/protocol/foundry.toml
new file mode 100644
index 00000000000..fdf3fa04279
--- /dev/null
+++ b/packages/protocol/foundry.toml
@@ -0,0 +1,27 @@
+# See more config options https://github.com/foundry-rs/foundry/tree/master/config
+[profile.default]
+solc-version = "0.8.18"
+src = 'contracts'
+out = 'out'
+test = 'test'
+libs = ['lib']
+gas_price = 10000000000 # gas price is 10 Gwei
+optimizer = true
+optimizer_runs = 200
+ffi = true
+gas_limit = '18446744073709551615'
+
+# Do not change the block_gas_limit value, TaikoL2.t.sol depends on it.
+block_gas_limit = 30000000 #30M
+# For mainnet_mock tokenomics test we need a huge value to run lots of iterations.
+# Use the above 30M for TaikoL2.t.sol related tests, only use this number with mainnet simulation.
+#block_gas_limit = 3000000000 #3000M
+
+
+fs_permissions = [
+ { access = "read", path = "./out"},
+ { access = "read-write", path = "./deployments"},
+ { access = "read", path = "./test"},
+]
+
+fuzz = { runs = 256 }
diff --git a/packages/protocol/hardhat.config.ts b/packages/protocol/hardhat.config.ts
index fc953d6986d..975acabd6ec 100644
--- a/packages/protocol/hardhat.config.ts
+++ b/packages/protocol/hardhat.config.ts
@@ -1,5 +1,6 @@
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
+// import "@nomicfoundation/hardhat-foundry";
import "@openzeppelin/hardhat-upgrades";
import "@typechain/hardhat";
import "hardhat-abi-exporter";
@@ -8,8 +9,6 @@ import "hardhat-gas-reporter";
import { HardhatUserConfig } from "hardhat/config";
import "solidity-coverage";
import "solidity-docgen";
-import "./tasks/compile_yul";
-import "./tasks/deploy_L1";
const hardhatMnemonic =
"test test test test test test test test test test test taik";
@@ -27,6 +26,7 @@ const config: HardhatUserConfig = {
pages: "files",
templates: "./solidity-docgen/templates",
},
+
gasReporter: {
currency: "USD",
enabled: true,
diff --git a/packages/protocol/lib/forge-std b/packages/protocol/lib/forge-std
new file mode 160000
index 00000000000..b1cf2603743
--- /dev/null
+++ b/packages/protocol/lib/forge-std
@@ -0,0 +1 @@
+Subproject commit b1cf26037432d18fea6917ba82a6fedbff71c037
diff --git a/packages/protocol/lib/foundry-random b/packages/protocol/lib/foundry-random
new file mode 160000
index 00000000000..e39ad2c18c4
--- /dev/null
+++ b/packages/protocol/lib/foundry-random
@@ -0,0 +1 @@
+Subproject commit e39ad2c18c4ff57c6231799f40c787e41eb2dad0
diff --git a/packages/protocol/lib/openzeppelin-contracts b/packages/protocol/lib/openzeppelin-contracts
new file mode 160000
index 00000000000..d00acef4059
--- /dev/null
+++ b/packages/protocol/lib/openzeppelin-contracts
@@ -0,0 +1 @@
+Subproject commit d00acef4059807535af0bd0dd0ddf619747a044b
diff --git a/packages/protocol/lib/openzeppelin-contracts-upgradeable b/packages/protocol/lib/openzeppelin-contracts-upgradeable
new file mode 160000
index 00000000000..f6c4c9c4ec6
--- /dev/null
+++ b/packages/protocol/lib/openzeppelin-contracts-upgradeable
@@ -0,0 +1 @@
+Subproject commit f6c4c9c4ec601665ca74d2c9dddf547fc425658c
diff --git a/packages/protocol/package.json b/packages/protocol/package.json
index 448bce20656..d973a2c9c3c 100644
--- a/packages/protocol/package.json
+++ b/packages/protocol/package.json
@@ -3,24 +3,21 @@
"version": "0.6.1",
"private": true,
"scripts": {
- "compile": "pnpm hardhat compile",
- "compile:yul": "LOG_LEVEL=debug pnpm hardhat compile_yul",
+ "clean": "rm -rf abis cache && pnpm hardhat clean",
+ "compile": "forge build",
+ "compile:hardhat": "pnpm hardhat compile",
"export:abi": "pnpm hardhat clear-abi && pnpm hardhat export-abi",
"export:docs": "pnpm hardhat docgen && pnpm prettier --write ../website/pages/docs/reference/contract-documentation/**/*.md",
- "clean": "rm -rf abis cache && pnpm hardhat clean",
"lint:sol": "pnpm prettier '**/*.sol' --write && pnpm solhint 'contracts/**/*.sol' --fix",
"eslint": "pnpm exec eslint --ignore-path .eslintignore --ext .js,.ts .",
"eslint:fix": "pnpm exec eslint --ignore-path .eslintignore --ext .js,.ts . --fix",
- "test": "./scripts/download_solc.sh && pnpm hardhat test --grep '^[^integration]'",
- "coverage": "pnpm hardhat coverage --solcoverjs ./.solcover.js --show-stack-traces",
- "test:coverage": "pnpm coverage",
+ "test": "forge test -vvv --gas-report --fuzz-seed $(date +%s) --match-path test/**/*.t.sol",
+ "snapshot": "forge snapshot --match-path test/**/*.t.sol",
+ "test:coverage": "forge coverage --report lcov",
+ "test:sim": "forge test -vvv --gas-report --fuzz-seed $(date +%s) --match-path test/**/*.sim.sol --block-gas-limit 30000000000 --memory-limit 1073741824",
"generate:genesis": "ts-node ./utils/generate_genesis/main.ts",
"test:genesis": "./test/genesis/generate_genesis.test.sh",
- "test:bridge": "TEST_TYPE=integrationbridge ./test/test_integration.sh",
- "test:integration": "TEST_TYPE=integration ./test/test_integration.sh",
- "test:tokenomics": "TEST_TYPE=tokenomics ./test/test_integration.sh",
- "test:all": "pnpm run test && pnpm run test:integration && pnpm run test:tokenomics && pnpm run test:genesis",
- "deploy:hardhat": "./scripts/download_solc.sh && LOG_LEVEL=debug pnpm hardhat deploy_L1 --network hardhat --dao-vault 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --team-vault 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --l2-genesis-block-hash 0xee1950562d42f0da28bd4550d88886bc90894c77c9c9eaefef775d4c8223f259 --bridge-funder-private-key ddbf12f72c946bb1e6de5eaf580c51db51828ba198d9b0dba9c7d48ec748dc04 --bridge-fund 0xff --oracle-prover 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --solo-proposer 0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39 --confirmations 1",
+ "deploy:foundry": "./script/download_solc.sh && ./script/test_deploy_on_l1.sh",
"lint-staged": "lint-staged --allow-empty",
"sizer": "pnpm hardhat size-contracts"
},
@@ -39,54 +36,55 @@
"author": "Taiko Labs",
"license": "MIT",
"devDependencies": {
- "@defi-wonderland/smock": "^2.3.3",
- "@nomicfoundation/hardhat-network-helpers": "^1.0.6",
- "@nomiclabs/hardhat-ethers": "^2.0.0",
- "@nomiclabs/hardhat-etherscan": "^3.1.0",
- "@nomiclabs/hardhat-waffle": "^2.0.0",
- "@openzeppelin/hardhat-upgrades": "^1.14.0",
+ "@defi-wonderland/smock": "^2.3.4",
+ "@foundry-rs/hardhat-forge": "^0.1.17",
+ "@nomicfoundation/hardhat-network-helpers": "^1.0.8",
+ "@nomiclabs/hardhat-ethers": "^2.2.3",
+ "@nomiclabs/hardhat-etherscan": "^3.1.7",
+ "@nomiclabs/hardhat-waffle": "^2.0.5",
+ "@openzeppelin/hardhat-upgrades": "^1.22.1",
"@typechain/ethers-v5": "^7.2.0",
"@typechain/hardhat": "^2.3.1",
- "@types/chai": "^4.3.0",
- "@types/glob": "^8.0.1",
- "@types/mocha": "^9.1.0",
- "@types/node": "^12.20.45",
+ "@types/chai": "^4.3.4",
+ "@types/glob": "^8.1.0",
+ "@types/mocha": "^9.1.1",
+ "@types/node": "^12.20.55",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
- "chai": "^4.2.0",
+ "chai": "^4.3.7",
"chalk": "4.1.2",
"dotenv": "^10.0.0",
"eslint": "^7.32.0",
- "eslint-config-prettier": "^8.3.0",
+ "eslint-config-prettier": "^8.8.0",
"eslint-config-standard": "^16.0.3",
- "eslint-plugin-import": "^2.25.4",
+ "eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-promise": "^5.2.0",
- "ethereum-waffle": "^3.0.0",
- "ethers": "^5.0.0",
+ "ethereum-waffle": "^3.4.4",
+ "ethers": "^5.7.2",
"glob": "^8.1.0",
- "hardhat": "^2.8.3",
- "hardhat-abi-exporter": "^2.10.0",
+ "hardhat": "^2.14.0",
+ "hardhat-abi-exporter": "^2.10.1",
"hardhat-contract-sizer": "^2.8.0",
"hardhat-docgen": "^1.3.0",
- "hardhat-gas-reporter": "^1.0.7",
- "lint-staged": "^12.3.4",
+ "hardhat-gas-reporter": "^1.0.9",
+ "lint-staged": "^12.5.0",
"merkle-patricia-tree": "^4.2.4",
- "prettier": "^2.5.1",
- "prettier-plugin-solidity": "^1.1.2",
+ "prettier": "^2.8.8",
+ "prettier-plugin-solidity": "^1.1.3",
"rlp": "^3.0.0",
- "solhint": "^3.4.0",
+ "solhint": "^3.4.1",
"solidity-coverage": "github:taikoxyz/solidity-coverage",
- "solidity-docgen": "^0.6.0-beta.34",
- "ts-node": "^10.5.0",
+ "solidity-docgen": "0.6.0-beta.35",
+ "ts-node": "^10.9.1",
"typechain": "^5.2.0",
- "typescript": "^4.5.5"
+ "typescript": "^4.9.5"
},
"dependencies": {
- "@gnosis.pm/zodiac": "^1.0.7",
- "@openzeppelin/contracts": "^4.5.0",
- "@openzeppelin/contracts-upgradeable": "^4.5.1",
+ "@gnosis.pm/zodiac": "^1.1.9",
+ "@openzeppelin/contracts": "^4.8.3",
+ "@openzeppelin/contracts-upgradeable": "^4.8.3",
"channel-ts": "^0.1.2"
}
}
diff --git a/packages/protocol/remappings.txt b/packages/protocol/remappings.txt
new file mode 100644
index 00000000000..452ac282ef1
--- /dev/null
+++ b/packages/protocol/remappings.txt
@@ -0,0 +1,6 @@
+forge-std/=lib/forge-std/src/
+solmate/=lib/solmate/src/
+ds-test/=lib/forge-std/lib/ds-test/src/
+foundry-random/=lib/foundry-random/src/
+@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
+@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
\ No newline at end of file
diff --git a/packages/protocol/script/DeployOnL1.s.sol b/packages/protocol/script/DeployOnL1.s.sol
new file mode 100644
index 00000000000..407e9ff3599
--- /dev/null
+++ b/packages/protocol/script/DeployOnL1.s.sol
@@ -0,0 +1,278 @@
+// SPDX-License-Identifier: MIT
+// _____ _ _ _ _
+// |_ _|_ _(_) |_____ | | __ _| |__ ___
+// | |/ _` | | / / _ \ | |__/ _` | '_ (_-<
+// |_|\__,_|_|_\_\___/ |____\__,_|_.__/__/
+
+pragma solidity ^0.8.18;
+
+import "forge-std/Script.sol";
+import "forge-std/console2.sol";
+import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
+import "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+import "../contracts/L1/TaikoToken.sol";
+import "../contracts/L1/TaikoL1.sol";
+import "../contracts/bridge/Bridge.sol";
+import "../contracts/bridge/TokenVault.sol";
+import "../contracts/signal/SignalService.sol";
+import "../contracts/common/AddressManager.sol";
+import "../contracts/test/erc20/FreeMintERC20.sol";
+import "../contracts/test/erc20/MayFailFreeMintERC20.sol";
+import "../test/LibLn.sol";
+
+contract DeployOnL1 is Script {
+ using SafeCastUpgradeable for uint256;
+
+ bytes32 public genesisHash = vm.envBytes32("L2_GENESIS_HASH");
+
+ uint256 public deployerPrivateKey = vm.envUint("PRIVATE_KEY");
+
+ address public taikoL2Address = vm.envAddress("TAIKO_L2_ADDRESS");
+
+ address public l2SignalService = vm.envAddress("L2_SIGNAL_SERVICE");
+
+ address public owner = vm.envAddress("OWNER");
+
+ address public oracleProver = vm.envAddress("ORACLE_PROVER");
+
+ address public soloProposer = vm.envAddress("SOLO_PROPOSER");
+
+ address public sharedSignalService = vm.envAddress("SHARED_SIGNAL_SERVICE");
+
+ address public treasure = vm.envAddress("TREASURE");
+
+ address public taikoTokenPremintRecipient =
+ vm.envAddress("TAIKO_TOKEN_PREMINT_RECIPIENT");
+
+ uint256 public taikoTokenPremintAmount =
+ vm.envUint("TAIKO_TOKEN_PREMINT_AMOUNT");
+
+ TaikoL1 taikoL1;
+ address public addressManagerProxy;
+
+ // New fee/reward related variables
+ uint16 public constant PROOF_TIME_TARGET = 1800; // For mainnet it is around 30 mins, but choose carefully ! (Testnet is different !)
+ uint8 public constant ADJUSTMENT_QUOTIENT = 16;
+
+ error FAILED_TO_DEPLOY_PLONK_VERIFIER(string contractPath);
+
+ function run() external {
+ require(owner != address(0), "owner is zero");
+ require(taikoL2Address != address(0), "taikoL2Address is zero");
+ require(l2SignalService != address(0), "l2SignalService is zero");
+ require(treasure != address(0), "treasure is zero");
+ require(
+ taikoTokenPremintRecipient != address(0),
+ "taikoTokenPremintRecipient is zero"
+ );
+ require(
+ taikoTokenPremintAmount < type(uint64).max,
+ "premint too large"
+ );
+
+ vm.startBroadcast(deployerPrivateKey);
+
+ // AddressManager
+ AddressManager addressManager = new AddressManager();
+ addressManagerProxy = deployProxy(
+ "address_manager",
+ address(addressManager),
+ bytes.concat(addressManager.init.selector)
+ );
+
+ // TaikoL1
+ taikoL1 = new TaikoL1();
+ uint256 l2ChainId = taikoL1.getConfig().chainId;
+ require(l2ChainId != block.chainid, "same chainid");
+
+ setAddress(l2ChainId, "taiko", taikoL2Address);
+ setAddress(l2ChainId, "signal_service", l2SignalService);
+ setAddress("oracle_prover", oracleProver);
+ setAddress("solo_proposer", soloProposer);
+ setAddress(l2ChainId, "treasure", treasure);
+
+ // TaikoToken
+ TaikoToken taikoToken = new TaikoToken();
+
+ address[] memory premintRecipients = new address[](1);
+ uint256[] memory premintAmounts = new uint256[](1);
+ premintRecipients[0] = taikoTokenPremintRecipient;
+ premintAmounts[0] = taikoTokenPremintAmount;
+
+ deployProxy(
+ "taiko_token",
+ address(taikoToken),
+ bytes.concat(
+ taikoToken.init.selector,
+ abi.encode(
+ addressManagerProxy,
+ "Taiko Token",
+ "TKO",
+ premintRecipients,
+ premintAmounts
+ )
+ )
+ );
+
+ // HorseToken && BullToken
+ address horseToken = address(new FreeMintERC20("Horse Token", "HORSE"));
+ console.log("HorseToken", horseToken);
+
+ address bullToken = address(
+ new MayFailFreeMintERC20("Bull Token", "BLL")
+ );
+ console.log("BullToken", bullToken);
+
+ uint64 feeBase = 1 ** 8; // Taiko Token's decimals is 8, not 18
+
+ // Calculating it for our needs based on testnet/mainnet. We need it in
+ // order to make the fees on the same level - in ideal circumstences.
+ // See Brecht's comment https://github.com/taikoxyz/taiko-mono/pull/13564
+ uint64 initProofTimeIssued = LibLn.calcInitProofTimeIssued(
+ feeBase,
+ PROOF_TIME_TARGET,
+ ADJUSTMENT_QUOTIENT
+ );
+
+ address taikoL1Proxy = deployProxy(
+ "taiko",
+ address(taikoL1),
+ bytes.concat(
+ taikoL1.init.selector,
+ abi.encode(
+ addressManagerProxy,
+ genesisHash,
+ feeBase,
+ initProofTimeIssued
+ )
+ )
+ );
+ setAddress("proto_broker", taikoL1Proxy);
+
+ // Bridge
+ Bridge bridge = new Bridge();
+ deployProxy(
+ "bridge",
+ address(bridge),
+ bytes.concat(bridge.init.selector, abi.encode(addressManagerProxy))
+ );
+
+ // TokenVault
+ TokenVault tokenVault = new TokenVault();
+ deployProxy(
+ "token_vault",
+ address(tokenVault),
+ bytes.concat(
+ tokenVault.init.selector,
+ abi.encode(addressManagerProxy)
+ )
+ );
+
+ // SignalService
+ if (sharedSignalService == address(0)) {
+ SignalService signalService = new SignalService();
+ deployProxy(
+ "signal_service",
+ address(signalService),
+ bytes.concat(
+ signalService.init.selector,
+ abi.encode(addressManagerProxy)
+ )
+ );
+ } else {
+ console.log(
+ "Warining: using shared signal service: ",
+ sharedSignalService
+ );
+ setAddress("signal_service", sharedSignalService);
+ }
+
+ // PlonkVerifier
+ deployPlonkVerifiers();
+
+ vm.stopBroadcast();
+ }
+
+ function deployPlonkVerifiers() private {
+ address[] memory plonkVerifiers = new address[](2);
+ plonkVerifiers[0] = deployYulContract(
+ "contracts/libs/yul/PlonkVerifier_10_txs.yulp"
+ );
+ plonkVerifiers[1] = deployYulContract(
+ "contracts/libs/yul/PlonkVerifier_80_txs.yulp"
+ );
+
+ for (uint16 i = 0; i < plonkVerifiers.length; ++i) {
+ setAddress(taikoL1.getVerifierName(i), plonkVerifiers[i]);
+ }
+ }
+
+ function deployYulContract(
+ string memory contractPath
+ ) private returns (address) {
+ string[] memory cmds = new string[](3);
+ cmds[0] = "bash";
+ cmds[1] = "-c";
+ cmds[2] = string.concat(
+ vm.projectRoot(),
+ "/bin/solc --yul --bin ",
+ string.concat(vm.projectRoot(), "/", contractPath),
+ " | grep -A1 Binary | tail -1"
+ );
+
+ bytes memory bytecode = vm.ffi(cmds);
+
+ address deployedAddress;
+ assembly {
+ deployedAddress := create(0, add(bytecode, 0x20), mload(bytecode))
+ }
+
+ if (deployedAddress == address(0))
+ revert FAILED_TO_DEPLOY_PLONK_VERIFIER(contractPath);
+
+ console.log(contractPath, deployedAddress);
+
+ return deployedAddress;
+ }
+
+ function deployProxy(
+ string memory name,
+ address implementation,
+ bytes memory data
+ ) private returns (address proxy) {
+ proxy = address(
+ new TransparentUpgradeableProxy(implementation, owner, data)
+ );
+
+ console.log(name, "(impl) ->", implementation);
+ console.log(name, "(proxy) ->", proxy);
+
+ if (addressManagerProxy != address(0)) {
+ AddressManager(addressManagerProxy).setAddress(
+ block.chainid,
+ name,
+ proxy
+ );
+ }
+
+ vm.writeJson(
+ vm.serializeAddress("deployment", name, proxy),
+ string.concat(vm.projectRoot(), "/deployments/deploy_l1.json")
+ );
+ }
+
+ function setAddress(string memory name, address addr) private {
+ setAddress(block.chainid, name, addr);
+ }
+
+ function setAddress(
+ uint256 chainId,
+ string memory name,
+ address addr
+ ) private {
+ console.log(chainId, name, "--->", addr);
+ if (addr != address(0)) {
+ AddressManager(addressManagerProxy).setAddress(chainId, name, addr);
+ }
+ }
+}
diff --git a/packages/protocol/scripts/download_solc.sh b/packages/protocol/script/download_solc.sh
similarity index 100%
rename from packages/protocol/scripts/download_solc.sh
rename to packages/protocol/script/download_solc.sh
diff --git a/packages/protocol/script/test_deploy_on_l1.sh b/packages/protocol/script/test_deploy_on_l1.sh
new file mode 100755
index 00000000000..0fd8981c688
--- /dev/null
+++ b/packages/protocol/script/test_deploy_on_l1.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This script is only used by `pnpm deploy:foundry`.
+set -e
+
+PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
+SHARED_SIGNAL_SERVICE=0x0000000000000000000000000000000000000000 \
+ORACLE_PROVER=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
+SOLO_PROPOSER=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
+OWNER=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 \
+TAIKO_L2_ADDRESS=0x0000777700000000000000000000000000000001 \
+L2_SIGNAL_SERVICE=0x0000777700000000000000000000000000000007 \
+TAIKO_TOKEN_PREMINT_RECIPIENT=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
+TAIKO_TOKEN_PREMINT_AMOUNT=0xffff \
+TREASURE=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 \
+L2_GENESIS_HASH=0xee1950562d42f0da28bd4550d88886bc90894c77c9c9eaefef775d4c8223f259 \
+forge script script/DeployOnL1.s.sol:DeployOnL1 \
+ --fork-url http://localhost:8545 \
+ --broadcast \
+ --ffi \
+ -vvvv \
+ --via-ir \
diff --git a/packages/protocol/tasks/compile_yul.ts b/packages/protocol/tasks/compile_yul.ts
deleted file mode 100644
index e2ec2563ee4..00000000000
--- a/packages/protocol/tasks/compile_yul.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { task } from "hardhat/config";
-import * as glob from "glob";
-import * as path from "path";
-import * as utils from "./utils";
-import * as fs from "fs";
-import * as log from "./log";
-
-task("compile_yul").setAction(async function () {
- const yulContracts = glob.sync(
- path.join(__dirname, "../contracts/**/*.yulp")
- );
- const outputDir = path.join(__dirname, "../artifacts/yul");
-
- if (!fs.existsSync(outputDir)) {
- fs.mkdirSync(outputDir, { recursive: true });
- }
-
- log.debug({ yulContracts });
-
- for (const yulContractPath of yulContracts) {
- const bytecode = utils.compileYulContract(yulContractPath);
- const contractName = path.parse(path.basename(yulContractPath)).name;
- const jsonOutputPath = path.join(outputDir, `${contractName}.json`);
-
- fs.writeFileSync(
- jsonOutputPath,
- JSON.stringify({ contractName, bytecode })
- );
- }
-});
diff --git a/packages/protocol/tasks/config.ts b/packages/protocol/tasks/config.ts
deleted file mode 100644
index cc9ebfd4334..00000000000
--- a/packages/protocol/tasks/config.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// https://github.com/ethereum-lists/chains/pull/1611
-export const K_CHAIN_ID = 167;
-export const K_DEPLOY_CONFIRMATIONS = 12;
diff --git a/packages/protocol/tasks/deploy_L1.ts b/packages/protocol/tasks/deploy_L1.ts
deleted file mode 100644
index 35525abb218..00000000000
--- a/packages/protocol/tasks/deploy_L1.ts
+++ /dev/null
@@ -1,387 +0,0 @@
-import * as ethers from "ethers";
-import { task } from "hardhat/config";
-import * as types from "hardhat/internal/core/params/argumentTypes";
-import * as config from "./config";
-import * as log from "./log";
-import * as utils from "./utils";
-
-task("deploy_L1")
- .addParam("daoVault", "The DAO vault address")
- .addParam("teamVault", "The team vault address")
- .addOptionalParam(
- "taikoL2",
- "The TaikoL2 address",
- ethers.constants.AddressZero
- )
- .addOptionalParam(
- "l2GenesisBlockHash",
- "L2 genesis block hash",
- ethers.constants.HashZero
- )
- .addOptionalParam("l2ChainId", "L2 chain id", config.K_CHAIN_ID, types.int)
- .addOptionalParam(
- "bridgeFunderPrivateKey",
- "Private key of the L1 bridge funder",
- "",
- types.string
- )
- .addOptionalParam(
- "bridgeFund",
- "L1 bridge's initial fund in hex",
- "",
- types.string
- )
- .addOptionalParam(
- "oracleProver",
- "Address of the oracle prover",
- "",
- types.string
- )
- .addOptionalParam(
- "soloProposer",
- "Address of the solo proposer",
- "",
- types.string
- )
- .addOptionalParam(
- "confirmations",
- "Number of confirmations to wait for deploy transaction.",
- config.K_DEPLOY_CONFIRMATIONS,
- types.int
- )
- .setAction(async (args, hre: any) => {
- if (
- hre.network.name === "localhost" ||
- hre.network.name === "hardhat"
- ) {
- args.confirmations = 1;
- } else if (
- hre.network.name === "ropsten" ||
- hre.network.name === "goerli"
- ) {
- args.confirmations = 6;
- }
-
- hre.args = args;
- await deployContracts(hre);
- });
-
-export async function deployContracts(hre: any) {
- const network = hre.network.name;
- const { chainId } = await hre.ethers.provider.getNetwork();
- const deployer = await utils.getDeployer(hre);
- const daoVault = hre.args.daoVault;
- const teamVault = hre.args.teamVault;
- const l2GenesisBlockHash = hre.args.l2GenesisBlockHash;
- const taikoL2Address = hre.args.taikoL2;
- const l2ChainId = hre.args.l2ChainId;
- const bridgeFunderPrivateKey = hre.args.bridgeFunderPrivateKey;
- const bridgeFund = hre.args.bridgeFund;
- const oracleProver = hre.args.oracleProver;
- const soloProposer = hre.args.soloProposer;
-
- log.debug(`network: ${network}`);
- log.debug(`chainId: ${chainId}`);
- log.debug(`deployer: ${deployer}`);
- log.debug(`daoVault: ${daoVault}`);
- log.debug(`l2GenesisBlockHash: ${l2GenesisBlockHash}`);
- log.debug(`taikoL2Address: ${taikoL2Address}`);
- log.debug(`l2ChainId: ${l2ChainId}`);
- log.debug(`bridgeFunderPrivateKey: ${bridgeFunderPrivateKey}`);
- log.debug(`bridgeFund: ${bridgeFund}`);
- log.debug(`oracleProver: ${oracleProver}`);
- log.debug(`soloProposer: ${soloProposer}`);
- log.debug(`confirmations: ${hre.args.confirmations}`);
- log.debug();
-
- // AddressManager
- const AddressManager = await utils.deployContract(hre, "AddressManager");
- await utils.waitTx(hre, await AddressManager.init());
-
- const ProofVerifier = await utils.deployContract(hre, "ProofVerifier");
- await utils.waitTx(hre, await ProofVerifier.init(AddressManager.address));
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- `${chainId}.proof_verifier`,
- ProofVerifier.address
- )
- );
-
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(`${chainId}.dao_vault`, daoVault)
- );
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(`${chainId}.team_vault`, teamVault)
- );
- // Used by LibProving
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(`${l2ChainId}.taiko`, taikoL2Address)
- );
-
- // TaikoToken
- const TaikoToken = await utils.deployContract(hre, "TaikoToken");
- await utils.waitTx(
- hre,
- await TaikoToken.init(
- "Test Taiko Token",
- "TTKO",
- AddressManager.address
- )
- );
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- `${chainId}.tko_token`,
- TaikoToken.address
- )
- );
-
- // HorseToken
- const HorseToken = await utils.deployContract(hre, "FreeMintERC20", {}, [
- "Horse Token",
- "HORSE",
- ]);
-
- // BullToken
- const BullToken = await utils.deployContract(
- hre,
- "MayFailFreeMintERC20",
- {},
- ["Bull Token", "BLL"]
- );
-
- // TaikoL1
- const TaikoL1 = await utils.deployContract(
- hre,
- "TaikoL1",
- await deployBaseLibs(hre)
- );
-
- const feeBase = hre.ethers.BigNumber.from(10).pow(18);
-
- await utils.waitTx(
- hre,
- await TaikoL1.init(AddressManager.address, l2GenesisBlockHash, feeBase)
- );
-
- // Used by LibBridgeRead
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(`${chainId}.taiko`, TaikoL1.address)
- );
-
- // Used by TaikoToken
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- `${chainId}.proto_broker`,
- TaikoL1.address
- )
- );
-
- // Bridge
- const Bridge = await deployBridge(hre, AddressManager.address);
-
- // TokenVault
- const TokenVault = await deployTokenVault(hre, AddressManager.address);
-
- // Used by TokenVault
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(`${chainId}.bridge`, Bridge.address)
- );
-
- // Fund L1 bridge, which is necessary when there is a L2 faucet
- if (
- bridgeFunderPrivateKey.length &&
- hre.ethers.utils.isHexString(bridgeFund)
- ) {
- const funder = new hre.ethers.Wallet(
- bridgeFunderPrivateKey,
- hre.ethers.provider
- );
-
- await utils.waitTx(
- hre,
- await funder.sendTransaction({
- to: Bridge.address,
- value: hre.ethers.BigNumber.from(bridgeFund),
- })
- );
-
- log.debug(
- `L1 bridge balance: ${hre.ethers.utils.hexlify(
- await hre.ethers.provider.getBalance(Bridge.address)
- )}`
- );
- }
-
- // SignalService
- const SignalService = await deploySignalService(
- hre,
- AddressManager.address
- );
-
- // Used by Bridge
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- `${chainId}.signal_service`,
- SignalService.address
- )
- );
-
- // PlonkVerifier
- const PlonkVerifiers = await deployPlonkVerifiers(hre);
-
- // Used by ProofVerifier
- for (let i = 0; i < PlonkVerifiers.length; i++) {
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- // string(abi.encodePacked("plonk_verifier_", i))
- `${chainId}.${Buffer.from(
- ethers.utils.arrayify(
- ethers.utils.solidityPack(
- ["string", "uint16"],
- ["plonk_verifier_", i]
- )
- )
- ).toString()}`,
- PlonkVerifiers[i].address
- )
- );
- }
-
- if (ethers.utils.isAddress(oracleProver)) {
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- `${chainId}.oracle_prover`,
- oracleProver
- )
- );
- }
-
- if (ethers.utils.isAddress(soloProposer)) {
- await utils.waitTx(
- hre,
- await AddressManager.setAddress(
- `${chainId}.solo_proposer`,
- soloProposer
- )
- );
- }
-
- // save deployments
- const deployments = {
- network,
- chainId,
- deployer,
- l2GenesisBlockHash,
- contracts: Object.assign(
- { AddressManager: AddressManager.address },
- { TaikoToken: TaikoToken.address },
- { TaikoL1: TaikoL1.address },
- { Bridge: Bridge.address },
- { SignalService: SignalService.address },
- { TokenVault: TokenVault.address },
- { BullToken: BullToken.address },
- { HorseToken: HorseToken.address }
- ),
- };
-
- utils.saveDeployments(`${network}_L1`, deployments);
-
- return deployments;
-}
-
-async function deployBaseLibs(hre: any) {
- const libReceiptDecoder = await utils.deployContract(
- hre,
- "LibReceiptDecoder"
- );
- const libTxDecoder = await utils.deployContract(hre, "LibTxDecoder");
-
- const libVerifying = await utils.deployContract(hre, "LibVerifying", {});
- const libProposing = await utils.deployContract(hre, "LibProposing", {});
-
- const libProving = await utils.deployContract(hre, "LibProving", {
- LibReceiptDecoder: libReceiptDecoder.address,
- LibTxDecoder: libTxDecoder.address,
- });
-
- return {
- LibVerifying: libVerifying.address,
- LibProposing: libProposing.address,
- LibProving: libProving.address,
- };
-}
-
-async function deployBridge(hre: any, addressManager: string): Promise {
- const libTrieProof = await utils.deployContract(hre, "LibTrieProof");
-
- const Bridge = await utils.deployContract(hre, "Bridge", {
- LibTrieProof: libTrieProof.address,
- });
-
- await utils.waitTx(hre, await Bridge.init(addressManager));
-
- return Bridge;
-}
-
-async function deployTokenVault(
- hre: any,
- addressManager: string
-): Promise {
- const TokenVault = await utils.deployContract(hre, "TokenVault");
-
- await utils.waitTx(hre, await TokenVault.init(addressManager));
-
- return TokenVault;
-}
-
-async function deploySignalService(
- hre: any,
- addressManager: string
-): Promise {
- const libTrieProof = await utils.deployContract(hre, "LibTrieProof");
-
- const SignalService = await utils.deployContract(hre, "SignalService", {
- LibTrieProof: libTrieProof.address,
- });
-
- await utils.waitTx(hre, await SignalService.init(addressManager));
-
- return SignalService;
-}
-
-async function deployPlonkVerifiers(hre: any): Promise {
- const PlonkVerifier10TxsByteCode = utils.compileYulContract(
- "../contracts/libs/yul/PlonkVerifier_10_txs.yulp"
- );
- const PlonkVerifier80TxsByteCode = utils.compileYulContract(
- "../contracts/libs/yul/PlonkVerifier_80_txs.yulp"
- );
-
- return [
- {
- address: await utils.deployBytecode(
- hre,
- PlonkVerifier10TxsByteCode,
- "PlonkVerifier_10_txs"
- ),
- },
- {
- address: await utils.deployBytecode(
- hre,
- PlonkVerifier80TxsByteCode,
- "PlonkVerifier_80_txs"
- ),
- },
- ];
-}
diff --git a/packages/protocol/tasks/log.ts b/packages/protocol/tasks/log.ts
deleted file mode 100644
index 45733800e77..00000000000
--- a/packages/protocol/tasks/log.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import * as chalk from "chalk";
-
-// default LOG_LEVEL: INFO
-function isInfoEnabled() {
- return (
- !process.env.LOG_LEVEL ||
- (process.env.LOG_LEVEL &&
- process.env.LOG_LEVEL.toUpperCase() === "INFO") ||
- isDebugEnabled()
- );
-}
-
-function isDebugEnabled() {
- return (
- process.env.LOG_LEVEL && process.env.LOG_LEVEL.toUpperCase() === "DEBUG"
- );
-}
-
-export function info(...args: any[]) {
- if (isInfoEnabled()) {
- console.log(chalk.blue.bold(["[INFO]", ...args].join(" ")));
- }
-}
-
-export function debug(...args: any[]) {
- if (isDebugEnabled()) {
- console.log(...args);
- }
-}
-
-export function warn(...args: any[]) {
- console.log(chalk.magenta.bold(["[WARN]", ...args].join(" ")));
-}
-
-export function error(...args: any[]) {
- console.log(chalk.red.bold.underline(["[ERROR]", ...args].join(" ")));
-}
diff --git a/packages/protocol/tasks/utils.ts b/packages/protocol/tasks/utils.ts
deleted file mode 100644
index ce256168405..00000000000
--- a/packages/protocol/tasks/utils.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-import * as childProcess from "child_process";
-import * as fs from "fs";
-import * as path from "path";
-import * as log from "./log";
-
-async function deployContract(
- hre: any,
- contractName: string,
- libraries = {},
- args: any[] = [],
- overrides = {}
-) {
- const contractArgs = args || [];
- const contractArtifacts = await hre.ethers.getContractFactory(
- contractName,
- {
- libraries: libraries,
- }
- );
-
- const deployed = await contractArtifacts.deploy(...contractArgs, overrides);
- log.debug(
- `${contractName} deploying, tx ${deployed.deployTransaction.hash}, waiting for confirmations`
- );
-
- await deployed.deployed();
-
- log.debug(`${contractName} deployed at ${deployed.address}`);
- return deployed;
-}
-
-function compileYulContract(contractPath: string): string {
- const SOLC_COMMAND = path.join(__dirname, "../bin/solc");
-
- if (!fs.existsSync(SOLC_COMMAND)) {
- throw new Error(
- `sloc command not found in ${SOLC_COMMAND}, please run "./scripts/download_solc.sh".`
- );
- }
-
- if (!path.isAbsolute(contractPath)) {
- contractPath = path.join(__dirname, contractPath);
- }
-
- const compile = childProcess.spawnSync(SOLC_COMMAND, [
- "--yul",
- "--bin",
- contractPath,
- ]);
-
- let isNextLineByteCode = false;
- let byteCode = null;
- for (const line of compile.stdout.toString().split("\n")) {
- if (isNextLineByteCode) {
- byteCode = line;
- break;
- }
-
- if (line.includes("Binary representation:")) {
- isNextLineByteCode = true;
- }
- }
-
- if (!byteCode) {
- throw new Error(
- `failed to compile PlonkVerifier, sloc: ${SOLC_COMMAND}, contract: ${contractPath}`
- );
- }
-
- log.debug(
- `${contractPath} compiled successfully, byte code length: ${byteCode.length}`
- );
-
- if (!byteCode.startsWith("0x")) {
- byteCode = `0x${byteCode}`;
- }
-
- return byteCode;
-}
-
-async function deployBytecode(
- hre: any,
- byteCode: string,
- name: string
-): Promise {
- const [signer] = await hre.ethers.getSigners();
-
- const tx = await signer.sendTransaction({ data: byteCode });
- const receipt = await tx.wait();
-
- log.debug(`${name} deploying, tx ${tx.hash}, waiting for confirmations`);
-
- if (receipt.status !== 1) {
- throw new Error(
- `failed to create ${name} contract, transaction ${tx.hash} reverted`
- );
- }
-
- return receipt.contractAddress;
-}
-
-async function getDeployer(hre: any) {
- const accounts = await hre.ethers.provider.listAccounts();
- if (accounts[0] !== undefined) {
- return accounts[0];
- }
-
- throw new Error(
- `Could not get account, check hardhat.config.ts: networks.${hre.network.name}.accounts`
- );
-}
-
-async function waitTx(hre: any, tx: any) {
- return tx.wait(hre.args.confirmations);
-}
-
-async function getContract(hre: any, abi: string[], contractAddress: string) {
- const signers = await hre.ethers.getSigners();
-
- if (!signers || signers.length === 0) {
- throw new Error(
- `Could not get account, check hardhat.config.ts. network: ${hre.network.name}`
- );
- }
-
- return new hre.ethers.Contract(contractAddress, abi, signers[0]);
-}
-
-function saveDeployments(_fileName: string, deployments: any) {
- const fileName = `deployments/${_fileName}.json`;
- fs.writeFileSync(fileName, JSON.stringify(deployments, undefined, 2));
- log.debug(`deployments saved to ${fileName}`);
-}
-
-function getDeployments(_fileName: string) {
- const fileName = `deployments/${_fileName}.json`;
- const json = fs.readFileSync(fileName);
- return JSON.parse(`${json}`);
-}
-
-async function decode(hre: any, type: any, data: any) {
- return hre.ethers.utils.defaultAbiCoder.decode([type], data).toString();
-}
-
-export {
- deployContract,
- compileYulContract,
- deployBytecode,
- getDeployer,
- waitTx,
- getContract,
- saveDeployments,
- getDeployments,
- decode,
-};
diff --git a/packages/protocol/test/Bridge.t.sol b/packages/protocol/test/Bridge.t.sol
new file mode 100644
index 00000000000..8c8d10c8a4c
--- /dev/null
+++ b/packages/protocol/test/Bridge.t.sol
@@ -0,0 +1,436 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {IBridge, Bridge} from "../contracts/bridge/Bridge.sol";
+import {BridgeErrors} from "../contracts/bridge/BridgeErrors.sol";
+import {EtherVault} from "../contracts/bridge/EtherVault.sol";
+import {console2} from "forge-std/console2.sol";
+import {LibBridgeStatus} from "../contracts/bridge/libs/LibBridgeStatus.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Test} from "forge-std/Test.sol";
+import {IXchainSync} from "../contracts/common/IXchainSync.sol";
+
+contract BadReceiver {
+ receive() external payable {
+ revert("can not send to this contract");
+ }
+
+ fallback() external payable {
+ revert("can not send to this contract");
+ }
+
+ function transfer() public pure {
+ revert("this fails");
+ }
+}
+
+contract PrankXchainSync is IXchainSync {
+ bytes32 private _blockHash;
+ bytes32 private _signalRoot;
+
+ function setXchainBlockHeader(bytes32 blockHash) external {
+ _blockHash = blockHash;
+ }
+
+ function setXchainSignalRoot(bytes32 signalRoot) external {
+ _signalRoot = signalRoot;
+ }
+
+ function getXchainBlockHash(uint256) external view returns (bytes32) {
+ return _blockHash;
+ }
+
+ function getXchainSignalRoot(uint256) external view returns (bytes32) {
+ return _signalRoot;
+ }
+}
+
+contract BridgeTest is Test {
+ AddressManager addressManager;
+ BadReceiver badReceiver;
+ Bridge bridge;
+ Bridge destChainBridge;
+ EtherVault etherVault;
+ SignalService signalService;
+ PrankXchainSync xChainSync;
+ uint256 destChainId = 19389;
+
+ address public constant Alice = 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4;
+
+ address public constant Bob = 0x50081b12838240B1bA02b3177153Bca678a86078;
+
+ function setUp() public {
+ vm.startPrank(Alice);
+ vm.deal(Alice, 100 ether);
+ addressManager = new AddressManager();
+ addressManager.init();
+
+ bridge = new Bridge();
+ bridge.init(address(addressManager));
+
+ destChainBridge = new Bridge();
+ destChainBridge.init(address(addressManager));
+
+ signalService = new SignalService();
+ signalService.init(address(addressManager));
+
+ etherVault = new EtherVault();
+ etherVault.init(address(addressManager));
+
+ xChainSync = new PrankXchainSync();
+
+ addressManager.setAddress(
+ block.chainid,
+ "signal_service",
+ address(signalService)
+ );
+
+ addressManager.setAddress(
+ destChainId,
+ "bridge",
+ address(destChainBridge)
+ );
+
+ vm.stopPrank();
+ }
+
+ function test_send_message_ether_reverts_if_value_doesnt_match_expected()
+ public
+ {
+ uint256 amount = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: 0,
+ destChain: destChainId
+ });
+
+ vm.expectRevert(BridgeErrors.B_INCORRECT_VALUE.selector);
+ bridge.sendMessage(message);
+ }
+
+ function test_send_message_ether_reverts_when_owner_is_zero_address()
+ public
+ {
+ uint256 amount = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: address(0),
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: 0,
+ destChain: destChainId
+ });
+
+ vm.expectRevert(BridgeErrors.B_OWNER_IS_NULL.selector);
+ bridge.sendMessage{value: amount}(message);
+ }
+
+ function test_send_message_ether_reverts_when_dest_chain_is_not_enabled()
+ public
+ {
+ uint256 amount = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: 0,
+ destChain: destChainId + 1
+ });
+
+ vm.expectRevert(BridgeErrors.B_WRONG_CHAIN_ID.selector);
+ bridge.sendMessage{value: amount}(message);
+ }
+
+ function test_send_message_ether_reverts_when_dest_chain_same_as_block_chainid()
+ public
+ {
+ uint256 amount = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: 0,
+ destChain: block.chainid
+ });
+
+ vm.expectRevert(BridgeErrors.B_WRONG_CHAIN_ID.selector);
+ bridge.sendMessage{value: amount}(message);
+ }
+
+ function test_send_message_ether_reverts_when_to_is_zero_address() public {
+ uint256 amount = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: address(0),
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: 0,
+ destChain: destChainId
+ });
+
+ vm.expectRevert(BridgeErrors.B_WRONG_TO_ADDRESS.selector);
+ bridge.sendMessage{value: amount}(message);
+ }
+
+ function test_send_message_ether_with_no_processing_fee() public {
+ uint256 amount = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: 0,
+ destChain: destChainId
+ });
+
+ bytes32 msgHash = bridge.sendMessage{value: amount}(message);
+
+ bool isMessageSent = bridge.isMessageSent(msgHash);
+ assertEq(isMessageSent, true);
+ }
+
+ function test_send_message_ether_with_processing_fee() public {
+ uint256 amount = 1 wei;
+ uint256 processingFee = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: processingFee,
+ destChain: destChainId
+ });
+
+ bytes32 msgHash = bridge.sendMessage{value: amount + processingFee}(
+ message
+ );
+
+ bool isMessageSent = bridge.isMessageSent(msgHash);
+ assertEq(isMessageSent, true);
+ }
+
+ function test_send_message_ether_with_processing_fee_invalid_amount()
+ public
+ {
+ uint256 amount = 1 wei;
+ uint256 processingFee = 1 wei;
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: amount,
+ callValue: 0,
+ gasLimit: 0,
+ processingFee: processingFee,
+ destChain: destChainId
+ });
+
+ vm.expectRevert(BridgeErrors.B_INCORRECT_VALUE.selector);
+ bridge.sendMessage{value: amount}(message);
+ }
+
+ // test with a known good merkle proof / message since we cant generate proofs via rpc
+ // in foundry
+ function test_process_message() public {
+ vm.startPrank(Alice);
+ (
+ IBridge.Message memory message,
+ bytes memory proof
+ ) = setUpPredefinedSuccessfulProcessMessageCall();
+
+ bytes32 msgHash = destChainBridge.hashMessage(message);
+
+ bool isMessageReceived = destChainBridge.isMessageReceived(
+ msgHash,
+ 1336,
+ proof
+ );
+
+ assertEq(isMessageReceived, true);
+
+ destChainBridge.processMessage(message, proof);
+
+ LibBridgeStatus.MessageStatus status = destChainBridge.getMessageStatus(
+ msgHash
+ );
+
+ assertEq(status == LibBridgeStatus.MessageStatus.DONE, true);
+ }
+
+ // test with a known good merkle proof / message since we cant generate proofs via rpc
+ // in foundry
+ function test_retry_message_and_end_up_in_failed_status() public {
+ vm.startPrank(Alice);
+ (
+ IBridge.Message memory message,
+ bytes memory proof
+ ) = setUpPredefinedSuccessfulProcessMessageCall();
+
+ // etch bad receiver at the to address, so it fails.
+ vm.etch(message.to, address(badReceiver).code);
+
+ bytes32 msgHash = destChainBridge.hashMessage(message);
+
+ bool isMessageReceived = destChainBridge.isMessageReceived(
+ msgHash,
+ 1336,
+ proof
+ );
+
+ assertEq(isMessageReceived, true);
+
+ destChainBridge.processMessage(message, proof);
+
+ LibBridgeStatus.MessageStatus status = destChainBridge.getMessageStatus(
+ msgHash
+ );
+
+ assertEq(status == LibBridgeStatus.MessageStatus.RETRIABLE, true);
+
+ vm.stopPrank();
+ vm.prank(message.owner);
+
+ destChainBridge.retryMessage(message, true);
+
+ LibBridgeStatus.MessageStatus postRetryStatus = destChainBridge
+ .getMessageStatus(msgHash);
+
+ assertEq(postRetryStatus == LibBridgeStatus.MessageStatus.FAILED, true);
+ }
+
+ function retry_message_reverts_when_status_non_retriable() public {
+ IBridge.Message memory message = newMessage({
+ owner: Alice,
+ to: Alice,
+ depositValue: 1,
+ callValue: 0,
+ gasLimit: 10000,
+ processingFee: 1,
+ destChain: destChainId
+ });
+
+ vm.expectRevert(BridgeErrors.B_MSG_NON_RETRIABLE.selector);
+ destChainBridge.retryMessage(message, true);
+ }
+
+ function retry_message_reverts_when_last_attempt_and_message_is_not_owner()
+ public
+ {
+ vm.startPrank(Alice);
+ IBridge.Message memory message = newMessage({
+ owner: Bob,
+ to: Alice,
+ depositValue: 1,
+ callValue: 0,
+ gasLimit: 10000,
+ processingFee: 1,
+ destChain: destChainId
+ });
+
+ vm.expectRevert(BridgeErrors.B_DENIED.selector);
+ destChainBridge.retryMessage(message, true);
+ }
+
+ function setUpPredefinedSuccessfulProcessMessageCall()
+ internal
+ returns (IBridge.Message memory, bytes memory)
+ {
+ badReceiver = new BadReceiver();
+
+ uint256 dest = 1337;
+ addressManager.setAddress(dest, "taiko", address(xChainSync));
+
+ addressManager.setAddress(
+ 1336,
+ "bridge",
+ 0x564540a26Fb667306b3aBdCB4ead35BEb88698ab
+ );
+
+ addressManager.setAddress(dest, "bridge", address(destChainBridge));
+
+ addressManager.setAddress(dest, "ether_vault", address(etherVault));
+
+ etherVault.authorize(address(destChainBridge), true);
+
+ vm.deal(address(etherVault), 100 ether);
+
+ addressManager.setAddress(
+ dest,
+ "signal_service",
+ address(signalService)
+ );
+
+ xChainSync.setXchainBlockHeader(
+ 0xd5f5d8ac6bc37139c97389b00e9cf53e89c153ad8a5fc765ffe9f44ea9f3d31e
+ );
+
+ xChainSync.setXchainSignalRoot(
+ 0x631b214fb030d82847224f0b3d3b906a6764dded176ad3c7262630204867ba85
+ );
+
+ vm.deal(address(destChainBridge), 1 ether);
+
+ vm.chainId(dest);
+
+ // known message that corresponds with below proof.
+ IBridge.Message memory message = IBridge.Message({
+ id: 0,
+ sender: 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39,
+ srcChainId: 1336,
+ destChainId: dest,
+ owner: 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39,
+ to: 0x200708D76eB1B69761c23821809d53F65049939e,
+ refundAddress: 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4,
+ depositValue: 1000,
+ callValue: 1000,
+ processingFee: 1000,
+ gasLimit: 1000000,
+ data: "",
+ memo: ""
+ });
+
+ bytes
+ memory proof = hex"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003e0f7ff3b519ec113138509a5b1b6f54761cebc6891bc0ba4f904b89688b1ef8e051dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493470000000000000000000000000000000000000000000000000000000000000000a85358ff57974db8c9ce2ecabe743d44133f9d11e5da97e386111073f1a2f92c345bd00c2ef9db5726d84c184af67fdbad0be00921eb1dcbca674c427abb5c3ebda7d1e94e5b2b3d5e6a54c9a42423b1746afa4b264e7139877c0523c3397ec4000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000002000800002000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000001000040000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000009bbf55000000000000000000000000000000000000000000000000000000000001d4fb0000000000000000000000000000000000000000000000000000000064435d130000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d2e85500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061d883010a1a846765746888676f312e31382e38856c696e75780000000000000015b1ca61fbe1aa968ab60a461913aa40046b5357162466a4134d195647c14dd7488dd438abb39d6574e7d9d752fa2381bbd9dc780efc3fcc66af5285ebcb117b010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dbf8d9b8b3f8b18080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb28a02b70a98baa2507beffe8c266006cae52064dccf4fd1998af774ab3399029b38380808080a07394a09684ef3b2c87e9e2a753eb4ac78e2047b980e16d2e2133aee78946370d8080a0f4984a11f61a2921456141df88de6e1a710d28681b91af794c5a721e47839cd78080a09248167635e6f0eb40f782a6bbd237174104259b6af88b3c52086214098f0e2c8080a3e2a03ecd5e1f251bf1676a367f6b16e92ffe6b2638b4a27b3d31870d25442bd59ef4010000000000";
+
+ return (message, proof);
+ }
+
+ function newMessage(
+ address owner,
+ address to,
+ uint256 depositValue,
+ uint256 callValue,
+ uint256 gasLimit,
+ uint256 processingFee,
+ uint256 destChain
+ ) internal view returns (IBridge.Message memory) {
+ return
+ IBridge.Message({
+ owner: owner,
+ destChainId: destChain,
+ to: to,
+ depositValue: depositValue,
+ callValue: callValue,
+ processingFee: processingFee,
+ id: 0, // placeholder, will be overwritten
+ sender: owner, // placeholder, will be overwritten
+ srcChainId: block.chainid, // will be overwritten
+ refundAddress: owner,
+ gasLimit: gasLimit,
+ data: "",
+ memo: ""
+ });
+ }
+}
diff --git a/packages/protocol/test/EtherVault.t.sol b/packages/protocol/test/EtherVault.t.sol
new file mode 100644
index 00000000000..edbeb5ca0e6
--- /dev/null
+++ b/packages/protocol/test/EtherVault.t.sol
@@ -0,0 +1,117 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {EtherVault} from "../contracts/bridge/EtherVault.sol";
+import {BridgeErrors} from "../contracts/bridge/BridgeErrors.sol";
+
+contract TestEtherVault is Test {
+ AddressManager addressManager;
+ EtherVault etherVault;
+
+ address public constant Alice = 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4;
+ address public constant Bob = 0x200708D76eB1B69761c23821809d53F65049939e;
+
+ function setUp() public {
+ vm.deal(Alice, 1 ether);
+ vm.deal(Bob, 1 ether);
+ addressManager = new AddressManager();
+ addressManager.init();
+ etherVault = new EtherVault();
+ vm.prank(Alice);
+ etherVault.init(address(addressManager));
+ }
+
+ function test_authorize_reverts_when_not_owner_authorizing() public {
+ vm.prank(Bob);
+ vm.expectRevert("Ownable: caller is not the owner");
+ etherVault.authorize(Bob, true);
+
+ bool auth = etherVault.isAuthorized(Bob);
+ assertEq(auth, false);
+ }
+
+ function test_authorize_authorizes_when_owner_authorizing() public {
+ vm.prank(Alice);
+ etherVault.authorize(Bob, true);
+
+ bool auth = etherVault.isAuthorized(Bob);
+ assertEq(auth, true);
+ }
+
+ function test_authorize_reverts_when_authorizing_zero_address() public {
+ vm.prank(Alice);
+ vm.expectRevert(BridgeErrors.B_EV_PARAM.selector);
+ etherVault.authorize(address(0), true);
+ }
+
+ function test_authorize_reverts_when_authorizing_already_authorized_address()
+ public
+ {
+ vm.startPrank(Alice);
+ etherVault.authorize(Bob, true);
+ vm.expectRevert(BridgeErrors.B_EV_PARAM.selector);
+ etherVault.authorize(Bob, true);
+ bool auth = etherVault.isAuthorized(Bob);
+ assertEq(auth, true);
+ vm.stopPrank();
+ }
+
+ function test_receive_allows_sending_when_authorized_only() public {
+ assertEq(address(etherVault).balance, 0);
+ assertEq(Alice.balance > 0, true);
+ vm.startPrank(Alice);
+ etherVault.authorize(Alice, true);
+ (bool aliceSent, ) = address(etherVault).call{value: 1}("");
+ assertEq(aliceSent, true);
+ assertEq(address(etherVault).balance, 1);
+
+ vm.stopPrank();
+ assertEq(Bob.balance > 0, true);
+ vm.startPrank(Bob);
+
+ (bool bobSent, ) = address(etherVault).call{value: 1}("");
+ assertEq(bobSent, false);
+ vm.stopPrank();
+ }
+
+ function test_release_ether_reverts_when_zero_address() public {
+ vm.startPrank(Alice);
+ etherVault.authorize(Alice, true);
+ seedEtherVault();
+
+ vm.expectRevert(BridgeErrors.B_EV_DO_NOT_BURN.selector);
+ etherVault.releaseEther(address(0), 1 ether);
+ }
+
+ function test_release_ether_releases_to_authorized_sender() public {
+ vm.startPrank(Alice);
+ etherVault.authorize(Alice, true);
+ seedEtherVault();
+
+ uint256 aliceBalanceBefore = Alice.balance;
+ etherVault.releaseEther(1 ether);
+ uint256 aliceBalanceAfter = Alice.balance;
+ assertEq(aliceBalanceAfter - aliceBalanceBefore, 1 ether);
+ vm.stopPrank();
+ }
+
+ function test_release_ether_releases_to_receipient_via_authorized_sender()
+ public
+ {
+ vm.startPrank(Alice);
+ etherVault.authorize(Alice, true);
+ seedEtherVault();
+
+ uint256 bobBalanceBefore = Bob.balance;
+ etherVault.releaseEther(Bob, 1 ether);
+ uint256 bobBalanceAfter = Bob.balance;
+ assertEq(bobBalanceAfter - bobBalanceBefore, 1 ether);
+ vm.stopPrank();
+ }
+
+ function seedEtherVault() internal {
+ vm.deal(address(etherVault), 100 ether);
+ }
+}
diff --git a/packages/protocol/test/GasComparison.t.sol b/packages/protocol/test/GasComparison.t.sol
new file mode 100644
index 00000000000..7e1cadb675c
--- /dev/null
+++ b/packages/protocol/test/GasComparison.t.sol
@@ -0,0 +1,304 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import "forge-std/Test.sol";
+import "forge-std/console2.sol";
+import "../contracts/L1/TaikoData.sol";
+import "../contracts/libs/LibAddress.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+
+library LibAddress2 {
+ function sendEther(address to, uint256 amount) internal {
+ (bool success, ) = payable(to).call{value: amount}("");
+ require(success, "ETH transfer failed");
+ }
+}
+
+struct MyStruct {
+ uint256 id;
+ uint256 l1Height;
+ bytes32 l1Hash;
+ uint64 gasLimit;
+ uint64 timestamp;
+}
+
+contract FooBar {
+ function loadBlockMetadata_1(bytes memory data) public pure {
+ abi.decode(data, (MyStruct));
+ }
+
+ function loadBlockMetadata_2(bytes calldata data) public pure {
+ abi.decode(data, (MyStruct));
+ }
+
+ function loadBlockMetadata_3(MyStruct memory data) public pure {}
+
+ function loadBlockMetadata_4(MyStruct calldata data) public pure {}
+
+ function loadBlockMetadata_5(bytes calldata data) public pure {
+ MyStruct memory meta;
+ meta.id = uint256(bytes32(data[0:32]));
+ meta.l1Height = uint256(bytes32(data[32:64]));
+ meta.l1Hash = bytes32(data[64:96]);
+ meta.gasLimit = uint64(bytes8(data[96:104]));
+ meta.timestamp = uint64(bytes8(data[104:112]));
+ }
+
+ function loadBlockMetadata_6() public pure {
+ MyStruct memory meta;
+ uint256 a;
+ assembly {
+ a := calldatasize()
+ }
+ require(a == 84 + 32, "aaa");
+
+ assembly {
+ a := calldataload(4)
+ }
+ meta.id = a;
+ assembly {
+ a := calldataload(36)
+ }
+ meta.l1Height = a;
+ assembly {
+ a := calldataload(68)
+ }
+ meta.l1Hash = bytes32(a);
+ assembly {
+ a := calldataload(84)
+ }
+ meta.gasLimit = uint64(uint256((a << 128) >> (128 + 64)));
+ meta.timestamp = uint64(uint256((a << (128 + 64)) >> (128 + 64)));
+ }
+
+ function return_1()
+ public
+ view
+ returns (TaikoData.BlockMetadata memory meta)
+ {
+ meta = TaikoData.BlockMetadata({
+ id: 1,
+ l1Height: 1,
+ l1Hash: bytes32(uint256(1)),
+ beneficiary: address(this),
+ treasure: address(this),
+ txListHash: bytes32(uint256(1)),
+ txListByteStart: 0,
+ txListByteEnd: 1000,
+ gasLimit: 1,
+ mixHash: bytes32(uint256(1)),
+ depositsRoot: 0,
+ timestamp: 1,
+ cacheTxListInfo: 0,
+ depositsProcessed: new TaikoData.EthDeposit[](0)
+ });
+ }
+
+ function return_2() public view {
+ TaikoData.BlockMetadata({
+ id: 1,
+ l1Height: 1,
+ l1Hash: bytes32(uint256(1)),
+ beneficiary: address(this),
+ treasure: address(this),
+ txListHash: bytes32(uint256(1)),
+ txListByteStart: 0,
+ txListByteEnd: 1000,
+ gasLimit: 1,
+ mixHash: bytes32(uint256(1)),
+ depositsRoot: 0,
+ timestamp: 1,
+ cacheTxListInfo: 0,
+ depositsProcessed: new TaikoData.EthDeposit[](0)
+ });
+ }
+
+ //------
+ function hashString_1(
+ string memory str
+ ) public pure returns (bytes32 hash) {
+ assembly {
+ hash := keccak256(add(str, 32), mload(str))
+ }
+ }
+
+ function hashString_2(
+ string memory str
+ ) public pure returns (bytes32 hash) {
+ hash = keccak256(bytes(str));
+ }
+
+ //------
+
+ function hashTwo_1(
+ address a,
+ bytes32 b
+ ) public pure returns (bytes32 hash) {
+ assembly {
+ // Load the free memory pointer and allocate memory for the concatenated arguments
+ let input := mload(64)
+
+ // Store the app address and signal bytes32 value in the allocated memory
+ mstore(input, a)
+ mstore(add(input, 32), b)
+
+ hash := keccak256(add(input, 12), 52)
+
+ // Free the memory allocated for the input
+ mstore(0x40, add(input, 64))
+ }
+ }
+
+ function hashTwo_2(
+ address a,
+ bytes32 b
+ ) public pure returns (bytes32 hash) {
+ hash = keccak256(bytes.concat(bytes20(uint160(a)), b));
+ // the following will work too.
+ // hash = keccak256(abi.encodePacked(a, b));
+ }
+
+ //------
+
+ function increment_1(uint256 count) public pure {
+ uint256 a;
+ for (uint256 i = 0; i < count; i++) {
+ a += i;
+ }
+ }
+
+ function increment_2(uint256 count) public pure {
+ uint256 a;
+ for (uint256 i = 0; i < count; ++i) {
+ a += i;
+ }
+ }
+
+ function increment_3(uint256 count) public pure {
+ uint256 a;
+ for (uint256 i = 0; i < count; ) {
+ a += i;
+ unchecked {
+ i++;
+ }
+ }
+ }
+
+ function increment_4(uint256 count) public pure {
+ uint256 a;
+ for (uint256 i = 0; i < count; ) {
+ a += i;
+ unchecked {
+ ++i;
+ }
+ }
+ }
+
+ // ------
+ function hashKey_1(
+ uint256 chainId,
+ string memory name
+ ) public pure returns (bytes32) {
+ return keccak256(bytes(string.concat(Strings.toString(chainId), name)));
+ }
+
+ function hashKey_2(
+ uint256 chainId,
+ string memory name
+ ) public pure returns (bytes32) {
+ return keccak256(abi.encodePacked(chainId, name));
+ }
+
+ // ------
+ function send0Ether_CheckOutside(address to, uint256 amount) public {
+ if (amount == 0 || to == address(0)) return;
+ LibAddress2.sendEther(to, amount);
+ }
+
+ function send0Ether_CheckInside(address to, uint256 amount) public {
+ LibAddress.sendEther(to, amount);
+ }
+}
+
+contract GasComparisonTest is Test {
+ FooBar foobar;
+
+ function setUp() public {
+ foobar = new FooBar();
+ }
+
+ function testCompare_hashString(uint256 count) public {
+ vm.assume(count > 10 && count < 1000);
+
+ string memory str = string(new bytes(count));
+ assertEq(
+ foobar.hashString_1(str),
+ foobar.hashString_2(str) //best
+ );
+ }
+
+ function testCompare_increment(uint256 count) public view {
+ vm.assume(count > 10 && count < 1000);
+ foobar.increment_1(count);
+ foobar.increment_2(count);
+ foobar.increment_3(count); // best
+ foobar.increment_4(count);
+ }
+
+ function testCompare_hashTwo() public {
+ address a = address(this);
+ bytes32 b = blockhash(block.number - 1);
+ assertEq(
+ foobar.hashTwo_1(a, b), //best
+ foobar.hashTwo_2(a, b)
+ );
+ }
+
+ function testCompare_hashKey() public view {
+ foobar.hashKey_1(123, "abc");
+ foobar.hashKey_2(123, "abc");
+ }
+
+ function testCompare_return() public view {
+ foobar.return_1();
+ foobar.return_2(); // cheaper
+ }
+
+ function testCompare_loadBlockMetadata() public {
+ MyStruct memory meta = MyStruct({
+ id: 123,
+ l1Height: 456,
+ l1Hash: blockhash(block.number - 1),
+ gasLimit: 333,
+ timestamp: 999
+ });
+
+ bytes memory b;
+
+ b = abi.encode(meta);
+ foobar.loadBlockMetadata_1(b);
+ foobar.loadBlockMetadata_2(b);
+ foobar.loadBlockMetadata_3(meta);
+ foobar.loadBlockMetadata_4(meta); // best
+
+ b = bytes.concat(
+ bytes32(meta.id),
+ bytes32(meta.l1Height),
+ meta.l1Hash,
+ bytes8(meta.gasLimit),
+ bytes8(meta.timestamp)
+ );
+
+ foobar.loadBlockMetadata_5(b);
+
+ bytes memory c = bytes.concat(FooBar.loadBlockMetadata_6.selector, b);
+
+ address(foobar).call(c);
+ }
+
+ function testCompare_send0Ether() public {
+ address to = 0x50081b12838240B1bA02b3177153Bca678a86078;
+ foobar.send0Ether_CheckInside(to, 0);
+ foobar.send0Ether_CheckOutside(to, 0);
+ }
+}
diff --git a/packages/protocol/test/L1/TaikoL1.integration.test.ts b/packages/protocol/test/L1/TaikoL1.integration.test.ts
deleted file mode 100644
index 165a61168b7..00000000000
--- a/packages/protocol/test/L1/TaikoL1.integration.test.ts
+++ /dev/null
@@ -1,566 +0,0 @@
-import { expect } from "chai";
-import { SimpleChannel } from "channel-ts";
-import { BigNumber, ethers as ethersLib } from "ethers";
-import { ethers } from "hardhat";
-import { TaikoL1, TestTaikoToken } from "../../typechain";
-import blockListener from "../utils/blockListener";
-import { BlockMetadata } from "../utils/block_metadata";
-import {
- commitAndProposeLatestBlock,
- commitBlock,
- generateCommitHash,
-} from "../utils/commit";
-import { encodeEvidence } from "../utils/encoding";
-import {
- readShouldRevertWithCustomError,
- txShouldRevertWithCustomError,
-} from "../utils/errors";
-import Evidence from "../utils/evidence";
-import { initIntegrationFixture } from "../utils/fixture";
-import { buildProposeBlockInputs } from "../utils/propose";
-import Proposer from "../utils/proposer";
-import { buildProveBlockInputs, proveBlock } from "../utils/prove";
-import Prover from "../utils/prover";
-import { getBlockHeader } from "../utils/rpc";
-import { seedTko, sendTinyEtherToZeroAddress } from "../utils/seed";
-import { commitProposeProveAndVerify, verifyBlocks } from "../utils/verify";
-
-describe("integration:TaikoL1", function () {
- let taikoL1: TaikoL1;
- let l1Provider: ethersLib.providers.JsonRpcProvider;
- let l2Provider: ethersLib.providers.JsonRpcProvider;
- let l1Signer: any;
- let proposerSigner: any;
- let genesisHeight: number;
- let taikoTokenL1: TestTaikoToken;
- let chan: SimpleChannel;
- let interval: any;
- let proverSigner: any;
- let proposer: Proposer;
- let prover: Prover;
- /* eslint-disable-next-line */
- let config: Awaited>;
-
- beforeEach(async function () {
- ({
- l1Provider,
- taikoL1,
- l2Provider,
- l1Signer,
- genesisHeight,
- proposerSigner,
- proverSigner,
- interval,
- chan,
- config,
- taikoTokenL1,
- } = await initIntegrationFixture(false, false));
- proposer = new Proposer(
- taikoL1.connect(proposerSigner),
- l2Provider,
- config.commitConfirmations.toNumber(),
- config.maxNumBlocks.toNumber(),
- 0,
- proposerSigner
- );
-
- prover = new Prover(taikoL1, l2Provider, proverSigner);
- });
-
- afterEach(() => {
- clearInterval(interval);
- l2Provider.off("block");
- chan.close();
- });
-
- describe("isCommitValid()", async function () {
- it("should not be valid if it has not been committed", async function () {
- const block = await l2Provider.getBlock("latest");
- const commit = generateCommitHash(block);
-
- const isCommitValid = await taikoL1.isCommitValid(
- 1,
- 1,
- commit.hash
- );
-
- expect(isCommitValid).to.be.false;
- });
-
- it("should be valid if it has been committed", async function () {
- const block = await l2Provider.getBlock("latest");
- const commitSlot = 0;
- const { commit, blockCommittedEvent } = await commitBlock(
- taikoL1,
- block,
- commitSlot
- );
- expect(blockCommittedEvent).not.to.be.undefined;
-
- for (let i = 0; i < config.commitConfirmations.toNumber(); i++) {
- await sendTinyEtherToZeroAddress(l1Signer);
- }
-
- const isCommitValid = await taikoL1.isCommitValid(
- commitSlot,
- blockCommittedEvent!.blockNumber,
- commit.hash
- );
-
- expect(isCommitValid).to.be.true;
- });
- });
-
- describe("getProposedBlock()", function () {
- it("should revert if block is out of range and not a valid proposed block", async function () {
- await readShouldRevertWithCustomError(
- taikoL1.getProposedBlock(123),
- "L1_ID()"
- );
- });
-
- it("should return valid block if it's been committed and proposed", async function () {
- const commitSlot = 0;
- const { proposedEvent } = await commitAndProposeLatestBlock(
- taikoL1,
- l1Signer,
- l2Provider,
- commitSlot
- );
- expect(proposedEvent).not.to.be.undefined;
- expect(proposedEvent.args.meta.commitSlot).to.be.eq(commitSlot);
-
- const proposedBlock = await taikoL1.getProposedBlock(
- proposedEvent.args.meta.id
- );
- expect(proposedBlock).not.to.be.undefined;
- expect(proposedBlock.proposer).to.be.eq(
- await l1Signer.getAddress()
- );
- });
- });
-
- describe("getForkChoice", function () {
- it("returns no empty fork choice for un-proposed, un-proven and un-verified block", async function () {
- const forkChoice = await taikoL1.getForkChoice(
- 1,
- ethers.constants.HashZero
- );
- expect(forkChoice.blockHash).to.be.eq(ethers.constants.HashZero);
- expect(forkChoice.provenAt).to.be.eq(0);
- });
-
- it("returns populated data for submitted fork choice", async function () {
- const { proposedEvent, block } = await commitAndProposeLatestBlock(
- taikoL1,
- l1Signer,
- l2Provider,
- 0
- );
-
- expect(proposedEvent).not.to.be.undefined;
- const proveEvent = await proveBlock(
- taikoL1,
- l2Provider,
- await l1Signer.getAddress(),
- proposedEvent.args.id.toNumber(),
- block.number,
- proposedEvent.args.meta as any as BlockMetadata
- );
- expect(proveEvent).not.to.be.undefined;
-
- const forkChoice = await taikoL1.getForkChoice(
- proposedEvent.args.id.toNumber(),
- block.parentHash
- );
- expect(forkChoice.blockHash).to.be.eq(block.hash);
- expect(forkChoice.prover).to.be.eq(await l1Signer.getAddress());
- });
-
- it("returns empty after a block is verified", async function () {
- await seedTko([prover], taikoTokenL1.connect(l1Signer));
-
- const blockNumber = genesisHeight + 1;
- /* eslint-disable-next-line */
- const block = await l2Provider.getBlock(blockNumber);
-
- // commit and propose block, so our provers can prove it.
- const { proposedEvent } = await proposer.commitThenProposeBlock(
- block
- );
-
- await prover.prove(
- proposedEvent.args.id.toNumber(),
- blockNumber,
- proposedEvent.args.meta as any as BlockMetadata
- );
-
- let forkChoice = await taikoL1.getForkChoice(
- proposedEvent.args.id.toNumber(),
- block.parentHash
- );
- expect(forkChoice).not.to.be.undefined;
- expect(forkChoice.prover).to.be.not.eq(
- ethers.constants.AddressZero
- );
-
- const verifiedEvent = await verifyBlocks(taikoL1, 1);
- expect(verifiedEvent).not.to.be.undefined;
-
- forkChoice = await taikoL1.getForkChoice(
- proposedEvent.args.id.toNumber(),
- block.parentHash
- );
- expect(forkChoice.prover).to.be.eq(ethers.constants.AddressZero);
- });
- });
-
- describe("commitBlock() -> proposeBlock() integration", async function () {
- it("should fail if a proposed block's placeholder field values are not default", async function () {
- const block = await l2Provider.getBlock("latest");
- const commitSlot = 0;
- const { tx, commit } = await commitBlock(
- taikoL1,
- block,
- commitSlot
- );
-
- const receipt = await tx.wait(1);
-
- const meta: BlockMetadata = {
- id: 1,
- l1Height: 0,
- l1Hash: ethers.constants.HashZero,
- beneficiary: commit.beneficiary,
- txListHash: commit.txListHash,
- mixHash: ethers.constants.HashZero,
- extraData: block.extraData,
- gasLimit: block.gasLimit,
- timestamp: 0,
- commitSlot: commitSlot,
- commitHeight: receipt.blockNumber as number,
- };
-
- const inputs = buildProposeBlockInputs(block, meta);
- const txPromise = (
- await taikoL1.proposeBlock(inputs, { gasLimit: 500000 })
- ).wait(1);
- await txShouldRevertWithCustomError(
- txPromise,
-
- l1Provider,
- "L1_METADATA_FIELD()"
- );
- });
-
- it("should revert with invalid gasLimit", async function () {
- const block = await l2Provider.getBlock("latest");
- const config = await taikoL1.getConfig();
- const gasLimit = config.blockMaxGasLimit;
-
- const { tx, commit } = await commitBlock(taikoL1, block);
-
- const receipt = await tx.wait(1);
- const meta: BlockMetadata = {
- id: 0,
- l1Height: 0,
- l1Hash: ethers.constants.HashZero,
- beneficiary: commit.beneficiary,
- txListHash: commit.txListHash,
- mixHash: ethers.constants.HashZero,
- extraData: block.extraData,
- gasLimit: gasLimit.add(1),
- timestamp: 0,
- commitSlot: 0,
- commitHeight: receipt.blockNumber as number,
- };
-
- const inputs = buildProposeBlockInputs(block, meta);
-
- const txPromise = (
- await taikoL1.proposeBlock(inputs, { gasLimit: 250000 })
- ).wait(1);
- await txShouldRevertWithCustomError(
- txPromise,
- l1Provider,
- "L1_GAS_LIMIT()"
- );
- });
-
- it("should revert with invalid extraData", async function () {
- const block = await l2Provider.getBlock("latest");
- const { tx, commit } = await commitBlock(taikoL1, block);
-
- const meta: BlockMetadata = {
- id: 0,
- l1Height: 0,
- l1Hash: ethers.constants.HashZero,
- beneficiary: commit.beneficiary,
- txListHash: commit.txListHash,
- mixHash: ethers.constants.HashZero,
- extraData: ethers.utils.hexlify(ethers.utils.randomBytes(33)), // invalid extradata
- gasLimit: block.gasLimit,
- timestamp: 0,
- commitSlot: 0,
- commitHeight: tx.blockNumber as number,
- };
-
- const inputs = buildProposeBlockInputs(block, meta);
-
- const txPromise = (
- await taikoL1.proposeBlock(inputs, { gasLimit: 500000 })
- ).wait(1);
- await txShouldRevertWithCustomError(
- txPromise,
- l1Provider,
- "L1_EXTRA_DATA()"
- );
- });
-
- it("should commit and be able to propose", async function () {
- await commitAndProposeLatestBlock(taikoL1, l1Signer, l2Provider, 0);
-
- const stateVariables = await taikoL1.getStateVariables();
- const nextBlockId = stateVariables.nextBlockId;
- const proposedBlock = await taikoL1.getProposedBlock(
- nextBlockId.sub(1)
- );
-
- expect(proposedBlock.metaHash).not.to.be.eq(
- ethers.constants.HashZero
- );
- expect(proposedBlock.proposer).not.to.be.eq(
- ethers.constants.AddressZero
- );
- expect(proposedBlock.proposedAt).not.to.be.eq(BigNumber.from(0));
- });
-
- it("should commit and be able to propose for all available slots, then revert when all slots are taken", async function () {
- // propose blocks and fill up maxNumBlocks number of slots,
- // expect each one to be successful.
- for (let i = 0; i < config.maxNumBlocks.toNumber() - 1; i++) {
- await commitAndProposeLatestBlock(
- taikoL1,
- l1Signer,
- l2Provider,
- 0
- );
-
- const stateVariables = await taikoL1.getStateVariables();
- const nextBlockId = stateVariables.nextBlockId;
- const proposedBlock = await taikoL1.getProposedBlock(
- nextBlockId.sub(1)
- );
-
- expect(proposedBlock.metaHash).not.to.be.eq(
- ethers.constants.HashZero
- );
- expect(proposedBlock.proposer).not.to.be.eq(
- ethers.constants.AddressZero
- );
- expect(proposedBlock.proposedAt).not.to.be.eq(
- BigNumber.from(0)
- );
- }
-
- // now expect another proposed block to be invalid since all slots are full and none have
- // been proven.
- const { commitConfirmations } = await taikoL1.getConfig();
- const block = await l2Provider.getBlock("latest");
- const { tx: commitBlockTx, commit } = await commitBlock(
- taikoL1.connect(l1Signer),
- block,
- 0
- );
- const commitReceipt = await commitBlockTx.wait(1);
-
- for (let i = 0; i < commitConfirmations.toNumber() + 5; i++) {
- await sendTinyEtherToZeroAddress(l1Signer);
- }
-
- const meta: BlockMetadata = {
- id: 0,
- l1Height: 0,
- l1Hash: ethers.constants.HashZero,
- beneficiary: commit.beneficiary,
- txListHash: commit.txListHash,
- mixHash: ethers.constants.HashZero,
- extraData: ethers.utils.hexlify(ethers.utils.randomBytes(32)),
- gasLimit: block.gasLimit,
- timestamp: 0,
- commitSlot: 0,
- commitHeight: commitReceipt.blockNumber,
- };
-
- await txShouldRevertWithCustomError(
- (
- await taikoL1.proposeBlock(
- buildProposeBlockInputs(block, meta),
- { gasLimit: 500000 }
- )
- ).wait(),
- l1Provider,
- "L1_TOO_MANY_BLOCKS()"
- );
- });
- });
-
- describe("getLatestSyncedHeader", function () {
- it("iterates through blockHashHistory length and asserts getLatestSyncedHeader returns correct value", async function () {
- l2Provider.on("block", blockListener(chan, genesisHeight));
-
- let blocks: number = 0;
- // iterate through blockHashHistory twice and try to get latest synced header each time.
- // we modulo the header height by blockHashHistory in the protocol, so
- // this test ensures that logic is sound.
- /* eslint-disable-next-line */
- for await (const blockNumber of chan) {
- if (blocks > config.blockHashHistory.toNumber() * 2 + 1) {
- chan.close();
- return;
- }
-
- const { verifyEvent } = await commitProposeProveAndVerify(
- taikoL1,
- l2Provider,
- blockNumber,
- proposer,
- taikoTokenL1,
- prover
- );
-
- expect(verifyEvent).not.to.be.undefined;
-
- const header = await taikoL1.getLatestSyncedHeader();
- expect(header).to.be.eq(verifyEvent.args.blockHash);
- blocks++;
- }
- });
- });
-
- describe("proveBlock", function () {
- it("reverts when inputs is incorrect length", async function () {
- for (let i = 1; i <= 2; i++) {
- const txPromise = (
- await taikoL1.proveBlock(
- 1,
- new Array(i).fill(ethers.constants.HashZero),
- {
- gasLimit: 1000000,
- }
- )
- ).wait(1);
- await txShouldRevertWithCustomError(
- txPromise,
- l1Provider,
- "L1_INPUT_SIZE()"
- );
- }
- });
-
- it("reverts when evidence meta id is not the same as the blockId", async function () {
- l2Provider.on("block", blockListener(chan, genesisHeight));
-
- const config = await taikoL1.getConfig();
- /* eslint-disable-next-line */
- for await (const blockNumber of chan) {
- if (
- blockNumber >
- genesisHeight + config.maxNumBlocks.toNumber() - 1
- ) {
- break;
- }
-
- const block = await l2Provider.getBlock(blockNumber);
-
- // commit and propose block, so our provers can prove it.
- const { proposedEvent } = await proposer.commitThenProposeBlock(
- block
- );
-
- const header = await getBlockHeader(l2Provider, blockNumber);
- const inputs = buildProveBlockInputs(
- proposedEvent.args.meta as any as BlockMetadata,
- header.blockHeader,
- await prover.getSigner().getAddress(),
- "0x",
- "0x"
- );
-
- const txPromise = (
- await taikoL1.proveBlock(
- proposedEvent.args.meta.id.toNumber() + 1, // id different than meta
- inputs,
- {
- gasLimit: 2000000,
- }
- )
- ).wait(1);
-
- await txShouldRevertWithCustomError(
- txPromise,
- l1Provider,
- "L1_ID()"
- );
- }
- });
-
- it("reverts when prover is the zero address", async function () {
- l2Provider.on("block", blockListener(chan, genesisHeight));
-
- const config = await taikoL1.getConfig();
- /* eslint-disable-next-line */
- for await (const blockNumber of chan) {
- if (
- blockNumber >
- genesisHeight + config.maxNumBlocks.toNumber() - 1
- ) {
- break;
- }
-
- const block = await l2Provider.getBlock(blockNumber);
-
- // commit and propose block, so our provers can prove it.
- const { proposedEvent } = await proposer.commitThenProposeBlock(
- block
- );
-
- const header = await getBlockHeader(l2Provider, blockNumber);
- const inputs = [];
- const evidence: Evidence = {
- meta: proposedEvent.args.meta as any as BlockMetadata,
- header: header.blockHeader,
- prover: ethers.constants.AddressZero,
- proofs: [],
- circuits: [],
- };
-
- evidence.circuits.push(1);
-
- for (let i = 0; i < 3; i++) {
- evidence.proofs.push("0xff");
- }
-
- inputs[0] = encodeEvidence(evidence);
- inputs[1] = "0x";
- inputs[2] = "0x";
-
- const txPromise = (
- await taikoL1.proveBlock(
- proposedEvent.args.meta.id.toNumber(), // id different than meta
- inputs,
- {
- gasLimit: 2000000,
- }
- )
- ).wait(1);
-
- await txShouldRevertWithCustomError(
- txPromise,
- l1Provider,
- "L1_PROVER()"
- );
- }
- });
- });
-});
diff --git a/packages/protocol/test/L1/TaikoL1.test.ts b/packages/protocol/test/L1/TaikoL1.test.ts
deleted file mode 100644
index 1625adbad8d..00000000000
--- a/packages/protocol/test/L1/TaikoL1.test.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import { TaikoL1 } from "../../typechain";
-import deployAddressManager from "../utils/addressManager";
-import { randomBytes32 } from "../utils/bytes";
-import { deployTaikoL1 } from "../utils/taikoL1";
-
-describe("TaikoL1", function () {
- let taikoL1: TaikoL1;
- let genesisHash: string;
-
- beforeEach(async function () {
- const l1Signer = (await ethers.getSigners())[0];
- const addressManager = await deployAddressManager(l1Signer);
- genesisHash = randomBytes32();
- taikoL1 = await deployTaikoL1(addressManager, genesisHash, false);
- });
-
- describe("getLatestSyncedHeader()", async function () {
- it("should be genesisHash because no headers have been synced", async function () {
- const hash = await taikoL1.getLatestSyncedHeader();
- expect(hash).to.be.eq(genesisHash);
- });
- });
-
- describe("getSyncedHeader()", async function () {
- it("should revert because header number has not been synced", async function () {
- await expect(taikoL1.getSyncedHeader(1)).to.be.revertedWith(
- "L1_BLOCK_NUMBER()"
- );
- });
-
- it("should return appropraite hash for header", async function () {
- const hash = await taikoL1.getSyncedHeader(0);
- expect(hash).to.be.eq(genesisHash);
- });
- });
-
- describe("proposeBlock()", async function () {
- it("should revert when size of inputs is les than 2", async function () {
- await expect(
- taikoL1.proposeBlock([randomBytes32()])
- ).to.be.revertedWith("L1_INPUT_SIZE()");
- });
- });
-
- describe("commitBlock()", async function () {
- it("should revert when size of inputs is les than 2", async function () {
- await expect(
- taikoL1.proposeBlock([randomBytes32()])
- ).to.be.revertedWith("L1_INPUT_SIZE()");
- });
- });
-});
diff --git a/packages/protocol/test/L1/TaikoToken.test.ts b/packages/protocol/test/L1/TaikoToken.test.ts
deleted file mode 100644
index 103876510ab..00000000000
--- a/packages/protocol/test/L1/TaikoToken.test.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import {
- ERC20_BURN_AMOUNT_EXCEEDED,
- ERC20_TRANSFER_AMOUNT_EXCEEDED,
-} from "../constants/errors";
-import { BigNumber } from "ethers";
-import deployTaikoToken from "../utils/taikoToken";
-import { TestTaikoToken } from "../../typechain/TestTaikoToken";
-import deployAddressManager from "../utils/addressManager";
-
-describe("TaikoToken", function () {
- let owner: any;
- let nonOwner: any;
- let protoBroker: any;
- let token: TestTaikoToken;
- let amountMinted: BigNumber;
-
- before(async function () {
- [owner, nonOwner, protoBroker] = await ethers.getSigners();
- });
-
- beforeEach(async function () {
- const addressManager = await deployAddressManager(owner);
- token = await deployTaikoToken(
- owner,
- addressManager,
- protoBroker.address
- );
- amountMinted = ethers.utils.parseEther("100");
- await token.connect(protoBroker).mint(owner.address, amountMinted);
-
- const ownerBalance = await token.balanceOf(owner.address);
- expect(ownerBalance).to.be.eq(amountMinted);
- });
-
- describe("mint()", async () => {
- it("throws when to is equal to the zero address", async () => {
- await expect(
- token.connect(protoBroker).mint(ethers.constants.AddressZero, 1)
- ).to.be.revertedWith("TKO_INVALID_ADDR()");
- });
-
- it("throws when minter is not the protoBroker", async () => {
- await expect(
- token.connect(owner).mint(nonOwner.address, amountMinted.add(1))
- ).to.be.revertedWith("RESOLVER_DENIED()");
- });
-
- it("succeeds", async () => {
- const originalBalance = await token.balanceOf(nonOwner.address);
-
- await token
- .connect(protoBroker)
- .mint(nonOwner.address, amountMinted);
-
- const postTransferBalance = await token.balanceOf(nonOwner.address);
- expect(postTransferBalance).to.be.eq(
- originalBalance.add(amountMinted)
- );
- });
- });
-
- describe("burn()", async () => {
- it("throws when to is equal to the zero address", async () => {
- await expect(
- token.connect(protoBroker).burn(ethers.constants.AddressZero, 1)
- ).to.be.revertedWith("TKO_INVALID_ADDR()");
- });
-
- it("throws when burner is not the protoBroker", async () => {
- await expect(
- token.connect(owner).burn(nonOwner.address, amountMinted.add(1))
- ).to.be.revertedWith("RESOLVER_DENIED()");
- });
-
- it("throws when account balance is < amount requested to burn", async () => {
- await expect(
- token
- .connect(protoBroker)
- .burn(owner.address, amountMinted.add(1))
- ).to.be.revertedWith(ERC20_BURN_AMOUNT_EXCEEDED);
- });
-
- it("succeeds", async () => {
- const originalBalance = await token.balanceOf(owner.address);
-
- await token.connect(protoBroker).burn(owner.address, amountMinted);
-
- const postTransferBalance = await token.balanceOf(owner.address);
- expect(postTransferBalance).to.be.eq(
- originalBalance.sub(amountMinted)
- );
- });
- });
-
- describe("transfer()", async () => {
- it("throws when to is equal to the contract address", async () => {
- await expect(
- token.connect(owner).transfer(token.address, 1)
- ).to.be.revertedWith("TKO_INVALID_ADDR()");
- });
-
- it("throws when transfer is > user's amount", async () => {
- await expect(
- token
- .connect(owner)
- .transfer(nonOwner.address, amountMinted.add(1))
- ).to.be.revertedWith(ERC20_TRANSFER_AMOUNT_EXCEEDED);
- });
-
- it("succeeds", async () => {
- const originalBalance = await token.balanceOf(nonOwner.address);
-
- await token.connect(owner).transfer(nonOwner.address, amountMinted);
- const postTransferBalance = await token.balanceOf(nonOwner.address);
- expect(postTransferBalance).to.be.eq(
- originalBalance.add(amountMinted)
- );
- });
- });
-});
diff --git a/packages/protocol/test/L2/TaikoL2.test.ts b/packages/protocol/test/L2/TaikoL2.test.ts
deleted file mode 100644
index f69d228a5cc..00000000000
--- a/packages/protocol/test/L2/TaikoL2.test.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import { TaikoL2 } from "../../typechain";
-import deployAddressManager from "../utils/addressManager";
-import { randomBytes32 } from "../utils/bytes";
-import { deployTaikoL2 } from "../utils/taikoL2";
-
-describe("TaikoL2", function () {
- let taikoL2: TaikoL2;
-
- beforeEach(async function () {
- const signer = (await ethers.getSigners())[0];
- const addressManager = await deployAddressManager(signer);
- taikoL2 = await deployTaikoL2(signer, addressManager);
- });
-
- describe("anchor()", async function () {
- it("should revert since ancestor hashes not written", async function () {
- await expect(
- taikoL2.anchor(Math.ceil(Math.random() * 1024), randomBytes32())
- ).to.be.revertedWith("L2_PUBLIC_INPUT_HASH_MISMATCH()");
- });
- });
-
- describe("getLatestSyncedHeader()", async function () {
- it("should be 0 because no headers have been synced", async function () {
- const hash = await taikoL2.getLatestSyncedHeader();
- expect(hash).to.be.eq(ethers.constants.HashZero);
- });
- });
-
- describe("getSyncedHeader()", async function () {
- it("should be 0 because header number has not been synced", async function () {
- const hash = await taikoL2.getSyncedHeader(1);
- expect(hash).to.be.eq(ethers.constants.HashZero);
- });
- });
-});
diff --git a/packages/protocol/test/Lib1559Math.sol b/packages/protocol/test/Lib1559Math.sol
new file mode 100644
index 00000000000..9af6d90cacb
--- /dev/null
+++ b/packages/protocol/test/Lib1559Math.sol
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {Lib1559Math as T} from "../contracts/libs/Lib1559Math.sol";
+import {
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+
+contract TestLib1559Math is Test {
+ using SafeCastUpgradeable for uint256;
+
+ function test1559_2X1XRatio(uint16 rand) public {
+ vm.assume(rand != 0);
+
+ uint64 xExcessMax = (uint(15000000) * 256 * rand).toUint64();
+ uint64 xTarget = (uint(6000000) * rand).toUint64();
+ uint64 price0 = (uint(5000000000) * rand).toUint64();
+ uint64 ratio2x1x = 11177;
+ (uint128 xscale, uint128 yscale) = T.calculateScales({
+ xExcessMax: xExcessMax,
+ price: price0,
+ target: xTarget,
+ ratio2x1x: ratio2x1x
+ });
+
+ // basefee should be 0 when xExcess is 0
+ assertEq(T.calculatePrice(xscale, yscale, 0, xTarget), 0);
+
+ uint64 N = 50;
+ // In the [xExcessMax/2 - 50 * xTarget, xExcessMax/2 + 50 * xTarget]
+ // x range, the ratio2x1x holds, and the price is still smaller
+ // than uint64.max
+ for (
+ uint64 xExcess = xExcessMax / 2 - N * xTarget;
+ xExcess <= xExcessMax / 2 + N * xTarget;
+ xExcess += xTarget
+ ) {
+ uint256 basefee1 = T.calculatePrice(
+ xscale,
+ yscale,
+ xExcess,
+ xTarget
+ );
+ assertLt(basefee1, type(uint64).max);
+
+ uint256 basefee2 = T.calculatePrice(
+ xscale,
+ yscale,
+ xExcess,
+ 2 * xTarget
+ );
+
+ assertLt(basefee2, type(uint64).max);
+
+ if (basefee1 != 0) {
+ assertEq((basefee2 * 10000) / basefee1, ratio2x1x);
+ }
+ }
+ }
+
+ function test1559_SpecalCases(uint16 rand) public {
+ vm.assume(rand != 0);
+
+ uint64 xExcessMax = (uint(15000000) * 256 * rand).toUint64();
+ uint64 xTarget = (uint(6000000) * rand).toUint64();
+ uint64 price0 = (uint(5000000000) * rand).toUint64();
+ uint64 ratio2x1x = 11177;
+
+ (uint128 xscale, uint128 yscale) = T.calculateScales({
+ xExcessMax: xExcessMax,
+ price: price0,
+ target: xTarget,
+ ratio2x1x: ratio2x1x
+ });
+
+ assertEq(T.calculatePrice(xscale, yscale, 0, 0), 0);
+ assertEq(T.calculatePrice(xscale, yscale, 0, 1), 0);
+
+ assertGt(
+ T.calculatePrice(xscale, yscale, xExcessMax - xTarget, xTarget),
+ type(uint64).max
+ );
+
+ assertGt(
+ T.calculatePrice(xscale, yscale, 0, xExcessMax),
+ type(uint64).max
+ );
+
+ assertGt(
+ T.calculatePrice(xscale, yscale, xExcessMax / 2, xExcessMax / 2),
+ type(uint64).max
+ );
+ }
+}
diff --git a/packages/protocol/test/LibFixedPointMath.t.sol b/packages/protocol/test/LibFixedPointMath.t.sol
new file mode 100644
index 00000000000..1563a196a3b
--- /dev/null
+++ b/packages/protocol/test/LibFixedPointMath.t.sol
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: UNLICENSED
+// Some of the tests are taken from:
+// https://github.com/recmo/experiment-solexp/blob/main/src/test/FixedPointMathLib.t.sol
+pragma solidity 0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import "../contracts/thirdparty/LibFixedPointMath.sol";
+
+contract LibFixedPointMathTest is Test {
+ function testExp1() public {
+ assertEq(LibFixedPointMath.exp(-1e18), 367879441171442321);
+ }
+
+ function testExpSmallest() public view {
+ int256 y = LibFixedPointMath.exp(-42139678854452767550);
+
+ console2.log(
+ "LibFixedPointMath.exp(-42139678854452767550)=",
+ uint256(y)
+ );
+ }
+
+ function testExpLargest() public view {
+ int256 y = LibFixedPointMath.exp(
+ int256(uint256(LibFixedPointMath.MAX_EXP_INPUT))
+ );
+ console2.log(
+ "LibFixedPointMath.exp(135305999368893231588)=",
+ uint256(y)
+ );
+ }
+
+ function testExpSome() public view {
+ int256 y = LibFixedPointMath.exp(5e18);
+ console2.log("LibFixedPointMath.exp(5e18)=", uint256(y));
+ }
+
+ function testExpGas() public view {
+ uint256 g0 = gasleft();
+ LibFixedPointMath.exp(133e18);
+ uint256 g1 = gasleft();
+ LibFixedPointMath.exp(-23e18);
+ uint256 g2 = gasleft();
+ LibFixedPointMath.exp(5e18);
+ uint256 g3 = gasleft();
+ console2.logUint(g0 - g1);
+ console2.logUint(g1 - g2);
+ console2.logUint(g2 - g3);
+ }
+
+ function testExp3() public pure {
+ LibFixedPointMath.exp(133e18);
+ LibFixedPointMath.exp(10e18);
+ LibFixedPointMath.exp(-23e18);
+ }
+}
diff --git a/packages/protocol/test/LibLn.sol b/packages/protocol/test/LibLn.sol
new file mode 100644
index 00000000000..c5dc856867c
--- /dev/null
+++ b/packages/protocol/test/LibLn.sol
@@ -0,0 +1,227 @@
+// SPDX-License-Identifier: UNLICENSED
+pragma solidity ^0.8.18;
+
+// Taken from: https://github.com/recmo/experiment-solexp/blob/main/src/FixedPointMathLib.sol
+import {LibFixedPointMath} from "../contracts/thirdparty/LibFixedPointMath.sol";
+
+library LibLn {
+ error Overflow();
+ error LnNegativeUndefined();
+
+ // Integer log2 (alternative implementation)
+ // @returns floor(log2(x)) if x is nonzero, otherwise 0.
+ // Consumes 317 gas. This could have been an 3 gas EVM opcode though.
+ function ilog2_alt(uint256 x) internal pure returns (uint256 r) {
+ unchecked {
+ // Repeat first zero all the way to the right
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+ x |= x >> 32;
+ x |= x >> 64;
+ x |= x >> 128;
+
+ // Count 32 bit chunks
+ r = x & 0x100000001000000010000000100000001000000010000000100000001;
+ r *= 0x20000000200000002000000020000000200000002000000020;
+ r >>= 224;
+
+ // Extract highest bit
+ x ^= x >> 1;
+
+ // Copy to lowest 32 bit chunk
+ x |= x >> 32;
+ x |= x >> 64;
+ x |= x >> 128;
+ // No need to clear the other chunks
+
+ // Map to 0-31 using the B(2, 5) de Bruijn sequence 0x077CB531.
+ // See
+ x = ((x * 0x077CB531) >> 27) & 0x1f;
+
+ // Use a bytes32 32 entry lookup table
+ assembly {
+ // Need assembly here because solidity introduces an uncessary bounds
+ // check.
+ r := add(
+ r,
+ byte(
+ x,
+ 0x11c021d0e18031e16140f191104081f1b0d17151310071a0c12060b050a09
+ )
+ )
+ }
+ }
+ }
+
+ // Integer log2
+ // @returns floor(log2(x)) if x is nonzero, otherwise 0. This is the same
+ // as the location of the highest set bit.
+ // Consumes 232 gas. This could have been an 3 gas EVM opcode though.
+ function ilog2(uint256 x) internal pure returns (uint256 r) {
+ assembly {
+ r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x))
+ r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x))))
+ r := or(r, shl(5, lt(0xffffffff, shr(r, x))))
+ r := or(r, shl(4, lt(0xffff, shr(r, x))))
+ r := or(r, shl(3, lt(0xff, shr(r, x))))
+ r := or(r, shl(2, lt(0xf, shr(r, x))))
+ r := or(r, shl(1, lt(0x3, shr(r, x))))
+ r := or(r, lt(0x1, shr(r, x)))
+ }
+ }
+
+ function ln_pub(int256 x) public pure returns (int256 r) {
+ return ln(x);
+ }
+
+ // Computes ln(x) in 1e18 fixed point.
+ // Reverts if x is negative or zero.
+ // Consumes 670 gas.
+ function ln(int256 x) internal pure returns (int256 r) {
+ unchecked {
+ if (x < 1) {
+ if (x < 0) revert LnNegativeUndefined();
+ revert Overflow();
+ }
+
+ // We want to convert x from 10**18 fixed point to 2**96 fixed point.
+ // We do this by multiplying by 2**96 / 10**18.
+ // But since ln(x * C) = ln(x) + ln(C), we can simply do nothing here
+ // and add ln(2**96 / 10**18) at the end.
+
+ // Reduce range of x to (1, 2) * 2**96
+ // ln(2^k * x) = k * ln(2) + ln(x)
+ // Note: inlining ilog2 saves 8 gas.
+ int256 k = int256(ilog2(uint256(x))) - 96;
+ x <<= uint256(159 - k);
+ x = int256(uint256(x) >> 159);
+
+ // Evaluate using a (8, 8)-term rational approximation
+ // p is made monic, we will multiply by a scale factor later
+ int256 p = x + 3273285459638523848632254066296;
+ p = ((p * x) >> 96) + 24828157081833163892658089445524;
+ p = ((p * x) >> 96) + 43456485725739037958740375743393;
+ p = ((p * x) >> 96) - 11111509109440967052023855526967;
+ p = ((p * x) >> 96) - 45023709667254063763336534515857;
+ p = ((p * x) >> 96) - 14706773417378608786704636184526;
+ p = p * x - (795164235651350426258249787498 << 96);
+ //emit log_named_int("p", p);
+ // We leave p in 2**192 basis so we don't need to scale it back up for the division.
+ // q is monic by convention
+ int256 q = x + 5573035233440673466300451813936;
+ q = ((q * x) >> 96) + 71694874799317883764090561454958;
+ q = ((q * x) >> 96) + 283447036172924575727196451306956;
+ q = ((q * x) >> 96) + 401686690394027663651624208769553;
+ q = ((q * x) >> 96) + 204048457590392012362485061816622;
+ q = ((q * x) >> 96) + 31853899698501571402653359427138;
+ q = ((q * x) >> 96) + 909429971244387300277376558375;
+ assembly {
+ // Div in assembly because solidity adds a zero check despite the `unchecked`.
+ // The q polynomial is known not to have zeros in the domain. (All roots are complex)
+ // No scaling required because p is already 2**96 too large.
+ r := sdiv(p, q)
+ }
+ // r is in the range (0, 0.125) * 2**96
+
+ // Finalization, we need to
+ // * multiply by the scale factor s = 5.549…
+ // * add ln(2**96 / 10**18)
+ // * add k * ln(2)
+ // * multiply by 10**18 / 2**96 = 5**18 >> 78
+ // mul s * 5e18 * 2**96, base is now 5**18 * 2**192
+ r *= 1677202110996718588342820967067443963516166;
+ // add ln(2) * k * 5e18 * 2**192
+ r +=
+ 16597577552685614221487285958193947469193820559219878177908093499208371 *
+ k;
+ // add ln(2**96 / 10**18) * 5e18 * 2**192
+ r += 600920179829731861736702779321621459595472258049074101567377883020018308;
+ // base conversion: mul 2**18 / 2**192
+ r >>= 174;
+ }
+ }
+
+ // Computes e^x in 1e18 fixed point.
+ function exp(int256 x) internal pure returns (int256 r) {
+ unchecked {
+ // Input x is in fixed point format, with scale factor 1/1e18.
+
+ // When the result is < 0.5 we return zero. This happens when
+ // x <= floor(log(0.5e18) * 1e18) ~ -42e18
+ if (x <= -42139678854452767551) {
+ return 0;
+ }
+
+ // When the result is > (2**255 - 1) / 1e18 we can not represent it
+ // as an int256. This happens when x >= floor(log((2**255 -1) / 1e18) * 1e18) ~ 135.
+ if (x >= 135305999368893231589) revert Overflow();
+
+ // x is now in the range (-42, 136) * 1e18. Convert to (-42, 136) * 2**96
+ // for more intermediate precision and a binary basis. This base conversion
+ // is a multiplication by 1e18 / 2**96 = 5**18 / 2**78.
+ x = (x << 78) / 5 ** 18;
+
+ // Reduce range of x to (-½ ln 2, ½ ln 2) * 2**96 by factoring out powers of two
+ // such that exp(x) = exp(x') * 2**k, where k is an integer.
+ // Solving this gives k = round(x / log(2)) and x' = x - k * log(2).
+ int256 k = ((x << 96) / 54916777467707473351141471128 + 2 ** 95) >>
+ 96;
+ x = x - k * 54916777467707473351141471128;
+ // k is in the range [-61, 195].
+
+ // Evaluate using a (6, 7)-term rational approximation
+ // p is made monic, we will multiply by a scale factor later
+ int256 p = x + 2772001395605857295435445496992;
+ p = ((p * x) >> 96) + 44335888930127919016834873520032;
+ p = ((p * x) >> 96) + 398888492587501845352592340339721;
+ p = ((p * x) >> 96) + 1993839819670624470859228494792842;
+ p = p * x + (4385272521454847904632057985693276 << 96);
+ // We leave p in 2**192 basis so we don't need to scale it back up for the division.
+ // Evaluate using using Knuth's scheme from p. 491.
+ int256 z = x + 750530180792738023273180420736;
+ z = ((z * x) >> 96) + 32788456221302202726307501949080;
+ int256 w = x - 2218138959503481824038194425854;
+ w = ((w * z) >> 96) + 892943633302991980437332862907700;
+ int256 q = z + w - 78174809823045304726920794422040;
+ q = ((q * w) >> 96) + 4203224763890128580604056984195872;
+ assembly {
+ // Div in assembly because solidity adds a zero check despite the `unchecked`.
+ // The q polynomial is known not to have zeros in the domain. (All roots are complex)
+ // No scaling required because p is already 2**96 too large.
+ r := sdiv(p, q)
+ }
+ // r should be in the range (0.09, 0.25) * 2**96.
+
+ // We now need to multiply r by
+ // * the scale factor s = ~6.031367120...,
+ // * the 2**k factor from the range reduction, and
+ // * the 1e18 / 2**96 factor for base converison.
+ // We do all of this at once, with an intermediate result in 2**213 basis
+ // so the final right shift is always by a positive amount.
+ r = int256(
+ (uint256(r) *
+ 3822833074963236453042738258902158003155416615667) >>
+ uint256(195 - k)
+ );
+ }
+ }
+
+ function calcInitProofTimeIssued(
+ uint64 basefee,
+ uint16 proofTimeTarget,
+ uint8 adjustmentQuotient
+ ) public pure returns (uint64 initProofTimeIssued) {
+ uint256 scale = uint256(proofTimeTarget) * adjustmentQuotient;
+ // ln_pub() expects 1e18 fixed format
+ uint256 lnReq = scale * basefee * LibFixedPointMath.SCALING_FACTOR_1E18;
+ require(lnReq <= uint256(type(int256).max));
+ int256 log_result = ln_pub(int256(lnReq));
+ initProofTimeIssued = uint64(
+ ((scale * (uint256(log_result))) /
+ (LibFixedPointMath.SCALING_FACTOR_1E18))
+ );
+ }
+}
diff --git a/packages/protocol/test/SignalService.t.sol b/packages/protocol/test/SignalService.t.sol
new file mode 100644
index 00000000000..026e3ab538c
--- /dev/null
+++ b/packages/protocol/test/SignalService.t.sol
@@ -0,0 +1,189 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {AddressResolver} from "../contracts/common/AddressResolver.sol";
+import {Bridge} from "../contracts/bridge/Bridge.sol";
+import {BridgedERC20} from "../contracts/bridge/BridgedERC20.sol";
+import {BridgeErrors} from "../contracts/bridge/BridgeErrors.sol";
+import {console2} from "forge-std/console2.sol";
+import {FreeMintERC20} from "../contracts/test/erc20/FreeMintERC20.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Test} from "forge-std/Test.sol";
+import {IXchainSync} from "../contracts/common/IXchainSync.sol";
+
+contract PrankXchainSync is IXchainSync {
+ bytes32 private _blockHash;
+ bytes32 private _signalRoot;
+
+ function setXchainBlockHeader(bytes32 blockHash) external {
+ _blockHash = blockHash;
+ }
+
+ function setXchainSignalRoot(bytes32 signalRoot) external {
+ _signalRoot = signalRoot;
+ }
+
+ function getXchainBlockHash(uint256) external view returns (bytes32) {
+ return _blockHash;
+ }
+
+ function getXchainSignalRoot(uint256) external view returns (bytes32) {
+ return _signalRoot;
+ }
+}
+
+contract TestSignalService is Test {
+ AddressManager addressManager;
+
+ SignalService signalService;
+ SignalService destSignalService;
+ PrankXchainSync xChainSync;
+ uint256 destChainId = 7;
+
+ address public constant Alice = 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4;
+ address public constant Bob = 0x200708D76eB1B69761c23821809d53F65049939e;
+ address public Carol = 0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39;
+
+ function setUp() public {
+ vm.startPrank(Alice);
+ vm.deal(Alice, 1 ether);
+ vm.deal(Bob, 1 ether);
+
+ addressManager = new AddressManager();
+ addressManager.init();
+
+ signalService = new SignalService();
+ signalService.init(address(addressManager));
+
+ destSignalService = new SignalService();
+ destSignalService.init(address(addressManager));
+
+ xChainSync = new PrankXchainSync();
+
+ addressManager.setAddress(
+ block.chainid,
+ "signal_service",
+ address(signalService)
+ );
+
+ addressManager.setAddress(
+ destChainId,
+ "signal_service",
+ address(destSignalService)
+ );
+
+ addressManager.setAddress(
+ block.chainid,
+ "signal_service",
+ address(signalService)
+ );
+
+ addressManager.setAddress(destChainId, "taiko", address(xChainSync));
+
+ vm.stopPrank();
+ }
+
+ function test_send_signal_reverts_if_signal_is_zero() public {
+ vm.expectRevert(SignalService.B_ZERO_SIGNAL.selector);
+ signalService.sendSignal(0);
+ }
+
+ function test_is_signal_sent_reverts_if_address_is_zero() public {
+ bytes32 signal = bytes32(uint256(1));
+ vm.expectRevert(SignalService.B_NULL_APP_ADDR.selector);
+ signalService.isSignalSent(address(0), signal);
+ }
+
+ function test_is_signal_sent_reverts_if_signal_is_zero() public {
+ bytes32 signal = bytes32(uint256(0));
+ vm.expectRevert(SignalService.B_ZERO_SIGNAL.selector);
+ signalService.isSignalSent(Alice, signal);
+ }
+
+ function test_send_signal_and_signal_is_sent_correctly() public {
+ vm.startPrank(Alice);
+ bytes32 signal = bytes32(uint256(1));
+ signalService.sendSignal(signal);
+
+ bool isSent = signalService.isSignalSent(Alice, signal);
+ assertEq(isSent, true);
+ }
+
+ function test_get_signal_slot_returns_expected_slot_for_app_and_signal()
+ public
+ {
+ vm.startPrank(Alice);
+ for (uint8 i = 1; i < 100; i++) {
+ bytes32 signal = bytes32(block.prevrandao + i);
+ signalService.sendSignal(signal);
+
+ bool isSent = signalService.isSignalSent(Alice, signal);
+ assertEq(isSent, true);
+
+ bytes32 slot = signalService.getSignalSlot(Alice, signal);
+
+ // confirm our assembly gives same output as expected native solidity hash/packing
+ bytes32 expectedSlot = keccak256(abi.encodePacked(Alice, signal));
+ assertEq(slot, expectedSlot);
+ }
+ }
+
+ function test_is_signal_received_reverts_if_src_chain_id_is_same_as_block_chain_id()
+ public
+ {
+ bytes32 signal = bytes32(uint256(1));
+ bytes memory proof = new bytes(1);
+ vm.expectRevert(SignalService.B_WRONG_CHAIN_ID.selector);
+ signalService.isSignalReceived(block.chainid, Alice, signal, proof);
+ }
+
+ function test_is_signal_received_reverts_if_app_is_zero_address() public {
+ bytes32 signal = bytes32(uint256(1));
+ bytes memory proof = new bytes(1);
+ vm.expectRevert(SignalService.B_NULL_APP_ADDR.selector);
+ signalService.isSignalReceived(destChainId, address(0), signal, proof);
+ }
+
+ function test_is_signal_received_reverts_if_signal_is_zero() public {
+ bytes32 signal = bytes32(uint256(0));
+ bytes memory proof = new bytes(1);
+ vm.expectRevert(SignalService.B_ZERO_SIGNAL.selector);
+ signalService.isSignalReceived(destChainId, Alice, signal, proof);
+ }
+
+ function test_is_signal_received_reverts_if_proof_is_invalid() public {
+ bytes32 signal = bytes32(uint256(1));
+ bytes memory proof = new bytes(1);
+ vm.expectRevert();
+ signalService.isSignalReceived(destChainId, Alice, signal, proof);
+ }
+
+ function test_is_signal_received() public {
+ // known signal with known proof for known block header/signalRoot from a known chain ID
+ // of 1336, since we cant generate merkle proofs with foundry.
+ bytes32 signal = bytes32(
+ 0xa99d658793daba4d352c77378e2d0f3b12ff47503518b3ec9ad61bb33ee7031d
+ );
+ bytes
+ memory proof = hex"0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003e0d5c45a5c0fabac05a887ad983965a225214df2cecd77adc216d3b1172866b1e91dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493470000000000000000000000000000000000000000000000000000000000000000cba38a70215ae3eeba2e97f9b6c3c804541484202953760c1cfe734df6dfce7cf7f7ed1e57a053e1c79765d6b76305193cae04261538400724837787437e621c9e6a8ea258a11278cf2e54d0e4845843837a1da42483ebe1dddf3eed1d33088b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000099c8ac000000000000000000000000000000000000000000000000000000000000ac7500000000000000000000000000000000000000000000000000000000644311c100000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000164c61e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061d883010a1a846765746888676f312e31382e38856c696e757800000000000000def5020e30ddc20e32151adb608a5d8367d817a707ae8d520c98ac13de04bce35f95ef795a9c4fd13d3e5daf713525521043125bde66aa71eed7ca715f05c720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dbf8d9b8b3f8b18080a04fc5f13ab2f9ba0c2da88b0151ab0e7cf4d85d08cca45ccd923c6ab76323eb28a02b70a98baa2507beffe8c266006cae52064dccf4fd1998af774ab3399029b38380808080a07394a09684ef3b2c87e9e2a753eb4ac78e2047b980e16d2e2133aee78946370d8080a0f4984a11f61a2921456141df88de6e1a710d28681b91af794c5a721e47839cd7a00f6329feca1549bd3bf7ab9a2e474bde37cb4f81366fca1dfdd9257c7305b5b880808080a3e2a037a8317247f2d3e645fa68570a9ae97a73b5568fe0578b90197316c654138997010000000000";
+
+ xChainSync.setXchainBlockHeader(
+ 0x986278442ae7469dbd55f478348b4547c399004c93325b18ed995d2bc008f98d
+ );
+ xChainSync.setXchainSignalRoot(
+ 0x58900f5366437923bb250887d359d828a1a89e1837f9369f75c3e1bb238b854f
+ );
+
+ vm.chainId(destChainId);
+
+ bool isReceived = destSignalService.isSignalReceived(
+ 1336,
+ Carol,
+ signal,
+ proof
+ );
+
+ assertEq(isReceived, true);
+ }
+}
diff --git a/packages/protocol/test/SignalServiceCalc.sol b/packages/protocol/test/SignalServiceCalc.sol
new file mode 100644
index 00000000000..42ede313ea8
--- /dev/null
+++ b/packages/protocol/test/SignalServiceCalc.sol
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {LibRLPWriter} from "../contracts/thirdparty/LibRLPWriter.sol";
+
+contract TestSignalServiceCalc is Test {
+ function setUp() public {}
+
+ function testLibRLPWriterOne() public {
+ assertEq(LibRLPWriter.writeBytes32(bytes32(uint256(1))), hex"01");
+ }
+
+ function testAbiEncodeBytes32(bytes32 seed) public {
+ for (uint i = 0; i < 100; ++i) {
+ seed = keccak256(abi.encodePacked(seed));
+ bytes memory _seed = bytes.concat(seed);
+
+ bytes memory encoded = abi.encodePacked(seed);
+ assertEq(encoded.length, _seed.length);
+ for (uint j = 0; j < encoded.length; ++j) {
+ assertEq(encoded[j], _seed[j]);
+ }
+ }
+
+ for (uint i = 0; i < 100; ++i) {
+ seed = bytes32(i);
+ bytes memory _seed = bytes.concat(seed);
+
+ bytes memory encoded = abi.encodePacked(seed);
+ assertEq(encoded.length, _seed.length);
+ for (uint j = 0; j < encoded.length; ++j) {
+ assertEq(encoded[j], _seed[j]);
+ }
+ }
+ }
+}
diff --git a/packages/protocol/test/Taiko1559Params.t.sol b/packages/protocol/test/Taiko1559Params.t.sol
new file mode 100644
index 00000000000..f83865533f9
--- /dev/null
+++ b/packages/protocol/test/Taiko1559Params.t.sol
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: UNLICENSED
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {Lib1559Math as T} from "../contracts/libs/Lib1559Math.sol";
+import {TaikoL2} from "../contracts/L2/TaikoL2.sol";
+import {
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+
+contract TestTaiko1559Params is Test {
+ using SafeCastUpgradeable for uint256;
+
+ function testAndVerifyTaiko1559Params() external {
+ // Assume we scale L1 throughput by 10 times.
+ uint64 scaleFactor = 10;
+
+ // Assume we lower the L1 transaction cost by 25 times.
+ uint64 costFactor = 25;
+
+ // Calculate gas space issuance per second
+ uint64 ethereumBlockGasTarget = 15000000;
+ uint64 ethereumBlockTime = 12;
+
+ // https://ultrasound.money/
+ uint64 ethereumBasefeeNow = 28000000000; // 28Gwei
+
+ uint64 gasIssuedPerSecond = (scaleFactor * ethereumBlockGasTarget) /
+ ethereumBlockTime;
+
+ // Tune this number manually so ratio2x1x is ~112.5%.
+ uint64 maxSeconds = 7272;
+
+ uint64 gasExcessMax = gasIssuedPerSecond * maxSeconds;
+
+ uint64 initialBasefee = ethereumBasefeeNow / costFactor;
+
+ TaikoL2.EIP1559Params memory param1559 = TaikoL2.EIP1559Params({
+ basefee: initialBasefee,
+ gasIssuedPerSecond: gasIssuedPerSecond,
+ gasExcessMax: gasExcessMax,
+ gasTarget: gasIssuedPerSecond * ethereumBlockTime,
+ ratio2x1x: 11250 // ~12.5% increase
+ });
+
+ console2.log("basefee :", param1559.basefee);
+ console2.log("gasIssuedPerSecond:", param1559.gasIssuedPerSecond);
+ console2.log("gasExcessMax :", param1559.gasExcessMax);
+ console2.log("gasTarget :", param1559.gasTarget);
+ console2.log("ratio2x1x :", param1559.ratio2x1x);
+
+ // basefee : 1120000000
+ // gasIssuedPerSecond: 12500000
+ // gasExcessMax : 90900000000
+ // gasTarget : 150000000
+ // ratio2x1x : 11250
+
+ TaikoL2 L2 = new TaikoL2();
+ L2.init(address(1), param1559); // Dummy address manager address.
+ }
+}
diff --git a/packages/protocol/test/TaikoL1.sim.sol b/packages/protocol/test/TaikoL1.sim.sol
new file mode 100644
index 00000000000..19dfaf6b825
--- /dev/null
+++ b/packages/protocol/test/TaikoL1.sim.sol
@@ -0,0 +1,168 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {FoundryRandom} from "foundry-random/FoundryRandom.sol";
+import {TaikoConfig} from "../contracts/L1/TaikoConfig.sol";
+import {TaikoData} from "../contracts/L1/TaikoData.sol";
+import {TaikoL1} from "../contracts/L1/TaikoL1.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+import {TaikoL1TestBase} from "./TaikoL1TestBase.t.sol";
+import {LibLn} from "./LibLn.sol";
+
+/// @dev Warning: this test will take 7-10 minutes and require 1GB memory.
+/// `pnpm test:sim`
+contract TaikoL1_b is TaikoL1 {
+ function getConfig()
+ public
+ pure
+ override
+ returns (TaikoData.Config memory config)
+ {
+ config = TaikoConfig.getConfig();
+
+ config.txListCacheExpiry = 0;
+ config.enableSoloProposer = false;
+ config.maxNumProposedBlocks = 36;
+ config.ringBufferSize = 40;
+ config.maxVerificationsPerTx = 5;
+ config.proofCooldownPeriod = 1 minutes;
+ config.proofTimeTarget = 200;
+ }
+}
+
+contract Verifier {
+ fallback(bytes calldata) external returns (bytes memory) {
+ return bytes.concat(keccak256("taiko"));
+ }
+}
+
+contract TaikoL1Simulation is TaikoL1TestBase, FoundryRandom {
+ function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
+ taikoL1 = new TaikoL1_b();
+ }
+
+ function setUp() public override {
+ uint16 proofTimeTarget = 200; // Approx. value which close to what is in the simulation
+
+ initProofTimeIssued = LibLn.calcInitProofTimeIssued(
+ feeBase,
+ proofTimeTarget,
+ ADJUSTMENT_QUOTIENT
+ );
+
+ TaikoL1TestBase.setUp();
+ registerAddress(L1.getVerifierName(100), address(new Verifier()));
+ }
+
+ function testGeneratingManyRandomBlocks() external {
+ uint256 time = block.timestamp;
+ assertEq(time, 1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 10000 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint32 parentGasUsed;
+
+ printVariableHeaders();
+ printVariables();
+
+ // Every 1000 blocks take about 40 seconds
+ // TODO(daniel|dani): change this to 10000
+ uint256 blocksToSimulate = 100;
+ uint256 avgBlockTime = 10 seconds;
+
+ for (uint256 blockId = 1; blockId < blocksToSimulate; blockId++) {
+ time += randomNumber(avgBlockTime * 2);
+
+ while ((time / 12) * 12 > block.timestamp) {
+ vm.warp(block.timestamp + 12);
+ vm.roll(block.number + 1);
+ }
+
+ uint32 gasLimit = uint32(randomNumber(100E3, 30E6)); // 100K to 30M
+ uint32 gasUsed = uint32(randomNumber(gasLimit / 2, gasLimit));
+ uint24 txListSize = uint24(randomNumber(1, conf.maxBytesPerTxList));
+ bytes32 blockHash = bytes32(randomNumber(type(uint256).max));
+ bytes32 signalRoot = bytes32(randomNumber(type(uint256).max));
+
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ gasLimit,
+ txListSize
+ );
+ // Here we need to have some time elapsed between propose and prove
+ // Realistically lets make it somewhere 160-240 sec, it is realistic
+ // for a testnet. Created this function because randomNumber seems to
+ // be non-working properly.
+ uint8 proveTimeCnt = pickRandomProveTime(
+ uint256(
+ keccak256(
+ abi.encodePacked(time, msg.sender, block.timestamp)
+ )
+ )
+ );
+
+ mine(proveTimeCnt);
+
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ parentGasUsed,
+ gasUsed,
+ blockHash,
+ signalRoot,
+ false
+ );
+ printVariables();
+
+ parentHash = blockHash;
+ parentGasUsed = gasUsed;
+ }
+ console2.log("-----------------------------");
+ console2.log("avgBlockTime:", avgBlockTime);
+ }
+
+ // TODO(daniel|dani): log enough state variables for analysis.
+ function printVariableHeaders() internal view {
+ string memory str = string.concat(
+ "\nlogCount,",
+ "time,",
+ "lastVerifiedBlockId,",
+ "numBlocks,",
+ "baseFee,",
+ "accProposedAt"
+ );
+ console2.log(str);
+ }
+
+ // TODO(daniel|dani): log enough state variables for analysis.
+ function printVariables() internal {
+ TaikoData.StateVariables memory vars = L1.getStateVariables();
+ string memory str = string.concat(
+ Strings.toString(logCount++),
+ ",",
+ Strings.toString(block.timestamp),
+ ",",
+ Strings.toString(vars.lastVerifiedBlockId),
+ ",",
+ Strings.toString(vars.numBlocks),
+ ",",
+ Strings.toString(vars.basefee),
+ ",",
+ Strings.toString(vars.accProposedAt)
+ );
+ console2.log(str);
+ }
+
+ function pickRandomProveTime(
+ uint256 randomNum
+ ) internal pure returns (uint8) {
+ // Result shall be between 8-12 (inclusive)
+ // so that it will result in a 160-240s proof time
+ // while the proof time target is 200s
+ return uint8(8 + (randomNum % 5));
+ }
+}
diff --git a/packages/protocol/test/TaikoL1.t.sol b/packages/protocol/test/TaikoL1.t.sol
new file mode 100644
index 00000000000..880eb74bcdc
--- /dev/null
+++ b/packages/protocol/test/TaikoL1.t.sol
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {TaikoConfig} from "../contracts/L1/TaikoConfig.sol";
+import {TaikoData} from "../contracts/L1/TaikoData.sol";
+import {TaikoL1} from "../contracts/L1/TaikoL1.sol";
+import {TaikoToken} from "../contracts/L1/TaikoToken.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+import {TaikoL1TestBase} from "./TaikoL1TestBase.t.sol";
+
+contract TaikoL1_NoCooldown is TaikoL1 {
+ function getConfig()
+ public
+ pure
+ override
+ returns (TaikoData.Config memory config)
+ {
+ config = TaikoConfig.getConfig();
+
+ config.txListCacheExpiry = 5 minutes;
+ config.maxVerificationsPerTx = 0;
+ config.enableSoloProposer = false;
+ config.maxNumProposedBlocks = 10;
+ config.ringBufferSize = 12;
+ config.proofCooldownPeriod = 0;
+ }
+}
+
+contract Verifier {
+ fallback(bytes calldata) external returns (bytes memory) {
+ return bytes.concat(keccak256("taiko"));
+ }
+}
+
+contract TaikoL1Test is TaikoL1TestBase {
+ function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
+ taikoL1 = new TaikoL1_NoCooldown();
+ }
+
+ function setUp() public override {
+ TaikoL1TestBase.setUp();
+
+ registerAddress(L1.getVerifierName(100), address(new Verifier()));
+ }
+
+ /// @dev Test we can propose, prove, then verify more blocks than 'maxNumProposedBlocks'
+ function test_more_blocks_than_ring_buffer_size() external {
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint32 parentGasUsed = 0;
+ uint32 gasUsed = 1000000;
+
+ for (
+ uint256 blockId = 1;
+ blockId < conf.maxNumProposedBlocks * 10;
+ blockId++
+ ) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ parentGasUsed,
+ gasUsed,
+ blockHash,
+ signalRoot,
+ false
+ );
+
+ verifyBlock(Carol, 1);
+ parentHash = blockHash;
+ parentGasUsed = gasUsed;
+ }
+ printVariables("");
+ }
+
+ /// @dev Test more than one block can be proposed, proven, & verified in the
+ /// same L1 block.
+ function test_multiple_blocks_in_one_L1_block() external {
+ depositTaikoToken(Alice, 1000 * 1E8, 1000 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint32 parentGasUsed = 0;
+ uint32 gasUsed = 1000000;
+
+ for (uint256 blockId = 1; blockId <= 2; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ printVariables("after propose");
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Alice,
+ meta,
+ parentHash,
+ parentGasUsed,
+ gasUsed,
+ blockHash,
+ signalRoot,
+ false
+ );
+ verifyBlock(Alice, 2);
+ parentHash = blockHash;
+ parentGasUsed = gasUsed;
+ }
+ printVariables("");
+ }
+
+ /// @dev Test verifying multiple blocks in one transaction
+ function test_verifying_multiple_blocks_once() external {
+ depositTaikoToken(Alice, 1E6 * 1E8, 1000 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint32 parentGasUsed = 0;
+ uint32 gasUsed = 1000000;
+
+ for (
+ uint256 blockId = 1;
+ blockId <= conf.maxNumProposedBlocks;
+ blockId++
+ ) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ printVariables("after propose");
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Alice,
+ meta,
+ parentHash,
+ parentGasUsed,
+ gasUsed,
+ blockHash,
+ signalRoot,
+ false
+ );
+ parentHash = blockHash;
+ parentGasUsed = gasUsed;
+ }
+
+ verifyBlock(Alice, conf.maxNumProposedBlocks - 1);
+ printVariables("after verify");
+ verifyBlock(Alice, conf.maxNumProposedBlocks);
+ printVariables("after verify");
+ }
+
+ function testEthDepositsToL2Reverts() external {
+ uint96 minAmount = conf.minEthDepositAmount;
+ uint96 maxAmount = conf.maxEthDepositAmount;
+
+ depositTaikoToken(Alice, 0, maxAmount + 1 ether);
+
+ vm.prank(Alice, Alice);
+ vm.expectRevert();
+ L1.depositEtherToL2{value: minAmount - 1}();
+
+ vm.prank(Alice, Alice);
+ vm.expectRevert();
+ L1.depositEtherToL2{value: maxAmount + 1}();
+
+ assertEq(L1.getStateVariables().nextEthDepositToProcess, 0);
+ assertEq(L1.getStateVariables().numEthDeposits, 0);
+ }
+
+ function testEthDepositsToL2Gas() external {
+ vm.fee(25 gwei);
+
+ bytes32 emptyDepositsRoot = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
+ depositTaikoToken(Alice, 1E6 * 1E8, 100000 ether);
+
+ proposeBlock(Alice, 1000000, 1024);
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ assertEq(meta.depositsRoot, emptyDepositsRoot);
+ assertEq(meta.depositsProcessed.length, 0);
+
+ uint256 count = conf.maxEthDepositsPerBlock;
+
+ printVariables("before sending ethers");
+ for (uint256 i; i < count; ++i) {
+ vm.prank(Alice, Alice);
+ L1.depositEtherToL2{value: (i + 1) * 1 ether}();
+ }
+ printVariables("after sending ethers");
+
+ uint gas = gasleft();
+ meta = proposeBlock(Alice, 1000000, 1024);
+ uint gasUsedWithDeposits = gas - gasleft();
+ console2.log("gas used with eth deposits:", gasUsedWithDeposits);
+
+ printVariables("after processing send-ethers");
+ assertTrue(meta.depositsRoot != emptyDepositsRoot);
+ assertEq(meta.depositsProcessed.length, count + 1);
+
+ gas = gasleft();
+ meta = proposeBlock(Alice, 1000000, 1024);
+ uint gasUsedWithoutDeposits = gas - gasleft();
+
+ console2.log("gas used without eth deposits:", gasUsedWithoutDeposits);
+
+ uint gasPerEthDeposit = (gasUsedWithDeposits - gasUsedWithoutDeposits) /
+ count;
+
+ console2.log("gas per eth deposit:", gasPerEthDeposit);
+ console2.log("maxEthDepositsPerBlock:", count);
+ }
+}
diff --git a/packages/protocol/test/TaikoL1LibTokenomicsMainnet.t.sol b/packages/protocol/test/TaikoL1LibTokenomicsMainnet.t.sol
new file mode 100644
index 00000000000..a31c4d0235b
--- /dev/null
+++ b/packages/protocol/test/TaikoL1LibTokenomicsMainnet.t.sol
@@ -0,0 +1,299 @@
+// SPDX-License-Identifier: UNLICENSED
+pragma solidity ^0.8.18;
+
+// Uncomment if you want to compare fee/vs reward
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {FoundryRandom} from "foundry-random/FoundryRandom.sol";
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {TaikoConfig} from "../contracts/L1/TaikoConfig.sol";
+import {TaikoData} from "../contracts/L1/TaikoData.sol";
+import {TaikoL1} from "../contracts/L1/TaikoL1.sol";
+import {TaikoToken} from "../contracts/L1/TaikoToken.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+import {TaikoL1TestBase} from "./TaikoL1TestBase.t.sol";
+import {LibLn} from "./LibLn.sol";
+
+contract TaikoL1MainnetMockConfig is TaikoL1 {
+ function getConfig()
+ public
+ pure
+ override
+ returns (TaikoData.Config memory config)
+ {
+ config = TaikoConfig.getConfig();
+
+ config.txListCacheExpiry = 5 minutes;
+ config.maxVerificationsPerTx = 1;
+ config.enableSoloProposer = false;
+ config.maxNumProposedBlocks = 200;
+ config.ringBufferSize = 240;
+ config.proofCooldownPeriod = 0;
+ config.proofTimeTarget = 2160;
+ }
+}
+
+contract TaikoL1LibTokenomicsMainnet is TaikoL1TestBase, FoundryRandom {
+ // To avoid stack too deep error
+ // Can play to adjust
+ uint32 iterationCnt = 5000;
+ uint8 proofTime = 180; // When proofs are coming, 180 means 180 sec
+ // Check balances
+ uint256 Alice_start_balance;
+ uint256 Bob_start_balance;
+
+ function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
+ taikoL1 = new TaikoL1MainnetMockConfig();
+ }
+
+ function setUp() public override {
+ uint16 proofTimeTarget = 2160; // Approx. mainnet value
+ // Calculating it for our needs based on testnet/mainnet proof vars.
+ // See Brecht's comment https://github.com/taikoxyz/taiko-mono/pull/13564
+ initProofTimeIssued = LibLn.calcInitProofTimeIssued(
+ feeBase,
+ proofTimeTarget,
+ ADJUSTMENT_QUOTIENT
+ );
+
+ TaikoL1TestBase.setUp();
+
+ depositTaikoToken(Alice, 1E8 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E8 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E8 * 1E8, 100 ether);
+
+ Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ }
+
+ /// @dev A possible (close to) mainnet scenarios is the following:
+ //// - Blocks ever 10 seconds proposed
+ //// - Proofs coming shifted slightly below 30 min / proposed block afterwards
+ //// Expected result: Withdrawals and deposits are in balance but keep shrinking since quicker proofTime
+ function xtest_possible_mainnet_scenario_proof_time_below_target()
+ external
+ {
+ vm.pauseGasMetering();
+ mine(1);
+
+ depositTaikoToken(Alice, 1E8 * 1E8, 1000 ether);
+ depositTaikoToken(Bob, 1E8 * 1E8, 1000 ether);
+ depositTaikoToken(Carol, 1E8 * 1E8, 1000 ether);
+
+ // Check balances
+ Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+
+ // Can play to adjust
+ proofTime = 179; // When proofs are coming, 179 means 1790 sec
+
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ iterationCnt
+ );
+ uint64[] memory proposedAt = new uint64[](iterationCnt);
+ bytes32[] memory parentHashes = new bytes32[](iterationCnt);
+ bytes32[] memory blockHashes = new bytes32[](iterationCnt);
+ bytes32[] memory signalRoots = new bytes32[](iterationCnt);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ console2.logBytes32(parentHash);
+
+ // Run another session with huge times
+ for (uint256 blockId = 1; blockId < iterationCnt; blockId++) {
+ meta[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ blockHashes[blockId] = bytes32(1E10 + blockId);
+ signalRoots[blockId] = bytes32(1E9 + blockId);
+
+ if (blockId > proofTime) {
+ //Start proving with an offset
+ proveBlock(
+ Bob,
+ meta[blockId - proofTime],
+ parentHashes[blockId - proofTime],
+ (blockId - proofTime == 1) ? 0 : 1000000, // Genesis block has 0 gas used
+ 1000000,
+ blockHashes[blockId - proofTime],
+ signalRoots[blockId - proofTime],
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt[blockId - proofTime])
+ );
+ verifyBlock(Carol, 1);
+ }
+
+ mine_every_12_sec();
+
+ parentHashes[blockId] = parentHash;
+ parentHash = blockHashes[blockId];
+ }
+
+ //Check end balances
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+ // Assert their balance changed relatively the same way
+ // 1e18 == within 100 % delta -> 1e17 10%, let's see if this is within that range
+ assertApproxEqRel(deposits, withdrawals, 1e17);
+ }
+
+ /// @dev A possible (close to) mainnet scenarios is the following:
+ //// - Blocks ever 10 seconds proposed
+ //// - Proofs coming shifted slightly below 30 min / proposed block afterwards
+ //// Expected result: Withdrawals and deposits are in balance but keep shrinking since quicker proofTime
+ function xtest_possible_mainnet_scenario_proof_time_at_target() external {
+ vm.pauseGasMetering();
+ mine(1);
+
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ iterationCnt
+ );
+ uint64[] memory proposedAt = new uint64[](iterationCnt);
+ bytes32[] memory parentHashes = new bytes32[](iterationCnt);
+ bytes32[] memory blockHashes = new bytes32[](iterationCnt);
+ bytes32[] memory signalRoots = new bytes32[](iterationCnt);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Run another session with huge times
+ for (uint256 blockId = 1; blockId < iterationCnt; blockId++) {
+ {
+ meta[blockId] = proposeBlock(Alice, 100000, 10);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ blockHashes[blockId] = bytes32(1E10 + blockId); //blockHash;
+ signalRoots[blockId] = bytes32(1E9 + blockId); //signalRoot;
+
+ if (blockId > proofTime) {
+ //Start proving with an offset
+ proveBlock(
+ Bob,
+ meta[blockId - proofTime],
+ parentHashes[blockId - proofTime],
+ (blockId - proofTime == 1) ? 0 : 1000000,
+ 1000000,
+ blockHashes[blockId - proofTime],
+ signalRoots[blockId - proofTime],
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(
+ provenAt,
+ proposedAt[blockId - proofTime]
+ )
+ );
+ }
+
+ mine_every_12_sec();
+
+ parentHashes[blockId] = parentHash;
+ parentHash = blockHashes[blockId];
+ }
+ }
+ //Check end balances
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+ // Assert their balance changed relatively the same way
+ // 1e18 == within 100 % delta -> 1e17 10%, let's see if this is within that range
+ assertApproxEqRel(deposits, withdrawals, 1e17);
+ }
+
+ /// @dev A possible (close to) mainnet scenarios is the following:
+ //// - Blocks ever 10 seconds proposed
+ //// - Proofs coming shifted slightly above 30 min / proposed block afterwards
+ //// Expected result: Withdrawals and deposits are in balance but fees keep growing bc of above target
+ function xtest_possible_mainnet_scenario_proof_time_above_target()
+ external
+ {
+ vm.pauseGasMetering();
+ mine(1);
+
+ proofTime = 181; // When proofs are coming, 181 means 1810 sec
+
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ iterationCnt
+ );
+ uint64[] memory proposedAt = new uint64[](iterationCnt);
+ bytes32[] memory parentHashes = new bytes32[](iterationCnt);
+ bytes32[] memory blockHashes = new bytes32[](iterationCnt);
+ bytes32[] memory signalRoots = new bytes32[](iterationCnt);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ for (uint256 blockId = 1; blockId < iterationCnt; blockId++) {
+ meta[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ blockHashes[blockId] = bytes32(1E10 + blockId);
+ signalRoots[blockId] = bytes32(1E9 + blockId);
+
+ if (blockId > proofTime) {
+ //Start proving with an offset
+ proveBlock(
+ Bob,
+ meta[blockId - proofTime],
+ parentHashes[blockId - proofTime],
+ (blockId - proofTime == 1) ? 0 : 1000000,
+ 1000000,
+ blockHashes[blockId - proofTime],
+ signalRoots[blockId - proofTime],
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt[blockId - proofTime])
+ );
+ verifyBlock(Carol, 1);
+ }
+
+ mine_every_12_sec();
+
+ parentHashes[blockId] = parentHash;
+ parentHash = blockHashes[blockId];
+ }
+
+ //Check end balances
+ //Check end balances
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+ // Assert their balance changed relatively the same way
+ // 1e18 == within 100 % delta -> 1e17 10%, let's see if this is within that range
+ assertApproxEqRel(deposits, withdrawals, 1e17);
+ }
+
+ function mine_every_12_sec() internal {
+ vm.warp(block.timestamp + 12);
+ vm.roll(block.number + 1);
+ }
+}
diff --git a/packages/protocol/test/TaikoL1LibTokenomicsTestnet.t.sol b/packages/protocol/test/TaikoL1LibTokenomicsTestnet.t.sol
new file mode 100644
index 00000000000..5ced9c71d93
--- /dev/null
+++ b/packages/protocol/test/TaikoL1LibTokenomicsTestnet.t.sol
@@ -0,0 +1,990 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+// Uncomment if you want to compare fee/vs reward
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {TaikoConfig} from "../contracts/L1/TaikoConfig.sol";
+import {TaikoData} from "../contracts/L1/TaikoData.sol";
+import {TaikoL1} from "../contracts/L1/TaikoL1.sol";
+import {TaikoToken} from "../contracts/L1/TaikoToken.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+import {TaikoL1TestBase} from "./TaikoL1TestBase.t.sol";
+import {LibLn} from "./LibLn.sol";
+
+contract TaikoL1WithTestnetConfig is TaikoL1 {
+ function getConfig()
+ public
+ pure
+ override
+ returns (TaikoData.Config memory config)
+ {
+ config = TaikoConfig.getConfig();
+
+ config.txListCacheExpiry = 5 minutes;
+ config.maxVerificationsPerTx = 0;
+ config.enableSoloProposer = false;
+ config.proofCooldownPeriod = 0;
+ config.maxNumProposedBlocks = 40;
+ config.ringBufferSize = 48;
+ config.proofTimeTarget = 120; // Testnet example
+ }
+}
+
+// Testing the base "math" and directions if all is good
+contract TaikoL1LibTokenomicsTestnet is TaikoL1TestBase {
+ function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
+ taikoL1 = new TaikoL1WithTestnetConfig();
+ }
+
+ function setUp() public override {
+ uint16 proofTimeTarget = 120; // Approx. testnet value
+ // Calculating it for our needs based on testnet/mainnet proof vars.
+ // See Brecht's comment https://github.com/taikoxyz/taiko-mono/pull/13564
+ initProofTimeIssued = LibLn.calcInitProofTimeIssued(
+ feeBase,
+ proofTimeTarget,
+ ADJUSTMENT_QUOTIENT
+ );
+
+ TaikoL1TestBase.setUp();
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+ }
+
+ /// @dev Test what happens when proof time increases
+ function test_balanced_state_reward_and_fee_if_proof_time_increases_slowly_then_drastically()
+ external
+ {
+ mine(1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ mine(blockId);
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+
+ verifyBlock(Carol, 1);
+ // This is where new fee evaluated
+ printVariables("after verify");
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+
+ // Run another session with huge times
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ mine_huge();
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+ verifyBlock(Carol, 1);
+ // This is where new fee evaluated
+ printVariables("after verify");
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test what happens when proof time hectic couple of proposes, without prove, then some proofs
+ function test_balanced_state_reward_and_fee_if_proof_time_hectic()
+ external
+ {
+ mine(1);
+ //Needs lot of token here - because there is lots of time elapsed between 2 'propose' blocks, which will raise the fee
+
+ depositTaikoToken(Alice, 1E8 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E8 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E8 * 1E8, 100 ether);
+
+ TaikoData.BlockMetadata[] memory metas = new TaikoData.BlockMetadata[](
+ 20
+ );
+ uint64[] memory proposedAtArr = new uint64[](20);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ // Propose blocks - but dont go above a certain iterationi count because the drastically increasing
+ // proof time will be an issue
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ //printVariables("before propose");
+ metas[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAtArr[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ mine(blockId);
+ }
+
+ // Wait random X
+ mine(6);
+ // Prove and verify
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ metas[blockId],
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAtArr[blockId])
+ );
+
+ verifyBlock(Carol, 1);
+
+ printVariables("after verify");
+ mine(blockId);
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ // Run another iteration
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ printVariables("after propose");
+ mine_proofTime();
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test and see what happens when proof time is stable below the target and proving consecutive
+ function test_balanced_state_reward_and_fee_if_proof_time_stable_below_target_prooving_consecutive()
+ external
+ {
+ mine(1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ //parentHash = prove_with_increasing_time(parentHash, 10);
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ printVariables("after propose");
+ mine(2);
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test and see what happens when proof time is stable below the target and proving non consecutive
+ function test_balanced_state_reward_and_fee_if_proof_time_stable_below_target_proving_non_consecutive()
+ external
+ {
+ mine(1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ 30
+ );
+ uint64[] memory proposedAt = new uint64[](30);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ // Propose blocks
+ for (uint256 blockId = 1; blockId < 30; blockId++) {
+ //printVariables("before propose");
+ meta[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ mine(blockId);
+ }
+
+ // Wait random X
+ mine(6);
+ //Prove and verify
+ for (uint256 blockId = 1; blockId < 30; blockId++) {
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+
+ proveBlock(
+ Bob,
+ meta[blockId],
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt[blockId])
+ );
+
+ verifyBlock(Carol, 1);
+
+ mine(3);
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test what happens when proof time decreases
+ function test_balanced_state_reward_and_fee_if_proof_time_decreases()
+ external
+ {
+ mine(1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ 20
+ );
+ uint64[] memory proposedAt = new uint64[](20);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ // Propose blocks
+ for (uint256 blockId = 1; blockId < 20; blockId++) {
+ //printVariables("before propose");
+ meta[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ mine(blockId);
+ }
+
+ // Wait random X
+ mine(6);
+ // Prove and verify
+ for (uint256 blockId = 1; blockId < 20; blockId++) {
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta[blockId],
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt[blockId])
+ );
+
+ verifyBlock(Carol, 1);
+ mine(21 - blockId);
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+ // console2.log("Deposits:", deposits);
+ // console2.log("withdrawals:", withdrawals);
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test and see what happens when proof time is stable above the target and proving consecutive
+ function test_balanced_state_reward_and_fee_if_proof_time_stable_above_target_prooving_consecutive()
+ external
+ {
+ mine(1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ //parentHash = prove_with_increasing_time(parentHash, 10);
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ printVariables("after propose");
+ mine(5);
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test and see what happens when proof time is stable above the target and proving non consecutive
+ function test_balanced_state_reward_and_fee_if_proof_time_stable_above_target_proving_non_consecutive()
+ external
+ {
+ mine(1);
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ 30
+ );
+ uint64[] memory proposedAt = new uint64[](30);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ // Propose blocks
+ for (uint256 blockId = 1; blockId < 30; blockId++) {
+ //printVariables("before propose");
+ meta[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ mine(blockId);
+ }
+
+ // Wait random X
+ mine(6);
+ // Prove and verify
+ for (uint256 blockId = 1; blockId < 30; blockId++) {
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+
+ proveBlock(
+ Bob,
+ meta[blockId],
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt[blockId])
+ );
+
+ verifyBlock(Carol, 1);
+ mine(5);
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test what happens when proof time decreases
+ function test_balanced_state_reward_and_fee_if_proof_time_decreasses_then_stabilizes_consecutive()
+ external
+ {
+ mine(1);
+
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ //parentHash = prove_with_increasing_time(parentHash, 10);
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ printVariables("after propose");
+ uint64 proposedAt = uint64(block.timestamp);
+ mine(11 - blockId);
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+
+ // Run another session with huge times
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ printVariables("after propose");
+ mine_proofTime();
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test what happens when proof time decreases
+ function test_balanced_state_reward_and_fee_if_proof_time_decreases_then_stabilizes_non_consecutive()
+ external
+ {
+ mine(1);
+ // Requires a bit more tokens
+ depositTaikoToken(Alice, 1E8 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E8 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E8 * 1E8, 100 ether);
+
+ TaikoData.BlockMetadata[]
+ memory metaArr = new TaikoData.BlockMetadata[](20);
+ uint64[] memory proposedAtArr = new uint64[](20);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ // Propose blocks
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ //printVariables("before propose");
+ metaArr[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAtArr[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+ mine(blockId);
+ }
+
+ // Wait random X
+ mine(6);
+ // Prove and verify
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ metaArr[blockId],
+ parentHash,
+ (blockId == 1 ? 0 : 1000000),
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAtArr[blockId])
+ );
+
+ verifyBlock(Carol, 1);
+ mine(21 - blockId);
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+
+ // Run another session with huge times
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ printVariables("after propose");
+ mine_proofTime();
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ // console2.log("Deposits:", deposits);
+ // console2.log("withdrawals:", withdrawals);
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test and see what happens when proof time is stable at the target and proving consecutive
+ function test_balanced_state_reward_and_fee_if_proof_time_stable_consecutive()
+ external
+ {
+ mine(1);
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+
+ // Check balances
+
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+ console2.log("Alice balance:", Alice_start_balance);
+ console2.log("Bob balance:", Bob_start_balance);
+
+ //parentHash = prove_with_increasing_time(parentHash, 10);
+ for (uint256 blockId = 1; blockId < 10; blockId++) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ uint64 proposedAt = uint64(block.timestamp);
+ printVariables("after propose");
+ mine_proofTime();
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ blockId == 1 ? 0 : 1000000,
+ 1000000,
+ blockHash,
+ signalRoot,
+ false
+ );
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(provenAt, proposedAt)
+ );
+
+ verifyBlock(Carol, 1);
+
+ parentHash = blockHash;
+ }
+
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+
+ assertEq(deposits, withdrawals);
+ }
+
+ /// @dev Test a scenario which very close to a testnet behaviour
+ function test_balanced_state_reward_and_fee_if_proof_time_stable_non_consecutive()
+ external
+ {
+ uint256 Alice_start_balance = L1.getTaikoTokenBalance(Alice);
+ uint256 Bob_start_balance = L1.getTaikoTokenBalance(Bob);
+
+ // Need constants here and in loop counter to avoid stack too deep error
+ TaikoData.BlockMetadata[] memory meta = new TaikoData.BlockMetadata[](
+ 200
+ );
+ uint64[] memory proposedAt = new uint64[](200);
+ bytes32[] memory parentHashes = new bytes32[](200);
+ bytes32[] memory blockHashes = new bytes32[](200);
+ bytes32[] memory signalRoots = new bytes32[](200);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint8 proofTime = 10;
+ console2.logBytes32(parentHash);
+
+ // Run another session with huge times
+ for (uint256 blockId = 1; blockId < 150; blockId++) {
+ {
+ meta[blockId] = proposeBlock(Alice, 1000000, 1024);
+ proposedAt[blockId] = (uint64(block.timestamp));
+ printVariables("after propose");
+
+ blockHashes[blockId] = bytes32(1E10 + blockId); //blockHash;
+ signalRoots[blockId] = bytes32(1E9 + blockId); //signalRoot;
+
+ if (blockId > proofTime) {
+ //Start proving with an offset
+ proveBlock(
+ Bob,
+ meta[blockId - proofTime],
+ parentHashes[blockId - proofTime],
+ (blockId - proofTime == 1) ? 0 : 1000000,
+ 1000000,
+ blockHashes[blockId - proofTime],
+ signalRoots[blockId - proofTime],
+ false
+ );
+
+ uint64 provenAt = uint64(block.timestamp);
+ console2.log(
+ "Proof reward is:",
+ L1.getProofReward(
+ provenAt,
+ proposedAt[blockId - proofTime]
+ )
+ );
+ }
+
+ mine_every_12_sec();
+
+ parentHashes[blockId] = parentHash;
+ parentHash = blockHashes[blockId];
+ verifyBlock(Carol, 1);
+ }
+ }
+ //Check end balances
+
+ uint256 deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ uint256 withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ //Check end balances
+ deposits = Alice_start_balance - L1.getTaikoTokenBalance(Alice);
+ withdrawals = L1.getTaikoTokenBalance(Bob) - Bob_start_balance;
+
+ console2.log("Deposits:", deposits);
+ console2.log("withdrawals:", withdrawals);
+ // Assert their balance changed relatively the same way
+ // 1e18 == within 100 % delta -> 1e17 10%, let's see if this is within that range
+ assertApproxEqRel(deposits, withdrawals, 1e17);
+ }
+
+ function mine_huge() internal {
+ vm.warp(block.timestamp + 1200);
+ vm.roll(block.number + 300);
+ }
+
+ function mine_every_12_sec() internal {
+ vm.warp(block.timestamp + 12);
+ vm.roll(block.number + 1);
+ }
+
+ function mine_proofTime() internal {
+ vm.warp(block.timestamp + 120);
+ vm.roll(block.number + 5);
+ }
+}
diff --git a/packages/protocol/test/TaikoL1TestBase.t.sol b/packages/protocol/test/TaikoL1TestBase.t.sol
new file mode 100644
index 00000000000..54c025de115
--- /dev/null
+++ b/packages/protocol/test/TaikoL1TestBase.t.sol
@@ -0,0 +1,226 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {LibUtils} from "../contracts/L1/libs/LibUtils.sol";
+import {TaikoConfig} from "../contracts/L1/TaikoConfig.sol";
+import {TaikoData} from "../contracts/L1/TaikoData.sol";
+import {TaikoL1} from "../contracts/L1/TaikoL1.sol";
+import {TaikoToken} from "../contracts/L1/TaikoToken.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+
+contract Verifier {
+ fallback(bytes calldata) external returns (bytes memory) {
+ return bytes.concat(keccak256("taiko"));
+ }
+}
+
+abstract contract TaikoL1TestBase is Test {
+ AddressManager public addressManager;
+ TaikoToken public tko;
+ SignalService public ss;
+ TaikoL1 public L1;
+ TaikoData.Config conf;
+ uint256 internal logCount;
+
+ bytes32 public constant GENESIS_BLOCK_HASH =
+ keccak256("GENESIS_BLOCK_HASH");
+ uint64 feeBase = 1E8; // 1 TKO
+ uint64 l2GasExcess = 1E18;
+
+ address public constant L2Treasure =
+ 0x859d74b52762d9ed07D1b2B8d7F93d26B1EA78Bb;
+ address public constant L2SS = 0xa008AE5Ba00656a3Cc384de589579e3E52aC030C;
+ address public constant TaikoL2 =
+ 0x0082D90249342980d011C58105a03b35cCb4A315;
+ address public constant L1EthVault =
+ 0xDAFEA492D9c6733ae3d56b7Ed1ADB60692c98Bc5;
+
+ address public constant Alice = 0xa9bcF99f5eb19277f48b71F9b14f5960AEA58a89;
+ uint256 public constant AlicePK =
+ 0x8fb342c39a93ad26e674cbcdc65dc45795107e1b51776aac15f9776c0e9d2cea;
+
+ address public constant Bob = 0x200708D76eB1B69761c23821809d53F65049939e;
+ address public constant Carol = 0x300C9b60E19634e12FC6D68B7FEa7bFB26c2E419;
+ address public constant Dave = 0x400147C0Eb43D8D71b2B03037bB7B31f8f78EF5F;
+ address public constant Eve = 0x50081b12838240B1bA02b3177153Bca678a86078;
+
+ // Calculation shall be done in derived contracts - based on testnet or mainnet expected proof time
+ uint64 public initProofTimeIssued;
+ uint8 public constant ADJUSTMENT_QUOTIENT = 16;
+
+ function deployTaikoL1() internal virtual returns (TaikoL1 taikoL1);
+
+ function setUp() public virtual {
+ L1 = deployTaikoL1();
+ conf = L1.getConfig();
+
+ addressManager = new AddressManager();
+ addressManager.init();
+
+ ss = new SignalService();
+ ss.init(address(addressManager));
+
+ registerAddress("signal_service", address(ss));
+ registerAddress("ether_vault", address(L1EthVault));
+ registerL2Address("treasure", L2Treasure);
+ registerL2Address("taiko", address(TaikoL2));
+ registerL2Address("signal_service", address(L2SS));
+ registerL2Address("taiko_l2", address(TaikoL2));
+ registerAddress(L1.getVerifierName(100), address(new Verifier()));
+
+ tko = new TaikoToken();
+ registerAddress("taiko_token", address(tko));
+ address[] memory premintRecipients;
+ uint256[] memory premintAmounts;
+ tko.init(
+ address(addressManager),
+ "TaikoToken",
+ "TKO",
+ premintRecipients,
+ premintAmounts
+ );
+
+ // Set protocol broker
+ registerAddress("proto_broker", address(this));
+ tko.mint(address(this), 1E9 * 1E8);
+ registerAddress("proto_broker", address(L1));
+
+ // Lastly, init L1
+ L1.init(
+ address(addressManager),
+ GENESIS_BLOCK_HASH,
+ feeBase,
+ initProofTimeIssued
+ );
+ printVariables("init ");
+ }
+
+ function proposeBlock(
+ address proposer,
+ uint32 gasLimit,
+ uint24 txListSize
+ ) internal returns (TaikoData.BlockMetadata memory meta) {
+ bytes memory txList = new bytes(txListSize);
+ TaikoData.BlockMetadataInput memory input = TaikoData
+ .BlockMetadataInput({
+ beneficiary: proposer,
+ gasLimit: gasLimit,
+ txListHash: keccak256(txList),
+ txListByteStart: 0,
+ txListByteEnd: txListSize,
+ cacheTxListInfo: 0
+ });
+
+ TaikoData.StateVariables memory variables = L1.getStateVariables();
+
+ uint256 _mixHash;
+ unchecked {
+ _mixHash = block.prevrandao * variables.numBlocks;
+ }
+
+ meta.id = variables.numBlocks;
+ meta.timestamp = uint64(block.timestamp);
+ meta.l1Height = uint64(block.number - 1);
+ meta.l1Hash = blockhash(block.number - 1);
+ meta.mixHash = bytes32(_mixHash);
+ meta.txListHash = keccak256(txList);
+ meta.txListByteStart = 0;
+ meta.txListByteEnd = txListSize;
+ meta.gasLimit = gasLimit;
+ meta.beneficiary = proposer;
+ meta.treasure = L2Treasure;
+
+ vm.prank(proposer, proposer);
+ meta = L1.proposeBlock(abi.encode(input), txList);
+ }
+
+ function proveBlock(
+ address prover,
+ TaikoData.BlockMetadata memory meta,
+ bytes32 parentHash,
+ uint32 parentGasUsed,
+ uint32 gasUsed,
+ bytes32 blockHash,
+ bytes32 signalRoot,
+ bool oracle
+ ) internal {
+ TaikoData.BlockEvidence memory evidence = TaikoData.BlockEvidence({
+ metaHash: LibUtils.hashMetadata(meta),
+ parentHash: parentHash,
+ blockHash: blockHash,
+ signalRoot: signalRoot,
+ graffiti: 0x0,
+ prover: oracle ? address(0) : prover,
+ parentGasUsed: parentGasUsed,
+ gasUsed: gasUsed,
+ verifierId: 100,
+ proof: new bytes(100)
+ });
+
+ vm.prank(prover, prover);
+ L1.proveBlock(meta.id, abi.encode(evidence));
+ }
+
+ function verifyBlock(address verifier, uint256 count) internal {
+ vm.prank(verifier, verifier);
+ L1.verifyBlocks(count);
+ }
+
+ function registerAddress(string memory name, address addr) internal {
+ addressManager.setAddress(block.chainid, name, addr);
+ console2.log(block.chainid, name, unicode"→", addr);
+ }
+
+ function registerL2Address(string memory name, address addr) internal {
+ addressManager.setAddress(conf.chainId, name, addr);
+ console2.log(conf.chainId, name, unicode"→", addr);
+ }
+
+ function depositTaikoToken(
+ address who,
+ uint256 amountTko,
+ uint256 amountEth
+ ) internal {
+ vm.deal(who, amountEth);
+ tko.transfer(who, amountTko);
+ vm.prank(who, who);
+ L1.depositTaikoToken(amountTko);
+ }
+
+ function printVariables(string memory comment) internal {
+ TaikoData.StateVariables memory vars = L1.getStateVariables();
+
+ uint256 fee = L1.getBlockFee();
+
+ string memory str = string.concat(
+ Strings.toString(logCount++),
+ ":[",
+ Strings.toString(vars.lastVerifiedBlockId),
+ unicode"→",
+ Strings.toString(vars.numBlocks),
+ "]",
+ " fee:",
+ Strings.toString(fee)
+ );
+
+ str = string.concat(
+ str,
+ " nextEthDepositToProcess:",
+ Strings.toString(vars.nextEthDepositToProcess),
+ " numEthDeposits:",
+ Strings.toString(vars.numEthDeposits),
+ " // ",
+ comment
+ );
+ console2.log(str);
+ }
+
+ function mine(uint256 counts) internal {
+ vm.warp(block.timestamp + 20 * counts);
+ vm.roll(block.number + counts);
+ }
+}
diff --git a/packages/protocol/test/TaikoL1_Oracle.sol b/packages/protocol/test/TaikoL1_Oracle.sol
new file mode 100644
index 00000000000..cabc4b96619
--- /dev/null
+++ b/packages/protocol/test/TaikoL1_Oracle.sol
@@ -0,0 +1,294 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {LibUtils} from "../contracts/L1/libs/LibUtils.sol";
+import {TaikoConfig} from "../contracts/L1/TaikoConfig.sol";
+import {TaikoData} from "../contracts/L1/TaikoData.sol";
+import {TaikoL1} from "../contracts/L1/TaikoL1.sol";
+import {TaikoToken} from "../contracts/L1/TaikoToken.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+import {TaikoL1TestBase} from "./TaikoL1TestBase.t.sol";
+
+contract TaikoL1_Oracle is TaikoL1 {
+ function getConfig()
+ public
+ pure
+ override
+ returns (TaikoData.Config memory config)
+ {
+ config = TaikoConfig.getConfig();
+
+ config.txListCacheExpiry = 5 minutes;
+ config.maxVerificationsPerTx = 0;
+ config.enableSoloProposer = false;
+ config.maxNumProposedBlocks = 10;
+ config.ringBufferSize = 12;
+ config.proofCooldownPeriod = 5 minutes;
+ }
+}
+
+contract Verifier {
+ fallback(bytes calldata) external returns (bytes memory) {
+ return bytes.concat(keccak256("taiko"));
+ }
+}
+
+contract TaikoL1_OracleTest is TaikoL1TestBase {
+ function deployTaikoL1() internal override returns (TaikoL1 taikoL1) {
+ taikoL1 = new TaikoL1_Oracle();
+ }
+
+ function setUp() public override {
+ TaikoL1TestBase.setUp();
+ registerAddress(L1.getVerifierName(100), address(new Verifier()));
+ registerAddress("oracle_prover", Alice);
+ }
+
+ function testOracleProverWithSignature() external {
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ TaikoData.BlockMetadata memory meta = proposeBlock(Bob, 1000000, 1024);
+ proveBlock(
+ Bob,
+ meta,
+ GENESIS_BLOCK_HASH,
+ 10000,
+ 10001,
+ bytes32(uint256(0x11)),
+ bytes32(uint256(0x12)),
+ false
+ );
+
+ TaikoData.BlockEvidence memory evidence = TaikoData.BlockEvidence({
+ metaHash: LibUtils.hashMetadata(meta),
+ parentHash: GENESIS_BLOCK_HASH,
+ blockHash: bytes32(uint256(0x11)),
+ signalRoot: bytes32(uint256(0x12)),
+ graffiti: 0x0,
+ prover: address(0),
+ parentGasUsed: 10000,
+ gasUsed: 40000,
+ verifierId: 0,
+ proof: new bytes(0)
+ });
+
+ (uint8 v, bytes32 r, bytes32 s) = vm.sign(
+ AlicePK,
+ keccak256(abi.encode(evidence))
+ );
+
+ evidence.verifierId = v;
+ evidence.proof = bytes.concat(r, s);
+
+ vm.prank(Carol, Carol);
+ L1.proveBlock(meta.id, abi.encode(evidence));
+
+ TaikoData.ForkChoice memory fc = L1.getForkChoice(
+ 1,
+ GENESIS_BLOCK_HASH,
+ 10000
+ );
+
+ assertEq(fc.blockHash, bytes32(uint256(0x11)));
+ assertEq(fc.signalRoot, bytes32(uint256(0x12)));
+ assertEq(fc.provenAt, block.timestamp);
+ assertEq(fc.prover, address(0));
+ assertEq(fc.gasUsed, 40000);
+ }
+
+ function testOracleProverCanAlwaysOverwrite() external {
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint256 blockId = 1;
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+
+ for (uint i = 0; i < 5; ++i) {
+ uint32 parentGasUsed = uint32(10000 + i);
+
+ // Bob proves the block
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ parentGasUsed,
+ 10001,
+ bytes32(uint256(0x11)),
+ bytes32(uint256(0x12)),
+ false
+ );
+
+ TaikoData.ForkChoice memory fc = L1.getForkChoice(
+ blockId,
+ parentHash,
+ parentGasUsed
+ );
+
+ if (i == 0) {
+ assertFalse(fc.key == 0);
+ } else {
+ assertEq(fc.key, 0);
+ }
+ assertEq(fc.blockHash, bytes32(uint256(0x11)));
+ assertEq(fc.signalRoot, bytes32(uint256(0x12)));
+ assertEq(fc.provenAt, block.timestamp);
+ assertEq(fc.prover, Bob);
+ assertEq(fc.gasUsed, 10001);
+
+ // Carol cannot prove the fork choice again
+ vm.warp(block.timestamp + 10 seconds);
+ vm.expectRevert();
+ proveBlock(
+ Carol,
+ meta,
+ parentHash,
+ parentGasUsed,
+ 10002,
+ bytes32(uint256(0x21)),
+ bytes32(uint256(0x22)),
+ false
+ );
+
+ // Alice, the oracle prover, cannot prove the fork choice again
+ // as a normal prover.
+ vm.warp(block.timestamp + 10 seconds);
+ vm.expectRevert();
+ proveBlock(
+ Alice,
+ meta,
+ parentHash,
+ parentGasUsed,
+ 10003,
+ bytes32(uint256(0x31)),
+ bytes32(uint256(0x32)),
+ false
+ );
+
+ // Alice, the oracle prover, cannot oracle-prove the fork choice
+ vm.warp(block.timestamp + 10 seconds);
+ proveBlock(
+ Alice,
+ meta,
+ parentHash,
+ parentGasUsed,
+ 10003,
+ bytes32(uint256(0x31)),
+ bytes32(uint256(0x32)),
+ true
+ );
+
+ fc = L1.getForkChoice(blockId, parentHash, parentGasUsed);
+
+ if (i == 0) {
+ assertFalse(fc.key == 0);
+ } else {
+ assertEq(fc.key, 0);
+ }
+ assertEq(fc.blockHash, bytes32(uint256(0x31)));
+ assertEq(fc.signalRoot, bytes32(uint256(0x32)));
+ assertEq(fc.provenAt, block.timestamp);
+ assertEq(fc.prover, address(0));
+ assertEq(fc.gasUsed, 10003);
+
+ // Alice, the oracle prover, cannot oracle-prove the fork choice multiple times
+ vm.warp(block.timestamp + 10 seconds);
+
+ proveBlock(
+ Alice,
+ meta,
+ parentHash,
+ parentGasUsed,
+ 10004,
+ bytes32(uint256(0x41)),
+ bytes32(uint256(0x42)),
+ true
+ );
+
+ fc = L1.getForkChoice(blockId, parentHash, parentGasUsed);
+
+ if (i == 0) {
+ assertFalse(fc.key == 0);
+ } else {
+ assertEq(fc.key, 0);
+ }
+ assertEq(fc.blockHash, bytes32(uint256(0x41)));
+ assertEq(fc.signalRoot, bytes32(uint256(0x42)));
+ assertEq(fc.provenAt, block.timestamp);
+ assertEq(fc.prover, address(0));
+ assertEq(fc.gasUsed, 10004);
+ }
+ }
+
+ /// @dev Test we can propose, prove, then verify more blocks than 'maxNumProposedBlocks'
+ function test_cooldown_more_blocks_than_ring_buffer_size() external {
+ depositTaikoToken(Alice, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Bob, 1E6 * 1E8, 100 ether);
+ depositTaikoToken(Carol, 1E6 * 1E8, 100 ether);
+
+ bytes32 parentHash = GENESIS_BLOCK_HASH;
+ uint32 parentGasUsed = 0;
+ uint32 gasUsed = 1000000;
+
+ for (
+ uint256 blockId = 1;
+ blockId < conf.maxNumProposedBlocks * 10;
+ blockId++
+ ) {
+ printVariables("before propose");
+ TaikoData.BlockMetadata memory meta = proposeBlock(
+ Alice,
+ 1000000,
+ 1024
+ );
+ printVariables("after propose");
+ mine(1);
+
+ bytes32 blockHash = bytes32(1E10 + blockId);
+ bytes32 signalRoot = bytes32(1E9 + blockId);
+ proveBlock(
+ Bob,
+ meta,
+ parentHash,
+ parentGasUsed,
+ gasUsed,
+ blockHash,
+ signalRoot,
+ false
+ );
+
+ uint256 lastVerifiedBlockId = L1
+ .getStateVariables()
+ .lastVerifiedBlockId;
+
+ vm.warp(block.timestamp + 4 minutes + 59 seconds);
+ verifyBlock(Carol, 1);
+
+ assertEq(
+ lastVerifiedBlockId,
+ L1.getStateVariables().lastVerifiedBlockId
+ );
+
+ vm.warp(block.timestamp + 1 seconds);
+ verifyBlock(Carol, 1);
+ assertFalse(
+ lastVerifiedBlockId ==
+ L1.getStateVariables().lastVerifiedBlockId
+ );
+
+ parentHash = blockHash;
+ parentGasUsed = gasUsed;
+ }
+ printVariables("");
+ }
+}
diff --git a/packages/protocol/test/TaikoL2.t.sol b/packages/protocol/test/TaikoL2.t.sol
new file mode 100644
index 00000000000..b2c5070896f
--- /dev/null
+++ b/packages/protocol/test/TaikoL2.t.sol
@@ -0,0 +1,203 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {LibL2Consts} from "../contracts/L2/LibL2Consts.sol";
+import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
+import {TaikoL2} from "../contracts/L2/TaikoL2.sol";
+import {
+ SafeCastUpgradeable
+} from "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol";
+
+contract TestTaikoL2 is Test {
+ using SafeCastUpgradeable for uint256;
+ uint64 public constant BLOCK_GAS_LIMIT = 30000000; // same as `block_gas_limit` in foundry.toml
+
+ TaikoL2 public L2;
+ uint private logIndex;
+ uint64 private ANCHOR_GAS_COST = LibL2Consts.ANCHOR_GAS_COST;
+
+ function setUp() public {
+ uint16 rand = 2;
+ TaikoL2.EIP1559Params memory param1559 = TaikoL2.EIP1559Params({
+ basefee: (uint(BLOCK_GAS_LIMIT * 10) * rand).toUint64(),
+ gasIssuedPerSecond: 1000000,
+ gasExcessMax: (uint(15000000) * 256 * rand).toUint64(),
+ gasTarget: (uint(6000000) * rand).toUint64(),
+ ratio2x1x: 11177
+ });
+
+ L2 = new TaikoL2();
+ L2.init(address(1), param1559); // Dummy address manager address.
+
+ vm.roll(block.number + 1);
+ vm.warp(block.timestamp + 30);
+ }
+
+ function testAnchorTxsBlocktimeConstant() external {
+ uint256 firstBasefee;
+ for (uint256 i = 0; i < 100; i++) {
+ uint256 basefee = _getBasefeeAndPrint(0, BLOCK_GAS_LIMIT);
+ vm.fee(basefee);
+
+ if (firstBasefee == 0) {
+ firstBasefee = basefee;
+ } else {
+ assertEq(firstBasefee, basefee);
+ }
+
+ vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
+ _anchor(BLOCK_GAS_LIMIT);
+
+ vm.roll(block.number + 1);
+ vm.warp(block.timestamp + 30);
+ }
+ }
+
+ function testAnchorTxsBlocktimeDecreasing() external {
+ uint256 prevBasefee;
+
+ for (uint256 i = 0; i < 32; i++) {
+ uint256 basefee = _getBasefeeAndPrint(0, BLOCK_GAS_LIMIT);
+ vm.fee(basefee);
+
+ assertGe(basefee, prevBasefee);
+ prevBasefee = basefee;
+
+ vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
+ _anchor(BLOCK_GAS_LIMIT);
+
+ vm.roll(block.number + 1);
+ vm.warp(block.timestamp + 30 - i);
+ }
+ }
+
+ function testAnchorTxsBlocktimeIncreasing() external {
+ uint256 prevBasefee;
+
+ for (uint256 i = 0; i < 30; i++) {
+ uint256 basefee = _getBasefeeAndPrint(0, BLOCK_GAS_LIMIT);
+ vm.fee(basefee);
+
+ if (prevBasefee != 0) {
+ assertLe(basefee, prevBasefee);
+ }
+ prevBasefee = basefee;
+
+ vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
+ _anchor(BLOCK_GAS_LIMIT);
+
+ vm.roll(block.number + 1);
+
+ vm.warp(block.timestamp + 30 + i);
+ }
+ }
+
+ // calling anchor in the same block more than once should fail
+ function testAnchorTxsFailInTheSameBlock() external {
+ uint256 expectedBasefee = _getBasefeeAndPrint(0, BLOCK_GAS_LIMIT);
+ vm.fee(expectedBasefee);
+
+ vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
+ _anchor(BLOCK_GAS_LIMIT);
+
+ vm.prank(L2.GOLDEN_TOUCH_ADDRESS());
+ vm.expectRevert();
+ _anchor(BLOCK_GAS_LIMIT);
+ }
+
+ // calling anchor in the same block more than once should fail
+ function testAnchorTxsFailByNonTaikoL2Signer() external {
+ uint256 expectedBasefee = _getBasefeeAndPrint(0, BLOCK_GAS_LIMIT);
+ vm.fee(expectedBasefee);
+ vm.expectRevert();
+ _anchor(BLOCK_GAS_LIMIT);
+ }
+
+ function testAnchorSigning(bytes32 digest) external {
+ (uint8 v, uint256 r, uint256 s) = L2.signAnchor(digest, uint8(1));
+ address signer = ecrecover(digest, v + 27, bytes32(r), bytes32(s));
+ assertEq(signer, L2.GOLDEN_TOUCH_ADDRESS());
+
+ (v, r, s) = L2.signAnchor(digest, uint8(2));
+ signer = ecrecover(digest, v + 27, bytes32(r), bytes32(s));
+ assertEq(signer, L2.GOLDEN_TOUCH_ADDRESS());
+
+ vm.expectRevert();
+ L2.signAnchor(digest, uint8(0));
+
+ vm.expectRevert();
+ L2.signAnchor(digest, uint8(3));
+ }
+
+ function testGetBasefee() external {
+ uint32 timeSinceParent = uint32(block.timestamp - L2.parentTimestamp());
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 0, 0), 317609019);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 1, 0), 317609019);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 1000000, 0), 320423332);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 5000000, 0), 332018053);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 10000000, 0), 347305199);
+
+ timeSinceParent = uint32(100 + block.timestamp - L2.parentTimestamp());
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 0, 0), 54544902);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 1, 0), 54544902);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 1000000, 0), 55028221);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 5000000, 0), 57019452);
+ assertEq(_getBasefeeAndPrint(timeSinceParent, 10000000, 0), 59644805);
+ }
+
+ function _getBasefeeAndPrint(
+ uint32 timeSinceParent,
+ uint64 gasLimit,
+ uint64 parentGasUsed
+ ) private returns (uint256 _basefee) {
+ uint256 gasIssued = L2.gasIssuedPerSecond() * timeSinceParent;
+ string memory _msg = string.concat(
+ "#",
+ Strings.toString(logIndex++),
+ ": gasExcess=",
+ Strings.toString(L2.gasExcess()),
+ ", timeSinceParent=",
+ Strings.toString(timeSinceParent),
+ ", gasIssued=",
+ Strings.toString(gasIssued),
+ ", gasLimit=",
+ Strings.toString(gasLimit),
+ ", parentGasUsed=",
+ Strings.toString(parentGasUsed)
+ );
+ _basefee = L2.getBasefee(timeSinceParent, gasLimit, parentGasUsed);
+
+ _msg = string.concat(
+ _msg,
+ ", gasExcess(changed)=",
+ Strings.toString(L2.gasExcess()),
+ ", basefee=",
+ Strings.toString(_basefee)
+ );
+
+ console2.log(_msg);
+ }
+
+ function _getBasefeeAndPrint(
+ uint32 timeSinceNow,
+ uint64 gasLimit
+ ) private returns (uint256 _basefee) {
+ return
+ _getBasefeeAndPrint(
+ uint32(timeSinceNow + block.timestamp - L2.parentTimestamp()),
+ gasLimit,
+ gasLimit + ANCHOR_GAS_COST
+ );
+ }
+
+ function _anchor(uint64 parentGasLimit) private {
+ L2.anchor(
+ keccak256("a"),
+ keccak256("b"),
+ 12345,
+ parentGasLimit + ANCHOR_GAS_COST
+ );
+ }
+}
diff --git a/packages/protocol/test/TokenVault.t.sol b/packages/protocol/test/TokenVault.t.sol
new file mode 100644
index 00000000000..db0c10575ad
--- /dev/null
+++ b/packages/protocol/test/TokenVault.t.sol
@@ -0,0 +1,354 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import {AddressManager} from "../contracts/common/AddressManager.sol";
+import {AddressResolver} from "../contracts/common/AddressResolver.sol";
+import {Bridge} from "../contracts/bridge/Bridge.sol";
+import {BridgedERC20} from "../contracts/bridge/BridgedERC20.sol";
+import {BridgeErrors} from "../contracts/bridge/BridgeErrors.sol";
+import {FreeMintERC20} from "../contracts/test/erc20/FreeMintERC20.sol";
+import {SignalService} from "../contracts/signal/SignalService.sol";
+import {Test} from "forge-std/Test.sol";
+import {TokenVault} from "../contracts/bridge/TokenVault.sol";
+
+// PrankDestBridge lets us simulate a transaction to the TokenVault
+// from a named Bridge, without having to test/run through the real Bridge code,
+// outside the scope of the unit tests in the TokenVault.
+contract PrankDestBridge {
+ TokenVault destTokenVault;
+ Context ctx;
+
+ struct Context {
+ bytes32 msgHash; // messageHash
+ address sender;
+ uint256 srcChainId;
+ }
+
+ constructor(TokenVault _tokenVault) {
+ destTokenVault = _tokenVault;
+ }
+
+ function setTokenVault(address addr) public {
+ destTokenVault = TokenVault(addr);
+ }
+
+ function context() public view returns (Context memory) {
+ return ctx;
+ }
+
+ function sendReceiveERC20ToTokenVault(
+ TokenVault.CanonicalERC20 calldata canonicalToken,
+ address from,
+ address to,
+ uint256 amount,
+ bytes32 msgHash,
+ address srcChainTokenVault,
+ uint256 srcChainId
+ ) public {
+ ctx.sender = srcChainTokenVault;
+ ctx.msgHash = msgHash;
+ ctx.srcChainId = srcChainId;
+
+ destTokenVault.receiveERC20(canonicalToken, from, to, amount);
+
+ ctx.sender = address(0);
+ ctx.msgHash = bytes32(0);
+ ctx.srcChainId = 0;
+ }
+}
+
+contract TestTokenVault is Test {
+ AddressManager addressManager;
+ Bridge bridge;
+ TokenVault tokenVault;
+ TokenVault destChainIdTokenVault;
+ PrankDestBridge destChainIdBridge;
+ FreeMintERC20 erc20;
+ SignalService signalService;
+ uint256 destChainId = 7;
+
+ address public constant Alice = 0x10020FCb72e27650651B05eD2CEcA493bC807Ba4;
+ address public constant Bob = 0x200708D76eB1B69761c23821809d53F65049939e;
+
+ function setUp() public {
+ vm.startPrank(Alice);
+ vm.deal(Alice, 1 ether);
+ vm.deal(Bob, 1 ether);
+
+ addressManager = new AddressManager();
+ addressManager.init();
+
+ tokenVault = new TokenVault();
+ tokenVault.init(address(addressManager));
+ destChainIdTokenVault = new TokenVault();
+ destChainIdTokenVault.init(address(addressManager));
+
+ erc20 = new FreeMintERC20("ERC20", "ERC20");
+ erc20.mint(Alice);
+
+ bridge = new Bridge();
+ bridge.init(address(addressManager));
+
+ destChainIdBridge = new PrankDestBridge(tokenVault);
+
+ signalService = new SignalService();
+ signalService.init(address(addressManager));
+
+ addressManager.setAddress(block.chainid, "bridge", address(bridge));
+
+ addressManager.setAddress(
+ block.chainid,
+ "signal_service",
+ address(signalService)
+ );
+
+ addressManager.setAddress(
+ block.chainid,
+ "token_vault",
+ address(tokenVault)
+ );
+
+ addressManager.setAddress(
+ destChainId,
+ "token_vault",
+ address(destChainIdTokenVault)
+ );
+
+ addressManager.setAddress(
+ destChainId,
+ "bridge",
+ address(destChainIdBridge)
+ );
+
+ vm.stopPrank();
+ }
+
+ function test_send_erc20_revert_if_allowance_not_set() public {
+ vm.startPrank(Alice);
+
+ vm.expectRevert("ERC20: insufficient allowance");
+ tokenVault.sendERC20(
+ destChainId,
+ Bob,
+ address(erc20),
+ 1 wei,
+ 1000000,
+ 1,
+ Bob,
+ ""
+ );
+ }
+
+ function test_send_erc20_no_processing_fee() public {
+ vm.startPrank(Alice);
+
+ uint256 amount = 2 wei;
+ erc20.approve(address(tokenVault), amount);
+
+ uint256 aliceBalanceBefore = erc20.balanceOf(Alice);
+ uint256 tokenVaultBalanceBefore = erc20.balanceOf(address(tokenVault));
+
+ tokenVault.sendERC20(
+ destChainId,
+ Bob,
+ address(erc20),
+ amount,
+ 1000000,
+ 0,
+ Bob,
+ ""
+ );
+
+ uint256 aliceBalanceAfter = erc20.balanceOf(Alice);
+ uint256 tokenVaultBalanceAfter = erc20.balanceOf(address(tokenVault));
+
+ assertEq(aliceBalanceBefore - aliceBalanceAfter, amount);
+ assertEq(tokenVaultBalanceAfter - tokenVaultBalanceBefore, amount);
+ }
+
+ function test_send_erc20_processing_fee_reverts_if_msg_value_too_low()
+ public
+ {
+ vm.startPrank(Alice);
+
+ uint256 amount = 2 wei;
+ erc20.approve(address(tokenVault), amount);
+
+ vm.expectRevert();
+ tokenVault.sendERC20(
+ destChainId,
+ Bob,
+ address(erc20),
+ amount,
+ 1000000,
+ amount - 1,
+ Bob,
+ ""
+ );
+ }
+
+ function test_send_erc20_processing_fee() public {
+ vm.startPrank(Alice);
+
+ uint256 amount = 2 wei;
+ erc20.approve(address(tokenVault), amount);
+
+ uint256 aliceBalanceBefore = erc20.balanceOf(Alice);
+ uint256 tokenVaultBalanceBefore = erc20.balanceOf(address(tokenVault));
+
+ tokenVault.sendERC20{value: amount}(
+ destChainId,
+ Bob,
+ address(erc20),
+ amount,
+ 1000000,
+ amount - 1,
+ Bob,
+ ""
+ );
+
+ uint256 aliceBalanceAfter = erc20.balanceOf(Alice);
+ uint256 tokenVaultBalanceAfter = erc20.balanceOf(address(tokenVault));
+
+ assertEq(aliceBalanceBefore - aliceBalanceAfter, amount);
+ assertEq(tokenVaultBalanceAfter - tokenVaultBalanceBefore, amount);
+ }
+
+ function test_send_erc20_reverts_invalid_amount() public {
+ vm.startPrank(Alice);
+
+ uint256 amount = 0;
+
+ vm.expectRevert(TokenVault.TOKENVAULT_INVALID_AMOUNT.selector);
+ tokenVault.sendERC20(
+ destChainId,
+ Bob,
+ address(erc20),
+ amount,
+ 1000000,
+ 0,
+ Bob,
+ ""
+ );
+ }
+
+ function test_send_erc20_reverts_invalid_token_address() public {
+ vm.startPrank(Alice);
+
+ uint256 amount = 1;
+
+ vm.expectRevert(TokenVault.TOKENVAULT_INVALID_TOKEN.selector);
+ tokenVault.sendERC20(
+ destChainId,
+ Bob,
+ address(0),
+ amount,
+ 1000000,
+ 0,
+ Bob,
+ ""
+ );
+ }
+
+ function test_send_erc20_reverts_invalid_to() public {
+ vm.startPrank(Alice);
+
+ uint256 amount = 1;
+
+ vm.expectRevert(TokenVault.TOKENVAULT_INVALID_TO.selector);
+ tokenVault.sendERC20(
+ destChainId,
+ address(0),
+ address(erc20),
+ amount,
+ 1000000,
+ 0,
+ Bob,
+ ""
+ );
+ }
+
+ function test_receive_erc20_canonical_to_dest_chain_transfers_from_canonical_token()
+ public
+ {
+ vm.startPrank(Alice);
+
+ uint256 srcChainId = block.chainid;
+ vm.chainId(destChainId);
+
+ erc20.mint(address(tokenVault));
+
+ uint256 amount = 1;
+ address to = Bob;
+
+ uint256 tokenVaultBalanceBefore = erc20.balanceOf(address(tokenVault));
+ uint256 toBalanceBefore = erc20.balanceOf(to);
+
+ destChainIdBridge.sendReceiveERC20ToTokenVault(
+ erc20ToCanonicalERC20(destChainId),
+ Alice,
+ to,
+ amount,
+ bytes32(0),
+ address(tokenVault),
+ srcChainId
+ );
+
+ uint256 tokenVaultBalanceAfter = erc20.balanceOf(address(tokenVault));
+ assertEq(tokenVaultBalanceBefore - tokenVaultBalanceAfter, amount);
+
+ uint256 toBalanceAfter = erc20.balanceOf(to);
+ assertEq(toBalanceAfter - toBalanceBefore, amount);
+ }
+
+ function test_receive_erc20_non_canonical_to_dest_chain_deploys_new_bridged_token_and_mints()
+ public
+ {
+ vm.startPrank(Alice);
+
+ uint256 srcChainId = block.chainid;
+ vm.chainId(destChainId);
+
+ uint256 amount = 1;
+
+ destChainIdBridge.setTokenVault(address(destChainIdTokenVault));
+
+ address bridgedAddressBefore = destChainIdTokenVault.canonicalToBridged(
+ srcChainId,
+ address(erc20)
+ );
+ assertEq(bridgedAddressBefore == address(0), true);
+
+ destChainIdBridge.sendReceiveERC20ToTokenVault(
+ erc20ToCanonicalERC20(srcChainId),
+ Alice,
+ Bob,
+ amount,
+ bytes32(0),
+ address(tokenVault),
+ srcChainId
+ );
+
+ address bridgedAddressAfter = destChainIdTokenVault.canonicalToBridged(
+ srcChainId,
+ address(erc20)
+ );
+ assertEq(bridgedAddressAfter != address(0), true);
+ BridgedERC20 bridgedERC20 = BridgedERC20(bridgedAddressAfter);
+
+ assertEq(bridgedERC20.balanceOf(Bob), amount);
+ }
+
+ function erc20ToCanonicalERC20(
+ uint256 chainId
+ ) internal view returns (TokenVault.CanonicalERC20 memory) {
+ return
+ TokenVault.CanonicalERC20({
+ chainId: chainId,
+ addr: address(erc20),
+ decimals: erc20.decimals(),
+ symbol: erc20.symbol(),
+ name: erc20.name()
+ });
+ }
+}
diff --git a/packages/protocol/test/bridge/Bridge.integration.test.ts b/packages/protocol/test/bridge/Bridge.integration.test.ts
deleted file mode 100644
index 86d1a880aea..00000000000
--- a/packages/protocol/test/bridge/Bridge.integration.test.ts
+++ /dev/null
@@ -1,651 +0,0 @@
-import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
-import { expect } from "chai";
-import { ethers as ethersLib } from "ethers";
-import hre, { ethers } from "hardhat";
-import {
- AddressManager,
- Bridge,
- SignalService,
- TestBadReceiver,
- TestHeaderSync,
-} from "../../typechain";
-import deployAddressManager from "../utils/addressManager";
-import {
- deployBridge,
- processMessage,
- sendAndProcessMessage,
- sendMessage,
-} from "../utils/bridge";
-import { txShouldRevertWithCustomError } from "../utils/errors";
-// import { randomBytes32 } from "../utils/bytes";
-import { Message } from "../utils/message";
-import {
- getDefaultL2Signer,
- getL1Provider,
- getL2Provider,
-} from "../utils/provider";
-import { Block, getBlockHeader } from "../utils/rpc";
-import { deploySignalService, getSignalProof } from "../utils/signal";
-
-describe("integrationbridge:Bridge", function () {
- let owner: SignerWithAddress;
- let l1Provider: ethersLib.providers.JsonRpcProvider;
- let l2Provider: ethersLib.providers.JsonRpcProvider;
- let l2Signer: ethersLib.Signer;
- let srcChainId: number;
- let enabledDestChainId: number;
- let l2NonOwner: ethersLib.Signer;
- let l1SignalService: SignalService;
- let l2SignalService: SignalService;
- let l1Bridge: Bridge;
- let l2Bridge: Bridge;
- let m: Message;
- let l1HeaderSync: TestHeaderSync;
- let l2HeaderSync: TestHeaderSync;
-
- beforeEach(async () => {
- [owner] = await ethers.getSigners();
-
- const { chainId } = await ethers.provider.getNetwork();
-
- srcChainId = chainId;
-
- l1Provider = getL1Provider();
-
- // seondary node to deploy L2 on
- l2Provider = getL2Provider();
-
- l2Signer = await getDefaultL2Signer();
-
- l2NonOwner = await l2Provider.getSigner(
- await ethers.Wallet.createRandom().getAddress()
- );
-
- const l2Network = await l2Provider.getNetwork();
-
- enabledDestChainId = l2Network.chainId;
-
- const addressManager: AddressManager = await deployAddressManager(
- owner
- );
-
- const l2AddressManager: AddressManager = await deployAddressManager(
- l2Signer
- );
-
- ({ signalService: l1SignalService } = await deploySignalService(
- owner,
- addressManager,
- srcChainId
- ));
-
- ({ signalService: l2SignalService } = await deploySignalService(
- l2Signer,
- l2AddressManager,
- enabledDestChainId
- ));
-
- await addressManager.setAddress(
- `${enabledDestChainId}.signal_service`,
- l2SignalService.address
- );
-
- await l2AddressManager.setAddress(
- `${srcChainId}.signal_service`,
- l1SignalService.address
- );
-
- ({ bridge: l1Bridge } = await deployBridge(
- owner,
- addressManager,
- srcChainId
- ));
-
- ({ bridge: l2Bridge } = await deployBridge(
- l2Signer,
- l2AddressManager,
- enabledDestChainId
- ));
-
- await addressManager.setAddress(
- `${enabledDestChainId}.bridge`,
- l2Bridge.address
- );
-
- await l2AddressManager
- .connect(l2Signer)
- .setAddress(`${srcChainId}.bridge`, l1Bridge.address);
-
- l1HeaderSync = await (await ethers.getContractFactory("TestHeaderSync"))
- .connect(owner)
- .deploy();
-
- await addressManager
- .connect(owner)
- .setAddress(`${srcChainId}.taiko`, l1HeaderSync.address);
-
- l2HeaderSync = await (await ethers.getContractFactory("TestHeaderSync"))
- .connect(l2Signer)
- .deploy();
-
- await l2AddressManager
- .connect(l2Signer)
- .setAddress(`${enabledDestChainId}.taiko`, l2HeaderSync.address);
-
- m = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: enabledDestChainId,
- owner: owner.address,
- to: owner.address,
- refundAddress: owner.address,
- depositValue: 1000,
- callValue: 1000,
- processingFee: 1000,
- gasLimit: 10000,
- data: "0x",
- memo: "",
- };
- });
-
- describe("processMessage()", function () {
- it("should throw if message.gasLimit == 0 & msg.sender is not message.owner", async function () {
- const m: Message = {
- id: 1,
- sender: await l2NonOwner.getAddress(),
- srcChainId: srcChainId,
- destChainId: enabledDestChainId,
- owner: await l2NonOwner.getAddress(),
- to: await l2Signer.getAddress(),
- refundAddress: await l2NonOwner.getAddress(),
- depositValue: 1000,
- callValue: 1000,
- processingFee: 1000,
- gasLimit: 0,
- data: "0x",
- memo: "",
- };
-
- const { msgHash } = await sendMessage(l1Bridge, m);
-
- expect(msgHash).not.to.be.eq(ethers.constants.HashZero);
-
- txShouldRevertWithCustomError(
- (
- await l2Bridge
- .connect(l2Signer)
- .processMessage(m, ethers.constants.HashZero, {
- gasLimit: 1000000,
- })
- ).wait(1),
- l2Provider,
- "B_FORBIDDEN()"
- );
- });
-
- it("should throw if message.destChainId is not equal to current block.chainId", async function () {
- const m: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: enabledDestChainId + 1,
- owner: owner.address,
- to: owner.address,
- refundAddress: owner.address,
- depositValue: 1000,
- callValue: 1000,
- processingFee: 1000,
- gasLimit: 10000,
- data: "0x",
- memo: "",
- };
-
- txShouldRevertWithCustomError(
- (
- await l2Bridge
- .connect(l2Signer)
- .processMessage(m, ethers.constants.HashZero, {
- gasLimit: 1000000,
- })
- ).wait(1),
- l2Provider,
- "B_WRONG_CHAIN_ID()"
- );
- });
-
- it("should throw if messageStatus of message is != NEW", async function () {
- const { message, signalProof } = await sendAndProcessMessage(
- hre.ethers.provider,
- l2HeaderSync,
- m,
- l1SignalService,
- l1Bridge,
- l2Bridge
- );
-
- // recalling this process should be prevented as it's status is no longer NEW
- txShouldRevertWithCustomError(
- (
- await l2Bridge
- .connect(l2Signer)
- .processMessage(message, signalProof, {
- gasLimit: 1000000,
- })
- ).wait(1),
- l2Provider,
- "B_STATUS_MISMATCH()"
- );
- });
-
- it("should throw if message signalproof is not valid", async function () {
- const msgHash = await l1Bridge.hashMessage(m);
- const { block, blockHeader } = await getBlockHeader(
- hre.ethers.provider
- );
-
- await l2HeaderSync.setSyncedHeader(ethers.constants.HashZero);
-
- const signalProof = await getSignalProof(
- hre.ethers.provider,
- l1SignalService.address,
- await l1SignalService.getSignalSlot(l1Bridge.address, msgHash),
- block.number,
- blockHeader
- );
-
- txShouldRevertWithCustomError(
- (
- await l2Bridge
- .connect(l2Signer)
- .processMessage(m, signalProof, {
- gasLimit: 1000000,
- })
- ).wait(1),
- l2Provider,
- "B_SIGNAL_NOT_RECEIVED()"
- );
- });
-
- it("should throw if message has not been received", async function () {
- const { msgHash, message } = await sendMessage(l1Bridge, m);
-
- expect(msgHash).not.to.be.eq(ethers.constants.HashZero);
-
- const messageStatus = await l1Bridge.getMessageStatus(msgHash);
-
- expect(messageStatus).to.be.eq(0);
-
- const sender = l1Bridge.address;
-
- const { block, blockHeader } = await getBlockHeader(
- hre.ethers.provider
- );
-
- await l2HeaderSync.setSyncedHeader(ethers.constants.HashZero);
-
- const slot = await l1SignalService.getSignalSlot(sender, msgHash);
-
- // get storageValue for the key
- const storageValue = await ethers.provider.getStorageAt(
- l1SignalService.address,
- slot,
- block.number
- );
- // make sure it equals 1 so our proof will pass
- expect(storageValue).to.be.eq(
- "0x0000000000000000000000000000000000000000000000000000000000000001"
- );
-
- const signalProof = await getSignalProof(
- hre.ethers.provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- txShouldRevertWithCustomError(
- (
- await l2Bridge
- .connect(l2Signer)
- .processMessage(message, signalProof, {
- gasLimit: 1000000,
- })
- ).wait(1),
- l2Provider,
- "B_SIGNAL_NOT_RECEIVED()"
- );
- });
-
- it("processes a message when the signal has been verified from the sending chain", async () => {
- const { msgHash, message } = await sendMessage(l1Bridge, m);
-
- expect(msgHash).not.to.be.eq(ethers.constants.HashZero);
-
- const messageStatus = await l1Bridge.getMessageStatus(msgHash);
-
- expect(messageStatus).to.be.eq(0);
- let block: Block;
- expect(
- ({ block } = await processMessage(
- l1SignalService,
- l1Bridge,
- l2Bridge,
- msgHash,
- hre.ethers.provider,
- l2HeaderSync,
- message
- ))
- ).to.emit(l2Bridge, "MessageStatusChanged");
-
- // get storageValue for the key
- const storageValue = await ethers.provider.getStorageAt(
- l1SignalService.address,
- await l1SignalService.getSignalSlot(l1Bridge.address, msgHash),
- block.number
- );
- // make sure it equals 1 so our proof will pass
- expect(storageValue).to.be.eq(
- "0x0000000000000000000000000000000000000000000000000000000000000001"
- );
-
- txShouldRevertWithCustomError(
- (
- await l2Bridge
- .connect(l2Signer)
- .processMessage(m, ethers.constants.HashZero, {
- gasLimit: 1000000,
- })
- ).wait(1),
- l2Provider,
- "B_WRONG_CHAIN_ID()"
- );
- });
- });
-
- describe("isMessageSent()", function () {
- it("should return false, since no message was sent", async function () {
- const msgHash = await l1Bridge.hashMessage(m);
-
- expect(await l1Bridge.isMessageSent(msgHash)).to.be.false;
- });
-
- it("should return true if message was sent properly", async function () {
- const { msgHash } = await sendMessage(l1Bridge, m);
-
- expect(msgHash).not.to.be.eq(ethers.constants.HashZero);
-
- expect(await l1Bridge.isMessageSent(msgHash)).to.be.true;
- });
- });
-
- describe("isMessageReceived()", function () {
- it("should throw if signal is not a bridge message; proof is invalid since sender != bridge.", async function () {
- const msgHash = ethers.utils.hexlify(ethers.utils.randomBytes(32));
-
- const tx = await l1SignalService.connect(owner).sendSignal(msgHash);
-
- await tx.wait();
-
- const sender = owner.address;
-
- const slot = await l1SignalService.getSignalSlot(sender, msgHash);
-
- const { block, blockHeader } = await getBlockHeader(
- hre.ethers.provider
- );
-
- await l2HeaderSync.setSyncedHeader(block.hash);
-
- // get storageValue for the key
- const storageValue = await ethers.provider.getStorageAt(
- l1SignalService.address,
- slot,
- block.number
- );
- // make sure it equals 1 so we know sendSignal worked
- expect(storageValue).to.be.eq(
- "0x0000000000000000000000000000000000000000000000000000000000000001"
- );
-
- const signalProof = await getSignalProof(
- hre.ethers.provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- await expect(
- l2Bridge.isMessageReceived(msgHash, srcChainId, signalProof)
- ).to.be.reverted;
- });
-
- it("if message is valid and sent by the bridge it should return true", async function () {
- const { msgHash } = await sendMessage(l1Bridge, m);
- const slot = await l1SignalService.getSignalSlot(
- l1Bridge.address,
- msgHash
- );
-
- const { block, blockHeader } = await getBlockHeader(
- hre.ethers.provider
- );
-
- await l2HeaderSync.setSyncedHeader(block.hash);
-
- // get storageValue for the key
- const storageValue = await ethers.provider.getStorageAt(
- l1SignalService.address,
- slot,
- block.number
- );
- // make sure it equals 1 so we know sendMessage worked
- expect(storageValue).to.be.eq(
- "0x0000000000000000000000000000000000000000000000000000000000000001"
- );
-
- const signalProof = await getSignalProof(
- hre.ethers.provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- expect(
- await l2Bridge.isMessageReceived(
- msgHash,
- srcChainId,
- signalProof
- )
- ).to.be.true;
- });
- });
-
- describe("isMessageFailed()", function () {
- it("should revert if destChainId == block.chainid", async function () {
- const testBadReceiver: TestBadReceiver = await (
- await ethers.getContractFactory("TestBadReceiver")
- )
- .connect(owner)
- .deploy();
- await testBadReceiver.deployed();
-
- const m: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: enabledDestChainId,
- destChainId: srcChainId,
- owner: owner.address,
- to: testBadReceiver.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 10,
- processingFee: 1,
- gasLimit: 300000,
- data: ethers.utils.hexlify(ethers.utils.randomBytes(32)),
- memo: "",
- };
- const { msgHash } = await sendMessage(l2Bridge, m);
-
- await expect(
- l2Bridge.isMessageFailed(
- msgHash,
- enabledDestChainId,
- ethers.constants.HashZero
- )
- ).to.be.revertedWith("B_WRONG_CHAIN_ID()");
- });
-
- it("should revert if msgHash == 0", async function () {
- await expect(
- l2Bridge.isMessageFailed(
- ethers.constants.HashZero,
- srcChainId,
- ethers.constants.HashZero
- )
- ).to.be.revertedWith("B_MSG_HASH_NULL()");
- });
-
- it("should return false if headerHash hasn't been synced", async function () {
- const testBadReceiver: TestBadReceiver = await (
- await ethers.getContractFactory("TestBadReceiver")
- )
- .connect(owner)
- .deploy();
- await testBadReceiver.deployed();
-
- const m: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: enabledDestChainId,
- destChainId: srcChainId,
- owner: owner.address,
- to: testBadReceiver.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 10,
- processingFee: 1,
- gasLimit: 300000,
- data: ethers.utils.hexlify(ethers.utils.randomBytes(32)),
- memo: "",
- };
-
- const { msgHash, message } = await sendMessage(l2Bridge, m);
-
- const messageStatus = await l1Bridge.getMessageStatus(msgHash);
- expect(messageStatus).to.be.eq(0);
-
- const { messageStatusChangedEvent } = await processMessage(
- l2SignalService,
- l2Bridge,
- l1Bridge,
- msgHash,
- l2Provider,
- l1HeaderSync,
- message
- );
- expect(messageStatusChangedEvent.args.msgHash).to.be.eq(msgHash);
- expect(messageStatusChangedEvent.args.status).to.be.eq(1);
-
- const tx = await l1Bridge
- .connect(owner)
- .retryMessage(message, true);
- const receipt = await tx.wait();
- expect(receipt.status).to.be.eq(1);
-
- const messageStatus2 = await l1Bridge.getMessageStatus(msgHash);
- expect(messageStatus2).to.be.eq(3);
- // message status is FAILED on l1Bridge now.
-
- const { block, blockHeader } = await getBlockHeader(l1Provider);
-
- const slot = await l1Bridge.getMessageStatusSlot(msgHash);
-
- const signalProof = await getSignalProof(
- l1Provider,
- l1Bridge.address,
- slot,
- block.number,
- blockHeader
- );
-
- expect(
- await l2Bridge.isMessageFailed(msgHash, srcChainId, signalProof)
- ).to.be.false;
- });
-
- it("should return true if message has been sent, processed, retried and failed", async function () {
- // L2 -> L1 message
- const testBadReceiver: TestBadReceiver = await (
- await ethers.getContractFactory("TestBadReceiver")
- )
- .connect(owner)
- .deploy();
- await testBadReceiver.deployed();
-
- const m: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: enabledDestChainId,
- destChainId: srcChainId,
- owner: owner.address,
- to: testBadReceiver.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 10,
- processingFee: 1,
- gasLimit: 300000,
- data: ethers.utils.hexlify(ethers.utils.randomBytes(32)),
- memo: "",
- };
-
- const { msgHash, message } = await sendMessage(l2Bridge, m);
-
- const messageStatus = await l1Bridge.getMessageStatus(msgHash);
- expect(messageStatus).to.be.eq(0);
-
- const { messageStatusChangedEvent } = await processMessage(
- l2SignalService,
- l2Bridge,
- l1Bridge,
- msgHash,
- l2Provider,
- l1HeaderSync,
- message
- );
- expect(messageStatusChangedEvent.args.msgHash).to.be.eq(msgHash);
- expect(messageStatusChangedEvent.args.status).to.be.eq(1);
-
- const tx = await l1Bridge
- .connect(owner)
- .retryMessage(message, true);
- const receipt = await tx.wait();
- expect(receipt.status).to.be.eq(1);
-
- const messageStatus2 = await l1Bridge.getMessageStatus(msgHash);
- expect(messageStatus2).to.be.eq(3);
- // message status is FAILED on l1Bridge now.
-
- const { block, blockHeader } = await getBlockHeader(l1Provider);
-
- await l2HeaderSync.setSyncedHeader(block.hash);
-
- const slot = await l1Bridge.getMessageStatusSlot(msgHash);
-
- const signalProof = await getSignalProof(
- l1Provider,
- l1Bridge.address,
- slot,
- block.number,
- blockHeader
- );
-
- expect(
- await l2Bridge.isMessageFailed(msgHash, srcChainId, signalProof)
- ).to.be.true;
- });
- });
-});
diff --git a/packages/protocol/test/bridge/Bridge.test.ts b/packages/protocol/test/bridge/Bridge.test.ts
deleted file mode 100644
index a3f6287553f..00000000000
--- a/packages/protocol/test/bridge/Bridge.test.ts
+++ /dev/null
@@ -1,303 +0,0 @@
-import { expect } from "chai";
-import { BigNumber } from "ethers";
-import { ethers } from "hardhat";
-import { AddressManager, Bridge, EtherVault } from "../../typechain";
-import { deployBridge, sendMessage } from "../utils/bridge";
-import { deploySignalService } from "../utils/signal";
-import { Message } from "../utils/message";
-
-describe("Bridge", function () {
- let owner: any;
- let nonOwner: any;
- let srcChainId: number;
- let enabledDestChainId: number;
- let l1Bridge: Bridge;
- let l1EtherVault: EtherVault;
-
- beforeEach(async () => {
- [owner, nonOwner] = await ethers.getSigners();
-
- const { chainId } = await ethers.provider.getNetwork();
-
- srcChainId = chainId;
-
- enabledDestChainId = srcChainId + 1;
-
- const addressManager: AddressManager = await (
- await ethers.getContractFactory("AddressManager")
- ).deploy();
- await addressManager.init();
-
- await deploySignalService(owner, addressManager, srcChainId);
-
- ({ bridge: l1Bridge, etherVault: l1EtherVault } = await deployBridge(
- owner,
- addressManager,
- srcChainId
- ));
-
- await addressManager.setAddress(
- `${enabledDestChainId}.bridge`,
- "0x0000000000000000000000000000000000000001" // dummy address so chain is "enabled"
- );
- });
-
- describe("sendMessage()", function () {
- it("throws when owner is the zero address", async () => {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: ethers.constants.AddressZero,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(l1Bridge.sendMessage(message)).to.be.revertedWith(
- "B_OWNER_IS_NULL()"
- );
- });
-
- it("throws when dest chain id is same as block.chainid", async () => {
- const network = await ethers.provider.getNetwork();
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: network.chainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(l1Bridge.sendMessage(message)).to.be.revertedWith(
- "B_WRONG_CHAIN_ID()"
- );
- });
-
- it("throws when dest chain id is not enabled", async () => {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(l1Bridge.sendMessage(message)).to.be.revertedWith(
- "B_WRONG_CHAIN_ID()"
- );
- });
-
- it("throws when msg.value is not the same as expected amount", async () => {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: enabledDestChainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(l1Bridge.sendMessage(message)).to.be.revertedWith(
- "B_INCORRECT_VALUE()"
- );
- });
-
- it("emits event and is successful when message is valid, ether_vault receives the expectedAmount", async () => {
- const etherVaultOriginalBalance = await ethers.provider.getBalance(
- l1EtherVault.address
- );
-
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: enabledDestChainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const expectedAmount =
- message.depositValue +
- message.callValue +
- message.processingFee;
-
- await sendMessage(l1Bridge, message);
-
- const etherVaultUpdatedBalance = await ethers.provider.getBalance(
- l1EtherVault.address
- );
-
- expect(etherVaultUpdatedBalance).to.be.eq(
- etherVaultOriginalBalance.add(expectedAmount)
- );
- });
- });
-
- // TODO(roger): move tests to SignalService's test file.
- // describe("sendSignal()", async function () {
- // it("throws when signal is empty", async function () {
- // await expect(
- // l1Bridge.connect(owner).sendSignal(ethers.constants.HashZero)
- // ).to.be.revertedWith("B:signal");
- // });
-
- // it("sends signal, confirms it was sent", async function () {
- // const hash =
- // "0xf2e08f6b93d8cf4f37a3b38f91a8c37198095dde8697463ca3789e25218a8e9d";
- // await expect(l1Bridge.connect(owner).sendSignal(hash))
- // .to.emit(l1Bridge, "SignalSent")
- // .withArgs(owner.address, hash);
-
- // const isSignalSent = await l1Bridge.isSignalSent(
- // owner.address,
- // hash
- // );
- // expect(isSignalSent).to.be.true;
- // });
- // });
-
- describe("isDestChainEnabled()", function () {
- it("is disabled for unabled chainIds", async () => {
- const enabled = await l1Bridge.isDestChainEnabled(68);
- expect(enabled).to.be.false;
- });
-
- it("is enabled for enabled chainId", async () => {
- const enabled = await l1Bridge.isDestChainEnabled(
- enabledDestChainId
- );
- expect(enabled).to.be.true;
- });
- });
-
- describe("context()", function () {
- it("returns uninitialized context", async () => {
- const ctx = await l1Bridge.context();
- expect(ctx[0]).to.be.eq(ethers.constants.HashZero);
- expect(ctx[1]).to.be.eq(ethers.constants.AddressZero);
- expect(ctx[2]).to.be.eq(BigNumber.from(0));
- });
- });
-
- describe("getMessageStatus()", function () {
- it("returns new for uninitialized signal", async () => {
- const messageStatus = await l1Bridge.getMessageStatus(
- ethers.constants.HashZero
- );
-
- expect(messageStatus).to.be.eq(0);
- });
-
- // TODO(jeff/roger): the following test is incorrect - getMessageStatus()
- // shall be tested on the destination chain, not the source chain.
- //
- // it("returns for initiaized signal", async () => {
- // const message: Message = {
- // id: 1,
- // sender: owner.address,
- // srcChainId: 1,
- // destChainId: enabledDestChainId,
- // owner: owner.address,
- // to: nonOwner.address,
- // refundAddress: owner.address,
- // depositValue: 1,
- // callValue: 1,
- // processingFee: 1,
- // gasLimit: 100,
- // data: ethers.constants.HashZero,
- // memo: "",
- // };
-
- // const { signal } = await sendMessage(l1Bridge, message);
-
- // expect(signal).not.to.be.eq(ethers.constants.HashZero);
-
- // const messageStatus = await l1Bridge.getMessageStatus(signal);
-
- // expect(messageStatus).to.be.eq(0);
- // });
- });
-
- describe("processMessage()", async function () {
- it("throws when message.gasLimit is 0 and msg.sender is not the message.owner", async () => {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: enabledDestChainId,
- owner: nonOwner.address,
- to: owner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 0,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(
- l1Bridge.processMessage(message, ethers.constants.HashZero)
- ).to.be.revertedWith("B_FORBIDDEN()");
- });
-
- it("throws message.destChainId is not block.chainId", async () => {
- const message: Message = {
- id: 1,
- sender: nonOwner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 0,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(
- l1Bridge.processMessage(message, ethers.constants.HashZero)
- ).to.be.revertedWith("B_WRONG_CHAIN_ID()");
- });
- });
-});
diff --git a/packages/protocol/test/bridge/BridgedERC20.test.ts b/packages/protocol/test/bridge/BridgedERC20.test.ts
deleted file mode 100644
index e4ddb4e2c68..00000000000
--- a/packages/protocol/test/bridge/BridgedERC20.test.ts
+++ /dev/null
@@ -1,290 +0,0 @@
-import { expect } from "chai";
-import { AddressManager, BridgedERC20 } from "../../typechain";
-import { ethers } from "hardhat";
-import { BigNumber } from "ethers";
-import {
- ERC20_BURN_AMOUNT_EXCEEDED,
- ERC20_TRANSFER_AMOUNT_EXCEEDED,
-} from "../constants/errors";
-import deployAddressManager from "../utils/addressManager";
-
-const WETH_GOERLI = "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6";
-const CHAIN_ID_GOERLI = 5;
-describe("BridgedERC20", function () {
- let owner: any;
- let tokenVault: any;
- let accountWithTokens: any;
-
- // uninitialized BridgedERC20 for testing
- let unInitAddressManager: AddressManager;
- let unInitERC20: BridgedERC20;
-
- // properly initialized BridgedERC20 for testing
- let addressManager: AddressManager;
- let erc20: BridgedERC20;
-
- before(async function () {
- [owner, tokenVault, accountWithTokens] = await ethers.getSigners();
- });
-
- beforeEach(async function () {
- unInitAddressManager = await deployAddressManager(owner);
- unInitERC20 = await (await ethers.getContractFactory("BridgedERC20"))
- .connect(owner)
- .deploy();
-
- addressManager = await deployAddressManager(owner);
-
- const network = await ethers.provider.getNetwork();
-
- await addressManager.setAddress(
- `${network.chainId}.token_vault`,
- tokenVault.address
- );
-
- erc20 = await (await ethers.getContractFactory("BridgedERC20"))
- .connect(owner)
- .deploy();
-
- await erc20
- .connect(owner)
- .init(
- addressManager.address,
- WETH_GOERLI,
- CHAIN_ID_GOERLI,
- 18,
- "SYMB",
- "Name"
- );
-
- await erc20
- .connect(tokenVault)
- .bridgeMintTo(
- accountWithTokens.address,
- ethers.utils.parseEther("1.0")
- );
- });
-
- describe("init()", function () {
- it("inits when srctoken is not 0, srcChainId is not 0, srcChainId is not the current blocks chain id, symbol is not 0 length, name is not 0 length", async () => {
- await expect(
- unInitERC20
- .connect(owner)
- .init(
- unInitAddressManager.address,
- WETH_GOERLI,
- CHAIN_ID_GOERLI,
- 18,
- "SYMB",
- "Name"
- )
- ).not.to.be.revertedWith("BRIDGE_INIT_PARAM_ERROR()");
- });
-
- it("throws when _srcToken is address 0 ", async () => {
- await expect(
- unInitERC20
- .connect(owner)
- .init(
- unInitAddressManager.address,
- ethers.constants.AddressZero,
- CHAIN_ID_GOERLI,
- 18,
- "SYMB",
- "Name"
- )
- ).to.be.revertedWith("B_INIT_PARAM_ERROR()");
- });
-
- it("throws when _srcChainId is 0", async () => {
- await expect(
- unInitERC20
- .connect(owner)
- .init(
- unInitAddressManager.address,
- WETH_GOERLI,
- 0,
- 18,
- "SYMB",
- "Name"
- )
- ).to.be.revertedWith("B_INIT_PARAM_ERROR()");
- });
-
- it("throws when _symbol is 0 length", async () => {
- await expect(
- unInitERC20
- .connect(owner)
- .init(
- unInitAddressManager.address,
- WETH_GOERLI,
- CHAIN_ID_GOERLI,
- 18,
- "",
- "Name"
- )
- ).to.be.revertedWith("B_INIT_PARAM_ERROR()");
- });
-
- it("throws when _name is 0 length", async () => {
- await expect(
- unInitERC20
- .connect(owner)
- .init(
- unInitAddressManager.address,
- WETH_GOERLI,
- CHAIN_ID_GOERLI,
- 18,
- "SYMB",
- ""
- )
- ).to.be.revertedWith("B_INIT_PARAM_ERROR()");
- });
-
- it("throws when _srcChainId is equal to block.chainid", async () => {
- const network = await ethers.provider.getNetwork();
- await expect(
- unInitERC20
- .connect(owner)
- .init(
- unInitAddressManager.address,
- WETH_GOERLI,
- network.chainId,
- 18,
- "SYMB",
- "name"
- )
- ).to.be.revertedWith("B_INIT_PARAM_ERROR()");
- });
- });
-
- describe("source()", function () {
- it("returns srcToken and srcChainId", async () => {
- const [srcToken, srcChainId] = await erc20.source();
-
- expect(srcToken).to.be.eq(WETH_GOERLI);
- expect(srcChainId).to.be.eq(CHAIN_ID_GOERLI);
- });
- });
-
- describe("bridgeMintTo()", function () {
- it("throws when not called by token_vault", async () => {
- const amount = BigNumber.from(1);
- await expect(
- erc20.bridgeMintTo(owner.address, amount)
- ).to.be.revertedWith("RESOLVER_DENIED()");
- });
-
- it("successfully mintes and emits BridgeMint when called by token_vault, balance inceases for account specified, burns and emits BridgeBurn", async () => {
- const amount = BigNumber.from(150);
-
- const initialBalance = await erc20.balanceOf(owner.address);
- expect(initialBalance).to.be.eq(BigNumber.from(0));
-
- expect(
- await erc20
- .connect(tokenVault)
- .bridgeMintTo(owner.address, amount)
- )
- .to.emit(erc20, "BridgeMint")
- .withArgs(owner.address, amount);
- const newBalance = await erc20.balanceOf(owner.address);
- expect(newBalance).to.be.eq(initialBalance.add(amount));
-
- expect(
- await erc20
- .connect(tokenVault)
- .bridgeBurnFrom(owner.address, amount)
- )
- .to.emit(erc20, "BridgeBurn")
- .withArgs(owner.address, amount);
-
- const afterBurnBalance = await erc20.balanceOf(owner.address);
- expect(afterBurnBalance).to.be.eq(newBalance.sub(amount));
- });
- });
-
- describe("bridgeBurnFrom()", function () {
- it("throws when not called by token_vault", async () => {
- const amount = BigNumber.from(1);
- await expect(
- erc20.bridgeBurnFrom(owner.address, amount)
- ).to.be.revertedWith("RESOLVER_DENIED()");
- });
-
- it("can not burn an amount greater than was minted", async () => {
- const initialBalance = await erc20.balanceOf(
- accountWithTokens.address
- );
-
- await expect(
- erc20
- .connect(tokenVault)
- .bridgeBurnFrom(
- accountWithTokens.address,
- initialBalance.add(1)
- )
- ).to.be.revertedWith(ERC20_BURN_AMOUNT_EXCEEDED);
- });
- });
-
- describe("transferFrom()", function () {
- it("throws when trying to transfer to itself", async () => {
- await expect(
- erc20
- .connect(accountWithTokens)
- .transferFrom(accountWithTokens.address, erc20.address, 1)
- ).to.be.revertedWith("B_ERC20_CANNOT_RECEIVE()");
- });
- });
-
- describe("transfer()", function () {
- it("throws when trying to transfer to itself", async () => {
- await expect(
- erc20.connect(accountWithTokens).transfer(erc20.address, 1)
- ).to.be.revertedWith("B_ERC20_CANNOT_RECEIVE()");
- });
-
- it("throws when trying to transfer amount greater than holder owns", async () => {
- const initialBalance = await erc20.balanceOf(
- accountWithTokens.address
- );
-
- await expect(
- erc20
- .connect(accountWithTokens)
- .transfer(owner.address, initialBalance.add(1))
- ).to.be.revertedWith(ERC20_TRANSFER_AMOUNT_EXCEEDED);
- });
-
- it("transfers, emits Transfer event, balances are correct after transfer", async () => {
- const initialRecipientBalance = await erc20.balanceOf(
- owner.address
- );
- const initialAccountWithTokensBalance = await erc20.balanceOf(
- accountWithTokens.address
- );
- const amount = BigNumber.from(100);
-
- expect(
- await erc20
- .connect(accountWithTokens)
- .transfer(owner.address, amount)
- )
- .to.emit(erc20, "Transfer")
- .withArgs(accountWithTokens.address, owner.address, amount);
-
- const newRecipientBalance = await erc20.balanceOf(owner.address);
- const newAccountWithTokensBalance = await erc20.balanceOf(
- accountWithTokens.address
- );
-
- expect(newRecipientBalance).to.be.eq(
- initialRecipientBalance.add(amount)
- );
- expect(newAccountWithTokensBalance).to.be.eq(
- initialAccountWithTokensBalance.sub(amount)
- );
- });
- });
-});
diff --git a/packages/protocol/test/bridge/libs/LibBridgeInvoke.test.ts b/packages/protocol/test/bridge/libs/LibBridgeInvoke.test.ts
deleted file mode 100644
index 3df2d1fb783..00000000000
--- a/packages/protocol/test/bridge/libs/LibBridgeInvoke.test.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import { Message } from "../../utils/message";
-import {
- TestLibBridgeData,
- TestLibBridgeInvoke,
- TestReceiver,
-} from "../../../typechain";
-
-// TODO(roger): we should deprecate these test and test Bridge.sol
-// as a whole.
-describe("LibBridgeInvoke", function () {
- let owner: any;
- let nonOwner: any;
- let libInvoke: TestLibBridgeInvoke;
- let libData: TestLibBridgeData;
-
- before(async function () {
- [owner, nonOwner] = await ethers.getSigners();
- });
-
- beforeEach(async function () {
- libInvoke = await (
- await ethers.getContractFactory("TestLibBridgeInvoke")
- ).deploy();
-
- libData = await (
- await ethers.getContractFactory("TestLibBridgeData")
- ).deploy();
- });
-
- describe("invokeMessageCall()", async function () {
- it("should throw when gasLimit <= 0", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 0,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await libData.hashMessage(message);
-
- await expect(
- libInvoke.invokeMessageCall(message, signal, message.gasLimit)
- ).to.be.revertedWith("B_GAS_LIMIT()");
- });
-
- it("should emit event with success false if message does not actually invoke", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await libData.hashMessage(message);
-
- await expect(
- libInvoke.invokeMessageCall(message, signal, message.gasLimit)
- )
- .to.emit(libInvoke, "MessageInvoked")
- .withArgs(signal, false);
- });
-
- it("should emit event with success true if message invokes successfully", async function () {
- const testReceiver: TestReceiver = await (
- await ethers.getContractFactory("TestReceiver")
- ).deploy();
-
- await testReceiver.deployed();
-
- const ABI = ["function receiveTokens(uint256) payable"];
- const iface = new ethers.utils.Interface(ABI);
- const data = iface.encodeFunctionData("receiveTokens", [1]);
-
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: owner.address,
- to: testReceiver.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 300000,
- data: data,
- memo: "",
- };
-
- const signal = await libData.hashMessage(message);
-
- await expect(
- libInvoke.invokeMessageCall(message, signal, message.gasLimit, {
- value: message.callValue,
- })
- )
- .to.emit(libInvoke, "MessageInvoked")
- .withArgs(signal, true);
- });
- });
-});
diff --git a/packages/protocol/test/bridge/libs/LibBridgeProcess.test.ts b/packages/protocol/test/bridge/libs/LibBridgeProcess.test.ts
deleted file mode 100644
index ca7e538fabd..00000000000
--- a/packages/protocol/test/bridge/libs/LibBridgeProcess.test.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-import * as helpers from "@nomicfoundation/hardhat-network-helpers";
-import { expect } from "chai";
-import hre, { ethers } from "hardhat";
-import {
- getMessageStatusSlot,
- Message,
- MessageStatus,
-} from "../../utils/message";
-import {
- AddressManager,
- EtherVault,
- TestLibBridgeData,
- TestLibBridgeProcess,
-} from "../../../typechain";
-
-// TODO(roger): we should deprecate these test and test Bridge.sol
-// as a whole.
-describe("LibBridgeProcess", async function () {
- let owner: any;
- let nonOwner: any;
- let etherVaultOwner: any;
- let addressManager: AddressManager;
- let etherVault: EtherVault;
- let libProcess: TestLibBridgeProcess;
- let testTaikoData: TestLibBridgeData;
- const srcChainId = 1;
- const blockChainId = hre.network.config.chainId ?? 0;
-
- before(async function () {
- [owner, nonOwner, etherVaultOwner] = await ethers.getSigners();
- });
-
- beforeEach(async function () {
- addressManager = await (
- await ethers.getContractFactory("AddressManager")
- ).deploy();
- await addressManager.init();
-
- etherVault = await (await ethers.getContractFactory("EtherVault"))
- .connect(etherVaultOwner)
- .deploy();
-
- await etherVault.deployed();
-
- await etherVault.init(addressManager.address);
-
- await etherVault
- .connect(etherVaultOwner)
- .authorize(owner.address, true);
- const blockChainId = hre.network.config.chainId ?? 0;
- await addressManager.setAddress(
- `${blockChainId}.ether_vault`,
- etherVault.address
- );
- // Sends initial value of 10 ether to EtherVault for releaseEther calls
- await owner.sendTransaction({
- to: etherVault.address,
- value: ethers.utils.parseEther("10.0"),
- });
-
- libProcess = await (
- await ethers.getContractFactory("TestLibBridgeProcess")
- )
- .connect(owner)
- .deploy();
-
- await libProcess.init(addressManager.address);
-
- testTaikoData = await (
- await ethers.getContractFactory("TestLibBridgeData")
- ).deploy();
-
- await etherVault
- .connect(etherVaultOwner)
- .authorize(libProcess.address, true);
- });
-
- describe("processMessage()", async function () {
- it("should throw if gaslimit == 0 & msg.sender != message.owner", async function () {
- const message: Message = {
- id: 1,
- sender: nonOwner.address,
- srcChainId: srcChainId,
- destChainId: blockChainId,
- owner: nonOwner.address,
- to: owner.address,
- refundAddress: nonOwner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 0,
- data: ethers.constants.HashZero,
- memo: "",
- };
- await expect(
- libProcess.processMessage(message, ethers.constants.HashZero)
- ).to.be.revertedWith("B_FORBIDDEN()");
- });
-
- it("should throw if message.destChain != block.chainId", async function () {
- const badBlockChainId = blockChainId + 1;
- const message: Message = {
- id: 1,
- sender: nonOwner.address,
- srcChainId: srcChainId,
- destChainId: badBlockChainId,
- owner: nonOwner.address,
- to: owner.address,
- refundAddress: nonOwner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100000000,
- data: ethers.constants.HashZero,
- memo: "",
- };
- await expect(
- libProcess.processMessage(message, ethers.constants.HashZero)
- ).to.be.revertedWith("B_WRONG_CHAIN_ID()");
- });
-
- it("should throw if message's status is not NEW", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: blockChainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100000000,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await testTaikoData.hashMessage(message);
-
- await helpers.setStorageAt(
- libProcess.address,
- await getMessageStatusSlot(hre, signal),
- MessageStatus.RETRIABLE
- );
-
- await expect(
- libProcess.processMessage(message, ethers.constants.HashZero)
- ).to.be.revertedWith("B_STATUS_MISMTACH()");
- });
- // Remaining test cases require integration, will be covered in Bridge.test.ts
- });
-});
diff --git a/packages/protocol/test/bridge/libs/LibBridgeRetry.test.ts b/packages/protocol/test/bridge/libs/LibBridgeRetry.test.ts
deleted file mode 100644
index d89a4adf30a..00000000000
--- a/packages/protocol/test/bridge/libs/LibBridgeRetry.test.ts
+++ /dev/null
@@ -1,368 +0,0 @@
-import * as helpers from "@nomicfoundation/hardhat-network-helpers";
-import { expect } from "chai";
-import hre, { ethers } from "hardhat";
-import {
- getMessageStatusSlot,
- Message,
- MessageStatus,
-} from "../../utils/message";
-import { decode } from "../../../tasks/utils";
-import {
- AddressManager,
- EtherVault,
- TestBadReceiver,
- TestLibBridgeData,
- TestLibBridgeRetry,
- TestReceiver,
-} from "../../../typechain";
-import deployAddressManager from "../../utils/addressManager";
-
-// TODO(roger): we should deprecate these test and test Bridge.sol
-// as a whole.
-describe("LibBridgeRetry", function () {
- let owner: any;
- let nonOwner: any;
- let refundAddress: any;
- let etherVaultOwner: any;
- let etherVault: EtherVault;
- let libRetry: TestLibBridgeRetry;
- let badLibRetry: TestLibBridgeRetry;
- let testTaikoData: TestLibBridgeData;
-
- before(async function () {
- [owner, nonOwner, refundAddress, etherVaultOwner] =
- await ethers.getSigners();
- });
-
- beforeEach(async function () {
- const addressManager: AddressManager = await deployAddressManager(
- owner
- );
-
- const badAddressManager: AddressManager = await deployAddressManager(
- owner
- );
-
- etherVault = await (await ethers.getContractFactory("EtherVault"))
- .connect(etherVaultOwner)
- .deploy();
-
- await etherVault.deployed();
-
- await etherVault.init(addressManager.address);
-
- await etherVault
- .connect(etherVaultOwner)
- .authorize(owner.address, true);
- const blockChainId = hre.network.config.chainId ?? 0;
- await addressManager.setAddress(
- `${blockChainId}.ether_vault`,
- etherVault.address
- );
-
- await badAddressManager.setAddress(
- `${blockChainId}.ether_vault`,
- ethers.constants.AddressZero
- );
-
- await owner.sendTransaction({
- to: etherVault.address,
- value: ethers.utils.parseEther("10.0"),
- });
-
- const libRetryFactory = await (
- await ethers.getContractFactory("TestLibBridgeRetry")
- ).connect(owner);
-
- libRetry = await libRetryFactory.deploy();
- await libRetry.init(addressManager.address);
- await libRetry.deployed();
-
- badLibRetry = await libRetryFactory.deploy();
- await badLibRetry.init(badAddressManager.address);
- await badLibRetry.deployed();
-
- await etherVault
- .connect(etherVaultOwner)
- .authorize(libRetry.address, true);
-
- testTaikoData = await (
- await ethers.getContractFactory("TestLibBridgeData")
- ).deploy();
- });
-
- describe("retryMessage()", async function () {
- it("should throw if message.gaslimit == 0 && msg.sender != message.owner", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: nonOwner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 0,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(
- libRetry.retryMessage(message, false)
- ).to.be.revertedWith("B_DENIED()");
- });
-
- it("should throw if lastAttempt == true && msg.sender != message.owner", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: nonOwner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 1000000,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(
- libRetry.retryMessage(message, true)
- ).to.be.revertedWith("B_DENIED()");
- });
-
- it("should throw if message status is not RETRIABLE", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: 5,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 300000,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(
- libRetry.retryMessage(message, false)
- ).to.be.revertedWith("B_MSG_NON_RETRIABLE()");
- });
-
- it("if etherVault resolves to address(0), retry should fail and messageStatus should not change if not lastAttempt since no ether received", async function () {
- const testReceiver: TestReceiver = await (
- await ethers.getContractFactory("TestReceiver")
- ).deploy();
-
- await testReceiver.deployed();
-
- const destChainId = 5;
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: destChainId,
- owner: owner.address,
- to: testReceiver.address,
- refundAddress: refundAddress.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 1,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await testTaikoData.hashMessage(message);
-
- await helpers.setStorageAt(
- badLibRetry.address,
- await getMessageStatusSlot(hre, signal),
- MessageStatus.RETRIABLE
- );
-
- const originalToBalance = await testReceiver.getBalance();
- await badLibRetry.retryMessage(message, false);
- const newToBalance = await testReceiver.getBalance();
- expect(
- await decode(
- hre,
- "uint256",
- await ethers.provider.getStorageAt(
- badLibRetry.address,
- getMessageStatusSlot(hre, signal)
- )
- )
- ).to.equal(MessageStatus.RETRIABLE.toString());
-
- expect(newToBalance).to.be.equal(originalToBalance);
- });
-
- it("should fail, but since lastAttempt == true messageStatus should be set to DONE", async function () {
- const testBadReceiver: TestBadReceiver = await (
- await ethers.getContractFactory("TestBadReceiver")
- ).deploy();
-
- await testBadReceiver.deployed();
-
- const destChainId = 5;
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: destChainId,
- owner: owner.address,
- to: testBadReceiver.address,
- refundAddress: refundAddress.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 300000,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await testTaikoData.hashMessage(message);
-
- await helpers.setStorageAt(
- libRetry.address,
- await getMessageStatusSlot(hre, signal),
- MessageStatus.RETRIABLE
- );
-
- const originalBalance = await refundAddress.getBalance();
- await libRetry.retryMessage(message, true);
- const balancePlusRefund = await refundAddress.getBalance();
-
- expect(
- await decode(
- hre,
- "uint256",
- await ethers.provider.getStorageAt(
- libRetry.address,
- getMessageStatusSlot(hre, signal)
- )
- )
- ).to.equal(MessageStatus.FAILED.toString());
-
- expect(balancePlusRefund).to.be.equal(
- originalBalance.add(message.callValue)
- );
- });
-
- it("should fail, messageStatus is still RETRIABLE and balance is returned to etherVault", async function () {
- const testBadReceiver: TestBadReceiver = await (
- await ethers.getContractFactory("TestBadReceiver")
- ).deploy();
-
- await testBadReceiver.deployed();
-
- const destChainId = 5;
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: destChainId,
- owner: owner.address,
- to: testBadReceiver.address,
- refundAddress: ethers.constants.AddressZero,
- depositValue: 0,
- callValue: 1,
- processingFee: 1,
- gasLimit: 300000,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await testTaikoData.hashMessage(message);
-
- await helpers.setStorageAt(
- libRetry.address,
- await getMessageStatusSlot(hre, signal),
- MessageStatus.RETRIABLE
- );
-
- const originalBalance = await ethers.provider.getBalance(
- etherVault.address
- );
- await libRetry.retryMessage(message, false);
- const balancePlusRefund = await ethers.provider.getBalance(
- etherVault.address
- );
-
- expect(
- await decode(
- hre,
- "uint256",
- await ethers.provider.getStorageAt(
- libRetry.address,
- getMessageStatusSlot(hre, signal)
- )
- )
- ).to.equal(MessageStatus.RETRIABLE.toString());
-
- expect(balancePlusRefund).to.be.equal(originalBalance);
- });
-
- it("should succeed, set message status to done, invoke message succesfsully", async function () {
- const testReceiver: TestReceiver = await (
- await ethers.getContractFactory("TestReceiver")
- ).deploy();
-
- await testReceiver.deployed();
-
- const destChainId = 5;
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: 1,
- destChainId: destChainId,
- owner: owner.address,
- to: testReceiver.address,
- refundAddress: refundAddress.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 1,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const signal = await testTaikoData.hashMessage(message);
-
- await helpers.setStorageAt(
- libRetry.address,
- await getMessageStatusSlot(hre, signal),
- MessageStatus.RETRIABLE
- );
-
- const originalToBalance = await testReceiver.getBalance();
- await libRetry.retryMessage(message, true);
- const newToBalance = await testReceiver.getBalance();
-
- expect(
- await decode(
- hre,
- "uint256",
- await ethers.provider.getStorageAt(
- libRetry.address,
- getMessageStatusSlot(hre, signal)
- )
- )
- ).to.equal(MessageStatus.DONE.toString());
-
- expect(newToBalance).to.be.equal(
- originalToBalance.add(message.callValue)
- );
- });
- });
-});
diff --git a/packages/protocol/test/bridge/libs/LibBridgeSend.test.ts b/packages/protocol/test/bridge/libs/LibBridgeSend.test.ts
deleted file mode 100644
index faf0d4a29c0..00000000000
--- a/packages/protocol/test/bridge/libs/LibBridgeSend.test.ts
+++ /dev/null
@@ -1,186 +0,0 @@
-import { expect } from "chai";
-import hre, { ethers } from "hardhat";
-import {
- AddressManager,
- TestLibBridgeSend,
- EtherVault,
-} from "../../../typechain";
-import { Message } from "../../utils/message";
-import { deploySignalService } from "../../utils/signal";
-
-// TODO(roger): we should deprecate these test and test Bridge.sol
-// as a whole.
-describe("LibBridgeSend", function () {
- let owner: any;
- let nonOwner: any;
- let etherVaultOwner: any;
- let libSend: TestLibBridgeSend;
- let blockChainId: number;
- const enabledDestChainId = 100;
- const srcChainId = 1;
-
- before(async function () {
- [owner, nonOwner, etherVaultOwner] = await ethers.getSigners();
- blockChainId = hre.network.config.chainId ?? 0;
- });
-
- beforeEach(async function () {
- const addressManager: AddressManager = await (
- await ethers.getContractFactory("AddressManager")
- ).deploy();
- await addressManager.init();
-
- await deploySignalService(owner, addressManager, blockChainId);
-
- await addressManager.setAddress(
- `${enabledDestChainId}.bridge`,
- "0x0000000000000000000000000000000000000001" // dummy address so chain is "enabled"
- );
-
- const etherVault: EtherVault = await (
- await ethers.getContractFactory("EtherVault")
- )
- .connect(etherVaultOwner)
- .deploy();
-
- await etherVault.deployed();
- await etherVault.init(addressManager.address);
-
- await addressManager.setAddress(
- `${blockChainId}.ether_vault`,
- etherVault.address
- );
-
- libSend = await (await ethers.getContractFactory("TestLibBridgeSend"))
- .connect(owner)
- .deploy();
-
- await libSend.init(addressManager.address);
- await etherVault
- .connect(etherVaultOwner)
- .authorize(libSend.address, true);
- });
-
- describe("sendMessage()", async function () {
- it("should throw when message.owner == address(0)", async function () {
- const nonEnabledDestChain = 2;
-
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: nonEnabledDestChain,
- owner: ethers.constants.AddressZero,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(libSend.sendMessage(message)).to.be.revertedWith(
- "B_OWNER_IS_NULL()"
- );
- });
-
- it("should throw when destchainId == block.chainId", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: blockChainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(libSend.sendMessage(message)).to.be.revertedWith(
- "B_WRONG_CHAIN_ID()"
- );
- });
-
- it("should throw when destChainId has not yet been enabled", async function () {
- const nonEnabledDestChain = 2;
-
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: nonEnabledDestChain,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(libSend.sendMessage(message)).to.be.revertedWith(
- "B_WRONG_CHAIN_ID()"
- );
- });
-
- it("should throw when expectedAmount != msg.value", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: enabledDestChainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- await expect(libSend.sendMessage(message)).to.be.revertedWith(
- "B_INCORRECT_VALUE()"
- );
- });
-
- it("should emit MessageSent() event and signal should be hashed correctly", async function () {
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: enabledDestChainId,
- owner: owner.address,
- to: nonOwner.address,
- refundAddress: owner.address,
- depositValue: 1,
- callValue: 1,
- processingFee: 1,
- gasLimit: 100,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const expectedAmount =
- message.depositValue +
- message.callValue +
- message.processingFee;
-
- expect(
- await libSend.sendMessage(message, {
- value: expectedAmount,
- })
- ).to.emit(libSend, "MessageSent");
- });
- });
-});
diff --git a/packages/protocol/test/constants/errors.ts b/packages/protocol/test/constants/errors.ts
deleted file mode 100644
index 60420437565..00000000000
--- a/packages/protocol/test/constants/errors.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-const ERC20_BURN_AMOUNT_EXCEEDED = "ERC20: burn amount exceeds balance";
-const ERC20_TRANSFER_AMOUNT_EXCEEDED = "ERC20: transfer amount exceeds balance";
-export { ERC20_BURN_AMOUNT_EXCEEDED, ERC20_TRANSFER_AMOUNT_EXCEEDED };
diff --git a/packages/protocol/test/constants/messages.ts b/packages/protocol/test/constants/messages.ts
deleted file mode 100644
index c519885a5e4..00000000000
--- a/packages/protocol/test/constants/messages.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-const K_BRIDGE_MESSAGE = "TAIKO_BRIDGE_MESSAGE";
-
-export { K_BRIDGE_MESSAGE };
diff --git a/packages/protocol/test/data/test_proof.json b/packages/protocol/test/data/test_proof.json
deleted file mode 100644
index e35722dc478..00000000000
--- a/packages/protocol/test/data/test_proof.json
+++ /dev/null
@@ -1,37 +0,0 @@
-{
- "jsonrpc": "2.0",
- "id": 1,
- "result": {
- "aggregation": {
- "duration": 0,
- "instance": [],
- "k": 0,
- "label": "pi-600000-a",
- "proof": "0x",
- "randomness": "0x"
- },
- "circuit": {
- "duration": 291422,
- "instance": [
- "0xecbb89532da16c6aaba65173df994a0b",
- "0xdc43ac5f0c4d96dda954d14935efd6a3"
- ],
- "k": 19,
- "label": "pi-600000",
- "proof": "0x2bf20ff78727f38ef16e03bfb3d4895f35cc626f97ede7cc99f48aeff8661fe32015ea8d62ec7a79e01cd398e85867bafdcf55cb6a7121b6fef097f5f5656a5d11ddf336b6879926ea2ae425e91c748a553c9a496cbe2ab556a91689f75ee2b01ad3c43aa774b50a9d8411a9f65be42d6cde781db1a1949a1e886f868917997b0ddf417d2fa8b5fb32dd641ef94ba838efb46de478000cc32c62367ea7f68f341ab25760acb25df78b85ffaf11edcaf986c0ed939c32989df7127129000e0bfb21f302010a7798aecee8552aa1c226cf9908e813008ee2f29e21784a3f32078a0ed17a8070ca28e6fb79356d372926921e08a609bfde3f9416a69da8cbf4faba1958b1d14fc9092e077af4e9c438857aa200afd32dcf7848a217fb187fa9e1bb2b88c35121977f4de6a34c88c2fe4678205292ca22683d073687f77a68070e1e227874e3cddb99c6347c7d47232d2aa51b32076e81b130e96dc0ca2ac7dcef601bfbd31520044ed64796953f3345b49ac812514aa3886a17e8eab324c8940abd220669e9b95d47ddc7774695be89576663bf96b0e6dea37abfbfb4620178b74e124862d1788641479260a68ebba6dbc9cd80e10ef9d7627966db2063222eb2751a9959e70854d3379c63eb3ec8177441f568d79ec82875aa36645f01bd53e10d302a9f8b678d6b09c54d072c7e9d6443a0aa89021ec0748568d3d5b5745c92b11f31c13d11b94f892bb9f96bd2931b66ffa5e22b104c549e7c0d5010e4e70e271d48c0bd6e4be68c920ea77af85d12eb155d9b25703eabbd0ede1909565a55f12f654ccc6771897acdaaf83e3674c7141927ac3a8e9915bf27f033779110c0ba0b635753acf8f53fed904adc20368c93691f8e49cf07e0b6f10a9d8a0bea4f3d259764b0f53960cd7b9a81fa4379d396364814249a5fddcf7efa7d2e68e729550a92392f5c23c73868961d6edfd9fc4f1379c8e34191c372cbebf13c2fa337fd1a0a0068708d0d60db275be717d35676c27cf58b5044adb1d764b8bcd6951a9f1c5c1a2fb96d6cecb1c153fbe082948de02930c0cdb295d8ac4df91ea2d34b442fd18f84509838c84d4ebc980c96be6d0667fc18cd949ac93b5dfb38d712bb2d29fcbac5bb3a620b2b5aadf1a4e2a3c254610dfffe7e216b4a9ecc93a8081b970d13d113582885390dfc9cc4ae10eca93a6c81003305c0a03213293e919e041712192fb8374c269bf5e3cbfd8cfc1fa4408c0a55fd98d8f57926aa9d9772e5b114ffe9e64acbf6e0543d3c55a5140116e8130f3369b0f819a21f5fa24980b11b2f12481042cbff8b2dec629f37fa4a64a4641656629fb11261a66a36e969b74a20753d54c05301075e315bdb0a39fd7665edd8d73fbfa6c4faaf6c66e6c8b1a830453b758b0047d93d9970b49c617dd582fbad0539f9f5eadeeb51e35775f98f2bfb750f3ca68d27197e3d86d4283f5859a6ef7bd66b68991f474e26317dc1df15d4acaa898abf97f2e5c1b4e560336e76ccbe2613d85454a095bbe5ae6b2a1212064ca8776f0f33bd9797c164a92c211167e81c6dc3418d096fecc989ae97d004e2bfa53207b036b5183468f4435e9df40413fd4f3fbb7c0e4080765a68d1e80b262e54ab27cdb4904018a73566c5f3fbf93e637081714ffbd106c3f03f69fb20444983ce2fed71bf96c17049506c3d667ccc7d29dac0a1830187c2f0f130a31166f5e0f55fdd7796be8c989e9c55b87e135356cabdb13314693c4f4cdb3a350524f7494c0b7c9679c651970b2076b58718cf6077b1d5bcd1193708faf3f1812a4811c5965495da8054c9a4a4447f50b08138ea05c6df2bdc444689b78b9a37196917eaed3edc25d1ddc1b60a8041330a4759ee8725c87234374c60b43ab7d8066fe95537bb96857a5357ff97dab62f0e56511d7cb8d3695d919db350eb949002f4fde22120e0e8d3023dbd46a7f0f4e5f84cb59a19c331806f71a381f72da81f27884447fe57e3271ebc651916dced06db9c7a51572c5ce7021eaff9c0bc7c02380abf987c89ba8029744c07e0eeab3a228793e9a69adba4ae42404fb2ce4d2495da393f0d0ac5a0178ca4720e8e6a193e3579a3ef50df7ed8a4b06ca54e33150ae76933a36e9979336b44461efbeaa9de08379687b1dd8ed6656438480d0c0237ca9000cca1bfd6adfdd043364af965aeea9b0571e2debb244e7b632d287011c7ff356c7cce34ad9f5e910280dedd1fae543c3e4405dd47648ae52e8793902beefdab93b509be5c3d84808db2186920e75fb6211f92e965cb901dcdf2ce9c14e21ebcbbc81a57784d0900fac3c31566ded583eb0867eefd75bbf3df363ef01b7932b70e7b068a2656173d241e8f20bb6be3a3a3767111aa6f459f84be961c2337f6e03ed3cc6c847a3683894288b471504cbdc43a78f856801a10a87c77322e36e0ca426ec67ad3a2a3b79bc5cb81928a79a67a0fb46bb967cbab73fd36022f92d920204de61717dde6a85b7bcf57584c11ce54ac92998f856bf042a01c5017345a34999a1048429a6ac79724c62d55446e80fe8fe17c45eee3fbff6d5adb18976d640fa9d0cdc20bed46b5c726df89e442099e0d5a7c7229c3c17dd878671c2794a56de602afc80c531d41f6239868a7f6c2eaf6ee31e765fccd39d9f8f20ca9299f4339b73796bdb401f68953f9b796798756c87db489cf79b7a29c4c6124b6cccd46862b0c28a6f2a03603cb6dfecf6a9b92a01f722b47b50d04963fc12cef50cc58129155b15f279e8bc71a20a663022516cd7c72b9c6cd3782569d150f046473cbb519f5719cd1c8edae7313d9869a20ef43cf2f668cbf98b904e421301b032acb7515be27039f0a02275eacac5600eb1df8d8e48096b31ecce40dbc1a462346830d8dee6311caec0a83aff85a70a0180b999bd3c1b2932596ef3c9524fbf7971c6d9e75ecdbd2ec7943b47d7feec6f26abe42c6aa6bc4f10085843712406bf56c20010ec8dbe8684e174894aa0b6471ef3d3a33ef77887fe5a6b33220a7a1991e56a31e51d2cd82555ccd8f31056d312d9f4c37ba7915a271ca814222616327752f8354ff401a5cf2efcc342752f919a11a0a7a35a1b574ea36637f2c6e14989ad2f7668502cebbd59b3346379d577daf4a0981f0a341d38d9ee58a0463484d31623127c09c6cec446a9ac9a53cb6841ca2a097ceef88e537e209880ffdcfd5033bc3f5a885c271e41ee332366345fa867780beb3c1d5eaa496ea09055c1664fe43a3cee202c7086555143481e8407952aacd465042664e99dc869d1d0641ba576f7351c66c4177418bde4d2e3146083e9362cdba7c0a0ddd2ef8c82b2db81d6fa83b980ab5eabd8a697cdea718c98148d907c2732a3912bfffb59b0a01f361062fc5eb023866f05f6f24277f2b862978b8be3a195787d83b2793092b2060ecd7e35d7ccc5588c367292d227e94b521736a89da3093cc26a45c4f450b64ff3e97f834e2e1303cb0abc9b31704c4b4f99a595e0b32e8632628a1b31f11caf94b127957d16938243e7b9da2c99131bfba20d052f1f741a4e724b4442008cd72dc748b9dd66eb047c4fe9768d0f752aac429c8dede3b8173d7d0e2e4f228985166aa6daa1e3e8bc8cec535cc49fb04cc983eef4b0489ca58d5127b7a4c110fbb8418e62e1086ceeeff2fcda91add54a78321104268324cb978846c129309e5c32019fbd8052926e9945847120ce2bd31a6fde1ad4a333d37c2d948d83b120b6b6d387a0f7fe5f7dfaf3ab3af823d4bb85236ba2d5e8887f5a322190296046eaa65541bce11841715fb8243c61739456c3219755317d0d2d3f84e58dcd115cfbbd8e41b40a6244082c566923dc347ecf89ff8683c7b56dc3af8dde4804f245883c795c063ca8f0e676f70a76e463b325f4754f992c72a18197c4265904822a7e3926f2a0b5e928982620244b3fa5a74a6d77cf3b212dc1cc738487604752fe83dadcc0a47916ef7c4643b82c068b50ccc27589a3d41e86d9b028236e94f24b13227d4df86f3fcb52c583b6feb799268050d2527a6ae8662735dcf14a07c0bc93053770d51f357c745e6c9c1546699eeda30310f3277630a023b5dcfb1a10f4155812cd16cc0048d8844187135ce6a6c90e81c4ecc3e503f26ea92dfe5a817cdd5cbaa3fe8bffacc2f6940eb0c5ba38eb739133532579194d745218102bb088ff27a05e9d5d857b8d131974574fa4a1511b0497e2b332ffe349571d59da52c2225198daa0e27f0e429523c3bd45bbd4d0bddee05003c953e5d22c42ade7f0e3b871be6eaf13236041a6ca2614ea28cb541352aa0eca871a852be7bbabfe30c3173bcbdd8733f8d0df021ee3a454551194d07518f936a2cfef1c0c1196ee50772aea8115ef7e2f2523c18cfb2dae0c60f04d13b7e8d4c8cde37759f5dc5270103f142f7085265670f065353108b482fc711c0ee1279cbc0c85811e3f58bf4199d7b1fdf06e516bd2b85ee9012c2cebf508a4d76779df91a1ab8481765c74c29c2afe960284cf26a0a917979539bc21cd620dab7d35e624a36f9c20baaa6d52ad980d965aed1dfb5495455fb68b41e3ba9ee06521960fe63d4441dbf3b7a352b28baec06f95a8cdcf4aa81ec02a44712a21202439c19409d137f22c115ff871297f0c3eee03f15cf46f9f786d3c7596084b24439d7b95ea61b357c24b967ae204113c1ec8cf103289aaa6b9436da1f572cb1972fe2305b74a88a74ee5353391c3f13a1d0fbc1e674fa13f385b34f7eda4a6ae60eb27aa02fdad51757820b7c0e7b2744e7782fe393581875b14e8d62cd51c6f5621d500f99216d1797dec34522f4baa9ee2ef08fa4338582f8a2ea1109715304d95690ad7141c02d4914b3482dbffd460e1bda19f0b4bcde737c899b5e8b149545611a69a51d121de0f404a62b9c5fe22a7eff88d9dc7625a2b421ea63fc4bd1c3de012179a2a896be077a35108e1b0cf51d88c6e57ab0bd702527959e9805d6f7c6628e337ac905df6bda5713c88ef0c3a2d7a54837f1313ceb899ec6cb96253c24ac94a87f2a0bd90373f81f84f10d4bba42c769ecea87a4bbf854c151772fd97e31bf3e531c8aee6d0dfe01f06fe15736edae5b11ac891cc8b5b847b6b0c7d9e09c5856d755a1d9ab15872e89bca1e7a253e547584b144e517daf9fe4824001d92a7bc355baaa421aa1f92ae543153ca763112d9181802212bd8cb1f7047fe09bff0bf17ad3acff6148d42de1d4b0ecf116b80ead2f02c118b6df97df4f56baf03f5955173f9d68f827ed27ad554f90aff457a8a23280e2be8885d5d3642f0ec59b3a1ec492ae8f4cdd85125ac43e978624cdb90de36025b6ac4e0d83e4735c67858b6afe1c72794b2f8f154e162a34beb4b7fb3bfbc1925cbc903321f47a70f532417d7eacde29cc747d1f7e85b9ebc9881281c08219b47f01dd25a0cabbbf682afdb25fa9e750f9159e120e9e372281d0859ed0b8977cf93eed7ae008b71e7fce7db5ead0d46065e90509dd2e820573d21adc9c48cad23b0b7d0feed2a8300e1e5dc489a61e4cd316ca29f60acd695b5630a10caa7c3d21c151f7e4dc343e98e1753a8e446c554859f02a8614476fea682a8e2ea573bb36dc88d7d8c51e14a11a22834fdd33cd6a077f00b5f8bdfef25b77c6f4985199b3b8dc039f385df28607fcdd45f64d745d5bde0cb5f17221f8335b58db4fd93a1aa6e16d091c66cdc903e4519eb95683c7eff018d47f14e841e216ef87942b3364ce60d94c2eba0a8d4d9909ad4be7e0a866dd0880a33e25c95afb6100f737083a761451047d59b753032e68cb591d1ba5a09d0ab6f9196887dc665035140aec389bfcb7e304dadf6509f4a8e466c8c52c124b1f9002e724d23e13f4bda538a4003a6b719e08075d4aea1a881f9c90fd34b4f22b9983e7ce125798e735db18dc08c49e95e20b685bf2a9ee2d6ea7cc1437e7b1201348d0d498e170c185f96a771a4642f444ec00ccf69fb94869926eb0f539f01be43ab9e8823c746bbf27bbc62081218eb728595fafd0f257bb0267468b4b2111636c36985b5450f724201f3cf862423ff099c177b53624f07a699b831a98ae06d21c2ed3ff85c918c27abb2fbe3266bce49d11de75b54a577ba0f4e1286fbe2523a04d1245a9940cf25efd5d2b4f1d9a38c939b439484964d1458ac5f63a8f0449ec481df725c09691bdd8b4605f2c378f4326055193cd7e0d4e625763da941c71f8ba138c652fc8b1230bb1ffc1d8649e883079d6f72154ee5e91c16b46e11f9de2cb6581ea13027a6445aa0f2dceb24de24e119b421f7718bff774bfd33c15bf1db21b36cd7ab8bcc97cbb2f79126640dfc5926290638e4c1099b7ca9673253fe95dbcfefad83574d6d3bb4934a57152a4dd598178900f8c4283dca089f71e1760d063de4d4e16ba091db51d7bcb31257831b78e74534f2d87fbc534ae09138bbbfa082932956596372c6f57c29cd18daecb33e2e40eff4fb23844b99dfc234258d2105be4f8f95ae781e8e5b105cacdb4bedcf319d548f75f53257041ed08b96961984cef1d11aeb686c928e12b5a2d8315d12fec299f6a47278af96e3a0ef706564615c35891a21d3e4c6ace3863ceb74eb610f6df878743d1126194ee21afc2f5121aed95c8b776bdd74536bee8708410ded1ef78400498c2b842e257214a9e7c186fd8cf719303653d6f0848de33d142161c9116e281efba4714f82c2049a208ab4cd5b9f98a1601b2cb0d4fbb7570938e1d536140d4cc4c05a69c20295367916c381f7f60e3589a2b6e1b9c8bfe57985ec74fd7ce9c8d311b2483dd28f5b53c50c6a1556d6bfc3ec7ad225939a0b0e87fc8ae3cf49c632c6f8d0f3b0e36cf8f44fa705719f1cc74949aa5c97866e2f8abb9a329700c64210cb701932c9f527bc4e2a83637f0eb868c700f66df7e6bde882c686a2832862366a4759c0920569110fa746596834284a02db15179d900454bf2d3a8f912ee1a62a32c071bb89c96cf82a3173caab9901b2ab1d005b21ff8dddf2e4a7c8b4174534648ce1f473f57ce66cb4877561212f1424b7808f47cb267d3a9f7c6122a23f146840529440cf04028b263e2432120acf949234e59b01b1c5edfe36968138f771db95b19bbdf7ac619ccc786132fc38687ab929fe10f7656b9b7f2f0f8ff1c2567e5d4092eeed98d0b457811d6516cf28c935606774c9676cc27d77b7229b13d5c7409064a369b568b597f7dabf1fee789328a6a216ebad1d827bea6f3dc73de73b8f00d2cbf971ea012fdfe667fa3c71827d0831e119023625038e5caeef9244e20e305834cecd12f46e2dfc4e73154ae503b431d62de912fadcd3785203a41d9457d291826033c13ccac3bc3a63425f14953eed324c08f03d2a5722c76ed44712720296c14474d1dab39626f11c0927c17fcab09040481732a9d13b976e8101836181591c892dfb24fd04250fb08bcca8d6649e4a17de62a9066bf74486cf09a1d01287c8535e17d8e466c2ea15ad5c300e1dd7a7d83470629a7e5f7f5151b1251161e1e75cb24c1e6ed7f99ae065b2dbcc5a96429445bbea9917571566a1d0defc601d76fb4390fe028274e98c82c78930ffdb30fb626bef3342d6f35994eb539a210af0e3ae6f3efdc7c5efcd287d7e699e6d1a402246a797d4db46fbbbbbb94cf257d65d7748f905906b74e7da9e8770e313ab08145e1f6b2eb684decf91fcd5a130e726c8d82850c78e1756542d52758a82d06f2839c79e9d13466b0477a0ab12743f4e1d5b347a5bbe7960af573d8ecaa19ecc2f467517a809b958502af98f42114752aa79a8fa137a23516ee6fceec1c2301dedb00ba071acdf7568266efad2a37a8884dbb5f76312429a2e4b0bdbe1131751b730e521b21693e5f0fb788fc21549886936f5608626170146dc1fb531f56ad7155510930cb19b33fdac1962009d7f1a7e779b32593404d855e10fa92b8c5db1daf63c8b36b00b8602f7e5a65",
- "randomness": "0x"
- },
- "config": {
- "block_gas_limit": 625000,
- "keccak_padding": 1600000,
- "max_bytecode": 139500,
- "max_calldata": 697500,
- "max_rws": 3161966,
- "max_txs": 80,
- "min_k": 21,
- "min_k_aggregation": 26,
- "pad_to": 2097152
- },
- "gas": 21000
- }
-}
diff --git a/packages/protocol/test/etherVault/EtherVault.test.ts b/packages/protocol/test/etherVault/EtherVault.test.ts
deleted file mode 100644
index e8481e6b7b9..00000000000
--- a/packages/protocol/test/etherVault/EtherVault.test.ts
+++ /dev/null
@@ -1,176 +0,0 @@
-import { expect } from "chai";
-import { AddressManager, EtherVault } from "../../typechain";
-import { ethers } from "hardhat";
-import { BigNumber } from "ethers";
-import deployAddressManager from "../utils/addressManager";
-
-describe("EtherVault", function () {
- let owner: any;
- let nonOwner: any;
- let authorized: any;
- let notAuthorized: any;
- let etherVault: EtherVault;
-
- before(async function () {
- [owner, nonOwner, authorized, notAuthorized] =
- await ethers.getSigners();
- });
-
- beforeEach(async function () {
- const addressManager: AddressManager = await deployAddressManager(
- owner
- );
-
- etherVault = await (await ethers.getContractFactory("EtherVault"))
- .connect(owner)
- .deploy();
- await etherVault.init(addressManager.address);
-
- await etherVault.connect(owner).authorize(authorized.address, true);
-
- const isAuthorized = await etherVault.isAuthorized(authorized.address);
- expect(isAuthorized).to.be.true;
-
- await authorized.sendTransaction({
- to: etherVault.address,
- value: ethers.utils.parseEther("1.0"),
- });
-
- expect(await ethers.provider.getBalance(etherVault.address)).to.be.eq(
- ethers.utils.parseEther("1.0")
- );
- });
-
- describe("receive()", async function () {
- it("throws if not authorized and balance > 0", async () => {
- const balance = await ethers.provider.getBalance(
- etherVault.address
- );
- expect(balance).to.not.be.eq(BigNumber.from(0));
- await expect(
- notAuthorized.sendTransaction({
- to: etherVault.address,
- value: ethers.utils.parseEther("1.0"),
- })
- ).to.be.revertedWith("B_EV_NOT_AUTHORIZED()");
- });
-
- it("receives if authorized and balance > 0", async () => {
- const amount = BigNumber.from(1);
- const originalBalance = await ethers.provider.getBalance(
- etherVault.address
- );
- expect(originalBalance).to.not.be.eq(BigNumber.from(0));
- await authorized.sendTransaction({
- to: etherVault.address,
- value: amount,
- });
- const newBalance = await ethers.provider.getBalance(
- etherVault.address
- );
- expect(newBalance).to.be.eq(amount.add(originalBalance));
- });
- });
-
- describe("releaseEther()", async function () {
- it("throws if not enough ether to send", async () => {
- const balance = await ethers.provider.getBalance(
- etherVault.address
- );
- const additionalAmount = 1;
- await expect(
- etherVault
- .connect(authorized)
- ["releaseEther(uint256)"](balance.add(additionalAmount))
- ).to.be.revertedWith("ETH transfer failed");
- });
-
- it("throws if not authorized", async () => {
- await expect(
- etherVault.connect(notAuthorized)["releaseEther(uint256)"](1)
- ).to.be.revertedWith("B_EV_NOT_AUTHORIZED()");
- });
-
- it("sends ether to caller", async () => {
- const amount = 100000;
- const originalBalance = await ethers.provider.getBalance(
- authorized.address
- );
-
- const tx = await etherVault
- .connect(authorized)
- ["releaseEther(uint256)"](amount);
- const receipt = await tx.wait();
- const gasUsed = receipt.cumulativeGasUsed.mul(
- receipt.effectiveGasPrice
- );
- const newBalance = await ethers.provider.getBalance(
- authorized.address
- );
-
- expect(newBalance).to.be.eq(
- originalBalance.add(amount).sub(gasUsed)
- );
- });
-
- it("emits EtherReleased event upon success", async () => {
- const amount = 69;
-
- await expect(
- etherVault.connect(authorized)["releaseEther(uint256)"](amount)
- )
- .to.emit(etherVault, "EtherReleased")
- .withArgs(authorized.address, amount);
- });
- });
-
- describe("authorize()", async function () {
- it("throws when not called by owner", async () => {
- await expect(
- etherVault
- .connect(nonOwner)
- .authorize(notAuthorized.address, true)
- ).to.be.revertedWith("Ownable: caller is not the owner");
- });
-
- it("throws when address is 0", async () => {
- await expect(
- etherVault
- .connect(owner)
- .authorize(ethers.constants.AddressZero, true)
- ).to.be.revertedWith("B_EV_PARAM()");
- });
-
- it("throws when authorized state is the same as input", async () => {
- await expect(
- etherVault.connect(owner).authorize(authorized.address, true)
- ).to.be.revertedWith("B_EV_PARAM()");
- });
-
- it("emits Authorized event upon success", async () => {
- await expect(
- etherVault.connect(owner).authorize(notAuthorized.address, true)
- )
- .to.emit(etherVault, "Authorized")
- .withArgs(notAuthorized.address, true);
- });
-
- it("address is authorized in mapping, can de-authorize", async () => {
- await etherVault
- .connect(owner)
- .authorize(notAuthorized.address, true);
-
- let isAuthorized = await etherVault.isAuthorized(
- notAuthorized.address
- );
- expect(isAuthorized).to.be.true;
-
- await etherVault
- .connect(owner)
- .authorize(notAuthorized.address, false);
-
- isAuthorized = await etherVault.isAuthorized(notAuthorized.address);
- expect(isAuthorized).to.be.false;
- });
- });
-});
diff --git a/packages/protocol/test/genesis/GenerateGenesis.g.sol b/packages/protocol/test/genesis/GenerateGenesis.g.sol
new file mode 100644
index 00000000000..800432ef98d
--- /dev/null
+++ b/packages/protocol/test/genesis/GenerateGenesis.g.sol
@@ -0,0 +1,202 @@
+// SPDX-License-Identifier: MIT
+pragma solidity ^0.8.18;
+
+import "forge-std/StdJson.sol";
+import "../../contracts/bridge/BridgeErrors.sol";
+import "../../contracts/bridge/IBridge.sol";
+import "../../contracts/common/AddressResolver.sol";
+import {Test} from "forge-std/Test.sol";
+import {console2} from "forge-std/console2.sol";
+import {TaikoL2} from "../../contracts/L2/TaikoL2.sol";
+import {AddressManager} from "../../contracts/common/AddressManager.sol";
+import {Bridge} from "../../contracts/bridge/Bridge.sol";
+import {TokenVault} from "../../contracts/bridge/TokenVault.sol";
+import {EtherVault} from "../../contracts/bridge/EtherVault.sol";
+import {SignalService} from "../../contracts/signal/SignalService.sol";
+import {LibBridgeStatus} from "../../contracts/bridge/libs/LibBridgeStatus.sol";
+import {LibL2Consts} from "../../contracts/L2/LibL2Consts.sol";
+import {RegularERC20} from "../../contracts/test/erc20/RegularERC20.sol";
+
+contract TestGenerateGenesis is Test, AddressResolver {
+ using stdJson for string;
+
+ string private configJSON =
+ vm.readFile(
+ string.concat(vm.projectRoot(), "/test/genesis/test_config.json")
+ );
+ string private genesisAllocJSON =
+ vm.readFile(
+ string.concat(vm.projectRoot(), "/deployments/genesis_alloc.json")
+ );
+ address private owner = configJSON.readAddress(".contractOwner");
+ uint64 public constant BLOCK_GAS_LIMIT = 30000000;
+
+ function testContractDeployment() public {
+ assertEq(block.chainid, 167);
+
+ checkDeployedCode("TaikoL2");
+ checkDeployedCode("TokenVault");
+ checkDeployedCode("EtherVault");
+ checkDeployedCode("Bridge");
+ checkDeployedCode("RegularERC20");
+ checkDeployedCode("AddressManager");
+ checkDeployedCode("SignalService");
+ }
+
+ function testAddressManager() public {
+ AddressManager addressManager = AddressManager(
+ getPredeployedContractAddress("AddressManager")
+ );
+
+ assertEq(owner, addressManager.owner());
+
+ checkSavedAddress(addressManager, "Bridge", "bridge");
+ checkSavedAddress(addressManager, "TokenVault", "token_vault");
+ checkSavedAddress(addressManager, "EtherVault", "ether_vault");
+ checkSavedAddress(addressManager, "TaikoL2", "taiko");
+ checkSavedAddress(addressManager, "SignalService", "signal_service");
+ }
+
+ function testTaikoL2() public {
+ TaikoL2 taikoL2 = TaikoL2(getPredeployedContractAddress("TaikoL2"));
+
+ vm.startPrank(taikoL2.GOLDEN_TOUCH_ADDRESS());
+ for (uint64 i = 0; i < 300; i++) {
+ vm.roll(block.number + 1);
+ vm.warp(taikoL2.parentTimestamp() + 12);
+ vm.fee(
+ taikoL2.getBasefee(
+ 12,
+ BLOCK_GAS_LIMIT,
+ i + LibL2Consts.ANCHOR_GAS_COST
+ )
+ );
+
+ uint256 gasLeftBefore = gasleft();
+
+ taikoL2.anchor(
+ bytes32(block.prevrandao),
+ bytes32(block.prevrandao),
+ i,
+ i + LibL2Consts.ANCHOR_GAS_COST
+ );
+
+ if (i == 299) {
+ console2.log(
+ "TaikoL2.anchor gas cost after 256 L2 blocks:",
+ gasLeftBefore - gasleft()
+ );
+ }
+ }
+ vm.stopPrank();
+ }
+
+ function testBridge() public {
+ address payable bridgeAddress = payable(
+ getPredeployedContractAddress("Bridge")
+ );
+ Bridge bridge = Bridge(bridgeAddress);
+
+ assertEq(owner, bridge.owner());
+
+ vm.expectRevert(BridgeErrors.B_FORBIDDEN.selector);
+ bridge.processMessage(
+ IBridge.Message({
+ id: 0,
+ sender: address(0),
+ srcChainId: 1,
+ destChainId: 167,
+ owner: address(0),
+ to: address(0),
+ refundAddress: address(0),
+ depositValue: 0,
+ callValue: 0,
+ processingFee: 0,
+ gasLimit: 0,
+ data: "",
+ memo: ""
+ }),
+ ""
+ );
+ }
+
+ function testEtherVault() public {
+ address payable etherVaultAddress = payable(
+ getPredeployedContractAddress("EtherVault")
+ );
+ EtherVault etherVault = EtherVault(etherVaultAddress);
+
+ assertEq(owner, etherVault.owner());
+
+ assertEq(
+ etherVault.isAuthorized(getPredeployedContractAddress("Bridge")),
+ true
+ );
+ assertEq(etherVault.isAuthorized(etherVault.owner()), false);
+ }
+
+ function testTokenVault() public {
+ address tokenVaultAddress = getPredeployedContractAddress("TokenVault");
+ address bridgeAddress = getPredeployedContractAddress("Bridge");
+
+ TokenVault tokenVault = TokenVault(tokenVaultAddress);
+ AddressManager addressManager = AddressManager(
+ getPredeployedContractAddress("AddressManager")
+ );
+
+ assertEq(owner, tokenVault.owner());
+
+ vm.startPrank(addressManager.owner());
+ addressManager.setAddress(1, "bridge", bridgeAddress);
+ addressManager.setAddress(1, "token_vault", tokenVaultAddress);
+ vm.stopPrank();
+ }
+
+ function testSignalService() public {
+ SignalService signalService = SignalService(
+ getPredeployedContractAddress("SignalService")
+ );
+
+ assertEq(owner, signalService.owner());
+
+ signalService.sendSignal(bytes32(block.prevrandao));
+ }
+
+ function testERC20() public {
+ RegularERC20 regularERC20 = RegularERC20(
+ getPredeployedContractAddress("RegularERC20")
+ );
+
+ assertEq(regularERC20.name(), "RegularERC20");
+ assertEq(regularERC20.symbol(), "RGL");
+ }
+
+ function getPredeployedContractAddress(
+ string memory contractName
+ ) private returns (address) {
+ return
+ configJSON.readAddress(
+ string.concat(".contractAddresses.", contractName)
+ );
+ }
+
+ function checkDeployedCode(string memory contractName) private {
+ address contractAddress = getPredeployedContractAddress(contractName);
+ string memory deployedCode = genesisAllocJSON.readString(
+ string.concat(".", vm.toString(contractAddress), ".code")
+ );
+
+ assertEq(address(contractAddress).code, vm.parseBytes(deployedCode));
+ }
+
+ function checkSavedAddress(
+ AddressManager addressManager,
+ string memory contractName,
+ string memory key
+ ) private {
+ assertEq(
+ getPredeployedContractAddress(contractName),
+ addressManager.getAddress(block.chainid, key)
+ );
+ }
+}
diff --git a/packages/protocol/test/genesis/generate_genesis.test.sh b/packages/protocol/test/genesis/generate_genesis.test.sh
index 2e21f254fdc..9da67a737d6 100755
--- a/packages/protocol/test/genesis/generate_genesis.test.sh
+++ b/packages/protocol/test/genesis/generate_genesis.test.sh
@@ -39,7 +39,7 @@ echo '
"epoch": 30000
}
},
- "gasLimit": "10000000",
+ "gasLimit": "30000000",
"difficulty": "1",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000df08f82de32b8d460adbe8d72043e3a7e25a3b390000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"alloc":
@@ -48,7 +48,7 @@ echo '
echo "Starting generate_genesis tests..."
# compile the contracts to get latest bytecode
-pnpm clean && pnpm compile
+rm -rf out && pnpm compile
# run the task
pnpm run generate:genesis $DIR/test_config.json
@@ -65,9 +65,41 @@ echo "Start docker compose network..."
docker compose -f $TESTNET_CONFIG down -v --remove-orphans &> /dev/null
docker compose -f $TESTNET_CONFIG up -d
+trap "docker compose -f $TESTNET_CONFIG down -v" EXIT INT KILL ERR
+
echo ""
echo "Start testing..."
-TEST_L2_GENESIS=true pnpm hardhat test --grep "Generate Genesis"
-
-docker compose -f $TESTNET_CONFIG down -v
+function waitTestNode {
+ echo "Waiting for test node: $1"
+ # Wait till the test node fully started
+ RETRIES=120
+ i=0
+ until curl \
+ --silent \
+ --fail \
+ --noproxy localhost \
+ -X POST \
+ -H "Content-Type: application/json" \
+ -d '{"jsonrpc":"2.0","id":0,"method":"eth_chainId","params":[]}' \
+ $1
+ do
+ sleep 1
+ if [ $i -eq $RETRIES ]; then
+ echo 'Timed out waiting for test node'
+ exit 1
+ fi
+ ((i=i+1))
+ done
+}
+
+waitTestNode http://localhost:18545
+
+forge test \
+ -vvv \
+ --gas-report \
+ --fork-url http://localhost:18545 \
+ --fork-retry-backoff 120 \
+ --no-storage-caching \
+ --match-path test/genesis/*.g.sol \
+ --block-gas-limit 1000000000
diff --git a/packages/protocol/test/genesis/generate_genesis.test.ts b/packages/protocol/test/genesis/generate_genesis.test.ts
deleted file mode 100644
index 654f33335ef..00000000000
--- a/packages/protocol/test/genesis/generate_genesis.test.ts
+++ /dev/null
@@ -1,468 +0,0 @@
-import { expect } from "chai";
-import * as hre from "hardhat";
-import { txShouldRevertWithCustomError } from "../utils/errors";
-
-const ethers = hre.ethers;
-const action = process.env.TEST_L2_GENESIS ? describe : describe.skip;
-
-action("Generate Genesis", function () {
- let alloc: any = null;
-
- if (process.env.TEST_L2_GENESIS) {
- alloc = require("../../deployments/genesis_alloc.json");
- }
-
- const provider = new hre.ethers.providers.JsonRpcProvider(
- "http://localhost:18545"
- );
-
- const signer = new hre.ethers.Wallet(
- "2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200",
- provider
- );
-
- const testConfig = require("./test_config");
-
- const seedAccounts = testConfig.seedAccounts;
-
- before(async () => {
- let retry = 0;
-
- while (true) {
- try {
- const network = await provider.getNetwork();
- if (network.chainId) break;
- } catch (_) {}
-
- if (++retry > 10) {
- throw new Error("geth initializing timeout");
- }
-
- await sleep(1000);
- }
-
- console.log("geth initialized");
- });
-
- it("contracts should be deployed", async function () {
- for (const address of Object.keys(alloc)) {
- if (
- seedAccounts
- .map((seedAccount: any) => {
- const accountAddress = Object.keys(seedAccount)[0];
- return accountAddress;
- })
- .includes(address)
- ) {
- continue;
- }
- const code: string = await provider.getCode(address);
- const expectCode: string = alloc[address].code;
-
- expect(code.toLowerCase()).to.be.equal(expectCode.toLowerCase());
-
- if (testConfig.contractAddresses[alloc[address].contractName]) {
- expect(address).to.be.equal(
- testConfig.contractAddresses[alloc[address].contractName]
- );
- }
- }
- });
-
- it("premint ETH should be allocated", async function () {
- let etherVaultBalance = hre.ethers.BigNumber.from("2").pow(128).sub(1); // MaxUint128
-
- for (const seedAccount of seedAccounts) {
- const accountAddress = Object.keys(seedAccount)[0];
- const balance = hre.ethers.utils.parseEther(
- `${Object.values(seedAccount)[0]}`
- );
- expect(await provider.getBalance(accountAddress)).to.be.equal(
- balance.toHexString()
- );
-
- etherVaultBalance = etherVaultBalance.sub(balance);
- }
-
- const etherVaultAddress = getContractAlloc("EtherVault").address;
-
- expect(await provider.getBalance(etherVaultAddress)).to.be.equal(
- etherVaultBalance.toHexString()
- );
- });
-
- describe("contracts can be called normally", function () {
- it("AddressManager", async function () {
- const addressManagerAlloc = getContractAlloc("AddressManager");
-
- const addressManager = new hre.ethers.Contract(
- addressManagerAlloc.address,
- require("../../artifacts/contracts/thirdparty/AddressManager.sol/AddressManager.json").abi,
- signer
- );
-
- const owner = await addressManager.owner();
-
- expect(owner).to.be.equal(testConfig.contractOwner);
-
- const bridge = await addressManager.getAddress(
- `${testConfig.chainId}.bridge`
- );
-
- expect(bridge).to.be.equal(getContractAlloc("Bridge").address);
-
- const tokenVault = await addressManager.getAddress(
- `${testConfig.chainId}.token_vault`
- );
-
- expect(tokenVault).to.be.equal(
- getContractAlloc("TokenVault").address
- );
-
- const etherVault = await addressManager.getAddress(
- `${testConfig.chainId}.ether_vault`
- );
-
- expect(etherVault).to.be.equal(
- getContractAlloc("EtherVault").address
- );
-
- const taikoL2 = await addressManager.getAddress(
- `${testConfig.chainId}.taiko`
- );
-
- expect(taikoL2).to.be.equal(getContractAlloc("TaikoL2").address);
-
- const signalService = await addressManager.getAddress(
- `${testConfig.chainId}.signal_service`
- );
-
- expect(signalService).to.be.equal(
- getContractAlloc("SignalService").address
- );
- });
-
- it("LibTxDecoder", async function () {
- const TaikoL2Alloc = getContractAlloc("TaikoL2");
- const TaikoL2 = new hre.ethers.Contract(
- TaikoL2Alloc.address,
- require("../../artifacts/contracts/L2/TaikoL2.sol/TaikoL2.json").abi,
- signer
- );
- const config = await TaikoL2.getConfig();
- const LibTxDecoderAlloc = getContractAlloc("LibTxDecoder");
-
- const LibTxDecoder = new hre.ethers.Contract(
- LibTxDecoderAlloc.address,
- require("../../artifacts/contracts/libs/LibTxDecoder.sol/LibTxDecoder.json").abi,
- signer
- );
-
- const decoded = await LibTxDecoder.callStatic.decodeTxList(
- config.chainId,
- ethers.utils.RLP.encode([])
- );
-
- expect(decoded.items.length).to.be.eql(0);
- });
-
- it("TaikoL2", async function () {
- const TaikoL2Alloc = getContractAlloc("TaikoL2");
-
- const TaikoL2 = new hre.ethers.Contract(
- TaikoL2Alloc.address,
- require("../../artifacts/contracts/L2/TaikoL2.sol/TaikoL2.json").abi,
- signer
- );
-
- let latestL1Height = 1;
- for (let i = 0; i < 300; i++) {
- const tx = await TaikoL2.anchor(
- latestL1Height++,
- ethers.utils.hexlify(ethers.utils.randomBytes(32)),
- { gasLimit: 1000000 }
- );
-
- const receipt = await tx.wait();
-
- expect(receipt.status).to.be.equal(1);
-
- if (i === 299) {
- console.log({
- message: "TaikoL2.anchor gas cost after 256 L2 blocks",
- gasUsed: receipt.gasUsed,
- });
- }
- }
-
- const [bytes, txNums] = await generateMaxSizeInvalidTxList(TaikoL2);
-
- const taikoL2WithGoldenTouchSigner = new hre.ethers.Contract(
- TaikoL2Alloc.address,
- require("../../artifacts/contracts/L2/TaikoL2.sol/TaikoL2.json").abi,
- new hre.ethers.Wallet(
- "92954368afd3caa1f3ce3ead0069c1af414054aefe1ef9aeacc1bf426222ce38",
- provider
- )
- );
-
- const tx = await taikoL2WithGoldenTouchSigner.invalidateBlock(
- bytes,
- 1, // hint: TX_INVALID_SIG
- 0,
- { gasPrice: 0 }
- );
-
- const receipt = await tx.wait();
-
- expect(receipt.status).to.be.equal(1);
-
- console.log({
- message: "TaikoL2.invalidateBlock gas cost after 256 L2 blocks",
- TxListBytes: ethers.utils.arrayify(bytes).length,
- txNums,
- hint: "TX_INVALID_SIG",
- gasUsed: receipt.gasUsed,
- });
-
- const txPromise = (
- await TaikoL2.invalidateBlock(
- bytes,
- 1, // hint: TX_INVALID_SIG
- 0,
- { gasLimit: 500000 }
- )
- ).wait(1);
- await txShouldRevertWithCustomError(
- txPromise,
- provider,
- "L2_INVALID_SENDER()"
- );
- });
-
- it("Bridge", async function () {
- const BridgeAlloc = getContractAlloc("Bridge");
- const Bridge = new hre.ethers.Contract(
- BridgeAlloc.address,
- require("../../artifacts/contracts/bridge/Bridge.sol/Bridge.json").abi,
- signer
- );
-
- const owner = await Bridge.owner();
-
- expect(owner).to.be.equal(testConfig.contractOwner);
-
- const txPromise = (
- await Bridge.processMessage(
- {
- id: 0,
- sender: ethers.Wallet.createRandom().address,
- srcChainId: Math.floor(Math.random() * 1024),
- destChainId: testConfig.chainId,
- owner: ethers.Wallet.createRandom().address,
- to: ethers.Wallet.createRandom().address,
- refundAddress: ethers.constants.AddressZero,
- depositValue: 0,
- callValue: 0,
- processingFee: 0,
- gasLimit: 0,
- data: ethers.utils.randomBytes(1024),
- memo: "",
- },
- ethers.utils.randomBytes(1024),
- {
- gasLimit: 5000000,
- }
- )
- ).wait(1);
-
- await txShouldRevertWithCustomError(
- txPromise,
- provider,
- "B_FORBIDDEN()"
- );
- });
-
- it("TokenVault", async function () {
- const TokenVaultAlloc = getContractAlloc("TokenVault");
- const TokenVault = new hre.ethers.Contract(
- TokenVaultAlloc.address,
- require("../../artifacts/contracts/bridge/TokenVault.sol/TokenVault.json").abi,
- signer
- );
-
- const owner = await TokenVault.owner();
-
- expect(owner).to.be.equal(testConfig.contractOwner);
-
- const addressManager = new hre.ethers.Contract(
- getContractAlloc("AddressManager").address,
- require("../../artifacts/contracts/thirdparty/AddressManager.sol/AddressManager.json").abi,
- signer
- );
-
- await expect(
- addressManager.setAddress(
- "1.token_vault",
- getContractAlloc("TokenVault").address
- )
- ).not.to.be.reverted;
-
- await expect(
- addressManager.setAddress(
- "1.bridge",
- getContractAlloc("Bridge").address
- )
- ).not.to.be.reverted;
-
- await expect(
- TokenVault.sendEther(
- 1,
- ethers.Wallet.createRandom().address,
- 100,
- 0,
- ethers.Wallet.createRandom().address,
- "memo",
- {
- gasLimit: 10000000,
- value: hre.ethers.utils.parseEther("100"),
- }
- )
- ).to.emit(TokenVault, "EtherSent");
- });
-
- it("EtherVault", async function () {
- const EtherVault = new hre.ethers.Contract(
- getContractAlloc("EtherVault").address,
- require("../../artifacts/contracts/bridge/EtherVault.sol/EtherVault.json").abi,
- signer
- );
-
- const owner = await EtherVault.owner();
-
- expect(owner).to.be.equal(testConfig.contractOwner);
-
- expect(
- await EtherVault.isAuthorized(
- getContractAlloc("Bridge").address
- )
- ).to.be.true;
-
- expect(
- await EtherVault.isAuthorized(
- ethers.Wallet.createRandom().address
- )
- ).to.be.false;
- });
-
- it("SignalService", async function () {
- const SignalService = new hre.ethers.Contract(
- getContractAlloc("SignalService").address,
- require("../../artifacts/contracts/signal/SignalService.sol/SignalService.json").abi,
- signer
- );
-
- const owner = await SignalService.owner();
-
- expect(owner).to.be.equal(testConfig.contractOwner);
-
- await expect(
- SignalService.sendSignal(ethers.utils.randomBytes(32))
- ).not.to.reverted;
- });
-
- it("ERC20", async function () {
- const ERC20 = new hre.ethers.Contract(
- getContractAlloc("TestERC20").address,
- require("../../artifacts/contracts/test/thirdparty/TestERC20.sol/TestERC20.json").abi,
- signer
- );
-
- const {
- TOKEN_NAME,
- TOKEN_SYMBOL,
- PREMINT_SEED_ACCOUNT_BALANCE,
- } = require("../../utils/generate_genesis/erc20");
-
- expect(await ERC20.name()).to.be.equal(TOKEN_NAME);
- expect(await ERC20.symbol()).to.be.equal(TOKEN_SYMBOL);
-
- for (const seedAccount of seedAccounts) {
- const accountAddress = Object.keys(seedAccount)[0];
-
- expect(await ERC20.balanceOf(accountAddress)).to.be.equal(
- PREMINT_SEED_ACCOUNT_BALANCE
- );
- }
-
- expect(await ERC20.totalSupply()).to.be.equal(
- seedAccounts.length * PREMINT_SEED_ACCOUNT_BALANCE
- );
-
- await expect(
- ERC20.transfer(ethers.Wallet.createRandom().address, 1)
- ).to.emit(ERC20, "Transfer");
- });
- });
-
- function getContractAlloc(name: string): any {
- for (const address of Object.keys(alloc)) {
- if (alloc[address].contractName === name) {
- return Object.assign(alloc[address], { address });
- }
- }
-
- throw new Error(`contract alloc: ${name} not found`);
- }
-});
-
-async function generateMaxSizeInvalidTxList(TaikoL2: any) {
- const config = await TaikoL2.getConfig();
-
- const chainId = config.chainId;
- const maxTransactionsPerBlock = config.maxTransactionsPerBlock;
- const maxBytesPerTxList = config.maxBytesPerTxList;
-
- const tx = {
- type: 2,
- chainId,
- nonce: Math.ceil(Math.random() * 1024),
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("1024"),
- maxPriorityFeePerGas: Math.ceil(Math.random() * 1024000),
- maxFeePerGas: Math.ceil(Math.random() * 1024000),
- gasLimit: Math.ceil(Math.random() * 1024000),
- accessList: [],
- data: ethers.utils.randomBytes(
- Math.floor(maxBytesPerTxList / maxTransactionsPerBlock)
- ),
- };
-
- const invalidSig = {
- v: 75,
- r: "0xb14e3f5eab11cd2c459b04a91a9db8bd6f5acccfbd830c9693c84f8d21187eef",
- s: "0x5cf4b3b2b3957e7016366d180493c2c226ea8ad12aed7faddbc0ce3a6789256d",
- };
-
- const txs = new Array(maxTransactionsPerBlock).fill(tx);
-
- let txListBytes = ethers.utils.RLP.encode(
- txs.map((tx) => ethers.utils.serializeTransaction(tx, invalidSig))
- );
-
- while (ethers.utils.arrayify(txListBytes).length > maxBytesPerTxList) {
- txs[0] = Object.assign(txs[0], { data: txs[0].data.slice(10) });
-
- txListBytes = ethers.utils.RLP.encode(
- txs.map((tx) => ethers.utils.serializeTransaction(tx, invalidSig))
- );
- }
-
- return [txListBytes, txs.length];
-}
-
-function sleep(ms: number) {
- return new Promise((resolve) => {
- setTimeout(resolve, ms);
- });
-}
diff --git a/packages/protocol/test/genesis/test_config.json b/packages/protocol/test/genesis/test_config.json
index 728688ddf02..9c2a914f184 100644
--- a/packages/protocol/test/genesis/test_config.json
+++ b/packages/protocol/test/genesis/test_config.json
@@ -1,78 +1,36 @@
{
- "contractOwner": "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39",
+ "contractOwner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"chainId": 167,
"seedAccounts": [
{
- "0xDf08F82De32B8d460adbE8D72043E3a7e25A3B39": 1024
- },
- {
- "0x4Ec242468812B6fFC8Be8FF423Af7bd23108d991": 1024
- },
- {
- "0x513b9b8bffd6b79056f5250b04b0e863814d6dd6": 1024
- },
- {
- "0x79b9f64744c98cd8cc20adb79b6a297e964254cc": 1024
- },
- {
- "0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199": 1024
- },
- {
- "0xdD2FD4581271e230360230F9337D5c0430Bf44C0": 1024
- },
- {
- "0xbDA5747bFD65F08deb54cb465eB87D40e51B197E": 1024
- },
- {
- "0x2546BcD3c84621e976D8185a91A922aE77ECEc30": 1024
- },
- {
- "0xcd3B766CCDd6AE721141F452C550Ca635964ce71": 1024
- },
- {
- "0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097": 1024
- },
- {
- "0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec": 1024
- },
- {
- "0xFABB0ac9d68B0B445fB7357272Ff202C5651694a": 1024
- },
- {
- "0x71bE63f3384f5fb98995898A86B02Fb2426c5788": 1024
- },
- {
- "0xBcd4042DE499D14e55001CcbB24a551F3b954096": 1024
+ "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266": 1024
},
{
- "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720": 1024
+ "0x70997970C51812dc3A010C7d01b50e0d17dc79C8": 1024
},
{
- "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f": 1024
+ "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC": 1024
},
{
- "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955": 1024
+ "0x90F79bf6EB2c4f870365E785982E1f101E93b906": 1024
},
{
- "0x976EA74026E726554dB657fA54763abd0C3a0aa9": 1024
+ "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65": 1024
},
{
"0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc": 1024
},
{
- "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65": 1024
- },
- {
- "0x90F79bf6EB2c4f870365E785982E1f101E93b906": 1024
+ "0x976EA74026E726554dB657fA54763abd0C3a0aa9": 1024
},
{
- "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC": 1024
+ "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955": 1024
},
{
- "0x70997970C51812dc3A010C7d01b50e0d17dc79C8": 1024
+ "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f": 1024
},
{
- "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266": 1024
+ "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720": 1024
}
],
"contractAddresses": {
@@ -80,9 +38,15 @@
"TokenVault": "0x0000777700000000000000000000000000000002",
"EtherVault": "0x0000777700000000000000000000000000000003",
"Bridge": "0x0000777700000000000000000000000000000004",
- "TestERC20": "0x0000777700000000000000000000000000000005",
+ "RegularERC20": "0x0000777700000000000000000000000000000005",
"AddressManager": "0x0000777700000000000000000000000000000006",
"SignalService": "0x0000777700000000000000000000000000000007"
},
+ "param1559": {
+ "yscale": "358298803609133338137582400989",
+ "xscale": "1488514844",
+ "gasIssuedPerSecond": "12500000",
+ "gasExcess": "45450000000"
+ },
"predeployERC20": true
}
diff --git a/packages/protocol/test/libs/Lib1559Math.test.ts b/packages/protocol/test/libs/Lib1559Math.test.ts
deleted file mode 100644
index 29c949fee93..00000000000
--- a/packages/protocol/test/libs/Lib1559Math.test.ts
+++ /dev/null
@@ -1,119 +0,0 @@
-import { expect } from "chai";
-// import * as log from "../tasks/log"
-
-const hre = require("hardhat");
-const ethers = hre.ethers;
-
-describe("Lib1559Math", function () {
- let Lib1559Math: any;
- before(async function () {
- Lib1559Math = await (
- await ethers.getContractFactory("TestLib1559Math")
- ).deploy();
- });
-
- describe("Testing adjustTarget", function () {
- it("testing adjustTarget works as docs intend", async function () {
- // 15000000 * ((9) * 15000000 + 10000000) == 2.175E15
- // divide by:
- // (10 * 15000000) == 1.5E8
- // == 1.45E7
- const initTarget = 15000000;
- const prevMeasurement = 10000000;
- const baseTarget = 15000000;
- const adjustFactor = 10;
-
- const result = await Lib1559Math.adjustTarget(
- initTarget,
- prevMeasurement,
- baseTarget,
- adjustFactor
- );
- expect(result).to.equal(14500000);
- });
-
- it("testing adjustTarget iterative is increasing", async function () {
- // (since prevMeasured > T, nextTarget > prevTarget) as described in Lib1559Math.sol
- const initTarget = 10000000;
- const prevMeasured = 20000000;
- const baseTarget = 15000000;
- const adjustFactor = 10;
-
- let target = await Lib1559Math.adjustTarget(
- initTarget,
- prevMeasured,
- baseTarget,
- adjustFactor
- );
- const arr: any[] = [];
- for (let index = 0; index < 10; index++) {
- target = await Lib1559Math.adjustTarget(
- target,
- prevMeasured,
- baseTarget,
- adjustFactor
- );
- arr.push(target);
- // log.info(target)
- }
- // eslint-disable-next-line eqeqeq
- const isAscending = arr.every((x, i) => {
- return i === 0 || x >= arr[i - 1];
- });
- expect(isAscending).to.equal(true);
- });
- });
-
- describe("Testing adjustTargetReverse", function () {
- it("testing adjustTargetReverse works as docs intend", async function () {
- // (15000000 * 10 * 15000000) == 2.25E15
- // divide by:
- // ((9) * 15000000 + 10000000) == 1.45E8
- // == 15,517,241.379310345
- // == 15517241
- const initTarget = 15000000;
- const prevMeasurement = 10000000;
- const baseTarget = 15000000;
- const adjustFactor = 10;
-
- const result = await Lib1559Math.adjustTargetReverse(
- initTarget,
- prevMeasurement,
- baseTarget,
- adjustFactor
- );
- expect(result).to.equal(15517241);
- });
-
- it("testing adjustTargetReverse iterative is decreasing", async function () {
- // (since prevTarget >= T, nextTarget < prevTarget) as described in Lib1559Math.sol
- const initTarget = 15000000;
- const prevMeasurement = 20000000;
- const baseTarget = 15000000;
- const adjustFactor = 10;
-
- let target = await Lib1559Math.adjustTargetReverse(
- initTarget,
- prevMeasurement,
- baseTarget,
- adjustFactor
- );
- const arr: any[] = [];
- for (let index = 0; index < 10; index++) {
- target = await Lib1559Math.adjustTargetReverse(
- target,
- prevMeasurement,
- baseTarget,
- adjustFactor
- );
- arr.push(target);
- // log.info(target)
- }
- // eslint-disable-next-line eqeqeq
- const isDescending = arr.every((x, i) => {
- return i === 0 || x <= arr[i - 1];
- });
- expect(isDescending).to.equal(true);
- });
- });
-});
diff --git a/packages/protocol/test/libs/LibAnchorSignature.test.ts b/packages/protocol/test/libs/LibAnchorSignature.test.ts
deleted file mode 100644
index ae779a46ad3..00000000000
--- a/packages/protocol/test/libs/LibAnchorSignature.test.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { expect } from "chai";
-import { UnsignedTransaction } from "ethers";
-import { ethers } from "hardhat";
-
-describe("LibAnchorSignature", function () {
- const unsignedLegacyTx: UnsignedTransaction = {
- type: 0,
- chainId: Math.floor(Math.random() * 1024),
- nonce: Math.floor(Math.random() * 1024),
- gasPrice: randomBigInt(),
- gasLimit: randomBigInt(),
- to: ethers.Wallet.createRandom().address,
- value: randomBigInt(),
- data: ethers.utils.randomBytes(32),
- };
-
- it("should calculate correct signature values", async function () {
- const libAnchorSignature: any = await (
- await ethers.getContractFactory("TestLibAnchorSignature")
- ).deploy();
-
- const validKs = [1, 2];
-
- for (const k of validKs) {
- const hash = ethers.utils.keccak256(
- ethers.utils.serializeTransaction(unsignedLegacyTx)
- );
-
- const [v, r, s] = await libAnchorSignature.signTransaction(hash, k);
-
- const [addr] = await libAnchorSignature.goldenTouchAddress();
- expect(
- await libAnchorSignature.recover(
- hash,
- v + 27,
- ethers.utils.hexZeroPad(r, 32),
- ethers.utils.hexZeroPad(s, 32)
- )
- ).to.be.equal(addr);
- }
- });
-
- function randomBigInt() {
- return ethers.BigNumber.from(ethers.utils.randomBytes(32));
- }
-});
diff --git a/packages/protocol/test/libs/LibBlockHeader.test.ts b/packages/protocol/test/libs/LibBlockHeader.test.ts
deleted file mode 100644
index ba37b402a56..00000000000
--- a/packages/protocol/test/libs/LibBlockHeader.test.ts
+++ /dev/null
@@ -1,190 +0,0 @@
-import { expect } from "chai";
-import * as log from "../../tasks/log";
-const hre = require("hardhat");
-const ethers = hre.ethers;
-const EBN = ethers.BigNumber;
-
-describe("LibBlockHeader tests", function () {
- let libBlockHeader: any;
-
- before(async function () {
- libBlockHeader = await (
- await ethers.getContractFactory("TestLibBlockHeader")
- ).deploy();
- });
-
- it("can calculate block header hash correctly", async function () {
- const blockHash =
- "0xc0528bca43a7316776dddb92380cc3a5d9e717bc948ce71f6f1605d7281a4fe8";
- // block 0xc0528bca43a7316776dddb92380cc3a5d9e717bc948ce71f6f1605d7281a4fe8 on Ethereum mainnet
-
- const parentHash =
- "0xa7881266ca0a344c43cb24175d9dbd243b58d45d6ae6ad71310a273a3d1d3afb";
-
- const l2BlockHeader: any = {
- parentHash: parentHash,
- ommersHash:
- "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- beneficiary: "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
- stateRoot:
- "0xc0dcf937b3f6136dd70a1ad11cc57b040fd410f3c49a5146f20c732895a3cc21",
- transactionsRoot:
- "0x7273ade6b6ed865a9975ac281da23b90b141a8b607d874d2cd95e65e81336f8e",
- receiptsRoot:
- "0x74bb61e381e9238a08b169580f3cbf9b8b79d7d5ee708d3e286103eb291dfd08",
- logsBloom:
- "112d60abc05141f1302248e0f4329627f002380f1413820692911863e7d0871261aa07e90cc01a10c3ce589153570dc2db27b8783aa52bc19a5a4a836722e813190401b4214c3908cb8b468b510c3fe482603b00ca694c806206bf099279919c334541094bd2e085210373c0b064083242d727790d2eecdb2e0b90353b66461050447626366328f0965602e8a9802d25740ad4a33162142b08a1b15292952de423fac45d235622bb0ef3b2d2d4c21690d280a0b948a8a3012136542c1c4d0955a501a022e1a1a4582220d1ae50ba475d88ce0310721a9076702d29a27283e68c2278b93a1c60d8f812069c250042cc3180a8fd54f034a2da9a03098c32b03445"
- .match(/.{1,64}/g)!
- .map((s) => "0x" + s),
- difficulty: EBN.from("0x1aedf59a4bc180"),
- height: EBN.from("0xc5ad78"),
- gasLimit: EBN.from("0xe4e1c0"),
- gasUsed: EBN.from("0xe4a463"),
- timestamp: EBN.from("0x6109c56e"),
- extraData: "0x65746865726d696e652d75732d7765737431",
- mixHash:
- "0xf5ba25df1e92e89a09e0b32063b81795f631100801158f5fa733f2ba26843bd0",
- nonce: EBN.from("0x738b7e38476abe98"),
- baseFeePerGas: 0,
- withdrawalsRoot: ethers.constants.HashZero,
- };
-
- const headerComputed = await libBlockHeader.hashBlockHeader(
- l2BlockHeader
- );
- log.debug("headerComputed:", headerComputed);
-
- expect(headerComputed).to.equal(blockHash);
- });
-
- it("can hash block header which contains hash with leading zeros correctly", async function () {
- const blockHash =
- "0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177";
- // block 0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177 on Rinkeby testnet
- // https://rinkeby.etherscan.io/block/0
-
- const blockHeader: any = {
- parentHash: ethers.constants.HashZero,
- ommersHash:
- "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- beneficiary: ethers.constants.AddressZero,
- stateRoot:
- "0x53580584816f617295ea26c0e17641e0120cab2f0a8ffb53a866fd53aa8e8c2d",
- transactionsRoot:
- "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
- receiptsRoot:
- "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
- logsBloom:
- "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- .match(/.{1,64}/g)!
- .map((s) => "0x" + s),
- difficulty: EBN.from("0x1"),
- height: EBN.from("0x0"),
- gasLimit: EBN.from("0x47b760"),
- gasUsed: EBN.from("0x0"),
- timestamp: EBN.from("0x58ee40ba"),
- extraData:
- "0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- mixHash: ethers.constants.HashZero,
- nonce: EBN.from("0x0"),
- baseFeePerGas: 0,
- withdrawalsRoot: ethers.constants.HashZero,
- };
-
- const headerComputed = await libBlockHeader.hashBlockHeader(
- blockHeader
- );
-
- expect(headerComputed).to.equal(blockHash);
- });
-
- it("can calculate EIP-1559", async function () {
- const blockHash =
- "0xb39b05b327d23ca29286fa7e2331d8269cd257cf10a8310b40ebaddf411f191e";
- // block 0xb39b05b327d23ca29286fa7e2331d8269cd257cf10a8310b40ebaddf411f191e on our L1 testnet
-
- const parentHash =
- "0xaafe1871246cecd3ff9b0025f731f227bad9f63525f46e83a6f140b5bd6bca00";
-
- const l2BlockHeader: any = {
- parentHash: parentHash,
- ommersHash:
- "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- beneficiary: ethers.constants.AddressZero,
- stateRoot:
- "0x68a10652e4fc8882bef0ff34ffad17e881cf5eb373dc216d5764b55880df4372",
- transactionsRoot:
- "0x916f8cf89455136b6f8d091dc95ecc601b1956a936636aa38ec164a1dad15072",
- receiptsRoot:
- "0x7c82f5a7cc81af5227f325c42cf4cd742ff27da40109962be91903d702625273",
- logsBloom:
- "00400008000000000000000000000000000000000000000000000010000000000000000000000000000000040000000000000000000000010000000000200100008000000000000000100008002100200000000080200000000400000000000000000000100000000800000000080000000000000000000000000010000104004000000200000000000000000002000000000000000000000000000040000000020000000000000200000000000000000000000000000000418000000000008000000002800000100000000000000000000000400000100000000000000000000010000000004000000000000000000000000000000000000000000000000000"
- .match(/.{1,64}/g)!
- .map((s) => "0x" + s),
- difficulty: EBN.from("0x2"),
- height: EBN.from("0x86"),
- gasLimit: EBN.from("0xade80c"),
- gasUsed: EBN.from("0x430a3"),
- timestamp: EBN.from("0x63637091"),
- extraData:
- "0xd883010b00846765746888676f312e31382e37856c696e757800000000000000497f0b2bfaa230713df47bc5340b8e325171c8e9d1aeb9b26c930b1ce5013b9955046e7a8af532b38a7344a152c5ac816e115ff8c8d65306cfe784154a221ed600",
- mixHash:
- "0x0000000000000000000000000000000000000000000000000000000000000000",
- nonce: "0x0",
- baseFeePerGas: EBN.from("0x37"),
- withdrawalsRoot: ethers.constants.HashZero,
- };
-
- const headerComputed = await libBlockHeader.hashBlockHeader(
- l2BlockHeader
- );
- log.debug("headerComputed:", headerComputed);
-
- expect(headerComputed).to.equal(blockHash);
- });
-
- it("can hash post Shanghai fork blocks", async function () {
- const blockHash =
- "0x0fb703aea6875ca7e78a73552064cf96a0985879c3b1fa27c846d41b1aa4e98e";
- // block 0x0fb703aea6875ca7e78a73552064cf96a0985879c3b1fa27c846d41b1aa4e98e on Sepolia.
-
- const parentHash =
- "0xe122a2cc28199703e3ed6bee61875dc1703aa97c3187d8df507f1f789e363977";
-
- const l2BlockHeader: any = {
- parentHash: parentHash,
- ommersHash:
- "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- beneficiary: "0x3826539cbd8d68dcf119e80b994557b4278cec9f",
- stateRoot:
- "0x2525478f8cd349640e6d1780334e63c56fa0bfb44d89fbd75cb3fcf82d38521c",
- transactionsRoot:
- "0x97ea65e77b43073c372976694916209b916caa0caef1445d53e9757b9824bdef",
- receiptsRoot:
- "0xa8b034a217a5d4d4615ee0ed28c4d5275b93888c01c65a98fcdd1aeda6903e1c",
- logsBloom:
- "00000004000000000000000000100000000100000010001000000000000000000000880000000000000400001100000000000000000000000000000010300000000000000000000000000008000000000000200000000000000000008080000000002000020040000200000400000900000000000000000010000014000000000020024008000000000800000000900000211001000040002000000000000810021000000040400000102000000000040400002000000000000008000000001000008002300000000000000020000008004000000001000110000001000028000014440800010000000000000000000004210000000000400000000000000000"
- .match(/.{1,64}/g)!
- .map((s) => "0x" + s),
- difficulty: EBN.from("0x0"),
- height: EBN.from("0x2e93c3"),
- gasLimit: EBN.from("0x1c9c380"),
- gasUsed: EBN.from("0x44dd61"),
- timestamp: EBN.from("0x64097a78"),
- extraData: "0x",
- mixHash:
- "0xa3fedc5083947ffb01157d6a89aa00f0592e14b94da8768ac0e6ded0aa490eb8",
- nonce: "0x0000000000000000",
- baseFeePerGas: EBN.from("0x7"),
- withdrawalsRoot:
- "0x0975bba9482fab7591735f9dc8c344078d27abac007086d5dd62ee3a21e3ed29",
- };
-
- const headerComputed = await libBlockHeader.hashBlockHeader(
- l2BlockHeader
- );
- log.debug("headerComputed:", headerComputed);
-
- expect(headerComputed).to.equal(blockHash);
- });
-});
diff --git a/packages/protocol/test/libs/LibReceiptDecoder.test.ts b/packages/protocol/test/libs/LibReceiptDecoder.test.ts
deleted file mode 100644
index 137df93683f..00000000000
--- a/packages/protocol/test/libs/LibReceiptDecoder.test.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-import { expect } from "chai";
-// eslint-disable-next-line import/no-named-default
-import { default as hre, ethers } from "hardhat";
-
-describe("integration:LibReceiptDecoder", function () {
- let libReceiptDecoder: any;
-
- before(async function () {
- if (hre.network.name === "hardhat") {
- throw new Error(
- `hardhat: debug_getRawReceipts - Method not supported`
- );
- }
-
- const baseLibReceiptDecoder = await (
- await ethers.getContractFactory("LibReceiptDecoder")
- ).deploy();
-
- libReceiptDecoder = await (
- await ethers.getContractFactory("TestLibReceiptDecoder", {
- libraries: {
- LibReceiptDecoder: baseLibReceiptDecoder.address,
- },
- })
- ).deploy();
- });
-
- it("should decode RLP encoded transaction receipts", async function () {
- for (const txType of [0, 1, 2]) {
- const { maxFeePerGas, gasPrice } =
- await hre.ethers.provider.getFeeData();
-
- let txOptions = {};
-
- if (txType === 0) txOptions = { gasPrice };
- else if (txType === 1) txOptions = { gasPrice, accessList: [] };
- else txOptions = { maxFeePerGas };
-
- const tx = await libReceiptDecoder.emitTestEvent(
- ethers.BigNumber.from(ethers.utils.randomBytes(32)),
- ethers.utils.randomBytes(32),
- txOptions
- );
-
- expect(tx.type).to.be.equal(txType);
-
- const expectedReceipt = await tx.wait();
-
- // Retrieves the RLP-encoded raw receipts from node
- const [encodedReceipt] = await hre.ethers.provider.send(
- "debug_getRawReceipts",
- [tx.blockHash]
- );
-
- const receipt = await libReceiptDecoder.decodeReceipt(
- encodedReceipt
- );
-
- // Status
- expect(receipt.status).to.be.equal(expectedReceipt.status);
- // CumulativeGasUsed
- expect(receipt.cumulativeGasUsed).to.be.equal(
- expectedReceipt.cumulativeGasUsed
- );
- // LogsBloom
- expect(
- `0x${receipt.logsBloom.map((s: any) => s.slice(2)).join("")}`
- ).to.be.equal(expectedReceipt.logsBloom);
- // Logs
- expect(receipt.logs.length).to.be.equal(
- expectedReceipt.logs.length
- );
- for (let i = 0; i < receipt.logs.length; i++) {
- const log = receipt.logs[i];
- const expectedLog = expectedReceipt.logs[i];
-
- expect(log.contractAddress).to.be.equal(expectedLog.address);
- expect(log.topics).to.be.eql(expectedLog.topics);
- expect(log.data).to.be.equal(expectedLog.data);
- }
- }
- });
-});
diff --git a/packages/protocol/test/libs/LibTrieProof.test.ts b/packages/protocol/test/libs/LibTrieProof.test.ts
deleted file mode 100644
index f42c74be528..00000000000
--- a/packages/protocol/test/libs/LibTrieProof.test.ts
+++ /dev/null
@@ -1,159 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import RLP from "rlp";
-import { sendMessage } from "../utils/bridge";
-import { Message } from "../utils/message";
-import { EthGetProofResponse } from "../utils/rpc";
-import { deploySignalService } from "../utils/signal";
-
-// TODO(roger): this test shall not use any file in contracts/bridge/*.sol
-// Instead, it should use the `writeStorageAt` function to manipulate storage
-// values then verify the proof.
-describe("integration:LibTrieProof", function () {
- async function deployLibTrieProofFixture() {
- const libTrieProof = await (
- await ethers.getContractFactory("LibTrieProof")
- ).deploy();
-
- const testLibTrieProof = await (
- await ethers.getContractFactory("TestLibTrieProof", {
- libraries: {
- LibTrieProof: libTrieProof.address,
- },
- })
- ).deploy();
-
- const addressManager = await (
- await ethers.getContractFactory("AddressManager")
- ).deploy();
- await addressManager.init();
-
- const { chainId } = await ethers.provider.getNetwork();
-
- const enabledDestChainId = chainId + 1;
-
- await addressManager.setAddress(
- `${chainId}.ether_vault`,
- "0xEA3dD11036f668F08940E13e3bcB097C93b09E07"
- );
-
- await addressManager.setAddress(
- `${enabledDestChainId}.bridge`,
- "0x0000000000000000000000000000000000000001" // dummy address so chain is "enabled"
- );
-
- const [owner] = await ethers.getSigners();
-
- const { signalService } = await deploySignalService(
- owner,
- addressManager,
- chainId
- );
-
- const BridgeFactory = await ethers.getContractFactory("Bridge", {
- libraries: {
- LibTrieProof: testLibTrieProof.address,
- },
- });
-
- const bridge = await BridgeFactory.deploy();
-
- await bridge.init(addressManager.address);
-
- return {
- owner,
- testLibTrieProof,
- signalService,
- bridge,
- enabledDestChainId,
- };
- }
- describe("verify()", function () {
- it("verifies", async function () {
- const {
- owner,
- testLibTrieProof,
- signalService,
- bridge,
- enabledDestChainId,
- } = await deployLibTrieProofFixture();
-
- const { chainId } = await ethers.provider.getNetwork();
- const srcChainId = chainId;
-
- const message: Message = {
- id: 1,
- sender: owner.address,
- srcChainId: srcChainId,
- destChainId: enabledDestChainId,
- owner: owner.address,
- to: owner.address,
- refundAddress: owner.address,
- depositValue: 1000,
- callValue: 1000,
- processingFee: 1000,
- gasLimit: 10000,
- data: ethers.constants.HashZero,
- memo: "",
- };
-
- const { tx, msgHash } = await sendMessage(bridge, message);
-
- await tx.wait();
-
- expect(msgHash).not.to.be.eq(ethers.constants.HashZero);
-
- const messageStatus = await bridge.getMessageStatus(msgHash);
-
- expect(messageStatus).to.be.eq(0);
-
- const slot = await signalService.getSignalSlot(
- bridge.address,
- msgHash
- );
-
- // use this instead of ethers.provider.getBlock() because it doesnt have stateRoot
- // in the response
- const block: { stateRoot: string; number: string; hash: string } =
- await ethers.provider.send("eth_getBlockByNumber", [
- "latest",
- false,
- ]);
-
- // get storageValue for the slot
- const storageValue = await ethers.provider.getStorageAt(
- signalService.address,
- slot,
- block.number
- );
- // make sure it equals 1 so our proof will pass
- expect(storageValue).to.be.eq(
- "0x0000000000000000000000000000000000000000000000000000000000000001"
- );
- // rpc call to get the merkle proof what value is at slot on the bridge contract
- const proof: EthGetProofResponse = await ethers.provider.send(
- "eth_getProof",
- [signalService.address, [slot], block.hash]
- );
-
- const stateRoot = block.stateRoot;
-
- // RLP encode the proof together for LibTrieProof to decode
- const encodedProof = ethers.utils.defaultAbiCoder.encode(
- ["bytes", "bytes"],
- [
- RLP.encode(proof.accountProof),
- RLP.encode(proof.storageProof[0].proof),
- ]
- );
- // proof verifies the storageValue at slot is 1
- await testLibTrieProof.verify(
- stateRoot,
- signalService.address,
- slot,
- "0x0000000000000000000000000000000000000000000000000000000000000001",
- encodedProof
- );
- });
- });
-});
diff --git a/packages/protocol/test/libs/LibTxDecoder.test.ts b/packages/protocol/test/libs/LibTxDecoder.test.ts
deleted file mode 100644
index 2e70cf3f3ac..00000000000
--- a/packages/protocol/test/libs/LibTxDecoder.test.ts
+++ /dev/null
@@ -1,220 +0,0 @@
-import { expect } from "chai";
-import { UnsignedTransaction } from "ethers";
-import { ethers } from "hardhat";
-import * as log from "../../tasks/log";
-
-describe("LibTxDecoder", function () {
- let rlpWriter: any;
- let libTxDecoder: any;
- let signer0: any;
-
- const chainId = 167;
-
- before(async function () {
- rlpWriter = await (
- await ethers.getContractFactory("TestLibRLPWriter")
- ).deploy();
- libTxDecoder = await (
- await ethers.getContractFactory("LibTxDecoder")
- ).deploy();
-
- signer0 = (await ethers.getSigners())[0];
- });
-
- async function rlpEncodeTxList(txList: string[]) {
- const rlpEncodedBytes = [];
- for (const tx of txList) {
- const txRlp = await rlpWriter.writeBytes(tx);
- rlpEncodedBytes.push(txRlp);
- }
- const txListBytes = await rlpWriter.writeList(rlpEncodedBytes);
- return txListBytes;
- }
-
- describe("decodeTxList", function () {
- it("should not revert if tx list is empty", async function () {
- const txList: string[] = [];
- const txListBytes = await rlpEncodeTxList(txList);
-
- let decoded = await libTxDecoder.callStatic.decodeTxList(
- chainId,
- txListBytes
- );
-
- expect(decoded.items.length).to.be.eql(0);
- decoded = await libTxDecoder.callStatic.decodeTxList(chainId, []);
- expect(decoded.items.length).to.be.eql(0);
- });
-
- it("should revert with random bytes", async function () {
- const randomBytes = ethers.utils.hexlify(
- ethers.utils.randomBytes(73)
- );
-
- await expect(
- libTxDecoder.callStatic.decodeTxList(chainId, randomBytes)
- ).to.be.reverted;
- });
-
- it("can decode txList with legacy transaction", async function () {
- const txLegacy: UnsignedTransaction = {
- nonce: 1,
- chainId: chainId,
- gasPrice: 11e9,
- gasLimit: 123456,
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("1.23"),
- data: ethers.utils.randomBytes(10),
- };
-
- const signature = await signer0.signMessage("abc123");
- // log.debug('signature: ', signature)
-
- const txLegacyBytes = ethers.utils.serializeTransaction(
- txLegacy,
- signature
- );
- log.debug("txLegacyBytes: ", txLegacyBytes);
- const txListBytes = await rlpEncodeTxList([txLegacyBytes]);
- log.debug("txListBytes: ", txListBytes);
-
- const decodedTxList = await libTxDecoder.callStatic.decodeTxList(
- chainId,
- txListBytes
- );
- // log.debug('decodedT: ', decodedTxList)
- expect(decodedTxList.items.length).to.equal(1);
- const decodedTx1 = decodedTxList.items[0];
- expect(decodedTx1.gasLimit.toNumber()).to.equal(txLegacy.gasLimit);
- });
-
- it("can decode txList with 2930 transaction", async function () {
- const tx2930: UnsignedTransaction = {
- type: 1,
- chainId: 12345,
- nonce: 123,
- gasPrice: 11e9,
- gasLimit: 123,
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("10.23"),
- accessList: [],
- data: ethers.utils.randomBytes(20),
- };
-
- const signature = await signer0.signMessage(
- tx2930.data?.toString()
- );
- log.debug("signature: ", signature);
-
- const txBytes = ethers.utils.serializeTransaction(
- tx2930,
- signature
- );
- log.debug("txBytes: ", txBytes);
- const txListBytes = await rlpEncodeTxList([txBytes]);
- log.debug("txListBytes: ", txListBytes);
-
- const decodedTxList = await libTxDecoder.callStatic.decodeTxList(
- chainId,
- txListBytes
- );
- expect(decodedTxList.items.length).to.equal(1);
- const decodedTx1 = decodedTxList.items[0];
- expect(decodedTx1.gasLimit.toNumber()).to.equal(tx2930.gasLimit);
- });
-
- it("can decode txList with 1559 transaction", async function () {
- const tx1559: UnsignedTransaction = {
- type: 2,
- chainId: 12345,
- nonce: 123,
- maxPriorityFeePerGas: 2e9,
- maxFeePerGas: 22e9,
- gasLimit: 1234567,
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("10.123"),
- accessList: [],
- data: ethers.utils.randomBytes(20),
- };
-
- const signature = await signer0.signMessage(
- tx1559.data?.toString()
- );
- log.debug("signature: ", signature);
-
- const txBytes = ethers.utils.serializeTransaction(
- tx1559,
- signature
- );
- log.debug("txBytes: ", txBytes);
- const txListBytes = await rlpEncodeTxList([txBytes]);
- log.debug("txListBytes: ", txListBytes);
-
- const decodedTxList = await libTxDecoder.callStatic.decodeTxList(
- chainId,
- txListBytes
- );
- expect(decodedTxList.items.length).to.equal(1);
- const decodedTx1 = decodedTxList.items[0];
- expect(decodedTx1.gasLimit.toNumber()).to.equal(tx1559.gasLimit);
- });
- });
-
- it("can decode txList with multiple types", async function () {
- const signature = await signer0.signMessage("123456abcdef");
- const txLegacy: UnsignedTransaction = {
- nonce: 1,
- chainId: chainId,
- gasPrice: 11e9,
- gasLimit: 123456,
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("1.23"),
- data: ethers.utils.randomBytes(10),
- };
-
- const tx2930: UnsignedTransaction = {
- type: 1,
- chainId: 12345,
- nonce: 123,
- gasPrice: 11e9,
- gasLimit: 123,
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("10.23"),
- accessList: [],
- data: ethers.utils.randomBytes(20),
- };
-
- const tx1559: UnsignedTransaction = {
- type: 2,
- chainId: 12345,
- nonce: 123,
- maxPriorityFeePerGas: 2e9,
- maxFeePerGas: 22e9,
- gasLimit: 1234567,
- to: ethers.Wallet.createRandom().address,
- value: ethers.utils.parseEther("10.123"),
- accessList: [],
- data: ethers.utils.randomBytes(20),
- };
-
- const txObjArr = [txLegacy, tx2930, tx1559];
- const txRawBytesArr = [];
- for (const txObj of txObjArr) {
- const txBytes = ethers.utils.serializeTransaction(txObj, signature);
- txRawBytesArr.push(txBytes);
- }
- const txListBytes = await rlpEncodeTxList(txRawBytesArr);
-
- const decodedTxList = await libTxDecoder.callStatic.decodeTxList(
- chainId,
- txListBytes
- );
- // log.debug('decodedT: ', decodedTxList)
- expect(decodedTxList.items.length).to.equal(txObjArr.length);
- for (let i = 0; i < txObjArr.length; i++) {
- const txObj = txObjArr[i];
- const decodedTx = decodedTxList.items[i];
- expect(decodedTx.gasLimit.toNumber()).to.equal(txObj.gasLimit);
- }
- });
-});
diff --git a/packages/protocol/test/libs/LibTxUtils.test.ts b/packages/protocol/test/libs/LibTxUtils.test.ts
deleted file mode 100644
index 88285dd5c01..00000000000
--- a/packages/protocol/test/libs/LibTxUtils.test.ts
+++ /dev/null
@@ -1,200 +0,0 @@
-import { expect } from "chai";
-import { UnsignedTransaction } from "ethers";
-import { ethers } from "hardhat";
-
-describe("LibTxUtils", function () {
- let libTxUtils: any;
- let libRLPWriter: any;
- let libRLPReader: any;
- let testUnsignedTxs: Array;
- const chainId = 167;
-
- const signingKey = new ethers.utils.SigningKey(
- ethers.utils.randomBytes(32)
- );
- const signerAddress = new ethers.Wallet(signingKey.privateKey).address;
-
- before(async function () {
- libTxUtils = await (
- await ethers.getContractFactory("TestLibTxUtils")
- ).deploy();
-
- libRLPReader = await (
- await ethers.getContractFactory("TestLibRLPReader")
- ).deploy();
-
- libRLPWriter = await (
- await ethers.getContractFactory("TestLibRLPWriter")
- ).deploy();
-
- const unsignedLegacyTx: UnsignedTransaction = {
- type: 0,
- // if chainId is defined, ether.js will automatically use EIP-155
- // signature
- chainId,
- nonce: Math.floor(Math.random() * 1024),
- gasPrice: randomBigInt(),
- gasLimit: randomBigInt(),
- to: ethers.Wallet.createRandom().address,
- value: randomBigInt(),
- data: ethers.utils.randomBytes(32),
- };
-
- const unsigned2930Tx: UnsignedTransaction = {
- type: 1,
- chainId,
- nonce: Math.floor(Math.random() * 1024),
- gasPrice: randomBigInt(),
- gasLimit: randomBigInt(),
- to: ethers.Wallet.createRandom().address,
- value: randomBigInt(),
- accessList: [
- [
- ethers.Wallet.createRandom().address,
- [ethers.utils.hexlify(ethers.utils.randomBytes(32))],
- ],
- ],
- data: ethers.utils.randomBytes(32),
- };
-
- const unsigned1559Tx: UnsignedTransaction = {
- type: 2,
- chainId,
- nonce: Math.floor(Math.random() * 1024),
- maxPriorityFeePerGas: randomBigInt(),
- maxFeePerGas: randomBigInt(),
- gasLimit: randomBigInt(),
- to: ethers.Wallet.createRandom().address,
- value: randomBigInt(),
- accessList: [
- [
- ethers.Wallet.createRandom().address,
- [ethers.utils.hexlify(ethers.utils.randomBytes(32))],
- ],
- ],
- data: ethers.utils.randomBytes(32),
- };
-
- testUnsignedTxs = [unsignedLegacyTx, unsigned2930Tx, unsigned1559Tx];
- });
-
- it("should hash the unsigned tx payloads correctly", async function () {
- for (const unsignedTx of testUnsignedTxs) {
- const expectedHash = ethers.utils.keccak256(
- ethers.utils.serializeTransaction(unsignedTx)
- );
-
- const signature = signingKey.signDigest(expectedHash);
-
- const hash = await libTxUtils.hashUnsignedTx(
- chainId,
-
- {
- txType: unsignedTx.type,
- destination: unsignedTx.to,
- data: unsignedTx.data,
- gasLimit: unsignedTx.gasLimit,
- v: signature.v,
- r: signature.r,
- s: signature.s,
- txData: ethers.utils.serializeTransaction(
- unsignedTx,
- signature
- ),
- }
- );
-
- expect(hash).to.be.equal(expectedHash);
- }
- });
-
- it("should verify valid transaction signatures", async function () {
- for (const unsignedTx of testUnsignedTxs) {
- const expectedHash = ethers.utils.keccak256(
- ethers.utils.serializeTransaction(unsignedTx)
- );
- const signature = signingKey.signDigest(expectedHash);
-
- expect(
- await libTxUtils.recoverSender(chainId, {
- txType: unsignedTx.type,
- destination: unsignedTx.to,
- data: unsignedTx.data,
- gasLimit: unsignedTx.gasLimit,
- v: signature.v - 27,
- r: signature.r,
- s: signature.s,
- txData: ethers.utils.serializeTransaction(
- unsignedTx,
- signature
- ),
- })
- ).to.be.equal(signerAddress);
- }
- });
-
- it("should verify invalid transaction signatures", async function () {
- for (const unsignedTx of testUnsignedTxs) {
- const expectedHash = ethers.utils.keccak256(
- ethers.utils.serializeTransaction(unsignedTx)
- );
- const signature = signingKey.signDigest(expectedHash);
-
- const invalidSignature = {
- v: 75,
- r: "0xb14e3f5eab11cd2c459b04a91a9db8bd6f5acccfbd830c9693c84f8d21187eef",
- s: "0x5cf4b3b2b3957e7016366d180493c2c226ea8ad12aed7faddbc0ce3a6789256d",
- };
-
- const txData = await changeSignature(
- unsignedTx.type,
- ethers.utils.arrayify(
- ethers.utils.serializeTransaction(unsignedTx, signature)
- ),
- invalidSignature
- );
-
- expect(
- await libTxUtils.recoverSender(chainId, {
- txType: unsignedTx.type,
- destination: unsignedTx.to,
- data: unsignedTx.data,
- gasLimit: unsignedTx.gasLimit,
- v: invalidSignature.v,
- r: invalidSignature.r,
- s: invalidSignature.s,
- txData,
- })
- ).to.be.equal(ethers.constants.AddressZero);
- }
- });
-
- async function changeSignature(
- type: any,
- encoded: Uint8Array,
- signature: any
- ) {
- if (type !== 0) encoded = encoded.slice(1);
-
- const rlpItemsList = (await libRLPReader.readList(encoded)).slice(
- 0,
- -3
- );
-
- let result = await libRLPWriter.writeList(
- rlpItemsList.concat([
- await libRLPWriter.writeUint(signature.v),
- await libRLPWriter.writeBytes(signature.r),
- await libRLPWriter.writeBytes(signature.s),
- ])
- );
-
- if (type !== 0) result = ethers.utils.concat([[type], result]);
-
- return ethers.utils.hexlify(result);
- }
-
- function randomBigInt() {
- return ethers.BigNumber.from(ethers.utils.randomBytes(32));
- }
-});
diff --git a/packages/protocol/test/libs/LibZKP.test.ts b/packages/protocol/test/libs/LibZKP.test.ts
deleted file mode 100644
index 00faddf299a..00000000000
--- a/packages/protocol/test/libs/LibZKP.test.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-// eslint-disable-next-line import/no-named-default
-import { expect } from "chai";
-import hre, { ethers } from "hardhat";
-import * as utils from "../../tasks/utils";
-const testProof = require("../data/test_proof.json");
-
-describe("LibZKP", function () {
- let libZKP: any;
- let plonkVerifierAddress: any;
- before(async function () {
- libZKP = await (await ethers.getContractFactory("TestLibZKP")).deploy();
- plonkVerifierAddress = await utils.deployBytecode(
- hre,
- utils.compileYulContract(
- "../contracts/libs/yul/PlonkVerifier_10_txs.yulp"
- ),
- "PlonkVerifier_10_txs"
- );
- });
-
- it("should successfully verifiy the given zkp and instance", async function () {
- const result = await libZKP.verify(
- plonkVerifierAddress,
- testProof.result.circuit.proof,
- ethers.utils.hexConcat([
- testProof.result.circuit.instance[0],
- testProof.result.circuit.instance[1],
- ])
- );
-
- expect(result).to.be.true;
- });
-
- it("should not successfully verifiy the given zkp and instance when the given contract address is not PlonkVerifier", async function () {
- // random EOA address
- let result = await libZKP.verify(
- ethers.Wallet.createRandom().address,
- testProof.result.circuit.proof,
- ethers.utils.hexConcat([
- testProof.result.circuit.instance[0],
- testProof.result.circuit.instance[1],
- ])
- );
-
- expect(result).to.be.false;
-
- // another smart contract
- const testERC20 = await utils.deployContract(hre, "TestERC20", {}, [
- 1024,
- ]);
- result = await libZKP.verify(
- testERC20.address,
- testProof.result.circuit.proof,
- ethers.utils.hexConcat([
- testProof.result.circuit.instance[0],
- testProof.result.circuit.instance[1],
- ])
- );
-
- expect(result).to.be.false;
- });
-});
diff --git a/packages/protocol/test/signal/SignalService.integration.test.ts b/packages/protocol/test/signal/SignalService.integration.test.ts
deleted file mode 100644
index 0d527a020b2..00000000000
--- a/packages/protocol/test/signal/SignalService.integration.test.ts
+++ /dev/null
@@ -1,252 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import { TestHeaderSync } from "../../typechain";
-import { deploySignalService, getSignalProof } from "../utils/signal";
-import deployAddressManager from "../utils/addressManager";
-import { getBlockHeader } from "../utils/rpc";
-import {
- getDefaultL2Signer,
- getL1Provider,
- getL2Provider,
-} from "../utils/provider";
-
-describe("integration:SignalService", function () {
- async function deployIntegrationSignalService() {
- const [owner] = await ethers.getSigners();
-
- const { chainId: srcChainId } = await ethers.provider.getNetwork();
-
- // ethereum node
- const l1Provider = await getL1Provider();
-
- // hardhat node
- const l2Provider = await getL2Provider();
-
- const l1Signer = await ethers.provider.getSigner();
-
- const l2Signer = await getDefaultL2Signer();
-
- const l2Network = await l2Provider.getNetwork();
- const enabledDestChainId = l2Network.chainId;
-
- const addressManager = await deployAddressManager(l1Signer);
- const l2AddressManager = await deployAddressManager(l2Signer);
-
- const { signalService: l1SignalService } = await deploySignalService(
- owner,
- addressManager,
- srcChainId
- );
-
- const { signalService: l2SignalService } = await deploySignalService(
- l2Signer,
- l2AddressManager,
- enabledDestChainId
- );
-
- await addressManager.setAddress(
- `${enabledDestChainId}.signal_service`,
- l2SignalService.address
- );
-
- await l2AddressManager.setAddress(
- `${srcChainId}.signal_service`,
- l1SignalService.address
- );
-
- const headerSync: TestHeaderSync = await (
- await ethers.getContractFactory("TestHeaderSync")
- )
- .connect(l2Signer)
- .deploy();
-
- await l2AddressManager.setAddress(
- `${enabledDestChainId}.taiko`,
- headerSync.address
- );
-
- return {
- l1Provider,
- owner,
- l1SignalService,
- l2SignalService,
- srcChainId,
- enabledDestChainId,
- headerSync,
- };
- }
-
- it("should revert if srcChainId == block.chainId", async function () {
- const {
- l1Provider,
- owner,
- l1SignalService,
- l2SignalService,
- enabledDestChainId,
- headerSync,
- } = await deployIntegrationSignalService();
-
- const signal = ethers.utils.hexlify(ethers.utils.randomBytes(32));
-
- const tx = await l1SignalService.connect(owner).sendSignal(signal);
- await tx.wait();
-
- const app = owner.address;
- const slot = await l1SignalService.getSignalSlot(app, signal);
-
- const { block, blockHeader } = await getBlockHeader(l1Provider);
- await headerSync.setSyncedHeader(block.hash);
-
- const signalProof = await getSignalProof(
- l1Provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- await expect(
- l2SignalService.isSignalReceived(
- enabledDestChainId,
- app,
- signal,
- signalProof
- )
- ).to.be.revertedWith("B_WRONG_CHAIN_ID()");
- });
-
- it("should revert if app == AddressZero", async function () {
- const {
- l1Provider,
- owner,
- l1SignalService,
- l2SignalService,
- srcChainId,
- headerSync,
- } = await deployIntegrationSignalService();
-
- const signal = ethers.utils.hexlify(ethers.utils.randomBytes(32));
-
- const tx = await l1SignalService.connect(owner).sendSignal(signal);
- await tx.wait();
-
- const app = ethers.constants.AddressZero;
- const slot = await l1SignalService.getSignalSlot(app, signal);
-
- const { block, blockHeader } = await getBlockHeader(l1Provider);
- await headerSync.setSyncedHeader(block.hash);
-
- const signalProof = await getSignalProof(
- l1Provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- await expect(
- l2SignalService.isSignalReceived(
- srcChainId,
- app,
- signal,
- signalProof
- )
- ).to.be.revertedWith("B_NULL_APP_ADDR()");
- });
-
- it("should revert if signal == HashZero", async function () {
- const {
- l1Provider,
- owner,
- l1SignalService,
- l2SignalService,
- srcChainId,
- headerSync,
- } = await deployIntegrationSignalService();
-
- const signal = ethers.utils.hexlify(ethers.utils.randomBytes(32));
-
- const tx = await l1SignalService.connect(owner).sendSignal(signal);
- await tx.wait();
-
- const app = owner.address;
- const slot = await l1SignalService.getSignalSlot(app, signal);
-
- const { block, blockHeader } = await getBlockHeader(l1Provider);
- await headerSync.setSyncedHeader(block.hash);
-
- const signalProof = await getSignalProof(
- l1Provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- await expect(
- l2SignalService.isSignalReceived(
- srcChainId,
- app,
- ethers.constants.HashZero,
- signalProof
- )
- ).to.be.revertedWith("B_ZERO_SIGNAL()");
- });
-
- it.only("should pass and return true", async function () {
- const {
- l1Provider,
- owner,
- l1SignalService,
- l2SignalService,
- srcChainId,
- headerSync,
- } = await deployIntegrationSignalService();
-
- const signal = ethers.utils.hexlify(ethers.utils.randomBytes(32));
-
- const tx = await l1SignalService.connect(owner).sendSignal(signal);
- await tx.wait();
-
- const app = owner.address;
- const slot = await l1SignalService.getSignalSlot(app, signal);
-
- const { block, blockHeader } = await getBlockHeader(l1Provider);
-
- const failProof = await getSignalProof(
- l1Provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
- // should return false since header has not been synced yet.
- expect(
- await l2SignalService.isSignalReceived(
- srcChainId,
- app,
- signal,
- failProof
- )
- ).to.be.equal(false);
-
- await headerSync.setSyncedHeader(block.hash);
-
- const signalProof = await getSignalProof(
- l1Provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- expect(
- await l2SignalService.isSignalReceived(
- srcChainId,
- app,
- signal,
- signalProof
- )
- ).to.be.true;
- });
-});
diff --git a/packages/protocol/test/signal/SignalService.test.ts b/packages/protocol/test/signal/SignalService.test.ts
deleted file mode 100644
index 2c26fad6fb5..00000000000
--- a/packages/protocol/test/signal/SignalService.test.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import { AddressManager, SignalService } from "../../typechain";
-import { deploySignalService } from "../utils/signal";
-import deployAddressManager from "../utils/addressManager";
-// import {getBlockHeader } from "../utils/rpc";
-
-// TODO(roger): convert to integration tests and add a test case for isSignalReceived.
-describe("SignalService", function () {
- let owner: any;
- let addr1: any;
- let addr2: any;
- let signalService: SignalService;
-
- before(async () => {
- [owner, addr1, addr2] = await ethers.getSigners();
- const { chainId } = await ethers.provider.getNetwork();
-
- const addressManager: AddressManager = await deployAddressManager(
- owner
- );
-
- ({ signalService } = await deploySignalService(
- owner,
- addressManager,
- chainId
- ));
- });
-
- describe("getSignalSlot()", function () {
- it("should return different slots for same signal from different apps", async () => {
- const signal = ethers.utils.keccak256(
- ethers.utils.toUtf8Bytes("a random")
- );
- const slot1 = await signalService.getSignalSlot(
- addr1.address,
- signal
- );
- const slot2 = signalService.getSignalSlot(addr2.address, signal);
-
- await expect(slot1).to.be.not.equal(slot2);
- });
- it("should return expected slot", async () => {
- const want =
- "0x9b11525774df15071344c44c56f02418dd56a9050effcc5de3912e88ccf1b95d";
-
- const slot = await signalService.getSignalSlot(
- "0x2aB7C0ab9AB47fcF370d13058BfEE28f2Ec0940c",
- "0xf697cc0b80c778b40a4e863d2d2a723cc707bcdf2ba463bb1cd28aa2c888b229"
- );
-
- await expect(slot).to.be.equal(want);
- });
- });
-
- describe("isSignalSent()", function () {
- it("should return false for unsent signal and true for sent signal", async () => {
- const signal = ethers.utils.keccak256(
- ethers.utils.toUtf8Bytes("another random")
- );
- let isSent = await signalService.isSignalSent(
- addr1.address,
- signal
- );
- await expect(isSent).to.be.equal(false);
-
- await signalService.connect(addr1).sendSignal(signal);
- isSent = await signalService.isSignalSent(addr1.address, signal);
- await expect(isSent).to.be.equal(true);
- });
- });
-});
diff --git a/packages/protocol/test/test_integration.sh b/packages/protocol/test/test_integration.sh
deleted file mode 100755
index 85cd8840c0e..00000000000
--- a/packages/protocol/test/test_integration.sh
+++ /dev/null
@@ -1,92 +0,0 @@
-#!/bin/bash
-
-set -eou pipefail
-
-DIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd)
-TEST_NODE_CONTAINER_NAME_L1="test-ethereum-node-l1"
-TEST_NODE_CONTAINER_NAME_L2="test-ethereum-node-l2"
-TEST_IMPORT_TEST_ACCOUNT_ETH_JOB_NAME="import-test-account-eth"
-TEST_ACCOUNT_ADDRESS="0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39"
-TEST_ACCOUNT_PRIV_KEY="2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200"
-GETH_NODE_KEY_L1="14d2deec982957c89c56e1dc768a1d47c40398376ed2ba7e2df51eb029e71a83"
-GETH_NODE_KEY_L2="141ca39f5c00141ed7f065f5a5c9c9177fdbbe496b9bfc3e3dc7233802dc366c"
-
-if ! command -v docker &> /dev/null 2>&1; then
- echo "ERROR: `docker` command not found"
- exit 1
-fi
-
-if ! docker info > /dev/null 2>&1; then
- echo "ERROR: docker daemon isn't running"
- exit 1
-fi
-
-docker rm --force $TEST_NODE_CONTAINER_NAME_L1 \
- $TEST_NODE_CONTAINER_NAME_L2 \
- $TEST_IMPORT_TEST_ACCOUNT_ETH_JOB_NAME &> /dev/null
-
-# Start a test ethereum node
-docker run -d \
- --name $TEST_NODE_CONTAINER_NAME_L1 \
- -p 18545:8545 \
- -e CHAIN_ID="1336" -e PERIOD="0" -e NODE_KEY=$GETH_NODE_KEY_L1 \
- gcr.io/evmchain/clique-geth:latest
-
-if [[ $TEST_TYPE = "integrationbridge" ]]
-then
- docker run -d \
- --name $TEST_NODE_CONTAINER_NAME_L2 \
- -p 28545:8545 \
- -e CHAIN_ID="1337" -e PERIOD="0" -e NODE_KEY=$GETH_NODE_KEY_L2 \
- gcr.io/evmchain/clique-geth:latest
-else
- docker run -d \
- --name $TEST_NODE_CONTAINER_NAME_L2 \
- -p 28545:8545 \
- gcr.io/evmchain/hardhat-node:latest \
- hardhat node --hostname "0.0.0.0"
-fi
-
-function waitTestNode {
- echo "Waiting for test node: $1"
- # Wait till the test node fully started
- RETRIES=120
- i=0
- until curl \
- --silent \
- --fail \
- --noproxy localhost \
- -X POST \
- -H "Content-Type: application/json" \
- -d '{"jsonrpc":"2.0","id":0,"method":"eth_chainId","params":[]}' \
- $1
- do
- sleep 1
- if [ $i -eq $RETRIES ]; then
- echo 'Timed out waiting for test node'
- exit 1
- fi
- ((i=i+1))
- done
-}
-
-waitTestNode http://localhost:18545
-waitTestNode http://localhost:28545
-
-docker run -d \
- --name $TEST_IMPORT_TEST_ACCOUNT_ETH_JOB_NAME \
- --add-host host.docker.internal:host-gateway \
- ethereum/client-go:latest \
- --exec 'eth.sendTransaction({from: eth.coinbase, to: "'0xdf08f82de32b8d460adbe8d72043e3a7e25a3b39'", value: web3.toWei(1024, "'ether'")})' attach http://host.docker.internal:18545
-
-function cleanup {
- docker rm --force $TEST_NODE_CONTAINER_NAME_L1 \
- $TEST_NODE_CONTAINER_NAME_L2 \
- $TEST_IMPORT_TEST_ACCOUNT_ETH_JOB_NAME &> /dev/null
-}
-
-trap cleanup EXIT INT KILL ERR
-
-# Run the tests
-PRIVATE_KEY=$TEST_ACCOUNT_PRIV_KEY \
- npx hardhat test --network l1_test --grep "^$TEST_TYPE:"
diff --git a/packages/protocol/test/thirdparty/AddressManager.test.ts b/packages/protocol/test/thirdparty/AddressManager.test.ts
deleted file mode 100644
index b89759e3d2d..00000000000
--- a/packages/protocol/test/thirdparty/AddressManager.test.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { expect } from "chai";
-import { AddressManager } from "../../typechain";
-import { ethers } from "hardhat";
-import deployAddressManager from "../utils/addressManager";
-
-describe("AddressManager", function () {
- let owner: any;
- let nonOwner: any;
- let addressManager: AddressManager;
-
- before(async function () {
- [owner, nonOwner] = await ethers.getSigners();
- });
-
- beforeEach(async function () {
- addressManager = await deployAddressManager(owner);
- });
-
- describe("setAddress()", async () => {
- it("throws when non-owner calls", async () => {
- const name = "fakename";
- await expect(
- addressManager
- .connect(nonOwner)
- .setAddress(name, nonOwner.address)
- ).to.be.revertedWith("");
- });
-
- it("emits setAddress event", async () => {
- const name = "fakename";
- await expect(
- addressManager.connect(owner).setAddress(name, nonOwner.address)
- )
- .to.emit(addressManager, "AddressSet")
- .withArgs(name, nonOwner.address, ethers.constants.AddressZero);
-
- await expect(
- addressManager.connect(owner).setAddress(name, owner.address)
- )
- .to.emit(addressManager, "AddressSet")
- .withArgs(name, owner.address, nonOwner.address);
-
- expect(await addressManager.getAddress(name)).to.be.eq(
- owner.address
- );
- });
- });
-});
diff --git a/packages/protocol/test/thirdparty/LibBlockHeaderDecoder.test.ts b/packages/protocol/test/thirdparty/LibBlockHeaderDecoder.test.ts
deleted file mode 100644
index 865dd00a96d..00000000000
--- a/packages/protocol/test/thirdparty/LibBlockHeaderDecoder.test.ts
+++ /dev/null
@@ -1,169 +0,0 @@
-// eslint-disable-next-line no-unused-vars
-import { expect } from "chai";
-import { keccak256 } from "ethers/lib/utils";
-import { LibBlockHeaderDecoder, TestLibBlockHeader } from "../../typechain";
-const hre = require("hardhat");
-const ethers = hre.ethers;
-const EBN = ethers.BigNumber;
-
-describe("LibBlockHeaderDecoder", async function () {
- // eslint-disable-next-line no-unused-vars
- let blockHeaderDecoder: LibBlockHeaderDecoder;
- let hashBlockHeader: TestLibBlockHeader;
-
- before(async function () {
- // Deploying Lib to Link
- const blkHdrDcdrLib = await (
- await ethers.getContractFactory("LibBlockHeaderDecoder")
- ).deploy();
-
- // Deploying Library
- blockHeaderDecoder = await (
- await ethers.getContractFactory("TestLibBlockHeaderDecoder", {
- libraries: {
- LibBlockHeaderDecoder: blkHdrDcdrLib.address,
- },
- })
- ).deploy();
-
- hashBlockHeader = await (
- await ethers.getContractFactory("TestLibBlockHeader")
- ).deploy();
- });
-
- it("Decode should return stateRoot and timeStamp", async function () {
- const parentHash =
- "0xa7881266ca0a344c43cb24175d9dbd243b58d45d6ae6ad71310a273a3d1d3afb";
- const blockHeader: any = {
- parentHash: parentHash,
- ommersHash:
- "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
- beneficiary: "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
- stateRoot:
- "0xc0dcf937b3f6136dd70a1ad11cc57b040fd410f3c49a5146f20c732895a3cc21",
- transactionsRoot:
- "0x7273ade6b6ed865a9975ac281da23b90b141a8b607d874d2cd95e65e81336f8e",
- receiptsRoot:
- "0x74bb61e381e9238a08b169580f3cbf9b8b79d7d5ee708d3e286103eb291dfd08",
- logsBloom:
- "112d60abc05141f1302248e0f4329627f002380f1413820692911863e7d0871261aa07e90cc01a10c3ce589153570dc2db27b8783aa52bc19a5a4a836722e813190401b4214c3908cb8b468b510c3fe482603b00ca694c806206bf099279919c334541094bd2e085210373c0b064083242d727790d2eecdb2e0b90353b66461050447626366328f0965602e8a9802d25740ad4a33162142b08a1b15292952de423fac45d235622bb0ef3b2d2d4c21690d280a0b948a8a3012136542c1c4d0955a501a022e1a1a4582220d1ae50ba475d88ce0310721a9076702d29a27283e68c2278b93a1c60d8f812069c250042cc3180a8fd54f034a2da9a03098c32b03445"
- .match(/.{1,64}/g)!
- .map((s) => "0x" + s),
- difficulty: EBN.from("0x1aedf59a4bc180"),
- height: EBN.from("0xc5ad78"),
- gasLimit: EBN.from("0xe4e1c0"),
- gasUsed: EBN.from("0xe4a463"),
- timestamp: EBN.from("0x6109c56e"),
- extraData: "0x65746865726d696e652d75732d7765737431",
- mixHash:
- "0xf5ba25df1e92e89a09e0b32063b81795f631100801158f5fa733f2ba26843bd0",
- nonce: EBN.from("0x738b7e38476abe98"),
- baseFeePerGas: 0,
- withdrawalsRoot: ethers.constants.HashZero,
- };
-
- const encodedBlockHeader = await hashBlockHeader.rlpBlockHeader(
- blockHeader
- );
-
- const [_stateRoot, _timeStamp, _transactionsRoot, _receiptsRoot] =
- await blockHeaderDecoder.decodeBlockHeader(
- encodedBlockHeader,
- keccak256(encodedBlockHeader),
- false
- );
-
- expect(_stateRoot).to.equal(blockHeader.stateRoot);
- expect(_timeStamp).to.equal(blockHeader.timestamp);
- expect(_transactionsRoot).to.equal(blockHeader.transactionsRoot);
- expect(_receiptsRoot).to.equal(blockHeader.receiptsRoot);
- });
-
- it("Same as above, using latest blockHeader", async function () {
- const block = await hre.ethers.provider.send("eth_getBlockByNumber", [
- "latest",
- false,
- ]);
- const logsBloom = block.logsBloom.toString().substring(2);
- const blockHeader = {
- parentHash: block.parentHash,
- ommersHash: block.sha3Uncles,
- beneficiary: block.miner,
- stateRoot: block.stateRoot,
- transactionsRoot: block.transactionsRoot,
- receiptsRoot: block.receiptsRoot,
- logsBloom: logsBloom
- .match(/.{1,64}/g)!
- .map((s: string) => "0x" + s),
- difficulty: block.difficulty,
- height: block.number,
- gasLimit: block.gasLimit,
- gasUsed: block.gasUsed,
- timestamp: block.timestamp,
- extraData: block.extraData,
- mixHash: block.mixHash,
- nonce: block.nonce,
- baseFeePerGas: 0,
- withdrawalsRoot: ethers.constants.HashZero,
- };
- const encodedBlockHeader = await hashBlockHeader.rlpBlockHeader(
- blockHeader
- );
-
- const [_stateRoot, _timeStamp, _transactionsRoot, _receiptsRoot] =
- await blockHeaderDecoder.decodeBlockHeader(
- encodedBlockHeader,
- keccak256(encodedBlockHeader),
- false
- );
-
- expect(_stateRoot).to.equal(blockHeader.stateRoot);
- expect(_timeStamp).to.equal(blockHeader.timestamp);
- expect(_transactionsRoot).to.equal(blockHeader.transactionsRoot);
- expect(_receiptsRoot).to.equal(blockHeader.receiptsRoot);
- });
-
- it("Same as above, using earliest blockHeader", async function () {
- const block = await hre.ethers.provider.send("eth_getBlockByNumber", [
- "earliest",
- false,
- ]);
- const logsBloom = block.logsBloom.toString().substring(2);
- const blockHeader = {
- parentHash: block.parentHash,
- ommersHash: block.sha3Uncles,
- beneficiary: block.miner,
- stateRoot: block.stateRoot,
- transactionsRoot: block.transactionsRoot,
- receiptsRoot: block.receiptsRoot,
- logsBloom: logsBloom
- .match(/.{1,64}/g)!
- .map((s: string) => "0x" + s),
- difficulty: block.difficulty,
- height: block.number,
- gasLimit: block.gasLimit,
- gasUsed: block.gasUsed,
- timestamp: block.timestamp,
- extraData: block.extraData,
- mixHash: block.mixHash,
- nonce: block.nonce,
- baseFeePerGas: 0,
- withdrawalsRoot: ethers.constants.HashZero,
- };
- const encodedBlockHeader = await hashBlockHeader.rlpBlockHeader(
- blockHeader
- );
-
- const [_stateRoot, _timeStamp, _transactionsRoot, _receiptsRoot] =
- await blockHeaderDecoder.decodeBlockHeader(
- encodedBlockHeader,
- keccak256(encodedBlockHeader),
- false
- );
-
- expect(_stateRoot).to.equal(blockHeader.stateRoot);
- expect(_timeStamp).to.equal(blockHeader.timestamp);
- expect(_transactionsRoot).to.equal(blockHeader.transactionsRoot);
- expect(_receiptsRoot).to.equal(blockHeader.receiptsRoot);
- });
-});
diff --git a/packages/protocol/test/thirdparty/LibMerkleTrie.test.ts b/packages/protocol/test/thirdparty/LibMerkleTrie.test.ts
deleted file mode 100644
index c24dead2cbb..00000000000
--- a/packages/protocol/test/thirdparty/LibMerkleTrie.test.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import { expect } from "chai";
-import { ethers } from "hardhat";
-import { BaseTrie } from "merkle-patricia-tree";
-import { TestLibMerkleTrie } from "../../typechain";
-import { MerkleTrie } from "../utils/trie";
-import { randomBytes } from "crypto";
-
-describe("LibMerkleTrie", function () {
- let libMerkleTrie: TestLibMerkleTrie;
- let defaultMerkleTrie: MerkleTrie;
- const defaultAmountOfNodes = 32;
- const defaultNodeLength = 32;
-
- beforeEach(async function () {
- libMerkleTrie = await (
- await ethers.getContractFactory("TestLibMerkleTrie")
- ).deploy();
-
- defaultMerkleTrie = new MerkleTrie(
- defaultAmountOfNodes,
- defaultNodeLength,
- () => new BaseTrie()
- );
- await defaultMerkleTrie.init();
- });
-
- describe("verifyInclusionProof()", () => {
- it(`is included, ${defaultAmountOfNodes} bytes, ${defaultNodeLength} node length`, async () => {
- for (const n of defaultMerkleTrie.nodes) {
- const key = n.key;
- const t = await defaultMerkleTrie.makeTest(key);
- const isIncluded = await libMerkleTrie.verifyInclusionProof(
- key,
- t.node.value,
- t.proof.proof,
- t.root.root
- );
- expect(isIncluded).to.be.true;
- }
- });
- });
-
- describe("get()", () => {
- it(`is included`, async () => {
- const key = defaultMerkleTrie.nodes[0].key;
- const t = await defaultMerkleTrie.makeTest(key);
- const isIncluded = await libMerkleTrie.get(
- key,
- t.proof.proof,
- t.root.root
- );
-
- expect(isIncluded[0]).to.be.true;
- expect(isIncluded[1]).to.be.eq(
- ethers.utils.hexlify(defaultMerkleTrie.nodes[0].value)
- );
- });
- it(`is not included`, async () => {
- const t = await defaultMerkleTrie.makeTest(
- defaultMerkleTrie.nodes[0].key
- );
-
- const key = randomBytes(defaultNodeLength);
- const isIncluded = await libMerkleTrie.get(
- key,
- t.proof.proof,
- t.root.root
- );
-
- expect(isIncluded[0]).to.be.false;
- expect(isIncluded[1]).to.be.eq("0x");
- });
- });
-});
diff --git a/packages/protocol/test/thirdparty/LibSecureMerkleTrie.test.ts b/packages/protocol/test/thirdparty/LibSecureMerkleTrie.test.ts
deleted file mode 100644
index 80b1e1671ee..00000000000
--- a/packages/protocol/test/thirdparty/LibSecureMerkleTrie.test.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import { expect } from "chai";
-import { randomBytes } from "crypto";
-import { ethers } from "hardhat";
-import { SecureTrie } from "merkle-patricia-tree";
-import { TestLibSecureMerkleTrie } from "../../typechain";
-import { MerkleTrie } from "../utils/trie";
-
-describe("LibSecureMerkleTrie", function () {
- let libSecureMerkleTrie: TestLibSecureMerkleTrie;
- let defaultSecureMerkleTrie: MerkleTrie;
- const defaultAmountOfNodes = 32;
- const defaultNodeLength = 32;
-
- beforeEach(async function () {
- libSecureMerkleTrie = await (
- await ethers.getContractFactory("TestLibSecureMerkleTrie")
- ).deploy();
-
- defaultSecureMerkleTrie = new MerkleTrie(
- defaultAmountOfNodes,
- defaultNodeLength,
- () => new SecureTrie()
- );
- await defaultSecureMerkleTrie.init();
- });
-
- describe("verifyInclusionProof()", () => {
- it(`is included, ${defaultAmountOfNodes} bytes, ${defaultNodeLength} node length`, async () => {
- const n = defaultSecureMerkleTrie.nodes[0];
- const key = n.key;
- const t = await defaultSecureMerkleTrie.makeTest(key);
- const isIncluded = await libSecureMerkleTrie.verifyInclusionProof(
- key,
- t.node.value,
- t.proof.proof,
- t.root.root
- );
- expect(isIncluded).to.be.true;
- });
- });
-
- describe("get()", () => {
- it(`is included`, async () => {
- const key = defaultSecureMerkleTrie.nodes[0].key;
- const t = await defaultSecureMerkleTrie.makeTest(key);
- const isIncluded = await libSecureMerkleTrie.get(
- key,
- t.proof.proof,
- t.root.root
- );
-
- expect(isIncluded[0]).to.be.true;
- expect(isIncluded[1]).to.be.eq(
- ethers.utils.hexlify(defaultSecureMerkleTrie.nodes[0].value)
- );
- });
-
- it(`is not included`, async () => {
- const t = await defaultSecureMerkleTrie.makeTest(
- defaultSecureMerkleTrie.nodes[0].key
- );
-
- const key = randomBytes(defaultNodeLength);
- const isIncluded = await libSecureMerkleTrie.get(
- key,
- t.proof.proof,
- t.root.root
- );
-
- expect(isIncluded[0]).to.be.false;
- expect(isIncluded[1]).to.be.eq("0x");
- });
- });
-});
diff --git a/packages/protocol/test/tokenVault/TokenVault.test.ts b/packages/protocol/test/tokenVault/TokenVault.test.ts
deleted file mode 100644
index 7de260f6f04..00000000000
--- a/packages/protocol/test/tokenVault/TokenVault.test.ts
+++ /dev/null
@@ -1,367 +0,0 @@
-/* eslint-disable camelcase */
-import { expect } from "chai";
-import {
- AddressManager,
- AddressManager__factory,
- BridgedERC20,
- BridgedERC20__factory,
- TestMessageSender__factory,
- TokenVault,
- TokenVault__factory,
-} from "../../typechain";
-import { ethers } from "hardhat";
-import { BigNumber, BigNumberish } from "ethers";
-import { MockContract, smock } from "@defi-wonderland/smock";
-
-type CanonicalERC20 = {
- chainId: BigNumberish;
- addr: string;
- decimals: BigNumberish;
- symbol: string;
- name: string;
-};
-
-const weth: CanonicalERC20 = {
- chainId: 5,
- addr: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
- decimals: 18,
- symbol: "WETH",
- name: "Wrapped Ether",
-};
-
-describe("TokenVault", function () {
- let owner: any;
- let nonOwner: any;
- let L1TokenVault: MockContract;
- let tokenVaultAddressManager: AddressManager;
- let destChainTokenVault: TokenVault;
- const defaultProcessingFee = 10;
- const destChainId = 167001;
- let bridgedToken: MockContract;
-
- before(async function () {
- [owner, nonOwner] = await ethers.getSigners();
- });
-
- beforeEach(async function () {
- const network = await ethers.provider.getNetwork();
- const addressManagerFactory: AddressManager__factory =
- await ethers.getContractFactory("AddressManager");
- const tokenVaultFactory: TokenVault__factory =
- await ethers.getContractFactory("TokenVault");
-
- tokenVaultAddressManager = await addressManagerFactory.deploy();
- await tokenVaultAddressManager.init();
-
- const mockTokenVaultFactory = await smock.mock(
- "TokenVault"
- );
-
- L1TokenVault = await mockTokenVaultFactory.connect(owner).deploy();
- await L1TokenVault.init(tokenVaultAddressManager.address);
-
- destChainTokenVault = await tokenVaultFactory.connect(owner).deploy();
- await destChainTokenVault.init(tokenVaultAddressManager.address);
-
- const TestMessageSenderFactory: TestMessageSender__factory =
- await ethers.getContractFactory("TestMessageSender");
-
- const testMessageSender = await TestMessageSenderFactory.deploy();
- const testMessageSender2 = await TestMessageSenderFactory.deploy();
-
- await tokenVaultAddressManager.setAddress(
- `${network.chainId}.bridge`,
- testMessageSender.address
- );
- await tokenVaultAddressManager.setAddress(
- `${destChainId}.bridge`,
- testMessageSender2.address
- );
- await tokenVaultAddressManager.setAddress(
- `${network.chainId}.token_vault`,
- L1TokenVault.address
- );
- await tokenVaultAddressManager.setAddress(
- `${destChainId}.token_vault`,
- destChainTokenVault.address
- );
-
- const bridgedTokenFactory = await smock.mock(
- "BridgedERC20"
- );
-
- bridgedToken = await bridgedTokenFactory.deploy();
-
- await bridgedToken.init(
- tokenVaultAddressManager.address,
- weth.addr,
- destChainId,
- 18,
- weth.symbol,
- weth.name
- );
-
- await bridgedToken.setVariable("_totalSupply", 1000000);
- await bridgedToken.approve(owner.address, 1000);
- await bridgedToken.setVariable("_balances", { [owner.address]: 10 });
- });
-
- describe("receiveERC20()", async () => {
- it("throws when named 'bridge' is not the caller", async () => {
- const amount = BigNumber.from(1);
-
- await expect(
- L1TokenVault.receiveERC20(
- weth,
- owner.address,
- nonOwner.address,
- amount
- )
- ).to.be.revertedWith("RESOLVER_DENIED()");
- });
- });
-
- describe("sendEther()", async () => {
- it("throws when msg.value is 0", async () => {
- await expect(
- L1TokenVault.sendEther(
- destChainId,
- owner.address,
- 10000,
- defaultProcessingFee,
- owner.address,
- ""
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_VALUE()");
- });
-
- it("throws when msg.value - processing fee is 0", async () => {
- await expect(
- L1TokenVault.sendEther(
- destChainId,
- owner.address,
- 10000,
- defaultProcessingFee,
- owner.address,
- "",
- {
- value: defaultProcessingFee,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_VALUE()");
- });
-
- it("throws when msg.value is < processingFee", async () => {
- await expect(
- L1TokenVault.sendEther(
- destChainId,
- owner.address,
- 10000,
- defaultProcessingFee,
- owner.address,
- "",
- {
- value: defaultProcessingFee - 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_VALUE()");
- });
-
- it("throws when to is 0", async () => {
- await expect(
- L1TokenVault.sendEther(
- destChainId,
- ethers.constants.AddressZero,
- 10000,
- defaultProcessingFee,
- owner.address,
- "",
- {
- value: defaultProcessingFee - 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_TO()");
- });
-
- it("succeeds with processingFee", async () => {
- const depositValue = 1000;
-
- const msgHash =
- "0x3fd54831f488a22b28398de0c567a3b064b937f54f81739ae9bd545967f3abab";
-
- await expect(
- L1TokenVault.sendEther(
- destChainId,
- owner.address,
- 10000,
- defaultProcessingFee,
- owner.address,
- "",
- {
- value: depositValue,
- }
- )
- )
- .to.emit(L1TokenVault, "EtherSent")
- .withArgs(
- msgHash,
- owner.address,
- owner.address,
- destChainId,
- depositValue - defaultProcessingFee
- );
- });
-
- it("succeeds with 0 processingFee", async () => {
- const depositValue = 1000;
-
- const msgHash =
- "0x3fd54831f488a22b28398de0c567a3b064b937f54f81739ae9bd545967f3abab";
-
- await expect(
- L1TokenVault.sendEther(
- destChainId,
- owner.address,
- 10000,
- defaultProcessingFee,
- owner.address,
- "",
- {
- value: depositValue,
- }
- )
- )
- .to.emit(L1TokenVault, "EtherSent")
- .withArgs(
- msgHash,
- owner.address,
- owner.address,
- destChainId,
- depositValue - defaultProcessingFee
- );
- });
- });
-
- describe("sendERC20()", async () => {
- it("should throw if to == address(0)", async function () {
- await expect(
- L1TokenVault.sendERC20(
- destChainId,
- ethers.constants.AddressZero,
- weth.addr,
- 1,
- 20000000,
- 1000,
- owner.address,
- "",
- {
- value: 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_TO()");
- });
-
- it("should throw if to == destChainId.token_vault", async function () {
- await expect(
- L1TokenVault.sendERC20(
- destChainId,
- destChainTokenVault.address,
- weth.addr,
- 1,
- 20000000,
- 1000,
- owner.address,
- "",
- {
- value: 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_TO()");
- });
-
- it("should throw if token == address(0)", async function () {
- await expect(
- L1TokenVault.sendERC20(
- destChainId,
- nonOwner.address,
- ethers.constants.AddressZero,
- 1,
- 20000000,
- 1000,
- owner.address,
- "",
- {
- value: 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_TOKEN()");
- });
-
- it("should throw if amount <= 0", async function () {
- await expect(
- L1TokenVault.sendERC20(
- destChainId,
- nonOwner.address,
- weth.addr,
- 0,
- 20000000,
- 1000,
- owner.address,
- "",
- {
- value: 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_INVALID_AMOUNT()");
- });
-
- it("should throw if isBridgedToken, and canonicalToken.addr == address(0)", async function () {
- await L1TokenVault.setVariable("isBridgedToken", {
- [bridgedToken.address]: true,
- });
- // don't need to manually set bridgedToCanonical since default value is addressZero
-
- await expect(
- L1TokenVault.connect(owner).sendERC20(
- destChainId,
- nonOwner.address,
- bridgedToken.address,
- 1,
- 20000000,
- 1000,
- owner.address,
- "",
- {
- value: 1,
- }
- )
- ).to.be.revertedWith("TOKENVAULT_CANONICAL_TOKEN_NOT_FOUND()");
- });
-
- it("should pass and emit ERC20Sent Event", async function () {
- await L1TokenVault.setVariable("isBridgedToken", {
- [bridgedToken.address]: true,
- });
-
- await L1TokenVault.setVariable("bridgedToCanonical", {
- [bridgedToken.address]: weth,
- });
-
- await expect(
- L1TokenVault.connect(owner).sendERC20(
- destChainId,
- nonOwner.address,
- bridgedToken.address,
- 1,
- 20000000,
- 1000,
- owner.address,
- "",
- {
- value: 1000,
- }
- )
- ).to.emit(L1TokenVault, "ERC20Sent");
- });
- });
-});
diff --git a/packages/protocol/test/tokenomics/blockFee.test.ts b/packages/protocol/test/tokenomics/blockFee.test.ts
deleted file mode 100644
index e9b1451fe4a..00000000000
--- a/packages/protocol/test/tokenomics/blockFee.test.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-import { expect } from "chai";
-import { SimpleChannel } from "channel-ts";
-import { BigNumber, ethers } from "ethers";
-import { AddressManager, TaikoL1 } from "../../typechain";
-import { TestTaikoToken } from "../../typechain/TestTaikoToken";
-import blockListener from "../utils/blockListener";
-import { onNewL2Block } from "../utils/onNewL2Block";
-import Proposer from "../utils/proposer";
-
-import { initIntegrationFixture } from "../utils/fixture";
-import sleep from "../utils/sleep";
-import { deployTaikoL1 } from "../utils/taikoL1";
-
-describe("tokenomics: blockFee", function () {
- let taikoL1: TaikoL1;
- let l2Provider: ethers.providers.JsonRpcProvider;
- let proposerSigner: any;
- let genesisHeight: number;
- let genesisHash: string;
- let taikoTokenL1: TestTaikoToken;
- let l1AddressManager: AddressManager;
- let interval: any;
- let chan: SimpleChannel;
- /* eslint-disable-next-line */
- let config: Awaited>;
- let proposer: Proposer;
-
- beforeEach(async () => {
- ({
- taikoL1,
- l2Provider,
- proposerSigner,
- genesisHeight,
- genesisHash,
- taikoTokenL1,
- l1AddressManager,
- interval,
- chan,
- config,
- proposer,
- } = await initIntegrationFixture(true, true));
- });
-
- afterEach(() => clearInterval(interval));
-
- it("expects getBlockFee to return the initial feeBase at time of contract deployment", async function () {
- // deploy a new instance of TaikoL1 so no blocks have passed.
- const tL1 = await deployTaikoL1(l1AddressManager, genesisHash, true);
- const blockFee = await tL1.getBlockFee();
- expect(blockFee).to.be.eq(0);
- });
-
- it("block fee should increase as the halving period passes, while no blocks are proposed", async function () {
- const iterations: number = 5;
- const period: number = config.bootstrapDiscountHalvingPeriod
- .mul(1000)
- .toNumber();
-
- let lastBlockFee: BigNumber = await taikoL1.getBlockFee();
-
- for (let i = 0; i < iterations; i++) {
- await sleep(period);
- const blockFee = await taikoL1.getBlockFee();
- expect(blockFee).to.be.gt(lastBlockFee);
- lastBlockFee = blockFee;
- }
- });
-
- it(
- "proposes blocks on interval, proposer's balance for TkoToken should decrease as it pays proposer fee, " +
- "proofReward should increase since more slots are used and " +
- "no proofs have been submitted",
- async function () {
- // get the initial tkoBalance, which should decrease every block proposal
- let lastProposerBalance = await taikoTokenL1.balanceOf(
- await proposerSigner.getAddress()
- );
-
- let lastProofReward = BigNumber.from(0);
-
- // we want to wait for enough blocks until the blockFee is no longer 0, then run our
- // tests.
- while ((await taikoL1.getBlockFee()).eq(0)) {
- await sleep(500);
- }
-
- l2Provider.on("block", blockListener(chan, genesisHeight));
- /* eslint-disable-next-line */
- for await (const blockNumber of chan) {
- if (
- blockNumber >
- genesisHeight + (config.maxNumBlocks.toNumber() - 1)
- ) {
- break;
- }
- const { newProposerBalance, newProofReward } =
- await onNewL2Block(
- l2Provider,
- blockNumber,
- proposer,
- taikoL1,
- proposerSigner,
- taikoTokenL1
- );
-
- console.log("lastProposerBalance", lastProposerBalance);
- console.log("newProposerBalance", newProposerBalance);
-
- expect(newProposerBalance).to.be.lt(lastProposerBalance);
-
- console.log("lastProofReward", lastProofReward);
- console.log("newProofReward", newProofReward);
- expect(newProofReward).to.be.gt(lastProofReward);
-
- lastProofReward = newProofReward;
- lastProposerBalance = newProposerBalance;
- }
- }
- );
-});
diff --git a/packages/protocol/test/tokenomics/proofReward.test.ts b/packages/protocol/test/tokenomics/proofReward.test.ts
deleted file mode 100644
index fbd200392db..00000000000
--- a/packages/protocol/test/tokenomics/proofReward.test.ts
+++ /dev/null
@@ -1,121 +0,0 @@
-import { expect } from "chai";
-import { SimpleChannel } from "channel-ts";
-import { ethers } from "ethers";
-import { TaikoL1 } from "../../typechain";
-import { TestTaikoToken } from "../../typechain/TestTaikoToken";
-import blockListener from "../utils/blockListener";
-import { initIntegrationFixture } from "../utils/fixture";
-import Proposer from "../utils/proposer";
-import Prover from "../utils/prover";
-import { seedTko } from "../utils/seed";
-import { commitProposeProveAndVerify } from "../utils/verify";
-
-describe("tokenomics: proofReward", function () {
- let taikoL1: TaikoL1;
- let l2Provider: ethers.providers.JsonRpcProvider;
- let l1Signer: any;
- let genesisHeight: number;
- let taikoTokenL1: TestTaikoToken;
- let interval: any;
- let chan: SimpleChannel;
- let proposer: Proposer;
- let prover: Prover;
-
- /* eslint-disable-next-line */
- let config: Awaited>;
-
- beforeEach(async () => {
- ({
- taikoL1,
- l2Provider,
- l1Signer,
- genesisHeight,
- taikoTokenL1,
- interval,
- chan,
- config,
- proposer,
- prover,
- } = await initIntegrationFixture(true, true));
- });
-
- afterEach(() => {
- clearInterval(interval);
- l2Provider.off("block");
- chan.close();
- });
-
- it(`single prover, single proposer.
- propose blocks, wait til maxNumBlocks is filled.
- proverReward should decline should increase as blocks are proved then verified.
- the provers TKO balance should increase as the blocks are verified and
- they receive the proofReward.
- the proposer should receive a refund on his deposit because he holds a tkoBalance > 0 at time of verification.`, async function () {
- // prover needs TKO or their reward will be cut down to 1 wei.
-
- await seedTko([prover], taikoTokenL1.connect(l1Signer));
-
- l2Provider.on("block", blockListener(chan, genesisHeight));
-
- /* eslint-disable-next-line */
- for await (const blockNumber of chan) {
- if (
- blockNumber >
- genesisHeight + (config.maxNumBlocks.toNumber() - 1)
- ) {
- break;
- }
- const balanceBefore = await taikoTokenL1.balanceOf(
- await prover.getSigner().address
- );
-
- const { provedEvent, proposedBlock, verifyEvent } =
- await commitProposeProveAndVerify(
- taikoL1,
- l2Provider,
- blockNumber,
- proposer,
- taikoTokenL1,
- prover
- );
-
- expect(verifyEvent).not.to.be.undefined;
-
- const proofReward = await taikoL1.getProofReward(
- provedEvent.args.provenAt,
- proposedBlock.proposedAt
- );
-
- // proof reward can be 0. make sure there is a proof reward first
- if (proofReward.gt(0)) {
- const rewardBalance = await taikoL1.getRewardBalance(
- await prover.getSigner().getAddress()
- );
-
- expect(rewardBalance.gt(0)).to.be.eq(true);
-
- // rewardBalance can be 1, and withdrawBalance only withdrawals is balance > 1.
- // make sure we have a valid reward balance waiting to be withdrawn
- // before comparing balances.
- if (rewardBalance.gt(1)) {
- let balanceAfter = await taikoTokenL1.balanceOf(
- await prover.getSigner().address
- );
-
- expect(balanceAfter).to.be.eq(balanceBefore);
-
- const tx = await taikoL1
- .connect(prover.getSigner())
- .withdrawBalance();
- await tx.wait();
-
- balanceAfter = await taikoTokenL1.balanceOf(
- await prover.getSigner().address
- );
-
- expect(balanceAfter).to.be.gt(balanceBefore);
- }
- }
- }
- });
-});
diff --git a/packages/protocol/test/utils/addressManager.ts b/packages/protocol/test/utils/addressManager.ts
deleted file mode 100644
index 0b0ad048c8a..00000000000
--- a/packages/protocol/test/utils/addressManager.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { ethers } from "ethers";
-import { ethers as hardhatEthers } from "hardhat";
-import { AddressManager } from "../../typechain";
-
-const deployAddressManager = async (signer: ethers.Signer) => {
- const addressManager: AddressManager = await (
- await hardhatEthers.getContractFactory("AddressManager")
- )
- .connect(signer)
- .deploy();
- await (await addressManager.init()).wait(1);
- return addressManager;
-};
-
-export default deployAddressManager;
diff --git a/packages/protocol/test/utils/array.ts b/packages/protocol/test/utils/array.ts
deleted file mode 100644
index 3455de9d2f8..00000000000
--- a/packages/protocol/test/utils/array.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-function pickRandomElement(arr: T[]): T {
- return arr[Math.floor(Math.random() * arr.length)];
-}
-
-export { pickRandomElement };
diff --git a/packages/protocol/test/utils/blockListener.ts b/packages/protocol/test/utils/blockListener.ts
deleted file mode 100644
index ab33abca642..00000000000
--- a/packages/protocol/test/utils/blockListener.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import type { SimpleChannel } from "channel-ts";
-
-// blockListener should be called as follows:
-// `l2Provider.on("block", blockListener(chan, genesisHeight)`
-// it will send incoming blockNumbers, generated from the l2 provider on a new block,
-// through a Golang-style channel, which can then be waited on like such:
-// for await (const blockNumber of chan)
-// so we can then run a commit, propose, prove, and verify flow in our test cases
-// in the main javascript event loop, instead of in the event handler of the l2Provider
-// itself.
-
-const blockListener = function (
- chan: SimpleChannel,
- genesisHeight: number
-) {
- let notFirstEvent = false;
-
- return function (blockNumber: number) {
- if (blockNumber <= genesisHeight) return;
- // Sometimes the first block number will be greater than start height,
- // we need to fill the gap manually.
- if (!notFirstEvent) {
- if (blockNumber > genesisHeight) {
- for (let i = genesisHeight + 1; i < blockNumber; i++) {
- chan.send(i);
- }
- }
- notFirstEvent = true;
- }
- chan.send(blockNumber);
- };
-};
-
-export default blockListener;
diff --git a/packages/protocol/test/utils/block_metadata.ts b/packages/protocol/test/utils/block_metadata.ts
deleted file mode 100644
index c1ee3b2865a..00000000000
--- a/packages/protocol/test/utils/block_metadata.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { BigNumber, BigNumberish } from "ethers";
-
-type BlockMetadata = {
- id: number;
- l1Height: number;
- l1Hash: string;
- beneficiary: string;
- txListHash: string;
- mixHash: string;
- extraData: string;
- gasLimit: BigNumberish;
- timestamp: number;
- commitSlot: number;
- commitHeight: number;
-};
-
-type ForkChoice = {
- provenAt: BigNumber;
- provers: string[];
- blockHash: string;
-};
-
-type BlockInfo = {
- proposedAt: number;
- provenAt: number;
- id: number;
- parentHash: string;
- blockHash: string;
- forkChoice: ForkChoice;
- deposit: BigNumber;
- proposer: string;
-};
-
-export { BlockMetadata, ForkChoice, BlockInfo };
diff --git a/packages/protocol/test/utils/bridge.ts b/packages/protocol/test/utils/bridge.ts
deleted file mode 100644
index e8adcd0298f..00000000000
--- a/packages/protocol/test/utils/bridge.ts
+++ /dev/null
@@ -1,156 +0,0 @@
-import { BigNumber, ethers, Signer } from "ethers";
-import { ethers as hardhatEthers } from "hardhat";
-import {
- AddressManager,
- Bridge,
- SignalService,
- EtherVault,
- TestHeaderSync,
- LibTrieProof,
-} from "../../typechain";
-import { MessageStatusChangedEvent } from "../../typechain/LibBridgeStatus";
-import { Message } from "./message";
-import { Block, BlockHeader, getBlockHeader } from "./rpc";
-import { getSignalProof } from "./signal";
-
-async function deployBridge(
- signer: Signer,
- addressManager: AddressManager,
- chainId: number
-): Promise<{ bridge: Bridge; etherVault: EtherVault }> {
- const libTrieProof: LibTrieProof = await (
- await hardhatEthers.getContractFactory("LibTrieProof")
- )
- .connect(signer)
- .deploy();
-
- const BridgeFactory = await hardhatEthers.getContractFactory("Bridge", {
- libraries: {
- LibTrieProof: libTrieProof.address,
- },
- });
-
- const bridge: Bridge = await BridgeFactory.connect(signer).deploy();
-
- await bridge.connect(signer).init(addressManager.address);
-
- const etherVault: EtherVault = await (
- await hardhatEthers.getContractFactory("EtherVault")
- )
- .connect(signer)
- .deploy();
-
- await etherVault.connect(signer).init(addressManager.address);
-
- await etherVault.connect(signer).authorize(bridge.address, true);
-
- await etherVault.connect(signer).authorize(await signer.getAddress(), true);
-
- await addressManager.setAddress(
- `${chainId}.ether_vault`,
- etherVault.address
- );
-
- await signer.sendTransaction({
- to: etherVault.address,
- value: BigNumber.from(100000000),
- gasLimit: 1000000,
- });
-
- await addressManager.setAddress(`${chainId}.bridge`, bridge.address);
-
- return { bridge, etherVault };
-}
-
-async function sendMessage(
- bridge: Bridge,
- m: Message
-): Promise<{
- bridge: Bridge;
- msgHash: string;
- messageSentEvent: any;
- message: Message;
- tx: ethers.ContractTransaction;
-}> {
- const expectedAmount = m.depositValue + m.callValue + m.processingFee;
-
- const tx = await bridge.sendMessage(m, {
- value: expectedAmount,
- });
-
- const receipt = await tx.wait();
-
- const [messageSentEvent] = receipt.events as any as Event[];
-
- const { msgHash, message } = (messageSentEvent as any).args;
-
- return { bridge, messageSentEvent, msgHash, message, tx };
-}
-
-// Process a L1-to-L1 message
-async function processMessage(
- l1SignalService: SignalService,
- l1Bridge: Bridge,
- l2Bridge: Bridge,
- signal: string,
- provider: ethers.providers.JsonRpcProvider,
- headerSync: TestHeaderSync,
- message: Message
-): Promise<{
- tx: ethers.ContractTransaction;
- signalProof: string;
- block: Block;
- blockHeader: BlockHeader;
- messageStatusChangedEvent: MessageStatusChangedEvent;
-}> {
- const sender = l1Bridge.address;
-
- const slot = await l1SignalService.getSignalSlot(sender, signal);
-
- const { block, blockHeader } = await getBlockHeader(provider);
-
- await headerSync.setSyncedHeader(block.hash);
-
- const signalProof = await getSignalProof(
- provider,
- l1SignalService.address,
- slot,
- block.number,
- blockHeader
- );
-
- const tx = await l2Bridge.processMessage(message, signalProof);
- const receipt = await tx.wait(1);
- const messageStatusChangedEvent = (receipt.events || []).find(
- (e) => e.event === "MessageStatusChanged"
- ) as any as MessageStatusChangedEvent;
- return { tx, signalProof, block, blockHeader, messageStatusChangedEvent };
-}
-
-async function sendAndProcessMessage(
- provider: ethers.providers.JsonRpcProvider,
- headerSync: TestHeaderSync,
- m: Message,
- l1SignalService: SignalService,
- l1Bridge: Bridge,
- l2Bridge: Bridge
-): Promise<{
- tx: ethers.ContractTransaction;
- message: Message;
- msgHash: string;
- signalProof: string;
-}> {
- const { msgHash, message } = await sendMessage(l1Bridge, m);
- const { tx, signalProof } = await processMessage(
- l1SignalService,
- l1Bridge,
- l2Bridge,
- msgHash,
- provider,
- headerSync,
- message
- );
- return { tx, msgHash, message, signalProof };
-}
-
-export { deployBridge, sendMessage, processMessage, sendAndProcessMessage };
diff --git a/packages/protocol/test/utils/bytes.ts b/packages/protocol/test/utils/bytes.ts
deleted file mode 100644
index 50331a1d3a3..00000000000
--- a/packages/protocol/test/utils/bytes.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { ethers } from "hardhat";
-
-function randomBytes32() {
- return ethers.utils.hexlify(ethers.utils.randomBytes(32));
-}
-
-export { randomBytes32 };
diff --git a/packages/protocol/test/utils/commit.ts b/packages/protocol/test/utils/commit.ts
deleted file mode 100644
index 417faf9da07..00000000000
--- a/packages/protocol/test/utils/commit.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { ethers } from "ethers";
-import RLP from "rlp";
-import { TaikoL1 } from "../../typechain";
-import { BlockProposedEvent } from "../../typechain/LibProposing";
-import { BlockCommittedEvent } from "../../typechain/TaikoEvents";
-import { proposeBlock } from "./propose";
-import { sendTinyEtherToZeroAddress } from "./seed";
-
-const generateCommitHash = (
- block: ethers.providers.Block
-): { hash: string; txListHash: string; beneficiary: string } => {
- const txListHash = ethers.utils.keccak256(RLP.encode(block.transactions));
- const beneficiary =
- block.miner === ethers.constants.AddressZero
- ? ethers.Wallet.createRandom().address
- : block.miner;
-
- const hash = ethers.utils.keccak256(
- ethers.utils.solidityPack(
- ["address", "bytes32"],
- [beneficiary, txListHash]
- )
- );
-
- return { hash, txListHash, beneficiary };
-};
-
-const commitBlock = async (
- taikoL1: TaikoL1,
- block: ethers.providers.Block,
- commitSlot: number = 0
-): Promise<{
- tx: ethers.ContractTransaction;
- commit: { hash: string; txListHash: string; beneficiary: string };
- blockCommittedEvent: BlockCommittedEvent | undefined;
- receipt: ethers.ContractReceipt;
-}> => {
- const commit = generateCommitHash(block);
- const tx = await taikoL1.commitBlock(commitSlot, commit.hash, {
- gasLimit: 200000,
- });
- const receipt = await tx.wait(1);
- const blockCommittedEvent = receipt.events!.find(
- (e) => e.event === "BlockCommitted"
- ) as any as BlockCommittedEvent;
- return { tx, commit, blockCommittedEvent, receipt };
-};
-
-const commitAndProposeLatestBlock = async (
- taikoL1: TaikoL1,
- l1Signer: any,
- l2Provider: ethers.providers.JsonRpcProvider,
- commitSlot: number = 0
-) => {
- const { commitConfirmations } = await taikoL1.getConfig();
- const block = await l2Provider.getBlock("latest");
- const { tx, commit } = await commitBlock(
- taikoL1.connect(l1Signer),
- block,
- commitSlot
- );
- const commitReceipt = await tx.wait(1);
-
- for (let i = 0; i < commitConfirmations.toNumber() + 5; i++) {
- await sendTinyEtherToZeroAddress(l1Signer);
- }
-
- const proposeReceipt = await proposeBlock(
- taikoL1.connect(l1Signer),
- block,
- commit.txListHash,
- commitReceipt.blockNumber as number,
- block.gasLimit,
- commitSlot,
- commit.beneficiary
- );
-
- const proposedEvent: BlockProposedEvent = (
- proposeReceipt.events as any[]
- ).find((e) => e.event === "BlockProposed");
-
- return { proposedEvent, proposeReceipt, commitReceipt, commit, block };
-};
-
-export { generateCommitHash, commitBlock, commitAndProposeLatestBlock };
diff --git a/packages/protocol/test/utils/encoding.ts b/packages/protocol/test/utils/encoding.ts
deleted file mode 100644
index 4661733e7cd..00000000000
--- a/packages/protocol/test/utils/encoding.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { ethers } from "hardhat";
-import { BlockMetadata } from "./block_metadata";
-import Evidence from "./evidence";
-
-function encodeBlockMetadata(meta: BlockMetadata) {
- return ethers.utils.defaultAbiCoder.encode(
- [
- "tuple(uint256 id, uint256 l1Height, bytes32 l1Hash, address beneficiary, bytes32 txListHash, bytes32 mixHash, bytes extraData, uint64 gasLimit, uint64 timestamp, uint64 commitHeight, uint64 commitSlot)",
- ],
- [meta]
- );
-}
-
-function encodeEvidence(evidence: Evidence) {
- return ethers.utils.defaultAbiCoder.encode(
- [
- "tuple(tuple(uint256 id, uint256 l1Height, bytes32 l1Hash, address beneficiary, bytes32 txListHash, bytes32 mixHash, bytes extraData, uint64 gasLimit, uint64 timestamp, uint64 commitHeight, uint64 commitSlot) meta, tuple(bytes32 parentHash, bytes32 ommersHash, address beneficiary, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, bytes32[8] logsBloom, uint256 difficulty, uint128 height, uint64 gasLimit, uint64 gasUsed, uint64 timestamp, bytes extraData, bytes32 mixHash, uint64 nonce, uint256 baseFeePerGas) header, address prover, bytes[] proofs, uint16[] circuits)",
- ],
- [evidence]
- );
-}
-
-export { encodeBlockMetadata, encodeEvidence };
diff --git a/packages/protocol/test/utils/errors.ts b/packages/protocol/test/utils/errors.ts
deleted file mode 100644
index 0640d7252f7..00000000000
--- a/packages/protocol/test/utils/errors.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { ethers, utils } from "ethers";
-import { expect } from "chai";
-
-async function txShouldRevertWithCustomError(
- txPromise: Promise,
- provider: ethers.providers.JsonRpcProvider,
- customError: string
-) {
- try {
- await txPromise;
- expect.fail("Expected promise to throw but it didn't");
- } catch (tx) {
- // console.log(tx)
- const _tx = await provider.getTransaction(
- (tx as { transactionHash: string }).transactionHash
- );
- const code = await provider.call(
- _tx as ethers.providers.TransactionRequest,
- _tx.blockNumber
- );
-
- const expectedCode = utils
- .keccak256(utils.toUtf8Bytes(customError))
- .substring(0, 10);
-
- if (code !== expectedCode) {
- expect.fail(
- `Error code mismatch: actual=
- ${code}
- expected=
- ${expectedCode}`
- );
- }
- }
-}
-
-async function readShouldRevertWithCustomError(
- txPromise: Promise,
- customError: string
-) {
- try {
- await txPromise;
-
- expect.fail("Expected promise to throw but it didn't");
- } catch (result) {
- const r = result as { errorSignature: string };
- if (r.errorSignature !== customError) {
- expect.fail(
- `Error code mismatch: actual=
- ${r.errorSignature}
- "expected="
- ${customError}`
- );
- }
- }
-}
-
-export { txShouldRevertWithCustomError, readShouldRevertWithCustomError };
diff --git a/packages/protocol/test/utils/evidence.ts b/packages/protocol/test/utils/evidence.ts
deleted file mode 100644
index 2bc68269da3..00000000000
--- a/packages/protocol/test/utils/evidence.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { BlockMetadata } from "./block_metadata";
-import { BlockHeader } from "./rpc";
-
-type Evidence = {
- meta: BlockMetadata;
- header: BlockHeader;
- prover: string;
- proofs: string[];
- circuits: number[];
-};
-
-export default Evidence;
diff --git a/packages/protocol/test/utils/fixture.ts b/packages/protocol/test/utils/fixture.ts
deleted file mode 100644
index 31c068fdbdb..00000000000
--- a/packages/protocol/test/utils/fixture.ts
+++ /dev/null
@@ -1,155 +0,0 @@
-import { SimpleChannel } from "channel-ts";
-import { ethers } from "ethers";
-import deployAddressManager from "./addressManager";
-import Proposer from "./proposer";
-import Prover from "./prover";
-import {
- getDefaultL1Signer,
- getDefaultL2Signer,
- getL1Provider,
- getL2Provider,
-} from "./provider";
-import { createAndSeedWallets, sendTinyEtherToZeroAddress } from "./seed";
-import { defaultFeeBase, deployTaikoL1 } from "./taikoL1";
-import { deployTaikoL2 } from "./taikoL2";
-import deployTaikoToken from "./taikoToken";
-
-async function initIntegrationFixture(
- mintTkoToProposer: boolean,
- enableTokenomics: boolean = true
-) {
- const l1Provider = getL1Provider();
-
- l1Provider.pollingInterval = 100;
-
- const l1Signer = await getDefaultL1Signer();
-
- const l2Provider = getL2Provider();
-
- l2Provider.pollingInterval = 100;
-
- const l2Signer = await getDefaultL2Signer();
-
- // When connecting to a geth node, we need to unlock the account manually, and
- // we can safely ignore the unlock error when connecting to a hardhat node.
- try {
- await Promise.all([l1Signer.unlock(""), l2Signer.unlock("")]);
- } catch (_) {}
-
- const l2AddressManager = await deployAddressManager(l2Signer);
- const taikoL2 = await deployTaikoL2(
- l2Signer,
- l2AddressManager,
- false,
- 5000000 // Note: need to explicitly set gasLimit here, otherwise the deployment transaction may fail.
- );
- const taikoL2DeployReceipt = await taikoL2.deployTransaction.wait();
-
- const genesisHash = taikoL2DeployReceipt.blockHash as string;
- const genesisHeight = taikoL2DeployReceipt.blockNumber as number;
-
- const l1AddressManager = await deployAddressManager(l1Signer);
- const taikoL1 = await deployTaikoL1(
- l1AddressManager,
- genesisHash,
- enableTokenomics,
- defaultFeeBase
- );
- const { chainId } = await l1Provider.getNetwork();
-
- const [proposerSigner, proverSigner] = await createAndSeedWallets(
- 2,
- l1Signer
- );
-
- const taikoTokenL1 = await deployTaikoToken(
- l1Signer,
- l1AddressManager,
- taikoL1.address
- );
-
- await (
- await l1AddressManager.setAddress(
- `${chainId}.tko_token`,
- taikoTokenL1.address
- )
- ).wait(1);
-
- const { chainId: l2ChainId } = await l2Provider.getNetwork();
-
- await (
- await l1AddressManager.setAddress(`${l2ChainId}.taiko`, taikoL2.address)
- ).wait(1);
-
- await (
- await l1AddressManager.setAddress(
- `${chainId}.proof_verifier`,
- taikoL1.address
- )
- ).wait(1);
-
- if (mintTkoToProposer) {
- const mintTx = await taikoTokenL1
- .connect(l1Signer)
- .mintAnyone(
- await proposerSigner.getAddress(),
- ethers.utils.parseEther("100")
- );
-
- await mintTx.wait(1);
- }
-
- // send transactions to L1 so we always get new blocks
- const interval = setInterval(
- async () => await sendTinyEtherToZeroAddress(l1Signer),
- 1 * 1000
- );
-
- // send transactions to L2 so we always get new blocks (replaces evm_setAutomine?)
- const interval2 = setInterval(
- async () => await sendTinyEtherToZeroAddress(l2Signer),
- 1 * 1000
- );
-
- const tx = await l2Signer.sendTransaction({
- to: proverSigner.address,
- value: ethers.utils.parseUnits("1", "ether"),
- });
- await tx.wait(1);
-
- const chan = new SimpleChannel();
- const config = await taikoL1.getConfig();
-
- const proposer = new Proposer(
- taikoL1.connect(proposerSigner),
- l2Provider,
- config.commitConfirmations.toNumber(),
- config.maxNumBlocks.toNumber(),
- 0,
- proposerSigner
- );
-
- const prover = new Prover(taikoL1, l2Provider, proverSigner);
- return {
- taikoL1,
- taikoL2,
- l1Provider,
- l2Provider,
- l1Signer,
- l2Signer,
- proposerSigner,
- proverSigner,
- genesisHeight,
- genesisHash,
- taikoTokenL1,
- l1AddressManager,
- interval,
- interval2,
- chan,
- config,
- proposer,
- prover,
- };
-}
-
-export { initIntegrationFixture };
diff --git a/packages/protocol/test/utils/message.ts b/packages/protocol/test/utils/message.ts
deleted file mode 100644
index bf74fb99068..00000000000
--- a/packages/protocol/test/utils/message.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-type Message = {
- id: number;
- sender: string;
- srcChainId: number;
- destChainId: number;
- owner: string;
- to: string;
- refundAddress: string;
- depositValue: number;
- callValue: number;
- processingFee: number;
- gasLimit: number;
- data: string;
- memo: string;
-};
-
-const MessageStatus = {
- NEW: 0,
- RETRIABLE: 1,
- DONE: 2,
- FAILED: 3,
-};
-
-async function getMessageStatusSlot(hre: any, signal: any) {
- return hre.ethers.utils.solidityKeccak256(
- ["string", "bytes"],
- ["MESSAGE_STATUS", signal]
- );
-}
-
-export { Message, MessageStatus, getMessageStatusSlot };
diff --git a/packages/protocol/test/utils/onNewL2Block.ts b/packages/protocol/test/utils/onNewL2Block.ts
deleted file mode 100644
index eed86f73775..00000000000
--- a/packages/protocol/test/utils/onNewL2Block.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { BigNumber, ethers } from "ethers";
-import { TaikoL1, TaikoToken } from "../../typechain";
-import { BlockProposedEvent } from "../../typechain/LibProposing";
-import Proposer from "./proposer";
-import sleep from "./sleep";
-
-// onNewL2Block should be called from a tokenomics test case when a new block
-// is generated from the l2Provider.
-// It will commit then propose the block to the TaikoL1 contract,
-// and then return the latest fee information and the proposal event,
-// which can then be asserted on depending on your test case.
-async function onNewL2Block(
- l2Provider: ethers.providers.JsonRpcProvider,
- blockNumber: number,
- proposer: Proposer,
- taikoL1: TaikoL1,
- proposerSigner: any,
- taikoTokenL1: TaikoToken
-): Promise<{
- proposedEvent: BlockProposedEvent;
- newProposerBalance: BigNumber;
- newBlockFee: BigNumber;
- newProofReward: BigNumber;
-}> {
- const config = await taikoL1.getConfig();
-
- const block = await l2Provider.getBlock(blockNumber);
- const { proposedEvent } = await proposer.commitThenProposeBlock(block);
- const { id, meta } = proposedEvent.args;
-
- const { enableTokenomics } = await taikoL1.getConfig();
-
- const newProofReward = await taikoL1.getProofReward(
- new Date().getTime(),
- meta.timestamp
- );
-
- const newProposerBalance = enableTokenomics
- ? await taikoTokenL1.balanceOf(await proposerSigner.getAddress())
- : BigNumber.from(0);
-
- await sleep(1000 * config.bootstrapDiscountHalvingPeriod.toNumber());
- const newBlockFee = await taikoL1.getBlockFee();
-
- console.log("-------------------proposed----------", id);
-
- return {
- proposedEvent,
- newProposerBalance,
- newBlockFee,
- newProofReward,
- };
-}
-
-export { onNewL2Block };
diff --git a/packages/protocol/test/utils/propose.ts b/packages/protocol/test/utils/propose.ts
deleted file mode 100644
index 04f94df1ac1..00000000000
--- a/packages/protocol/test/utils/propose.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { BigNumber, ethers } from "ethers";
-import RLP from "rlp";
-import { TaikoL1 } from "../../typechain";
-import { BlockMetadata } from "./block_metadata";
-import { encodeBlockMetadata } from "./encoding";
-
-const buildProposeBlockInputs = (
- block: ethers.providers.Block,
- meta: BlockMetadata
-) => {
- const inputs = [];
- const blockMetadataBytes = encodeBlockMetadata(meta);
- inputs[0] = blockMetadataBytes;
- inputs[1] = RLP.encode(block.transactions);
- return inputs;
-};
-
-const proposeBlock = async (
- taikoL1: TaikoL1,
- block: ethers.providers.Block,
- txListHash: string,
- commitHeight: number,
- gasLimit: BigNumber,
- commitSlot: number = 0,
- beneficiary: string
-) => {
- const meta: BlockMetadata = {
- id: 0,
- l1Height: 0,
- l1Hash: ethers.constants.HashZero,
- beneficiary,
- txListHash: txListHash,
- mixHash: ethers.constants.HashZero,
- extraData: ethers.utils.hexlify(ethers.utils.randomBytes(32)),
- gasLimit: gasLimit,
- timestamp: 0,
- commitSlot: commitSlot,
- commitHeight: commitHeight,
- };
-
- const inputs = buildProposeBlockInputs(block, meta);
-
- const tx = await taikoL1.proposeBlock(inputs, { gasLimit: 1000000 });
- const receipt = await tx.wait(1);
- return receipt;
-};
-
-export { buildProposeBlockInputs, proposeBlock };
diff --git a/packages/protocol/test/utils/proposer.ts b/packages/protocol/test/utils/proposer.ts
deleted file mode 100644
index 45d7907dedd..00000000000
--- a/packages/protocol/test/utils/proposer.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { ethers } from "ethers";
-import { TaikoL1 } from "../../typechain";
-import { BlockProposedEvent } from "../../typechain/LibProposing";
-import { commitBlock } from "./commit";
-import { proposeBlock } from "./propose";
-import sleep from "./sleep";
-
-class Proposer {
- private readonly taikoL1: TaikoL1;
- private readonly l2Provider: ethers.providers.JsonRpcProvider;
- private readonly commitConfirms: number;
- private readonly maxNumBlocks: number;
- private nextCommitSlot: number;
- private signer: ethers.Wallet;
-
- private proposingMutex: boolean = false;
-
- constructor(
- taikoL1: TaikoL1,
- l2Provider: ethers.providers.JsonRpcProvider,
- commitConfirms: number,
- maxNumBlocks: number,
- initialCommitSlot: number,
- signer: ethers.Wallet
- ) {
- this.taikoL1 = taikoL1;
- this.l2Provider = l2Provider;
- this.commitConfirms = commitConfirms;
- this.maxNumBlocks = maxNumBlocks;
- this.nextCommitSlot = initialCommitSlot;
- this.signer = signer;
- }
-
- getSigner() {
- return this.signer;
- }
-
- async commitThenProposeBlock(block?: ethers.providers.Block) {
- try {
- while (this.proposingMutex) {
- await sleep(500);
- }
- this.proposingMutex = true;
- if (!block) block = await this.l2Provider.getBlock("latest");
- const commitSlot = this.nextCommitSlot++;
- const { tx, commit } = await commitBlock(
- this.taikoL1,
- block,
- commitSlot
- );
- const commitReceipt = await tx.wait(this.commitConfirms ?? 1);
-
- const receipt = await proposeBlock(
- this.taikoL1,
- block,
- commit.txListHash,
- commitReceipt.blockNumber as number,
- block.gasLimit,
- commitSlot,
- commit.beneficiary
- );
-
- const proposedEvent: BlockProposedEvent = (
- receipt.events as any[]
- ).find((e) => e.event === "BlockProposed");
-
- this.proposingMutex = false;
-
- return { receipt, proposedEvent };
- } finally {
- this.proposingMutex = false;
- }
- }
-}
-
-export default Proposer;
diff --git a/packages/protocol/test/utils/prove.ts b/packages/protocol/test/utils/prove.ts
deleted file mode 100644
index c2c2fec505d..00000000000
--- a/packages/protocol/test/utils/prove.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { ethers } from "ethers";
-import { TaikoL1 } from "../../typechain";
-import { BlockProvenEvent } from "../../typechain/LibProving";
-import { BlockMetadata } from "./block_metadata";
-import { encodeEvidence } from "./encoding";
-import Evidence from "./evidence";
-import { BlockHeader, getBlockHeader } from "./rpc";
-
-const buildProveBlockInputs = (
- meta: BlockMetadata,
- header: BlockHeader,
- prover: string,
- anchorTx: Uint8Array | string,
- anchorReceipt: Uint8Array | string
-) => {
- const inputs = [];
- const evidence: Evidence = {
- meta: meta,
- header: header,
- prover: prover,
- proofs: [],
- circuits: [],
- };
-
- // we have mkp + zkp returnign true in testing, so can just push 0xff
- // instead of actually making proofs for anchor tx, anchor receipt, and
- // zkp
- for (let i = 0; i < 3; i++) {
- evidence.proofs.push("0xff");
- }
-
- for (let i = 0; i < 1; i++) {
- evidence.circuits.push(1);
- }
-
- inputs[0] = encodeEvidence(evidence);
- inputs[1] = anchorTx;
- inputs[2] = anchorReceipt;
- return inputs;
-};
-
-const proveBlock = async (
- taikoL1: TaikoL1,
- l2Provider: ethers.providers.JsonRpcProvider,
- proverAddress: string,
- blockId: number,
- blockNumber: number,
- meta: BlockMetadata
-): Promise => {
- const header = await getBlockHeader(l2Provider, blockNumber);
- const inputs = buildProveBlockInputs(
- meta,
- header.blockHeader,
- proverAddress,
- "0x",
- "0x"
- );
- const tx = await taikoL1.proveBlock(blockId, inputs, { gasLimit: 1000000 });
- const receipt = await tx.wait(1);
- const event: BlockProvenEvent = (receipt.events as any[]).find(
- (e) => e.event === "BlockProven"
- );
- return event;
-};
-
-export { buildProveBlockInputs, proveBlock };
diff --git a/packages/protocol/test/utils/prover.ts b/packages/protocol/test/utils/prover.ts
deleted file mode 100644
index df1bed6b2da..00000000000
--- a/packages/protocol/test/utils/prover.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { ethers } from "ethers";
-import { TaikoL1 } from "../../typechain";
-import { BlockProvenEvent } from "../../typechain/LibProving";
-import { BlockMetadata } from "./block_metadata";
-import { proveBlock } from "./prove";
-import sleep from "./sleep";
-
-class Prover {
- private readonly taikoL1: TaikoL1;
- private readonly l2Provider: ethers.providers.JsonRpcProvider;
- private provingMutex: boolean = false;
- private readonly signer: ethers.Wallet;
-
- constructor(
- taikoL1: TaikoL1,
- l2Provider: ethers.providers.JsonRpcProvider,
- signer: ethers.Wallet
- ) {
- this.taikoL1 = taikoL1;
- this.l2Provider = l2Provider;
- this.signer = signer;
- }
-
- getSigner() {
- return this.signer;
- }
-
- async prove(
- blockId: number,
- blockNumber: number,
- meta: BlockMetadata
- ): Promise {
- while (this.provingMutex) {
- await sleep(100);
- }
- this.provingMutex = true;
-
- let blockProvenEvent: BlockProvenEvent;
- try {
- blockProvenEvent = await proveBlock(
- this.taikoL1,
- this.l2Provider,
- await this.getSigner().getAddress(),
- blockId,
- blockNumber,
- meta
- );
- } catch (e) {
- console.error("prove error", e);
- throw e;
- } finally {
- this.provingMutex = false;
- }
-
- return blockProvenEvent;
- }
-}
-
-export default Prover;
diff --git a/packages/protocol/test/utils/provider.ts b/packages/protocol/test/utils/provider.ts
deleted file mode 100644
index 11fc81a0c27..00000000000
--- a/packages/protocol/test/utils/provider.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { ethers } from "ethers";
-// providers for integration tests
-
-const getL1Provider = () =>
- new ethers.providers.JsonRpcProvider("http://localhost:18545");
-
-const getL2Provider = () =>
- new ethers.providers.JsonRpcProvider("http://localhost:28545");
-
-const getDefaultL1Signer = async () =>
- getL1Provider().getSigner((await getL1Provider().listAccounts())[0]);
-
-const getDefaultL2Signer = async () =>
- getL2Provider().getSigner((await getL2Provider().listAccounts())[0]);
-
-export { getL1Provider, getL2Provider, getDefaultL1Signer, getDefaultL2Signer };
diff --git a/packages/protocol/test/utils/rpc.ts b/packages/protocol/test/utils/rpc.ts
deleted file mode 100644
index cdac87a5e6c..00000000000
--- a/packages/protocol/test/utils/rpc.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-import { BigNumber, ethers } from "ethers";
-
-type StorageEntry = {
- key: string;
- value: string;
- proof: string[]; // Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node,
-};
-
-type EthGetProofResponse = {
- balance: string;
- codeHash: string;
- nonce: string;
- storageHash: string;
- accountProof: string[]; // array of rlp-serialized merkle nodes beginning with stateRoot-node
- storageProof: StorageEntry[];
-};
-
-type Block = {
- number: number;
- hash: string;
- parentHash: string;
- nonce: number;
- sha3Uncles: string;
- logsBloom: string[];
- transactionsRoot: string;
- stateRoot: string;
- receiptsRoot: string;
- miner: string;
- difficulty: number;
- totalDifficulty: number;
- extraData: string;
- size: number;
- gasLimit: number;
- gasUsed: number;
- timestamp: number;
- transactions: string[];
- uncles: string[];
- baseFeePerGas?: string;
- mixHash: string;
- withdrawalsRoot: string;
-};
-
-type BlockHeader = {
- parentHash: string;
- ommersHash: string;
- beneficiary: string;
- stateRoot: string;
- transactionsRoot: string;
- receiptsRoot: string;
- logsBloom: string[];
- difficulty: number;
- height: number;
- gasLimit: number;
- gasUsed: number;
- timestamp: number;
- extraData: string;
- mixHash: string;
- nonce: number;
- baseFeePerGas: number;
- withdrawalsRoot: string;
-};
-
-async function getBlockHeader(
- provider: ethers.providers.JsonRpcProvider,
- blockNumber?: number
-) {
- const b = await provider.getBlock(
- blockNumber ? BigNumber.from(blockNumber).toHexString() : "latest"
- );
-
- const block: Block = await provider.send("eth_getBlockByHash", [
- b.hash,
- false,
- ]);
-
- const logsBloom = block.logsBloom.toString().substring(2);
-
- const blockHeader: BlockHeader = {
- parentHash: block.parentHash,
- ommersHash: block.sha3Uncles,
- beneficiary: block.miner,
- stateRoot: block.stateRoot,
- transactionsRoot: block.transactionsRoot,
- receiptsRoot: block.receiptsRoot,
- logsBloom: logsBloom.match(/.{1,64}/g)!.map((s: string) => "0x" + s),
- difficulty: block.difficulty,
- height: block.number,
- gasLimit: block.gasLimit,
- gasUsed: block.gasUsed,
- timestamp: block.timestamp,
- extraData: block.extraData,
- mixHash: block.mixHash,
- nonce: block.nonce,
- baseFeePerGas: block.baseFeePerGas ? parseInt(block.baseFeePerGas) : 0,
- // set to zero for pre-shanghai L1 blocks used in the integration test node
- withdrawalsRoot: ethers.constants.HashZero,
- };
-
- return { block, blockHeader };
-}
-
-export {
- Block,
- BlockHeader,
- StorageEntry,
- EthGetProofResponse,
- getBlockHeader,
-};
diff --git a/packages/protocol/test/utils/seed.ts b/packages/protocol/test/utils/seed.ts
deleted file mode 100644
index 60663893cdd..00000000000
--- a/packages/protocol/test/utils/seed.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { BigNumber, ethers } from "ethers";
-import { TestTaikoToken } from "../../typechain";
-
-const createAndSeedWallets = async (
- len: number,
- signer: any,
- amount: BigNumber = ethers.utils.parseEther("1")
-): Promise => {
- const wallets: ethers.Wallet[] = [];
- for (let i = 0; i < len; i++) {
- const wallet = ethers.Wallet.createRandom({
- extraEntropy: ethers.utils.randomBytes(32),
- }).connect(signer.provider);
- const tx = await signer.sendTransaction({
- to: await wallet.getAddress(),
- value: amount,
- });
-
- await tx.wait(1);
- wallets.push(wallet);
- }
-
- return wallets;
-};
-
-const sendTinyEtherToZeroAddress = async (signer: any) => {
- const tx = await signer.sendTransaction({
- to: ethers.constants.AddressZero,
- value: BigNumber.from(1),
- });
- await tx.wait(1);
-};
-
-const seedTko = async (
- wallets: { getSigner: () => ethers.Wallet }[],
- taikoToken: TestTaikoToken
-) => {
- for (const wallet of wallets) {
- // prover needs TKO or their reward will be cut down to 1 wei.
- await (
- await taikoToken.mintAnyone(
- await wallet.getSigner().getAddress(),
- ethers.utils.parseEther("100")
- )
- ).wait(1);
- }
-};
-
-export { createAndSeedWallets, sendTinyEtherToZeroAddress, seedTko };
diff --git a/packages/protocol/test/utils/signal.ts b/packages/protocol/test/utils/signal.ts
deleted file mode 100644
index e6ce33179ad..00000000000
--- a/packages/protocol/test/utils/signal.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { ethers, Signer } from "ethers";
-import RLP from "rlp";
-import { ethers as hardhatEthers } from "hardhat";
-import { BlockHeader, EthGetProofResponse } from "./rpc";
-import { AddressManager, SignalService, LibTrieProof } from "../../typechain";
-
-async function deploySignalService(
- signer: Signer,
- addressManager: AddressManager,
- srcChain: number
-): Promise<{ signalService: SignalService }> {
- const libTrieProof: LibTrieProof = await (
- await hardhatEthers.getContractFactory("LibTrieProof")
- )
- .connect(signer)
- .deploy();
-
- const SignalServiceFactory = await hardhatEthers.getContractFactory(
- "SignalService",
- {
- libraries: {
- LibTrieProof: libTrieProof.address,
- },
- }
- );
-
- const signalService: SignalService = await SignalServiceFactory.connect(
- signer
- ).deploy();
-
- await signalService.connect(signer).init(addressManager.address);
-
- await addressManager.setAddress(
- `${srcChain}.signal_service`,
- signalService.address
- );
- return { signalService };
-}
-
-async function getSignalProof(
- provider: ethers.providers.JsonRpcProvider,
- contractAddress: string,
- slot: string,
- blockNumber: number,
- blockHeader: BlockHeader
-) {
- const proof: EthGetProofResponse = await provider.send("eth_getProof", [
- contractAddress,
- [slot],
- blockNumber,
- ]);
-
- // RLP encode the proof together for LibTrieProof to decode
- const encodedProof = ethers.utils.defaultAbiCoder.encode(
- ["bytes", "bytes"],
- [
- RLP.encode(proof.accountProof),
- RLP.encode(proof.storageProof[0].proof),
- ]
- );
- // encode the SignalProof struct from LibBridgeSignal
- const signalProof = ethers.utils.defaultAbiCoder.encode(
- [
- "tuple(tuple(bytes32 parentHash, bytes32 ommersHash, address beneficiary, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, bytes32[8] logsBloom, uint256 difficulty, uint128 height, uint64 gasLimit, uint64 gasUsed, uint64 timestamp, bytes extraData, bytes32 mixHash, uint64 nonce, uint256 baseFeePerGas, bytes32 withdrawalsRoot) header, bytes proof)",
- ],
- [{ header: blockHeader, proof: encodedProof }]
- );
-
- return signalProof;
-}
-
-export { deploySignalService, getSignalProof };
diff --git a/packages/protocol/test/utils/sleep.ts b/packages/protocol/test/utils/sleep.ts
deleted file mode 100644
index 268c312630f..00000000000
--- a/packages/protocol/test/utils/sleep.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-function sleep(ms: number) {
- return new Promise((resolve) => {
- setTimeout(resolve, ms);
- });
-}
-
-export default sleep;
diff --git a/packages/protocol/test/utils/taikoL1.ts b/packages/protocol/test/utils/taikoL1.ts
deleted file mode 100644
index c5ded6ffca8..00000000000
--- a/packages/protocol/test/utils/taikoL1.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { BigNumber } from "ethers";
-import { ethers } from "hardhat";
-import { AddressManager, TaikoL1 } from "../../typechain";
-
-const defaultFeeBase = BigNumber.from(10).pow(18);
-
-async function deployTaikoL1(
- addressManager: AddressManager,
- genesisHash: string,
- enableTokenomics: boolean,
- feeBase?: BigNumber
-): Promise {
- const libReceiptDecoder = await (
- await ethers.getContractFactory("LibReceiptDecoder")
- ).deploy();
-
- const libTxDecoder = await (
- await ethers.getContractFactory("LibTxDecoder")
- ).deploy();
-
- const libProposing = await (
- await ethers.getContractFactory("LibProposing")
- ).deploy();
-
- const testLibProving = await (
- await ethers.getContractFactory("TestLibProving", {
- libraries: {
- LibReceiptDecoder: libReceiptDecoder.address,
- LibTxDecoder: libTxDecoder.address,
- },
- })
- ).deploy();
-
- const libVerifying = await (
- await ethers.getContractFactory("LibVerifying")
- ).deploy();
-
- const taikoL1 = await (
- await ethers.getContractFactory(
- enableTokenomics ? "TestTaikoL1EnableTokenomics" : "TestTaikoL1",
- {
- libraries: {
- LibVerifying: libVerifying.address,
- LibProposing: libProposing.address,
- LibProving: testLibProving.address,
- },
- }
- )
- ).deploy();
-
- await (
- await taikoL1.init(
- addressManager.address,
- genesisHash,
- feeBase ?? defaultFeeBase
- )
- ).wait(1);
-
- return taikoL1 as TaikoL1;
-}
-
-export { deployTaikoL1, defaultFeeBase };
diff --git a/packages/protocol/test/utils/taikoL2.ts b/packages/protocol/test/utils/taikoL2.ts
deleted file mode 100644
index 83092dabb81..00000000000
--- a/packages/protocol/test/utils/taikoL2.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { ethers } from "ethers";
-import { ethers as hardhatEthers } from "hardhat";
-import { AddressManager, TaikoL2 } from "../../typechain";
-
-async function deployTaikoL2(
- signer: ethers.Signer,
- addressManager: AddressManager,
- enablePublicInputsCheck: boolean = true,
- gasLimit: number | undefined = undefined
-): Promise {
- // Deploying TaikoL2 Contract linked with LibTxDecoder (throws error otherwise)
- const l2LibTxDecoder = await (
- await hardhatEthers.getContractFactory("LibTxDecoder")
- )
- .connect(signer)
- .deploy();
-
- const taikoL2 = await (
- await hardhatEthers.getContractFactory(
- enablePublicInputsCheck
- ? "TestTaikoL2EnablePublicInputsCheck"
- : "TestTaikoL2",
- {
- libraries: {
- LibTxDecoder: l2LibTxDecoder.address,
- },
- }
- )
- )
- .connect(signer)
- .deploy(addressManager.address, { gasLimit });
-
- return taikoL2 as TaikoL2;
-}
-
-export { deployTaikoL2 };
diff --git a/packages/protocol/test/utils/taikoToken.ts b/packages/protocol/test/utils/taikoToken.ts
deleted file mode 100644
index 6c23ede0e97..00000000000
--- a/packages/protocol/test/utils/taikoToken.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { ethers } from "ethers";
-import { ethers as hardhatEthers } from "hardhat";
-import { AddressManager } from "../../typechain";
-
-const deployTaikoToken = async (
- signer: ethers.Signer,
- addressManager: AddressManager,
- protoBroker: string
-) => {
- const token = await (
- await hardhatEthers.getContractFactory("TestTaikoToken")
- )
- .connect(signer)
- .deploy();
- await token.init("Taiko Token", "TKO", addressManager.address);
-
- const network = await signer.provider?.getNetwork();
-
- await addressManager.setAddress(
- `${network?.chainId}.proto_broker`,
- protoBroker
- );
-
- return token;
-};
-
-export default deployTaikoToken;
diff --git a/packages/protocol/test/utils/tokenomics.ts b/packages/protocol/test/utils/tokenomics.ts
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/packages/protocol/test/utils/trie.ts b/packages/protocol/test/utils/trie.ts
deleted file mode 100644
index 7afec4cc43c..00000000000
--- a/packages/protocol/test/utils/trie.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import { BaseTrie, SecureTrie } from "merkle-patricia-tree";
-import { ethers } from "ethers";
-import * as rlp from "rlp";
-import { randomBytes } from "crypto";
-
-type Node = {
- key: Buffer;
- value: Buffer;
-};
-
-type Root = {
- root: Buffer;
-};
-
-type Proof = {
- proof: string;
-};
-
-type Test = {
- node: Node;
- root: Root;
- proof: Proof;
-};
-
-class MerkleTrie {
- public trie: T;
- public nodes: Node[] = [];
- private nodeLength: number;
- private amountOfNodes: number;
-
- constructor(amountOfNodes: number, nodeLength: number, f: () => T) {
- this.amountOfNodes = amountOfNodes;
- this.nodeLength = nodeLength;
- this.trie = f();
- }
-
- async init() {
- this.nodes = [];
- for (let i = 0; i < this.amountOfNodes; i++) {
- this.nodes.push(this.newRandomNode());
- }
- await this.build(this.nodes);
- }
-
- newRandomNode(): Node {
- return {
- key: randomBytes(this.nodeLength),
- value: randomBytes(this.nodeLength),
- };
- }
-
- async build(nodes: Node[]): Promise {
- nodes.map(async (n) => await this.trie.put(n.key, n.value));
- }
-
- async makeTest(key: Buffer): Promise {
- const trie = this.trie.copy();
- const value = await trie.get(key);
- const proof = await BaseTrie.createProof(trie, key);
-
- return {
- node: {
- key: key,
- value: value as Buffer,
- },
- proof: {
- proof: ethers.utils.hexlify(rlp.encode(proof)),
- },
- root: {
- root: trie.root,
- },
- };
- }
-}
-export { MerkleTrie };
diff --git a/packages/protocol/test/utils/verify.ts b/packages/protocol/test/utils/verify.ts
deleted file mode 100644
index 5a27ea1878d..00000000000
--- a/packages/protocol/test/utils/verify.ts
+++ /dev/null
@@ -1,135 +0,0 @@
-import { expect } from "chai";
-import { BigNumber, ethers as ethersLib } from "ethers";
-import { ethers } from "hardhat";
-import { TaikoL1, TaikoToken } from "../../typechain";
-import { BlockVerifiedEvent } from "../../typechain/LibVerifying";
-import { BlockInfo, BlockMetadata } from "./block_metadata";
-import { onNewL2Block } from "./onNewL2Block";
-import Proposer from "./proposer";
-import Prover from "./prover";
-import { getDefaultL1Signer } from "./provider";
-import { sendTinyEtherToZeroAddress } from "./seed";
-
-async function verifyBlocks(taikoL1: TaikoL1, maxBlocks: number) {
- // Since we are connecting to a geth node with clique consensus (auto mine), we
- // need to manually mine a new block here to ensure the latest block.timestamp increased as expected when
- // calling eth_estimateGas.
- await sendTinyEtherToZeroAddress(await getDefaultL1Signer());
-
- const verifyTx = await taikoL1.verifyBlocks(maxBlocks, {
- gasLimit: 1000000,
- });
-
- const verifyReceipt = await verifyTx.wait(1);
- const verifiedEvent: BlockVerifiedEvent = (
- verifyReceipt.events as any[]
- ).find((e) => e.event === "BlockVerified");
- return verifiedEvent;
-}
-
-async function verifyBlockAndAssert(
- taikoL1: TaikoL1,
- taikoTokenL1: TaikoToken,
- block: BlockInfo,
- lastProofReward: BigNumber
-): Promise<{ newProofReward: BigNumber }> {
- const prover = block.forkChoice.provers[0];
-
- const proverBalanceBeforeVerification = await taikoTokenL1.balanceOf(
- prover
- );
-
- const proposerBalanceBeforeVerification = await taikoTokenL1.balanceOf(
- block.proposer
- );
-
- expect(proposerBalanceBeforeVerification.gt(0)).to.be.true;
- const verifiedEvent = await verifyBlocks(taikoL1, 1);
- expect(verifiedEvent).to.be.not.undefined;
-
- expect(verifiedEvent.args.blockHash).to.be.eq(block.blockHash);
- expect(verifiedEvent.args.id.eq(block.id)).to.be.true;
-
- const proverBalanceAfterVerification = await taikoTokenL1.balanceOf(prover);
-
- // prover should have increased in balance as he received the proof reward.
- expect(proverBalanceAfterVerification.gt(proverBalanceBeforeVerification))
- .to.be.true;
-
- const newProofReward = await taikoL1.getProofReward(
- block.proposedAt,
- block.provenAt
- );
-
- // last proof reward should be larger than the new proof reward,
- // since we have stopped proposing, and slots are growing as we verify.
- if (lastProofReward.gt(0)) {
- expect(newProofReward).to.be.lt(lastProofReward);
- }
-
- // latest synced header should be our just-verified block hash.
- const latestHash = await taikoL1.getLatestSyncedHeader();
- expect(latestHash).to.be.eq(block.blockHash);
-
- // fork choice should be nullified via _cleanUp in LibVerifying
- const forkChoice = await taikoL1.getForkChoice(block.id, block.parentHash);
- expect(forkChoice.provenAt).to.be.eq(BigNumber.from(0));
- expect(forkChoice.provers).to.be.empty;
- expect(forkChoice.blockHash).to.be.eq(ethers.constants.HashZero);
-
- // proposer should be minted their refund of their deposit back after
- // verification, as long as their balance is > 0;
- return { newProofReward };
-}
-
-async function commitProposeProveAndVerify(
- taikoL1: TaikoL1,
- l2Provider: ethersLib.providers.JsonRpcProvider,
- blockNumber: number,
- proposer: Proposer,
- taikoTokenL1: TaikoToken,
- prover: Prover
-) {
- console.log("proposing", blockNumber);
- const { proposedEvent } = await onNewL2Block(
- l2Provider,
- blockNumber,
- proposer,
- taikoL1,
- proposer.getSigner(),
- taikoTokenL1
- );
- expect(proposedEvent).not.to.be.undefined;
-
- console.log("proving", blockNumber);
- const provedEvent = await prover.prove(
- proposedEvent.args.id.toNumber(),
- blockNumber,
- proposedEvent.args.meta as any as BlockMetadata
- );
-
- const { args } = provedEvent;
- const { blockHash, id: blockId, parentHash } = args;
-
- const proposedBlock = await taikoL1.getProposedBlock(
- proposedEvent.args.id.toNumber()
- );
-
- const forkChoice = await taikoL1.getForkChoice(
- blockId.toNumber(),
- parentHash
- );
-
- expect(forkChoice.blockHash).to.be.eq(blockHash);
-
- expect(forkChoice.prover).to.be.eq(await prover.getSigner().getAddress());
-
- console.log("verifying", blockNumber);
- const verifyEvent = await verifyBlocks(taikoL1, 1);
- expect(verifyEvent).not.to.be.eq(undefined);
- console.log("verified", blockNumber);
-
- return { verifyEvent, proposedEvent, provedEvent, proposedBlock };
-}
-
-export { verifyBlocks, verifyBlockAndAssert, commitProposeProveAndVerify };
diff --git a/packages/protocol/utils/generate_config/README.md b/packages/protocol/utils/generate_config/README.md
deleted file mode 100644
index d8d3c7986e8..00000000000
--- a/packages/protocol/utils/generate_config/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# README
-
-A script to calculate `slotSmoothingFactor` in `TaikoData.Config` given:
-
-- expected block time
-- expected proof time
-- expected slot availability multiplier
- ...
-
-## How to run
-
-`python3 main.py`
diff --git a/packages/protocol/utils/generate_config/main.py b/packages/protocol/utils/generate_config/main.py
deleted file mode 100644
index e0449f0fc45..00000000000
--- a/packages/protocol/utils/generate_config/main.py
+++ /dev/null
@@ -1,42 +0,0 @@
-import math
-
-
-if __name__ == "__main__":
- print("Expected block time (seconds)", end=": ")
- block_time = int(input())
-
- print("Expected proof time (minutes)", end=": ")
- proof_time = int(input()) * 60
-
- print("Max baseFee upside (5 = 5x)", end=": ")
- max_basefee_upside = int(input())
- if max_basefee_upside < 5:
- print("error: Max baseFee upside < 5")
- exit(1)
-
- min_num_slots = math.ceil(1.0 * proof_time / block_time)
-
- print("Extra slots (e.g, 50 means 50% more slots)", end=": ")
- extra_slots = int(input())
-
- print("---------")
-
- print("min num slots:", min_num_slots)
- max_num_slots = min_num_slots + math.ceil(min_num_slots * extra_slots / 100) + 1
-
- k = max_basefee_upside
- n = max_num_slots
-
- # https://www.wolframalpha.com/input?i=solve++%28n%2Bx%29%28n%2Bx-1%29%3Dk*%281%2Bx%29x+for+x
- fee_smoothing_factor = (
- k - 2 * n + 1 - math.sqrt(k * (k + 4 * n * n - 8 * n + 2) + 1.0)
- ) / (2 - 2 * k)
-
- fee_smoothing_factor = int(fee_smoothing_factor * 1000)
-
- # f = fee_smoothing_factor
- # print(1.0*(f+n*1000)*(f+n*1000-1000)/((f+1000)*f))
-
- print("---------")
- print("maxNumBlocks:", max_num_slots)
- print("slotSmoothingFactor:", fee_smoothing_factor)
diff --git a/packages/protocol/utils/generate_genesis/erc20.ts b/packages/protocol/utils/generate_genesis/erc20.ts
index 887cfd1a4b5..6621d400143 100644
--- a/packages/protocol/utils/generate_genesis/erc20.ts
+++ b/packages/protocol/utils/generate_genesis/erc20.ts
@@ -1,14 +1,14 @@
import { ethers } from "ethers";
import { Result } from "./interface";
const path = require("path");
-const ARTIFACTS_PATH = path.join(__dirname, "../../artifacts/contracts");
+const ARTIFACTS_PATH = path.join(__dirname, "../../out");
const {
computeStorageSlots,
getStorageLayout,
} = require("@defi-wonderland/smock/dist/src/utils");
-export const TOKEN_NAME = "PredeployERC20";
-export const TOKEN_SYMBOL = "PRE";
+export const TOKEN_NAME = "RegularERC20";
+export const TOKEN_SYMBOL = "RGL";
export const PREMINT_SEED_ACCOUNT_BALANCE = ethers.BigNumber.from(1024000);
// deployERC20 generates a L2 genesis alloc of an ERC-20 contract,
@@ -24,9 +24,11 @@ export async function deployERC20(
const artifact = require(path.join(
ARTIFACTS_PATH,
- "./test/thirdparty/TestERC20.sol/TestERC20.json"
+ "./RegularERC20.sol/RegularERC20.json"
));
+ artifact.contractName = "RegularERC20";
+
let address: string;
if (
config.contractAddresses &&
@@ -58,7 +60,7 @@ export async function deployERC20(
alloc[address] = {
contractName: artifact.contractName,
storage: {},
- code: artifact.deployedBytecode,
+ code: artifact.deployedBytecode.object,
balance: "0x0",
};
diff --git a/packages/protocol/utils/generate_genesis/interface.ts b/packages/protocol/utils/generate_genesis/interface.ts
index 0b8a1360a4f..312462f59e6 100644
--- a/packages/protocol/utils/generate_genesis/interface.ts
+++ b/packages/protocol/utils/generate_genesis/interface.ts
@@ -6,6 +6,7 @@ export interface Config {
}>;
predeployERC20: boolean;
contractAddresses: Object;
+ param1559: Object;
}
export interface Result {
diff --git a/packages/protocol/utils/generate_genesis/taikoL2.ts b/packages/protocol/utils/generate_genesis/taikoL2.ts
index 2853c6f0ad4..7ee7b4a9f75 100644
--- a/packages/protocol/utils/generate_genesis/taikoL2.ts
+++ b/packages/protocol/utils/generate_genesis/taikoL2.ts
@@ -7,7 +7,7 @@ const {
computeStorageSlots,
getStorageLayout,
} = require("@defi-wonderland/smock/dist/src/utils");
-const ARTIFACTS_PATH = path.join(__dirname, "../../artifacts/contracts");
+const ARTIFACTS_PATH = path.join(__dirname, "../../out");
// deployTaikoL2 generates a L2 genesis alloc of the TaikoL2 contract.
export async function deployTaikoL2(
@@ -40,7 +40,8 @@ export async function deployTaikoL2(
const contractConfigs: any = await generateContractConfigs(
contractOwner,
chainId,
- config.contractAddresses
+ config.contractAddresses,
+ config.param1559
);
const storageLayouts: any = {};
@@ -93,50 +94,44 @@ export async function deployTaikoL2(
async function generateContractConfigs(
contractOwner: string,
chainId: number,
- hardCodedAddresses: any
+ hardCodedAddresses: any,
+ param1559: any
): Promise {
const contractArtifacts: any = {
// Libraries
LibTrieProof: require(path.join(
ARTIFACTS_PATH,
- "./libs/LibTrieProof.sol/LibTrieProof.json"
+ "./LibTrieProof.sol/LibTrieProof.json"
)),
LibBridgeRetry: require(path.join(
ARTIFACTS_PATH,
- "./bridge/libs/LibBridgeRetry.sol/LibBridgeRetry.json"
+ "./LibBridgeRetry.sol/LibBridgeRetry.json"
)),
LibBridgeProcess: require(path.join(
ARTIFACTS_PATH,
- "./bridge/libs/LibBridgeProcess.sol/LibBridgeProcess.json"
- )),
- LibTxDecoder: require(path.join(
- ARTIFACTS_PATH,
- "./libs/LibTxDecoder.sol/LibTxDecoder.json"
+ "./LibBridgeProcess.sol/LibBridgeProcess.json"
)),
// Contracts
AddressManager: require(path.join(
ARTIFACTS_PATH,
- "./thirdparty/AddressManager.sol/AddressManager.json"
+ "./AddressManager.sol/AddressManager.json"
)),
TaikoL2: require(path.join(
ARTIFACTS_PATH,
- "./L2/TaikoL2.sol/TaikoL2.json"
- )),
- Bridge: require(path.join(
- ARTIFACTS_PATH,
- "./bridge/Bridge.sol/Bridge.json"
+ "./TaikoL2.sol/TaikoL2.json"
)),
+ Bridge: require(path.join(ARTIFACTS_PATH, "./Bridge.sol/Bridge.json")),
TokenVault: require(path.join(
ARTIFACTS_PATH,
- "./bridge/TokenVault.sol/TokenVault.json"
+ "./TokenVault.sol/TokenVault.json"
)),
EtherVault: require(path.join(
ARTIFACTS_PATH,
- "./bridge/EtherVault.sol/EtherVault.json"
+ "./EtherVault.sol/EtherVault.json"
)),
SignalService: require(path.join(
ARTIFACTS_PATH,
- "./signal/SignalService.sol/SignalService.json"
+ "./SignalService.sol/SignalService.json"
)),
};
@@ -147,10 +142,6 @@ async function generateContractConfigs(
switch (contractName) {
case "TaikoL2":
- if (!addressMap.LibTxDecoder) {
- throw new Error("LibTxDecoder not initialized");
- }
-
bytecode = linkContractLibs(
contractArtifacts.TaikoL2,
addressMap
@@ -219,12 +210,14 @@ async function generateContractConfigs(
// Libraries
LibTrieProof: {
address: addressMap.LibTrieProof,
- deployedBytecode: contractArtifacts.LibTrieProof.deployedBytecode,
+ deployedBytecode:
+ contractArtifacts.LibTrieProof.deployedBytecode.object,
variables: {},
},
LibBridgeRetry: {
address: addressMap.LibBridgeRetry,
- deployedBytecode: contractArtifacts.LibBridgeRetry.deployedBytecode,
+ deployedBytecode:
+ contractArtifacts.LibBridgeRetry.deployedBytecode.object,
variables: {},
},
LibBridgeProcess: {
@@ -235,14 +228,10 @@ async function generateContractConfigs(
),
variables: {},
},
- LibTxDecoder: {
- address: addressMap.LibTxDecoder,
- deployedBytecode: contractArtifacts.LibTxDecoder.deployedBytecode,
- variables: {},
- },
AddressManager: {
address: addressMap.AddressManager,
- deployedBytecode: contractArtifacts.AddressManager.deployedBytecode,
+ deployedBytecode:
+ contractArtifacts.AddressManager.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
@@ -251,27 +240,23 @@ async function generateContractConfigs(
_owner: contractOwner,
// AddressManager
addresses: {
- // keccak256(abi.encodePacked(_name))
- [`${ethers.utils.solidityKeccak256(
- ["string"],
- [`${chainId}.taiko`]
- )}`]: addressMap.TaikoL2,
- [`${ethers.utils.solidityKeccak256(
- ["string"],
- [`${chainId}.bridge`]
- )}`]: addressMap.Bridge,
- [`${ethers.utils.solidityKeccak256(
- ["string"],
- [`${chainId}.token_vault`]
- )}`]: addressMap.TokenVault,
- [`${ethers.utils.solidityKeccak256(
- ["string"],
- [`${chainId}.ether_vault`]
- )}`]: addressMap.EtherVault,
- [`${ethers.utils.solidityKeccak256(
- ["string"],
- [`${chainId}.signal_service`]
- )}`]: addressMap.SignalService,
+ [chainId]: {
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("taiko")
+ )]: addressMap.TaikoL2,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("bridge")
+ )]: addressMap.Bridge,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("token_vault")
+ )]: addressMap.TokenVault,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("ether_vault")
+ )]: addressMap.EtherVault,
+ [ethers.utils.hexlify(
+ ethers.utils.toUtf8Bytes("signal_service")
+ )]: addressMap.SignalService,
+ },
},
},
},
@@ -282,21 +267,28 @@ async function generateContractConfigs(
addressMap
),
variables: {
- // ReentrancyGuardUpgradeable
- _status: 1, // _NOT_ENTERED
- // AddressResolver
- _addressManager: addressMap.AddressManager,
// TaikoL2
// keccak256(abi.encodePacked(block.chainid, basefee, ancestors))
- _publicInputHash: `${ethers.utils.solidityKeccak256(
- ["uint256", "uint256", "uint256", "bytes32[255]"],
+ publicInputHash: `${ethers.utils.solidityKeccak256(
+ ["bytes32[256]"],
[
- chainId,
- 0,
- 0,
- new Array(255).fill(ethers.constants.HashZero),
+ new Array(255)
+ .fill(ethers.constants.HashZero)
+ .concat([
+ ethers.utils.hexZeroPad(
+ ethers.utils.hexlify(chainId),
+ 32
+ ),
+ ]),
]
)}`,
+ yscale: ethers.BigNumber.from(param1559.yscale),
+ xscale: ethers.BigNumber.from(param1559.xscale),
+ gasIssuedPerSecond: ethers.BigNumber.from(
+ param1559.gasIssuedPerSecond
+ ),
+ parentTimestamp: Math.floor(new Date().getTime() / 1000),
+ gasExcess: ethers.BigNumber.from(param1559.gasExcess),
},
},
Bridge: {
@@ -321,7 +313,8 @@ async function generateContractConfigs(
},
TokenVault: {
address: addressMap.TokenVault,
- deployedBytecode: contractArtifacts.TokenVault.deployedBytecode,
+ deployedBytecode:
+ contractArtifacts.TokenVault.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
@@ -336,7 +329,8 @@ async function generateContractConfigs(
},
EtherVault: {
address: addressMap.EtherVault,
- deployedBytecode: contractArtifacts.EtherVault.deployedBytecode,
+ deployedBytecode:
+ contractArtifacts.EtherVault.deployedBytecode.object,
variables: {
// initializer
_initialized: 1,
@@ -377,10 +371,10 @@ async function generateContractConfigs(
// Ref: https://docs.soliditylang.org/en/latest/using-the-compiler.html#library-linking
function linkContractLibs(artifact: any, addressMap: any) {
const linkedBytecode: string = linker.linkBytecode(
- artifact.deployedBytecode,
+ artifact.deployedBytecode.object,
getLinkLibs(
artifact,
- linker.findLinkReferences(artifact.deployedBytecode),
+ linker.findLinkReferences(artifact.deployedBytecode.object),
addressMap
)
);
@@ -397,7 +391,7 @@ function linkContractLibs(artifact: any, addressMap: any) {
function getLinkLibs(artifact: any, linkRefs: any, addressMap: any) {
const result: any = {};
- Object.values(artifact.deployedLinkReferences).forEach(
+ Object.values(artifact.deployedBytecode.linkReferences).forEach(
(linkReference: any) => {
const contractName = Object.keys(linkReference)[0];
const linkRefKey: any = Object.keys(linkRefs).find(
diff --git a/packages/relayer/TaikoL1.json b/packages/relayer/TaikoL1.json
index f04a963da2d..49d131b5910 100644
--- a/packages/relayer/TaikoL1.json
+++ b/packages/relayer/TaikoL1.json
@@ -99,11 +99,6 @@
"name": "L1_COMMITTED",
"type": "error"
},
- {
- "inputs": [],
- "name": "L1_CONFLICT_PROOF",
- "type": "error"
- },
{
"inputs": [],
"name": "L1_CONTRACT_NOT_ALLOWED",
@@ -473,12 +468,12 @@
},
{
"internalType": "uint256",
- "name": "maxNumBlocks",
+ "name": "maxNumProposedBlocks",
"type": "uint256"
},
{
"internalType": "uint256",
- "name": "blockHashHistory",
+ "name": "maxNumVerifiedBlocks",
"type": "uint256"
},
{
@@ -521,11 +516,6 @@
"name": "slotSmoothingFactor",
"type": "uint256"
},
- {
- "internalType": "uint256",
- "name": "rewardBurnBips",
- "type": "uint256"
- },
{
"internalType": "uint256",
"name": "proposerDepositPctg",
@@ -533,7 +523,7 @@
},
{
"internalType": "uint256",
- "name": "feeBaseMAF",
+ "name": "basefeeMAF",
"type": "uint256"
},
{
@@ -548,7 +538,7 @@
},
{
"internalType": "uint64",
- "name": "rewardMultiplierPctg",
+ "name": "feeMultiplierPctg",
"type": "uint64"
},
{
@@ -558,7 +548,7 @@
},
{
"internalType": "uint64",
- "name": "feeMaxPeriodPctg",
+ "name": "feeMaxPctg",
"type": "uint64"
},
{
@@ -727,7 +717,7 @@
"type": "address"
}
],
- "name": "getRewardBalance",
+ "name": "getBalance",
"outputs": [
{
"internalType": "uint256",
@@ -746,7 +736,7 @@
"components": [
{
"internalType": "uint256",
- "name": "feeBase",
+ "name": "basefee",
"type": "uint256"
},
{
@@ -781,7 +771,7 @@
},
{
"internalType": "uint64",
- "name": "latestVerifiedId",
+ "name": "lastBlockId",
"type": "uint64"
},
{
@@ -831,7 +821,7 @@
},
{
"internalType": "uint256",
- "name": "_feeBase",
+ "name": "_basefee",
"type": "uint256"
}
],
@@ -1051,7 +1041,7 @@
},
{
"internalType": "uint256",
- "name": "feeBase",
+ "name": "basefee",
"type": "uint256"
},
{
@@ -1081,7 +1071,7 @@
},
{
"internalType": "uint64",
- "name": "latestVerifiedId",
+ "name": "lastBlockId",
"type": "uint64"
},
{
diff --git a/packages/relayer/contracts/taikol1/TaikoL1.go b/packages/relayer/contracts/taikol1/TaikoL1.go
index 536a40aa63a..f1ae8e258aa 100644
--- a/packages/relayer/contracts/taikol1/TaikoL1.go
+++ b/packages/relayer/contracts/taikol1/TaikoL1.go
@@ -31,7 +31,7 @@ var (
// LibUtilsStateVariables is an auto generated low-level Go binding around an user-defined struct.
type LibUtilsStateVariables struct {
- FeeBase *big.Int
+ Basefee *big.Int
GenesisHeight uint64
GenesisTimestamp uint64
NextBlockId uint64
@@ -72,7 +72,7 @@ type TaikoDataConfig struct {
SlotSmoothingFactor *big.Int
RewardBurnBips *big.Int
ProposerDepositPctg *big.Int
- FeeBaseMAF *big.Int
+ BasefeeMAF *big.Int
BlockTimeMAF *big.Int
ProofTimeMAF *big.Int
RewardMultiplierPctg uint64
@@ -103,7 +103,7 @@ type TaikoDataProposedBlock struct {
// TaikoL1MetaData contains all meta data concerning the TaikoL1 contract.
var TaikoL1MetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[],\"name\":\"L1_0_FEE_BASE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_0_FEE_BASE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_CALLDATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_DEST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_DATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_LOGS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_TOPICS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_SIG_R\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_SIG_S\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_TX_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_TYPE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_NUMBER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_NUMBER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_CANNOT_BE_FIRST_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_COMMITTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_CONFLICT_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_CONTRACT_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_DUP_PROVERS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_EXTRA_DATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INPUT_SIZE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_CONFIG\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_METADATA_FIELD\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_META_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_COMMITTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ORACLE_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROOF_LENGTH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SOLO_PROPOSER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ZKP\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"commitSlot\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"commitHash\",\"type\":\"bytes32\"}],\"name\":\"BlockCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"commitHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"commitSlot\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"commitSlot\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"commitHash\",\"type\":\"bytes32\"}],\"name\":\"commitBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockHashHistory\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitConfirmations\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"anchorTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slotSmoothingFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardBurnBips\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerDepositPctg\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeBaseMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"rewardMultiplierPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeGracePeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeMaxPeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"bootstrapDiscountHalvingPeriod\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enableTokenomics\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enablePublicInputsCheck\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enableAnchorValidation\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"}],\"name\":\"getProofReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getProposedBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"deposit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.ProposedBlock\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getRewardBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"feeBase\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgBlockTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"latestVerifiedHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"latestVerifiedId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgProofTime\",\"type\":\"uint64\"}],\"internalType\":\"structLibUtils.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_feeBase\",\"type\":\"uint256\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commitSlot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitHeight\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"commitHash\",\"type\":\"bytes32\"}],\"name\":\"isCommitValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"}],\"name\":\"proposeBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"}],\"name\":\"proveBlockInvalid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"k\",\"type\":\"uint8\"}],\"name\":\"signWithGoldenTouch\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"r\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reservedA1\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reservedA2\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"feeBase\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"nextBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgBlockTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__avgGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"latestVerifiedHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"latestVerifiedId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgProofTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reservedC1\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
+ ABI: "[{\"inputs\":[],\"name\":\"L1_0_FEE_BASE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ALREADY_PROVEN\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_CALLDATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_DEST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_ADDR\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_DATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_LOGS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_RECEIPT_TOPICS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_SIG_R\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_SIG_S\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_TX_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ANCHOR_TYPE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_NUMBER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_BLOCK_NUMBER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_CANNOT_BE_FIRST_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_COMMITTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_CONFLICT_PROOF\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_CONTRACT_NOT_ALLOWED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_DUP_PROVERS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_EXTRA_DATA\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_GAS_LIMIT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INPUT_SIZE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_INVALID_PARAM\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_METADATA_FIELD\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_META_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_COMMITTED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_NOT_ORACLE_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROOF_LENGTH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_PROVER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_SOLO_PROPOSER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TOO_MANY_BLOCKS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_TX_LIST\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L1_ZKP\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"commitSlot\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"commitHash\",\"type\":\"bytes32\"}],\"name\":\"BlockCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"mixHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"gasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"commitHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"commitSlot\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structTaikoData.BlockMetadata\",\"name\":\"meta\",\"type\":\"tuple\"}],\"name\":\"BlockProposed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"}],\"name\":\"BlockProven\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"}],\"name\":\"BlockVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"commitSlot\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"commitHash\",\"type\":\"bytes32\"}],\"name\":\"commitBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumVerifiedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitConfirmations\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"anchorTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slotSmoothingFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardBurnBips\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerDepositPctg\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"basefeeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"feeMultiplierPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeGracePeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeMaxPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"bootstrapDiscountHalvingPeriod\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enableTokenomics\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enablePublicInputsCheck\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enableAnchorValidation\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"parentHash\",\"type\":\"bytes32\"}],\"name\":\"getForkChoice\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"prover\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.ForkChoice\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"provenAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"}],\"name\":\"getProofReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getProposedBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"metaHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"deposit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"proposedAt\",\"type\":\"uint64\"}],\"internalType\":\"structTaikoData.ProposedBlock\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStateVariables\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"nextBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgBlockTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"latestVerifiedHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgProofTime\",\"type\":\"uint64\"}],\"internalType\":\"structLibUtils.StateVariables\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_genesisBlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_basefee\",\"type\":\"uint256\"}],\"name\":\"init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commitSlot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitHeight\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"commitHash\",\"type\":\"bytes32\"}],\"name\":\"isCommitValid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"}],\"name\":\"proposeBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"}],\"name\":\"proveBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockId\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"inputs\",\"type\":\"bytes[]\"}],\"name\":\"proveBlockInvalid\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"k\",\"type\":\"uint8\"}],\"name\":\"signWithGoldenTouch\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"r\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"s\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"genesisHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"genesisTimestamp\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reservedA1\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reservedA2\",\"type\":\"uint64\"},{\"internalType\":\"uint256\",\"name\":\"basefee\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"nextBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastProposedAt\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgBlockTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__avgGasLimit\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"latestVerifiedHeight\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastBlockId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"avgProofTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"__reservedC1\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"maxBlocks\",\"type\":\"uint256\"}],\"name\":\"verifyBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}
// TaikoL1ABI is the input ABI used to generate the binding from.
@@ -471,10 +471,10 @@ func (_TaikoL1 *TaikoL1CallerSession) GetProposedBlock(id *big.Int) (TaikoDataPr
// GetRewardBalance is a free data retrieval call binding the contract method 0xd5a849e9.
//
-// Solidity: function getRewardBalance(address addr) view returns(uint256)
+// Solidity: function getBalance(address addr) view returns(uint256)
func (_TaikoL1 *TaikoL1Caller) GetRewardBalance(opts *bind.CallOpts, addr common.Address) (*big.Int, error) {
var out []interface{}
- err := _TaikoL1.contract.Call(opts, &out, "getRewardBalance", addr)
+ err := _TaikoL1.contract.Call(opts, &out, "getBalance", addr)
if err != nil {
return *new(*big.Int), err
@@ -488,14 +488,14 @@ func (_TaikoL1 *TaikoL1Caller) GetRewardBalance(opts *bind.CallOpts, addr common
// GetRewardBalance is a free data retrieval call binding the contract method 0xd5a849e9.
//
-// Solidity: function getRewardBalance(address addr) view returns(uint256)
+// Solidity: function getBalance(address addr) view returns(uint256)
func (_TaikoL1 *TaikoL1Session) GetRewardBalance(addr common.Address) (*big.Int, error) {
return _TaikoL1.Contract.GetRewardBalance(&_TaikoL1.CallOpts, addr)
}
// GetRewardBalance is a free data retrieval call binding the contract method 0xd5a849e9.
//
-// Solidity: function getRewardBalance(address addr) view returns(uint256)
+// Solidity: function getBalance(address addr) view returns(uint256)
func (_TaikoL1 *TaikoL1CallerSession) GetRewardBalance(addr common.Address) (*big.Int, error) {
return _TaikoL1.Contract.GetRewardBalance(&_TaikoL1.CallOpts, addr)
}
@@ -738,13 +738,13 @@ func (_TaikoL1 *TaikoL1CallerSession) SignWithGoldenTouch(hash [32]byte, k uint8
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reservedA1, uint64 __reservedA2, uint256 feeBase, uint64 nextBlockId, uint64 lastProposedAt, uint64 avgBlockTime, uint64 __avgGasLimit, uint64 latestVerifiedHeight, uint64 latestVerifiedId, uint64 avgProofTime, uint64 __reservedC1)
+// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reservedA1, uint64 __reservedA2, uint256 basefee, uint64 nextBlockId, uint64 lastProposedAt, uint64 avgBlockTime, uint64 __avgGasLimit, uint64 latestVerifiedHeight, uint64 lastBlockId, uint64 avgProofTime, uint64 __reservedC1)
func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
GenesisHeight uint64
GenesisTimestamp uint64
ReservedA1 uint64
ReservedA2 uint64
- FeeBase *big.Int
+ Basefee *big.Int
NextBlockId uint64
LastProposedAt uint64
AvgBlockTime uint64
@@ -762,7 +762,7 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
GenesisTimestamp uint64
ReservedA1 uint64
ReservedA2 uint64
- FeeBase *big.Int
+ Basefee *big.Int
NextBlockId uint64
LastProposedAt uint64
AvgBlockTime uint64
@@ -780,7 +780,7 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
outstruct.GenesisTimestamp = *abi.ConvertType(out[1], new(uint64)).(*uint64)
outstruct.ReservedA1 = *abi.ConvertType(out[2], new(uint64)).(*uint64)
outstruct.ReservedA2 = *abi.ConvertType(out[3], new(uint64)).(*uint64)
- outstruct.FeeBase = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
+ outstruct.Basefee = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int)
outstruct.NextBlockId = *abi.ConvertType(out[5], new(uint64)).(*uint64)
outstruct.LastProposedAt = *abi.ConvertType(out[6], new(uint64)).(*uint64)
outstruct.AvgBlockTime = *abi.ConvertType(out[7], new(uint64)).(*uint64)
@@ -796,13 +796,13 @@ func (_TaikoL1 *TaikoL1Caller) State(opts *bind.CallOpts) (struct {
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reservedA1, uint64 __reservedA2, uint256 feeBase, uint64 nextBlockId, uint64 lastProposedAt, uint64 avgBlockTime, uint64 __avgGasLimit, uint64 latestVerifiedHeight, uint64 latestVerifiedId, uint64 avgProofTime, uint64 __reservedC1)
+// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reservedA1, uint64 __reservedA2, uint256 basefee, uint64 nextBlockId, uint64 lastProposedAt, uint64 avgBlockTime, uint64 __avgGasLimit, uint64 latestVerifiedHeight, uint64 lastBlockId, uint64 avgProofTime, uint64 __reservedC1)
func (_TaikoL1 *TaikoL1Session) State() (struct {
GenesisHeight uint64
GenesisTimestamp uint64
ReservedA1 uint64
ReservedA2 uint64
- FeeBase *big.Int
+ Basefee *big.Int
NextBlockId uint64
LastProposedAt uint64
AvgBlockTime uint64
@@ -817,13 +817,13 @@ func (_TaikoL1 *TaikoL1Session) State() (struct {
// State is a free data retrieval call binding the contract method 0xc19d93fb.
//
-// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reservedA1, uint64 __reservedA2, uint256 feeBase, uint64 nextBlockId, uint64 lastProposedAt, uint64 avgBlockTime, uint64 __avgGasLimit, uint64 latestVerifiedHeight, uint64 latestVerifiedId, uint64 avgProofTime, uint64 __reservedC1)
+// Solidity: function state() view returns(uint64 genesisHeight, uint64 genesisTimestamp, uint64 __reservedA1, uint64 __reservedA2, uint256 basefee, uint64 nextBlockId, uint64 lastProposedAt, uint64 avgBlockTime, uint64 __avgGasLimit, uint64 latestVerifiedHeight, uint64 lastBlockId, uint64 avgProofTime, uint64 __reservedC1)
func (_TaikoL1 *TaikoL1CallerSession) State() (struct {
GenesisHeight uint64
GenesisTimestamp uint64
ReservedA1 uint64
ReservedA2 uint64
- FeeBase *big.Int
+ Basefee *big.Int
NextBlockId uint64
LastProposedAt uint64
AvgBlockTime uint64
@@ -859,23 +859,23 @@ func (_TaikoL1 *TaikoL1TransactorSession) CommitBlock(commitSlot uint64, commitH
// Init is a paid mutator transaction binding the contract method 0x9c5e9f06.
//
-// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _feeBase) returns()
-func (_TaikoL1 *TaikoL1Transactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _feeBase *big.Int) (*types.Transaction, error) {
- return _TaikoL1.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _feeBase)
+// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _basefee) returns()
+func (_TaikoL1 *TaikoL1Transactor) Init(opts *bind.TransactOpts, _addressManager common.Address, _genesisBlockHash [32]byte, _basefee *big.Int) (*types.Transaction, error) {
+ return _TaikoL1.contract.Transact(opts, "init", _addressManager, _genesisBlockHash, _basefee)
}
// Init is a paid mutator transaction binding the contract method 0x9c5e9f06.
//
-// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _feeBase) returns()
-func (_TaikoL1 *TaikoL1Session) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _feeBase *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _feeBase)
+// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _basefee) returns()
+func (_TaikoL1 *TaikoL1Session) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _basefee *big.Int) (*types.Transaction, error) {
+ return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _basefee)
}
// Init is a paid mutator transaction binding the contract method 0x9c5e9f06.
//
-// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _feeBase) returns()
-func (_TaikoL1 *TaikoL1TransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _feeBase *big.Int) (*types.Transaction, error) {
- return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _feeBase)
+// Solidity: function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _basefee) returns()
+func (_TaikoL1 *TaikoL1TransactorSession) Init(_addressManager common.Address, _genesisBlockHash [32]byte, _basefee *big.Int) (*types.Transaction, error) {
+ return _TaikoL1.Contract.Init(&_TaikoL1.TransactOpts, _addressManager, _genesisBlockHash, _basefee)
}
// ProposeBlock is a paid mutator transaction binding the contract method 0xa043dbdf.
diff --git a/packages/relayer/contracts/taikol2/TaikoL2.go b/packages/relayer/contracts/taikol2/TaikoL2.go
index 1e1de851ce1..041a57d5296 100644
--- a/packages/relayer/contracts/taikol2/TaikoL2.go
+++ b/packages/relayer/contracts/taikol2/TaikoL2.go
@@ -44,7 +44,7 @@ type TaikoDataConfig struct {
SlotSmoothingFactor *big.Int
RewardBurnBips *big.Int
ProposerDepositPctg *big.Int
- FeeBaseMAF *big.Int
+ BasefeeMAF *big.Int
BlockTimeMAF *big.Int
ProofTimeMAF *big.Int
RewardMultiplierPctg uint64
@@ -60,12 +60,11 @@ type TaikoDataConfig struct {
// TaikoL2MetaData contains all meta data concerning the TaikoL2 contract.
var TaikoL2MetaData = &bind.MetaData{
- ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ERR_INVALID_HINT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERR_INVALID_TX_IDX\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERR_PARAMS_NOT_DEFAULTS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERR_VERIFICATION_FAILURE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_GAS_PRICE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_SENDER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_PUBLIC_INPUT_HASH_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"}],\"name\":\"BlockInvalidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockHashHistory\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitConfirmations\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"anchorTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slotSmoothingFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardBurnBips\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerDepositPctg\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feeBaseMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"rewardMultiplierPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeGracePeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeMaxPeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"bootstrapDiscountHalvingPeriod\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enableTokenomics\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enablePublicInputsCheck\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enableAnchorValidation\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"},{\"internalType\":\"enumLibInvalidTxList.Hint\",\"name\":\"hint\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"txIdx\",\"type\":\"uint256\"}],\"name\":\"invalidateBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
+ ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ERR_INVALID_HINT\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERR_INVALID_TX_IDX\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERR_PARAMS_NOT_DEFAULTS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERR_VERIFICAITON_FAILURE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_CHAIN_ID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_GAS_PRICE\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_INVALID_SENDER\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"L2_PUBLIC_INPUT_HASH_MISMATCH\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_DENIED\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RESOLVER_INVALID_ADDR\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"}],\"name\":\"BlockInvalidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumVerifiedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitConfirmations\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"anchorTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"slotSmoothingFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardBurnBips\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerDepositPctg\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"basefeeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"rewardMultiplierPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeGracePeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeMaxPeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"bootstrapDiscountHalvingPeriod\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enableTokenomics\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enablePublicInputsCheck\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enableAnchorValidation\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"},{\"internalType\":\"enumLibInvalidTxList.Hint\",\"name\":\"hint\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"txIdx\",\"type\":\"uint256\"}],\"name\":\"invalidateBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}
// TaikoL2ABI is the input ABI used to generate the binding from.
-// Deprecated: Use TaikoL2MetaData.ABI instead.
-var TaikoL2ABI = TaikoL2MetaData.ABI
+const TaikoL2ABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addressManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txListHash\",\"type\":\"bytes32\"}],\"name\":\"BlockInvalidated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"srcHeight\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"srcHash\",\"type\":\"bytes32\"}],\"name\":\"HeaderSynced\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"addressManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"l1Height\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"l1Hash\",\"type\":\"bytes32\"}],\"name\":\"anchor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getBlockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumProposedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxNumVerifiedBlocks\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zkProofsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxVerificationsPerTx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"commitConfirmations\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxProofsPerForkChoice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockMaxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxTransactionsPerBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxBytesPerTxList\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"anchorTxGasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feePremiumLamda\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardBurnBips\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proposerDepositPctg\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"basefeeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"proofTimeMAF\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"feeMultiplierPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeGracePeriodPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"feeMaxPctg\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"blockTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"proofTimeCap\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"bootstrapDiscountHalvingPeriod\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"initialUncleDelay\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"enableTokenomics\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enablePublicInputsCheck\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"enableAnchorValidation\",\"type\":\"bool\"}],\"internalType\":\"structTaikoData.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"getSyncedHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"txList\",\"type\":\"bytes\"},{\"internalType\":\"enumLibInvalidTxList.Reason\",\"name\":\"hint\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"txIdx\",\"type\":\"uint256\"}],\"name\":\"invalidateBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSyncedL1Height\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicInputHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bool\",\"name\":\"allowZeroAddress\",\"type\":\"bool\"}],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
// TaikoL2 is an auto generated Go binding around an Ethereum contract.
type TaikoL2 struct {
diff --git a/packages/relayer/encoding/storage_proof.go b/packages/relayer/encoding/storage_proof.go
deleted file mode 100644
index aa4d35bf2be..00000000000
--- a/packages/relayer/encoding/storage_proof.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package encoding
-
-import (
- "github.com/ethereum/go-ethereum/accounts/abi"
- "github.com/pkg/errors"
-)
-
-func EncodeStorageProof(accountProof []byte, storageProof []byte) ([]byte, error) {
- args := abi.Arguments{
- {
- Type: bytesT,
- },
- {
- Type: bytesT,
- },
- }
-
- encodedStorageProof, err := args.Pack(accountProof, storageProof)
- if err != nil {
- return nil, errors.Wrap(err, "args.Pack")
- }
-
- return encodedStorageProof, nil
-}
diff --git a/packages/relayer/encoding/storage_proof_test.go b/packages/relayer/encoding/storage_proof_test.go
deleted file mode 100644
index d850b5d7d44..00000000000
--- a/packages/relayer/encoding/storage_proof_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package encoding
-
-import (
- "testing"
-
- "github.com/ethereum/go-ethereum/common/hexutil"
- "gopkg.in/go-playground/assert.v1"
-)
-
-func Test_EncodeStorageProof(t *testing.T) {
- // nolint: lll
- accountProof := "0x00edb9377a94f02e691ea208a80a7bd13dcb51dfae3a389d3001a55c5fdf3f3ae70807df1d8ffcaeefa5dc56875a03dae3494d93bbf3074018fea52137a098433d9795f455fcfaf89b6456b970605bd0f70bec98418ef322fa5bba9874ab2277225a38c19f99275cd6d25d9cd4259c366c02b750056a6b71810034f95d34ae12c1298a95e6ba03de90dbbfacc5c8edbeb6ed93a0e01c08f3435b1ca944e9229a176804445432795c14dc315925fe2480084d6b0729c30fb1c2e50e481df5d7daa25769a0c74baf362ff02f2a934538cd11bf939f64377489255aa60a12628b130f4bddd30664d6b5f91d17cc110bee38a7ce5c629585e57d777bfbb2eaf09e15"
- // nolint: lll
- storageProof := "0xfdb3b1c60d5e8417c0c2c1023544837fb73612bbc7511bf30dd0b2e282f1618a7b39a9baa238904acf33a97b1617f4a971da22ac40faf828ceb651f76be9df259f91037b93fcc1e8c9c8004f84aff0fafa4e446c30a4cef66a5a9cf529541d40d49ba6c2c64311cb221d3b80c622e886ec3d6780a6bdb6c47fe4f2d9a8704ccdb9bb29feb58e79b81b5e24d39be45c32d9161b1b36fb49f36404c9bea5c505862a463b07c178e6b28ff53f23ecaa5f2ae02f2db4e57a2fc2aa4a014dc0fa6f835881dc0f1cda6ee66f32141e5a421731ce5e19d875aad61284a33b9e1bc6c895098b1f347063109403551360b675a443b06c6675fd6554e7245ee95036928665"
- // nolint: lll
- want := "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000010000edb9377a94f02e691ea208a80a7bd13dcb51dfae3a389d3001a55c5fdf3f3ae70807df1d8ffcaeefa5dc56875a03dae3494d93bbf3074018fea52137a098433d9795f455fcfaf89b6456b970605bd0f70bec98418ef322fa5bba9874ab2277225a38c19f99275cd6d25d9cd4259c366c02b750056a6b71810034f95d34ae12c1298a95e6ba03de90dbbfacc5c8edbeb6ed93a0e01c08f3435b1ca944e9229a176804445432795c14dc315925fe2480084d6b0729c30fb1c2e50e481df5d7daa25769a0c74baf362ff02f2a934538cd11bf939f64377489255aa60a12628b130f4bddd30664d6b5f91d17cc110bee38a7ce5c629585e57d777bfbb2eaf09e150000000000000000000000000000000000000000000000000000000000000100fdb3b1c60d5e8417c0c2c1023544837fb73612bbc7511bf30dd0b2e282f1618a7b39a9baa238904acf33a97b1617f4a971da22ac40faf828ceb651f76be9df259f91037b93fcc1e8c9c8004f84aff0fafa4e446c30a4cef66a5a9cf529541d40d49ba6c2c64311cb221d3b80c622e886ec3d6780a6bdb6c47fe4f2d9a8704ccdb9bb29feb58e79b81b5e24d39be45c32d9161b1b36fb49f36404c9bea5c505862a463b07c178e6b28ff53f23ecaa5f2ae02f2db4e57a2fc2aa4a014dc0fa6f835881dc0f1cda6ee66f32141e5a421731ce5e19d875aad61284a33b9e1bc6c895098b1f347063109403551360b675a443b06c6675fd6554e7245ee95036928665"
- proof, err := EncodeStorageProof(hexutil.MustDecode(accountProof), hexutil.MustDecode(storageProof))
- assert.Equal(t, nil, err)
- assert.Equal(t, hexutil.Encode(proof), want)
-}
diff --git a/packages/relayer/encoding/types.go b/packages/relayer/encoding/types.go
index c6bfad5843a..7b8ed26c921 100644
--- a/packages/relayer/encoding/types.go
+++ b/packages/relayer/encoding/types.go
@@ -117,5 +117,3 @@ var signalProofT, _ = abi.NewType("tuple", "", []abi.ArgumentMarshaling{
Type: "bytes",
},
})
-
-var bytesT, _ = abi.NewType("bytes", "", nil)
diff --git a/packages/relayer/proof/encoded_signal_proof.go b/packages/relayer/proof/encoded_signal_proof.go
index 4e7d26681e0..83aaf4af3a7 100644
--- a/packages/relayer/proof/encoded_signal_proof.go
+++ b/packages/relayer/proof/encoded_signal_proof.go
@@ -77,20 +77,10 @@ func (p *Prover) encodedStorageProof(
return nil, errors.New("proof will not be valid, expected storageProof to be 1 but was not")
}
- rlpEncodedAccountProof, err := rlp.EncodeToBytes(ethProof.AccountProof)
- if err != nil {
- return nil, errors.Wrap(err, "rlp.EncodeToBytes(proof.AccountProof")
- }
-
rlpEncodedStorageProof, err := rlp.EncodeToBytes(ethProof.StorageProof[0].Proof)
if err != nil {
return nil, errors.Wrap(err, "rlp.EncodeToBytes(proof.StorageProof[0].Proof")
}
- encodedStorageProof, err := encoding.EncodeStorageProof(rlpEncodedAccountProof, rlpEncodedStorageProof)
- if err != nil {
- return nil, errors.Wrap(err, "encoding.EncodeStorageProof")
- }
-
- return encodedStorageProof, nil
+ return rlpEncodedStorageProof, nil
}
diff --git a/packages/relayer/proof/encoded_signal_proof_test.go b/packages/relayer/proof/encoded_signal_proof_test.go
index bf375c4942c..f1845faa48e 100644
--- a/packages/relayer/proof/encoded_signal_proof_test.go
+++ b/packages/relayer/proof/encoded_signal_proof_test.go
@@ -12,7 +12,7 @@ import (
var (
// nolint: lll
- wantEncoded = "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003803a537c89809712367218bb171b3b1c46aa95df3dee7200ae9dc78f40520240681dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934700000000000000000000000000000000000000000000000000000000000000001dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493471dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493471dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000004d200000000000000000000000000000000000000000000000000000000000003001dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934700000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000"
+ wantEncoded = "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000003803a537c89809712367218bb171b3b1c46aa95df3dee7200ae9dc78f40520240681dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934700000000000000000000000000000000000000000000000000000000000000001dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493471dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493471dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000186a000000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000004d200000000000000000000000000000000000000000000000000000000000003001dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934700000000000000000000000000000000000000000000000013000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000"
)
func Test_EncodedSignalProof(t *testing.T) {
diff --git a/packages/status-page/src/constants/abi/TaikoL1.ts b/packages/status-page/src/constants/abi/TaikoL1.ts
index 72b441cd597..2220bc4637f 100644
--- a/packages/status-page/src/constants/abi/TaikoL1.ts
+++ b/packages/status-page/src/constants/abi/TaikoL1.ts
@@ -473,12 +473,12 @@ export default [
},
{
internalType: "uint256",
- name: "maxNumBlocks",
+ name: "maxNumProposedBlocks",
type: "uint256",
},
{
internalType: "uint256",
- name: "blockHashHistory",
+ name: "maxNumVerifiedBlocks",
type: "uint256",
},
{
@@ -533,7 +533,7 @@ export default [
},
{
internalType: "uint256",
- name: "feeBaseMAF",
+ name: "basefeeMAF",
type: "uint256",
},
{
@@ -548,7 +548,7 @@ export default [
},
{
internalType: "uint64",
- name: "rewardMultiplierPctg",
+ name: "feeMultiplierPctg",
type: "uint64",
},
{
@@ -558,7 +558,7 @@ export default [
},
{
internalType: "uint64",
- name: "feeMaxPeriodPctg",
+ name: "feeMaxPctg",
type: "uint64",
},
{
@@ -746,7 +746,7 @@ export default [
components: [
{
internalType: "uint256",
- name: "feeBase",
+ name: "basefee",
type: "uint256",
},
{
@@ -831,7 +831,7 @@ export default [
},
{
internalType: "uint256",
- name: "_feeBase",
+ name: "_basefee",
type: "uint256",
},
],
@@ -1051,7 +1051,7 @@ export default [
},
{
internalType: "uint256",
- name: "feeBase",
+ name: "basefee",
type: "uint256",
},
{
diff --git a/packages/status-page/src/utils/getLastVerifiedBlockId.ts b/packages/status-page/src/utils/getLastVerifiedBlockId.ts
index 1a5e9aa4659..a8a3564420d 100644
--- a/packages/status-page/src/utils/getLastVerifiedBlockId.ts
+++ b/packages/status-page/src/utils/getLastVerifiedBlockId.ts
@@ -7,6 +7,6 @@ export const getLastVerifiedBlockId = async (
): Promise => {
const contract: Contract = new Contract(contractAddress, TaikoL1, provider);
const stateVariables = await contract.getStateVariables();
- const latestVerifiedId = stateVariables.latestVerifiedId;
- return BigNumber.from(latestVerifiedId).toNumber();
+ const lastBlockId = stateVariables.lastBlockId;
+ return BigNumber.from(lastBlockId).toNumber();
};
diff --git a/packages/status-page/src/utils/getPendingBlocks.ts b/packages/status-page/src/utils/getPendingBlocks.ts
index 40a22fd064d..fcaa01a9468 100644
--- a/packages/status-page/src/utils/getPendingBlocks.ts
+++ b/packages/status-page/src/utils/getPendingBlocks.ts
@@ -8,6 +8,6 @@ export const getPendingBlocks = async (
const contract: Contract = new Contract(contractAddress, TaikoL1, provider);
const stateVariables = await contract.getStateVariables();
const nextBlockId = stateVariables.nextBlockId;
- const latestVerifiedId = stateVariables.latestVerifiedId;
- return nextBlockId - latestVerifiedId - 1;
+ const lastBlockId = stateVariables.lastBlockId;
+ return nextBlockId - lastBlockId - 1;
};
diff --git a/packages/tokenomics/.gitignore b/packages/tokenomics/.gitignore
deleted file mode 100644
index 932765aeba6..00000000000
--- a/packages/tokenomics/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-__pycache__/
-venv
diff --git a/packages/tokenomics/CHANGELOG.md b/packages/tokenomics/CHANGELOG.md
deleted file mode 100644
index 61b27a90fae..00000000000
--- a/packages/tokenomics/CHANGELOG.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Changelog
-
-## [0.1.0](https://github.com/taikoxyz/taiko-mono/compare/tokenomics-v0.0.1...tokenomics-v0.1.0) (2023-01-19)
-
-
-### Features
-
-* implement release-please workflow ([#12967](https://github.com/taikoxyz/taiko-mono/issues/12967)) ([b0c8b60](https://github.com/taikoxyz/taiko-mono/commit/b0c8b60da0af3160db758f83c1f6368a3a712593))
-* **protocol:** implement & simulate tokenomics ([#376](https://github.com/taikoxyz/taiko-mono/issues/376)) ([191eb11](https://github.com/taikoxyz/taiko-mono/commit/191eb110990d60b49883eb3f3d7841c33421d067))
diff --git a/packages/tokenomics/README.md b/packages/tokenomics/README.md
deleted file mode 100644
index fc129660dc5..00000000000
--- a/packages/tokenomics/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# README
-
-## Installation
-
-You need to install python, **salabim**, **streamlit**, and **matplotlib**.
-
-```sh
-python3 -m venv venv
-pip install salabim streamlit matplotlib
-```
-
-## Usage
-
-Then in this directory, simply run `streamlit run main.py`,
-then visit [http://localhost:8501](http://localhost:8501/) to see simulation results.
diff --git a/packages/tokenomics/main.py b/packages/tokenomics/main.py
index f637c36bf84..4715352c779 100644
--- a/packages/tokenomics/main.py
+++ b/packages/tokenomics/main.py
@@ -96,7 +96,7 @@ def setup(self, config):
def get_time_adjusted_fee(self, is_proposal, t_now, t_last, t_avg, t_cap):
# if (tAvg == 0) {
- # return s.feeBase;
+ # return s.basefee;
# }
# uint256 _tAvg = tAvg > tCap ? tCap : tAvg;
# uint256 tGrace = (LibConstants.K_FEE_GRACE_PERIOD * _tAvg) / 100;
@@ -108,9 +108,9 @@ def get_time_adjusted_fee(self, is_proposal, t_now, t_last, t_avg, t_cap):
# ((LibConstants.K_REWARD_MULTIPLIER - 100) * tRel) /
# 100;
# if (isProposal) {
- # return (s.feeBase * 10000) / alpha; // fee
+ # return (s.basefee * 10000) / alpha; // fee
# } else {
- # return (s.feeBase * alpha) / 10000; // reward
+ # return (s.basefee * alpha) / 10000; // reward
# }
if t_avg == 0:
diff --git a/packages/tokenomics/package.json b/packages/tokenomics/package.json
deleted file mode 100644
index c7190abde75..00000000000
--- a/packages/tokenomics/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "name": "@taiko/tokenomics",
- "version": "0.1.0",
- "private": true
-}
diff --git a/packages/tokenomics/plots.py b/packages/tokenomics/plots.py
deleted file mode 100644
index 926848d139b..00000000000
--- a/packages/tokenomics/plots.py
+++ /dev/null
@@ -1,22 +0,0 @@
-import matplotlib.pyplot as plt
-import matplotlib.ticker as ticker
-import streamlit as st
-import numpy as np
-
-
-@ticker.FuncFormatter
-def major_formatter(x, pos):
- return "d%d" % (x / 24 / 3600)
-
-
-def plot(days, sources, color="#E28BFD"):
- fig, ax = plt.subplots(figsize=(15, 5), nrows=1, ncols=1)
- for s in sources:
- data = s[0].xt()
- ax.plot(data[1], data[0], color, label=s[1])
- ax.legend(loc="lower center", fontsize=18.0)
- ax.xaxis.set_ticks(np.arange(0, 24 * 3600 * (days + 1), 24 * 3600))
- ax.xaxis.set_tick_params(labelrotation=45)
- ax.xaxis.set_major_formatter(major_formatter)
-
- st.write(fig)
diff --git a/packages/tokenomics/present.py b/packages/tokenomics/present.py
deleted file mode 100644
index 02b2e819762..00000000000
--- a/packages/tokenomics/present.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from typing import NamedTuple
-
-
-class Timing(NamedTuple):
- block_time_avg_second: int
- proof_time_avg_minute: int
-
-
-class Config(NamedTuple):
- max_blocks: int
- lamda: float
- fee_base: int
- fee_maf: int
- reward_multiplier: float
- block_time_sd_pctg: int
- proof_time_sd_pctg: int
- time_avg_maf: int
- timing: list[Timing]
-
-
-class Present(NamedTuple):
- title: str
- desc: str
- days: int
- config: Config
diff --git a/packages/tokenomics/presents/cbvp1.py b/packages/tokenomics/presents/cbvp1.py
deleted file mode 100644
index f94cb1b9027..00000000000
--- a/packages/tokenomics/presents/cbvp1.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="cbvp1: constant block time, proof time goes down, up, then restores",
- desc="""
-
-**About this config**
-
-- the block time average set to a constant.
-- the proof time average varies but eventually changes back to the initial value.
-
-**What to verify**
-- fee_base will become smaller if proof time becomes larger.
-- fee_base remains the same if proof time becomes smaller.
-
-""",
- days=21,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45/1.3/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45*1.3*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/tokenomics/presents/cbvp2.py b/packages/tokenomics/presents/cbvp2.py
deleted file mode 100644
index efa29142887..00000000000
--- a/packages/tokenomics/presents/cbvp2.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="cbvp2: constant block time, proof time goes up, down, then restores",
- desc="""
-
-**About this config**
-
-- the block time average set to a constant.
-- the proof time average varies but eventually changes back to the initial value.
-
-**What to verify**
-- fee_base will become smaller if proof time becomes larger.
-- fee_base remains the same if proof time becomes smaller.
-
-""",
- days=21,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45*1.3*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45/1.3/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/tokenomics/presents/p0.py b/packages/tokenomics/presents/p0.py
deleted file mode 100644
index 52da6756a95..00000000000
--- a/packages/tokenomics/presents/p0.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="p0: block time and proof time both constant",
- desc="""
-
-**What to simulate?**
-
-The most basic model where the block time average and proof time average are both constant.
-
-**About this config**
-
-- TKO supply changes initially but stablizes.
-- fee_base remains constant
-
-""",
- days=7,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/tokenomics/presents/vbcp1.py b/packages/tokenomics/presents/vbcp1.py
deleted file mode 100644
index 476c4d05397..00000000000
--- a/packages/tokenomics/presents/vbcp1.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="vbcp1: constant proof time, block time goes down, up, then restores",
- desc="""
-
-**About this config**
-
-- the proof time average set to a constant.
-- the block time average varies but eventually changes back to the initial value.
-
-**What to verify**
-- fee_base will become smaller if block time becomes larger.
-- fee_base remains the same if block time becomes smaller.
-
-""",
- days=21,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3/1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3*1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/tokenomics/presents/vbcp2.py b/packages/tokenomics/presents/vbcp2.py
deleted file mode 100644
index c581fdb0c25..00000000000
--- a/packages/tokenomics/presents/vbcp2.py
+++ /dev/null
@@ -1,66 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="vbcp2: constant proof time, block time goes up, down, then restores",
- desc="""
-
-**About this config**
-
-- the proof time average set to a constant.
-- the block time average varies but eventually changes back to the initial value.
-
-**What to verify**
-- fee_base will become smaller if block time becomes larger.
-- fee_base remains the same if block time becomes smaller.
-
-""",
- days=21,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3*1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3/1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/tokenomics/presents/vbvps1.py b/packages/tokenomics/presents/vbvps1.py
deleted file mode 100644
index 1808d62b917..00000000000
--- a/packages/tokenomics/presents/vbvps1.py
+++ /dev/null
@@ -1,57 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="vbvps1: block time & proof time both go down, up to the SAME direction, then restores",
- desc="""
-
-""",
- days=21,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15/1.3/1.3,
- proof_time_avg_minute=45/1.3/1.3,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15*1.3*1.3,
- proof_time_avg_minute=45*1.3*1.3,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/tokenomics/presents/vbvps2.py b/packages/tokenomics/presents/vbvps2.py
deleted file mode 100644
index f93e04f0df8..00000000000
--- a/packages/tokenomics/presents/vbvps2.py
+++ /dev/null
@@ -1,56 +0,0 @@
-from present import Config, Timing, Present
-
-present = Present(
- title="vbvps2: block time & proof time both go up, down to the SAME direction, then restores",
- desc="""
-""",
- days=21,
- config=Config(
- max_blocks=2048,
- lamda=590,
- fee_base=100.0,
- fee_maf=1024,
- reward_multiplier=4.0,
- time_avg_maf=1024,
- block_time_sd_pctg=0,
- proof_time_sd_pctg=0,
- timing=[
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15*1.3*1.3,
- proof_time_avg_minute=45*1.3*1.3,
- ),
- Timing(
- block_time_avg_second=15*1.3,
- proof_time_avg_minute=45*1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15/1.3/1.3,
- proof_time_avg_minute=45/1.3/1.3,
- ),
- Timing(
- block_time_avg_second=15/1.3,
- proof_time_avg_minute=45/1.3,
- ),
- Timing(
- block_time_avg_second=15,
- proof_time_avg_minute=45,
- ),
- ],
- ),
-)
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/ProofVerifier.md b/packages/website/pages/docs/reference/contract-documentation/L1/ProofVerifier.md
deleted file mode 100644
index 0268f2ea5f7..00000000000
--- a/packages/website/pages/docs/reference/contract-documentation/L1/ProofVerifier.md
+++ /dev/null
@@ -1,37 +0,0 @@
----
-title: IProofVerifier
----
-
-## IProofVerifier
-
-### verifyZKP
-
-```solidity
-function verifyZKP(string verifierId, bytes zkproof, bytes32 instance) external view returns (bool verified)
-```
-
-### verifyMKP
-
-```solidity
-function verifyMKP(bytes key, bytes value, bytes proof, bytes32 root) external pure returns (bool verified)
-```
-
-## ProofVerifier
-
-### init
-
-```solidity
-function init(address addressManager) external
-```
-
-### verifyZKP
-
-```solidity
-function verifyZKP(string verifierId, bytes zkproof, bytes32 instance) external view returns (bool)
-```
-
-### verifyMKP
-
-```solidity
-function verifyMKP(bytes key, bytes value, bytes proof, bytes32 root) external pure returns (bool)
-```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoConfig.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoConfig.md
new file mode 100644
index 00000000000..c62f7f74720
--- /dev/null
+++ b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoConfig.md
@@ -0,0 +1,7 @@
+## TaikoConfig
+
+### getConfig
+
+```solidity
+function getConfig() internal pure returns (struct TaikoData.Config)
+```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoCustomErrors.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoCustomErrors.md
deleted file mode 100644
index 11961f15341..00000000000
--- a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoCustomErrors.md
+++ /dev/null
@@ -1,227 +0,0 @@
----
-title: TaikoCustomErrors
----
-
-## TaikoCustomErrors
-
-### L1_0_FEE_BASE
-
-```solidity
-error L1_0_FEE_BASE()
-```
-
-### L1_ALREADY_PROVEN
-
-```solidity
-error L1_ALREADY_PROVEN()
-```
-
-### L1_ANCHOR_CALLDATA
-
-```solidity
-error L1_ANCHOR_CALLDATA()
-```
-
-### L1_ANCHOR_DEST
-
-```solidity
-error L1_ANCHOR_DEST()
-```
-
-### L1_ANCHOR_GAS_LIMIT
-
-```solidity
-error L1_ANCHOR_GAS_LIMIT()
-```
-
-### L1_ANCHOR_RECEIPT_ADDR
-
-```solidity
-error L1_ANCHOR_RECEIPT_ADDR()
-```
-
-### L1_ANCHOR_RECEIPT_DATA
-
-```solidity
-error L1_ANCHOR_RECEIPT_DATA()
-```
-
-### L1_ANCHOR_RECEIPT_LOGS
-
-```solidity
-error L1_ANCHOR_RECEIPT_LOGS()
-```
-
-### L1_ANCHOR_RECEIPT_PROOF
-
-```solidity
-error L1_ANCHOR_RECEIPT_PROOF()
-```
-
-### L1_ANCHOR_RECEIPT_STATUS
-
-```solidity
-error L1_ANCHOR_RECEIPT_STATUS()
-```
-
-### L1_ANCHOR_RECEIPT_TOPICS
-
-```solidity
-error L1_ANCHOR_RECEIPT_TOPICS()
-```
-
-### L1_ANCHOR_SIG_R
-
-```solidity
-error L1_ANCHOR_SIG_R()
-```
-
-### L1_ANCHOR_SIG_S
-
-```solidity
-error L1_ANCHOR_SIG_S()
-```
-
-### L1_ANCHOR_TX_PROOF
-
-```solidity
-error L1_ANCHOR_TX_PROOF()
-```
-
-### L1_ANCHOR_TYPE
-
-```solidity
-error L1_ANCHOR_TYPE()
-```
-
-### L1_BLOCK_NUMBER
-
-```solidity
-error L1_BLOCK_NUMBER()
-```
-
-### L1_CANNOT_BE_FIRST_PROVER
-
-```solidity
-error L1_CANNOT_BE_FIRST_PROVER()
-```
-
-### L1_COMMITTED
-
-```solidity
-error L1_COMMITTED()
-```
-
-### L1_CONFLICT_PROOF
-
-```solidity
-error L1_CONFLICT_PROOF()
-```
-
-### L1_CONTRACT_NOT_ALLOWED
-
-```solidity
-error L1_CONTRACT_NOT_ALLOWED()
-```
-
-### L1_DUP_PROVERS
-
-```solidity
-error L1_DUP_PROVERS()
-```
-
-### L1_EXTRA_DATA
-
-```solidity
-error L1_EXTRA_DATA()
-```
-
-### L1_GAS_LIMIT
-
-```solidity
-error L1_GAS_LIMIT()
-```
-
-### L1_ID
-
-```solidity
-error L1_ID()
-```
-
-### L1_INPUT_SIZE
-
-```solidity
-error L1_INPUT_SIZE()
-```
-
-### L1_INVALID_CONFIG
-
-```solidity
-error L1_INVALID_CONFIG()
-```
-
-### L1_INVALID_PARAM
-
-```solidity
-error L1_INVALID_PARAM()
-```
-
-### L1_METADATA_FIELD
-
-```solidity
-error L1_METADATA_FIELD()
-```
-
-### L1_META_MISMATCH
-
-```solidity
-error L1_META_MISMATCH()
-```
-
-### L1_NOT_COMMITTED
-
-```solidity
-error L1_NOT_COMMITTED()
-```
-
-### L1_NOT_ORACLE_PROVER
-
-```solidity
-error L1_NOT_ORACLE_PROVER()
-```
-
-### L1_PROOF_LENGTH
-
-```solidity
-error L1_PROOF_LENGTH()
-```
-
-### L1_PROVER
-
-```solidity
-error L1_PROVER()
-```
-
-### L1_SOLO_PROPOSER
-
-```solidity
-error L1_SOLO_PROPOSER()
-```
-
-### L1_TOO_MANY_BLOCKS
-
-```solidity
-error L1_TOO_MANY_BLOCKS()
-```
-
-### L1_TX_LIST
-
-```solidity
-error L1_TX_LIST()
-```
-
-### L1_ZKP
-
-```solidity
-error L1_ZKP()
-```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoData.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoData.md
index e17be308bd3..f39822ec20b 100644
--- a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoData.md
+++ b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoData.md
@@ -9,30 +9,54 @@ title: TaikoData
```solidity
struct Config {
uint256 chainId;
- uint256 maxNumBlocks;
- uint256 blockHashHistory;
+ uint256 maxNumProposedBlocks;
+ uint256 ringBufferSize;
+ uint256 maxNumVerifiedBlocks;
uint256 maxVerificationsPerTx;
- uint256 commitConfirmations;
uint256 blockMaxGasLimit;
uint256 maxTransactionsPerBlock;
uint256 maxBytesPerTxList;
uint256 minTxGasLimit;
- uint256 anchorTxGasLimit;
- uint256 slotSmoothingFactor;
- uint256 rewardBurnBips;
- uint256 proposerDepositPctg;
- uint256 feeBaseMAF;
- uint256 blockTimeMAF;
- uint256 proofTimeMAF;
- uint64 rewardMultiplierPctg;
- uint64 feeGracePeriodPctg;
- uint64 feeMaxPeriodPctg;
- uint64 blockTimeCap;
- uint64 proofTimeCap;
- uint64 bootstrapDiscountHalvingPeriod;
- bool enableTokenomics;
- bool enablePublicInputsCheck;
- bool enableAnchorValidation;
+ uint256 txListCacheExpiry;
+ uint256 proofCooldownPeriod;
+ uint64 minEthDepositsPerBlock;
+ uint64 maxEthDepositsPerBlock;
+ uint96 maxEthDepositAmount;
+ uint96 minEthDepositAmount;
+ uint64 proofTimeTarget;
+ uint8 adjustmentQuotient;
+ bool relaySignalRoot;
+ bool enableSoloProposer;
+}
+```
+
+### StateVariables
+
+```solidity
+struct StateVariables {
+ uint64 basefee;
+ uint64 accBlockFees;
+ uint64 genesisHeight;
+ uint64 genesisTimestamp;
+ uint64 numBlocks;
+ uint64 proofTimeIssued;
+ uint64 lastVerifiedBlockId;
+ uint64 accProposedAt;
+ uint64 nextEthDepositToProcess;
+ uint64 numEthDeposits;
+}
+```
+
+### BlockMetadataInput
+
+```solidity
+struct BlockMetadataInput {
+ bytes32 txListHash;
+ address beneficiary;
+ uint32 gasLimit;
+ uint24 txListByteStart;
+ uint24 txListByteEnd;
+ uint8 cacheTxListInfo;
}
```
@@ -40,50 +64,83 @@ struct Config {
```solidity
struct BlockMetadata {
- uint256 id;
- uint256 l1Height;
+ uint64 id;
+ uint64 timestamp;
+ uint64 l1Height;
bytes32 l1Hash;
- address beneficiary;
- bytes32 txListHash;
bytes32 mixHash;
- bytes extraData;
- uint64 gasLimit;
- uint64 timestamp;
- uint64 commitHeight;
- uint64 commitSlot;
+ bytes32 depositsRoot;
+ bytes32 txListHash;
+ uint24 txListByteStart;
+ uint24 txListByteEnd;
+ uint32 gasLimit;
+ address beneficiary;
+ uint8 cacheTxListInfo;
+ address treasure;
+ struct TaikoData.EthDeposit[] depositsProcessed;
+}
+```
+
+### BlockEvidence
+
+```solidity
+struct BlockEvidence {
+ bytes32 metaHash;
+ bytes32 parentHash;
+ bytes32 blockHash;
+ bytes32 signalRoot;
+ bytes32 graffiti;
+ address prover;
+ uint32 parentGasUsed;
+ uint32 gasUsed;
+ uint16 verifierId;
+ bytes proof;
}
```
-### Evidence
+### ForkChoice
```solidity
-struct Evidence {
- struct TaikoData.BlockMetadata meta;
- struct BlockHeader header;
+struct ForkChoice {
+ bytes32 key;
+ bytes32 blockHash;
+ bytes32 signalRoot;
+ uint64 provenAt;
address prover;
- bytes[] proofs;
- uint16 circuitId;
+ uint32 gasUsed;
}
```
-### ProposedBlock
+### Block
```solidity
-struct ProposedBlock {
+struct Block {
+ mapping(uint256 => struct TaikoData.ForkChoice) forkChoices;
+ uint64 blockId;
+ uint64 proposedAt;
+ uint64 deposit;
+ uint24 nextForkChoiceId;
+ uint24 verifiedForkChoiceId;
bytes32 metaHash;
- uint256 deposit;
address proposer;
- uint64 proposedAt;
}
```
-### ForkChoice
+### TxListInfo
```solidity
-struct ForkChoice {
- bytes32 blockHash;
- address prover;
- uint64 provenAt;
+struct TxListInfo {
+ uint64 validSince;
+ uint24 size;
+}
+```
+
+### EthDeposit
+
+```solidity
+struct EthDeposit {
+ address recipient;
+ uint96 amount;
}
```
@@ -91,24 +148,24 @@ struct ForkChoice {
```solidity
struct State {
- mapping(uint256 => bytes32) l2Hashes;
- mapping(uint256 => struct TaikoData.ProposedBlock) proposedBlocks;
- mapping(uint256 => mapping(bytes32 => struct TaikoData.ForkChoice)) forkChoices;
- mapping(address => mapping(uint256 => bytes32)) commits;
- mapping(address => uint256) balances;
+ mapping(uint256 => struct TaikoData.Block) blocks;
+ mapping(uint256 => mapping(bytes32 => mapping(uint32 => uint256))) forkChoiceIds;
+ mapping(address => uint256) taikoTokenBalances;
+ mapping(bytes32 => struct TaikoData.TxListInfo) txListInfo;
+ struct TaikoData.EthDeposit[] ethDeposits;
+ bytes32 staticRefs;
uint64 genesisHeight;
uint64 genesisTimestamp;
- uint64 __reservedA1;
- uint64 __reservedA2;
- uint256 feeBase;
- uint64 nextBlockId;
- uint64 lastProposedAt;
- uint64 avgBlockTime;
- uint64 __avgGasLimit;
- uint64 latestVerifiedHeight;
- uint64 latestVerifiedId;
- uint64 avgProofTime;
- uint64 __reservedC1;
- uint256[42] __gap;
+ uint64 __reserved71;
+ uint64 __reserved72;
+ uint64 accProposedAt;
+ uint64 accBlockFees;
+ uint64 numBlocks;
+ uint64 nextEthDepositToProcess;
+ uint64 basefee;
+ uint64 proofTimeIssued;
+ uint64 lastVerifiedBlockId;
+ uint64 __reserved91;
+ uint256[41] __gap;
}
```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoErrors.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoErrors.md
new file mode 100644
index 00000000000..24582eac189
--- /dev/null
+++ b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoErrors.md
@@ -0,0 +1,145 @@
+## TaikoErrors
+
+### L1_1559_X_SCALE_TOO_LARGE
+
+```solidity
+error L1_1559_X_SCALE_TOO_LARGE()
+```
+
+### L1_1559_Y_SCALE_TOO_LARGE
+
+```solidity
+error L1_1559_Y_SCALE_TOO_LARGE()
+```
+
+### L1_ALREADY_PROVEN
+
+```solidity
+error L1_ALREADY_PROVEN()
+```
+
+### L1_BLOCK_ID
+
+```solidity
+error L1_BLOCK_ID()
+```
+
+### L1_CONTRACT_NOT_ALLOWED
+
+```solidity
+error L1_CONTRACT_NOT_ALLOWED()
+```
+
+### L1_EVIDENCE_MISMATCH
+
+```solidity
+error L1_EVIDENCE_MISMATCH(bytes32 expected, bytes32 actual)
+```
+
+### L1_FORK_CHOICE_NOT_FOUND
+
+```solidity
+error L1_FORK_CHOICE_NOT_FOUND()
+```
+
+### L1_INSUFFICIENT_ETHER
+
+```solidity
+error L1_INSUFFICIENT_ETHER()
+```
+
+### L1_INSUFFICIENT_TOKEN
+
+```solidity
+error L1_INSUFFICIENT_TOKEN()
+```
+
+### L1_INVALID_CONFIG
+
+```solidity
+error L1_INVALID_CONFIG()
+```
+
+### L1_INVALID_ETH_DEPOSIT
+
+```solidity
+error L1_INVALID_ETH_DEPOSIT()
+```
+
+### L1_INVALID_EVIDENCE
+
+```solidity
+error L1_INVALID_EVIDENCE()
+```
+
+### L1_INVALID_L21559_PARAMS
+
+```solidity
+error L1_INVALID_L21559_PARAMS()
+```
+
+### L1_INVALID_METADATA
+
+```solidity
+error L1_INVALID_METADATA()
+```
+
+### L1_INVALID_PARAM
+
+```solidity
+error L1_INVALID_PARAM()
+```
+
+### L1_INVALID_PROOF
+
+```solidity
+error L1_INVALID_PROOF()
+```
+
+### L1_NOT_ORACLE_PROVER
+
+```solidity
+error L1_NOT_ORACLE_PROVER()
+```
+
+### L1_NOT_SOLO_PROPOSER
+
+```solidity
+error L1_NOT_SOLO_PROPOSER()
+```
+
+### L1_ORACLE_DISABLED
+
+```solidity
+error L1_ORACLE_DISABLED()
+```
+
+### L1_TOO_MANY_BLOCKS
+
+```solidity
+error L1_TOO_MANY_BLOCKS()
+```
+
+### L1_TX_LIST_NOT_EXIST
+
+```solidity
+error L1_TX_LIST_NOT_EXIST()
+```
+
+### L1_TX_LIST_HASH
+
+```solidity
+error L1_TX_LIST_HASH()
+```
+
+### L1_TX_LIST_RANGE
+
+```solidity
+error L1_TX_LIST_RANGE()
+```
+
+### L1_TX_LIST
+
+```solidity
+error L1_TX_LIST()
+```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoEvents.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoEvents.md
index 119dc77917e..6147f08eb9b 100644
--- a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoEvents.md
+++ b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoEvents.md
@@ -4,26 +4,26 @@ title: TaikoEvents
## TaikoEvents
-### BlockVerified
+### BlockProposed
```solidity
-event BlockVerified(uint256 id, bytes32 blockHash)
+event BlockProposed(uint256 id, struct TaikoData.BlockMetadata meta)
```
-### BlockCommitted
+### BlockProven
```solidity
-event BlockCommitted(uint64 commitSlot, bytes32 commitHash)
+event BlockProven(uint256 id, bytes32 parentHash, bytes32 blockHash, bytes32 signalRoot, address prover)
```
-### BlockProposed
+### BlockVerified
```solidity
-event BlockProposed(uint256 id, struct TaikoData.BlockMetadata meta)
+event BlockVerified(uint256 id, bytes32 blockHash)
```
-### BlockProven
+### EthDeposited
```solidity
-event BlockProven(uint256 id, bytes32 parentHash, bytes32 blockHash, address prover, uint64 provenAt)
+event EthDeposited(struct TaikoData.EthDeposit deposit)
```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoL1.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoL1.md
index aab1821ccf6..6f177e79e3f 100644
--- a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoL1.md
+++ b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoL1.md
@@ -10,53 +10,48 @@ title: TaikoL1
struct TaikoData.State state
```
-### onlyFromEOA
+### receive
```solidity
-modifier onlyFromEOA()
+receive() external payable
```
### init
```solidity
-function init(address _addressManager, bytes32 _genesisBlockHash, uint256 _feeBase) external
+function init(address _addressManager, bytes32 _genesisBlockHash, uint64 _initBasefee, uint64 _initProofTimeIssued) external
```
-### commitBlock
-
-```solidity
-function commitBlock(uint64 commitSlot, bytes32 commitHash) external
-```
-
-Write a _commit hash_ so a few blocks later a L2 block can be proposed
-such that `calculateCommitHash(meta.beneficiary, meta.txListHash)` equals
-to this commit hash.
+Initialize the rollup.
#### Parameters
-| Name | Type | Description |
-| ---------- | ------- | --------------------------------------------------------------------------- |
-| commitSlot | uint64 | A slot to save this commit. Slot 0 will always be reset to zero for refund. |
-| commitHash | bytes32 | Calculated with: `calculateCommitHash(beneficiary, txListHash)`. |
+| Name | Type | Description |
+| --------------------- | ------- | ------------------------------------------------------------ |
+| \_addressManager | address | The AddressManager address. |
+| \_genesisBlockHash | bytes32 | The block hash of the genesis block. |
+| \_initBasefee | uint64 | Initial (reasonable) basefee value. |
+| \_initProofTimeIssued | uint64 | Initial proof time which keeps the inflow/outflow in balance |
### proposeBlock
```solidity
-function proposeBlock(bytes[] inputs) external
+function proposeBlock(bytes input, bytes txList) external returns (struct TaikoData.BlockMetadata meta)
```
Propose a Taiko L2 block.
#### Parameters
-| Name | Type | Description |
-| ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| inputs | bytes[] | A list of data input: - inputs[0] is abi-encoded BlockMetadata that the actual L2 block header must satisfy. Note the following fields in the provided meta object must be zeros -- their actual values will be provisioned by Ethereum. - id - l1Height - l1Hash - mixHash - timestamp - inputs[1] is a list of transactions in this block, encoded with RLP. Note, in the corresponding L2 block an _anchor transaction_ will be the first transaction in the block -- if there are n transactions in `txList`, then there will be up to n+1 transactions in the L2 block. |
+| Name | Type | Description |
+| ------ | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| input | bytes | An abi-encoded BlockMetadataInput that the actual L2 block header must satisfy. |
+| txList | bytes | A list of transactions in this block, encoded with RLP. Note, in the corresponding L2 block an _anchor transaction_ will be the first transaction in the block -- if there are `n` transactions in `txList`, then there will be up to `n + 1` transactions in the L2 block. |
### proveBlock
```solidity
-function proveBlock(uint256 blockId, bytes[] inputs) external
+function proveBlock(uint256 blockId, bytes input) external
```
Prove a block is valid with a zero-knowledge proof, a transaction
@@ -64,26 +59,10 @@ merkel proof, and a receipt merkel proof.
#### Parameters
-| Name | Type | Description |
-| ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| blockId | uint256 | The index of the block to prove. This is also used to select the right implementation version. |
-| inputs | bytes[] | A list of data input: - inputs[0] is an abi-encoded object with various information regarding the block to be proven and the actual proofs. - inputs[1] is the actual anchor transaction in this L2 block. Note that the anchor transaction is always the first transaction in the block. - inputs[2] is the receipt of the anchor transaction. |
-
-### proveBlockInvalid
-
-```solidity
-function proveBlockInvalid(uint256 blockId, bytes[] inputs) external
-```
-
-Prove a block is invalid with a zero-knowledge proof and a receipt
-merkel proof.
-
-#### Parameters
-
-| Name | Type | Description |
-| ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| blockId | uint256 | The index of the block to prove. This is also used to select the right implementation version. |
-| inputs | bytes[] | A list of data input: - inputs[0] An Evidence object with various information regarding the block to be proven and the actual proofs. - inputs[1] The target block to be proven invalid. - inputs[2] The receipt for the `invalidBlock` transaction on L2. Note that the `invalidBlock` transaction is supposed to be the only transaction in the L2 block. |
+| Name | Type | Description |
+| ------- | ------- | ---------------------------------------------------------------------------------------------- |
+| blockId | uint256 | The index of the block to prove. This is also used to select the right implementation version. |
+| input | bytes | An abi-encoded TaikoData.ValidBlockEvidence object. |
### verifyBlocks
@@ -99,70 +78,70 @@ Verify up to N blocks.
| --------- | ------- | ------------------------------- |
| maxBlocks | uint256 | Max number of blocks to verify. |
-### withdrawBalance
+### depositTaikoToken
```solidity
-function withdrawBalance() external
+function depositTaikoToken(uint256 amount) external
```
-### getRewardBalance
+### withdrawTaikoToken
```solidity
-function getRewardBalance(address addr) public view returns (uint256)
+function withdrawTaikoToken(uint256 amount) external
```
-### getBlockFee
+### depositEtherToL2
```solidity
-function getBlockFee() public view returns (uint256)
+function depositEtherToL2() public payable
```
-### getProofReward
+### getTaikoTokenBalance
```solidity
-function getProofReward(uint64 provenAt, uint64 proposedAt) public view returns (uint256 reward)
+function getTaikoTokenBalance(address addr) public view returns (uint256)
```
-### isCommitValid
+### getBlockFee
```solidity
-function isCommitValid(uint256 commitSlot, uint256 commitHeight, bytes32 commitHash) public view returns (bool)
+function getBlockFee() public view returns (uint64)
```
-### getProposedBlock
+### getProofReward
```solidity
-function getProposedBlock(uint256 id) public view returns (struct TaikoData.ProposedBlock)
+function getProofReward(uint64 provenAt, uint64 proposedAt) public view returns (uint64)
```
-### getSyncedHeader
+### getBlock
```solidity
-function getSyncedHeader(uint256 number) public view returns (bytes32)
+function getBlock(uint256 blockId) public view returns (bytes32 _metaHash, uint256 _deposit, address _proposer, uint64 _proposedAt)
```
-### getLatestSyncedHeader
+### getForkChoice
```solidity
-function getLatestSyncedHeader() public view returns (bytes32)
+function getForkChoice(uint256 blockId, bytes32 parentHash, uint32 parentGasUsed) public view returns (struct TaikoData.ForkChoice)
```
-### getStateVariables
+### getXchainBlockHash
```solidity
-function getStateVariables() public view returns (struct LibUtils.StateVariables)
+function getXchainBlockHash(uint256 blockId) public view returns (bytes32)
```
-### signWithGoldenTouch
+### getXchainSignalRoot
```solidity
-function signWithGoldenTouch(bytes32 hash, uint8 k) public view returns (uint8 v, uint256 r, uint256 s)
+function getXchainSignalRoot(uint256 blockId) public view returns (bytes32)
```
-### getForkChoice
+### getStateVariables
```solidity
-function getForkChoice(uint256 id, bytes32 parentHash) public view returns (struct TaikoData.ForkChoice)
+function getStateVariables() public view returns (struct TaikoData.StateVariables)
```
### getConfig
@@ -170,3 +149,9 @@ function getForkChoice(uint256 id, bytes32 parentHash) public view returns (stru
```solidity
function getConfig() public pure virtual returns (struct TaikoData.Config)
```
+
+### getVerifierName
+
+```solidity
+function getVerifierName(uint16 id) public pure returns (string)
+```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoToken.md b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoToken.md
index b7a083af748..a1a175160eb 100644
--- a/packages/website/pages/docs/reference/contract-documentation/L1/TaikoToken.md
+++ b/packages/website/pages/docs/reference/contract-documentation/L1/TaikoToken.md
@@ -24,10 +24,22 @@ event Burn(address account, uint256 amount)
error TKO_INVALID_ADDR()
```
+### TKO_INVALID_PREMINT_PARAMS
+
+```solidity
+error TKO_INVALID_PREMINT_PARAMS()
+```
+
+### TKO_MINT_DISALLOWED
+
+```solidity
+error TKO_MINT_DISALLOWED()
+```
+
### init
```solidity
-function init(string _name, string _symbol, address _addressManager) external
+function init(address _addressManager, string _name, string _symbol, address[] _premintRecipients, uint256[] _premintAmounts) external
```
_Initializer to be called after being deployed behind a proxy.
@@ -77,3 +89,9 @@ the circulating supply._
| ------- | ------- | ------------------------------------ |
| account | address | The address to burn the tokens from. |
| amount | uint256 | The amount of tokens to burn. |
+
+### \_mint
+
+```solidity
+function _mint(address account, uint256 amount) internal
+```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L2/LibL2Consts.md b/packages/website/pages/docs/reference/contract-documentation/L2/LibL2Consts.md
new file mode 100644
index 00000000000..bc1878d609a
--- /dev/null
+++ b/packages/website/pages/docs/reference/contract-documentation/L2/LibL2Consts.md
@@ -0,0 +1,7 @@
+## LibL2Consts
+
+### ANCHOR_GAS_COST
+
+```solidity
+uint64 ANCHOR_GAS_COST
+```
diff --git a/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2.md b/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2.md
index b6656f19616..d704cb740d0 100644
--- a/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2.md
+++ b/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2.md
@@ -4,22 +4,91 @@ title: TaikoL2
## TaikoL2
+### VerifiedBlock
+
+```solidity
+struct VerifiedBlock {
+ bytes32 blockHash;
+ bytes32 signalRoot;
+}
+```
+
+### EIP1559Params
+
+```solidity
+struct EIP1559Params {
+ uint64 basefee;
+ uint64 gasIssuedPerSecond;
+ uint64 gasExcessMax;
+ uint64 gasTarget;
+ uint64 ratio2x1x;
+}
+```
+
+### publicInputHash
+
+```solidity
+bytes32 publicInputHash
+```
+
+### yscale
+
+```solidity
+uint128 yscale
+```
+
+### xscale
+
+```solidity
+uint64 xscale
+```
+
+### gasIssuedPerSecond
+
+```solidity
+uint64 gasIssuedPerSecond
+```
+
+### parentTimestamp
+
+```solidity
+uint64 parentTimestamp
+```
+
### latestSyncedL1Height
```solidity
-uint256 latestSyncedL1Height
+uint64 latestSyncedL1Height
```
-### BlockInvalidated
+### gasExcess
```solidity
-event BlockInvalidated(bytes32 txListHash)
+uint64 gasExcess
```
-### L2_INVALID_SENDER
+### \_\_reserved1
```solidity
-error L2_INVALID_SENDER()
+uint64 __reserved1
+```
+
+### Anchored
+
+```solidity
+event Anchored(uint64 number, uint64 basefee, uint64 gaslimit, uint64 timestamp, bytes32 parentHash, uint256 prevrandao, address coinbase, uint32 chainid)
+```
+
+### L2_BASEFEE_MISMATCH
+
+```solidity
+error L2_BASEFEE_MISMATCH(uint64 expected, uint64 actual)
+```
+
+### L2_INVALID_1559_PARAMS
+
+```solidity
+error L2_INVALID_1559_PARAMS()
```
### L2_INVALID_CHAIN_ID
@@ -28,28 +97,46 @@ error L2_INVALID_SENDER()
error L2_INVALID_CHAIN_ID()
```
-### L2_INVALID_GAS_PRICE
+### L2_INVALID_SENDER
```solidity
-error L2_INVALID_GAS_PRICE()
+error L2_INVALID_SENDER()
```
### L2_PUBLIC_INPUT_HASH_MISMATCH
```solidity
-error L2_PUBLIC_INPUT_HASH_MISMATCH()
+error L2_PUBLIC_INPUT_HASH_MISMATCH(bytes32 expected, bytes32 actual)
```
-### constructor
+### L2_TOO_LATE
```solidity
-constructor(address _addressManager) public
+error L2_TOO_LATE()
+```
+
+### M1559_UNEXPECTED_CHANGE
+
+```solidity
+error M1559_UNEXPECTED_CHANGE(uint64 expected, uint64 actual)
+```
+
+### M1559_OUT_OF_STOCK
+
+```solidity
+error M1559_OUT_OF_STOCK()
+```
+
+### init
+
+```solidity
+function init(address _addressManager, struct TaikoL2.EIP1559Params _param1559) external
```
### anchor
```solidity
-function anchor(uint256 l1Height, bytes32 l1Hash) external
+function anchor(bytes32 l1Hash, bytes32 l1SignalRoot, uint64 l1Height, uint64 parentGasUsed) external
```
Persist the latest L1 block height and hash to L2 for cross-layer
@@ -57,48 +144,69 @@ message verification (eg. bridging). This function will also check
certain block-level global variables because they are not part of the
Trie structure.
-Note: This transaction shall be the first transaction in every L2 block.
+A circuit will verify the integrity among:
+
+- l1Hash, l1SignalRoot, and l1SignalServiceAddress
+- (l1Hash and l1SignalServiceAddress) are both hashed into of the
+ ZKP's instance.
+
+This transaction shall be the first transaction in every L2 block.
#### Parameters
-| Name | Type | Description |
-| -------- | ------- | -------------------------------------------------------- |
-| l1Height | uint256 | The latest L1 block height when this block was proposed. |
-| l1Hash | bytes32 | The latest L1 block hash when this block was proposed. |
+| Name | Type | Description |
+| ------------- | ------- | --------------------------------------------------------- |
+| l1Hash | bytes32 | The latest L1 block hash when this block was proposed. |
+| l1SignalRoot | bytes32 | The latest value of the L1 "signal service storage root". |
+| l1Height | uint64 | The latest L1 block height when this block was proposed. |
+| parentGasUsed | uint64 | the gas used in the parent block. |
+
+### getBasefee
+
+```solidity
+function getBasefee(uint32 timeSinceParent, uint64 gasLimit, uint64 parentGasUsed) public view returns (uint256 _basefee)
+```
-### invalidateBlock
+### getXchainBlockHash
```solidity
-function invalidateBlock(bytes txList, enum LibInvalidTxList.Hint hint, uint256 txIdx) external
+function getXchainBlockHash(uint256 number) public view returns (bytes32)
```
-Invalidate a L2 block by verifying its txList is not intrinsically valid.
+Returns the cross-chain block hash at the given block number.
#### Parameters
-| Name | Type | Description |
-| ------ | -------------------------- | ------------------------------------------------------------------------------------------------ |
-| txList | bytes | The L2 block's txlist. |
-| hint | enum LibInvalidTxList.Hint | A hint for this method to invalidate the txList. |
-| txIdx | uint256 | If the hint is for a specific transaction in txList, txIdx specifies which transaction to check. |
+| Name | Type | Description |
+| ------ | ------- | --------------------------------------------- |
+| number | uint256 | The block number. Use 0 for the latest block. |
-### getConfig
+#### Return Values
-```solidity
-function getConfig() public view virtual returns (struct TaikoData.Config config)
-```
+| Name | Type | Description |
+| ---- | ------- | --------------------------- |
+| [0] | bytes32 | The cross-chain block hash. |
-### getSyncedHeader
+### getXchainSignalRoot
```solidity
-function getSyncedHeader(uint256 number) public view returns (bytes32)
+function getXchainSignalRoot(uint256 number) public view returns (bytes32)
```
-### getLatestSyncedHeader
+Returns the cross-chain signal service storage root at the given
+block number.
-```solidity
-function getLatestSyncedHeader() public view returns (bytes32)
-```
+#### Parameters
+
+| Name | Type | Description |
+| ------ | ------- | --------------------------------------------- |
+| number | uint256 | The block number. Use 0 for the latest block. |
+
+#### Return Values
+
+| Name | Type | Description |
+| ---- | ------- | -------------------------------------------- |
+| [0] | bytes32 | The cross-chain signal service storage root. |
### getBlockHash
diff --git a/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2Signer.md b/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2Signer.md
new file mode 100644
index 00000000000..25017ebae24
--- /dev/null
+++ b/packages/website/pages/docs/reference/contract-documentation/L2/TaikoL2Signer.md
@@ -0,0 +1,25 @@
+## TaikoL2Signer
+
+### GOLDEN_TOUCH_ADDRESS
+
+```solidity
+address GOLDEN_TOUCH_ADDRESS
+```
+
+### GOLDEN_TOUCH_PRIVATEKEY
+
+```solidity
+uint256 GOLDEN_TOUCH_PRIVATEKEY
+```
+
+### L2_INVALID_GOLDEN_TOUCH_K
+
+```solidity
+error L2_INVALID_GOLDEN_TOUCH_K()
+```
+
+### signAnchor
+
+```solidity
+function signAnchor(bytes32 digest, uint8 k) public view returns (uint8 v, uint256 r, uint256 s)
+```
diff --git a/packages/website/pages/docs/reference/contract-documentation/_meta.json b/packages/website/pages/docs/reference/contract-documentation/_meta.json
deleted file mode 100644
index aef85b496d2..00000000000
--- a/packages/website/pages/docs/reference/contract-documentation/_meta.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "L1": {
- "title": "L1"
- },
- "L2": {
- "title": "L2"
- },
- "common": {
- "title": "Common"
- },
- "signal": {
- "title": "Signal"
- },
- "bridge": {
- "title": "Bridge"
- }
-}
diff --git a/packages/website/pages/docs/reference/contract-documentation/bridge/BridgeCustomErrors.md b/packages/website/pages/docs/reference/contract-documentation/bridge/BridgeCustomErrors.md
deleted file mode 100644
index 52e6a13fb48..00000000000
--- a/packages/website/pages/docs/reference/contract-documentation/bridge/BridgeCustomErrors.md
+++ /dev/null
@@ -1,137 +0,0 @@
----
-title: BridgeCustomErrors
----
-
-## BridgeCustomErrors
-
-### B_CANNOT_RECEIVE
-
-```solidity
-error B_CANNOT_RECEIVE()
-```
-
-### B_DENIED
-
-```solidity
-error B_DENIED()
-```
-
-### B_ERC20_CANNOT_RECEIVE
-
-```solidity
-error B_ERC20_CANNOT_RECEIVE()
-```
-
-### B_ETHER_RELEASED_ALREADY
-
-```solidity
-error B_ETHER_RELEASED_ALREADY()
-```
-
-### B_EV_DO_NOT_BURN
-
-```solidity
-error B_EV_DO_NOT_BURN()
-```
-
-### B_EV_NOT_AUTHORIZED
-
-```solidity
-error B_EV_NOT_AUTHORIZED()
-```
-
-### B_EV_PARAM
-
-```solidity
-error B_EV_PARAM()
-```
-
-### B_FAILED_TRANSFER
-
-```solidity
-error B_FAILED_TRANSFER()
-```
-
-### B_FORBIDDEN
-
-```solidity
-error B_FORBIDDEN()
-```
-
-### B_GAS_LIMIT
-
-```solidity
-error B_GAS_LIMIT()
-```
-
-### B_INCORRECT_VALUE
-
-```solidity
-error B_INCORRECT_VALUE()
-```
-
-### B_INIT_PARAM_ERROR
-
-```solidity
-error B_INIT_PARAM_ERROR()
-```
-
-### B_MSG_HASH_NULL
-
-```solidity
-error B_MSG_HASH_NULL()
-```
-
-### B_MSG_NON_RETRIABLE
-
-```solidity
-error B_MSG_NON_RETRIABLE()
-```
-
-### B_MSG_NOT_FAILED
-
-```solidity
-error B_MSG_NOT_FAILED()
-```
-
-### B_NULL_APP_ADDR
-
-```solidity
-error B_NULL_APP_ADDR()
-```
-
-### B_OWNER_IS_NULL
-
-```solidity
-error B_OWNER_IS_NULL()
-```
-
-### B_SIGNAL_NOT_RECEIVED
-
-```solidity
-error B_SIGNAL_NOT_RECEIVED()
-```
-
-### B_STATUS_MISMTACH
-
-```solidity
-error B_STATUS_MISMTACH()
-```
-
-### B_WRONG_CHAIN_ID
-
-```solidity
-error B_WRONG_CHAIN_ID()
-```
-
-### B_WRONG_TO_ADDRESS
-
-```solidity
-error B_WRONG_TO_ADDRESS()
-```
-
-### B_ZERO_SIGNAL
-
-```solidity
-error B_ZERO_SIGNAL()
-```
diff --git a/packages/website/pages/docs/reference/contract-documentation/bridge/TokenVault.md b/packages/website/pages/docs/reference/contract-documentation/bridge/TokenVault.md
index a41b923110d..552a8b53c7b 100644
--- a/packages/website/pages/docs/reference/contract-documentation/bridge/TokenVault.md
+++ b/packages/website/pages/docs/reference/contract-documentation/bridge/TokenVault.md
@@ -98,12 +98,6 @@ error TOKENVAULT_INVALID_TO()
error TOKENVAULT_INVALID_VALUE()
```
-### TOKENVAULT_INVALID_CALL_VALUE
-
-```solidity
-error TOKENVAULT_INVALID_CALL_VALUE()
-```
-
### TOKENVAULT_INVALID_TOKEN
```solidity
@@ -152,26 +146,6 @@ error TOKENVAULT_INVALID_SENDER()
function init(address addressManager) external
```
-### sendEther
-
-```solidity
-function sendEther(uint256 destChainId, address to, uint256 gasLimit, uint256 processingFee, address refundAddress, string memo) external payable
-```
-
-Receives Ether and constructs a Bridge message. Sends the Ether and
-message along to the Bridge.
-
-#### Parameters
-
-| Name | Type | Description |
-| ------------- | ------- | --------------------------- |
-| destChainId | uint256 | @custom:see IBridge.Message |
-| to | address | @custom:see IBridge.Message |
-| gasLimit | uint256 | @custom:see IBridge.Message |
-| processingFee | uint256 | @custom:see IBridge.Message |
-| refundAddress | address | @custom:see IBridge.Message |
-| memo | string | @custom:see IBridge.Message |
-
### sendERC20
```solidity
diff --git a/packages/website/pages/docs/reference/contract-documentation/common/AddressManager.md b/packages/website/pages/docs/reference/contract-documentation/common/AddressManager.md
new file mode 100644
index 00000000000..2f4acb7cd11
--- /dev/null
+++ b/packages/website/pages/docs/reference/contract-documentation/common/AddressManager.md
@@ -0,0 +1,93 @@
+## IAddressManager
+
+Interface to set and get an address for a name.
+
+### setAddress
+
+```solidity
+function setAddress(uint256 domain, string name, address newAddress) external
+```
+
+Changes the address associated with a particular name.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | ------- | -------------------------------------------- |
+| domain | uint256 | Uint256 domain to assiciate an address with. |
+| name | string | String name to associate an address with. |
+| newAddress | address | Address to associate with the name. |
+
+### getAddress
+
+```solidity
+function getAddress(uint256 domain, string name) external view returns (address)
+```
+
+Retrieves the address associated with a given name.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | ------- | --------------------------------- |
+| domain | uint256 | Class to retrieve an address for. |
+| name | string | Name to retrieve an address for. |
+
+#### Return Values
+
+| Name | Type | Description |
+| ---- | ------- | --------------------------------------- |
+| [0] | address | Address associated with the given name. |
+
+## AddressManager
+
+### AddressSet
+
+```solidity
+event AddressSet(uint256 _domain, string _name, address _newAddress, address _oldAddress)
+```
+
+### init
+
+```solidity
+function init() external
+```
+
+_Initializer to be called after being deployed behind a proxy._
+
+### setAddress
+
+```solidity
+function setAddress(uint256 domain, string name, address newAddress) external
+```
+
+Changes the address associated with a particular name.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | ------- | -------------------------------------------- |
+| domain | uint256 | Uint256 domain to assiciate an address with. |
+| name | string | String name to associate an address with. |
+| newAddress | address | Address to associate with the name. |
+
+### getAddress
+
+```solidity
+function getAddress(uint256 domain, string name) external view returns (address addr)
+```
+
+Retrieves the address associated with a given name.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | ------- | --------------------------------- |
+| domain | uint256 | Class to retrieve an address for. |
+| name | string | Name to retrieve an address for. |
+
+#### Return Values
+
+| Name | Type | Description |
+| ---- | ------- | --------------------------------------- |
+| addr | address | Address associated with the given name. |
diff --git a/packages/website/pages/docs/reference/contract-documentation/common/IAddressManager.md b/packages/website/pages/docs/reference/contract-documentation/common/IAddressManager.md
deleted file mode 100644
index 3a664d206ec..00000000000
--- a/packages/website/pages/docs/reference/contract-documentation/common/IAddressManager.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-title: IAddressManager
----
-
-## IAddressManager
-
-Interface to set and get an address for a name.
-
-### setAddress
-
-```solidity
-function setAddress(string name, address addr) external
-```
-
-Associate an address to a name.
-
-_The original address associated with the name, if exists, will be
-replaced._
-
-#### Parameters
-
-| Name | Type | Description |
-| ---- | ------- | -------------------------------------------------- |
-| name | string | The name which an address will be associated with. |
-| addr | address | The address to be associated with the given name. |
-
-### getAddress
-
-```solidity
-function getAddress(string name) external view returns (address)
-```
-
-Returns the address associated with the given name.
-
-#### Parameters
-
-| Name | Type | Description |
-| ---- | ------ | ----------------------------------------------- |
-| name | string | The name for which an address will be returned. |
-
-#### Return Values
-
-| Name | Type | Description |
-| ---- | ------- | -------------------------------------------------------------------------------------------------- |
-| [0] | address | The address associated with the given name. If no address is found, `address(0)` will be returned. |
diff --git a/packages/website/pages/docs/reference/contract-documentation/common/IHeaderSync.md b/packages/website/pages/docs/reference/contract-documentation/common/IHeaderSync.md
deleted file mode 100644
index 4c5f827a760..00000000000
--- a/packages/website/pages/docs/reference/contract-documentation/common/IHeaderSync.md
+++ /dev/null
@@ -1,26 +0,0 @@
----
-title: IHeaderSync
----
-
-## IHeaderSync
-
-Interface implemented by both the TaikoL1 and TaikoL2 contracts. It exposes
-the methods needed to access the block hashes of the other chain.
-
-### HeaderSynced
-
-```solidity
-event HeaderSynced(uint256 srcHeight, bytes32 srcHash)
-```
-
-### getSyncedHeader
-
-```solidity
-function getSyncedHeader(uint256 number) external view returns (bytes32)
-```
-
-### getLatestSyncedHeader
-
-```solidity
-function getLatestSyncedHeader() external view returns (bytes32)
-```
diff --git a/packages/website/pages/docs/reference/contract-documentation/common/IXchainSync.md b/packages/website/pages/docs/reference/contract-documentation/common/IXchainSync.md
new file mode 100644
index 00000000000..f7efb7e74ab
--- /dev/null
+++ b/packages/website/pages/docs/reference/contract-documentation/common/IXchainSync.md
@@ -0,0 +1,51 @@
+## IXchainSync
+
+Interface implemented by both the TaikoL1 and TaikoL2 contracts. It exposes
+the methods needed to access the block hashes of the other chain.
+
+### XchainSynced
+
+```solidity
+event XchainSynced(uint256 srcHeight, bytes32 blockHash, bytes32 signalRoot)
+```
+
+### getXchainBlockHash
+
+```solidity
+function getXchainBlockHash(uint256 number) external view returns (bytes32)
+```
+
+Returns the cross-chain block hash at the given block number.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | ------- | --------------------------------------------- |
+| number | uint256 | The block number. Use 0 for the latest block. |
+
+#### Return Values
+
+| Name | Type | Description |
+| ---- | ------- | --------------------------- |
+| [0] | bytes32 | The cross-chain block hash. |
+
+### getXchainSignalRoot
+
+```solidity
+function getXchainSignalRoot(uint256 number) external view returns (bytes32)
+```
+
+Returns the cross-chain signal service storage root at the given
+block number.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | ------- | --------------------------------------------- |
+| number | uint256 | The block number. Use 0 for the latest block. |
+
+#### Return Values
+
+| Name | Type | Description |
+| ---- | ------- | -------------------------------------------- |
+| [0] | bytes32 | The cross-chain signal service storage root. |
diff --git a/packages/website/pages/docs/reference/contract-documentation/signal/SignalService.md b/packages/website/pages/docs/reference/contract-documentation/signal/SignalService.md
index c6c13eb467f..b8738414912 100644
--- a/packages/website/pages/docs/reference/contract-documentation/signal/SignalService.md
+++ b/packages/website/pages/docs/reference/contract-documentation/signal/SignalService.md
@@ -8,7 +8,7 @@ title: SignalService
```solidity
struct SignalProof {
- struct BlockHeader header;
+ uint256 height;
bytes proof;
}
```
diff --git a/packages/whitepaper/main.tex b/packages/whitepaper/main.tex
index 85c0a0ea7a4..71b4cf266e8 100644
--- a/packages/whitepaper/main.tex
+++ b/packages/whitepaper/main.tex
@@ -78,7 +78,7 @@
\pagecolor{pagecolor}
\begin{abstract}
-An Ethereum-equivalent ZK-Rollup allows for scaling Ethereum without sacrificing security or compatibility. Advancements in Zero-Knowledge Proof cryptography and its application towards proving Ethereum Virtual Machine (EVM) execution have led to a flourishing of ZK-EVMs, now with further design decisions to choose from. Taiko aims to be a decentralized ZK-Rollup, prioritizing Ethereum-equivalence. Supporting all existing Ethereum applications, tooling, and infrastructure is the primary goal and benefit of this path. Besides the maximally compatible ZK-EVM component, which proves the correctness of EVM computation on the rollup, Taiko must implement a layer-2 blockchain architecture to support it. This architecture seeks to be as lightweight, decentralized, and permissionless as possible, and consists of Taiko nodes, provers, and smart contracts. Taiko nodes construct rollup blocks from users' L2 transactions and commit them to L1. Provers generate ZK-SNARK proofs asserting the validity of L2 transactions and blocks. A set of smart contracts deployed on Ethereum L1 acts as the data availability mechanism and verifier of the ZKPs.
+An Ethereum-equivalent ZK-Rollup allows for scaling Ethereum without sacrificing security or compatibility. Advancements in Zero-Knowledge Proof cryptography and its application towards proving Ethereum Virtual Machine (EVM) execution have led to a flourishing of ZK-EVMs, now with further design decisions to choose from. Taiko aims to be a decentralized ZK-Rollup, prioritizing Ethereum-equivalence. Supporting all existing Ethereum applications, tooling, and infrastructure is the primary goal and benefit of this path. Besides the maximally compatible ZK-EVM component, which proves the correctness of EVM computation on the rollup, Taiko must implement a layer-2 blockchain architecture to support it. This architecture seeks to be as lightweight, decentralized, and permissionless as possible, and consists of Taiko nodes, provers, and smart contracts. Taiko nodes construct rollup blocks from users' L2 transactions and propose them to L1. Provers generate ZK-SNARK proofs asserting the validity of L2 transactions and blocks. A set of smart contracts deployed on Ethereum L1 acts as the data availability mechanism and verifier of the ZKPs.
\end{abstract}
@@ -150,7 +150,6 @@ \subsubsection{TaikoL1} Deployed on Ethereum. This contract on L1 is used to pro
\item[numProposedBlocks] The total number of proposed blocks, and the ID for the next proposed block, formally $R_\mathrm{i}$.
\item[proposedBlocks] The list of proposed blocks, formally $R_\mathrm{b}$.
\item[lastVerifiedBlockId] The ID of the last verified block, formally $R_\mathrm{f}$.
-\item [blockCommits] The mapping from the committed blocks' \emph{commit hashes} to their enclosed L1 blocks' block numbers, formally $R_\mathrm{c}$. If a block's commit hash is $h$, its number is $R_\mathrm{c}[h]$ (see Section \ref{sec:commit}).
\item[forkChoices] The mapping from proposed block IDs to their \emph{Fork Choices}, formally $R_\mathrm{f}$. The fork choices for the $i$-th block is $R_\mathrm{f}[i]$. Fork Choices are discussed in detail in Section \ref{sec:proving}.
\end{description}
@@ -203,18 +202,11 @@ \subsubsection{Proposed Block Intrinsic Validity}
\nonumber& & C_{\mathbf{t}} \ne 0 \quad \wedge \\
\nonumber& & C_{\mathbf{t}} = \texttt{KEC}(L) \quad \wedge \\
\nonumber& & C_{\mathbf{a}} = \texttt{NUMBER} - 1 \quad \wedge \\
-\nonumber& & C_{\mathbf{h}} = \texttt{BLOCKHASH}(C_{\mathbf{a}}) \quad \wedge \\
-\nonumber& & R_{\mathbf{c}}[\texttt{KEC}((C_{\mathbf{c}}, C_{\mathbf{t}}))] \ne 0 \quad \wedge \\
-\nonumber& & R_{\mathbf{c}}[\texttt{KEC}((C_{\mathbf{c}}, C_{\mathbf{t}}))] \le \\
-\nonumber& & \texttt{NUMBER} - K_{\mathrm{CommitDelayConfirms}}
+\nonumber& & C_{\mathbf{h}} = \texttt{BLOCKHASH}(C_{\mathbf{a}})
\end{eqnarray}
-Where $\texttt{KEC}((C_{\mathbf{c}}, C_{\mathbf{t}}))$ is called the block's \emph{Commit Hash}.
-
After passing the test, the proposed block is appended to the proposed block list $R_\mathrm{b}$ and $R_\mathrm{i}$ is incremented by one.
-\subsubsection{Commit Hash}\label{sec:commit} The commit hash is the Keccak-256 hash of a proposed block's \textbf{beneficiary} and \textbf{txListHash}. The protocol requires that a block can be proposed only $K_{\mathrm{CommitDelayConfirms}}$ confirmations after its commit hash has been committed to \underline{TaikoL1}, which prevents other parties from inspecting the L1 mempool and submitting the same or a similar block, allowing them to collect the transaction fees and/or MEV \cite{mev}.
-
\subsection{Block Validation and Mapping } \label{sec:filtermap}
The protocol filters proposed blocks using a \emph{txList Intrinsic Validity Function} $V^l$ on each block's txList $L$. If $V^l(L)$ returns \texttt{False}, the proposed block is dropped and ignored by L2 nodes; otherwise, the proposed block will map to an actual Taiko L2 block using the \emph{Block Mapping Function} $M(\dot{B})$.
@@ -840,9 +832,6 @@ \section{Future Improvements}\label{sec:improvements}
\subsection{Ethereum Data Blobs}\label{sec:datablobs}
EIP-4844 \cite{eip4844} (or similar) on Ethereum will, once enabled, allow data to be stored on L1 in a more efficient manner. Instead of storing the txList data in the L1 transaction data we will instead be able to store the data in a data blob. This data will be read directly from the KZG commitment in the ZK-EVM circuits without ever needing to access the data in an L1 smart contract.
-\subsection{VDF instead of Block Commitments}\label{sec:vdf}
-A \emph{Verifiable Delay Function} (VDF) can be used to protect pending block proposals (see Section \ref{sec:commit}). This achieves the same goal as the block commitment scheme but without requiring an additional Ethereum transaction. Instead, some computational work is required before the block can be proposed.
-
\subsection{Block Validity Verification at Proposal Time}\label{sec:propose-proof}
Currently we accept blocks at proposal time even if the transaction data is invalid. Afterwards, we depend on provers to generate a proof that shows the block is invalid (see Section \ref{sec:proving-invalid}). We do this because the work required to verify all requirements imposed on the transaction data is expensive to verify on L1. Instead, we can require a proof together with the proposed block attesting that the block data is valid. This requires computing a proof, and so the requirement for this improvement is that this proof can be generated efficiently enough so that it is not a potential bottleneck for proposing blocks. Because verifying a proof is still quite expensive, this proof should not be verified immediately at block proposal time but should be verified as part of the block proof.
@@ -969,8 +958,6 @@ \section{Protocol Constants}\label{sec:constants1}
$K_{\mathrm{MaxNumBlocks}}$ & The maximum number of slots for proposed blocks. \\
$K_{\mathrm{MaxVerificationsPerTx}}$ & The number of proven blocks that can be verified when a new block is\\
& proposed or a block is proven. \\
-$K_{\mathrm{CommitDelayConfirms}}$ & The number of confirmations to wait for before a block can be proposed\\
-& after its commit-hash has been written on Ethereum.\\
$K_{\mathrm{MaxProofsPerForkChoice}}$ & The maximum number of proofs per fork choice. \\
$K_{\mathrm{BlockMaxGasLimit}}$ & A Taiko block's max gas limit besides $K_{\mathrm{AnchorTxGasLimit}}$. \\
$K_{\mathrm{BlockMaxTxs}}$ & The maximum number of transactions in a Taiko block besides the anchor\\
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 4b030db7d7a..028e6642eb5 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14,7 +14,7 @@ importers:
dependencies:
'@coinbase/wallet-sdk':
specifier: ^3.6.3
- version: 3.6.3
+ version: 3.6.3(@babel/core@7.21.4)
'@ethersproject/experimental':
specifier: ^5.7.0
version: 5.7.0
@@ -26,10 +26,10 @@ importers:
version: 1.6.0
'@wagmi/connectors':
specifier: ^0.1.1
- version: 0.1.1(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
+ version: 0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
'@wagmi/core':
specifier: ^0.8.0
- version: 0.8.4(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(typescript@4.9.3)
+ version: 0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3)
axios:
specifier: ^1.2.0
version: 1.2.0
@@ -51,7 +51,7 @@ importers:
devDependencies:
'@babel/preset-env':
specifier: ^7.16.0
- version: 7.20.2
+ version: 7.20.2(@babel/core@7.21.4)
'@sveltejs/vite-plugin-svelte':
specifier: ^1.0.1
version: 1.3.1(svelte@3.53.1)(vite@3.2.4)
@@ -75,10 +75,10 @@ importers:
version: 2.6.2
'@typescript-eslint/eslint-plugin':
specifier: ^5.16.0
- version: 5.44.0(@typescript-eslint/parser@5.44.0)(typescript@4.9.3)
+ version: 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.39.0)(typescript@4.9.3)
'@typescript-eslint/parser':
specifier: ^5.16.0
- version: 5.44.0(typescript@4.9.3)
+ version: 5.44.0(eslint@8.39.0)(typescript@4.9.3)
'@zerodevx/svelte-toast':
specifier: ^0.6.3
version: 0.6.3
@@ -87,7 +87,7 @@ importers:
version: 10.4.13(postcss@8.4.19)
babel-jest:
specifier: ^27.3.1
- version: 27.5.1
+ version: 27.5.1(@babel/core@7.21.4)
babel-plugin-transform-es2015-modules-commonjs:
specifier: ^6.26.2
version: 6.26.2
@@ -96,13 +96,13 @@ importers:
version: 1.16.6
eslint-plugin-jest:
specifier: ^27.2.1
- version: 27.2.1(@typescript-eslint/eslint-plugin@5.44.0)(jest@27.5.1)(typescript@4.9.3)
+ version: 27.2.1(@typescript-eslint/eslint-plugin@5.44.0)(eslint@8.39.0)(jest@27.5.1)(typescript@4.9.3)
eslint-plugin-simple-import-sort:
specifier: ^10.0.0
- version: 10.0.0
+ version: 10.0.0(eslint@8.39.0)
eslint-plugin-svelte3:
specifier: ^4.0.0
- version: 4.0.0(svelte@3.53.1)
+ version: 4.0.0(eslint@8.39.0)(svelte@3.53.1)
jest:
specifier: ^27.5.1
version: 27.5.1
@@ -120,7 +120,7 @@ importers:
version: 7.1.2
postcss-loader:
specifier: ^6.2.0
- version: 6.2.1(postcss@8.4.19)
+ version: 6.2.1(postcss@8.4.19)(webpack@5.80.0)
prettier:
specifier: 2.7.1
version: 2.7.1
@@ -132,13 +132,13 @@ importers:
version: 2.1.2
rollup-plugin-polyfill-node:
specifier: ^0.10.2
- version: 0.10.2
+ version: 0.10.2(rollup@2.79.1)
svelte:
specifier: ^3.53.1
version: 3.53.1
svelte-check:
specifier: ^2.8.0
- version: 2.9.2(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)
+ version: 2.9.2(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)
svelte-heros-v2:
specifier: ^0.3.10
version: 0.3.10
@@ -150,7 +150,7 @@ importers:
version: 3.1.4(svelte@3.53.1)
svelte-preprocess:
specifier: ^4.10.7
- version: 4.10.7(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
+ version: 4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
tailwindcss:
specifier: ^3.2.4
version: 3.2.4(postcss@8.4.19)
@@ -159,13 +159,13 @@ importers:
version: 2.2.0
ts-jest:
specifier: ^27.0.7
- version: 27.1.5(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3)
+ version: 27.1.5(@babel/core@7.21.4)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3)
ts-jest-mock-import-meta:
specifier: ^0.12.0
version: 0.12.0(ts-jest@27.1.5)
ts-loader:
specifier: ^9.2.6
- version: 9.4.1(typescript@4.9.3)
+ version: 9.4.1(typescript@4.9.3)(webpack@5.80.0)
tslib:
specifier: ^2.4.0
version: 2.4.1
@@ -184,62 +184,65 @@ importers:
packages/protocol:
dependencies:
'@gnosis.pm/zodiac':
- specifier: ^1.0.7
+ specifier: ^1.1.9
version: 1.1.9
'@openzeppelin/contracts':
- specifier: ^4.5.0
- version: 4.8.0
+ specifier: ^4.8.3
+ version: 4.8.3
'@openzeppelin/contracts-upgradeable':
- specifier: ^4.5.1
- version: 4.8.0
+ specifier: ^4.8.3
+ version: 4.8.3
channel-ts:
specifier: ^0.1.2
version: 0.1.2
devDependencies:
'@defi-wonderland/smock':
- specifier: ^2.3.3
- version: 2.3.4(@ethersproject/abi@5.7.0)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@nomiclabs/hardhat-ethers@2.2.1)(ethers@5.7.2)(hardhat@2.12.2)
+ specifier: ^2.3.4
+ version: 2.3.4(@ethersproject/abi@5.7.0)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@nomiclabs/hardhat-ethers@2.2.3)(ethers@5.7.2)(hardhat@2.14.0)
+ '@foundry-rs/hardhat-forge':
+ specifier: ^0.1.17
+ version: 0.1.17(@nomiclabs/hardhat-ethers@2.2.3)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.14.0)
'@nomicfoundation/hardhat-network-helpers':
- specifier: ^1.0.6
- version: 1.0.6(hardhat@2.12.2)
+ specifier: ^1.0.8
+ version: 1.0.8(hardhat@2.14.0)
'@nomiclabs/hardhat-ethers':
- specifier: ^2.0.0
- version: 2.2.1(ethers@5.7.2)(hardhat@2.12.2)
+ specifier: ^2.2.3
+ version: 2.2.3(ethers@5.7.2)(hardhat@2.14.0)
'@nomiclabs/hardhat-etherscan':
- specifier: ^3.1.0
- version: 3.1.2(hardhat@2.12.2)
+ specifier: ^3.1.7
+ version: 3.1.7(hardhat@2.14.0)
'@nomiclabs/hardhat-waffle':
- specifier: ^2.0.0
- version: 2.0.3(@nomiclabs/hardhat-ethers@2.2.1)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.12.2)
+ specifier: ^2.0.5
+ version: 2.0.5(@nomiclabs/hardhat-ethers@2.2.3)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.14.0)
'@openzeppelin/hardhat-upgrades':
- specifier: ^1.14.0
- version: 1.21.0(@nomiclabs/hardhat-ethers@2.2.1)(@nomiclabs/hardhat-etherscan@3.1.2)(ethers@5.7.2)(hardhat@2.12.2)
+ specifier: ^1.22.1
+ version: 1.22.1(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.7)(ethers@5.7.2)(hardhat@2.14.0)
'@typechain/ethers-v5':
specifier: ^7.2.0
- version: 7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@5.2.0)(typescript@4.9.3)
+ version: 7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@5.2.0)(typescript@4.9.5)
'@typechain/hardhat':
specifier: ^2.3.1
- version: 2.3.1(hardhat@2.12.2)(lodash@4.17.21)(typechain@5.2.0)
+ version: 2.3.1(hardhat@2.14.0)(lodash@4.17.21)(typechain@5.2.0)
'@types/chai':
- specifier: ^4.3.0
+ specifier: ^4.3.4
version: 4.3.4
'@types/glob':
- specifier: ^8.0.1
- version: 8.0.1
+ specifier: ^8.1.0
+ version: 8.1.0
'@types/mocha':
- specifier: ^9.1.0
+ specifier: ^9.1.1
version: 9.1.1
'@types/node':
- specifier: ^12.20.45
+ specifier: ^12.20.55
version: 12.20.55
'@typescript-eslint/eslint-plugin':
specifier: ^4.33.0
- version: 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.3)
+ version: 4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.5)
'@typescript-eslint/parser':
specifier: ^4.33.0
- version: 4.33.0(eslint@7.32.0)(typescript@4.9.3)
+ version: 4.33.0(eslint@7.32.0)(typescript@4.9.5)
chai:
- specifier: ^4.2.0
+ specifier: ^4.3.7
version: 4.3.7
chalk:
specifier: 4.1.2
@@ -251,80 +254,80 @@ importers:
specifier: ^7.32.0
version: 7.32.0
eslint-config-prettier:
- specifier: ^8.3.0
- version: 8.5.0(eslint@7.32.0)
+ specifier: ^8.8.0
+ version: 8.8.0(eslint@7.32.0)
eslint-config-standard:
specifier: ^16.0.3
- version: 16.0.3(eslint-plugin-import@2.26.0)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@7.32.0)
+ version: 16.0.3(eslint-plugin-import@2.27.5)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@7.32.0)
eslint-plugin-import:
- specifier: ^2.25.4
- version: 2.26.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)
+ specifier: ^2.27.5
+ version: 2.27.5(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)
eslint-plugin-node:
specifier: ^11.1.0
version: 11.1.0(eslint@7.32.0)
eslint-plugin-prettier:
specifier: ^3.4.1
- version: 3.4.1(eslint-config-prettier@8.5.0)(eslint@7.32.0)(prettier@2.8.0)
+ version: 3.4.1(eslint-config-prettier@8.8.0)(eslint@7.32.0)(prettier@2.8.8)
eslint-plugin-promise:
specifier: ^5.2.0
version: 5.2.0(eslint@7.32.0)
ethereum-waffle:
- specifier: ^3.0.0
- version: 3.4.4(typescript@4.9.3)
+ specifier: ^3.4.4
+ version: 3.4.4(typescript@4.9.5)
ethers:
- specifier: ^5.0.0
+ specifier: ^5.7.2
version: 5.7.2
glob:
specifier: ^8.1.0
version: 8.1.0
hardhat:
- specifier: ^2.8.3
- version: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ specifier: ^2.14.0
+ version: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
hardhat-abi-exporter:
- specifier: ^2.10.0
- version: 2.10.1(hardhat@2.12.2)
+ specifier: ^2.10.1
+ version: 2.10.1(hardhat@2.14.0)
hardhat-contract-sizer:
specifier: ^2.8.0
- version: 2.8.0(hardhat@2.12.2)
+ version: 2.8.0(hardhat@2.14.0)
hardhat-docgen:
specifier: ^1.3.0
- version: 1.3.0(hardhat@2.12.2)(lodash@4.17.21)
+ version: 1.3.0(hardhat@2.14.0)(lodash@4.17.21)
hardhat-gas-reporter:
- specifier: ^1.0.7
- version: 1.0.9(hardhat@2.12.2)
+ specifier: ^1.0.9
+ version: 1.0.9(hardhat@2.14.0)
lint-staged:
- specifier: ^12.3.4
+ specifier: ^12.5.0
version: 12.5.0
merkle-patricia-tree:
specifier: ^4.2.4
version: 4.2.4
prettier:
- specifier: ^2.5.1
- version: 2.8.0
+ specifier: ^2.8.8
+ version: 2.8.8
prettier-plugin-solidity:
- specifier: ^1.1.2
- version: 1.1.2(prettier@2.8.0)
+ specifier: ^1.1.3
+ version: 1.1.3(prettier@2.8.8)
rlp:
specifier: ^3.0.0
version: 3.0.0
solhint:
- specifier: ^3.4.0
- version: 3.4.0
+ specifier: ^3.4.1
+ version: 3.4.1
solidity-coverage:
specifier: github:taikoxyz/solidity-coverage
- version: github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5(hardhat@2.12.2)
+ version: github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5(hardhat@2.14.0)
solidity-docgen:
- specifier: ^0.6.0-beta.34
- version: 0.6.0-beta.34(hardhat@2.12.2)
+ specifier: 0.6.0-beta.35
+ version: 0.6.0-beta.35(hardhat@2.14.0)
ts-node:
- specifier: ^10.5.0
- version: 10.9.1(@types/node@12.20.55)(typescript@4.9.3)
+ specifier: ^10.9.1
+ version: 10.9.1(@types/node@12.20.55)(typescript@4.9.5)
typechain:
specifier: ^5.2.0
- version: 5.2.0(typescript@4.9.3)
+ version: 5.2.0(typescript@4.9.5)
typescript:
- specifier: ^4.5.5
- version: 4.9.3
+ specifier: ^4.9.5
+ version: 4.9.5
packages/relayer: {}
@@ -332,7 +335,7 @@ importers:
dependencies:
'@coinbase/wallet-sdk':
specifier: ^3.6.3
- version: 3.6.3(@babel/core@7.20.2)
+ version: 3.6.3(@babel/core@7.21.4)
'@ethersproject/experimental':
specifier: ^5.7.0
version: 5.7.0
@@ -344,10 +347,10 @@ importers:
version: 1.6.0
'@wagmi/connectors':
specifier: ^0.1.1
- version: 0.1.1(@babel/core@7.20.2)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.5)
+ version: 0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.5)
'@wagmi/core':
specifier: ^0.8.0
- version: 0.8.4(@babel/core@7.20.2)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.5)
+ version: 0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.5)
axios:
specifier: ^1.2.0
version: 1.2.0
@@ -369,7 +372,7 @@ importers:
devDependencies:
'@babel/preset-env':
specifier: ^7.16.0
- version: 7.20.2(@babel/core@7.20.2)
+ version: 7.20.2(@babel/core@7.21.4)
'@sveltejs/vite-plugin-svelte':
specifier: ^1.0.1
version: 1.3.1(svelte@3.53.1)(vite@3.2.4)
@@ -393,10 +396,10 @@ importers:
version: 2.6.2
'@typescript-eslint/eslint-plugin':
specifier: ^5.16.0
- version: 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@7.32.0)(typescript@4.9.5)
+ version: 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.39.0)(typescript@4.9.5)
'@typescript-eslint/parser':
specifier: ^5.16.0
- version: 5.44.0(eslint@7.32.0)(typescript@4.9.5)
+ version: 5.44.0(eslint@8.39.0)(typescript@4.9.5)
'@zerodevx/svelte-toast':
specifier: ^0.6.3
version: 0.6.3
@@ -405,7 +408,7 @@ importers:
version: 10.4.13(postcss@8.4.21)
babel-jest:
specifier: ^27.3.1
- version: 27.5.1(@babel/core@7.20.2)
+ version: 27.5.1(@babel/core@7.21.4)
babel-plugin-transform-es2015-modules-commonjs:
specifier: ^6.26.2
version: 6.26.2
@@ -426,7 +429,7 @@ importers:
version: 7.1.2
postcss-loader:
specifier: ^6.2.0
- version: 6.2.1(postcss@8.4.21)(webpack@5.75.0)
+ version: 6.2.1(postcss@8.4.21)(webpack@5.80.0)
prettier:
specifier: 2.7.1
version: 2.7.1
@@ -441,7 +444,7 @@ importers:
version: 3.53.1
svelte-check:
specifier: ^2.8.0
- version: 2.9.2(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)
+ version: 2.9.2(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)
svelte-heros-v2:
specifier: ^0.3.10
version: 0.3.10
@@ -453,7 +456,7 @@ importers:
version: 3.1.4(svelte@3.53.1)
svelte-preprocess:
specifier: ^4.10.7
- version: 4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.5)
+ version: 4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.5)
tailwindcss:
specifier: ^3.2.4
version: 3.2.6(postcss@8.4.21)
@@ -462,13 +465,13 @@ importers:
version: 2.2.0
ts-jest:
specifier: ^27.0.7
- version: 27.1.5(@babel/core@7.20.2)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.5)
+ version: 27.1.5(@babel/core@7.21.4)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.5)
ts-jest-mock-import-meta:
specifier: ^0.12.0
version: 0.12.0(ts-jest@27.1.5)
ts-loader:
specifier: ^9.2.6
- version: 9.4.1(typescript@4.9.5)(webpack@5.75.0)
+ version: 9.4.1(typescript@4.9.5)(webpack@5.80.0)
tslib:
specifier: ^2.4.0
version: 2.5.0
@@ -486,7 +489,7 @@ importers:
dependencies:
'@coinbase/wallet-sdk':
specifier: ^3.6.3
- version: 3.6.3(@babel/core@7.20.2)
+ version: 3.6.3(@babel/core@7.21.4)
'@ethersproject/experimental':
specifier: ^5.7.0
version: 5.7.0
@@ -498,10 +501,10 @@ importers:
version: 1.6.0
'@wagmi/connectors':
specifier: ^0.1.1
- version: 0.1.1(@babel/core@7.20.2)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
+ version: 0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
'@wagmi/core':
specifier: ^0.8.0
- version: 0.8.4(@babel/core@7.20.2)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3)
+ version: 0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3)
axios:
specifier: ^1.2.0
version: 1.2.0
@@ -523,7 +526,7 @@ importers:
devDependencies:
'@babel/preset-env':
specifier: ^7.16.0
- version: 7.20.2(@babel/core@7.20.2)
+ version: 7.20.2(@babel/core@7.21.4)
'@sveltejs/vite-plugin-svelte':
specifier: ^1.0.1
version: 1.3.1(svelte@3.53.1)(vite@3.2.4)
@@ -547,10 +550,10 @@ importers:
version: 2.6.2
'@typescript-eslint/eslint-plugin':
specifier: ^5.16.0
- version: 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@7.32.0)(typescript@4.9.3)
+ version: 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.39.0)(typescript@4.9.3)
'@typescript-eslint/parser':
specifier: ^5.16.0
- version: 5.44.0(eslint@7.32.0)(typescript@4.9.3)
+ version: 5.44.0(eslint@8.39.0)(typescript@4.9.3)
'@zerodevx/svelte-toast':
specifier: ^0.6.3
version: 0.6.3
@@ -559,7 +562,7 @@ importers:
version: 10.4.13(postcss@8.4.19)
babel-jest:
specifier: ^27.3.1
- version: 27.5.1(@babel/core@7.20.2)
+ version: 27.5.1(@babel/core@7.21.4)
babel-plugin-transform-es2015-modules-commonjs:
specifier: ^6.26.2
version: 6.26.2
@@ -580,7 +583,7 @@ importers:
version: 7.1.2
postcss-loader:
specifier: ^6.2.0
- version: 6.2.1(postcss@8.4.19)(webpack@5.75.0)
+ version: 6.2.1(postcss@8.4.19)(webpack@5.80.0)
prettier:
specifier: 2.7.1
version: 2.7.1
@@ -595,7 +598,7 @@ importers:
version: 3.53.1
svelte-check:
specifier: ^2.8.0
- version: 2.9.2(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)
+ version: 2.9.2(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)
svelte-heros-v2:
specifier: ^0.3.10
version: 0.3.10
@@ -607,7 +610,7 @@ importers:
version: 3.1.4(svelte@3.53.1)
svelte-preprocess:
specifier: ^4.10.7
- version: 4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
+ version: 4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
tailwindcss:
specifier: ^3.2.4
version: 3.2.4(postcss@8.4.19)
@@ -616,13 +619,13 @@ importers:
version: 2.2.0
ts-jest:
specifier: ^27.0.7
- version: 27.1.5(@babel/core@7.20.2)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3)
+ version: 27.1.5(@babel/core@7.21.4)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3)
ts-jest-mock-import-meta:
specifier: ^0.12.0
version: 0.12.0(ts-jest@27.1.5)
ts-loader:
specifier: ^9.2.6
- version: 9.4.1(typescript@4.9.3)(webpack@5.75.0)
+ version: 9.4.1(typescript@4.9.3)(webpack@5.80.0)
tslib:
specifier: ^2.4.0
version: 2.4.1
@@ -636,8 +639,6 @@ importers:
specifier: ^0.12.0
version: 0.12.0(vite@3.2.4)
- packages/tokenomics: {}
-
packages/website:
dependencies:
next:
@@ -694,6 +695,14 @@ packages:
dependencies:
'@jridgewell/gen-mapping': 0.1.1
'@jridgewell/trace-mapping': 0.3.17
+ dev: true
+
+ /@ampproject/remapping@2.2.1:
+ resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==}
+ engines: {node: '>=6.0.0'}
+ dependencies:
+ '@jridgewell/gen-mapping': 0.3.3
+ '@jridgewell/trace-mapping': 0.3.18
/@babel/code-frame@7.12.11:
resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==}
@@ -706,11 +715,22 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/highlight': 7.18.6
+ dev: true
+
+ /@babel/code-frame@7.21.4:
+ resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/highlight': 7.18.6
/@babel/compat-data@7.20.1:
resolution: {integrity: sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==}
engines: {node: '>=6.9.0'}
+ /@babel/compat-data@7.21.4:
+ resolution: {integrity: sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==}
+ engines: {node: '>=6.9.0'}
+
/@babel/core@7.20.2:
resolution: {integrity: sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==}
engines: {node: '>=6.9.0'}
@@ -726,12 +746,35 @@ packages:
'@babel/traverse': 7.20.1
'@babel/types': 7.20.2
convert-source-map: 1.9.0
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
gensync: 1.0.0-beta.2
json5: 2.2.1
semver: 6.3.0
transitivePeerDependencies:
- supports-color
+ dev: true
+
+ /@babel/core@7.21.4:
+ resolution: {integrity: sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@ampproject/remapping': 2.2.1
+ '@babel/code-frame': 7.21.4
+ '@babel/generator': 7.21.4
+ '@babel/helper-compilation-targets': 7.21.4(@babel/core@7.21.4)
+ '@babel/helper-module-transforms': 7.21.2
+ '@babel/helpers': 7.21.0
+ '@babel/parser': 7.21.4
+ '@babel/template': 7.20.7
+ '@babel/traverse': 7.21.4
+ '@babel/types': 7.21.4
+ convert-source-map: 1.9.0
+ debug: 4.3.4(supports-color@9.3.1)
+ gensync: 1.0.0-beta.2
+ json5: 2.2.3
+ semver: 6.3.0
+ transitivePeerDependencies:
+ - supports-color
/@babel/generator@7.20.4:
resolution: {integrity: sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==}
@@ -740,6 +783,16 @@ packages:
'@babel/types': 7.20.2
'@jridgewell/gen-mapping': 0.3.2
jsesc: 2.5.2
+ dev: true
+
+ /@babel/generator@7.21.4:
+ resolution: {integrity: sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/types': 7.21.4
+ '@jridgewell/gen-mapping': 0.3.3
+ '@jridgewell/trace-mapping': 0.3.18
+ jsesc: 2.5.2
/@babel/helper-annotate-as-pure@7.18.6:
resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==}
@@ -756,53 +809,51 @@ packages:
'@babel/types': 7.20.2
dev: true
- /@babel/helper-compilation-targets@7.20.0:
+ /@babel/helper-compilation-targets@7.20.0(@babel/core@7.20.2):
resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/compat-data': 7.20.1
+ '@babel/core': 7.20.2
'@babel/helper-validator-option': 7.18.6
browserslist: 4.21.5
semver: 6.3.0
+ dev: true
- /@babel/helper-compilation-targets@7.20.0(@babel/core@7.20.2):
+ /@babel/helper-compilation-targets@7.20.0(@babel/core@7.21.4):
resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
'@babel/compat-data': 7.20.1
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-validator-option': 7.18.6
browserslist: 4.21.5
semver: 6.3.0
- /@babel/helper-create-class-features-plugin@7.20.2:
- resolution: {integrity: sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==}
+ /@babel/helper-compilation-targets@7.21.4(@babel/core@7.21.4):
+ resolution: {integrity: sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-environment-visitor': 7.18.9
- '@babel/helper-function-name': 7.19.0
- '@babel/helper-member-expression-to-functions': 7.18.9
- '@babel/helper-optimise-call-expression': 7.18.6
- '@babel/helper-replace-supers': 7.19.1
- '@babel/helper-split-export-declaration': 7.18.6
- transitivePeerDependencies:
- - supports-color
- dev: true
+ '@babel/compat-data': 7.21.4
+ '@babel/core': 7.21.4
+ '@babel/helper-validator-option': 7.21.0
+ browserslist: 4.21.5
+ lru-cache: 5.1.1
+ semver: 6.3.0
- /@babel/helper-create-class-features-plugin@7.20.2(@babel/core@7.20.2):
+ /@babel/helper-create-class-features-plugin@7.20.2(@babel/core@7.21.4):
resolution: {integrity: sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-annotate-as-pure': 7.18.6
'@babel/helper-environment-visitor': 7.18.9
'@babel/helper-function-name': 7.19.0
@@ -814,50 +865,26 @@ packages:
- supports-color
dev: true
- /@babel/helper-create-regexp-features-plugin@7.19.0:
- resolution: {integrity: sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/helper-annotate-as-pure': 7.18.6
- regexpu-core: 5.2.2
- dev: true
-
- /@babel/helper-create-regexp-features-plugin@7.19.0(@babel/core@7.20.2):
+ /@babel/helper-create-regexp-features-plugin@7.19.0(@babel/core@7.21.4):
resolution: {integrity: sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-annotate-as-pure': 7.18.6
regexpu-core: 5.2.2
dev: true
- /@babel/helper-define-polyfill-provider@0.3.3:
- resolution: {integrity: sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==}
- peerDependencies:
- '@babel/core': ^7.4.0-0
- dependencies:
- '@babel/helper-compilation-targets': 7.20.0
- '@babel/helper-plugin-utils': 7.20.2
- debug: 4.3.4
- lodash.debounce: 4.0.8
- resolve: 1.22.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
-
- /@babel/helper-define-polyfill-provider@0.3.3(@babel/core@7.20.2):
+ /@babel/helper-define-polyfill-provider@0.3.3(@babel/core@7.21.4):
resolution: {integrity: sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==}
peerDependencies:
'@babel/core': ^7.4.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
+ '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
lodash.debounce: 4.0.8
resolve: 1.22.1
semver: 6.3.0
@@ -881,6 +908,14 @@ packages:
dependencies:
'@babel/template': 7.18.10
'@babel/types': 7.20.2
+ dev: true
+
+ /@babel/helper-function-name@7.21.0:
+ resolution: {integrity: sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/template': 7.20.7
+ '@babel/types': 7.21.4
/@babel/helper-hoist-variables@7.18.6:
resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==}
@@ -901,6 +936,12 @@ packages:
dependencies:
'@babel/types': 7.20.2
+ /@babel/helper-module-imports@7.21.4:
+ resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/types': 7.21.4
+
/@babel/helper-module-transforms@7.20.2:
resolution: {integrity: sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==}
engines: {node: '>=6.9.0'}
@@ -915,6 +956,22 @@ packages:
'@babel/types': 7.20.2
transitivePeerDependencies:
- supports-color
+ dev: true
+
+ /@babel/helper-module-transforms@7.21.2:
+ resolution: {integrity: sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/helper-environment-visitor': 7.18.9
+ '@babel/helper-module-imports': 7.21.4
+ '@babel/helper-simple-access': 7.20.2
+ '@babel/helper-split-export-declaration': 7.18.6
+ '@babel/helper-validator-identifier': 7.19.1
+ '@babel/template': 7.20.7
+ '@babel/traverse': 7.21.4
+ '@babel/types': 7.21.4
+ transitivePeerDependencies:
+ - supports-color
/@babel/helper-optimise-call-expression@7.18.6:
resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==}
@@ -927,27 +984,13 @@ packages:
resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==}
engines: {node: '>=6.9.0'}
- /@babel/helper-remap-async-to-generator@7.18.9:
- resolution: {integrity: sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-environment-visitor': 7.18.9
- '@babel/helper-wrap-function': 7.19.0
- '@babel/types': 7.20.2
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/helper-remap-async-to-generator@7.18.9(@babel/core@7.20.2):
+ /@babel/helper-remap-async-to-generator@7.18.9(@babel/core@7.21.4):
resolution: {integrity: sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-annotate-as-pure': 7.18.6
'@babel/helper-environment-visitor': 7.18.9
'@babel/helper-wrap-function': 7.19.0
@@ -1000,6 +1043,10 @@ packages:
resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==}
engines: {node: '>=6.9.0'}
+ /@babel/helper-validator-option@7.21.0:
+ resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==}
+ engines: {node: '>=6.9.0'}
+
/@babel/helper-wrap-function@7.19.0:
resolution: {integrity: sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==}
engines: {node: '>=6.9.0'}
@@ -1021,6 +1068,17 @@ packages:
'@babel/types': 7.20.2
transitivePeerDependencies:
- supports-color
+ dev: true
+
+ /@babel/helpers@7.21.0:
+ resolution: {integrity: sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/template': 7.20.7
+ '@babel/traverse': 7.21.4
+ '@babel/types': 7.21.4
+ transitivePeerDependencies:
+ - supports-color
/@babel/highlight@7.18.6:
resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==}
@@ -1036,863 +1094,333 @@ packages:
hasBin: true
dependencies:
'@babel/types': 7.20.2
+ dev: true
- /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6:
- resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
+ /@babel/parser@7.21.4:
+ resolution: {integrity: sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==}
+ engines: {node: '>=6.0.0'}
+ hasBin: true
dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
+ '@babel/types': 7.21.4
- /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.20.2):
+ /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.21.4):
resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.18.9:
- resolution: {integrity: sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.13.0
- dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
- '@babel/plugin-proposal-optional-chaining': 7.18.9
dev: true
- /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.18.9(@babel/core@7.20.2):
+ /@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.18.9(@babel/core@7.21.4):
resolution: {integrity: sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.13.0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
'@babel/helper-skip-transparent-expression-wrappers': 7.20.0
- '@babel/plugin-proposal-optional-chaining': 7.18.9(@babel/core@7.20.2)
+ '@babel/plugin-proposal-optional-chaining': 7.18.9(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-async-generator-functions@7.20.1:
+ /@babel/plugin-proposal-async-generator-functions@7.20.1(@babel/core@7.21.4):
resolution: {integrity: sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-environment-visitor': 7.18.9
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-remap-async-to-generator': 7.18.9
- '@babel/plugin-syntax-async-generators': 7.8.4
+ '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.4)
transitivePeerDependencies:
- supports-color
dev: true
- /@babel/plugin-proposal-async-generator-functions@7.20.1(@babel/core@7.20.2):
- resolution: {integrity: sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g==}
+ /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-environment-visitor': 7.18.9
+ '@babel/core': 7.21.4
+ '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.20.2)
transitivePeerDependencies:
- supports-color
dev: true
- /@babel/plugin-proposal-class-properties@7.18.6:
- resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==}
+ /@babel/plugin-proposal-class-static-block@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==}
engines: {node: '>=6.9.0'}
peerDependencies:
- '@babel/core': ^7.0.0-0
+ '@babel/core': ^7.12.0
dependencies:
- '@babel/helper-create-class-features-plugin': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
+ '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.21.4)
transitivePeerDependencies:
- supports-color
dev: true
- /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==}
+ /@babel/plugin-proposal-dynamic-import@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-class-static-block@7.18.6:
- resolution: {integrity: sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==}
+ /@babel/plugin-proposal-export-namespace-from@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==}
engines: {node: '>=6.9.0'}
peerDependencies:
- '@babel/core': ^7.12.0
+ '@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-create-class-features-plugin': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-class-static-block': 7.14.5
- transitivePeerDependencies:
- - supports-color
+ '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-class-static-block@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==}
+ /@babel/plugin-proposal-json-strings@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
- '@babel/core': ^7.12.0
+ '@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.20.2)
- transitivePeerDependencies:
- - supports-color
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-dynamic-import@7.18.6:
- resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==}
+ /@babel/plugin-proposal-logical-assignment-operators@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-dynamic-import': 7.8.3
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-dynamic-import@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==}
+ /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.20.2)
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-export-namespace-from@7.18.9:
- resolution: {integrity: sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==}
+ /@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-export-namespace-from': 7.8.3
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-export-namespace-from@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==}
+ /@babel/plugin-proposal-object-rest-spread@7.20.2(@babel/core@7.21.4):
+ resolution: {integrity: sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/compat-data': 7.20.1
+ '@babel/core': 7.21.4
+ '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.20.2)
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-transform-parameters': 7.20.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-json-strings@7.18.6:
- resolution: {integrity: sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==}
+ /@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-json-strings': 7.8.3
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-json-strings@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==}
+ /@babel/plugin-proposal-optional-chaining@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.20.2)
+ '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.4)
dev: true
- /@babel/plugin-proposal-logical-assignment-operators@7.18.9:
- resolution: {integrity: sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==}
+ /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
+ '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4
+ transitivePeerDependencies:
+ - supports-color
dev: true
- /@babel/plugin-proposal-logical-assignment-operators@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==}
+ /@babel/plugin-proposal-private-property-in-object@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-annotate-as-pure': 7.18.6
+ '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.20.2)
+ '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.21.4)
+ transitivePeerDependencies:
+ - supports-color
dev: true
- /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6:
- resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==}
+ engines: {node: '>=4'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
+ '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3
dev: true
- /@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.20.2):
+ resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.20.2)
dev: true
- /@babel/plugin-proposal-numeric-separator@7.18.6:
- resolution: {integrity: sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.21.4):
+ resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-numeric-separator': 7.10.4
dev: true
- /@babel/plugin-proposal-numeric-separator@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.20.2):
+ resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.20.2)
dev: true
- /@babel/plugin-proposal-object-rest-spread@7.20.2:
- resolution: {integrity: sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/compat-data': 7.20.1
- '@babel/helper-compilation-targets': 7.20.0
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-object-rest-spread': 7.8.3
- '@babel/plugin-transform-parameters': 7.20.3
dev: true
- /@babel/plugin-proposal-object-rest-spread@7.20.2(@babel/core@7.20.2):
- resolution: {integrity: sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.20.2):
+ resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/compat-data': 7.20.1
'@babel/core': 7.20.2
- '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.2)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-transform-parameters': 7.20.3(@babel/core@7.20.2)
dev: true
- /@babel/plugin-proposal-optional-catch-binding@7.18.6:
- resolution: {integrity: sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.21.4):
+ resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3
dev: true
- /@babel/plugin-proposal-optional-catch-binding@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==}
+ /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.21.4):
+ resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.20.2)
dev: true
- /@babel/plugin-proposal-optional-chaining@7.18.9:
- resolution: {integrity: sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
- '@babel/plugin-syntax-optional-chaining': 7.8.3
dev: true
- /@babel/plugin-proposal-optional-chaining@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.20.2)
dev: true
- /@babel/plugin-proposal-private-methods@7.18.6:
- resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==}
+ /@babel/plugin-syntax-import-assertions@7.20.0(@babel/core@7.21.4):
+ resolution: {integrity: sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-create-class-features-plugin': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-proposal-private-methods@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.20.2):
+ resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
- '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.20.2)
'@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-proposal-private-property-in-object@7.18.6:
- resolution: {integrity: sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-create-class-features-plugin': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-private-property-in-object': 7.14.5
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-proposal-private-property-in-object@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-create-class-features-plugin': 7.20.2(@babel/core@7.20.2)
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.20.2)
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-proposal-unicode-property-regex@7.18.6:
- resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==}
- engines: {node: '>=4'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-create-regexp-features-plugin': 7.19.0
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==}
- engines: {node: '>=4'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.20.2)
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-async-generators@7.8.4:
- resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.20.2):
- resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-bigint@7.8.3:
- resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-class-properties@7.12.13:
- resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.20.2):
- resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-class-static-block@7.14.5:
- resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.20.2):
- resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-dynamic-import@7.8.3:
- resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-export-namespace-from@7.8.3:
- resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-import-assertions@7.20.0:
- resolution: {integrity: sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-import-assertions@7.20.0(@babel/core@7.20.2):
- resolution: {integrity: sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-import-meta@7.10.4:
- resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.20.2):
- resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-json-strings@7.8.3:
- resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-logical-assignment-operators@7.10.4:
- resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.20.2):
- resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3:
- resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-numeric-separator@7.10.4:
- resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.20.2):
- resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-object-rest-spread@7.8.3:
- resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-optional-catch-binding@7.8.3:
- resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-optional-chaining@7.8.3:
- resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-private-property-in-object@7.14.5:
- resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.20.2):
- resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-top-level-await@7.14.5:
- resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.20.2):
- resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.20.2):
- resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-arrow-functions@7.18.6:
- resolution: {integrity: sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-arrow-functions@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-async-to-generator@7.18.6:
- resolution: {integrity: sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-remap-async-to-generator': 7.18.9
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-transform-async-to-generator@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-module-imports': 7.18.6
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.20.2)
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-transform-block-scoped-functions@7.18.6:
- resolution: {integrity: sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-block-scoped-functions@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-block-scoping@7.20.2:
- resolution: {integrity: sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-block-scoping@7.20.2(@babel/core@7.20.2):
- resolution: {integrity: sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-classes@7.20.2:
- resolution: {integrity: sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-compilation-targets': 7.20.0
- '@babel/helper-environment-visitor': 7.18.9
- '@babel/helper-function-name': 7.19.0
- '@babel/helper-optimise-call-expression': 7.18.6
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-replace-supers': 7.19.1
- '@babel/helper-split-export-declaration': 7.18.6
- globals: 11.12.0
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-transform-classes@7.20.2(@babel/core@7.20.2):
- resolution: {integrity: sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-annotate-as-pure': 7.18.6
- '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.2)
- '@babel/helper-environment-visitor': 7.18.9
- '@babel/helper-function-name': 7.19.0
- '@babel/helper-optimise-call-expression': 7.18.6
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-replace-supers': 7.19.1
- '@babel/helper-split-export-declaration': 7.18.6
- globals: 11.12.0
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-transform-computed-properties@7.18.9:
- resolution: {integrity: sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-computed-properties@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-destructuring@7.20.2:
- resolution: {integrity: sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.21.4):
+ resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-destructuring@7.20.2(@babel/core@7.20.2):
- resolution: {integrity: sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.20.2):
+ resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
@@ -1900,39 +1428,35 @@ packages:
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-dotall-regex@7.18.6:
- resolution: {integrity: sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-create-regexp-features-plugin': 7.19.0
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-dotall-regex@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.20.2):
+ resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
- '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.20.2)
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-duplicate-keys@7.18.9:
- resolution: {integrity: sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.21.4):
+ resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-duplicate-keys@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.20.2):
+ resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
@@ -1940,39 +1464,35 @@ packages:
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-exponentiation-operator@7.18.6:
- resolution: {integrity: sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-builder-binary-assignment-operator-visitor': 7.18.9
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-exponentiation-operator@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.20.2):
+ resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
- '@babel/helper-builder-binary-assignment-operator-visitor': 7.18.9
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-for-of@7.18.8:
- resolution: {integrity: sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.21.4):
+ resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-for-of@7.18.8(@babel/core@7.20.2):
- resolution: {integrity: sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.20.2):
+ resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
@@ -1980,41 +1500,35 @@ packages:
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-function-name@7.18.9:
- resolution: {integrity: sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-compilation-targets': 7.20.0
- '@babel/helper-function-name': 7.19.0
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-function-name@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.20.2):
+ resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
- '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.2)
- '@babel/helper-function-name': 7.19.0
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-literals@7.18.9:
- resolution: {integrity: sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-literals@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.20.2):
+ resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
@@ -2022,636 +1536,527 @@ packages:
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-member-expression-literals@7.18.6:
- resolution: {integrity: sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-member-expression-literals@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==}
- engines: {node: '>=6.9.0'}
+ /@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-modules-amd@7.19.6:
- resolution: {integrity: sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==}
+ /@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.21.4):
+ resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-module-transforms': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-modules-amd@7.19.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==}
+ /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.20.2):
+ resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
- '@babel/helper-module-transforms': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-modules-commonjs@7.19.6:
- resolution: {integrity: sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==}
+ /@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.21.4):
+ resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-module-transforms': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-simple-access': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-modules-commonjs@7.19.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==}
+ /@babel/plugin-syntax-typescript@7.20.0(@babel/core@7.20.2):
+ resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/core': 7.20.2
- '@babel/helper-module-transforms': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-simple-access': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-modules-systemjs@7.19.6:
- resolution: {integrity: sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==}
+ /@babel/plugin-transform-arrow-functions@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-hoist-variables': 7.18.6
- '@babel/helper-module-transforms': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-validator-identifier': 7.19.1
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-modules-systemjs@7.19.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==}
+ /@babel/plugin-transform-async-to-generator@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-hoist-variables': 7.18.6
- '@babel/helper-module-transforms': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-module-imports': 7.18.6
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-validator-identifier': 7.19.1
+ '@babel/helper-remap-async-to-generator': 7.18.9(@babel/core@7.21.4)
transitivePeerDependencies:
- supports-color
dev: true
- /@babel/plugin-transform-modules-umd@7.18.6:
- resolution: {integrity: sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==}
+ /@babel/plugin-transform-block-scoped-functions@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-module-transforms': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-modules-umd@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==}
+ /@babel/plugin-transform-block-scoping@7.20.2(@babel/core@7.21.4):
+ resolution: {integrity: sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-module-transforms': 7.20.2
- '@babel/helper-plugin-utils': 7.20.2
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@babel/plugin-transform-named-capturing-groups-regex@7.19.1:
- resolution: {integrity: sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/helper-create-regexp-features-plugin': 7.19.0
- '@babel/helper-plugin-utils': 7.20.2
- dev: true
-
- /@babel/plugin-transform-named-capturing-groups-regex@7.19.1(@babel/core@7.20.2):
- resolution: {integrity: sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==}
- engines: {node: '>=6.9.0'}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-new-target@7.18.6:
- resolution: {integrity: sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==}
+ /@babel/plugin-transform-classes@7.20.2(@babel/core@7.21.4):
+ resolution: {integrity: sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
+ '@babel/helper-annotate-as-pure': 7.18.6
+ '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.21.4)
+ '@babel/helper-environment-visitor': 7.18.9
+ '@babel/helper-function-name': 7.19.0
+ '@babel/helper-optimise-call-expression': 7.18.6
'@babel/helper-plugin-utils': 7.20.2
+ '@babel/helper-replace-supers': 7.19.1
+ '@babel/helper-split-export-declaration': 7.18.6
+ globals: 11.12.0
+ transitivePeerDependencies:
+ - supports-color
dev: true
- /@babel/plugin-transform-new-target@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==}
+ /@babel/plugin-transform-computed-properties@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-object-super@7.18.6:
- resolution: {integrity: sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==}
+ /@babel/plugin-transform-destructuring@7.20.2(@babel/core@7.21.4):
+ resolution: {integrity: sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-replace-supers': 7.19.1
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-object-super@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==}
+ /@babel/plugin-transform-dotall-regex@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-replace-supers': 7.19.1
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/plugin-transform-parameters@7.20.3:
- resolution: {integrity: sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==}
+ /@babel/plugin-transform-duplicate-keys@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-parameters@7.20.3(@babel/core@7.20.2):
- resolution: {integrity: sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==}
+ /@babel/plugin-transform-exponentiation-operator@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-builder-binary-assignment-operator-visitor': 7.18.9
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-property-literals@7.18.6:
- resolution: {integrity: sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==}
+ /@babel/plugin-transform-for-of@7.18.8(@babel/core@7.21.4):
+ resolution: {integrity: sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-property-literals@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==}
+ /@babel/plugin-transform-function-name@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.21.4)
+ '@babel/helper-function-name': 7.19.0
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-regenerator@7.18.6:
- resolution: {integrity: sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==}
+ /@babel/plugin-transform-literals@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- regenerator-transform: 0.15.1
dev: true
- /@babel/plugin-transform-regenerator@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==}
+ /@babel/plugin-transform-member-expression-literals@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- regenerator-transform: 0.15.1
dev: true
- /@babel/plugin-transform-reserved-words@7.18.6:
- resolution: {integrity: sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==}
+ /@babel/plugin-transform-modules-amd@7.19.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
+ '@babel/helper-module-transforms': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
+ transitivePeerDependencies:
+ - supports-color
dev: true
- /@babel/plugin-transform-reserved-words@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==}
+ /@babel/plugin-transform-modules-commonjs@7.19.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-module-transforms': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
+ '@babel/helper-simple-access': 7.20.2
+ transitivePeerDependencies:
+ - supports-color
dev: true
- /@babel/plugin-transform-runtime@7.19.6:
- resolution: {integrity: sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==}
+ /@babel/plugin-transform-modules-systemjs@7.19.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-module-imports': 7.18.6
+ '@babel/core': 7.21.4
+ '@babel/helper-hoist-variables': 7.18.6
+ '@babel/helper-module-transforms': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
- babel-plugin-polyfill-corejs2: 0.3.3
- babel-plugin-polyfill-corejs3: 0.6.0
- babel-plugin-polyfill-regenerator: 0.4.1
- semver: 6.3.0
+ '@babel/helper-validator-identifier': 7.19.1
transitivePeerDependencies:
- supports-color
- dev: false
+ dev: true
- /@babel/plugin-transform-runtime@7.19.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==}
+ /@babel/plugin-transform-modules-umd@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-module-imports': 7.18.6
+ '@babel/core': 7.21.4
+ '@babel/helper-module-transforms': 7.20.2
'@babel/helper-plugin-utils': 7.20.2
- babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.20.2)
- babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.20.2)
- babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.20.2)
- semver: 6.3.0
transitivePeerDependencies:
- supports-color
- dev: false
+ dev: true
- /@babel/plugin-transform-shorthand-properties@7.18.6:
- resolution: {integrity: sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==}
+ /@babel/plugin-transform-named-capturing-groups-regex@7.19.1(@babel/core@7.21.4):
+ resolution: {integrity: sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==}
engines: {node: '>=6.9.0'}
peerDependencies:
- '@babel/core': ^7.0.0-0
+ '@babel/core': ^7.0.0
dependencies:
+ '@babel/core': 7.21.4
+ '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-shorthand-properties@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==}
+ /@babel/plugin-transform-new-target@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-spread@7.19.0:
- resolution: {integrity: sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==}
+ /@babel/plugin-transform-object-super@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
+ '@babel/helper-replace-supers': 7.19.1
+ transitivePeerDependencies:
+ - supports-color
dev: true
- /@babel/plugin-transform-spread@7.19.0(@babel/core@7.20.2):
- resolution: {integrity: sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==}
+ /@babel/plugin-transform-parameters@7.20.3(@babel/core@7.21.4):
+ resolution: {integrity: sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
dev: true
- /@babel/plugin-transform-sticky-regex@7.18.6:
- resolution: {integrity: sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==}
+ /@babel/plugin-transform-property-literals@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-sticky-regex@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==}
+ /@babel/plugin-transform-regenerator@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
+ regenerator-transform: 0.15.1
dev: true
- /@babel/plugin-transform-template-literals@7.18.9:
- resolution: {integrity: sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==}
+ /@babel/plugin-transform-reserved-words@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-template-literals@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==}
+ /@babel/plugin-transform-runtime@7.19.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
+ '@babel/helper-module-imports': 7.18.6
'@babel/helper-plugin-utils': 7.20.2
- dev: true
+ babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.21.4)
+ babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.21.4)
+ babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.21.4)
+ semver: 6.3.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: false
- /@babel/plugin-transform-typeof-symbol@7.18.9:
- resolution: {integrity: sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==}
+ /@babel/plugin-transform-shorthand-properties@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-typeof-symbol@7.18.9(@babel/core@7.20.2):
- resolution: {integrity: sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==}
+ /@babel/plugin-transform-spread@7.19.0(@babel/core@7.21.4):
+ resolution: {integrity: sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
+ '@babel/helper-skip-transparent-expression-wrappers': 7.20.0
dev: true
- /@babel/plugin-transform-unicode-escapes@7.18.10:
- resolution: {integrity: sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==}
+ /@babel/plugin-transform-sticky-regex@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-unicode-escapes@7.18.10(@babel/core@7.20.2):
- resolution: {integrity: sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==}
+ /@babel/plugin-transform-template-literals@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-unicode-regex@7.18.6:
- resolution: {integrity: sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==}
+ /@babel/plugin-transform-typeof-symbol@7.18.9(@babel/core@7.21.4):
+ resolution: {integrity: sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/helper-create-regexp-features-plugin': 7.19.0
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/plugin-transform-unicode-regex@7.18.6(@babel/core@7.20.2):
- resolution: {integrity: sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==}
+ /@babel/plugin-transform-unicode-escapes@7.18.10(@babel/core@7.21.4):
+ resolution: {integrity: sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
dev: true
- /@babel/preset-env@7.20.2:
- resolution: {integrity: sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==}
+ /@babel/plugin-transform-unicode-regex@7.18.6(@babel/core@7.21.4):
+ resolution: {integrity: sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/compat-data': 7.20.1
- '@babel/helper-compilation-targets': 7.20.0
+ '@babel/core': 7.21.4
+ '@babel/helper-create-regexp-features-plugin': 7.19.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
- '@babel/helper-validator-option': 7.18.6
- '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.18.6
- '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.18.9
- '@babel/plugin-proposal-async-generator-functions': 7.20.1
- '@babel/plugin-proposal-class-properties': 7.18.6
- '@babel/plugin-proposal-class-static-block': 7.18.6
- '@babel/plugin-proposal-dynamic-import': 7.18.6
- '@babel/plugin-proposal-export-namespace-from': 7.18.9
- '@babel/plugin-proposal-json-strings': 7.18.6
- '@babel/plugin-proposal-logical-assignment-operators': 7.18.9
- '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6
- '@babel/plugin-proposal-numeric-separator': 7.18.6
- '@babel/plugin-proposal-object-rest-spread': 7.20.2
- '@babel/plugin-proposal-optional-catch-binding': 7.18.6
- '@babel/plugin-proposal-optional-chaining': 7.18.9
- '@babel/plugin-proposal-private-methods': 7.18.6
- '@babel/plugin-proposal-private-property-in-object': 7.18.6
- '@babel/plugin-proposal-unicode-property-regex': 7.18.6
- '@babel/plugin-syntax-async-generators': 7.8.4
- '@babel/plugin-syntax-class-properties': 7.12.13
- '@babel/plugin-syntax-class-static-block': 7.14.5
- '@babel/plugin-syntax-dynamic-import': 7.8.3
- '@babel/plugin-syntax-export-namespace-from': 7.8.3
- '@babel/plugin-syntax-import-assertions': 7.20.0
- '@babel/plugin-syntax-json-strings': 7.8.3
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3
- '@babel/plugin-syntax-numeric-separator': 7.10.4
- '@babel/plugin-syntax-object-rest-spread': 7.8.3
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3
- '@babel/plugin-syntax-optional-chaining': 7.8.3
- '@babel/plugin-syntax-private-property-in-object': 7.14.5
- '@babel/plugin-syntax-top-level-await': 7.14.5
- '@babel/plugin-transform-arrow-functions': 7.18.6
- '@babel/plugin-transform-async-to-generator': 7.18.6
- '@babel/plugin-transform-block-scoped-functions': 7.18.6
- '@babel/plugin-transform-block-scoping': 7.20.2
- '@babel/plugin-transform-classes': 7.20.2
- '@babel/plugin-transform-computed-properties': 7.18.9
- '@babel/plugin-transform-destructuring': 7.20.2
- '@babel/plugin-transform-dotall-regex': 7.18.6
- '@babel/plugin-transform-duplicate-keys': 7.18.9
- '@babel/plugin-transform-exponentiation-operator': 7.18.6
- '@babel/plugin-transform-for-of': 7.18.8
- '@babel/plugin-transform-function-name': 7.18.9
- '@babel/plugin-transform-literals': 7.18.9
- '@babel/plugin-transform-member-expression-literals': 7.18.6
- '@babel/plugin-transform-modules-amd': 7.19.6
- '@babel/plugin-transform-modules-commonjs': 7.19.6
- '@babel/plugin-transform-modules-systemjs': 7.19.6
- '@babel/plugin-transform-modules-umd': 7.18.6
- '@babel/plugin-transform-named-capturing-groups-regex': 7.19.1
- '@babel/plugin-transform-new-target': 7.18.6
- '@babel/plugin-transform-object-super': 7.18.6
- '@babel/plugin-transform-parameters': 7.20.3
- '@babel/plugin-transform-property-literals': 7.18.6
- '@babel/plugin-transform-regenerator': 7.18.6
- '@babel/plugin-transform-reserved-words': 7.18.6
- '@babel/plugin-transform-shorthand-properties': 7.18.6
- '@babel/plugin-transform-spread': 7.19.0
- '@babel/plugin-transform-sticky-regex': 7.18.6
- '@babel/plugin-transform-template-literals': 7.18.9
- '@babel/plugin-transform-typeof-symbol': 7.18.9
- '@babel/plugin-transform-unicode-escapes': 7.18.10
- '@babel/plugin-transform-unicode-regex': 7.18.6
- '@babel/preset-modules': 0.1.5
- '@babel/types': 7.20.2
- babel-plugin-polyfill-corejs2: 0.3.3
- babel-plugin-polyfill-corejs3: 0.6.0
- babel-plugin-polyfill-regenerator: 0.4.1
- core-js-compat: 3.26.1
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
dev: true
- /@babel/preset-env@7.20.2(@babel/core@7.20.2):
+ /@babel/preset-env@7.20.2(@babel/core@7.21.4):
resolution: {integrity: sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/compat-data': 7.20.1
- '@babel/core': 7.20.2
- '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
+ '@babel/helper-compilation-targets': 7.20.0(@babel/core@7.21.4)
'@babel/helper-plugin-utils': 7.20.2
'@babel/helper-validator-option': 7.18.6
- '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-proposal-async-generator-functions': 7.20.1(@babel/core@7.20.2)
- '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-class-static-block': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-dynamic-import': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-export-namespace-from': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-proposal-json-strings': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-logical-assignment-operators': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-object-rest-spread': 7.20.2(@babel/core@7.20.2)
- '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-optional-chaining': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-private-property-in-object': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.20.2)
- '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.20.2)
- '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.20.2)
- '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-import-assertions': 7.20.0(@babel/core@7.20.2)
- '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.20.2)
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.20.2)
- '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.20.2)
- '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.20.2)
- '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.20.2)
- '@babel/plugin-transform-arrow-functions': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-async-to-generator': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-block-scoped-functions': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-block-scoping': 7.20.2(@babel/core@7.20.2)
- '@babel/plugin-transform-classes': 7.20.2(@babel/core@7.20.2)
- '@babel/plugin-transform-computed-properties': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-transform-destructuring': 7.20.2(@babel/core@7.20.2)
- '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-duplicate-keys': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-transform-exponentiation-operator': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-for-of': 7.18.8(@babel/core@7.20.2)
- '@babel/plugin-transform-function-name': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-transform-literals': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-transform-member-expression-literals': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-modules-amd': 7.19.6(@babel/core@7.20.2)
- '@babel/plugin-transform-modules-commonjs': 7.19.6(@babel/core@7.20.2)
- '@babel/plugin-transform-modules-systemjs': 7.19.6(@babel/core@7.20.2)
- '@babel/plugin-transform-modules-umd': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-named-capturing-groups-regex': 7.19.1(@babel/core@7.20.2)
- '@babel/plugin-transform-new-target': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-object-super': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-parameters': 7.20.3(@babel/core@7.20.2)
- '@babel/plugin-transform-property-literals': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-regenerator': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-reserved-words': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-shorthand-properties': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-spread': 7.19.0(@babel/core@7.20.2)
- '@babel/plugin-transform-sticky-regex': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-template-literals': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-transform-typeof-symbol': 7.18.9(@babel/core@7.20.2)
- '@babel/plugin-transform-unicode-escapes': 7.18.10(@babel/core@7.20.2)
- '@babel/plugin-transform-unicode-regex': 7.18.6(@babel/core@7.20.2)
- '@babel/preset-modules': 0.1.5(@babel/core@7.20.2)
+ '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-proposal-async-generator-functions': 7.20.1(@babel/core@7.21.4)
+ '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-class-static-block': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-dynamic-import': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-export-namespace-from': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-proposal-json-strings': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-logical-assignment-operators': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-object-rest-spread': 7.20.2(@babel/core@7.21.4)
+ '@babel/plugin-proposal-optional-catch-binding': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-optional-chaining': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-private-property-in-object': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.21.4)
+ '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.21.4)
+ '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-import-assertions': 7.20.0(@babel/core@7.21.4)
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.21.4)
+ '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.21.4)
+ '@babel/plugin-transform-arrow-functions': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-async-to-generator': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-block-scoped-functions': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-block-scoping': 7.20.2(@babel/core@7.21.4)
+ '@babel/plugin-transform-classes': 7.20.2(@babel/core@7.21.4)
+ '@babel/plugin-transform-computed-properties': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-transform-destructuring': 7.20.2(@babel/core@7.21.4)
+ '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-duplicate-keys': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-transform-exponentiation-operator': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-for-of': 7.18.8(@babel/core@7.21.4)
+ '@babel/plugin-transform-function-name': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-transform-literals': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-transform-member-expression-literals': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-modules-amd': 7.19.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-modules-commonjs': 7.19.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-modules-systemjs': 7.19.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-modules-umd': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-named-capturing-groups-regex': 7.19.1(@babel/core@7.21.4)
+ '@babel/plugin-transform-new-target': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-object-super': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-parameters': 7.20.3(@babel/core@7.21.4)
+ '@babel/plugin-transform-property-literals': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-regenerator': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-reserved-words': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-shorthand-properties': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-spread': 7.19.0(@babel/core@7.21.4)
+ '@babel/plugin-transform-sticky-regex': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-template-literals': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-transform-typeof-symbol': 7.18.9(@babel/core@7.21.4)
+ '@babel/plugin-transform-unicode-escapes': 7.18.10(@babel/core@7.21.4)
+ '@babel/plugin-transform-unicode-regex': 7.18.6(@babel/core@7.21.4)
+ '@babel/preset-modules': 0.1.5(@babel/core@7.21.4)
'@babel/types': 7.20.2
- babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.20.2)
- babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.20.2)
- babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.20.2)
+ babel-plugin-polyfill-corejs2: 0.3.3(@babel/core@7.21.4)
+ babel-plugin-polyfill-corejs3: 0.6.0(@babel/core@7.21.4)
+ babel-plugin-polyfill-regenerator: 0.4.1(@babel/core@7.21.4)
core-js-compat: 3.26.1
semver: 6.3.0
transitivePeerDependencies:
- supports-color
dev: true
- /@babel/preset-modules@0.1.5:
- resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-proposal-unicode-property-regex': 7.18.6
- '@babel/plugin-transform-dotall-regex': 7.18.6
- '@babel/types': 7.20.2
- esutils: 2.0.3
- dev: true
-
- /@babel/preset-modules@0.1.5(@babel/core@7.20.2):
+ /@babel/preset-modules@0.1.5(@babel/core@7.21.4):
resolution: {integrity: sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@babel/helper-plugin-utils': 7.20.2
- '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.20.2)
- '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.20.2)
+ '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.21.4)
+ '@babel/plugin-transform-dotall-regex': 7.18.6(@babel/core@7.21.4)
'@babel/types': 7.20.2
esutils: 2.0.3
dev: true
@@ -2676,6 +2081,15 @@ packages:
'@babel/code-frame': 7.18.6
'@babel/parser': 7.20.3
'@babel/types': 7.20.2
+ dev: true
+
+ /@babel/template@7.20.7:
+ resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/code-frame': 7.21.4
+ '@babel/parser': 7.21.4
+ '@babel/types': 7.21.4
/@babel/traverse@7.20.1:
resolution: {integrity: sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==}
@@ -2689,7 +2103,25 @@ packages:
'@babel/helper-split-export-declaration': 7.18.6
'@babel/parser': 7.20.3
'@babel/types': 7.20.2
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
+ globals: 11.12.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@babel/traverse@7.21.4:
+ resolution: {integrity: sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/code-frame': 7.21.4
+ '@babel/generator': 7.21.4
+ '@babel/helper-environment-visitor': 7.18.9
+ '@babel/helper-function-name': 7.21.0
+ '@babel/helper-hoist-variables': 7.18.6
+ '@babel/helper-split-export-declaration': 7.18.6
+ '@babel/parser': 7.21.4
+ '@babel/types': 7.21.4
+ debug: 4.3.4(supports-color@9.3.1)
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -2702,40 +2134,50 @@ packages:
'@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
+ /@babel/types@7.21.4:
+ resolution: {integrity: sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ '@babel/helper-string-parser': 7.19.4
+ '@babel/helper-validator-identifier': 7.19.1
+ to-fast-properties: 2.0.0
+
/@bcoe/v8-coverage@0.2.3:
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
dev: true
- /@coinbase/wallet-sdk@3.6.3:
- resolution: {integrity: sha512-XUR4poOJE+dKzwBTdlM693CdLFitr046oZOVY3iDnbFcRrrQswhbDji7q4CmUcD4HxbfViX7PFoIwl79YQcukg==}
- engines: {node: '>= 10.0.0'}
+ /@chainsafe/as-sha256@0.3.1:
+ resolution: {integrity: sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==}
+ dev: true
+
+ /@chainsafe/persistent-merkle-tree@0.4.2:
+ resolution: {integrity: sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==}
dependencies:
- '@metamask/safe-event-emitter': 2.0.0
- '@solana/web3.js': 1.70.3
- bind-decorator: 1.0.11
- bn.js: 5.2.1
- buffer: 6.0.3
- clsx: 1.2.1
- eth-block-tracker: 4.4.3
- eth-json-rpc-filters: 4.2.2
- eth-rpc-errors: 4.0.2
- json-rpc-engine: 6.1.0
- keccak: 3.0.2
- preact: 10.11.3
- qs: 6.11.0
- rxjs: 6.6.7
- sha.js: 2.4.11
- stream-browserify: 3.0.0
- util: 0.12.5
- transitivePeerDependencies:
- - '@babel/core'
- - bufferutil
- - encoding
- - supports-color
- - utf-8-validate
- dev: false
+ '@chainsafe/as-sha256': 0.3.1
+ dev: true
+
+ /@chainsafe/persistent-merkle-tree@0.5.0:
+ resolution: {integrity: sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==}
+ dependencies:
+ '@chainsafe/as-sha256': 0.3.1
+ dev: true
+
+ /@chainsafe/ssz@0.10.2:
+ resolution: {integrity: sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==}
+ dependencies:
+ '@chainsafe/as-sha256': 0.3.1
+ '@chainsafe/persistent-merkle-tree': 0.5.0
+ dev: true
+
+ /@chainsafe/ssz@0.9.4:
+ resolution: {integrity: sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==}
+ dependencies:
+ '@chainsafe/as-sha256': 0.3.1
+ '@chainsafe/persistent-merkle-tree': 0.4.2
+ case: 1.6.3
+ dev: true
- /@coinbase/wallet-sdk@3.6.3(@babel/core@7.20.2):
+ /@coinbase/wallet-sdk@3.6.3(@babel/core@7.21.4):
resolution: {integrity: sha512-XUR4poOJE+dKzwBTdlM693CdLFitr046oZOVY3iDnbFcRrrQswhbDji7q4CmUcD4HxbfViX7PFoIwl79YQcukg==}
engines: {node: '>= 10.0.0'}
dependencies:
@@ -2745,7 +2187,7 @@ packages:
bn.js: 5.2.1
buffer: 6.0.3
clsx: 1.2.1
- eth-block-tracker: 4.4.3(@babel/core@7.20.2)
+ eth-block-tracker: 4.4.3(@babel/core@7.21.4)
eth-json-rpc-filters: 4.2.2
eth-rpc-errors: 4.0.2
json-rpc-engine: 6.1.0
@@ -2778,7 +2220,7 @@ packages:
'@jridgewell/trace-mapping': 0.3.9
dev: true
- /@defi-wonderland/smock@2.3.4(@ethersproject/abi@5.7.0)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@nomiclabs/hardhat-ethers@2.2.1)(ethers@5.7.2)(hardhat@2.12.2):
+ /@defi-wonderland/smock@2.3.4(@ethersproject/abi@5.7.0)(@ethersproject/abstract-provider@5.7.0)(@ethersproject/abstract-signer@5.7.0)(@nomiclabs/hardhat-ethers@2.2.3)(ethers@5.7.2)(hardhat@2.14.0):
resolution: {integrity: sha512-VYJbsoCOdFRyGkAwvaQhQRrU6V8AjK3five8xdbo41DEE9n3qXzUNBUxyD9HhXB/dWWPFWT21IGw5Ztl6Qw3Ew==}
peerDependencies:
'@ethersproject/abi': ^5
@@ -2791,17 +2233,17 @@ packages:
'@ethersproject/abi': 5.7.0
'@ethersproject/abstract-provider': 5.7.0
'@ethersproject/abstract-signer': 5.7.0
- '@nomicfoundation/ethereumjs-evm': 1.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
- '@nomicfoundation/ethereumjs-vm': 6.0.0
- '@nomiclabs/hardhat-ethers': 2.2.1(ethers@5.7.2)(hardhat@2.12.2)
+ '@nomicfoundation/ethereumjs-evm': 1.3.2
+ '@nomicfoundation/ethereumjs-util': 8.0.6
+ '@nomicfoundation/ethereumjs-vm': 6.4.2
+ '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.14.0)
diff: 5.1.0
ethers: 5.7.2
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
lodash.isequal: 4.5.0
lodash.isequalwith: 4.4.0
- rxjs: 7.5.7
- semver: 7.3.8
+ rxjs: 7.8.0
+ semver: 7.5.0
transitivePeerDependencies:
- supports-color
dev: true
@@ -2814,7 +2256,7 @@ packages:
eth-ens-namehash: 2.0.8
solc: 0.4.26
testrpc: 0.0.1
- web3-utils: 1.8.1
+ web3-utils: 1.9.0
dev: true
/@ensdomains/resolver@0.2.4:
@@ -2840,14 +2282,29 @@ packages:
dev: true
optional: true
+ /@eslint-community/eslint-utils@4.4.0(eslint@8.39.0):
+ resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
+ dependencies:
+ eslint: 8.39.0
+ eslint-visitor-keys: 3.4.0
+ dev: true
+
+ /@eslint-community/regexpp@4.5.0:
+ resolution: {integrity: sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==}
+ engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
+ dev: true
+
/@eslint/eslintrc@0.4.3:
resolution: {integrity: sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==}
engines: {node: ^10.12.0 || >=12.0.0}
dependencies:
ajv: 6.12.6
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
espree: 7.3.1
- globals: 13.18.0
+ globals: 13.20.0
ignore: 4.0.6
import-fresh: 3.3.0
js-yaml: 3.14.1
@@ -2857,6 +2314,28 @@ packages:
- supports-color
dev: true
+ /@eslint/eslintrc@2.0.2:
+ resolution: {integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ ajv: 6.12.6
+ debug: 4.3.4(supports-color@9.3.1)
+ espree: 9.5.1
+ globals: 13.20.0
+ ignore: 5.2.4
+ import-fresh: 3.3.0
+ js-yaml: 4.1.0
+ minimatch: 3.1.2
+ strip-json-comments: 3.1.1
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@eslint/js@8.39.0:
+ resolution: {integrity: sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dev: true
+
/@ethereum-waffle/chai@3.4.4:
resolution: {integrity: sha512-/K8czydBtXXkcM9X6q29EqEkc5dN3oYenyH2a9hF7rGAApAJUpH8QBtojxOY/xQ2up5W332jqgxwp0yPiYug1g==}
engines: {node: '>=10.0'}
@@ -2870,7 +2349,7 @@ packages:
- utf-8-validate
dev: true
- /@ethereum-waffle/compiler@3.4.4(typescript@4.9.3):
+ /@ethereum-waffle/compiler@3.4.4(typescript@4.9.5):
resolution: {integrity: sha512-RUK3axJ8IkD5xpWjWoJgyHclOeEzDLQFga6gKpeGxiS/zBu+HB0W2FvsrrLalTFIaPw/CGYACRBSIxqiCqwqTQ==}
engines: {node: '>=10.0'}
dependencies:
@@ -2878,13 +2357,13 @@ packages:
'@resolver-engine/imports-fs': 0.3.3
'@typechain/ethers-v5': 2.0.0(ethers@5.7.2)(typechain@3.0.0)
'@types/mkdirp': 0.5.2
- '@types/node-fetch': 2.6.2
+ '@types/node-fetch': 2.6.3
ethers: 5.7.2
mkdirp: 0.5.6
- node-fetch: 2.6.7
+ node-fetch: 2.6.9
solc: 0.6.12
ts-generator: 0.1.1
- typechain: 3.0.0(typescript@4.9.3)
+ typechain: 3.0.0(typescript@4.9.5)
transitivePeerDependencies:
- bufferutil
- encoding
@@ -2923,7 +2402,7 @@ packages:
'@ethereum-waffle/ens': 3.4.4
ethers: 5.7.2
ganache-core: 2.13.2
- patch-package: 6.5.0
+ patch-package: 6.5.1
postinstall-postinstall: 2.1.0
transitivePeerDependencies:
- bufferutil
@@ -3277,6 +2756,39 @@ packages:
tslib: 2.5.0
dev: false
+ /@foundry-rs/easy-foundryup@0.1.3:
+ resolution: {integrity: sha512-Funb4hrSBeikKCmccFT/d3Ud5o92tlIZHTJeMCVk5b54/+CHZHr4g7MmtvO5xrGhxrOebQ0L+ojIj+VixgW7ug==}
+ dependencies:
+ command-exists: 1.2.9
+ ts-interface-checker: 0.1.13
+ dev: true
+
+ /@foundry-rs/hardhat-forge@0.1.17(@nomiclabs/hardhat-ethers@2.2.3)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.14.0):
+ resolution: {integrity: sha512-2wxzxA12CQmT11PH/KigyVTNm/4vzsVtzVZow6gwCbC41fTyf73a5qbggHZFRR74JXfmvVSkX1BJitTmdzQvxw==}
+ peerDependencies:
+ '@nomiclabs/hardhat-ethers': ^2.0.0
+ ethereum-waffle: ^3.2.0
+ ethers: ^5.0.0
+ hardhat: ^2.0.0
+ dependencies:
+ '@foundry-rs/easy-foundryup': 0.1.3
+ '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.14.0)
+ '@nomiclabs/hardhat-waffle': 2.0.5(@nomiclabs/hardhat-ethers@2.2.3)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.14.0)
+ '@types/sinon-chai': 3.2.9
+ '@types/web3': 1.0.19
+ camelcase-keys: 7.0.2
+ debug: 4.3.4(supports-color@9.3.1)
+ ethereum-waffle: 3.4.4(typescript@4.9.5)
+ ethers: 5.7.2
+ fs-extra: 10.1.0
+ glob: 7.2.0
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
+ true-case-path: 2.2.1
+ ts-interface-checker: 0.1.13
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@gar/promisify@1.1.3:
resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==}
dev: true
@@ -3298,13 +2810,13 @@ packages:
dependencies:
'@gnosis.pm/mock-contract': 4.0.0
'@gnosis.pm/safe-contracts': 1.3.0(ethers@5.7.2)
- '@openzeppelin/contracts': 4.8.0
- '@openzeppelin/contracts-upgradeable': 4.8.0
+ '@openzeppelin/contracts': 4.8.3
+ '@openzeppelin/contracts-upgradeable': 4.8.3
argv: 0.0.2
dotenv: 16.0.3
ethers: 5.7.2
- solc: 0.8.17
- yargs: 17.6.2
+ solc: 0.8.19
+ yargs: 17.7.1
transitivePeerDependencies:
- bufferutil
- debug
@@ -3331,17 +2843,33 @@ packages:
react: 18.2.0
dev: true
+ /@humanwhocodes/config-array@0.11.8:
+ resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==}
+ engines: {node: '>=10.10.0'}
+ dependencies:
+ '@humanwhocodes/object-schema': 1.2.1
+ debug: 4.3.4(supports-color@9.3.1)
+ minimatch: 3.1.2
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
/@humanwhocodes/config-array@0.5.0:
resolution: {integrity: sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==}
engines: {node: '>=10.10.0'}
dependencies:
'@humanwhocodes/object-schema': 1.2.1
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
dev: true
+ /@humanwhocodes/module-importer@1.0.1:
+ resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
+ engines: {node: '>=12.22'}
+ dev: true
+
/@humanwhocodes/object-schema@1.2.1:
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
dev: true
@@ -3388,7 +2916,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.13.0
+ '@types/node': 18.15.1
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.8.1
@@ -3548,7 +3076,7 @@ packages:
dependencies:
'@types/istanbul-lib-coverage': 2.0.4
'@types/istanbul-reports': 3.0.1
- '@types/node': 18.13.0
+ '@types/node': 18.15.1
'@types/yargs': 16.0.4
chalk: 4.1.2
dev: true
@@ -3559,6 +3087,7 @@ packages:
dependencies:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.14
+ dev: true
/@jridgewell/gen-mapping@0.3.2:
resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==}
@@ -3567,36 +3096,60 @@ packages:
'@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.14
'@jridgewell/trace-mapping': 0.3.17
+ dev: true
+
+ /@jridgewell/gen-mapping@0.3.3:
+ resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==}
+ engines: {node: '>=6.0.0'}
+ dependencies:
+ '@jridgewell/set-array': 1.1.2
+ '@jridgewell/sourcemap-codec': 1.4.15
+ '@jridgewell/trace-mapping': 0.3.18
/@jridgewell/resolve-uri@3.1.0:
resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==}
engines: {node: '>=6.0.0'}
+ /@jridgewell/resolve-uri@3.1.1:
+ resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
+ engines: {node: '>=6.0.0'}
+ dev: true
+
/@jridgewell/set-array@1.1.2:
resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==}
engines: {node: '>=6.0.0'}
- /@jridgewell/source-map@0.3.2:
- resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==}
+ /@jridgewell/source-map@0.3.3:
+ resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==}
dependencies:
- '@jridgewell/gen-mapping': 0.3.2
- '@jridgewell/trace-mapping': 0.3.17
+ '@jridgewell/gen-mapping': 0.3.3
+ '@jridgewell/trace-mapping': 0.3.18
dev: true
/@jridgewell/sourcemap-codec@1.4.14:
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
+ /@jridgewell/sourcemap-codec@1.4.15:
+ resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
+
/@jridgewell/trace-mapping@0.3.17:
resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==}
dependencies:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
+ dev: true
- /@jridgewell/trace-mapping@0.3.9:
- resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
+ /@jridgewell/trace-mapping@0.3.18:
+ resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==}
dependencies:
'@jridgewell/resolve-uri': 3.1.0
'@jridgewell/sourcemap-codec': 1.4.14
+
+ /@jridgewell/trace-mapping@0.3.9:
+ resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==}
+ dependencies:
+ '@jridgewell/resolve-uri': 3.1.1
+ '@jridgewell/sourcemap-codec': 1.4.15
dev: true
/@json-rpc-tools/provider@1.7.6:
@@ -3930,9 +3483,19 @@ packages:
/@noble/hashes@1.1.2:
resolution: {integrity: sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA==}
+ dev: false
+
+ /@noble/hashes@1.2.0:
+ resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==}
+ dev: true
/@noble/secp256k1@1.6.3:
resolution: {integrity: sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ==}
+ dev: false
+
+ /@noble/secp256k1@1.7.1:
+ resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==}
+ dev: true
/@nodelib/fs.scandir@2.1.5:
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
@@ -3955,137 +3518,272 @@ packages:
fastq: 1.15.0
dev: true
- /@nomicfoundation/ethereumjs-block@4.0.0:
- resolution: {integrity: sha512-bk8uP8VuexLgyIZAHExH1QEovqx0Lzhc9Ntm63nCRKLHXIZkobaFaeCVwTESV7YkPKUk7NiK11s8ryed4CS9yA==}
+ /@nomicfoundation/ethereumjs-block@4.2.2:
+ resolution: {integrity: sha512-atjpt4gc6ZGZUPHBAQaUJsm1l/VCo7FmyQ780tMGO8QStjLdhz09dXynmhwVTy5YbRr0FOh/uX3QaEM0yIB2Zg==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@nomicfoundation/ethereumjs-common': 3.1.2
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-trie': 5.0.5
+ '@nomicfoundation/ethereumjs-tx': 4.1.2
+ '@nomicfoundation/ethereumjs-util': 8.0.6
+ ethereum-cryptography: 0.1.3
+ dev: true
+
+ /@nomicfoundation/ethereumjs-block@5.0.1:
+ resolution: {integrity: sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-trie': 5.0.0
- '@nomicfoundation/ethereumjs-tx': 4.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-trie': 6.0.1
+ '@nomicfoundation/ethereumjs-tx': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
ethereum-cryptography: 0.1.3
+ ethers: 5.7.2
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
dev: true
- /@nomicfoundation/ethereumjs-blockchain@6.0.0:
- resolution: {integrity: sha512-pLFEoea6MWd81QQYSReLlLfH7N9v7lH66JC/NMPN848ySPPQA5renWnE7wPByfQFzNrPBuDDRFFULMDmj1C0xw==}
+ /@nomicfoundation/ethereumjs-blockchain@6.2.2:
+ resolution: {integrity: sha512-6AIB2MoTEPZJLl6IRKcbd8mUmaBAQ/NMe3O7OsAOIiDjMNPPH5KaUQiLfbVlegT4wKIg/GOsFH7XlH2KDVoJNg==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-block': 4.0.0
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-ethash': 2.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-trie': 5.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-block': 4.2.2
+ '@nomicfoundation/ethereumjs-common': 3.1.2
+ '@nomicfoundation/ethereumjs-ethash': 2.0.5
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-trie': 5.0.5
+ '@nomicfoundation/ethereumjs-util': 8.0.6
abstract-level: 1.0.3
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
+ ethereum-cryptography: 0.1.3
+ level: 8.0.0
+ lru-cache: 5.1.1
+ memory-level: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@nomicfoundation/ethereumjs-blockchain@7.0.1:
+ resolution: {integrity: sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@nomicfoundation/ethereumjs-block': 5.0.1
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-ethash': 3.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-trie': 6.0.1
+ '@nomicfoundation/ethereumjs-tx': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
+ abstract-level: 1.0.3
+ debug: 4.3.4(supports-color@9.3.1)
ethereum-cryptography: 0.1.3
level: 8.0.0
lru-cache: 5.1.1
memory-level: 1.0.0
transitivePeerDependencies:
+ - bufferutil
- supports-color
+ - utf-8-validate
+ dev: true
+
+ /@nomicfoundation/ethereumjs-common@3.1.2:
+ resolution: {integrity: sha512-JAEBpIua62dyObHM9KI2b4wHZcRQYYge9gxiygTWa3lNCr2zo+K0TbypDpgiNij5MCGNWP1eboNfNfx1a3vkvA==}
+ dependencies:
+ '@nomicfoundation/ethereumjs-util': 8.0.6
+ crc-32: 1.2.2
dev: true
- /@nomicfoundation/ethereumjs-common@3.0.0:
- resolution: {integrity: sha512-WS7qSshQfxoZOpHG/XqlHEGRG1zmyjYrvmATvc4c62+gZXgre1ymYP8ZNgx/3FyZY0TWe9OjFlKOfLqmgOeYwA==}
+ /@nomicfoundation/ethereumjs-common@4.0.1:
+ resolution: {integrity: sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==}
dependencies:
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-util': 9.0.1
crc-32: 1.2.2
dev: true
- /@nomicfoundation/ethereumjs-ethash@2.0.0:
- resolution: {integrity: sha512-WpDvnRncfDUuXdsAXlI4lXbqUDOA+adYRQaEezIkxqDkc+LDyYDbd/xairmY98GnQzo1zIqsIL6GB5MoMSJDew==}
+ /@nomicfoundation/ethereumjs-ethash@2.0.5:
+ resolution: {integrity: sha512-xlLdcICGgAYyYmnI3r1t0R5fKGBJNDQSOQxXNjVO99JmxJIdXR5MgPo5CSJO1RpyzKOgzi3uIFn8agv564dZEQ==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@nomicfoundation/ethereumjs-block': 4.2.2
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-util': 8.0.6
+ abstract-level: 1.0.3
+ bigint-crypto-utils: 3.2.2
+ ethereum-cryptography: 0.1.3
+ dev: true
+
+ /@nomicfoundation/ethereumjs-ethash@3.0.1:
+ resolution: {integrity: sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-block': 4.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-block': 5.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
abstract-level: 1.0.3
- bigint-crypto-utils: 3.1.7
+ bigint-crypto-utils: 3.2.2
ethereum-cryptography: 0.1.3
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
dev: true
- /@nomicfoundation/ethereumjs-evm@1.0.0:
- resolution: {integrity: sha512-hVS6qRo3V1PLKCO210UfcEQHvlG7GqR8iFzp0yyjTg2TmJQizcChKgWo8KFsdMw6AyoLgLhHGHw4HdlP8a4i+Q==}
+ /@nomicfoundation/ethereumjs-evm@1.3.2:
+ resolution: {integrity: sha512-I00d4MwXuobyoqdPe/12dxUQxTYzX8OckSaWsMcWAfQhgVDvBx6ffPyP/w1aL0NW7MjyerySPcSVfDJAMHjilw==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-common': 3.1.2
+ '@nomicfoundation/ethereumjs-util': 8.0.6
'@types/async-eventemitter': 0.2.1
async-eventemitter: 0.2.4
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
+ ethereum-cryptography: 0.1.3
+ mcl-wasm: 0.7.9
+ rustbn.js: 0.2.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@nomicfoundation/ethereumjs-evm@2.0.1:
+ resolution: {integrity: sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@ethersproject/providers': 5.7.2
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-tx': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
+ debug: 4.3.4(supports-color@9.3.1)
ethereum-cryptography: 0.1.3
mcl-wasm: 0.7.9
rustbn.js: 0.2.0
transitivePeerDependencies:
+ - bufferutil
- supports-color
+ - utf-8-validate
+ dev: true
+
+ /@nomicfoundation/ethereumjs-rlp@4.0.3:
+ resolution: {integrity: sha512-DZMzB/lqPK78T6MluyXqtlRmOMcsZbTTbbEyAjo0ncaff2mqu/k8a79PBcyvpgAhWD/R59Fjq/x3ro5Lof0AtA==}
+ engines: {node: '>=14'}
+ hasBin: true
dev: true
- /@nomicfoundation/ethereumjs-rlp@4.0.0:
- resolution: {integrity: sha512-GaSOGk5QbUk4eBP5qFbpXoZoZUj/NrW7MRa0tKY4Ew4c2HAS0GXArEMAamtFrkazp0BO4K5p2ZCG3b2FmbShmw==}
+ /@nomicfoundation/ethereumjs-rlp@5.0.1:
+ resolution: {integrity: sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==}
engines: {node: '>=14'}
hasBin: true
dev: true
- /@nomicfoundation/ethereumjs-statemanager@1.0.0:
- resolution: {integrity: sha512-jCtqFjcd2QejtuAMjQzbil/4NHf5aAWxUc+CvS0JclQpl+7M0bxMofR2AJdtz+P3u0ke2euhYREDiE7iSO31vQ==}
+ /@nomicfoundation/ethereumjs-statemanager@1.0.5:
+ resolution: {integrity: sha512-CAhzpzTR5toh/qOJIZUUOnWekUXuRqkkzaGAQrVcF457VhtCmr+ddZjjK50KNZ524c1XP8cISguEVNqJ6ij1sA==}
+ dependencies:
+ '@nomicfoundation/ethereumjs-common': 3.1.2
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-trie': 5.0.5
+ '@nomicfoundation/ethereumjs-util': 8.0.6
+ debug: 4.3.4(supports-color@9.3.1)
+ ethereum-cryptography: 0.1.3
+ functional-red-black-tree: 1.0.1
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@nomicfoundation/ethereumjs-statemanager@2.0.1:
+ resolution: {integrity: sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==}
+ dependencies:
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ debug: 4.3.4(supports-color@9.3.1)
+ ethereum-cryptography: 0.1.3
+ ethers: 5.7.2
+ js-sdsl: 4.4.0
+ transitivePeerDependencies:
+ - bufferutil
+ - supports-color
+ - utf-8-validate
+ dev: true
+
+ /@nomicfoundation/ethereumjs-trie@5.0.5:
+ resolution: {integrity: sha512-+8sNZrXkzvA1NH5F4kz5RSYl1I6iaRz7mAZRsyxOm0IVY4UaP43Ofvfp/TwOalFunurQrYB5pRO40+8FBcxFMA==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-util': 8.0.6
+ ethereum-cryptography: 0.1.3
+ readable-stream: 3.6.2
+ dev: true
+
+ /@nomicfoundation/ethereumjs-trie@6.0.1:
+ resolution: {integrity: sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
+ '@types/readable-stream': 2.3.15
+ ethereum-cryptography: 0.1.3
+ readable-stream: 3.6.2
+ dev: true
+
+ /@nomicfoundation/ethereumjs-tx@4.1.2:
+ resolution: {integrity: sha512-emJBJZpmTdUa09cqxQqHaysbBI9Od353ZazeH7WgPb35miMgNY6mb7/3vBA98N5lUW/rgkiItjX0KZfIzihSoQ==}
+ engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-trie': 5.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
- debug: 4.3.4(supports-color@8.1.1)
+ '@nomicfoundation/ethereumjs-common': 3.1.2
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-util': 8.0.6
ethereum-cryptography: 0.1.3
- functional-red-black-tree: 1.0.1
- transitivePeerDependencies:
- - supports-color
dev: true
- /@nomicfoundation/ethereumjs-trie@5.0.0:
- resolution: {integrity: sha512-LIj5XdE+s+t6WSuq/ttegJzZ1vliwg6wlb+Y9f4RlBpuK35B9K02bO7xU+E6Rgg9RGptkWd6TVLdedTI4eNc2A==}
+ /@nomicfoundation/ethereumjs-tx@5.0.1:
+ resolution: {integrity: sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@chainsafe/ssz': 0.9.4
+ '@ethersproject/providers': 5.7.2
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
ethereum-cryptography: 0.1.3
- readable-stream: 3.6.0
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
dev: true
- /@nomicfoundation/ethereumjs-tx@4.0.0:
- resolution: {integrity: sha512-Gg3Lir2lNUck43Kp/3x6TfBNwcWC9Z1wYue9Nz3v4xjdcv6oDW9QSMJxqsKw9QEGoBBZ+gqwpW7+F05/rs/g1w==}
+ /@nomicfoundation/ethereumjs-util@8.0.6:
+ resolution: {integrity: sha512-jOQfF44laa7xRfbfLXojdlcpkvxeHrE2Xu7tSeITsWFgoII163MzjOwFEzSNozHYieFysyoEMhCdP+NY5ikstw==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
ethereum-cryptography: 0.1.3
dev: true
- /@nomicfoundation/ethereumjs-util@8.0.0:
- resolution: {integrity: sha512-2emi0NJ/HmTG+CGY58fa+DQuAoroFeSH9gKu9O6JnwTtlzJtgfTixuoOqLEgyyzZVvwfIpRueuePb8TonL1y+A==}
+ /@nomicfoundation/ethereumjs-util@9.0.1:
+ resolution: {integrity: sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
+ '@chainsafe/ssz': 0.10.2
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
ethereum-cryptography: 0.1.3
dev: true
- /@nomicfoundation/ethereumjs-vm@6.0.0:
- resolution: {integrity: sha512-JMPxvPQ3fzD063Sg3Tp+UdwUkVxMoo1uML6KSzFhMH3hoQi/LMuXBoEHAoW83/vyNS9BxEe6jm6LmT5xdeEJ6w==}
+ /@nomicfoundation/ethereumjs-vm@6.4.2:
+ resolution: {integrity: sha512-PRTyxZMP6kx+OdAzBhuH1LD2Yw+hrSpaytftvaK//thDy2OI07S0nrTdbrdk7b8ZVPAc9H9oTwFBl3/wJ3w15g==}
engines: {node: '>=14'}
dependencies:
- '@nomicfoundation/ethereumjs-block': 4.0.0
- '@nomicfoundation/ethereumjs-blockchain': 6.0.0
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-evm': 1.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-statemanager': 1.0.0
- '@nomicfoundation/ethereumjs-trie': 5.0.0
- '@nomicfoundation/ethereumjs-tx': 4.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
+ '@nomicfoundation/ethereumjs-block': 4.2.2
+ '@nomicfoundation/ethereumjs-blockchain': 6.2.2
+ '@nomicfoundation/ethereumjs-common': 3.1.2
+ '@nomicfoundation/ethereumjs-evm': 1.3.2
+ '@nomicfoundation/ethereumjs-rlp': 4.0.3
+ '@nomicfoundation/ethereumjs-statemanager': 1.0.5
+ '@nomicfoundation/ethereumjs-trie': 5.0.5
+ '@nomicfoundation/ethereumjs-tx': 4.1.2
+ '@nomicfoundation/ethereumjs-util': 8.0.6
'@types/async-eventemitter': 0.2.1
async-eventemitter: 0.2.4
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
ethereum-cryptography: 0.1.3
functional-red-black-tree: 1.0.1
mcl-wasm: 0.7.9
@@ -4094,17 +3792,40 @@ packages:
- supports-color
dev: true
- /@nomicfoundation/hardhat-network-helpers@1.0.6(hardhat@2.12.2):
- resolution: {integrity: sha512-a35iVD4ycF6AoTfllAnKm96IPIzzHpgKX/ep4oKc2bsUKFfMlacWdyntgC/7d5blyCTXfFssgNAvXDZfzNWVGQ==}
+ /@nomicfoundation/ethereumjs-vm@7.0.1:
+ resolution: {integrity: sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ==}
+ engines: {node: '>=14'}
+ dependencies:
+ '@nomicfoundation/ethereumjs-block': 5.0.1
+ '@nomicfoundation/ethereumjs-blockchain': 7.0.1
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-evm': 2.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-statemanager': 2.0.1
+ '@nomicfoundation/ethereumjs-trie': 6.0.1
+ '@nomicfoundation/ethereumjs-tx': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
+ debug: 4.3.4(supports-color@9.3.1)
+ ethereum-cryptography: 0.1.3
+ mcl-wasm: 0.7.9
+ rustbn.js: 0.2.0
+ transitivePeerDependencies:
+ - bufferutil
+ - supports-color
+ - utf-8-validate
+ dev: true
+
+ /@nomicfoundation/hardhat-network-helpers@1.0.8(hardhat@2.14.0):
+ resolution: {integrity: sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q==}
peerDependencies:
hardhat: ^2.9.5
dependencies:
ethereumjs-util: 7.1.5
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
dev: true
- /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.0:
- resolution: {integrity: sha512-vEF3yKuuzfMHsZecHQcnkUrqm8mnTWfJeEVFHpg+cO+le96xQA4lAJYdUan8pXZohQxv1fSReQsn4QGNuBNuCw==}
+ /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1:
+ resolution: {integrity: sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
@@ -4112,8 +3833,8 @@ packages:
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0:
- resolution: {integrity: sha512-dlHeIg0pTL4dB1l9JDwbi/JG6dHQaU1xpDK+ugYO8eJ1kxx9Dh2isEUtA4d02cQAl22cjOHTvifAk96A+ItEHA==}
+ /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1:
+ resolution: {integrity: sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
@@ -4121,8 +3842,8 @@ packages:
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0:
- resolution: {integrity: sha512-WFCZYMv86WowDA4GiJKnebMQRt3kCcFqHeIomW6NMyqiKqhK1kIZCxSLDYsxqlx396kKLPN1713Q1S8tu68GKg==}
+ /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1:
+ resolution: {integrity: sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [freebsd]
@@ -4130,48 +3851,44 @@ packages:
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0:
- resolution: {integrity: sha512-DTw6MNQWWlCgc71Pq7CEhEqkb7fZnS7oly13pujs4cMH1sR0JzNk90Mp1zpSCsCs4oKan2ClhMlLKtNat/XRKQ==}
+ /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1:
+ resolution: {integrity: sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
- libc: [glibc]
requiresBuild: true
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0:
- resolution: {integrity: sha512-wUpUnR/3GV5Da88MhrxXh/lhb9kxh9V3Jya2NpBEhKDIRCDmtXMSqPMXHZmOR9DfCwCvG6vLFPr/+YrPCnUN0w==}
+ /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1:
+ resolution: {integrity: sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
- libc: [musl]
requiresBuild: true
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0:
- resolution: {integrity: sha512-lR0AxK1x/MeKQ/3Pt923kPvwigmGX3OxeU5qNtQ9pj9iucgk4PzhbS3ruUeSpYhUxG50jN4RkIGwUMoev5lguw==}
+ /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1:
+ resolution: {integrity: sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
- libc: [glibc]
requiresBuild: true
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0:
- resolution: {integrity: sha512-A1he/8gy/JeBD3FKvmI6WUJrGrI5uWJNr5Xb9WdV+DK0F8msuOqpEByLlnTdLkXMwW7nSl3awvLezOs9xBHJEg==}
+ /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1:
+ resolution: {integrity: sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
- libc: [musl]
requiresBuild: true
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0:
- resolution: {integrity: sha512-7x5SXZ9R9H4SluJZZP8XPN+ju7Mx+XeUMWZw7ZAqkdhP5mK19I4vz3x0zIWygmfE8RT7uQ5xMap0/9NPsO+ykw==}
+ /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1:
+ resolution: {integrity: sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
@@ -4179,8 +3896,8 @@ packages:
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0:
- resolution: {integrity: sha512-m7w3xf+hnE774YRXu+2mGV7RiF3QJtUoiYU61FascCkQhX3QMQavh7saH/vzb2jN5D24nT/jwvaHYX/MAM9zUw==}
+ /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1:
+ resolution: {integrity: sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==}
engines: {node: '>= 10'}
cpu: [ia32]
os: [win32]
@@ -4188,8 +3905,8 @@ packages:
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0:
- resolution: {integrity: sha512-xCuybjY0sLJQnJhupiFAXaek2EqF0AP0eBjgzaalPXSNvCEN6ZYHvUzdA50ENDVeSYFXcUsYf3+FsD3XKaeptA==}
+ /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1:
+ resolution: {integrity: sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@@ -4197,66 +3914,64 @@ packages:
dev: true
optional: true
- /@nomicfoundation/solidity-analyzer@0.1.0:
- resolution: {integrity: sha512-xGWAiVCGOycvGiP/qrlf9f9eOn7fpNbyJygcB0P21a1MDuVPlKt0Srp7rvtBEutYQ48ouYnRXm33zlRnlTOPHg==}
+ /@nomicfoundation/solidity-analyzer@0.1.1:
+ resolution: {integrity: sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==}
engines: {node: '>= 12'}
optionalDependencies:
- '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.0
- '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.0
- '@nomicfoundation/solidity-analyzer-freebsd-x64': 0.1.0
- '@nomicfoundation/solidity-analyzer-linux-arm64-gnu': 0.1.0
- '@nomicfoundation/solidity-analyzer-linux-arm64-musl': 0.1.0
- '@nomicfoundation/solidity-analyzer-linux-x64-gnu': 0.1.0
- '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.0
- '@nomicfoundation/solidity-analyzer-win32-arm64-msvc': 0.1.0
- '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.0
- '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.0
+ '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.1
+ '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.1
+ '@nomicfoundation/solidity-analyzer-freebsd-x64': 0.1.1
+ '@nomicfoundation/solidity-analyzer-linux-arm64-gnu': 0.1.1
+ '@nomicfoundation/solidity-analyzer-linux-arm64-musl': 0.1.1
+ '@nomicfoundation/solidity-analyzer-linux-x64-gnu': 0.1.1
+ '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.1
+ '@nomicfoundation/solidity-analyzer-win32-arm64-msvc': 0.1.1
+ '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.1
+ '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1
dev: true
- /@nomiclabs/hardhat-ethers@2.2.1(ethers@5.7.2)(hardhat@2.12.2):
- resolution: {integrity: sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg==}
+ /@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2)(hardhat@2.14.0):
+ resolution: {integrity: sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==}
peerDependencies:
ethers: ^5.0.0
hardhat: ^2.0.0
dependencies:
ethers: 5.7.2
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
dev: true
- /@nomiclabs/hardhat-etherscan@3.1.2(hardhat@2.12.2):
- resolution: {integrity: sha512-IEikeOVq0C/7CY6aD74d8L4BpGoc/FNiN6ldiPVg0QIFIUSu4FSGA1dmtJZJKk1tjpwgrfTLQNWnigtEaN9REg==}
+ /@nomiclabs/hardhat-etherscan@3.1.7(hardhat@2.14.0):
+ resolution: {integrity: sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ==}
peerDependencies:
hardhat: ^2.0.4
dependencies:
'@ethersproject/abi': 5.7.0
'@ethersproject/address': 5.7.0
- cbor: 5.2.0
+ cbor: 8.1.0
chalk: 2.4.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
fs-extra: 7.0.1
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
lodash: 4.17.21
semver: 6.3.0
table: 6.8.1
- undici: 5.12.0
+ undici: 5.22.0
transitivePeerDependencies:
- supports-color
dev: true
- /@nomiclabs/hardhat-waffle@2.0.3(@nomiclabs/hardhat-ethers@2.2.1)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.12.2):
- resolution: {integrity: sha512-049PHSnI1CZq6+XTbrMbMv5NaL7cednTfPenx02k3cEh8wBMLa6ys++dBETJa6JjfwgA9nBhhHQ173LJv6k2Pg==}
+ /@nomiclabs/hardhat-waffle@2.0.5(@nomiclabs/hardhat-ethers@2.2.3)(ethereum-waffle@3.4.4)(ethers@5.7.2)(hardhat@2.14.0):
+ resolution: {integrity: sha512-U1RH9OQ1mWYQfb+moX5aTgGjpVVlOcpiFI47wwnaGG4kLhcTy90cNiapoqZenxcRAITVbr0/+QSduINL5EsUIQ==}
peerDependencies:
'@nomiclabs/hardhat-ethers': ^2.0.0
- ethereum-waffle: ^3.2.0
+ ethereum-waffle: '*'
ethers: ^5.0.0
hardhat: ^2.0.0
dependencies:
- '@nomiclabs/hardhat-ethers': 2.2.1(ethers@5.7.2)(hardhat@2.12.2)
- '@types/sinon-chai': 3.2.9
- '@types/web3': 1.0.19
- ethereum-waffle: 3.4.4(typescript@4.9.3)
+ '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.14.0)
+ ethereum-waffle: 3.4.4(typescript@4.9.5)
ethers: 5.7.2
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
dev: true
/@npmcli/fs@1.1.1:
@@ -4275,16 +3990,16 @@ packages:
rimraf: 3.0.2
dev: true
- /@openzeppelin/contracts-upgradeable@4.8.0:
- resolution: {integrity: sha512-5GeFgqMiDlqGT8EdORadp1ntGF0qzWZLmEY7Wbp/yVhN7/B3NNzCxujuI77ktlyG81N3CUZP8cZe3ZAQ/cW10w==}
+ /@openzeppelin/contracts-upgradeable@4.8.3:
+ resolution: {integrity: sha512-SXDRl7HKpl2WDoJpn7CK/M9U4Z8gNXDHHChAKh0Iz+Wew3wu6CmFYBeie3je8V0GSXZAIYYwUktSrnW/kwVPtg==}
dev: false
- /@openzeppelin/contracts@4.8.0:
- resolution: {integrity: sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==}
+ /@openzeppelin/contracts@4.8.3:
+ resolution: {integrity: sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg==}
dev: false
- /@openzeppelin/hardhat-upgrades@1.21.0(@nomiclabs/hardhat-ethers@2.2.1)(@nomiclabs/hardhat-etherscan@3.1.2)(ethers@5.7.2)(hardhat@2.12.2):
- resolution: {integrity: sha512-Kwl7IN0Hlhj4HluMTTl0DrtU90OI/Q6rG3sAyd2pv3fababe9EuZqs9DydOlkWM45JwTzC+eBzX3TgHsqI13eA==}
+ /@openzeppelin/hardhat-upgrades@1.22.1(@nomiclabs/hardhat-ethers@2.2.3)(@nomiclabs/hardhat-etherscan@3.1.7)(ethers@5.7.2)(hardhat@2.14.0):
+ resolution: {integrity: sha512-MdoitCTLl4zwMU8MeE/bCj+7JMWBEvd38XqJkw36PkJrXlbv6FedDVCPoumMAhpmtymm0nTwTYYklYG+L6WiiQ==}
hasBin: true
peerDependencies:
'@nomiclabs/hardhat-ethers': ^2.0.0
@@ -4296,28 +4011,28 @@ packages:
'@nomiclabs/harhdat-etherscan':
optional: true
dependencies:
- '@nomiclabs/hardhat-ethers': 2.2.1(ethers@5.7.2)(hardhat@2.12.2)
- '@nomiclabs/hardhat-etherscan': 3.1.2(hardhat@2.12.2)
- '@openzeppelin/upgrades-core': 1.20.4
+ '@nomiclabs/hardhat-ethers': 2.2.3(ethers@5.7.2)(hardhat@2.14.0)
+ '@nomiclabs/hardhat-etherscan': 3.1.7(hardhat@2.14.0)
+ '@openzeppelin/upgrades-core': 1.24.1
chalk: 4.1.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
ethers: 5.7.2
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
proper-lockfile: 4.1.2
transitivePeerDependencies:
- supports-color
dev: true
- /@openzeppelin/upgrades-core@1.20.4:
- resolution: {integrity: sha512-Y4/+BPIbnopfE6ZhPOE2CD0V5fnvDxKKm7+kryx5+WrcRCTW3B5DjbXL9xyyoviG8Rn5EXUh5Fk1GLbiYDfu0g==}
+ /@openzeppelin/upgrades-core@1.24.1:
+ resolution: {integrity: sha512-QhdIQDUykJ3vQauB6CheV7vk4zgn0e1iY+IDg7r1KqpA1m2bqIGjQCpzidW33K4bZc9zdJSPx2/Z6Um5KxCB7A==}
dependencies:
cbor: 8.1.0
chalk: 4.1.2
- compare-versions: 5.0.1
- debug: 4.3.4(supports-color@8.1.1)
+ compare-versions: 5.0.3
+ debug: 4.3.4(supports-color@9.3.1)
ethereumjs-util: 7.1.5
proper-lockfile: 4.1.2
- solidity-ast: 0.4.38
+ solidity-ast: 0.4.46
transitivePeerDependencies:
- supports-color
dev: true
@@ -4371,16 +4086,6 @@ packages:
- supports-color
dev: true
- /@rollup/plugin-inject@4.0.4:
- resolution: {integrity: sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==}
- peerDependencies:
- rollup: ^1.20.0 || ^2.0.0
- dependencies:
- '@rollup/pluginutils': 3.1.0
- estree-walker: 2.0.2
- magic-string: 0.25.9
- dev: true
-
/@rollup/plugin-inject@4.0.4(rollup@2.79.1):
resolution: {integrity: sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==}
peerDependencies:
@@ -4392,17 +4097,6 @@ packages:
rollup: 2.79.1
dev: true
- /@rollup/pluginutils@3.1.0:
- resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
- engines: {node: '>= 8.0.0'}
- peerDependencies:
- rollup: ^1.20.0||^2.0.0
- dependencies:
- '@types/estree': 0.0.39
- estree-walker: 1.0.1
- picomatch: 2.3.1
- dev: true
-
/@rollup/pluginutils@3.1.0(rollup@2.79.1):
resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==}
engines: {node: '>= 8.0.0'}
@@ -4419,18 +4113,18 @@ packages:
resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==}
dev: true
- /@scure/bip32@1.1.0:
- resolution: {integrity: sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q==}
+ /@scure/bip32@1.1.5:
+ resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==}
dependencies:
- '@noble/hashes': 1.1.2
- '@noble/secp256k1': 1.6.3
+ '@noble/hashes': 1.2.0
+ '@noble/secp256k1': 1.7.1
'@scure/base': 1.1.1
dev: true
- /@scure/bip39@1.1.0:
- resolution: {integrity: sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==}
+ /@scure/bip39@1.1.1:
+ resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==}
dependencies:
- '@noble/hashes': 1.1.2
+ '@noble/hashes': 1.2.0
'@scure/base': 1.1.1
dev: true
@@ -4574,6 +4268,12 @@ packages:
antlr4ts: 0.5.0-alpha.4
dev: true
+ /@solidity-parser/parser@0.16.0:
+ resolution: {integrity: sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==}
+ dependencies:
+ antlr4ts: 0.5.0-alpha.4
+ dev: true
+
/@sveltejs/vite-plugin-svelte@1.3.1(svelte@3.53.1)(vite@3.2.4):
resolution: {integrity: sha512-2Uu2sDdIR+XQWF7QWOVSF2jR9EU6Ciw1yWfYnfLYj8HIgnNxkh/8g22Fw2pBUI8QNyW/KxtqJUWBI+8ypamSrQ==}
engines: {node: ^14.18.0 || >= 16}
@@ -4585,7 +4285,7 @@ packages:
diff-match-patch:
optional: true
dependencies:
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
deepmerge: 4.2.2
kleur: 4.1.5
magic-string: 0.26.7
@@ -4660,10 +4360,10 @@ packages:
typechain: ^3.0.0
dependencies:
ethers: 5.7.2
- typechain: 3.0.0(typescript@4.9.3)
+ typechain: 3.0.0(typescript@4.9.5)
dev: true
- /@typechain/ethers-v5@7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@5.2.0)(typescript@4.9.3):
+ /@typechain/ethers-v5@7.2.0(@ethersproject/abi@5.7.0)(@ethersproject/bytes@5.7.0)(@ethersproject/providers@5.7.2)(ethers@5.7.2)(typechain@5.2.0)(typescript@4.9.5):
resolution: {integrity: sha512-jfcmlTvaaJjng63QsT49MT6R1HFhtO/TBMWbyzPFSzMmVIqb2tL6prnKBs4ZJrSvmgIXWy+ttSjpaxCTq8D/Tw==}
peerDependencies:
'@ethersproject/abi': ^5.0.0
@@ -4678,12 +4378,12 @@ packages:
'@ethersproject/providers': 5.7.2
ethers: 5.7.2
lodash: 4.17.21
- ts-essentials: 7.0.3(typescript@4.9.3)
- typechain: 5.2.0(typescript@4.9.3)
- typescript: 4.9.3
+ ts-essentials: 7.0.3(typescript@4.9.5)
+ typechain: 5.2.0(typescript@4.9.5)
+ typescript: 4.9.5
dev: true
- /@typechain/hardhat@2.3.1(hardhat@2.12.2)(lodash@4.17.21)(typechain@5.2.0):
+ /@typechain/hardhat@2.3.1(hardhat@2.14.0)(lodash@4.17.21)(typechain@5.2.0):
resolution: {integrity: sha512-BQV8OKQi0KAzLXCdsPO0pZBNQQ6ra8A2ucC26uFX/kquRBtJu1yEyWnVSmtr07b5hyRoJRpzUeINLnyqz4/MAw==}
peerDependencies:
hardhat: ^2.0.10
@@ -4691,13 +4391,13 @@ packages:
typechain: ^5.1.2
dependencies:
fs-extra: 9.1.0
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
lodash: 4.17.21
- typechain: 5.2.0(typescript@4.9.3)
+ typechain: 5.2.0(typescript@4.9.5)
dev: true
- /@types/abstract-leveldown@7.2.0:
- resolution: {integrity: sha512-q5veSX6zjUy/DlDhR4Y4cU0k2Ar+DT2LUraP00T19WLmTO6Se1djepCCaqU6nQrwcJ5Hyo/CWqxTzrrFg8eqbQ==}
+ /@types/abstract-leveldown@7.2.1:
+ resolution: {integrity: sha512-YK8irIC+eMrrmtGx0H4ISn9GgzLd9dojZWJaMbjp1YHLl2VqqNFBNrL5Q3KjGf4VE3sf/4hmq6EhQZ7kZp1NoQ==}
dev: true
/@types/acorn@4.0.6:
@@ -4742,12 +4442,12 @@ packages:
/@types/bn.js@4.11.6:
resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
/@types/bn.js@5.1.1:
resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
/@types/cacheable-request@6.0.3:
@@ -4755,7 +4455,7 @@ packages:
dependencies:
'@types/http-cache-semantics': 4.0.1
'@types/keyv': 3.1.4
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
'@types/responselike': 1.0.0
dev: true
optional: true
@@ -4767,7 +4467,7 @@ packages:
/@types/concat-stream@1.6.1:
resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
/@types/connect@3.4.35:
@@ -4785,8 +4485,15 @@ packages:
/@types/eslint-scope@3.7.4:
resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==}
dependencies:
- '@types/eslint': 8.4.10
- '@types/estree': 1.0.0
+ '@types/eslint': 8.37.0
+ '@types/estree': 1.0.1
+ dev: true
+
+ /@types/eslint@8.37.0:
+ resolution: {integrity: sha512-Piet7dG2JBuDIfohBngQ3rCt7MgO9xCO4xIMKxBThCq5PNRB91IjlJ10eJVwfoNtvTErmxLzwBZ7rHZtbOMmFQ==}
+ dependencies:
+ '@types/estree': 1.0.1
+ '@types/json-schema': 7.0.11
dev: true
/@types/eslint@8.4.10:
@@ -4816,25 +4523,30 @@ packages:
/@types/estree@1.0.0:
resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==}
+ dev: false
+
+ /@types/estree@1.0.1:
+ resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==}
+ dev: true
/@types/form-data@0.0.33:
resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
/@types/glob@7.2.0:
resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==}
dependencies:
'@types/minimatch': 5.1.2
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
- /@types/glob@8.0.1:
- resolution: {integrity: sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==}
+ /@types/glob@8.1.0:
+ resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
dependencies:
'@types/minimatch': 5.1.2
- '@types/node': 18.11.18
+ '@types/node': 12.20.55
dev: true
/@types/graceful-fs@4.1.5:
@@ -4900,7 +4612,7 @@ packages:
/@types/keyv@3.1.4:
resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
optional: true
@@ -4911,9 +4623,9 @@ packages:
/@types/levelup@4.3.3:
resolution: {integrity: sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA==}
dependencies:
- '@types/abstract-leveldown': 7.2.0
+ '@types/abstract-leveldown': 7.2.1
'@types/level-errors': 3.0.0
- '@types/node': 18.13.0
+ '@types/node': 12.20.55
dev: true
/@types/lru-cache@5.1.1:
@@ -4945,7 +4657,7 @@ packages:
/@types/mkdirp@0.5.2:
resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
/@types/mocha@9.1.1:
@@ -4956,10 +4668,10 @@ packages:
resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==}
dev: false
- /@types/node-fetch@2.6.2:
- resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==}
+ /@types/node-fetch@2.6.3:
+ resolution: {integrity: sha512-ETTL1mOEdq/sxUtgtOhKjyB2Irra4cjxksvcMUR5Zr4n+PxVhsCD9WS46oPbHL3et9Zde7CNRr+WUNlcHvsX+w==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
form-data: 3.0.1
dev: true
@@ -4970,17 +4682,6 @@ packages:
/@types/node@12.20.55:
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
- /@types/node@18.11.18:
- resolution: {integrity: sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==}
- dev: true
-
- /@types/node@18.13.0:
- resolution: {integrity: sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==}
- dev: true
-
- /@types/node@18.14.2:
- resolution: {integrity: sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==}
-
/@types/node@18.15.1:
resolution: {integrity: sha512-U2TWca8AeHSmbpi314QBESRk7oPjSZjDsR+c+H4ECC1l+kFgpZf8Ydhv3SJpPy51VyZHHqxlb6mTTqYNNRVAIw==}
@@ -4999,12 +4700,16 @@ packages:
/@types/pbkdf2@3.1.0:
resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==}
dependencies:
- '@types/node': 18.14.2
+ '@types/node': 18.15.1
/@types/prettier@2.7.1:
resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==}
dev: true
+ /@types/prettier@2.7.2:
+ resolution: {integrity: sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==}
+ dev: true
+
/@types/prop-types@15.7.5:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
@@ -5023,16 +4728,23 @@ packages:
'@types/scheduler': 0.16.2
csstype: 3.1.1
+ /@types/readable-stream@2.3.15:
+ resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==}
+ dependencies:
+ '@types/node': 12.20.55
+ safe-buffer: 5.1.2
+ dev: true
+
/@types/resolve@0.0.8:
resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
/@types/responselike@1.0.0:
resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
dev: true
optional: true
@@ -5054,7 +4766,7 @@ packages:
/@types/secp256k1@4.0.3:
resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==}
dependencies:
- '@types/node': 18.14.2
+ '@types/node': 18.15.1
/@types/semver@7.3.13:
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
@@ -5064,11 +4776,11 @@ packages:
resolution: {integrity: sha512-/19t63pFYU0ikrdbXKBWj9PCdnKyTd0Qkz0X91Ta081cYsq90OxYdcWwK/dwEoDa6dtXgj2HJfmzgq+QZTHdmQ==}
dependencies:
'@types/chai': 4.3.4
- '@types/sinon': 10.0.13
+ '@types/sinon': 10.0.14
dev: true
- /@types/sinon@10.0.13:
- resolution: {integrity: sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==}
+ /@types/sinon@10.0.14:
+ resolution: {integrity: sha512-mn72up6cjaMyMuaPaa/AwKf6WtsSRysQC7wxFkCm1XcOKXPM1z+5Y4H5wjIVBz4gdAkjvZxVVfjA6ba1nHr5WQ==}
dependencies:
'@types/sinonjs__fake-timers': 8.1.2
dev: true
@@ -5112,7 +4824,7 @@ packages:
'@types/yargs-parser': 21.0.0
dev: true
- /@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/eslint-plugin@4.33.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)(typescript@4.9.5):
resolution: {integrity: sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -5123,22 +4835,22 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@4.9.3)
- '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.3)
+ '@typescript-eslint/experimental-utils': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
'@typescript-eslint/scope-manager': 4.33.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
eslint: 7.32.0
functional-red-black-tree: 1.0.1
- ignore: 5.2.0
+ ignore: 5.2.4
regexpp: 3.2.0
- semver: 7.3.8
- tsutils: 3.21.0(typescript@4.9.3)
- typescript: 4.9.3
+ semver: 7.5.0
+ tsutils: 3.21.0(typescript@4.9.5)
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/eslint-plugin@5.44.0(@typescript-eslint/parser@5.44.0)(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/eslint-plugin@5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.39.0)(typescript@4.9.3):
resolution: {integrity: sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5149,12 +4861,12 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.44.0(eslint@7.32.0)(typescript@4.9.3)
+ '@typescript-eslint/parser': 5.44.0(eslint@8.39.0)(typescript@4.9.3)
'@typescript-eslint/scope-manager': 5.44.0
- '@typescript-eslint/type-utils': 5.44.0(eslint@7.32.0)(typescript@4.9.3)
- '@typescript-eslint/utils': 5.44.0(eslint@7.32.0)(typescript@4.9.3)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
+ '@typescript-eslint/type-utils': 5.44.0(eslint@8.39.0)(typescript@4.9.3)
+ '@typescript-eslint/utils': 5.44.0(eslint@8.39.0)(typescript@4.9.3)
+ debug: 4.3.4(supports-color@9.3.1)
+ eslint: 8.39.0
ignore: 5.2.0
natural-compare-lite: 1.4.0
regexpp: 3.2.0
@@ -5165,7 +4877,7 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/eslint-plugin@5.44.0(@typescript-eslint/parser@5.44.0)(eslint@7.32.0)(typescript@4.9.5):
+ /@typescript-eslint/eslint-plugin@5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.39.0)(typescript@4.9.5):
resolution: {integrity: sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5176,12 +4888,12 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.44.0(eslint@7.32.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 5.44.0(eslint@8.39.0)(typescript@4.9.5)
'@typescript-eslint/scope-manager': 5.44.0
- '@typescript-eslint/type-utils': 5.44.0(eslint@7.32.0)(typescript@4.9.5)
- '@typescript-eslint/utils': 5.44.0(eslint@7.32.0)(typescript@4.9.5)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
+ '@typescript-eslint/type-utils': 5.44.0(eslint@8.39.0)(typescript@4.9.5)
+ '@typescript-eslint/utils': 5.44.0(eslint@8.39.0)(typescript@4.9.5)
+ debug: 4.3.4(supports-color@9.3.1)
+ eslint: 8.39.0
ignore: 5.2.0
natural-compare-lite: 1.4.0
regexpp: 3.2.0
@@ -5192,33 +4904,7 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/eslint-plugin@5.44.0(@typescript-eslint/parser@5.44.0)(typescript@4.9.3):
- resolution: {integrity: sha512-j5ULd7FmmekcyWeArx+i8x7sdRHzAtXTkmDPthE4amxZOWKFK7bomoJ4r7PJ8K7PoMzD16U8MmuZFAonr1ERvw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- '@typescript-eslint/parser': ^5.0.0
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@typescript-eslint/parser': 5.44.0(typescript@4.9.3)
- '@typescript-eslint/scope-manager': 5.44.0
- '@typescript-eslint/type-utils': 5.44.0(typescript@4.9.3)
- '@typescript-eslint/utils': 5.44.0(typescript@4.9.3)
- debug: 4.3.4
- ignore: 5.2.0
- natural-compare-lite: 1.4.0
- regexpp: 3.2.0
- semver: 7.3.8
- tsutils: 3.21.0(typescript@4.9.3)
- typescript: 4.9.3
- transitivePeerDependencies:
- - supports-color
- dev: true
-
- /@typescript-eslint/experimental-utils@4.33.0(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/experimental-utils@4.33.0(eslint@7.32.0)(typescript@4.9.5):
resolution: {integrity: sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -5227,7 +4913,7 @@ packages:
'@types/json-schema': 7.0.11
'@typescript-eslint/scope-manager': 4.33.0
'@typescript-eslint/types': 4.33.0
- '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.3)
+ '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.5)
eslint: 7.32.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0(eslint@7.32.0)
@@ -5236,7 +4922,7 @@ packages:
- typescript
dev: true
- /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/parser@4.33.0(eslint@7.32.0)(typescript@4.9.5):
resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -5248,15 +4934,15 @@ packages:
dependencies:
'@typescript-eslint/scope-manager': 4.33.0
'@typescript-eslint/types': 4.33.0
- '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.3)
- debug: 4.3.4(supports-color@8.1.1)
+ '@typescript-eslint/typescript-estree': 4.33.0(typescript@4.9.5)
+ debug: 4.3.4(supports-color@9.3.1)
eslint: 7.32.0
- typescript: 4.9.3
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/parser@5.44.0(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/parser@5.44.0(eslint@8.39.0)(typescript@4.9.3):
resolution: {integrity: sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5269,14 +4955,14 @@ packages:
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.3)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
+ debug: 4.3.4(supports-color@9.3.1)
+ eslint: 8.39.0
typescript: 4.9.3
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/parser@5.44.0(eslint@7.32.0)(typescript@4.9.5):
+ /@typescript-eslint/parser@5.44.0(eslint@8.39.0)(typescript@4.9.5):
resolution: {integrity: sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5289,32 +4975,13 @@ packages:
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.5)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
+ debug: 4.3.4(supports-color@9.3.1)
+ eslint: 8.39.0
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/parser@5.44.0(typescript@4.9.3):
- resolution: {integrity: sha512-H7LCqbZnKqkkgQHaKLGC6KUjt3pjJDx8ETDqmwncyb6PuoigYajyAwBGz08VU/l86dZWZgI4zm5k2VaKqayYyA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@typescript-eslint/scope-manager': 5.44.0
- '@typescript-eslint/types': 5.44.0
- '@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.3)
- debug: 4.3.4
- typescript: 4.9.3
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@typescript-eslint/scope-manager@4.33.0:
resolution: {integrity: sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@@ -5331,7 +4998,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.44.0
dev: true
- /@typescript-eslint/type-utils@5.44.0(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/type-utils@5.44.0(eslint@8.39.0)(typescript@4.9.3):
resolution: {integrity: sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5342,16 +5009,16 @@ packages:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.3)
- '@typescript-eslint/utils': 5.44.0(eslint@7.32.0)(typescript@4.9.3)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
+ '@typescript-eslint/utils': 5.44.0(eslint@8.39.0)(typescript@4.9.3)
+ debug: 4.3.4(supports-color@9.3.1)
+ eslint: 8.39.0
tsutils: 3.21.0(typescript@4.9.3)
typescript: 4.9.3
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/type-utils@5.44.0(eslint@7.32.0)(typescript@4.9.5):
+ /@typescript-eslint/type-utils@5.44.0(eslint@8.39.0)(typescript@4.9.5):
resolution: {integrity: sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5362,34 +5029,15 @@ packages:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.5)
- '@typescript-eslint/utils': 5.44.0(eslint@7.32.0)(typescript@4.9.5)
- debug: 4.3.4(supports-color@8.1.1)
- eslint: 7.32.0
+ '@typescript-eslint/utils': 5.44.0(eslint@8.39.0)(typescript@4.9.5)
+ debug: 4.3.4(supports-color@9.3.1)
+ eslint: 8.39.0
tsutils: 3.21.0(typescript@4.9.5)
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/type-utils@5.44.0(typescript@4.9.3):
- resolution: {integrity: sha512-A1u0Yo5wZxkXPQ7/noGkRhV4J9opcymcr31XQtOzcc5nO/IHN2E2TPMECKWYpM3e6olWEM63fq/BaL1wEYnt/w==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: '*'
- typescript: '*'
- peerDependenciesMeta:
- typescript:
- optional: true
- dependencies:
- '@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.3)
- '@typescript-eslint/utils': 5.44.0(typescript@4.9.3)
- debug: 4.3.4
- tsutils: 3.21.0(typescript@4.9.3)
- typescript: 4.9.3
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@typescript-eslint/types@4.33.0:
resolution: {integrity: sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ==}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
@@ -5400,7 +5048,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /@typescript-eslint/typescript-estree@4.33.0(typescript@4.9.3):
+ /@typescript-eslint/typescript-estree@4.33.0(typescript@4.9.5):
resolution: {integrity: sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA==}
engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies:
@@ -5411,12 +5059,12 @@ packages:
dependencies:
'@typescript-eslint/types': 4.33.0
'@typescript-eslint/visitor-keys': 4.33.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
globby: 11.1.0
is-glob: 4.0.3
- semver: 7.3.8
- tsutils: 3.21.0(typescript@4.9.3)
- typescript: 4.9.3
+ semver: 7.5.0
+ tsutils: 3.21.0(typescript@4.9.5)
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -5432,7 +5080,7 @@ packages:
dependencies:
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/visitor-keys': 5.44.0
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.8
@@ -5453,7 +5101,7 @@ packages:
dependencies:
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/visitor-keys': 5.44.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.8
@@ -5463,7 +5111,7 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/utils@5.44.0(eslint@7.32.0)(typescript@4.9.3):
+ /@typescript-eslint/utils@5.44.0(eslint@8.39.0)(typescript@4.9.3):
resolution: {integrity: sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5474,16 +5122,16 @@ packages:
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.3)
- eslint: 7.32.0
+ eslint: 8.39.0
eslint-scope: 5.1.1
- eslint-utils: 3.0.0(eslint@7.32.0)
+ eslint-utils: 3.0.0(eslint@8.39.0)
semver: 7.3.8
transitivePeerDependencies:
- supports-color
- typescript
dev: true
- /@typescript-eslint/utils@5.44.0(eslint@7.32.0)(typescript@4.9.5):
+ /@typescript-eslint/utils@5.44.0(eslint@8.39.0)(typescript@4.9.5):
resolution: {integrity: sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -5494,28 +5142,9 @@ packages:
'@typescript-eslint/scope-manager': 5.44.0
'@typescript-eslint/types': 5.44.0
'@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.5)
- eslint: 7.32.0
- eslint-scope: 5.1.1
- eslint-utils: 3.0.0(eslint@7.32.0)
- semver: 7.3.8
- transitivePeerDependencies:
- - supports-color
- - typescript
- dev: true
-
- /@typescript-eslint/utils@5.44.0(typescript@4.9.3):
- resolution: {integrity: sha512-fMzA8LLQ189gaBjS0MZszw5HBdZgVwxVFShCO3QN+ws3GlPkcy9YuS3U4wkT6su0w+Byjq3mS3uamy9HE4Yfjw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- peerDependencies:
- eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
- dependencies:
- '@types/json-schema': 7.0.11
- '@types/semver': 7.3.13
- '@typescript-eslint/scope-manager': 5.44.0
- '@typescript-eslint/types': 5.44.0
- '@typescript-eslint/typescript-estree': 5.44.0(typescript@4.9.3)
+ eslint: 8.39.0
eslint-scope: 5.1.1
- eslint-utils: 3.0.0
+ eslint-utils: 3.0.0(eslint@8.39.0)
semver: 7.3.8
transitivePeerDependencies:
- supports-color
@@ -5541,8 +5170,8 @@ packages:
/@vue/compiler-sfc@2.7.14:
resolution: {integrity: sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==}
dependencies:
- '@babel/parser': 7.20.3
- postcss: 8.4.21
+ '@babel/parser': 7.21.4
+ postcss: 8.4.23
source-map: 0.6.1
dev: true
@@ -5558,7 +5187,7 @@ packages:
source-map: 0.6.1
vue-template-es2015-compiler: 1.9.1
optionalDependencies:
- prettier: 2.7.1
+ prettier: 2.8.8
transitivePeerDependencies:
- arc-templates
- atpl
@@ -5619,7 +5248,7 @@ packages:
resolution: {integrity: sha512-L+lUuyxsocjBB3fwak3t0miXxyMHuXntysgm/R+MIbBfidsZEHpeky44z4Qdft2TUlGtb08i5QSl+4eUEQGTNw==}
dev: false
- /@wagmi/connectors@0.1.1(@babel/core@7.20.2)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3):
+ /@wagmi/connectors@0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3):
resolution: {integrity: sha512-W9w73o9HCYzuBsDHuujwBT/nGGIu5qLBSqVqslXf/S1Q9OiWoudmuIs3opuYqxgw5MpWbMqhq6QaxA7Qcd6NrA==}
peerDependencies:
'@wagmi/core': 0.8.x
@@ -5628,9 +5257,9 @@ packages:
'@wagmi/core':
optional: true
dependencies:
- '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.20.2)
+ '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.21.4)
'@ledgerhq/connect-kit-loader': 1.0.1
- '@wagmi/core': 0.8.4(@babel/core@7.20.2)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3)
+ '@wagmi/core': 0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3)
'@walletconnect/ethereum-provider': 1.8.0
abitype: 0.1.8(typescript@4.9.3)
ethers: 5.7.2
@@ -5645,7 +5274,7 @@ packages:
- utf-8-validate
dev: false
- /@wagmi/connectors@0.1.1(@babel/core@7.20.2)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.5):
+ /@wagmi/connectors@0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.5):
resolution: {integrity: sha512-W9w73o9HCYzuBsDHuujwBT/nGGIu5qLBSqVqslXf/S1Q9OiWoudmuIs3opuYqxgw5MpWbMqhq6QaxA7Qcd6NrA==}
peerDependencies:
'@wagmi/core': 0.8.x
@@ -5654,9 +5283,9 @@ packages:
'@wagmi/core':
optional: true
dependencies:
- '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.20.2)
+ '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.21.4)
'@ledgerhq/connect-kit-loader': 1.0.1
- '@wagmi/core': 0.8.4(@babel/core@7.20.2)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.5)
+ '@wagmi/core': 0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.5)
'@walletconnect/ethereum-provider': 1.8.0
abitype: 0.1.8(typescript@4.9.5)
ethers: 5.7.2
@@ -5671,65 +5300,7 @@ packages:
- utf-8-validate
dev: false
- /@wagmi/connectors@0.1.1(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3):
- resolution: {integrity: sha512-W9w73o9HCYzuBsDHuujwBT/nGGIu5qLBSqVqslXf/S1Q9OiWoudmuIs3opuYqxgw5MpWbMqhq6QaxA7Qcd6NrA==}
- peerDependencies:
- '@wagmi/core': 0.8.x
- ethers: ^5.0.0
- peerDependenciesMeta:
- '@wagmi/core':
- optional: true
- dependencies:
- '@coinbase/wallet-sdk': 3.6.3
- '@ledgerhq/connect-kit-loader': 1.0.1
- '@wagmi/core': 0.8.4(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(typescript@4.9.3)
- '@walletconnect/ethereum-provider': 1.8.0
- abitype: 0.1.8(typescript@4.9.3)
- ethers: 5.7.2
- eventemitter3: 4.0.7
- transitivePeerDependencies:
- - '@babel/core'
- - bufferutil
- - debug
- - encoding
- - supports-color
- - typescript
- - utf-8-validate
- dev: false
-
- /@wagmi/core@0.8.4(@babel/core@7.20.2)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3):
- resolution: {integrity: sha512-orFRGOei+ixH8fIU9DitjKFSnv7sEv4j0A32gin2aADLuyBsAqG7xD+5LzfVD8EarHzU98Mk9d4hmmIkMg8bXw==}
- peerDependencies:
- '@coinbase/wallet-sdk': '>=3.6.0'
- '@walletconnect/ethereum-provider': '>=1.7.5'
- ethers: '>=5.5.1'
- peerDependenciesMeta:
- '@coinbase/wallet-sdk':
- optional: true
- '@walletconnect/ethereum-provider':
- optional: true
- dependencies:
- '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.20.2)
- '@wagmi/chains': 0.1.3
- '@wagmi/connectors': 0.1.1(@babel/core@7.20.2)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
- abitype: 0.2.5(typescript@4.9.3)
- ethers: 5.7.2
- eventemitter3: 4.0.7
- zustand: 4.1.4(react@18.2.0)
- transitivePeerDependencies:
- - '@babel/core'
- - bufferutil
- - debug
- - encoding
- - immer
- - react
- - supports-color
- - typescript
- - utf-8-validate
- - zod
- dev: false
-
- /@wagmi/core@0.8.4(@babel/core@7.20.2)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.5):
+ /@wagmi/core@0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.3):
resolution: {integrity: sha512-orFRGOei+ixH8fIU9DitjKFSnv7sEv4j0A32gin2aADLuyBsAqG7xD+5LzfVD8EarHzU98Mk9d4hmmIkMg8bXw==}
peerDependencies:
'@coinbase/wallet-sdk': '>=3.6.0'
@@ -5741,10 +5312,10 @@ packages:
'@walletconnect/ethereum-provider':
optional: true
dependencies:
- '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.20.2)
+ '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.21.4)
'@wagmi/chains': 0.1.3
- '@wagmi/connectors': 0.1.1(@babel/core@7.20.2)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.5)
- abitype: 0.2.5(typescript@4.9.5)
+ '@wagmi/connectors': 0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
+ abitype: 0.2.5(typescript@4.9.3)
ethers: 5.7.2
eventemitter3: 4.0.7
zustand: 4.1.4(react@18.2.0)
@@ -5761,7 +5332,7 @@ packages:
- zod
dev: false
- /@wagmi/core@0.8.4(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(typescript@4.9.3):
+ /@wagmi/core@0.8.4(@babel/core@7.21.4)(@coinbase/wallet-sdk@3.6.3)(ethers@5.7.2)(react@18.2.0)(typescript@4.9.5):
resolution: {integrity: sha512-orFRGOei+ixH8fIU9DitjKFSnv7sEv4j0A32gin2aADLuyBsAqG7xD+5LzfVD8EarHzU98Mk9d4hmmIkMg8bXw==}
peerDependencies:
'@coinbase/wallet-sdk': '>=3.6.0'
@@ -5773,13 +5344,13 @@ packages:
'@walletconnect/ethereum-provider':
optional: true
dependencies:
- '@coinbase/wallet-sdk': 3.6.3
+ '@coinbase/wallet-sdk': 3.6.3(@babel/core@7.21.4)
'@wagmi/chains': 0.1.3
- '@wagmi/connectors': 0.1.1(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.3)
- abitype: 0.2.5(typescript@4.9.3)
+ '@wagmi/connectors': 0.1.1(@babel/core@7.21.4)(@wagmi/core@0.8.4)(ethers@5.7.2)(typescript@4.9.5)
+ abitype: 0.2.5(typescript@4.9.5)
ethers: 5.7.2
eventemitter3: 4.0.7
- zustand: 4.1.4
+ zustand: 4.1.4(react@18.2.0)
transitivePeerDependencies:
- '@babel/core'
- bufferutil
@@ -6006,109 +5577,109 @@ packages:
'@walletconnect/window-getters': 1.0.1
dev: false
- /@webassemblyjs/ast@1.11.1:
- resolution: {integrity: sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==}
+ /@webassemblyjs/ast@1.11.5:
+ resolution: {integrity: sha512-LHY/GSAZZRpsNQH+/oHqhRQ5FT7eoULcBqgfyTB5nQHogFnK3/7QoN7dLnwSE/JkUAF0SrRuclT7ODqMFtWxxQ==}
dependencies:
- '@webassemblyjs/helper-numbers': 1.11.1
- '@webassemblyjs/helper-wasm-bytecode': 1.11.1
+ '@webassemblyjs/helper-numbers': 1.11.5
+ '@webassemblyjs/helper-wasm-bytecode': 1.11.5
dev: true
- /@webassemblyjs/floating-point-hex-parser@1.11.1:
- resolution: {integrity: sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==}
+ /@webassemblyjs/floating-point-hex-parser@1.11.5:
+ resolution: {integrity: sha512-1j1zTIC5EZOtCplMBG/IEwLtUojtwFVwdyVMbL/hwWqbzlQoJsWCOavrdnLkemwNoC/EOwtUFch3fuo+cbcXYQ==}
dev: true
- /@webassemblyjs/helper-api-error@1.11.1:
- resolution: {integrity: sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==}
+ /@webassemblyjs/helper-api-error@1.11.5:
+ resolution: {integrity: sha512-L65bDPmfpY0+yFrsgz8b6LhXmbbs38OnwDCf6NpnMUYqa+ENfE5Dq9E42ny0qz/PdR0LJyq/T5YijPnU8AXEpA==}
dev: true
- /@webassemblyjs/helper-buffer@1.11.1:
- resolution: {integrity: sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==}
+ /@webassemblyjs/helper-buffer@1.11.5:
+ resolution: {integrity: sha512-fDKo1gstwFFSfacIeH5KfwzjykIE6ldh1iH9Y/8YkAZrhmu4TctqYjSh7t0K2VyDSXOZJ1MLhht/k9IvYGcIxg==}
dev: true
- /@webassemblyjs/helper-numbers@1.11.1:
- resolution: {integrity: sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==}
+ /@webassemblyjs/helper-numbers@1.11.5:
+ resolution: {integrity: sha512-DhykHXM0ZABqfIGYNv93A5KKDw/+ywBFnuWybZZWcuzWHfbp21wUfRkbtz7dMGwGgT4iXjWuhRMA2Mzod6W4WA==}
dependencies:
- '@webassemblyjs/floating-point-hex-parser': 1.11.1
- '@webassemblyjs/helper-api-error': 1.11.1
+ '@webassemblyjs/floating-point-hex-parser': 1.11.5
+ '@webassemblyjs/helper-api-error': 1.11.5
'@xtuc/long': 4.2.2
dev: true
- /@webassemblyjs/helper-wasm-bytecode@1.11.1:
- resolution: {integrity: sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==}
+ /@webassemblyjs/helper-wasm-bytecode@1.11.5:
+ resolution: {integrity: sha512-oC4Qa0bNcqnjAowFn7MPCETQgDYytpsfvz4ujZz63Zu/a/v71HeCAAmZsgZ3YVKec3zSPYytG3/PrRCqbtcAvA==}
dev: true
- /@webassemblyjs/helper-wasm-section@1.11.1:
- resolution: {integrity: sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==}
+ /@webassemblyjs/helper-wasm-section@1.11.5:
+ resolution: {integrity: sha512-uEoThA1LN2NA+K3B9wDo3yKlBfVtC6rh0i4/6hvbz071E8gTNZD/pT0MsBf7MeD6KbApMSkaAK0XeKyOZC7CIA==}
dependencies:
- '@webassemblyjs/ast': 1.11.1
- '@webassemblyjs/helper-buffer': 1.11.1
- '@webassemblyjs/helper-wasm-bytecode': 1.11.1
- '@webassemblyjs/wasm-gen': 1.11.1
+ '@webassemblyjs/ast': 1.11.5
+ '@webassemblyjs/helper-buffer': 1.11.5
+ '@webassemblyjs/helper-wasm-bytecode': 1.11.5
+ '@webassemblyjs/wasm-gen': 1.11.5
dev: true
- /@webassemblyjs/ieee754@1.11.1:
- resolution: {integrity: sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==}
+ /@webassemblyjs/ieee754@1.11.5:
+ resolution: {integrity: sha512-37aGq6qVL8A8oPbPrSGMBcp38YZFXcHfiROflJn9jxSdSMMM5dS5P/9e2/TpaJuhE+wFrbukN2WI6Hw9MH5acg==}
dependencies:
'@xtuc/ieee754': 1.2.0
dev: true
- /@webassemblyjs/leb128@1.11.1:
- resolution: {integrity: sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==}
+ /@webassemblyjs/leb128@1.11.5:
+ resolution: {integrity: sha512-ajqrRSXaTJoPW+xmkfYN6l8VIeNnR4vBOTQO9HzR7IygoCcKWkICbKFbVTNMjMgMREqXEr0+2M6zukzM47ZUfQ==}
dependencies:
'@xtuc/long': 4.2.2
dev: true
- /@webassemblyjs/utf8@1.11.1:
- resolution: {integrity: sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==}
+ /@webassemblyjs/utf8@1.11.5:
+ resolution: {integrity: sha512-WiOhulHKTZU5UPlRl53gHR8OxdGsSOxqfpqWeA2FmcwBMaoEdz6b2x2si3IwC9/fSPLfe8pBMRTHVMk5nlwnFQ==}
dev: true
- /@webassemblyjs/wasm-edit@1.11.1:
- resolution: {integrity: sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==}
+ /@webassemblyjs/wasm-edit@1.11.5:
+ resolution: {integrity: sha512-C0p9D2fAu3Twwqvygvf42iGCQ4av8MFBLiTb+08SZ4cEdwzWx9QeAHDo1E2k+9s/0w1DM40oflJOpkZ8jW4HCQ==}
dependencies:
- '@webassemblyjs/ast': 1.11.1
- '@webassemblyjs/helper-buffer': 1.11.1
- '@webassemblyjs/helper-wasm-bytecode': 1.11.1
- '@webassemblyjs/helper-wasm-section': 1.11.1
- '@webassemblyjs/wasm-gen': 1.11.1
- '@webassemblyjs/wasm-opt': 1.11.1
- '@webassemblyjs/wasm-parser': 1.11.1
- '@webassemblyjs/wast-printer': 1.11.1
+ '@webassemblyjs/ast': 1.11.5
+ '@webassemblyjs/helper-buffer': 1.11.5
+ '@webassemblyjs/helper-wasm-bytecode': 1.11.5
+ '@webassemblyjs/helper-wasm-section': 1.11.5
+ '@webassemblyjs/wasm-gen': 1.11.5
+ '@webassemblyjs/wasm-opt': 1.11.5
+ '@webassemblyjs/wasm-parser': 1.11.5
+ '@webassemblyjs/wast-printer': 1.11.5
dev: true
- /@webassemblyjs/wasm-gen@1.11.1:
- resolution: {integrity: sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==}
+ /@webassemblyjs/wasm-gen@1.11.5:
+ resolution: {integrity: sha512-14vteRlRjxLK9eSyYFvw1K8Vv+iPdZU0Aebk3j6oB8TQiQYuO6hj9s4d7qf6f2HJr2khzvNldAFG13CgdkAIfA==}
dependencies:
- '@webassemblyjs/ast': 1.11.1
- '@webassemblyjs/helper-wasm-bytecode': 1.11.1
- '@webassemblyjs/ieee754': 1.11.1
- '@webassemblyjs/leb128': 1.11.1
- '@webassemblyjs/utf8': 1.11.1
+ '@webassemblyjs/ast': 1.11.5
+ '@webassemblyjs/helper-wasm-bytecode': 1.11.5
+ '@webassemblyjs/ieee754': 1.11.5
+ '@webassemblyjs/leb128': 1.11.5
+ '@webassemblyjs/utf8': 1.11.5
dev: true
- /@webassemblyjs/wasm-opt@1.11.1:
- resolution: {integrity: sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==}
+ /@webassemblyjs/wasm-opt@1.11.5:
+ resolution: {integrity: sha512-tcKwlIXstBQgbKy1MlbDMlXaxpucn42eb17H29rawYLxm5+MsEmgPzeCP8B1Cl69hCice8LeKgZpRUAPtqYPgw==}
dependencies:
- '@webassemblyjs/ast': 1.11.1
- '@webassemblyjs/helper-buffer': 1.11.1
- '@webassemblyjs/wasm-gen': 1.11.1
- '@webassemblyjs/wasm-parser': 1.11.1
+ '@webassemblyjs/ast': 1.11.5
+ '@webassemblyjs/helper-buffer': 1.11.5
+ '@webassemblyjs/wasm-gen': 1.11.5
+ '@webassemblyjs/wasm-parser': 1.11.5
dev: true
- /@webassemblyjs/wasm-parser@1.11.1:
- resolution: {integrity: sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==}
+ /@webassemblyjs/wasm-parser@1.11.5:
+ resolution: {integrity: sha512-SVXUIwsLQlc8srSD7jejsfTU83g7pIGr2YYNb9oHdtldSxaOhvA5xwvIiWIfcX8PlSakgqMXsLpLfbbJ4cBYew==}
dependencies:
- '@webassemblyjs/ast': 1.11.1
- '@webassemblyjs/helper-api-error': 1.11.1
- '@webassemblyjs/helper-wasm-bytecode': 1.11.1
- '@webassemblyjs/ieee754': 1.11.1
- '@webassemblyjs/leb128': 1.11.1
- '@webassemblyjs/utf8': 1.11.1
+ '@webassemblyjs/ast': 1.11.5
+ '@webassemblyjs/helper-api-error': 1.11.5
+ '@webassemblyjs/helper-wasm-bytecode': 1.11.5
+ '@webassemblyjs/ieee754': 1.11.5
+ '@webassemblyjs/leb128': 1.11.5
+ '@webassemblyjs/utf8': 1.11.5
dev: true
- /@webassemblyjs/wast-printer@1.11.1:
- resolution: {integrity: sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==}
+ /@webassemblyjs/wast-printer@1.11.5:
+ resolution: {integrity: sha512-f7Pq3wvg3GSPUPzR0F6bmI89Hdb+u9WXrSKc4v+N0aV0q6r42WoF92Jp2jEorBEBRoRNXgjp53nBniDXcqZYPA==}
dependencies:
- '@webassemblyjs/ast': 1.11.1
+ '@webassemblyjs/ast': 1.11.5
'@xtuc/long': 4.2.2
dev: true
@@ -6278,12 +5849,12 @@ packages:
acorn-walk: 7.2.0
dev: true
- /acorn-import-assertions@1.8.0(acorn@8.8.1):
+ /acorn-import-assertions@1.8.0(acorn@8.8.2):
resolution: {integrity: sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==}
peerDependencies:
acorn: ^8
dependencies:
- acorn: 8.8.1
+ acorn: 8.8.2
dev: true
/acorn-jsx@5.3.2(acorn@7.4.1):
@@ -6300,7 +5871,6 @@ packages:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 8.8.2
- dev: false
/acorn-node@1.8.2:
resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==}
@@ -6326,12 +5896,6 @@ packages:
hasBin: true
dev: true
- /acorn@8.8.1:
- resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==}
- engines: {node: '>=0.4.0'}
- hasBin: true
- dev: true
-
/acorn@8.8.2:
resolution: {integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==}
engines: {node: '>=0.4.0'}
@@ -6357,7 +5921,7 @@ packages:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
dependencies:
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
transitivePeerDependencies:
- supports-color
dev: true
@@ -6366,7 +5930,7 @@ packages:
resolution: {integrity: sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==}
engines: {node: '>= 8.0.0'}
dependencies:
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
depd: 1.1.2
humanize-ms: 1.2.1
transitivePeerDependencies:
@@ -6397,8 +5961,8 @@ packages:
uri-js: 4.4.1
dev: true
- /ajv@8.11.2:
- resolution: {integrity: sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==}
+ /ajv@8.12.0:
+ resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==}
dependencies:
fast-deep-equal: 3.1.3
json-schema-traverse: 1.0.0
@@ -6518,7 +6082,7 @@ packages:
engines: {node: '>=10'}
dependencies:
delegates: 1.0.0
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
dev: true
/are-we-there-yet@3.0.1:
@@ -6526,7 +6090,7 @@ packages:
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
dependencies:
delegates: 1.0.0
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
dev: true
/arg@1.0.0:
@@ -6552,6 +6116,7 @@ packages:
/argv@0.0.2:
resolution: {integrity: sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw==}
engines: {node: '>=0.6.10'}
+ deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
dev: false
/arr-diff@4.0.0:
@@ -6583,6 +6148,13 @@ packages:
typical: 2.6.1
dev: true
+ /array-buffer-byte-length@1.0.0:
+ resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
+ dependencies:
+ call-bind: 1.0.2
+ is-array-buffer: 3.0.2
+ dev: true
+
/array-flatten@1.1.1:
resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==}
dev: true
@@ -6593,9 +6165,9 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
- get-intrinsic: 1.1.3
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
+ get-intrinsic: 1.2.0
is-string: 1.0.7
dev: true
@@ -6619,8 +6191,18 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
+ es-shim-unscopables: 1.0.0
+ dev: true
+
+ /array.prototype.flatmap@1.3.1:
+ resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
es-shim-unscopables: 1.0.0
dev: true
@@ -6629,8 +6211,8 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
es-array-method-boxes-properly: 1.0.0
is-string: 1.0.7
dev: true
@@ -6714,7 +6296,7 @@ packages:
/async@2.6.2:
resolution: {integrity: sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==}
dependencies:
- lodash: 4.17.21
+ lodash: 4.17.20
dev: true
/async@2.6.4:
@@ -6760,8 +6342,8 @@ packages:
peerDependencies:
postcss: ^8.1.0
dependencies:
- browserslist: 4.21.5
- caniuse-lite: 1.0.30001458
+ browserslist: 4.21.4
+ caniuse-lite: 1.0.30001434
fraction.js: 4.2.0
normalize-range: 0.1.2
picocolors: 1.0.0
@@ -6788,7 +6370,6 @@ packages:
/available-typed-arrays@1.0.5:
resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==}
engines: {node: '>= 0.4'}
- dev: false
/aws-sign2@0.7.0:
resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==}
@@ -6801,7 +6382,7 @@ packages:
/axios@0.21.4:
resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==}
dependencies:
- follow-redirects: 1.15.2
+ follow-redirects: 1.15.2(debug@4.3.4)
transitivePeerDependencies:
- debug
dev: false
@@ -6809,7 +6390,7 @@ packages:
/axios@1.2.0:
resolution: {integrity: sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==}
dependencies:
- follow-redirects: 1.15.2
+ follow-redirects: 1.15.2(debug@4.3.4)
form-data: 4.0.0
proxy-from-env: 1.1.0
transitivePeerDependencies:
@@ -6840,7 +6421,7 @@ packages:
convert-source-map: 1.9.0
debug: 2.6.9
json5: 0.5.1
- lodash: 4.17.21
+ lodash: 4.17.20
minimatch: 3.1.2
path-is-absolute: 1.0.1
private: 0.1.8
@@ -6858,7 +6439,7 @@ packages:
babel-types: 6.26.0
detect-indent: 4.0.0
jsesc: 1.3.0
- lodash: 4.17.21
+ lodash: 4.17.20
source-map: 0.5.7
trim-right: 1.0.1
dev: true
@@ -6890,7 +6471,7 @@ packages:
babel-helper-function-name: 6.24.1
babel-runtime: 6.26.0
babel-types: 6.26.0
- lodash: 4.17.21
+ lodash: 4.17.20
transitivePeerDependencies:
- supports-color
dev: true
@@ -6943,7 +6524,7 @@ packages:
dependencies:
babel-runtime: 6.26.0
babel-types: 6.26.0
- lodash: 4.17.21
+ lodash: 4.17.20
dev: true
/babel-helper-remap-async-to-generator@6.24.1:
@@ -6980,17 +6561,18 @@ packages:
- supports-color
dev: true
- /babel-jest@27.5.1:
+ /babel-jest@27.5.1(@babel/core@7.20.2):
resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
peerDependencies:
'@babel/core': ^7.8.0
dependencies:
+ '@babel/core': 7.20.2
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
'@types/babel__core': 7.1.20
babel-plugin-istanbul: 6.1.1
- babel-preset-jest: 27.5.1
+ babel-preset-jest: 27.5.1(@babel/core@7.20.2)
chalk: 4.1.2
graceful-fs: 4.2.10
slash: 3.0.0
@@ -6998,18 +6580,18 @@ packages:
- supports-color
dev: true
- /babel-jest@27.5.1(@babel/core@7.20.2):
+ /babel-jest@27.5.1(@babel/core@7.21.4):
resolution: {integrity: sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
peerDependencies:
'@babel/core': ^7.8.0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
'@types/babel__core': 7.1.20
babel-plugin-istanbul: 6.1.1
- babel-preset-jest: 27.5.1(@babel/core@7.20.2)
+ babel-preset-jest: 27.5.1(@babel/core@7.21.4)
chalk: 4.1.2
graceful-fs: 4.2.10
slash: 3.0.0
@@ -7052,66 +6634,36 @@ packages:
'@types/babel__traverse': 7.18.2
dev: true
- /babel-plugin-polyfill-corejs2@0.3.3:
- resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/compat-data': 7.20.1
- '@babel/helper-define-polyfill-provider': 0.3.3
- semver: 6.3.0
- transitivePeerDependencies:
- - supports-color
-
- /babel-plugin-polyfill-corejs2@0.3.3(@babel/core@7.20.2):
+ /babel-plugin-polyfill-corejs2@0.3.3(@babel/core@7.21.4):
resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
'@babel/compat-data': 7.20.1
- '@babel/core': 7.20.2
- '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
+ '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.4)
semver: 6.3.0
transitivePeerDependencies:
- supports-color
- /babel-plugin-polyfill-corejs3@0.6.0:
- resolution: {integrity: sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-define-polyfill-provider': 0.3.3
- core-js-compat: 3.26.1
- transitivePeerDependencies:
- - supports-color
-
- /babel-plugin-polyfill-corejs3@0.6.0(@babel/core@7.20.2):
+ /babel-plugin-polyfill-corejs3@0.6.0(@babel/core@7.21.4):
resolution: {integrity: sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
+ '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.4)
core-js-compat: 3.26.1
transitivePeerDependencies:
- supports-color
- /babel-plugin-polyfill-regenerator@0.4.1:
- resolution: {integrity: sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==}
- peerDependencies:
- '@babel/core': ^7.0.0-0
- dependencies:
- '@babel/helper-define-polyfill-provider': 0.3.3
- transitivePeerDependencies:
- - supports-color
-
- /babel-plugin-polyfill-regenerator@0.4.1(@babel/core@7.20.2):
+ /babel-plugin-polyfill-regenerator@0.4.1(@babel/core@7.21.4):
resolution: {integrity: sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==}
peerDependencies:
'@babel/core': ^7.0.0-0
dependencies:
- '@babel/core': 7.20.2
- '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.20.2)
+ '@babel/core': 7.21.4
+ '@babel/helper-define-polyfill-provider': 0.3.3(@babel/core@7.21.4)
transitivePeerDependencies:
- supports-color
@@ -7156,7 +6708,7 @@ packages:
babel-template: 6.26.0
babel-traverse: 6.26.0
babel-types: 6.26.0
- lodash: 4.17.21
+ lodash: 4.17.20
transitivePeerDependencies:
- supports-color
dev: true
@@ -7348,25 +6900,6 @@ packages:
babel-types: 6.26.0
dev: true
- /babel-preset-current-node-syntax@1.0.1:
- resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==}
- peerDependencies:
- '@babel/core': ^7.0.0
- dependencies:
- '@babel/plugin-syntax-async-generators': 7.8.4
- '@babel/plugin-syntax-bigint': 7.8.3
- '@babel/plugin-syntax-class-properties': 7.12.13
- '@babel/plugin-syntax-import-meta': 7.10.4
- '@babel/plugin-syntax-json-strings': 7.8.3
- '@babel/plugin-syntax-logical-assignment-operators': 7.10.4
- '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3
- '@babel/plugin-syntax-numeric-separator': 7.10.4
- '@babel/plugin-syntax-object-rest-spread': 7.8.3
- '@babel/plugin-syntax-optional-catch-binding': 7.8.3
- '@babel/plugin-syntax-optional-chaining': 7.8.3
- '@babel/plugin-syntax-top-level-await': 7.14.5
- dev: true
-
/babel-preset-current-node-syntax@1.0.1(@babel/core@7.20.2):
resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==}
peerDependencies:
@@ -7387,6 +6920,26 @@ packages:
'@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.20.2)
dev: true
+ /babel-preset-current-node-syntax@1.0.1(@babel/core@7.21.4):
+ resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==}
+ peerDependencies:
+ '@babel/core': ^7.0.0
+ dependencies:
+ '@babel/core': 7.21.4
+ '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.21.4)
+ '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.21.4)
+ '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.21.4)
+ '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.21.4)
+ dev: true
+
/babel-preset-env@1.7.0:
resolution: {integrity: sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==}
dependencies:
@@ -7424,25 +6977,26 @@ packages:
- supports-color
dev: true
- /babel-preset-jest@27.5.1:
+ /babel-preset-jest@27.5.1(@babel/core@7.20.2):
resolution: {integrity: sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
+ '@babel/core': 7.20.2
babel-plugin-jest-hoist: 27.5.1
- babel-preset-current-node-syntax: 1.0.1
+ babel-preset-current-node-syntax: 1.0.1(@babel/core@7.20.2)
dev: true
- /babel-preset-jest@27.5.1(@babel/core@7.20.2):
+ /babel-preset-jest@27.5.1(@babel/core@7.21.4):
resolution: {integrity: sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
peerDependencies:
'@babel/core': ^7.0.0
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
babel-plugin-jest-hoist: 27.5.1
- babel-preset-current-node-syntax: 1.0.1(@babel/core@7.20.2)
+ babel-preset-current-node-syntax: 1.0.1(@babel/core@7.21.4)
dev: true
/babel-register@6.26.0:
@@ -7452,7 +7006,7 @@ packages:
babel-runtime: 6.26.0
core-js: 2.6.12
home-or-tmp: 2.0.0
- lodash: 4.17.21
+ lodash: 4.17.20
mkdirp: 0.5.6
source-map-support: 0.4.18
transitivePeerDependencies:
@@ -7574,21 +7128,15 @@ packages:
bindings: 1.5.0
dev: false
- /bigint-crypto-utils@3.1.7:
- resolution: {integrity: sha512-zpCQpIE2Oy5WIQpjC9iYZf8Uh9QqoS51ZCooAcNvzv1AQ3VWdT52D0ksr1+/faeK8HVIej1bxXcP75YcqH3KPA==}
- engines: {node: '>=10.4.0'}
- dependencies:
- bigint-mod-arith: 3.1.2
- dev: true
-
- /bigint-mod-arith@3.1.2:
- resolution: {integrity: sha512-nx8J8bBeiRR+NlsROFH9jHswW5HO8mgfOSqW0AmjicMMvaONDa8AO+5ViKDUUNytBPWiwfvZP4/Bj4Y3lUfvgQ==}
- engines: {node: '>=10.4.0'}
+ /bigint-crypto-utils@3.2.2:
+ resolution: {integrity: sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw==}
+ engines: {node: '>=14.0.0'}
dev: true
- /bignumber.js@9.1.0:
- resolution: {integrity: sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A==}
+ /bignumber.js@9.1.1:
+ resolution: {integrity: sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==}
dev: true
+ optional: true
/binary-extensions@2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
@@ -7655,7 +7203,7 @@ packages:
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
dependencies:
bytes: 3.1.2
- content-type: 1.0.4
+ content-type: 1.0.5
debug: 2.6.9
depd: 2.0.0
destroy: 1.2.0
@@ -7671,6 +7219,27 @@ packages:
dev: true
optional: true
+ /body-parser@1.20.2:
+ resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==}
+ engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
+ dependencies:
+ bytes: 3.1.2
+ content-type: 1.0.5
+ debug: 2.6.9
+ depd: 2.0.0
+ destroy: 1.2.0
+ http-errors: 2.0.0
+ iconv-lite: 0.4.24
+ on-finished: 2.4.1
+ qs: 6.11.0
+ raw-body: 2.5.2
+ type-is: 1.6.18
+ unpipe: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+ optional: true
+
/boolbase@1.0.0:
resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==}
dev: true
@@ -7793,7 +7362,7 @@ packages:
elliptic: 6.5.4
inherits: 2.0.4
parse-asn1: 5.1.6
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
safe-buffer: 5.2.1
dev: true
@@ -7801,8 +7370,8 @@ packages:
resolution: {integrity: sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==}
hasBin: true
dependencies:
- caniuse-lite: 1.0.30001451
- electron-to-chromium: 1.4.291
+ caniuse-lite: 1.0.30001481
+ electron-to-chromium: 1.4.369
dev: true
/browserslist@4.21.4:
@@ -7920,7 +7489,7 @@ packages:
engines: {node: '>=6.14.2'}
requiresBuild: true
dependencies:
- node-gyp-build: 4.5.0
+ node-gyp-build: 4.6.0
/busboy@1.6.0:
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
@@ -8000,7 +7569,7 @@ packages:
dependencies:
clone-response: 1.0.3
get-stream: 5.2.0
- http-cache-semantics: 4.1.0
+ http-cache-semantics: 4.1.1
keyv: 3.1.0
lowercase-keys: 2.0.0
normalize-url: 4.5.1
@@ -8014,7 +7583,7 @@ packages:
dependencies:
clone-response: 1.0.3
get-stream: 5.2.0
- http-cache-semantics: 4.1.0
+ http-cache-semantics: 4.1.1
keyv: 4.5.2
lowercase-keys: 2.0.0
normalize-url: 6.1.0
@@ -8080,6 +7649,16 @@ packages:
quick-lru: 4.0.1
dev: true
+ /camelcase-keys@7.0.2:
+ resolution: {integrity: sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==}
+ engines: {node: '>=12'}
+ dependencies:
+ camelcase: 6.3.0
+ map-obj: 4.3.0
+ quick-lru: 5.1.1
+ type-fest: 1.4.0
+ dev: true
+
/camelcase@3.0.0:
resolution: {integrity: sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==}
engines: {node: '>=0.10.0'}
@@ -8101,16 +7680,17 @@ packages:
/caniuse-lite@1.0.30001447:
resolution: {integrity: sha512-bdKU1BQDPeEXe9A39xJnGtY0uRq/z5osrnXUw0TcK+EYno45Y+U7QU9HhHEyzvMDffpYadFXi3idnSNkcwLkTw==}
- /caniuse-lite@1.0.30001451:
- resolution: {integrity: sha512-XY7UbUpGRatZzoRft//5xOa69/1iGJRBlrieH6QYrkKLIFn3m7OVEJ81dSrKoy2BnKsdbX5cLrOispZNYo9v2w==}
- dev: true
+ /caniuse-lite@1.0.30001465:
+ resolution: {integrity: sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==}
- /caniuse-lite@1.0.30001458:
- resolution: {integrity: sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==}
+ /caniuse-lite@1.0.30001481:
+ resolution: {integrity: sha512-KCqHwRnaa1InZBtqXzP98LPg0ajCVujMKjqKDhZEthIpAsJl/YEIa3YvXjGXPVqzZVguccuu7ga9KOE1J9rKPQ==}
dev: true
- /caniuse-lite@1.0.30001465:
- resolution: {integrity: sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==}
+ /case@1.6.3:
+ resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==}
+ engines: {node: '>= 0.8.0'}
+ dev: true
/caseless@0.12.0:
resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==}
@@ -8121,14 +7701,6 @@ packages:
engines: {node: '>=6'}
dev: true
- /cbor@5.2.0:
- resolution: {integrity: sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==}
- engines: {node: '>=6.0.0'}
- dependencies:
- bignumber.js: 9.1.0
- nofilter: 1.0.4
- dev: true
-
/cbor@8.1.0:
resolution: {integrity: sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==}
engines: {node: '>=12.19'}
@@ -8146,7 +7718,7 @@ packages:
dependencies:
assertion-error: 1.1.0
check-error: 1.0.2
- deep-eql: 4.1.2
+ deep-eql: 4.1.3
get-func-name: 2.0.0
loupe: 2.3.6
pathval: 1.1.1
@@ -8318,20 +7890,20 @@ packages:
static-extend: 0.1.2
dev: true
- /classic-level@1.2.0:
- resolution: {integrity: sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg==}
+ /classic-level@1.3.0:
+ resolution: {integrity: sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==}
engines: {node: '>=12'}
requiresBuild: true
dependencies:
abstract-level: 1.0.3
catering: 2.1.1
module-error: 1.0.2
- napi-macros: 2.0.0
- node-gyp-build: 4.5.0
+ napi-macros: 2.2.2
+ node-gyp-build: 4.6.0
dev: true
- /clean-css@5.3.1:
- resolution: {integrity: sha512-lCr8OHhiWCTw4v8POJovCoh4T7I9U11yVsPjMWWnnMmp9ZowCxyad1Pathle/9HjaDp+fdQKjO9fQydE6RHTZg==}
+ /clean-css@5.3.2:
+ resolution: {integrity: sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww==}
engines: {node: '>= 10.0'}
dependencies:
source-map: 0.6.1
@@ -8529,6 +8101,10 @@ packages:
resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==}
dev: true
+ /colorette@2.0.20:
+ resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
+ dev: true
+
/colors@1.4.0:
resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==}
engines: {node: '>=0.1.90'}
@@ -8556,8 +8132,8 @@ packages:
typical: 2.6.1
dev: true
- /commander@10.0.0:
- resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==}
+ /commander@10.0.1:
+ resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==}
engines: {node: '>=14'}
dev: true
@@ -8572,13 +8148,13 @@ packages:
resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==}
engines: {node: '>= 12'}
- /commander@9.4.1:
- resolution: {integrity: sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==}
+ /commander@9.5.0:
+ resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==}
engines: {node: ^12.20.0 || >=14}
dev: true
- /compare-versions@5.0.1:
- resolution: {integrity: sha512-v8Au3l0b+Nwkp4G142JcgJFh1/TUhdxut7wzD1Nq1dyp5oa3tXaqb03EXOAB6jS4gMlalkjAUPZBMiAfKUixHQ==}
+ /compare-versions@5.0.3:
+ resolution: {integrity: sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==}
dev: true
/component-emitter@1.3.0:
@@ -8793,8 +8369,8 @@ packages:
dev: true
optional: true
- /content-type@1.0.4:
- resolution: {integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==}
+ /content-type@1.0.5:
+ resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
engines: {node: '>= 0.6'}
dev: true
optional: true
@@ -8818,8 +8394,8 @@ packages:
dev: true
optional: true
- /cookiejar@2.1.3:
- resolution: {integrity: sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==}
+ /cookiejar@2.1.4:
+ resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==}
dev: true
optional: true
@@ -8839,8 +8415,8 @@ packages:
dependencies:
browserslist: 4.21.4
- /core-js-pure@3.26.1:
- resolution: {integrity: sha512-VVXcDpp/xJ21KdULRq/lXdLzQAtX7+37LzpyfFM973il0tWSsDEoyzG38G14AjTpK9VTfiNM9jnFauq/CpaWGQ==}
+ /core-js-pure@3.30.1:
+ resolution: {integrity: sha512-nXBEVpmUnNRhz83cHd9JRQC52cTMcuXAmR56+9dSMpRdpeA4I1PX6yjmhd71Eyc/wXNsdBdUDIj1QTIeZpU5Tg==}
requiresBuild: true
dev: true
@@ -8888,8 +8464,8 @@ packages:
yaml: 1.10.2
dev: true
- /cosmiconfig@8.0.0:
- resolution: {integrity: sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ==}
+ /cosmiconfig@8.1.3:
+ resolution: {integrity: sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==}
engines: {node: '>=14'}
dependencies:
import-fresh: 3.3.0
@@ -8937,7 +8513,7 @@ packages:
/cross-fetch@2.2.6:
resolution: {integrity: sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA==}
dependencies:
- node-fetch: 2.6.7
+ node-fetch: 2.6.9
whatwg-fetch: 2.0.4
transitivePeerDependencies:
- encoding
@@ -8999,21 +8575,21 @@ packages:
randomfill: 1.0.4
dev: true
- /css-loader@6.7.2(webpack@5.75.0):
- resolution: {integrity: sha512-oqGbbVcBJkm8QwmnNzrFrWTnudnRZC+1eXikLJl0n4ljcfotgRifpg2a1lKy8jTrc4/d9A/ap1GFq1jDKG7J+Q==}
+ /css-loader@6.7.3(webpack@5.80.0):
+ resolution: {integrity: sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==}
engines: {node: '>= 12.13.0'}
peerDependencies:
webpack: ^5.0.0
dependencies:
- icss-utils: 5.1.0(postcss@8.4.21)
- postcss: 8.4.21
- postcss-modules-extract-imports: 3.0.0(postcss@8.4.21)
- postcss-modules-local-by-default: 4.0.0(postcss@8.4.21)
- postcss-modules-scope: 3.0.0(postcss@8.4.21)
- postcss-modules-values: 4.0.0(postcss@8.4.21)
+ icss-utils: 5.1.0(postcss@8.4.23)
+ postcss: 8.4.23
+ postcss-modules-extract-imports: 3.0.0(postcss@8.4.23)
+ postcss-modules-local-by-default: 4.0.0(postcss@8.4.23)
+ postcss-modules-scope: 3.0.0(postcss@8.4.23)
+ postcss-modules-values: 4.0.0(postcss@8.4.23)
postcss-value-parser: 4.2.0
- semver: 7.3.8
- webpack: 5.75.0
+ semver: 7.5.0
+ webpack: 5.80.0
dev: true
/css-select@4.3.0:
@@ -9055,6 +8631,10 @@ packages:
/csstype@3.1.1:
resolution: {integrity: sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==}
+ /csstype@3.1.2:
+ resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
+ dev: true
+
/d@1.0.1:
resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==}
dependencies:
@@ -9109,7 +8689,7 @@ packages:
supports-color:
optional: true
dependencies:
- ms: 2.1.3
+ ms: 2.1.1
supports-color: 6.0.0
dev: true
@@ -9124,17 +8704,6 @@ packages:
ms: 2.1.3
dev: true
- /debug@4.3.4:
- resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
- engines: {node: '>=6.0'}
- peerDependencies:
- supports-color: '*'
- peerDependenciesMeta:
- supports-color:
- optional: true
- dependencies:
- ms: 2.1.2
-
/debug@4.3.4(supports-color@8.1.1):
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
engines: {node: '>=6.0'}
@@ -9146,8 +8715,9 @@ packages:
dependencies:
ms: 2.1.2
supports-color: 8.1.1
+ dev: true
- /debug@4.3.4(supports-color@9.2.3):
+ /debug@4.3.4(supports-color@9.3.1):
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
engines: {node: '>=6.0'}
peerDependencies:
@@ -9157,8 +8727,7 @@ packages:
optional: true
dependencies:
ms: 2.1.2
- supports-color: 9.2.3
- dev: true
+ supports-color: 9.3.1
/decamelize-keys@1.1.1:
resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==}
@@ -9190,6 +8759,12 @@ packages:
/decode-uri-component@0.2.0:
resolution: {integrity: sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==}
engines: {node: '>=0.10'}
+ dev: false
+
+ /decode-uri-component@0.2.2:
+ resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==}
+ engines: {node: '>=0.10'}
+ dev: true
/decompress-response@3.3.0:
resolution: {integrity: sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==}
@@ -9209,8 +8784,8 @@ packages:
resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==}
dev: true
- /deep-eql@4.1.2:
- resolution: {integrity: sha512-gT18+YW4CcW/DBNTwAmqTtkJh7f9qqScu2qFVlx7kCoeY9tlBu9cUcr7+I+Z/noG8INehS3xQgLpTtd/QUTn4w==}
+ /deep-eql@4.1.3:
+ resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==}
engines: {node: '>=6'}
dependencies:
type-detect: 4.0.8
@@ -9224,7 +8799,7 @@ packages:
is-regex: 1.1.4
object-is: 1.1.5
object-keys: 1.1.1
- regexp.prototype.flags: 1.4.3
+ regexp.prototype.flags: 1.5.0
dev: true
/deep-extend@0.6.0:
@@ -9279,8 +8854,8 @@ packages:
inherits: 2.0.4
dev: true
- /define-properties@1.1.4:
- resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==}
+ /define-properties@1.2.0:
+ resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==}
engines: {node: '>= 0.4'}
dependencies:
has-property-descriptors: 1.0.0
@@ -9400,7 +8975,7 @@ packages:
hasBin: true
dependencies:
address: 1.2.2
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
transitivePeerDependencies:
- supports-color
dev: true
@@ -9454,7 +9029,7 @@ packages:
/difflib@0.2.4:
resolution: {integrity: sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==}
dependencies:
- heap: 0.2.6
+ heap: 0.2.7
dev: true
/dijkstrajs@1.0.2:
@@ -9588,13 +9163,13 @@ packages:
/electron-to-chromium@1.4.284:
resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==}
- /electron-to-chromium@1.4.291:
- resolution: {integrity: sha512-8vk4rSMBh9LRfZKE6wcxOLmlfA4Xsa4v0RRwB6VJkAH703klC9XfZIocmTk2gLBzW31P6XbuNeMt1aB5aAu/2g==}
- dev: true
-
/electron-to-chromium@1.4.328:
resolution: {integrity: sha512-DE9tTy2PNmy1v55AZAO542ui+MLC2cvINMK4P2LXGsJdput/ThVG9t+QGecPuAZZSgC8XoI+Jh9M1OG9IoNSCw==}
+ /electron-to-chromium@1.4.369:
+ resolution: {integrity: sha512-LfxbHXdA/S+qyoTEA4EbhxGjrxx7WK2h6yb5K2v0UCOufUKX+VZaHbl3svlzZfv9sGseym/g3Ne4DpsgRULmqg==}
+ dev: true
+
/elliptic@6.5.4:
resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==}
dependencies:
@@ -9673,6 +9248,14 @@ packages:
tapable: 2.2.1
dev: true
+ /enhanced-resolve@5.13.0:
+ resolution: {integrity: sha512-eyV8f0y1+bzyfh8xAwW/WTSZpLbjhqc4ne9eGSH4Zo2ejdyiNG9pU6mf9DG8a7+Auk6MFTlNOT4Y2y/9k8GKVg==}
+ engines: {node: '>=10.13.0'}
+ dependencies:
+ graceful-fs: 4.2.11
+ tapable: 2.2.1
+ dev: true
+
/enquirer@2.3.6:
resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==}
engines: {node: '>=8.6'}
@@ -9706,42 +9289,61 @@ packages:
is-arrayish: 0.2.1
dev: true
- /es-abstract@1.20.4:
- resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==}
+ /es-abstract@1.21.2:
+ resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==}
engines: {node: '>= 0.4'}
dependencies:
+ array-buffer-byte-length: 1.0.0
+ available-typed-arrays: 1.0.5
call-bind: 1.0.2
+ es-set-tostringtag: 2.0.1
es-to-primitive: 1.2.1
- function-bind: 1.1.1
function.prototype.name: 1.1.5
- get-intrinsic: 1.1.3
+ get-intrinsic: 1.2.0
get-symbol-description: 1.0.0
+ globalthis: 1.0.3
+ gopd: 1.0.1
has: 1.0.3
has-property-descriptors: 1.0.0
+ has-proto: 1.0.1
has-symbols: 1.0.3
- internal-slot: 1.0.3
+ internal-slot: 1.0.5
+ is-array-buffer: 3.0.2
is-callable: 1.2.7
is-negative-zero: 2.0.2
is-regex: 1.1.4
is-shared-array-buffer: 1.0.2
is-string: 1.0.7
+ is-typed-array: 1.1.10
is-weakref: 1.0.2
- object-inspect: 1.12.2
+ object-inspect: 1.12.3
object-keys: 1.1.1
object.assign: 4.1.4
- regexp.prototype.flags: 1.4.3
+ regexp.prototype.flags: 1.5.0
safe-regex-test: 1.0.0
+ string.prototype.trim: 1.2.7
string.prototype.trimend: 1.0.6
string.prototype.trimstart: 1.0.6
+ typed-array-length: 1.0.4
unbox-primitive: 1.0.2
+ which-typed-array: 1.1.9
dev: true
/es-array-method-boxes-properly@1.0.0:
resolution: {integrity: sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==}
dev: true
- /es-module-lexer@0.9.3:
- resolution: {integrity: sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==}
+ /es-module-lexer@1.2.1:
+ resolution: {integrity: sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==}
+ dev: true
+
+ /es-set-tostringtag@2.0.1:
+ resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ get-intrinsic: 1.2.0
+ has: 1.0.3
+ has-tostringtag: 1.0.0
dev: true
/es-shim-unscopables@1.0.0:
@@ -10068,8 +9670,8 @@ packages:
source-map: 0.6.1
dev: true
- /eslint-config-prettier@8.5.0(eslint@7.32.0):
- resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==}
+ /eslint-config-prettier@8.8.0(eslint@7.32.0):
+ resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
@@ -10077,7 +9679,7 @@ packages:
eslint: 7.32.0
dev: true
- /eslint-config-standard@16.0.3(eslint-plugin-import@2.26.0)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@7.32.0):
+ /eslint-config-standard@16.0.3(eslint-plugin-import@2.27.5)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@7.32.0):
resolution: {integrity: sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==}
peerDependencies:
eslint: ^7.12.1
@@ -10086,22 +9688,23 @@ packages:
eslint-plugin-promise: ^4.2.1 || ^5.0.0
dependencies:
eslint: 7.32.0
- eslint-plugin-import: 2.26.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@4.33.0)(eslint@7.32.0)
eslint-plugin-node: 11.1.0(eslint@7.32.0)
eslint-plugin-promise: 5.2.0(eslint@7.32.0)
dev: true
- /eslint-import-resolver-node@0.3.6:
- resolution: {integrity: sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==}
+ /eslint-import-resolver-node@0.3.7:
+ resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==}
dependencies:
debug: 3.2.7
- resolve: 1.22.1
+ is-core-module: 2.12.0
+ resolve: 1.22.2
transitivePeerDependencies:
- supports-color
dev: true
- /eslint-module-utils@2.7.4(@typescript-eslint/parser@4.33.0)(eslint-import-resolver-node@0.3.6)(eslint@7.32.0):
- resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
+ /eslint-module-utils@2.8.0(@typescript-eslint/parser@4.33.0)(eslint-import-resolver-node@0.3.7)(eslint@7.32.0):
+ resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser': '*'
@@ -10121,10 +9724,10 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.3)
+ '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
debug: 3.2.7
eslint: 7.32.0
- eslint-import-resolver-node: 0.3.6
+ eslint-import-resolver-node: 0.3.7
transitivePeerDependencies:
- supports-color
dev: true
@@ -10140,8 +9743,8 @@ packages:
regexpp: 3.2.0
dev: true
- /eslint-plugin-import@2.26.0(@typescript-eslint/parser@4.33.0)(eslint@7.32.0):
- resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==}
+ /eslint-plugin-import@2.27.5(@typescript-eslint/parser@4.33.0)(eslint@7.32.0):
+ resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'}
peerDependencies:
'@typescript-eslint/parser': '*'
@@ -10150,28 +9753,30 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.3)
+ '@typescript-eslint/parser': 4.33.0(eslint@7.32.0)(typescript@4.9.5)
array-includes: 3.1.6
array.prototype.flat: 1.3.1
- debug: 2.6.9
+ array.prototype.flatmap: 1.3.1
+ debug: 3.2.7
doctrine: 2.1.0
eslint: 7.32.0
- eslint-import-resolver-node: 0.3.6
- eslint-module-utils: 2.7.4(@typescript-eslint/parser@4.33.0)(eslint-import-resolver-node@0.3.6)(eslint@7.32.0)
+ eslint-import-resolver-node: 0.3.7
+ eslint-module-utils: 2.8.0(@typescript-eslint/parser@4.33.0)(eslint-import-resolver-node@0.3.7)(eslint@7.32.0)
has: 1.0.3
- is-core-module: 2.11.0
+ is-core-module: 2.12.0
is-glob: 4.0.3
minimatch: 3.1.2
object.values: 1.1.6
- resolve: 1.22.1
- tsconfig-paths: 3.14.1
+ resolve: 1.22.2
+ semver: 6.3.0
+ tsconfig-paths: 3.14.2
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
dev: true
- /eslint-plugin-jest@27.2.1(@typescript-eslint/eslint-plugin@5.44.0)(jest@27.5.1)(typescript@4.9.3):
+ /eslint-plugin-jest@27.2.1(@typescript-eslint/eslint-plugin@5.44.0)(eslint@8.39.0)(jest@27.5.1)(typescript@4.9.3):
resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
peerDependencies:
@@ -10184,8 +9789,9 @@ packages:
jest:
optional: true
dependencies:
- '@typescript-eslint/eslint-plugin': 5.44.0(@typescript-eslint/parser@5.44.0)(typescript@4.9.3)
- '@typescript-eslint/utils': 5.44.0(typescript@4.9.3)
+ '@typescript-eslint/eslint-plugin': 5.44.0(@typescript-eslint/parser@5.44.0)(eslint@8.39.0)(typescript@4.9.3)
+ '@typescript-eslint/utils': 5.44.0(eslint@8.39.0)(typescript@4.9.3)
+ eslint: 8.39.0
jest: 27.5.1
transitivePeerDependencies:
- supports-color
@@ -10201,13 +9807,13 @@ packages:
eslint: 7.32.0
eslint-plugin-es: 3.0.1(eslint@7.32.0)
eslint-utils: 2.1.0
- ignore: 5.2.0
+ ignore: 5.2.4
minimatch: 3.1.2
- resolve: 1.22.1
+ resolve: 1.22.2
semver: 6.3.0
dev: true
- /eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.5.0)(eslint@7.32.0)(prettier@2.8.0):
+ /eslint-plugin-prettier@3.4.1(eslint-config-prettier@8.8.0)(eslint@7.32.0)(prettier@2.8.8):
resolution: {integrity: sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==}
engines: {node: '>=6.0.0'}
peerDependencies:
@@ -10219,8 +9825,8 @@ packages:
optional: true
dependencies:
eslint: 7.32.0
- eslint-config-prettier: 8.5.0(eslint@7.32.0)
- prettier: 2.8.0
+ eslint-config-prettier: 8.8.0(eslint@7.32.0)
+ prettier: 2.8.8
prettier-linter-helpers: 1.0.0
dev: true
@@ -10233,18 +9839,21 @@ packages:
eslint: 7.32.0
dev: true
- /eslint-plugin-simple-import-sort@10.0.0:
+ /eslint-plugin-simple-import-sort@10.0.0(eslint@8.39.0):
resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==}
peerDependencies:
eslint: '>=5.0.0'
+ dependencies:
+ eslint: 8.39.0
dev: true
- /eslint-plugin-svelte3@4.0.0(svelte@3.53.1):
+ /eslint-plugin-svelte3@4.0.0(eslint@8.39.0)(svelte@3.53.1):
resolution: {integrity: sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==}
peerDependencies:
eslint: '>=8.0.0'
svelte: ^3.2.0
dependencies:
+ eslint: 8.39.0
svelte: 3.53.1
dev: true
@@ -10256,6 +9865,14 @@ packages:
estraverse: 4.3.0
dev: true
+ /eslint-scope@7.2.0:
+ resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ esrecurse: 4.3.0
+ estraverse: 5.3.0
+ dev: true
+
/eslint-utils@2.1.0:
resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==}
engines: {node: '>=6'}
@@ -10263,22 +9880,23 @@ packages:
eslint-visitor-keys: 1.3.0
dev: true
- /eslint-utils@3.0.0:
+ /eslint-utils@3.0.0(eslint@7.32.0):
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
+ eslint: 7.32.0
eslint-visitor-keys: 2.1.0
dev: true
- /eslint-utils@3.0.0(eslint@7.32.0):
+ /eslint-utils@3.0.0(eslint@8.39.0):
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
- eslint: 7.32.0
+ eslint: 8.39.0
eslint-visitor-keys: 2.1.0
dev: true
@@ -10297,6 +9915,11 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /eslint-visitor-keys@3.4.0:
+ resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dev: true
+
/eslint@7.32.0:
resolution: {integrity: sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==}
engines: {node: ^10.12.0 || >=12.0.0}
@@ -10308,40 +9931,89 @@ packages:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
+ doctrine: 3.0.0
+ enquirer: 2.3.6
+ escape-string-regexp: 4.0.0
+ eslint-scope: 5.1.1
+ eslint-utils: 2.1.0
+ eslint-visitor-keys: 2.1.0
+ espree: 7.3.1
+ esquery: 1.5.0
+ esutils: 2.0.3
+ fast-deep-equal: 3.1.3
+ file-entry-cache: 6.0.1
+ functional-red-black-tree: 1.0.1
+ glob-parent: 5.1.2
+ globals: 13.20.0
+ ignore: 4.0.6
+ import-fresh: 3.3.0
+ imurmurhash: 0.1.4
+ is-glob: 4.0.3
+ js-yaml: 3.14.1
+ json-stable-stringify-without-jsonify: 1.0.1
+ levn: 0.4.1
+ lodash.merge: 4.6.2
+ minimatch: 3.1.2
+ natural-compare: 1.4.0
+ optionator: 0.9.1
+ progress: 2.0.3
+ regexpp: 3.2.0
+ semver: 7.5.0
+ strip-ansi: 6.0.1
+ strip-json-comments: 3.1.1
+ table: 6.8.1
+ text-table: 0.2.0
+ v8-compile-cache: 2.3.0
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /eslint@8.39.0:
+ resolution: {integrity: sha512-mwiok6cy7KTW7rBpo05k6+p4YVZByLNjAZ/ACB9DRCu4YDRwjXI01tWHp6KAUWelsBetTxKK/2sHB0vdS8Z2Og==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ hasBin: true
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.39.0)
+ '@eslint-community/regexpp': 4.5.0
+ '@eslint/eslintrc': 2.0.2
+ '@eslint/js': 8.39.0
+ '@humanwhocodes/config-array': 0.11.8
+ '@humanwhocodes/module-importer': 1.0.1
+ '@nodelib/fs.walk': 1.2.8
+ ajv: 6.12.6
+ chalk: 4.1.2
+ cross-spawn: 7.0.3
+ debug: 4.3.4(supports-color@9.3.1)
doctrine: 3.0.0
- enquirer: 2.3.6
escape-string-regexp: 4.0.0
- eslint-scope: 5.1.1
- eslint-utils: 2.1.0
- eslint-visitor-keys: 2.1.0
- espree: 7.3.1
- esquery: 1.4.0
+ eslint-scope: 7.2.0
+ eslint-visitor-keys: 3.4.0
+ espree: 9.5.1
+ esquery: 1.5.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
- functional-red-black-tree: 1.0.1
- glob-parent: 5.1.2
- globals: 13.18.0
- ignore: 4.0.6
+ find-up: 5.0.0
+ glob-parent: 6.0.2
+ globals: 13.20.0
+ grapheme-splitter: 1.0.4
+ ignore: 5.2.4
import-fresh: 3.3.0
imurmurhash: 0.1.4
is-glob: 4.0.3
- js-yaml: 3.14.1
+ is-path-inside: 3.0.3
+ js-sdsl: 4.4.0
+ js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.1
- progress: 2.0.3
- regexpp: 3.2.0
- semver: 7.3.8
strip-ansi: 6.0.1
strip-json-comments: 3.1.1
- table: 6.8.1
text-table: 0.2.0
- v8-compile-cache: 2.3.0
transitivePeerDependencies:
- supports-color
dev: true
@@ -10355,6 +10027,15 @@ packages:
eslint-visitor-keys: 1.3.0
dev: true
+ /espree@9.5.1:
+ resolution: {integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ acorn: 8.8.2
+ acorn-jsx: 5.3.2(acorn@8.8.2)
+ eslint-visitor-keys: 3.4.0
+ dev: true
+
/esprima@2.7.3:
resolution: {integrity: sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==}
engines: {node: '>=0.10.0'}
@@ -10366,8 +10047,8 @@ packages:
engines: {node: '>=4'}
hasBin: true
- /esquery@1.4.0:
- resolution: {integrity: sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==}
+ /esquery@1.5.0:
+ resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==}
engines: {node: '>=0.10'}
dependencies:
estraverse: 5.3.0
@@ -10468,29 +10149,15 @@ packages:
ethjs-util: 0.1.6
json-rpc-engine: 3.8.0
pify: 2.3.0
- tape: 4.16.1
+ tape: 4.16.2
transitivePeerDependencies:
- supports-color
dev: true
- /eth-block-tracker@4.4.3:
- resolution: {integrity: sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==}
- dependencies:
- '@babel/plugin-transform-runtime': 7.19.6
- '@babel/runtime': 7.20.13
- eth-query: 2.1.2
- json-rpc-random-id: 1.0.1
- pify: 3.0.0
- safe-event-emitter: 1.0.1
- transitivePeerDependencies:
- - '@babel/core'
- - supports-color
- dev: false
-
- /eth-block-tracker@4.4.3(@babel/core@7.20.2):
+ /eth-block-tracker@4.4.3(@babel/core@7.21.4):
resolution: {integrity: sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==}
dependencies:
- '@babel/plugin-transform-runtime': 7.19.6(@babel/core@7.20.2)
+ '@babel/plugin-transform-runtime': 7.19.6(@babel/core@7.21.4)
'@babel/runtime': 7.20.13
eth-query: 2.1.2
json-rpc-random-id: 1.0.1
@@ -10520,7 +10187,7 @@ packages:
'@solidity-parser/parser': 0.14.5
cli-table3: 0.5.1
colors: 1.4.0
- ethereum-cryptography: 1.1.2
+ ethereum-cryptography: 1.2.0
ethers: 4.0.49
fs-readdir-recursive: 1.1.0
lodash: 4.17.21
@@ -10561,7 +10228,7 @@ packages:
/eth-json-rpc-middleware@1.6.0:
resolution: {integrity: sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q==}
dependencies:
- async: 2.6.4
+ async: 2.6.2
eth-query: 2.1.2
eth-tx-summary: 3.2.4
ethereumjs-block: 1.7.1
@@ -10573,7 +10240,7 @@ packages:
json-rpc-error: 2.0.0
json-stable-stringify: 1.0.2
promise-to-callback: 1.0.0
- tape: 4.16.1
+ tape: 4.16.2
transitivePeerDependencies:
- supports-color
dev: true
@@ -10661,7 +10328,7 @@ packages:
/eth-tx-summary@3.2.4:
resolution: {integrity: sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg==}
dependencies:
- async: 2.6.4
+ async: 2.6.2
clone: 2.1.2
concat-stream: 1.6.2
end-of-stream: 1.4.4
@@ -10677,7 +10344,7 @@ packages:
resolution: {integrity: sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw==}
deprecated: 'New package name format for new versions: @ethereumjs/ethash. Please update.'
dependencies:
- async: 2.6.4
+ async: 2.6.2
buffer-xor: 2.0.2
ethereumjs-util: 7.1.5
miller-rabin: 4.0.1
@@ -10716,22 +10383,22 @@ packages:
secp256k1: 4.0.3
setimmediate: 1.0.5
- /ethereum-cryptography@1.1.2:
- resolution: {integrity: sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ==}
+ /ethereum-cryptography@1.2.0:
+ resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==}
dependencies:
- '@noble/hashes': 1.1.2
- '@noble/secp256k1': 1.6.3
- '@scure/bip32': 1.1.0
- '@scure/bip39': 1.1.0
+ '@noble/hashes': 1.2.0
+ '@noble/secp256k1': 1.7.1
+ '@scure/bip32': 1.1.5
+ '@scure/bip39': 1.1.1
dev: true
- /ethereum-waffle@3.4.4(typescript@4.9.3):
+ /ethereum-waffle@3.4.4(typescript@4.9.5):
resolution: {integrity: sha512-PA9+jCjw4WC3Oc5ocSMBj5sXvueWQeAbvCA+hUlb6oFgwwKyq5ka3bWQ7QZcjzIX+TdFkxP4IbFmoY2D8Dkj9Q==}
engines: {node: '>=10.0'}
hasBin: true
dependencies:
'@ethereum-waffle/chai': 3.4.4
- '@ethereum-waffle/compiler': 3.4.4(typescript@4.9.3)
+ '@ethereum-waffle/compiler': 3.4.4(typescript@4.9.5)
'@ethereum-waffle/mock-contract': 3.4.4
'@ethereum-waffle/provider': 3.4.4
ethers: 5.7.2
@@ -10778,7 +10445,7 @@ packages:
resolution: {integrity: sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==}
deprecated: 'New package name format for new versions: @ethereumjs/block. Please update.'
dependencies:
- async: 2.6.4
+ async: 2.6.2
ethereum-common: 0.2.0
ethereumjs-tx: 1.3.7
ethereumjs-util: 5.2.1
@@ -10789,7 +10456,7 @@ packages:
resolution: {integrity: sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==}
deprecated: 'New package name format for new versions: @ethereumjs/block. Please update.'
dependencies:
- async: 2.6.4
+ async: 2.6.2
ethereumjs-common: 1.5.0
ethereumjs-tx: 2.1.2
ethereumjs-util: 5.2.1
@@ -10800,7 +10467,7 @@ packages:
resolution: {integrity: sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ==}
deprecated: 'New package name format for new versions: @ethereumjs/blockchain. Please update.'
dependencies:
- async: 2.6.4
+ async: 2.6.2
ethashjs: 0.0.8
ethereumjs-block: 2.2.2
ethereumjs-common: 1.5.0
@@ -10880,7 +10547,7 @@ packages:
resolution: {integrity: sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==}
deprecated: 'New package name format for new versions: @ethereumjs/vm. Please update.'
dependencies:
- async: 2.6.4
+ async: 2.6.2
async-eventemitter: 0.2.4
ethereumjs-account: 2.0.5
ethereumjs-block: 2.2.2
@@ -10897,9 +10564,9 @@ packages:
resolution: {integrity: sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA==}
deprecated: 'New package name format for new versions: @ethereumjs/vm. Please update.'
dependencies:
- async: 2.6.4
+ async: 2.6.2
async-eventemitter: 0.2.4
- core-js-pure: 3.26.1
+ core-js-pure: 3.30.1
ethereumjs-account: 3.0.0
ethereumjs-block: 2.2.2
ethereumjs-blockchain: 4.0.4
@@ -10911,7 +10578,7 @@ packages:
merkle-patricia-tree: 2.3.2
rustbn.js: 0.2.0
safe-buffer: 5.2.1
- util.promisify: 1.1.1
+ util.promisify: 1.1.2
dev: true
/ethereumjs-wallet@0.6.5:
@@ -11098,7 +10765,7 @@ packages:
array-flatten: 1.1.1
body-parser: 1.20.1
content-disposition: 0.5.4
- content-type: 1.0.4
+ content-type: 1.0.5
cookie: 0.5.0
cookie-signature: 1.0.6
debug: 2.6.9
@@ -11377,16 +11044,6 @@ packages:
resolution: {integrity: sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==}
dev: false
- /follow-redirects@1.15.2:
- resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
- engines: {node: '>=4.0'}
- peerDependencies:
- debug: '*'
- peerDependenciesMeta:
- debug:
- optional: true
- dev: false
-
/follow-redirects@1.15.2(debug@4.3.4):
resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
engines: {node: '>=4.0'}
@@ -11396,7 +11053,7 @@ packages:
debug:
optional: true
dependencies:
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
/for-each@0.3.3:
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
@@ -11486,7 +11143,7 @@ packages:
/fs-extra@0.30.0:
resolution: {integrity: sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
jsonfile: 2.4.0
klaw: 1.3.1
path-is-absolute: 1.0.1
@@ -11505,7 +11162,7 @@ packages:
/fs-extra@4.0.3:
resolution: {integrity: sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
jsonfile: 4.0.0
universalify: 0.1.2
dev: true
@@ -11514,7 +11171,7 @@ packages:
resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==}
engines: {node: '>=6 <7 || >=8'}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
jsonfile: 4.0.0
universalify: 0.1.2
dev: true
@@ -11523,7 +11180,7 @@ packages:
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
engines: {node: '>=6 <7 || >=8'}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
jsonfile: 4.0.0
universalify: 0.1.2
dev: true
@@ -11533,7 +11190,7 @@ packages:
engines: {node: '>=10'}
dependencies:
at-least-node: 1.0.0
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.0
dev: true
@@ -11585,8 +11242,8 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
functions-have-names: 1.2.3
dev: true
@@ -11707,6 +11364,14 @@ packages:
has: 1.0.3
has-symbols: 1.0.3
+ /get-intrinsic@1.2.0:
+ resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==}
+ dependencies:
+ function-bind: 1.1.1
+ has: 1.0.3
+ has-symbols: 1.0.3
+ dev: true
+
/get-package-type@0.1.0:
resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==}
engines: {node: '>=8.0.0'}
@@ -11758,7 +11423,7 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- get-intrinsic: 1.1.3
+ get-intrinsic: 1.2.0
dev: true
/get-value@2.0.6:
@@ -11869,7 +11534,7 @@ packages:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
- minimatch: 5.0.1
+ minimatch: 5.1.6
once: 1.4.0
dev: true
@@ -11900,8 +11565,8 @@ packages:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
- /globals@13.18.0:
- resolution: {integrity: sha512-/mR4KI8Ps2spmoc0Ulu9L7agOF0du1CZNQ3dke8yItYlyKNmGrkONemBbd6V8UTc1Wgcqn21t3WYB7dbRmh6/A==}
+ /globals@13.20.0:
+ resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
engines: {node: '>=8'}
dependencies:
type-fest: 0.20.2
@@ -11912,6 +11577,13 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /globalthis@1.0.3:
+ resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==}
+ engines: {node: '>= 0.4'}
+ dependencies:
+ define-properties: 1.2.0
+ dev: true
+
/globalyzer@0.1.0:
resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==}
dev: false
@@ -11924,7 +11596,7 @@ packages:
array-union: 2.1.0
dir-glob: 3.0.1
fast-glob: 3.2.12
- glob: 7.2.3
+ glob: 7.2.0
ignore: 5.2.4
merge2: 1.4.1
slash: 3.0.0
@@ -11959,10 +11631,9 @@ packages:
resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==}
dependencies:
get-intrinsic: 1.1.3
- dev: false
- /got@11.8.5:
- resolution: {integrity: sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==}
+ /got@11.8.6:
+ resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==}
engines: {node: '>=10.19.0'}
dependencies:
'@sindresorhus/is': 4.6.0
@@ -12002,6 +11673,14 @@ packages:
/graceful-fs@4.2.10:
resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==}
+ /graceful-fs@4.2.11:
+ resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
+ dev: true
+
+ /grapheme-splitter@1.0.4:
+ resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
+ dev: true
+
/gray-matter@4.0.3:
resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==}
engines: {node: '>=6.0'}
@@ -12049,7 +11728,7 @@ packages:
engines: {node: '>=6'}
dev: true
- /hardhat-abi-exporter@2.10.1(hardhat@2.12.2):
+ /hardhat-abi-exporter@2.10.1(hardhat@2.14.0):
resolution: {integrity: sha512-X8GRxUTtebMAd2k4fcPyVnCdPa6dYK4lBsrwzKP5yiSq4i+WadWPIumaLfce53TUf/o2TnLpLOduyO1ylE2NHQ==}
engines: {node: '>=14.14.0'}
peerDependencies:
@@ -12057,34 +11736,34 @@ packages:
dependencies:
'@ethersproject/abi': 5.7.0
delete-empty: 3.0.0
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
dev: true
- /hardhat-contract-sizer@2.8.0(hardhat@2.12.2):
+ /hardhat-contract-sizer@2.8.0(hardhat@2.14.0):
resolution: {integrity: sha512-jXt2Si3uIDx5z99J+gvKa0yvIw156pE4dpH9X/PvTQv652BUd+qGj7WT93PXnHXGh5qhQLkjDYeZMYNOThfjFg==}
peerDependencies:
hardhat: ^2.0.0
dependencies:
chalk: 4.1.2
cli-table3: 0.6.3
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
strip-ansi: 6.0.1
dev: true
- /hardhat-docgen@1.3.0(hardhat@2.12.2)(lodash@4.17.21):
+ /hardhat-docgen@1.3.0(hardhat@2.14.0)(lodash@4.17.21):
resolution: {integrity: sha512-paaiOHjJFLCLz2/qM1TQ7ZEG+Vy+LBvJL+SW4A64ZhBnVnyoZ/zv9DvEuawaWhqP5P7AOM6r22reVz4ecWgW7A==}
engines: {node: '>=14.14.0'}
peerDependencies:
hardhat: ^2.0.0
dependencies:
- css-loader: 6.7.2(webpack@5.75.0)
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
- html-webpack-plugin: 5.5.0(webpack@5.75.0)
+ css-loader: 6.7.3(webpack@5.80.0)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
+ html-webpack-plugin: 5.5.1(webpack@5.80.0)
vue: 2.7.14
- vue-loader: 15.10.1(css-loader@6.7.2)(lodash@4.17.21)(vue-template-compiler@2.7.14)(webpack@5.75.0)
+ vue-loader: 15.10.1(css-loader@6.7.3)(lodash@4.17.21)(vue-template-compiler@2.7.14)(webpack@5.80.0)
vue-router: 3.6.5(vue@2.7.14)
vue-template-compiler: 2.7.14
- webpack: 5.75.0
+ webpack: 5.80.0
transitivePeerDependencies:
- '@swc/core'
- '@vue/compiler-sfc'
@@ -12147,22 +11826,22 @@ packages:
- whiskers
dev: true
- /hardhat-gas-reporter@1.0.9(hardhat@2.12.2):
+ /hardhat-gas-reporter@1.0.9(hardhat@2.14.0):
resolution: {integrity: sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==}
peerDependencies:
hardhat: ^2.0.2
dependencies:
array-uniq: 1.0.3
eth-gas-reporter: 0.2.25
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
sha1: 1.1.1
transitivePeerDependencies:
- '@codechecks/client'
dev: true
- /hardhat@2.12.2(ts-node@10.9.1)(typescript@4.9.3):
- resolution: {integrity: sha512-f3ZhzXy1uyQv0UXnAQ8GCBOWjzv++WJNb7bnm10SsyC3dB7vlPpsMWBNhq7aoRxKrNhX9tCev81KFV3i5BTeMQ==}
- engines: {node: ^14.0.0 || ^16.0.0 || ^18.0.0}
+ /hardhat@2.14.0(ts-node@10.9.1)(typescript@4.9.5):
+ resolution: {integrity: sha512-73jsInY4zZahMSVFurSK+5TNCJTXMv+vemvGia0Ac34Mm19fYp6vEPVGF3sucbumszsYxiTT2TbS8Ii2dsDSoQ==}
+ engines: {node: '>=14.0.0'}
hasBin: true
peerDependencies:
ts-node: '*'
@@ -12175,17 +11854,17 @@ packages:
dependencies:
'@ethersproject/abi': 5.7.0
'@metamask/eth-sig-util': 4.0.1
- '@nomicfoundation/ethereumjs-block': 4.0.0
- '@nomicfoundation/ethereumjs-blockchain': 6.0.0
- '@nomicfoundation/ethereumjs-common': 3.0.0
- '@nomicfoundation/ethereumjs-evm': 1.0.0
- '@nomicfoundation/ethereumjs-rlp': 4.0.0
- '@nomicfoundation/ethereumjs-statemanager': 1.0.0
- '@nomicfoundation/ethereumjs-trie': 5.0.0
- '@nomicfoundation/ethereumjs-tx': 4.0.0
- '@nomicfoundation/ethereumjs-util': 8.0.0
- '@nomicfoundation/ethereumjs-vm': 6.0.0
- '@nomicfoundation/solidity-analyzer': 0.1.0
+ '@nomicfoundation/ethereumjs-block': 5.0.1
+ '@nomicfoundation/ethereumjs-blockchain': 7.0.1
+ '@nomicfoundation/ethereumjs-common': 4.0.1
+ '@nomicfoundation/ethereumjs-evm': 2.0.1
+ '@nomicfoundation/ethereumjs-rlp': 5.0.1
+ '@nomicfoundation/ethereumjs-statemanager': 2.0.1
+ '@nomicfoundation/ethereumjs-trie': 6.0.1
+ '@nomicfoundation/ethereumjs-tx': 5.0.1
+ '@nomicfoundation/ethereumjs-util': 9.0.1
+ '@nomicfoundation/ethereumjs-vm': 7.0.1
+ '@nomicfoundation/solidity-analyzer': 0.1.1
'@sentry/node': 5.30.0
'@types/bn.js': 5.1.1
'@types/lru-cache': 5.1.1
@@ -12196,33 +11875,33 @@ packages:
chalk: 2.4.2
chokidar: 3.5.3
ci-info: 2.0.0
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
enquirer: 2.3.6
env-paths: 2.2.1
- ethereum-cryptography: 1.1.2
+ ethereum-cryptography: 1.2.0
ethereumjs-abi: 0.6.8
find-up: 2.1.0
fp-ts: 1.19.3
fs-extra: 7.0.1
glob: 7.2.0
- immutable: 4.1.0
+ immutable: 4.3.0
io-ts: 1.10.4
- keccak: 3.0.2
+ keccak: 3.0.3
lodash: 4.17.21
mnemonist: 0.38.5
- mocha: 10.1.0
+ mocha: 10.2.0
p-map: 4.0.0
- qs: 6.11.0
- raw-body: 2.5.1
+ qs: 6.11.1
+ raw-body: 2.5.2
resolve: 1.17.0
semver: 6.3.0
solc: 0.7.3(debug@4.3.4)
source-map-support: 0.5.21
stacktrace-parser: 0.1.10
- ts-node: 10.9.1(@types/node@12.20.55)(typescript@4.9.3)
+ ts-node: 10.9.1(@types/node@12.20.55)(typescript@4.9.5)
tsort: 0.0.1
- typescript: 4.9.3
- undici: 5.12.0
+ typescript: 4.9.5
+ undici: 5.22.0
uuid: 8.3.2
ws: 7.5.9
transitivePeerDependencies:
@@ -12259,11 +11938,17 @@ packages:
/has-flag@4.0.0:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
+ dev: true
/has-property-descriptors@1.0.0:
resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==}
dependencies:
- get-intrinsic: 1.1.3
+ get-intrinsic: 1.2.0
+ dev: true
+
+ /has-proto@1.0.1:
+ resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==}
+ engines: {node: '>= 0.4'}
dev: true
/has-symbols@1.0.3:
@@ -12322,7 +12007,7 @@ packages:
engines: {node: '>=4'}
dependencies:
inherits: 2.0.4
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
safe-buffer: 5.2.1
/hash-obj@4.0.0:
@@ -12430,6 +12115,10 @@ packages:
resolution: {integrity: sha512-MzzWcnfB1e4EG2vHi3dXHoBupmuXNZzx6pY6HldVS55JKKBoq3xOyzfSaZRkJp37HIhEYC78knabHff3zc4dQQ==}
dev: true
+ /heap@0.2.7:
+ resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==}
+ dev: true
+
/hmac-drbg@1.0.1:
resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==}
dependencies:
@@ -12473,16 +12162,16 @@ packages:
hasBin: true
dependencies:
camel-case: 4.1.2
- clean-css: 5.3.1
+ clean-css: 5.3.2
commander: 8.3.0
he: 1.2.0
param-case: 3.0.4
relateurl: 0.2.7
- terser: 5.15.1
+ terser: 5.17.1
dev: true
- /html-webpack-plugin@5.5.0(webpack@5.75.0):
- resolution: {integrity: sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==}
+ /html-webpack-plugin@5.5.1(webpack@5.80.0):
+ resolution: {integrity: sha512-cTUzZ1+NqjGEKjmVgZKLMdiFg3m9MdRXkZW2OEe69WYVi5ONLMmlnSZdXzGGMOq0C8jGDrL6EWyEDDUioHO/pA==}
engines: {node: '>=10.13.0'}
peerDependencies:
webpack: ^5.20.0
@@ -12492,7 +12181,7 @@ packages:
lodash: 4.17.21
pretty-error: 4.0.0
tapable: 2.2.1
- webpack: 5.75.0
+ webpack: 5.80.0
dev: true
/htmlparser2@6.1.0:
@@ -12518,6 +12207,11 @@ packages:
resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==}
dev: true
+ /http-cache-semantics@4.1.1:
+ resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==}
+ dev: true
+ optional: true
+
/http-errors@2.0.0:
resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
engines: {node: '>= 0.8'}
@@ -12540,7 +12234,7 @@ packages:
dependencies:
'@tootallnate/once': 1.1.2
agent-base: 6.0.2
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
transitivePeerDependencies:
- supports-color
dev: true
@@ -12574,7 +12268,7 @@ packages:
engines: {node: '>= 6'}
dependencies:
agent-base: 6.0.2
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
transitivePeerDependencies:
- supports-color
dev: true
@@ -12609,13 +12303,13 @@ packages:
safer-buffer: 2.1.2
dev: true
- /icss-utils@5.1.0(postcss@8.4.21):
+ /icss-utils@5.1.0(postcss@8.4.23):
resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
- postcss: 8.4.21
+ postcss: 8.4.23
dev: true
/idb-wrapper@1.7.2:
@@ -12659,8 +12353,8 @@ packages:
resolution: {integrity: sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==}
dev: true
- /immutable@4.1.0:
- resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==}
+ /immutable@4.3.0:
+ resolution: {integrity: sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==}
dev: true
/import-cwd@2.1.0:
@@ -12737,11 +12431,11 @@ packages:
resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==}
dev: false
- /internal-slot@1.0.3:
- resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==}
+ /internal-slot@1.0.5:
+ resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
engines: {node: '>= 0.4'}
dependencies:
- get-intrinsic: 1.1.3
+ get-intrinsic: 1.2.0
has: 1.0.3
side-channel: 1.0.4
dev: true
@@ -12823,6 +12517,14 @@ packages:
call-bind: 1.0.2
has-tostringtag: 1.0.0
+ /is-array-buffer@3.0.2:
+ resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==}
+ dependencies:
+ call-bind: 1.0.2
+ get-intrinsic: 1.2.0
+ is-typed-array: 1.1.10
+ dev: true
+
/is-arrayish@0.2.1:
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
dev: true
@@ -12876,6 +12578,12 @@ packages:
dependencies:
has: 1.0.3
+ /is-core-module@2.12.0:
+ resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==}
+ dependencies:
+ has: 1.0.3
+ dev: true
+
/is-data-descriptor@0.1.4:
resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==}
engines: {node: '>=0.10.0'}
@@ -13044,6 +12752,11 @@ packages:
resolution: {integrity: sha512-GkfZZlIZtpkFrqyAXPQSRBMsaHAw+CgoKe2HXAkjd/sfoI9+hS8PT4wg2rJxdQyUKr7N2vHJbg7/jQtE5l5vBQ==}
dev: true
+ /is-path-inside@3.0.3:
+ resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==}
+ engines: {node: '>=8'}
+ dev: true
+
/is-plain-obj@1.1.0:
resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==}
engines: {node: '>=0.10.0'}
@@ -13137,7 +12850,6 @@ packages:
for-each: 0.3.3
gopd: 1.0.1
has-tostringtag: 1.0.0
- dev: false
/is-typedarray@1.0.0:
resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
@@ -13187,7 +12899,6 @@ packages:
/isarray@2.0.5:
resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
- dev: false
/isbuffer@0.0.0:
resolution: {integrity: sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==}
@@ -13251,7 +12962,7 @@ packages:
resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==}
engines: {node: '>=10'}
dependencies:
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
istanbul-lib-coverage: 3.2.0
source-map: 0.6.1
transitivePeerDependencies:
@@ -13693,7 +13404,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 18.13.0
+ '@types/node': 18.15.1
chalk: 4.1.2
ci-info: 3.6.2
graceful-fs: 4.2.10
@@ -13729,7 +13440,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
dependencies:
- '@types/node': 18.15.1
+ '@types/node': 12.20.55
merge-stream: 2.0.0
supports-color: 8.1.1
dev: true
@@ -13759,6 +13470,10 @@ packages:
resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==}
dev: true
+ /js-sdsl@4.4.0:
+ resolution: {integrity: sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==}
+ dev: true
+
/js-sha3@0.5.7:
resolution: {integrity: sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g==}
dev: true
@@ -13876,7 +13591,7 @@ packages:
/json-rpc-engine@3.8.0:
resolution: {integrity: sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==}
dependencies:
- async: 2.6.4
+ async: 2.6.2
babel-preset-env: 1.7.0
babelify: 7.3.0
json-rpc-error: 2.0.0
@@ -13939,8 +13654,8 @@ packages:
hasBin: true
dev: true
- /json5@1.0.1:
- resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==}
+ /json5@1.0.2:
+ resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==}
hasBin: true
dependencies:
minimist: 1.2.8
@@ -13950,6 +13665,12 @@ packages:
resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==}
engines: {node: '>=6'}
hasBin: true
+ dev: true
+
+ /json5@2.2.3:
+ resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==}
+ engines: {node: '>=6'}
+ hasBin: true
/jsonc-parser@3.2.0:
resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
@@ -13958,13 +13679,13 @@ packages:
/jsonfile@2.4.0:
resolution: {integrity: sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==}
optionalDependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
dev: true
/jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
optionalDependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
dev: true
/jsonfile@6.1.0:
@@ -13972,7 +13693,7 @@ packages:
dependencies:
universalify: 2.0.0
optionalDependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
dev: true
/jsonify@0.0.1:
@@ -14025,7 +13746,17 @@ packages:
dependencies:
node-addon-api: 2.0.2
node-gyp-build: 4.5.0
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
+
+ /keccak@3.0.3:
+ resolution: {integrity: sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==}
+ engines: {node: '>=10.0.0'}
+ requiresBuild: true
+ dependencies:
+ node-addon-api: 2.0.2
+ node-gyp-build: 4.6.0
+ readable-stream: 3.6.2
+ dev: true
/keyv@3.1.0:
resolution: {integrity: sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==}
@@ -14071,13 +13802,13 @@ packages:
/klaw-sync@6.0.0:
resolution: {integrity: sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
dev: true
/klaw@1.3.1:
resolution: {integrity: sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==}
optionalDependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
dev: true
/kleur@3.0.3:
@@ -14182,7 +13913,7 @@ packages:
engines: {node: '>=4'}
dependencies:
inherits: 2.0.4
- readable-stream: 2.3.7
+ readable-stream: 2.3.8
xtend: 4.0.2
dev: true
@@ -14191,7 +13922,7 @@ packages:
engines: {node: '>=6'}
dependencies:
inherits: 2.0.4
- readable-stream: 2.3.7
+ readable-stream: 2.3.8
xtend: 4.0.2
dev: true
@@ -14200,7 +13931,7 @@ packages:
engines: {node: '>=6'}
dependencies:
inherits: 2.0.4
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
xtend: 4.0.2
dev: true
@@ -14256,7 +13987,7 @@ packages:
/level-post@1.0.7:
resolution: {integrity: sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew==}
dependencies:
- ltgt: 2.2.1
+ ltgt: 2.1.3
dev: true
/level-sublevel@5.2.3:
@@ -14278,7 +14009,7 @@ packages:
ltgt: 2.1.3
pull-defer: 0.2.3
pull-level: 2.0.4
- pull-stream: 3.6.14
+ pull-stream: 3.7.0
typewiselite: 1.0.0
xtend: 4.0.2
dev: true
@@ -14315,7 +14046,7 @@ packages:
engines: {node: '>=6'}
dependencies:
inherits: 2.0.4
- readable-stream: 2.3.7
+ readable-stream: 2.3.8
xtend: 4.0.2
dev: true
@@ -14324,7 +14055,7 @@ packages:
engines: {node: '>=6'}
dependencies:
inherits: 2.0.4
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
xtend: 4.0.2
dev: true
@@ -14333,7 +14064,7 @@ packages:
engines: {node: '>=12'}
dependencies:
browser-level: 1.0.1
- classic-level: 1.2.0
+ classic-level: 1.3.0
dev: true
/levelup@0.18.6:
@@ -14427,18 +14158,18 @@ packages:
hasBin: true
dependencies:
cli-truncate: 3.1.0
- colorette: 2.0.19
- commander: 9.4.1
- debug: 4.3.4(supports-color@9.2.3)
+ colorette: 2.0.20
+ commander: 9.5.0
+ debug: 4.3.4(supports-color@9.3.1)
execa: 5.1.1
lilconfig: 2.0.5
listr2: 4.0.5
micromatch: 4.0.5
normalize-path: 3.0.0
- object-inspect: 1.12.2
+ object-inspect: 1.12.3
pidtree: 0.5.0
string-argv: 0.3.1
- supports-color: 9.2.3
+ supports-color: 9.3.1
yaml: 1.10.2
transitivePeerDependencies:
- enquirer
@@ -14467,7 +14198,7 @@ packages:
resolution: {integrity: sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==}
engines: {node: '>=0.10.0'}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
parse-json: 2.2.0
pify: 2.3.0
pinkie-promise: 2.0.1
@@ -14485,7 +14216,7 @@ packages:
dependencies:
big.js: 5.2.2
emojis-list: 3.0.0
- json5: 1.0.1
+ json5: 1.0.2
dev: true
/loader-utils@2.0.4:
@@ -14658,7 +14389,6 @@ packages:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
dependencies:
yallist: 3.1.1
- dev: true
/lru-cache@6.0.0:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
@@ -15100,7 +14830,7 @@ packages:
level-ws: 0.0.0
levelup: 1.3.9
memdown: 1.4.1
- readable-stream: 2.3.7
+ readable-stream: 2.3.8
rlp: 2.2.7
semaphore: 1.1.0
dev: true
@@ -15108,11 +14838,11 @@ packages:
/merkle-patricia-tree@3.0.0:
resolution: {integrity: sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ==}
dependencies:
- async: 2.6.4
+ async: 2.6.2
ethereumjs-util: 5.2.1
level-mem: 3.0.1
level-ws: 1.0.0
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
rlp: 2.2.7
semaphore: 1.1.0
dev: true
@@ -15124,7 +14854,7 @@ packages:
ethereumjs-util: 7.1.5
level-mem: 5.0.1
level-ws: 2.0.0
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
semaphore-async-await: 1.5.1
dev: true
@@ -15458,7 +15188,7 @@ packages:
resolution: {integrity: sha512-6Mj0yHLdUZjHnOPgr5xfWIMqMWS12zDN6iws9SLuSz76W8jTtAv24MN4/CL7gJrl5vtxGInkkqDv/JIoRsQOvA==}
dependencies:
'@types/debug': 4.1.7
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
decode-named-character-reference: 1.0.2
micromark-core-commonmark: 1.0.6
micromark-factory-space: 1.0.0
@@ -15583,6 +15313,13 @@ packages:
brace-expansion: 2.0.1
dev: true
+ /minimatch@5.1.6:
+ resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
+ engines: {node: '>=10'}
+ dependencies:
+ brace-expansion: 2.0.1
+ dev: true
+
/minimist-options@4.1.0:
resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==}
engines: {node: '>= 6'}
@@ -15592,10 +15329,6 @@ packages:
kind-of: 6.0.3
dev: true
- /minimist@1.2.7:
- resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==}
- dev: true
-
/minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
@@ -15685,7 +15418,7 @@ packages:
engines: {node: '>=4'}
deprecated: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
dependencies:
- mkdirp: 1.0.4
+ mkdirp: 3.0.0
dev: true
optional: true
@@ -15709,14 +15442,21 @@ packages:
hasBin: true
dev: true
+ /mkdirp@3.0.0:
+ resolution: {integrity: sha512-7+JDnNsyCvZXoUJdkMR0oUE2AmAdsNXGTmRbiOjYIwQ6q+bL6NwrozGQdPcmYaNcrhH37F50HHBUzoaBV6FITQ==}
+ engines: {node: '>=10'}
+ hasBin: true
+ dev: true
+ optional: true
+
/mnemonist@0.38.5:
resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==}
dependencies:
obliterator: 2.0.4
dev: true
- /mocha@10.1.0:
- resolution: {integrity: sha512-vUF7IYxEoN7XhQpFLxQAEMtE4W91acW4B6En9l97MwE9stL1A9gusXfoHZCLVHDUJ/7V5+lbCM6yMqzo5vNymg==}
+ /mocha@10.2.0:
+ resolution: {integrity: sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==}
engines: {node: '>= 14.0.0'}
hasBin: true
dependencies:
@@ -15897,6 +15637,12 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
+ /nanoid@3.3.6:
+ resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
+ hasBin: true
+ dev: true
+
/nanomatch@1.2.13:
resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==}
engines: {node: '>=0.10.0'}
@@ -15920,8 +15666,8 @@ packages:
resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==}
dev: false
- /napi-macros@2.0.0:
- resolution: {integrity: sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==}
+ /napi-macros@2.2.2:
+ resolution: {integrity: sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==}
dev: true
/natural-compare-lite@1.4.0:
@@ -16126,7 +15872,7 @@ packages:
/node-environment-flags@1.0.6:
resolution: {integrity: sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==}
dependencies:
- object.getownpropertydescriptors: 2.1.5
+ object.getownpropertydescriptors: 2.1.6
semver: 5.7.1
dev: true
@@ -16147,11 +15893,28 @@ packages:
optional: true
dependencies:
whatwg-url: 5.0.0
+ dev: false
+
+ /node-fetch@2.6.9:
+ resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==}
+ engines: {node: 4.x || >=6.0.0}
+ peerDependencies:
+ encoding: ^0.1.0
+ peerDependenciesMeta:
+ encoding:
+ optional: true
+ dependencies:
+ whatwg-url: 5.0.0
+ dev: true
/node-gyp-build@4.5.0:
resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==}
hasBin: true
+ /node-gyp-build@4.6.0:
+ resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==}
+ hasBin: true
+
/node-gyp@8.4.1:
resolution: {integrity: sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==}
engines: {node: '>= 10.12.0'}
@@ -16208,11 +15971,6 @@ packages:
- supports-color
dev: true
- /nofilter@1.0.4:
- resolution: {integrity: sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==}
- engines: {node: '>=8'}
- dev: true
-
/nofilter@3.1.0:
resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==}
engines: {node: '>=12.19'}
@@ -16356,12 +16114,16 @@ packages:
/object-inspect@1.12.2:
resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==}
+ /object-inspect@1.12.3:
+ resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==}
+ dev: true
+
/object-is@1.1.5:
resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
+ define-properties: 1.2.0
dev: true
/object-keys@0.2.0:
@@ -16393,7 +16155,7 @@ packages:
resolution: {integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==}
engines: {node: '>= 0.4'}
dependencies:
- define-properties: 1.1.4
+ define-properties: 1.2.0
function-bind: 1.1.1
has-symbols: 1.0.3
object-keys: 1.1.1
@@ -16404,19 +16166,20 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
+ define-properties: 1.2.0
has-symbols: 1.0.3
object-keys: 1.1.1
dev: true
- /object.getownpropertydescriptors@2.1.5:
- resolution: {integrity: sha512-yDNzckpM6ntyQiGTik1fKV1DcVDRS+w8bvpWNCBanvH5LfRX9O8WTHqQzG4RZwRAM4I0oU7TV11Lj5v0g20ibw==}
+ /object.getownpropertydescriptors@2.1.6:
+ resolution: {integrity: sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==}
engines: {node: '>= 0.8'}
dependencies:
array.prototype.reduce: 1.0.5
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
+ safe-array-concat: 1.0.0
dev: true
/object.pick@1.3.0:
@@ -16431,8 +16194,8 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
dev: true
/obliterator@2.0.4:
@@ -16725,8 +16488,8 @@ packages:
- supports-color
dev: true
- /patch-package@6.5.0:
- resolution: {integrity: sha512-tC3EqJmo74yKqfsMzELaFwxOAu6FH6t+FzFOsnWAuARm7/n2xB5AOeOueE221eM9gtMuIKMKpF9tBy/X2mNP0Q==}
+ /patch-package@6.5.1:
+ resolution: {integrity: sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==}
engines: {node: '>=10', npm: '>5'}
hasBin: true
dependencies:
@@ -16734,7 +16497,7 @@ packages:
chalk: 4.1.2
cross-spawn: 6.0.5
find-yarn-workspace-root: 2.0.0
- fs-extra: 7.0.1
+ fs-extra: 9.1.0
is-ci: 2.0.0
klaw-sync: 6.0.0
minimist: 1.2.8
@@ -16797,7 +16560,7 @@ packages:
resolution: {integrity: sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==}
engines: {node: '>=0.10.0'}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
pify: 2.3.0
pinkie-promise: 2.0.1
dev: true
@@ -16993,7 +16756,7 @@ packages:
ts-node:
optional: true
dependencies:
- lilconfig: 2.0.6
+ lilconfig: 2.1.0
postcss: 8.4.19
yaml: 1.10.2
dev: true
@@ -17015,20 +16778,7 @@ packages:
yaml: 1.10.2
dev: true
- /postcss-loader@6.2.1(postcss@8.4.19):
- resolution: {integrity: sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==}
- engines: {node: '>= 12.13.0'}
- peerDependencies:
- postcss: ^7.0.0 || ^8.0.1
- webpack: ^5.0.0
- dependencies:
- cosmiconfig: 7.1.0
- klona: 2.0.5
- postcss: 8.4.19
- semver: 7.3.8
- dev: true
-
- /postcss-loader@6.2.1(postcss@8.4.19)(webpack@5.75.0):
+ /postcss-loader@6.2.1(postcss@8.4.19)(webpack@5.80.0):
resolution: {integrity: sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==}
engines: {node: '>= 12.13.0'}
peerDependencies:
@@ -17039,10 +16789,10 @@ packages:
klona: 2.0.5
postcss: 8.4.19
semver: 7.3.8
- webpack: 5.75.0
+ webpack: 5.80.0
dev: true
- /postcss-loader@6.2.1(postcss@8.4.21)(webpack@5.75.0):
+ /postcss-loader@6.2.1(postcss@8.4.21)(webpack@5.80.0):
resolution: {integrity: sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==}
engines: {node: '>= 12.13.0'}
peerDependencies:
@@ -17053,48 +16803,48 @@ packages:
klona: 2.0.5
postcss: 8.4.21
semver: 7.3.8
- webpack: 5.75.0
+ webpack: 5.80.0
dev: true
- /postcss-modules-extract-imports@3.0.0(postcss@8.4.21):
+ /postcss-modules-extract-imports@3.0.0(postcss@8.4.23):
resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
- postcss: 8.4.21
+ postcss: 8.4.23
dev: true
- /postcss-modules-local-by-default@4.0.0(postcss@8.4.21):
+ /postcss-modules-local-by-default@4.0.0(postcss@8.4.23):
resolution: {integrity: sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
- icss-utils: 5.1.0(postcss@8.4.21)
- postcss: 8.4.21
+ icss-utils: 5.1.0(postcss@8.4.23)
+ postcss: 8.4.23
postcss-selector-parser: 6.0.11
postcss-value-parser: 4.2.0
dev: true
- /postcss-modules-scope@3.0.0(postcss@8.4.21):
+ /postcss-modules-scope@3.0.0(postcss@8.4.23):
resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
- postcss: 8.4.21
+ postcss: 8.4.23
postcss-selector-parser: 6.0.11
dev: true
- /postcss-modules-values@4.0.0(postcss@8.4.21):
+ /postcss-modules-values@4.0.0(postcss@8.4.23):
resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==}
engines: {node: ^10 || ^12 || >= 14}
peerDependencies:
postcss: ^8.1.0
dependencies:
- icss-utils: 5.1.0(postcss@8.4.21)
- postcss: 8.4.21
+ icss-utils: 5.1.0(postcss@8.4.23)
+ postcss: 8.4.23
dev: true
/postcss-nested@6.0.0(postcss@8.4.19):
@@ -17174,6 +16924,15 @@ packages:
source-map-js: 1.0.2
dev: true
+ /postcss@8.4.23:
+ resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==}
+ engines: {node: ^10 || ^12 || >=14}
+ dependencies:
+ nanoid: 3.3.6
+ picocolors: 1.0.0
+ source-map-js: 1.0.2
+ dev: true
+
/postinstall-postinstall@2.1.0:
resolution: {integrity: sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==}
requiresBuild: true
@@ -17234,15 +16993,15 @@ packages:
fast-diff: 1.2.0
dev: true
- /prettier-plugin-solidity@1.1.2(prettier@2.8.0):
- resolution: {integrity: sha512-KC5oNbFJfyBaFiO0kl56J6AXnDmr9tUlBV1iqo864x4KQrKYKaBZvW9jhT2oC0NHoNp7/GoMJNxqL8pp8k7C/g==}
+ /prettier-plugin-solidity@1.1.3(prettier@2.8.8):
+ resolution: {integrity: sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==}
engines: {node: '>=12'}
peerDependencies:
prettier: '>=2.3.0 || >=3.0.0-alpha.0'
dependencies:
- '@solidity-parser/parser': 0.15.0
- prettier: 2.8.0
- semver: 7.3.8
+ '@solidity-parser/parser': 0.16.0
+ prettier: 2.8.8
+ semver: 7.5.0
solidity-comments-extractor: 0.0.7
dev: true
@@ -17262,14 +17021,8 @@ packages:
hasBin: true
dev: true
- /prettier@2.8.0:
- resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==}
- engines: {node: '>=10.13.0'}
- hasBin: true
- dev: true
-
- /prettier@2.8.4:
- resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==}
+ /prettier@2.8.8:
+ resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==}
engines: {node: '>=10.13.0'}
hasBin: true
dev: true
@@ -17360,7 +17113,7 @@ packages:
/proper-lockfile@4.1.2:
resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==}
dependencies:
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
retry: 0.12.0
signal-exit: 3.0.7
dev: true
@@ -17427,7 +17180,7 @@ packages:
pull-cat: 1.1.11
pull-live: 1.0.1
pull-pushable: 2.2.0
- pull-stream: 3.6.14
+ pull-stream: 3.7.0
pull-window: 2.1.4
stream-to-pull-stream: 1.7.3
dev: true
@@ -17436,15 +17189,15 @@ packages:
resolution: {integrity: sha512-tkNz1QT5gId8aPhV5+dmwoIiA1nmfDOzJDlOOUpU5DNusj6neNd3EePybJ5+sITr2FwyCs/FVpx74YMCfc8YeA==}
dependencies:
pull-cat: 1.1.11
- pull-stream: 3.6.14
+ pull-stream: 3.7.0
dev: true
/pull-pushable@2.2.0:
resolution: {integrity: sha512-M7dp95enQ2kaHvfCt2+DJfyzgCSpWVR2h2kWYnVsW6ZpxQBx5wOu0QWOvQPVoPnBLUZYitYP2y7HyHkLQNeGXg==}
dev: true
- /pull-stream@3.6.14:
- resolution: {integrity: sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew==}
+ /pull-stream@3.7.0:
+ resolution: {integrity: sha512-Eco+/R004UaCK2qEDE8vGklcTG2OeZSVm1kTUQNrykEjDwcFXDZhygFDsW49DbXyJMEhHeRL3z5cRVqPAhXlIw==}
dev: true
/pull-window@2.1.4:
@@ -17493,6 +17246,13 @@ packages:
dependencies:
side-channel: 1.0.4
+ /qs@6.11.1:
+ resolution: {integrity: sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==}
+ engines: {node: '>=0.6'}
+ dependencies:
+ side-channel: 1.0.4
+ dev: true
+
/qs@6.5.3:
resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==}
engines: {node: '>=0.6'}
@@ -17502,7 +17262,7 @@ packages:
resolution: {integrity: sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==}
engines: {node: '>=0.10.0'}
dependencies:
- decode-uri-component: 0.2.0
+ decode-uri-component: 0.2.2
object-assign: 4.1.1
strict-uri-encode: 1.1.0
dev: true
@@ -17568,6 +17328,17 @@ packages:
iconv-lite: 0.4.24
unpipe: 1.0.0
dev: true
+ optional: true
+
+ /raw-body@2.5.2:
+ resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==}
+ engines: {node: '>= 0.8'}
+ dependencies:
+ bytes: 3.1.2
+ http-errors: 2.0.0
+ iconv-lite: 0.4.24
+ unpipe: 1.0.0
+ dev: true
/rc@1.2.8:
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
@@ -17662,13 +17433,17 @@ packages:
util-deprecate: 1.0.2
dev: true
- /readable-stream@3.6.0:
- resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==}
- engines: {node: '>= 6'}
+ /readable-stream@2.3.8:
+ resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
dependencies:
+ core-util-is: 1.0.3
inherits: 2.0.4
- string_decoder: 1.3.0
+ isarray: 1.0.0
+ process-nextick-args: 2.0.1
+ safe-buffer: 5.1.2
+ string_decoder: 1.1.1
util-deprecate: 1.0.2
+ dev: true
/readable-stream@3.6.2:
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
@@ -17677,7 +17452,6 @@ packages:
inherits: 2.0.4
string_decoder: 1.3.0
util-deprecate: 1.0.2
- dev: false
/readdirp@3.2.0:
resolution: {integrity: sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==}
@@ -17701,7 +17475,7 @@ packages:
resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==}
engines: {node: '>= 0.10'}
dependencies:
- resolve: 1.22.1
+ resolve: 1.22.2
dev: true
/recursive-readdir@2.2.3:
@@ -17759,12 +17533,12 @@ packages:
safe-regex: 1.1.0
dev: true
- /regexp.prototype.flags@1.4.3:
- resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==}
+ /regexp.prototype.flags@1.5.0:
+ resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
+ define-properties: 1.2.0
functions-have-names: 1.2.3
dev: true
@@ -18090,6 +17864,15 @@ packages:
path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0
+ /resolve@1.22.2:
+ resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
+ hasBin: true
+ dependencies:
+ is-core-module: 2.12.0
+ path-parse: 1.0.7
+ supports-preserve-symlinks-flag: 1.0.0
+ dev: true
+
/responselike@1.0.2:
resolution: {integrity: sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==}
dependencies:
@@ -18177,14 +17960,6 @@ packages:
process-es6: 0.11.6
dev: true
- /rollup-plugin-polyfill-node@0.10.2:
- resolution: {integrity: sha512-5GMywXiLiuQP6ZzED/LO/Q0HyDi2W6b8VN+Zd3oB0opIjyRs494Me2ZMaqKWDNbGiW4jvvzl6L2n4zRgxS9cSQ==}
- peerDependencies:
- rollup: ^1.20.0 || ^2.0.0
- dependencies:
- '@rollup/plugin-inject': 4.0.4
- dev: true
-
/rollup-plugin-polyfill-node@0.10.2(rollup@2.79.1):
resolution: {integrity: sha512-5GMywXiLiuQP6ZzED/LO/Q0HyDi2W6b8VN+Zd3oB0opIjyRs494Me2ZMaqKWDNbGiW4jvvzl6L2n4zRgxS9cSQ==}
peerDependencies:
@@ -18243,12 +18018,28 @@ packages:
tslib: 2.5.0
dev: true
+ /rxjs@7.8.0:
+ resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
+ dependencies:
+ tslib: 2.5.0
+ dev: true
+
/sade@1.8.1:
resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}
engines: {node: '>=6'}
dependencies:
mri: 1.2.0
+ /safe-array-concat@1.0.0:
+ resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==}
+ engines: {node: '>=0.4'}
+ dependencies:
+ call-bind: 1.0.2
+ get-intrinsic: 1.2.0
+ has-symbols: 1.0.3
+ isarray: 2.0.5
+ dev: true
+
/safe-buffer@5.1.2:
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
dev: true
@@ -18270,7 +18061,7 @@ packages:
resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==}
dependencies:
call-bind: 1.0.2
- get-intrinsic: 1.1.3
+ get-intrinsic: 1.2.0
is-regex: 1.1.4
dev: true
@@ -18337,8 +18128,8 @@ packages:
loose-envify: 1.4.0
dev: false
- /schema-utils@3.1.1:
- resolution: {integrity: sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==}
+ /schema-utils@3.1.2:
+ resolution: {integrity: sha512-pvjEHOgWc9OWA/f/DE3ohBWTD6EleVLf7iFUkoSwAxttdBhB9QUebQgxER2kWueOvRJXPHNnyrvvh9eZINB8Eg==}
engines: {node: '>= 10.13.0'}
dependencies:
'@types/json-schema': 7.0.11
@@ -18429,6 +18220,14 @@ packages:
dependencies:
lru-cache: 6.0.0
+ /semver@7.5.0:
+ resolution: {integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==}
+ engines: {node: '>=10'}
+ hasBin: true
+ dependencies:
+ lru-cache: 6.0.0
+ dev: true
+
/send@0.18.0:
resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==}
engines: {node: '>= 0.8.0'}
@@ -18457,6 +18256,12 @@ packages:
randombytes: 2.1.0
dev: true
+ /serialize-javascript@6.0.1:
+ resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==}
+ dependencies:
+ randombytes: 2.1.0
+ dev: true
+
/serve-static@1.15.0:
resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==}
engines: {node: '>= 0.8.0'}
@@ -18474,7 +18279,7 @@ packages:
resolution: {integrity: sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==}
engines: {node: '>=6'}
dependencies:
- body-parser: 1.20.1
+ body-parser: 1.20.2
cors: 2.8.5
express: 4.18.2
request: 2.88.2
@@ -18569,7 +18374,7 @@ packages:
engines: {node: '>=4'}
hasBin: true
dependencies:
- glob: 7.2.3
+ glob: 7.2.0
interpret: 1.4.0
rechoir: 0.6.2
dev: true
@@ -18705,7 +18510,7 @@ packages:
engines: {node: '>= 10'}
dependencies:
agent-base: 6.0.2
- debug: 4.3.4
+ debug: 4.3.4(supports-color@9.3.1)
socks: 2.7.1
transitivePeerDependencies:
- supports-color
@@ -18763,8 +18568,8 @@ packages:
- debug
dev: true
- /solc@0.8.17:
- resolution: {integrity: sha512-Dtidk2XtTTmkB3IKdyeg6wLYopJnBVxdoykN8oP8VY3PQjN16BScYoUJTXFm2OP7P0hXNAqWiJNmmfuELtLf8g==}
+ /solc@0.8.19:
+ resolution: {integrity: sha512-yqurS3wzC4LdEvmMobODXqprV4MYJcVtinuxgrp61ac8K2zz40vXA0eSAskSHPgv8dQo7Nux39i3QBsHx4pqyA==}
engines: {node: '>=10.0.0'}
hasBin: true
dependencies:
@@ -18779,17 +18584,17 @@ packages:
- debug
dev: false
- /solhint@3.4.0:
- resolution: {integrity: sha512-FYEs/LoTxMsWFP/OGsEqR1CBDn3Bn7hrTWsgtjai17MzxITgearIdlo374KKZjjIycu8E2xBcJ+RSWeoBvQmkw==}
+ /solhint@3.4.1:
+ resolution: {integrity: sha512-pzZn2RlZhws1XwvLPVSsxfHrwsteFf5eySOhpAytzXwKQYbTCJV6z8EevYDiSVKMpWrvbKpEtJ055CuEmzp4Xg==}
hasBin: true
dependencies:
- '@solidity-parser/parser': 0.15.0
+ '@solidity-parser/parser': 0.16.0
ajv: 6.12.6
antlr4: 4.12.0
ast-parents: 0.0.1
chalk: 4.1.2
- commander: 10.0.0
- cosmiconfig: 8.0.0
+ commander: 10.0.1
+ cosmiconfig: 8.1.3
fast-diff: 1.2.0
glob: 8.1.0
ignore: 5.2.4
@@ -18801,25 +18606,25 @@ packages:
table: 6.8.1
text-table: 0.2.0
optionalDependencies:
- prettier: 2.8.4
+ prettier: 2.8.8
dev: true
- /solidity-ast@0.4.38:
- resolution: {integrity: sha512-e7gT6g8l8M2rAzH648QA3/IihCNy/anFoWyChVD+T+zfX4FjXbT8AO2DB3wG1iEmIBib9/+vD+GvTElWWpdw+w==}
+ /solidity-ast@0.4.46:
+ resolution: {integrity: sha512-MlPZQfPhjWXqh7YxWcBGDXaPZIfMYCOHYoLEhGDWulNwEPIQQZuB7mA9eP17CU0jY/bGR4avCEUVVpvHtT2gbA==}
dev: true
/solidity-comments-extractor@0.0.7:
resolution: {integrity: sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==}
dev: true
- /solidity-docgen@0.6.0-beta.34(hardhat@2.12.2):
- resolution: {integrity: sha512-igdGrkg8gT1jn+B2NwzjEtSf+7NTrSi/jz88zO7MZWgETmcWbXaxgAsQP4BQeC4YFeH0Pie1NsLP7+9qDgvFtA==}
+ /solidity-docgen@0.6.0-beta.35(hardhat@2.14.0):
+ resolution: {integrity: sha512-9QdwK1THk/MWIdq1PEW/6dvtND0pUqpFTsbKwwU9YQIMYuRhH1lek9SsgnsGGYtdJ0VTrXXcVT30q20a8Y610A==}
peerDependencies:
hardhat: ^2.8.0
dependencies:
handlebars: 4.7.7
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
- solidity-ast: 0.4.38
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
+ solidity-ast: 0.4.46
dev: true
/sorcery@0.10.0:
@@ -18848,7 +18653,7 @@ packages:
deprecated: See https://github.com/lydell/source-map-resolve#deprecated
dependencies:
atob: 2.1.2
- decode-uri-component: 0.2.0
+ decode-uri-component: 0.2.2
resolve-url: 0.2.1
source-map-url: 0.4.1
urix: 0.1.0
@@ -19013,14 +18818,14 @@ packages:
resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==}
dependencies:
inherits: 2.0.4
- readable-stream: 3.6.0
+ readable-stream: 3.6.2
dev: false
/stream-to-pull-stream@1.7.3:
resolution: {integrity: sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg==}
dependencies:
looper: 3.0.0
- pull-stream: 3.6.14
+ pull-stream: 3.7.0
dev: true
/streamsearch@1.1.0:
@@ -19103,24 +18908,24 @@ packages:
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
dev: true
/string.prototype.trimend@1.0.6:
resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
dev: true
/string.prototype.trimstart@1.0.6:
resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
- es-abstract: 1.20.4
+ define-properties: 1.2.0
+ es-abstract: 1.21.2
dev: true
/string_decoder@0.10.31:
@@ -19303,11 +19108,11 @@ packages:
engines: {node: '>=10'}
dependencies:
has-flag: 4.0.0
+ dev: true
- /supports-color@9.2.3:
- resolution: {integrity: sha512-aszYUX/DVK/ed5rFLb/dDinVJrQjG/vmU433wtqVSD800rYsJNWxh2R3USV90aLSU+UsyQkbNeffVLzc6B6foA==}
+ /supports-color@9.3.1:
+ resolution: {integrity: sha512-knBY82pjmnIzK3NifMo3RxEIRD9E0kIzV4BKcyTZ9+9kWgLMxd4PrsTSMoFQUabgRBbF8KOLRDCyKgNV+iK44Q==}
engines: {node: '>=12'}
- dev: true
/supports-hyperlinks@2.3.0:
resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==}
@@ -19321,35 +19126,7 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'}
- /svelte-check@2.9.2(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1):
- resolution: {integrity: sha512-DRi8HhnCiqiGR2YF9ervPGvtoYrheE09cXieCTEqeTPOTJzfoa54Py8rovIBv4bH4n5HgZYIyTQ3DDLHQLl2uQ==}
- hasBin: true
- peerDependencies:
- svelte: ^3.24.0
- dependencies:
- '@jridgewell/trace-mapping': 0.3.17
- chokidar: 3.5.3
- fast-glob: 3.2.12
- import-fresh: 3.3.0
- picocolors: 1.0.0
- sade: 1.8.1
- svelte: 3.53.1
- svelte-preprocess: 4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
- typescript: 4.9.3
- transitivePeerDependencies:
- - '@babel/core'
- - coffeescript
- - less
- - node-sass
- - postcss
- - postcss-load-config
- - pug
- - sass
- - stylus
- - sugarss
- dev: true
-
- /svelte-check@2.9.2(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1):
+ /svelte-check@2.9.2(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1):
resolution: {integrity: sha512-DRi8HhnCiqiGR2YF9ervPGvtoYrheE09cXieCTEqeTPOTJzfoa54Py8rovIBv4bH4n5HgZYIyTQ3DDLHQLl2uQ==}
hasBin: true
peerDependencies:
@@ -19362,7 +19139,7 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
svelte: 3.53.1
- svelte-preprocess: 4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.3)
+ svelte-preprocess: 4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
typescript: 4.9.3
transitivePeerDependencies:
- '@babel/core'
@@ -19377,7 +19154,7 @@ packages:
- sugarss
dev: true
- /svelte-check@2.9.2(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1):
+ /svelte-check@2.9.2(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1):
resolution: {integrity: sha512-DRi8HhnCiqiGR2YF9ervPGvtoYrheE09cXieCTEqeTPOTJzfoa54Py8rovIBv4bH4n5HgZYIyTQ3DDLHQLl2uQ==}
hasBin: true
peerDependencies:
@@ -19390,7 +19167,7 @@ packages:
picocolors: 1.0.0
sade: 1.8.1
svelte: 3.53.1
- svelte-preprocess: 4.10.7(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3)
+ svelte-preprocess: 4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.3)
typescript: 4.9.3
transitivePeerDependencies:
- '@babel/core'
@@ -19469,7 +19246,7 @@ packages:
svelte-hmr: 0.14.12(svelte@3.53.1)
dev: true
- /svelte-preprocess@4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3):
+ /svelte-preprocess@4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3):
resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==}
engines: {node: '>= 9.11.2'}
requiresBuild: true
@@ -19510,7 +19287,7 @@ packages:
typescript:
optional: true
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@types/pug': 2.0.6
'@types/sass': 1.43.1
detect-indent: 6.1.0
@@ -19523,7 +19300,7 @@ packages:
typescript: 4.9.3
dev: true
- /svelte-preprocess@4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.3):
+ /svelte-preprocess@4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.3):
resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==}
engines: {node: '>= 9.11.2'}
requiresBuild: true
@@ -19564,7 +19341,7 @@ packages:
typescript:
optional: true
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@types/pug': 2.0.6
'@types/sass': 1.43.1
detect-indent: 6.1.0
@@ -19577,7 +19354,7 @@ packages:
typescript: 4.9.3
dev: true
- /svelte-preprocess@4.10.7(@babel/core@7.20.2)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.5):
+ /svelte-preprocess@4.10.7(@babel/core@7.21.4)(node-sass@7.0.3)(postcss@8.4.21)(svelte@3.53.1)(typescript@4.9.5):
resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==}
engines: {node: '>= 9.11.2'}
requiresBuild: true
@@ -19618,7 +19395,7 @@ packages:
typescript:
optional: true
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@types/pug': 2.0.6
'@types/sass': 1.43.1
detect-indent: 6.1.0
@@ -19631,59 +19408,6 @@ packages:
typescript: 4.9.5
dev: true
- /svelte-preprocess@4.10.7(node-sass@7.0.3)(postcss@8.4.19)(svelte@3.53.1)(typescript@4.9.3):
- resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==}
- engines: {node: '>= 9.11.2'}
- requiresBuild: true
- peerDependencies:
- '@babel/core': ^7.10.2
- coffeescript: ^2.5.1
- less: ^3.11.3 || ^4.0.0
- node-sass: '*'
- postcss: ^7 || ^8
- postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0
- pug: ^3.0.0
- sass: ^1.26.8
- stylus: ^0.55.0
- sugarss: ^2.0.0
- svelte: ^3.23.0
- typescript: ^3.9.5 || ^4.0.0
- peerDependenciesMeta:
- '@babel/core':
- optional: true
- coffeescript:
- optional: true
- less:
- optional: true
- node-sass:
- optional: true
- postcss:
- optional: true
- postcss-load-config:
- optional: true
- pug:
- optional: true
- sass:
- optional: true
- stylus:
- optional: true
- sugarss:
- optional: true
- typescript:
- optional: true
- dependencies:
- '@types/pug': 2.0.6
- '@types/sass': 1.43.1
- detect-indent: 6.1.0
- magic-string: 0.25.9
- node-sass: 7.0.3
- postcss: 8.4.19
- sorcery: 0.10.0
- strip-indent: 3.0.0
- svelte: 3.53.1
- typescript: 4.9.3
- dev: true
-
/svelte-spa-router@3.3.0:
resolution: {integrity: sha512-cwRNe7cxD43sCvSfEeaKiNZg3FCizGxeMcf7CPiWRP3jKXjEma3vxyyuDtPOam6nWbVxl9TNM3hlE/i87ZlqcQ==}
dependencies:
@@ -19701,7 +19425,7 @@ packages:
buffer: 5.7.1
eth-lib: 0.1.29
fs-extra: 4.0.3
- got: 11.8.5
+ got: 11.8.6
mime-types: 2.1.35
mkdirp-promise: 5.0.1
mock-fs: 4.14.0
@@ -19738,7 +19462,7 @@ packages:
resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==}
engines: {node: '>=10.0.0'}
dependencies:
- ajv: 8.11.2
+ ajv: 8.12.0
lodash.truncate: 4.4.2
slice-ansi: 4.0.0
string-width: 4.2.3
@@ -19852,8 +19576,8 @@ packages:
engines: {node: '>=6'}
dev: true
- /tape@4.16.1:
- resolution: {integrity: sha512-U4DWOikL5gBYUrlzx+J0oaRedm2vKLFbtA/+BRAXboGWpXO7bMP8ddxlq3Cse2bvXFQ0jZMOj6kk3546mvCdFg==}
+ /tape@4.16.2:
+ resolution: {integrity: sha512-TUChV+q0GxBBCEbfCYkGLkv8hDJYjMdSWdE0/Lr331sB389dsvFUHNV9ph5iQqKzt8Ss9drzcda/YeexclBFqg==}
hasBin: true
dependencies:
call-bind: 1.0.2
@@ -19866,8 +19590,8 @@ packages:
inherits: 2.0.4
is-regex: 1.1.4
minimist: 1.2.8
- object-inspect: 1.12.2
- resolve: 1.22.1
+ object-inspect: 1.12.3
+ resolve: 1.22.2
resumer: 0.0.0
string.prototype.trim: 1.2.7
through: 2.3.8
@@ -19927,8 +19651,8 @@ packages:
supports-hyperlinks: 2.3.0
dev: true
- /terser-webpack-plugin@5.3.6(webpack@5.75.0):
- resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==}
+ /terser-webpack-plugin@5.3.7(webpack@5.80.0):
+ resolution: {integrity: sha512-AfKwIktyP7Cu50xNjXF/6Qb5lBNzYaWpU6YfoX3uZicTx0zTy0stDDCsvjDapKsSDvOeWo5MEq4TmdBy2cNoHw==}
engines: {node: '>= 10.13.0'}
peerDependencies:
'@swc/core': '*'
@@ -19943,20 +19667,20 @@ packages:
uglify-js:
optional: true
dependencies:
- '@jridgewell/trace-mapping': 0.3.17
+ '@jridgewell/trace-mapping': 0.3.18
jest-worker: 27.5.1
- schema-utils: 3.1.1
- serialize-javascript: 6.0.0
- terser: 5.15.1
- webpack: 5.75.0
+ schema-utils: 3.1.2
+ serialize-javascript: 6.0.1
+ terser: 5.17.1
+ webpack: 5.80.0
dev: true
- /terser@5.15.1:
- resolution: {integrity: sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==}
+ /terser@5.17.1:
+ resolution: {integrity: sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw==}
engines: {node: '>=10'}
hasBin: true
dependencies:
- '@jridgewell/source-map': 0.3.2
+ '@jridgewell/source-map': 0.3.3
acorn: 8.8.2
commander: 2.20.3
source-map-support: 0.5.21
@@ -20010,7 +19734,7 @@ packages:
http-basic: 8.1.3
http-response-object: 3.0.2
promise: 8.3.0
- qs: 6.11.0
+ qs: 6.11.1
dev: true
/throat@6.0.1:
@@ -20020,7 +19744,7 @@ packages:
/through2@2.0.5:
resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==}
dependencies:
- readable-stream: 2.3.7
+ readable-stream: 2.3.8
xtend: 4.0.2
dev: true
@@ -20187,24 +19911,28 @@ packages:
glob: 7.2.3
dev: true
+ /true-case-path@2.2.1:
+ resolution: {integrity: sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q==}
+ dev: true
+
/ts-essentials@1.0.4:
resolution: {integrity: sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ==}
dev: true
- /ts-essentials@6.0.7(typescript@4.9.3):
+ /ts-essentials@6.0.7(typescript@4.9.5):
resolution: {integrity: sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw==}
peerDependencies:
typescript: '>=3.7.0'
dependencies:
- typescript: 4.9.3
+ typescript: 4.9.5
dev: true
- /ts-essentials@7.0.3(typescript@4.9.3):
+ /ts-essentials@7.0.3(typescript@4.9.5):
resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==}
peerDependencies:
typescript: '>=3.7.0'
dependencies:
- typescript: 4.9.3
+ typescript: 4.9.5
dev: true
/ts-generator@0.1.1:
@@ -20212,25 +19940,29 @@ packages:
hasBin: true
dependencies:
'@types/mkdirp': 0.5.2
- '@types/prettier': 2.7.1
+ '@types/prettier': 2.7.2
'@types/resolve': 0.0.8
chalk: 2.4.2
- glob: 7.2.3
+ glob: 7.2.0
mkdirp: 0.5.6
- prettier: 2.8.4
- resolve: 1.22.1
+ prettier: 2.8.8
+ resolve: 1.22.2
ts-essentials: 1.0.4
dev: true
+ /ts-interface-checker@0.1.13:
+ resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
+ dev: true
+
/ts-jest-mock-import-meta@0.12.0(ts-jest@27.1.5):
resolution: {integrity: sha512-LfuetNsQ6CDEAPekFOtMpCPRBBAgoA322IQ95eCa3x0mR++GwhZddlsmjOUhxRPLF3utbXUZpCEZiW+HP8jkiA==}
peerDependencies:
ts-jest: '>=20.0.0'
dependencies:
- ts-jest: 27.1.5(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3)
+ ts-jest: 27.1.5(@babel/core@7.21.4)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3)
dev: true
- /ts-jest@27.1.5(@babel/core@7.20.2)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3):
+ /ts-jest@27.1.5(@babel/core@7.21.4)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3):
resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
hasBin: true
@@ -20251,9 +19983,9 @@ packages:
esbuild:
optional: true
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@types/jest': 27.5.2
- babel-jest: 27.5.1(@babel/core@7.20.2)
+ babel-jest: 27.5.1(@babel/core@7.21.4)
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 27.5.1
@@ -20266,7 +19998,7 @@ packages:
yargs-parser: 20.2.4
dev: true
- /ts-jest@27.1.5(@babel/core@7.20.2)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.5):
+ /ts-jest@27.1.5(@babel/core@7.21.4)(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.5):
resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
hasBin: true
@@ -20287,9 +20019,9 @@ packages:
esbuild:
optional: true
dependencies:
- '@babel/core': 7.20.2
+ '@babel/core': 7.21.4
'@types/jest': 27.5.2
- babel-jest: 27.5.1(@babel/core@7.20.2)
+ babel-jest: 27.5.1(@babel/core@7.21.4)
bs-logger: 0.2.6
fast-json-stable-stringify: 2.1.0
jest: 27.5.1
@@ -20302,56 +20034,7 @@ packages:
yargs-parser: 20.2.4
dev: true
- /ts-jest@27.1.5(@types/jest@27.5.2)(babel-jest@27.5.1)(jest@27.5.1)(typescript@4.9.3):
- resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==}
- engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
- hasBin: true
- peerDependencies:
- '@babel/core': '>=7.0.0-beta.0 <8'
- '@types/jest': ^27.0.0
- babel-jest: '>=27.0.0 <28'
- esbuild: '*'
- jest: ^27.0.0
- typescript: '>=3.8 <5.0'
- peerDependenciesMeta:
- '@babel/core':
- optional: true
- '@types/jest':
- optional: true
- babel-jest:
- optional: true
- esbuild:
- optional: true
- dependencies:
- '@types/jest': 27.5.2
- babel-jest: 27.5.1
- bs-logger: 0.2.6
- fast-json-stable-stringify: 2.1.0
- jest: 27.5.1
- jest-util: 27.5.1
- json5: 2.2.1
- lodash.memoize: 4.1.2
- make-error: 1.3.6
- semver: 7.3.8
- typescript: 4.9.3
- yargs-parser: 20.2.4
- dev: true
-
- /ts-loader@9.4.1(typescript@4.9.3):
- resolution: {integrity: sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==}
- engines: {node: '>=12.0.0'}
- peerDependencies:
- typescript: '*'
- webpack: ^5.0.0
- dependencies:
- chalk: 4.1.2
- enhanced-resolve: 5.12.0
- micromatch: 4.0.5
- semver: 7.3.8
- typescript: 4.9.3
- dev: true
-
- /ts-loader@9.4.1(typescript@4.9.3)(webpack@5.75.0):
+ /ts-loader@9.4.1(typescript@4.9.3)(webpack@5.80.0):
resolution: {integrity: sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==}
engines: {node: '>=12.0.0'}
peerDependencies:
@@ -20363,10 +20046,10 @@ packages:
micromatch: 4.0.5
semver: 7.3.8
typescript: 4.9.3
- webpack: 5.75.0
+ webpack: 5.80.0
dev: true
- /ts-loader@9.4.1(typescript@4.9.5)(webpack@5.75.0):
+ /ts-loader@9.4.1(typescript@4.9.5)(webpack@5.80.0):
resolution: {integrity: sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==}
engines: {node: '>=12.0.0'}
peerDependencies:
@@ -20378,10 +20061,10 @@ packages:
micromatch: 4.0.5
semver: 7.3.8
typescript: 4.9.5
- webpack: 5.75.0
+ webpack: 5.80.0
dev: true
- /ts-node@10.9.1(@types/node@12.20.55)(typescript@4.9.3):
+ /ts-node@10.9.1(@types/node@12.20.55)(typescript@4.9.5):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
@@ -20401,23 +20084,23 @@ packages:
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
'@types/node': 12.20.55
- acorn: 8.8.1
+ acorn: 8.8.2
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
make-error: 1.3.6
- typescript: 4.9.3
+ typescript: 4.9.5
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
dev: true
- /tsconfig-paths@3.14.1:
- resolution: {integrity: sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==}
+ /tsconfig-paths@3.14.2:
+ resolution: {integrity: sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==}
dependencies:
'@types/json5': 0.0.29
- json5: 1.0.1
- minimist: 1.2.7
+ json5: 1.0.2
+ minimist: 1.2.8
strip-bom: 3.0.0
dev: true
@@ -20524,7 +20207,6 @@ packages:
/type-fest@1.4.0:
resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==}
engines: {node: '>=10'}
- dev: false
/type-is@1.6.18:
resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
@@ -20541,43 +20223,51 @@ packages:
/type@2.7.2:
resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==}
- /typechain@3.0.0(typescript@4.9.3):
+ /typechain@3.0.0(typescript@4.9.5):
resolution: {integrity: sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg==}
hasBin: true
dependencies:
command-line-args: 4.0.7
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
fs-extra: 7.0.1
js-sha3: 0.8.0
lodash: 4.17.21
- ts-essentials: 6.0.7(typescript@4.9.3)
+ ts-essentials: 6.0.7(typescript@4.9.5)
ts-generator: 0.1.1
transitivePeerDependencies:
- supports-color
- typescript
dev: true
- /typechain@5.2.0(typescript@4.9.3):
+ /typechain@5.2.0(typescript@4.9.5):
resolution: {integrity: sha512-0INirvQ+P+MwJOeMct+WLkUE4zov06QxC96D+i3uGFEHoiSkZN70MKDQsaj8zkL86wQwByJReI2e7fOUwECFuw==}
hasBin: true
peerDependencies:
typescript: '>=4.1.0'
dependencies:
- '@types/prettier': 2.7.1
+ '@types/prettier': 2.7.2
command-line-args: 4.0.7
- debug: 4.3.4(supports-color@8.1.1)
+ debug: 4.3.4(supports-color@9.3.1)
fs-extra: 7.0.1
- glob: 7.2.3
+ glob: 7.2.0
js-sha3: 0.8.0
lodash: 4.17.21
mkdirp: 1.0.4
- prettier: 2.8.0
- ts-essentials: 7.0.3(typescript@4.9.3)
- typescript: 4.9.3
+ prettier: 2.8.8
+ ts-essentials: 7.0.3(typescript@4.9.5)
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
+ /typed-array-length@1.0.4:
+ resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==}
+ dependencies:
+ call-bind: 1.0.2
+ for-each: 0.3.3
+ is-typed-array: 1.1.10
+ dev: true
+
/typedarray-to-buffer@1.0.4:
resolution: {integrity: sha512-vjMKrfSoUDN8/Vnqitw2FmstOfuJ73G6CrSEKnf11A6RmasVxHqfeBcnTb6RsL4pTMuV5Zsv9IiHRphMZyckUw==}
dev: true
@@ -20646,9 +20336,9 @@ packages:
dev: true
optional: true
- /undici@5.12.0:
- resolution: {integrity: sha512-zMLamCG62PGjd9HHMpo05bSLvvwWOZgGeiWlN/vlqu3+lRo3elxktVGEyLMX+IO7c2eflLjcW74AlkhEZm15mg==}
- engines: {node: '>=12.18'}
+ /undici@5.22.0:
+ resolution: {integrity: sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==}
+ engines: {node: '>=14.0'}
dependencies:
busboy: 1.6.0
dev: true
@@ -20881,12 +20571,6 @@ packages:
querystring: 0.2.0
dev: true
- /use-sync-external-store@1.2.0:
- resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==}
- peerDependencies:
- react: ^16.8.0 || ^17.0.0 || ^18.0.0
- dev: false
-
/use-sync-external-store@1.2.0(react@18.2.0):
resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==}
peerDependencies:
@@ -20905,7 +20589,7 @@ packages:
engines: {node: '>=6.14.2'}
requiresBuild: true
dependencies:
- node-gyp-build: 4.5.0
+ node-gyp-build: 4.6.0
/utf8@3.0.0:
resolution: {integrity: sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==}
@@ -20914,14 +20598,16 @@ packages:
/util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
- /util.promisify@1.1.1:
- resolution: {integrity: sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw==}
+ /util.promisify@1.1.2:
+ resolution: {integrity: sha512-PBdZ03m1kBnQ5cjjO0ZvJMJS+QsbyIcFwi4hY4U76OQsCO9JrOYjbCFgIF76ccFg9xnJo7ZHPkqyj1GqmdS7MA==}
dependencies:
call-bind: 1.0.2
- define-properties: 1.1.4
+ define-properties: 1.2.0
for-each: 0.3.3
+ has-proto: 1.0.1
has-symbols: 1.0.3
- object.getownpropertydescriptors: 2.1.5
+ object.getownpropertydescriptors: 2.1.6
+ safe-array-concat: 1.0.0
dev: true
/util@0.12.5:
@@ -21121,7 +20807,7 @@ packages:
resolution: {integrity: sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==}
dev: true
- /vue-loader@15.10.1(css-loader@6.7.2)(lodash@4.17.21)(vue-template-compiler@2.7.14)(webpack@5.75.0):
+ /vue-loader@15.10.1(css-loader@6.7.3)(lodash@4.17.21)(vue-template-compiler@2.7.14)(webpack@5.80.0):
resolution: {integrity: sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==}
peerDependencies:
'@vue/compiler-sfc': ^3.0.8
@@ -21138,13 +20824,13 @@ packages:
optional: true
dependencies:
'@vue/component-compiler-utils': 3.3.0(lodash@4.17.21)
- css-loader: 6.7.2(webpack@5.75.0)
+ css-loader: 6.7.3(webpack@5.80.0)
hash-sum: 1.0.2
loader-utils: 1.4.2
vue-hot-reload-api: 2.3.4
vue-style-loader: 4.1.3
vue-template-compiler: 2.7.14
- webpack: 5.75.0
+ webpack: 5.80.0
transitivePeerDependencies:
- arc-templates
- atpl
@@ -21231,7 +20917,7 @@ packages:
resolution: {integrity: sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==}
dependencies:
'@vue/compiler-sfc': 2.7.14
- csstype: 3.1.1
+ csstype: 3.1.2
dev: true
/w3c-hr-time@1.0.2:
@@ -21259,7 +20945,7 @@ packages:
engines: {node: '>=10.13.0'}
dependencies:
glob-to-regexp: 0.4.1
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
dev: true
/web-namespaces@2.0.1:
@@ -21342,7 +21028,7 @@ packages:
dependencies:
'@types/bn.js': 4.11.6
'@types/node': 12.20.55
- bignumber.js: 9.1.0
+ bignumber.js: 9.1.1
web3-core-helpers: 1.2.11
web3-core-method: 1.2.11
web3-core-requestmanager: 1.2.11
@@ -21479,7 +21165,7 @@ packages:
/web3-provider-engine@14.2.1:
resolution: {integrity: sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw==}
dependencies:
- async: 2.6.4
+ async: 2.6.2
backoff: 2.5.0
clone: 2.1.2
cross-fetch: 2.2.6
@@ -21493,7 +21179,7 @@ packages:
json-rpc-error: 2.0.0
json-stable-stringify: 1.0.2
promise-to-callback: 1.0.0
- readable-stream: 2.3.7
+ readable-stream: 2.3.8
request: 2.88.2
semaphore: 1.1.0
ws: 5.2.3
@@ -21566,8 +21252,8 @@ packages:
dev: true
optional: true
- /web3-utils@1.8.1:
- resolution: {integrity: sha512-LgnM9p6V7rHHUGfpMZod+NST8cRfGzJ1BTXAyNo7A9cJX9LczBfSRxJp+U/GInYe9mby40t3v22AJdlELibnsQ==}
+ /web3-utils@1.9.0:
+ resolution: {integrity: sha512-p++69rCNNfu2jM9n5+VD/g26l+qkEOQ1m6cfRQCbH8ZRrtquTmrirJMgTmyOoax5a5XRYOuws14aypCOs51pdQ==}
engines: {node: '>=8.0.0'}
dependencies:
bn.js: 5.2.1
@@ -21616,8 +21302,8 @@ packages:
engines: {node: '>=10.13.0'}
dev: true
- /webpack@5.75.0:
- resolution: {integrity: sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==}
+ /webpack@5.80.0:
+ resolution: {integrity: sha512-OIMiq37XK1rWO8mH9ssfFKZsXg4n6klTEDL7S8/HqbAOBBaiy8ABvXvz0dDCXeEF9gqwxSvVk611zFPjS8hJxA==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
@@ -21627,27 +21313,27 @@ packages:
optional: true
dependencies:
'@types/eslint-scope': 3.7.4
- '@types/estree': 0.0.51
- '@webassemblyjs/ast': 1.11.1
- '@webassemblyjs/wasm-edit': 1.11.1
- '@webassemblyjs/wasm-parser': 1.11.1
- acorn: 8.8.1
- acorn-import-assertions: 1.8.0(acorn@8.8.1)
+ '@types/estree': 1.0.1
+ '@webassemblyjs/ast': 1.11.5
+ '@webassemblyjs/wasm-edit': 1.11.5
+ '@webassemblyjs/wasm-parser': 1.11.5
+ acorn: 8.8.2
+ acorn-import-assertions: 1.8.0(acorn@8.8.2)
browserslist: 4.21.5
chrome-trace-event: 1.0.3
- enhanced-resolve: 5.12.0
- es-module-lexer: 0.9.3
+ enhanced-resolve: 5.13.0
+ es-module-lexer: 1.2.1
eslint-scope: 5.1.1
events: 3.3.0
glob-to-regexp: 0.4.1
- graceful-fs: 4.2.10
+ graceful-fs: 4.2.11
json-parse-even-better-errors: 2.3.1
loader-runner: 4.3.0
mime-types: 2.1.35
neo-async: 2.6.2
- schema-utils: 3.1.1
+ schema-utils: 3.1.2
tapable: 2.2.1
- terser-webpack-plugin: 5.3.6(webpack@5.75.0)
+ terser-webpack-plugin: 5.3.7(webpack@5.80.0)
watchpack: 2.4.0
webpack-sources: 3.2.3
transitivePeerDependencies:
@@ -21726,7 +21412,6 @@ packages:
gopd: 1.0.1
has-tostringtag: 1.0.0
is-typed-array: 1.1.10
- dev: false
/which@1.3.1:
resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==}
@@ -21925,7 +21610,7 @@ packages:
/xhr2-cookies@1.1.0:
resolution: {integrity: sha512-hjXUA6q+jl/bd8ADHcVfFsSPIf+tyLIjuO9TwJC9WI6JP2zKcS7C+p56I9kCLLsaCiNT035iYvEUUzdEFj/8+g==}
dependencies:
- cookiejar: 2.1.3
+ cookiejar: 2.1.4
dev: true
optional: true
@@ -22001,7 +21686,6 @@ packages:
/yallist@3.1.1:
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
- dev: true
/yallist@4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
@@ -22115,6 +21799,20 @@ packages:
string-width: 4.2.3
y18n: 5.0.8
yargs-parser: 21.1.1
+ dev: true
+
+ /yargs@17.7.1:
+ resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==}
+ engines: {node: '>=12'}
+ dependencies:
+ cliui: 8.0.1
+ escalade: 3.1.1
+ get-caller-file: 2.0.5
+ require-directory: 2.1.1
+ string-width: 4.2.3
+ y18n: 5.0.8
+ yargs-parser: 21.1.1
+ dev: false
/yargs@4.8.1:
resolution: {integrity: sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==}
@@ -22148,21 +21846,6 @@ packages:
resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==}
dev: false
- /zustand@4.1.4:
- resolution: {integrity: sha512-k2jVOlWo8p4R83mQ+/uyB8ILPO2PCJOf+QVjcL+1PbMCk1w5OoPYpAIxy9zd93FSfmJqoH6lGdwzzjwqJIRU5A==}
- engines: {node: '>=12.7.0'}
- peerDependencies:
- immer: '>=9.0'
- react: '>=16.8'
- peerDependenciesMeta:
- immer:
- optional: true
- react:
- optional: true
- dependencies:
- use-sync-external-store: 1.2.0
- dev: false
-
/zustand@4.1.4(react@18.2.0):
resolution: {integrity: sha512-k2jVOlWo8p4R83mQ+/uyB8ILPO2PCJOf+QVjcL+1PbMCk1w5OoPYpAIxy9zd93FSfmJqoH6lGdwzzjwqJIRU5A==}
engines: {node: '>=12.7.0'}
@@ -22191,7 +21874,7 @@ packages:
bn.js: 4.12.0
ethereumjs-util: 6.2.1
- github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5(hardhat@2.12.2):
+ github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5(hardhat@2.14.0):
resolution: {tarball: https://codeload.github.com/taikoxyz/solidity-coverage/tar.gz/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5}
id: github.com/taikoxyz/solidity-coverage/ceb49fd1f6041e4fcd26079dfb0d3b0f58c812e5
name: solidity-coverage
@@ -22210,7 +21893,7 @@ packages:
ghost-testrpc: 0.0.2
global-modules: 2.0.0
globby: 10.0.2
- hardhat: 2.12.2(ts-node@10.9.1)(typescript@4.9.3)
+ hardhat: 2.14.0(ts-node@10.9.1)(typescript@4.9.5)
jsonschema: 1.4.1
lodash: 4.17.21
mocha: 7.1.2
@@ -22218,9 +21901,9 @@ packages:
pify: 4.0.1
recursive-readdir: 2.2.3
sc-istanbul: 0.4.6
- semver: 7.3.8
+ semver: 7.5.0
shelljs: 0.8.5
- web3-utils: 1.8.1
+ web3-utils: 1.9.0
transitivePeerDependencies:
- supports-color
dev: true