From 54e61e938894d1cd534e1a300e1ac951dc14e9d0 Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 26 Aug 2022 16:56:29 +0200 Subject: [PATCH 01/20] remove ERC20token.ts and add assert in catch --- .../test/token/starkgate/behavior/ERC20.ts | 32 +- .../integration-starkgate/test/ERC20token.ts | 404 ------------------ 2 files changed, 24 insertions(+), 412 deletions(-) delete mode 100644 packages-ts/integration-starkgate/test/ERC20token.ts diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index 152933cf2..db18a923a 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -98,7 +98,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: uint256.bnToUint256(103), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } try { await t.owner.invoke(t.token, 'permissionedBurn', { @@ -106,7 +108,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: uint256.bnToUint256(189), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } }) it('should burn fail because wrong minter', async () => { @@ -185,14 +189,18 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: uint256.bnToUint256(12), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } try { await t.alice.invoke(t.token, 'transfer', { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(17), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } }) it('should transferFrom successfully', async () => { @@ -256,7 +264,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: uint256.bnToUint256(200), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } try { await t.owner.invoke(t.token, 'transferFrom', { sender: t.alice.starknetContract.address, @@ -264,7 +274,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: uint256.bnToUint256(300), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } }) it('should increase alllowance and transfer some tokens successfully', async () => { @@ -362,7 +374,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: { low: 8n, high: 10n }, }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } try { await t.owner.invoke(t.token, 'transferFrom', { sender: t.alice.starknetContract.address, @@ -370,7 +384,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { amount: uint256.bnToUint256(208), }) throw new Error('This should not pass!') - } catch (error: any) {} + } catch (error: any) { + expect(/assert_not_zero/gi.test(error.message)).to.be.true + } }) }) } diff --git a/packages-ts/integration-starkgate/test/ERC20token.ts b/packages-ts/integration-starkgate/test/ERC20token.ts deleted file mode 100644 index e0fc6c3bc..000000000 --- a/packages-ts/integration-starkgate/test/ERC20token.ts +++ /dev/null @@ -1,404 +0,0 @@ -import { starknet } from 'hardhat' -import { expect } from 'chai' -import { StarknetContract, ArgentAccount } from 'hardhat/types/runtime' -import BN from 'bn.js' -import { toBN } from 'starknet/utils/number' -import { TIMEOUT } from './constants' - -const NAME = starknet.shortStringToBigInt('Chainlink') -const SYMBOL = starknet.shortStringToBigInt('LINK') -const DECIMALS = 18 - -function uint256ToBigInt(uint256: { low: bigint; high: bigint }) { - return new BN(((BigInt(uint256.high) << BigInt(128)) + BigInt(uint256.low)).toString()) -} - -describe('ContractERC20Token', function () { - this.timeout(TIMEOUT) - let accountMinter: ArgentAccount - let accountUser1: ArgentAccount - let accountUser2: ArgentAccount - let ERC20Contract: StarknetContract - - before(async () => { - accountMinter = (await starknet.deployAccount('Argent')) as ArgentAccount - - let ERC20Factory = await starknet.getContractFactory('ERC20.cairo') - ERC20Contract = await ERC20Factory.deploy({ - name: NAME, - symbol: SYMBOL, - decimals: DECIMALS, - minter_address: accountMinter.starknetContract.address, - }) - - accountUser1 = (await starknet.deployAccount('Argent')) as ArgentAccount - - accountUser2 = (await starknet.deployAccount('Argent')) as ArgentAccount - }) - - it('should mint successfully', async () => { - /* Mint some token with the good minter and check the user's balance */ - await accountMinter.invoke(ERC20Contract, 'permissionedMint', { - recipient: accountUser1.starknetContract.address, - amount: { low: 15n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance = uint256ToBigInt(balance) - expect(sum_balance).to.deep.equal(toBN(15)) - } - - await accountMinter.invoke(ERC20Contract, 'permissionedMint', { - recipient: accountUser2.starknetContract.address, - amount: { low: 12n, high: 0n }, - }) - { - const { totalSupply: totalSupply } = await ERC20Contract.call('totalSupply', {}) - let supply = uint256ToBigInt(totalSupply) - expect(supply).to.deep.equal(toBN(27)) - - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance = uint256ToBigInt(balance) - expect(sum_balance).to.deep.equal(toBN(12)) - } - }) - - it('should burn successfully', async () => { - /* Burn some token with the good minter and check the user's balance */ - await accountMinter.invoke(ERC20Contract, 'permissionedBurn', { - account: accountUser1.starknetContract.address, - amount: { low: 3n, high: 0n }, - }) - { - const { totalSupply: totalSupply } = await ERC20Contract.call('totalSupply', {}) - let supply = uint256ToBigInt(totalSupply) - expect(supply).to.deep.equal(toBN(24)) - - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance = uint256ToBigInt(balance) - expect(sum_balance).to.deep.equal(toBN(12)) - } - - await accountMinter.invoke(ERC20Contract, 'permissionedBurn', { - account: accountUser2.starknetContract.address, - amount: { low: 10n, high: 0n }, - }) - { - const { totalSupply: totalSupply } = await ERC20Contract.call('totalSupply', {}) - let supply = uint256ToBigInt(totalSupply) - expect(supply).to.deep.equal(toBN(14)) - - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance = uint256ToBigInt(balance) - expect(sum_balance).to.deep.equal(toBN(2)) - } - }) - - it('should burn fail because amount bigger than balance', async () => { - /* Burn some token with the good minter but with an amount bigger than the balance */ - /* All test should fail */ - try { - await accountMinter.invoke(ERC20Contract, 'permissionedBurn', { - account: accountUser2.starknetContract.address, - amount: { low: 3n, high: 10n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - - try { - await accountMinter.invoke(ERC20Contract, 'permissionedBurn', { - account: accountUser1.starknetContract.address, - amount: { low: 3n, high: 13n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - }) - - it('should burn fail because wrong minter', async () => { - /* Burn some token with the wrong minter */ - /* All test should fail */ - try { - await accountUser1.invoke(ERC20Contract, 'permissionedBurn', { - account: accountUser2.starknetContract.address, - amount: { low: 3n, high: 10n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - } - - try { - await accountUser2.invoke(ERC20Contract, 'permissionedBurn', { - account: accountUser1.starknetContract.address, - amount: { low: 3n, high: 13n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - } - }) - - it('should transfer successfully', async () => { - /* Transfer some token from one user to another and check balance of both users */ - await accountMinter.invoke(ERC20Contract, 'permissionedMint', { - recipient: accountUser2.starknetContract.address, - amount: { low: 3n, high: 0n }, - }) - { - await accountUser1.invoke(ERC20Contract, 'transfer', { - recipient: accountUser2.starknetContract.address, - amount: { low: 3n, high: 0n }, - }) - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance = uint256ToBigInt(balance) - expect(sum_balance).to.deep.equal(toBN(9)) - - const { balance: balance1 } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance1) - expect(sum_balance1).to.deep.equal(toBN(8)) - } - - await accountUser2.invoke(ERC20Contract, 'transfer', { - recipient: accountUser1.starknetContract.address, - amount: { low: 4n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance) - expect(sum_balance1).to.deep.equal(toBN(4)) - - const { balance: balance1 } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance2 = uint256ToBigInt(balance1) - expect(sum_balance2).to.deep.equal(toBN(13)) - } - }) - - it('should transfer fail because amount bigger than balance', async () => { - /* Transfer some token from one user to another with amout bigger than balance */ - /* All tests should fail */ - try { - await accountUser2.invoke(ERC20Contract, 'transfer', { - recipient: accountUser1.starknetContract.address, - amount: { low: 12n, high: 0n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - try { - await accountUser1.invoke(ERC20Contract, 'transfer', { - recipient: accountUser2.starknetContract.address, - amount: { low: 17n, high: 0n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - }) - - it('should transferFrom successfully', async () => { - /* Increase balance then use transferFrom to transfer some token from one user to another and check balance of both users */ - - await accountUser2.invoke(ERC20Contract, 'increaseAllowance', { - spender: accountMinter.starknetContract.address, - added_value: { low: 7n, high: 0n }, - }) - await accountUser1.invoke(ERC20Contract, 'increaseAllowance', { - spender: accountMinter.starknetContract.address, - added_value: { low: 7n, high: 0n }, - }) - - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser1.starknetContract.address, - recipient: accountUser2.starknetContract.address, - amount: { low: 3n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance) - expect(sum_balance1).to.deep.equal(toBN(10)) - - const { balance: balance1 } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance2 = uint256ToBigInt(balance1) - expect(sum_balance2).to.deep.equal(toBN(7)) - } - - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser2.starknetContract.address, - recipient: accountUser1.starknetContract.address, - amount: { low: 4n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance) - expect(sum_balance1).to.deep.equal(toBN(14)) - - const { balance: balance1 } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance2 = uint256ToBigInt(balance1) - expect(sum_balance2).to.deep.equal(toBN(3)) - } - }) - - it('should transferFrom fail because amount bigger than allowance', async () => { - /* Use transferFrom to transfer some token from one user to another */ - /* All test should fail because amount bigger than allowance */ - try { - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser2.starknetContract.address, - recipient: accountUser1.starknetContract.address, - amount: { low: 8n, high: 10n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - try { - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser1.starknetContract.address, - recipient: accountUser2.starknetContract.address, - amount: { low: 8n, high: 20n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - }) - - it('should increase alllowance and transfer some tokens successfully', async () => { - /* Increase allowance and check if we can use transferFrom to transfer some tokens */ - await accountUser2.invoke(ERC20Contract, 'increaseAllowance', { - spender: accountMinter.starknetContract.address, - added_value: { low: 7n, high: 0n }, - }) - await accountUser1.invoke(ERC20Contract, 'increaseAllowance', { - spender: accountMinter.starknetContract.address, - added_value: { low: 7n, high: 0n }, - }) - - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser1.starknetContract.address, - recipient: accountUser2.starknetContract.address, - amount: { low: 3n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance) - expect(sum_balance1).to.deep.equal(toBN(11)) - - const { balance: balance1 } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance2 = uint256ToBigInt(balance1) - expect(sum_balance2).to.deep.equal(toBN(6)) - } - await accountUser2.invoke(ERC20Contract, 'increaseAllowance', { - spender: accountMinter.starknetContract.address, - added_value: { low: 15n, high: 0n }, - }) - await accountUser1.invoke(ERC20Contract, 'increaseAllowance', { - spender: accountMinter.starknetContract.address, - added_value: { low: 15n, high: 0n }, - }) - - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser1.starknetContract.address, - recipient: accountUser2.starknetContract.address, - amount: { low: 11n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance) - expect(sum_balance1).to.deep.equal(toBN(0)) - - const { balance: balance1 } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance2 = uint256ToBigInt(balance1) - expect(sum_balance2).to.deep.equal(toBN(17)) - } - }) - - it('should decrease alllowance and transfer successfully', async () => { - /* Decrease allowance and check if we can use transferFrom to transfer some tokens */ - await accountUser2.invoke(ERC20Contract, 'decreaseAllowance', { - spender: accountMinter.starknetContract.address, - subtracted_value: { low: 10n, high: 0n }, - }) - - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser2.starknetContract.address, - recipient: accountUser1.starknetContract.address, - amount: { low: 1n, high: 0n }, - }) - { - const { balance: balance } = await ERC20Contract.call('balanceOf', { - account: accountUser1.starknetContract.address, - }) - let sum_balance1 = uint256ToBigInt(balance) - expect(sum_balance1).to.deep.equal(toBN(1)) - - const { balance: balance2 } = await ERC20Contract.call('balanceOf', { - account: accountUser2.starknetContract.address, - }) - let sum_balance2 = uint256ToBigInt(balance2) - expect(sum_balance2).to.deep.equal(toBN(16)) - } - }) - - it('should transferFrom fail because amount bigger than allowance', async () => { - /* Increase allowance and check if we can use transferFrom to transfer some tokens */ - /* All test should fail because amount bigger than allowance */ - try { - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser2.starknetContract.address, - recipient: accountUser1.starknetContract.address, - amount: { low: 8n, high: 10n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - try { - await accountMinter.invoke(ERC20Contract, 'transferFrom', { - sender: accountUser1.starknetContract.address, - recipient: accountUser2.starknetContract.address, - amount: { low: 8n, high: 20n }, - }) - throw new Error('This should not pass!') - } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true - } - }) -}) From 2c69354d7e12b9a8e3ef95bc60a38bc0e39c9494 Mon Sep 17 00:00:00 2001 From: qperrot Date: Wed, 31 Aug 2022 16:28:03 +0200 Subject: [PATCH 02/20] test Starkgate bridge --- contracts/package.json | 3 +- .../chainlink/solidity/mocks/TestERC20.sol | 16 + .../test/bridge/artifacts-test/Proxy.json | 371 ++++++++++++++++++ contracts/test/bridge/tokenBridge.ts | 189 +++++++++ .../starkware/solidity/tokens/ERC20/ERC20.sol | 129 ++++++ .../solidity/tokens/ERC20/IERC20.sol | 28 ++ .../solidity/tokens/ERC20/IERC20Metadata.sol | 24 ++ 7 files changed, 759 insertions(+), 1 deletion(-) create mode 100644 contracts/src/chainlink/solidity/mocks/TestERC20.sol create mode 100644 contracts/test/bridge/artifacts-test/Proxy.json create mode 100644 contracts/test/bridge/tokenBridge.ts create mode 100644 contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol create mode 100644 contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol create mode 100644 contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol diff --git a/contracts/package.json b/contracts/package.json index d1040200a..10d5259b9 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -32,6 +32,7 @@ "dependencies": { "@chainlink/contracts": "^0.4.2", "@toruslabs/starkware-crypto": "^1.0.0", - "axios": "^0.24.0" + "axios": "^0.24.0", + "internals-starkgate-contracts": "^0.0.3" } } diff --git a/contracts/src/chainlink/solidity/mocks/TestERC20.sol b/contracts/src/chainlink/solidity/mocks/TestERC20.sol new file mode 100644 index 000000000..c771a3b67 --- /dev/null +++ b/contracts/src/chainlink/solidity/mocks/TestERC20.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0. +pragma solidity ^0.6.12; + +import "../../../../vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol"; + +/* + An ERC20 for testing where anyone can set the balance for everyone. +*/ +contract TestERC20 is ERC20 { + function setBalance(address account, uint256 amount) external { + _totalSupply -= _balances[account]; + require(_totalSupply <= _totalSupply + amount, "TOTAL_SUPPLY_OVERFLOW"); + _balances[account] = amount; + _totalSupply += amount; + } +} diff --git a/contracts/test/bridge/artifacts-test/Proxy.json b/contracts/test/bridge/artifacts-test/Proxy.json new file mode 100644 index 000000000..d7397937e --- /dev/null +++ b/contracts/test/bridge/artifacts-test/Proxy.json @@ -0,0 +1,371 @@ +{ + "contractName": "Proxy", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "upgradeActivationDelay", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "FinalizedImplementation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "initializer", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalize", + "type": "bool" + } + ], + "name": "ImplementationAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "initializer", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bool", + "name": "finalize", + "type": "bool" + } + ], + "name": "ImplementationRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "initializer", + "type": "bytes" + } + ], + "name": "ImplementationUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "acceptedGovernor", + "type": "address" + } + ], + "name": "LogNewGovernorAccepted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "nominatedGovernor", + "type": "address" + } + ], + "name": "LogNominatedGovernor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "LogNominationCancelled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "removedGovernor", + "type": "address" + } + ], + "name": "LogRemovedGovernor", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "PROXY_GOVERNANCE_TAG", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PROXY_VERSION", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADE_DELAY_SLOT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "finalize", + "type": "bool" + } + ], + "name": "addImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getUpgradeActivationDelay", + "outputs": [ + { + "internalType": "uint256", + "name": "delay", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "isNotFinalized", + "outputs": [ + { + "internalType": "bool", + "name": "notFinal", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxyAcceptGovernance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "proxyCancelNomination", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + } + ], + "name": "proxyIsGovernor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newGovernor", + "type": "address" + } + ], + "name": "proxyNominateNewGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "governorForRemoval", + "type": "address" + } + ], + "name": "proxyRemoveGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "removedImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "finalize", + "type": "bool" + } + ], + "name": "removeImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "finalize", + "type": "bool" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162001ba238038062001ba2833981810160405260208110156200003757600080fd5b50516200004362000055565b6200004e816200014f565b50620002a9565b60006200006162000173565b6001810154909150600160a01b900460ff1615620000c6576040805162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a454400000000000000000000000000604482015290519081900360640190fd5b60018101805460ff60a01b1916600160a01b179055620000e633620001f3565b6040805133815290517f6166272c8d3f5f579082f2827532732f97195007983bb5b83ac12c56700b01a69181900360200190a16040805133815290517fcfb473e6c03f9a29ddaf990e736fa3de5188a0bd85d684f5b6e164ebfbfff5d29181900360200190a150565b7fc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f55565b60008060405180606001604052806027815260200162001b7b602791396040518082805190602001908083835b60208310620001c15780518252601f199092019160209182019101620001a0565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092209392505050565b620001fe8162000278565b1562000244576040805162461bcd60e51b815260206004820152601060248201526f20a62922a0a22cafa3a7ab22a92727a960811b604482015290519081900360640190fd5b60006200025062000173565b6001600160a01b0390921660009081526020929092525060409020805460ff19166001179055565b6000806200028562000173565b6001600160a01b039390931660009081526020939093525050604090205460ff1690565b6118c280620002b96000396000f3fe6080604052600436106100ec5760003560e01c80636684b1d61161008a578063b449ea5d11610059578063b449ea5d1461054b578063c5ab845314610592578063e907fa3c146105a7578063f9bcdde4146105bc5761013e565b80636684b1d61461046e5780637147855d1461048357806372a44f07146105035780638757653f146105185761013e565b806356f36dbf116100c657806356f36dbf146102995780635c60da1b146103235780635cef2e86146103545780635e3a97e7146103e15761013e565b806312f16e6d146101c257806320cea94d146101f7578063439fab911461021e5761013e565b3661013e576040805162461bcd60e51b815260206004820181905260248201527f434f4e54524143545f4e4f545f45585045435445445f544f5f52454345495645604482015290519081900360640190fd5b60006101486105d1565b90506001600160a01b03811661019e576040805162461bcd60e51b815260206004820152601660248201527526a4a9a9a4a723afa4a6a82622a6a2a72a20aa24a7a760511b604482015290519081900360640190fd5b3660008037600080366000845af43d6000803e8080156101bd573d6000f35b3d6000fd5b3480156101ce57600080fd5b506101f5600480360360208110156101e557600080fd5b50356001600160a01b03166105f6565b005b34801561020357600080fd5b5061020c610602565b60408051918252519081900360200190f35b34801561022a57600080fd5b506101f56004803603602081101561024157600080fd5b810190602081018135600160201b81111561025b57600080fd5b82018360208201111561026d57600080fd5b803590602001918460018302840111600160201b8311171561028e57600080fd5b509092509050610626565b3480156102a557600080fd5b506102ae61066c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102e85781810151838201526020016102d0565b50505050905090810190601f1680156103155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032f57600080fd5b506103386105d1565b604080516001600160a01b039092168252519081900360200190f35b34801561036057600080fd5b506101f56004803603606081101561037757600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156103a157600080fd5b8201836020820111156103b357600080fd5b803590602001918460018302840111600160201b831117156103d457600080fd5b9193509150351515610688565b3480156103ed57600080fd5b506101f56004803603606081101561040457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561042e57600080fd5b82018360208201111561044057600080fd5b803590602001918460018302840111600160201b8311171561046157600080fd5b9193509150351515610846565b34801561047a57600080fd5b506101f5610a00565b6101f56004803603606081101561049957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156104c357600080fd5b8201836020820111156104d557600080fd5b803590602001918460018302840111600160201b831117156104f657600080fd5b9193509150351515610a0a565b34801561050f57600080fd5b5061020c61108d565b34801561052457600080fd5b506101f56004803603602081101561053b57600080fd5b50356001600160a01b03166110b3565b34801561055757600080fd5b5061057e6004803603602081101561056e57600080fd5b50356001600160a01b03166110bc565b604080519115158252519081900360200190f35b34801561059e57600080fd5b506102ae6110cd565b3480156105b357600080fd5b5061057e6110ee565b3480156105c857600080fd5b506101f5611114565b7f177667240aeeea7e35eabe3a35e18306f336219e1386f7710a6bf8783f761b245490565b6105ff8161111c565b50565b7fc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f81565b6040805162461bcd60e51b815260206004820152601660248201527543414e4e4f545f43414c4c5f494e495449414c495a4560501b604482015290519081900360640190fd5b6040518060600160405280602781526020016118666027913981565b61069133611269565b6106d4576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b60008484848460405160200180856001600160a01b031681526020018060200183151581526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050604051602081830303815290604052805190602001209050600060026000838152602001908152602001600020549050600081116107b3576040805162461bcd60e51b815260206004820152601b60248201527f554e4b4e4f574e5f555047524144455f494e464f524d4154494f4e0000000000604482015290519081900360640190fd5b6002600083815260200190815260200160002060009055856001600160a01b03167fe99b980b5259f200e4c1da973ff0251b6d9aaa144714c8773976ecd62b8ebe8d868686604051808060200183151581526020018281038252858582818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a2505050505050565b61084f33611269565b610892576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b6108a4846001600160a01b0316611298565b6108ec576040805162461bcd60e51b8152602060048201526014602482015273105111149154d4d7d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b60008484848460405160200180856001600160a01b031681526020018060200183151581526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050604051602081830303815290604052805190602001209050600061096861108d565b42019050806002600084815260200190815260200160002081905550856001600160a01b03167f723a7080d63c133cf338e44e00705cc1b7b2bde7e88d6218a8d62710a329ce1b868686604051808060200183151581526020018281038252858582818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a2505050505050565b610a0861129e565b565b610a1333611269565b610a56576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b610a5e6110ee565b610aaf576040805162461bcd60e51b815260206004820152601860248201527f494d504c454d454e544154494f4e5f46494e414c495a45440000000000000000604482015290519081900360640190fd5b610ab761136b565b15610afb576040805162461bcd60e51b815260206004820152600f60248201526e29aa20aa22afa4a9afa32927ad22a760891b604482015290519081900360640190fd5b60008484848460405160200180856001600160a01b031681526020018060200183151581526020018281038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060405160208183030381529060405280519060200120905060006002600083815260200190815260200160002054905060008111610bda576040805162461bcd60e51b815260206004820152601b60248201527f554e4b4e4f574e5f555047524144455f494e464f524d4154494f4e0000000000604482015290519081900360640190fd5b610bec866001600160a01b0316611298565b610c34576040805162461bcd60e51b8152602060048201526014602482015273105111149154d4d7d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b4281111580610c5357506000610c486105d1565b6001600160a01b0316145b610ca4576040805162461bcd60e51b815260206004820152601760248201527f555047524144455f4e4f545f454e41424c45445f594554000000000000000000604482015290519081900360640190fd5b610cad866114ce565b60006060876001600160a01b031663439fab9160e01b88886040516024018080602001828103825284848281815260200192508082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b03166001600160e01b0319909916989098178852915182519297909650869550935090915081905083835b60208310610d5e5780518252601f199092019160209182019101610d3f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610dbe576040519150601f19603f3d011682016040523d82523d6000602084013e610dc3565b606091505b5091509150818190610e535760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e18578181015183820152602001610e00565b50505050905090810190601f168015610e455780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060408051600481526024810182526020810180516001600160e01b03166333eeb14760e01b178152915181516001600160a01b038c169382918083835b60208310610eb05780518252601f199092019160209182019101610e91565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610f10576040519150601f19603f3d011682016040523d82523d6000602084013e610f15565b606091505b50909250905081610f6d576040805162461bcd60e51b815260206004820152601960248201527f43414c4c5f544f5f495346524f5a454e5f524556455254454400000000000000604482015290519081900360640190fd5b808060200190516020811015610f8257600080fd5b505115610fd6576040805162461bcd60e51b815260206004820152601960248201527f4e45575f494d504c454d454e544154494f4e5f46524f5a454e00000000000000604482015290519081900360640190fd5b841561101957610fe46114f2565b6040516001600160a01b038916907fc13b75a5f14b69ebdc2431a5d475b3bff371abe251b5064144306fbd9c4de35c90600090a25b876001600160a01b03167fff14288d542bc1c1d15a652cb52af735f065c0c9d70b48e454a203c260733544888860405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a25050505050505050565b7fc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f545b90565b6105ff81611518565b60006110c782611269565b92915050565b60405180604001604052806005815260200164332e302e3160d81b81525081565b7f7d433c6f837e8f93009937c466c82efbb5ba621fae36886d0cac433c5d0aa7d2541590565b610a086116be565b61112533611269565b611168576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b336001600160a01b03821614156111bd576040805162461bcd60e51b8152602060048201526014602482015273474f5645524e4f525f53454c465f52454d4f564560601b604482015290519081900360640190fd5b60006111c7611768565b90506111d282611269565b611212576040805162461bcd60e51b815260206004820152600c60248201526b2727aa2fa3a7ab22a92727a960a11b604482015290519081900360640190fd5b6001600160a01b03821660008181526020838152604091829020805460ff19169055815192835290517fd75f94825e770b8b512be8e74759e252ad00e102e38f50cce2f7c6f868a295999281900390910190a15050565b600080611274611768565b6001600160a01b039390931660009081526020939093525050604090205460ff1690565b3b151590565b60006112a8611768565b60018101549091506001600160a01b0316331461130c576040805162461bcd60e51b815260206004820152601760248201527f4f4e4c595f43414e4449444154455f474f5645524e4f52000000000000000000604482015290519081900360640190fd5b6001810154611323906001600160a01b03166117e5565b6001810180546001600160a01b03191690556040805133815290517fcfb473e6c03f9a29ddaf990e736fa3de5188a0bd85d684f5b6e164ebfbfff5d29181900360200190a150565b6000806113766105d1565b90506001600160a01b0381166113905760009150506110b0565b60408051600481526024810182526020810180516001600160e01b03166333eeb14760e01b178152915181516000936060936001600160a01b038716939092909182918083835b602083106113f65780518252601f1990920191602091820191016113d7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611456576040519150601f19603f3d011682016040523d82523d6000602084013e61145b565b606091505b50915091508181906114ae5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e18578181015183820152602001610e00565b508080602001905160208110156114c457600080fd5b5051935050505090565b7f177667240aeeea7e35eabe3a35e18306f336219e1386f7710a6bf8783f761b2455565b60017f7d433c6f837e8f93009937c466c82efbb5ba621fae36886d0cac433c5d0aa7d255565b61152133611269565b611564576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b600061156e611768565b90506001600160a01b0382166115b9576040805162461bcd60e51b815260206004820152600b60248201526a4241445f4144445245535360a81b604482015290519081900360640190fd5b6115c282611269565b15611607576040805162461bcd60e51b815260206004820152601060248201526f20a62922a0a22cafa3a7ab22a92727a960811b604482015290519081900360640190fd5b60018101546001600160a01b031615611667576040805162461bcd60e51b815260206004820152601760248201527f4f544845525f43414e4449444154455f50454e44494e47000000000000000000604482015290519081900360640190fd5b6001810180546001600160a01b0384166001600160a01b0319909116811790915560408051918252517f6166272c8d3f5f579082f2827532732f97195007983bb5b83ac12c56700b01a69181900360200190a15050565b6116c733611269565b61170a576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b6000611714611768565b60018101549091506001600160a01b0316156105ff576001810180546001600160a01b03191690556040517f7a8dc7dd7fffb43c4807438fa62729225156941e641fd877938f4edade3429f590600090a150565b600080604051806060016040528060278152602001611866602791396040518082805190602001908083835b602083106117b35780518252601f199092019160209182019101611794565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092209392505050565b6117ee81611269565b15611833576040805162461bcd60e51b815260206004820152601060248201526f20a62922a0a22cafa3a7ab22a92727a960811b604482015290519081900360640190fd5b600061183d611768565b6001600160a01b0390921660009081526020929092525060409020805460ff1916600117905556fe537461726b45782e50726f78792e323031392e476f7665726e6f7273496e666f726d6174696f6ea264697066735822122061cf4be222cad8207c0602cf45eb7846d3b5c130d64d6d5a46cbec9c93b28e9d64736f6c634300060c0033537461726b45782e50726f78792e323031392e476f7665726e6f7273496e666f726d6174696f6e" +} \ No newline at end of file diff --git a/contracts/test/bridge/tokenBridge.ts b/contracts/test/bridge/tokenBridge.ts new file mode 100644 index 000000000..8930446f8 --- /dev/null +++ b/contracts/test/bridge/tokenBridge.ts @@ -0,0 +1,189 @@ +import { TIMEOUT } from '../constants' +import { ethers, starknet, network } from 'hardhat' +import { Contract } from 'ethers' +import { uint256, number } from 'starknet' +import { StarknetContract, HttpNetworkConfig, Account } from 'hardhat/types' +import { expect } from 'chai' +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' +import { expectAddressEquality } from '../utils' +import fs from 'fs' + +describe('Test starkgate bridge with link token', function () { + this.timeout(TIMEOUT) + const networkUrl: string = (network.config as HttpNetworkConfig).url + let owner: Account + let tokenBridgeContract: StarknetContract + let linkTokenContract: StarknetContract + let deployer: SignerWithAddress + + let starkNetERC20Bridge: Contract + let mockStarknetMessaging: Contract + let proxy: Contract + let testERC20: Contract + let newStarkNetERC20Bridge: Contract + + before(async () => { + owner = await starknet.deployAccount('OpenZeppelin') + + let tokenBridgeFactory = await starknet.getContractFactory('token_bridge.cairo') + tokenBridgeContract = await tokenBridgeFactory.deploy({ + governor_address: owner.starknetContract.address, + }) + + let linkTokenFactory = await starknet.getContractFactory('link_token') + linkTokenContract = await linkTokenFactory.deploy({ owner: tokenBridgeContract.address }) + + const accounts = await ethers.getSigners() + deployer = accounts[0] + + const contractFile = fs.readFileSync( + '../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/StarknetERC20Bridge.json', + ) + const contract = await JSON.parse(contractFile.toString()) + const starkNetERC20BridgeFactory = new ethers.ContractFactory( + contract.abi, + contract.bytecode, + deployer, + ) + starkNetERC20Bridge = await starkNetERC20BridgeFactory.deploy() + await starkNetERC20Bridge.deployed() + + const mockStarknetMessagingFactory = await ethers.getContractFactory( + 'MockStarkNetMessaging', + deployer, + ) + mockStarknetMessaging = await mockStarknetMessagingFactory.deploy() + await mockStarknetMessaging.deployed() + + await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address) + + const testERC20Factory = await ethers.getContractFactory('TestERC20', deployer) + testERC20 = await testERC20Factory.deploy() + await testERC20.deployed() + + const proxyContractFile = fs.readFileSync('./test/bridge/artifacts-test/Proxy.json') + const proxyContract = await JSON.parse(proxyContractFile.toString()) + const proxyFactory = new ethers.ContractFactory( + proxyContract.abi, + proxyContract.bytecode, + deployer, + ) + proxy = await proxyFactory.deploy(0) + await proxy.deployed() + }) + + describe('Test bridge from L1 to L2', function () { + it('Test Set and Get function for L2 token address', async () => { + const new_data = ethers.utils.hexConcat([ + ethers.utils.hexZeroPad(ethers.constants.AddressZero, 32), + ethers.utils.hexZeroPad(testERC20.address, 32), + ethers.utils.hexZeroPad(mockStarknetMessaging.address, 32), + ]) + + await proxy.connect(deployer).addImplementation(starkNetERC20Bridge.address, new_data, false) + await proxy.connect(deployer).upgradeTo(starkNetERC20Bridge.address, new_data, false) + }) + + it('Should add implementation and upgrade successfully', async () => { + await owner.invoke(tokenBridgeContract, 'set_l2_token', { + l2_token_address: linkTokenContract.address, + }) + const { res: l2_address } = await tokenBridgeContract.call('get_l2_token', {}) + expectAddressEquality(l2_address.toString(), linkTokenContract.address) + }) + + it('Should wrap contract and set L2 TokenBridge successfully', async () => { + const contractFile = fs.readFileSync( + '../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/StarknetERC20Bridge.json', + ) + const contract = await JSON.parse(contractFile.toString()) + newStarkNetERC20Bridge = await ethers.getContractAt(contract.abi, proxy.address) + + const tx = await newStarkNetERC20Bridge.setL2TokenBridge(BigInt(tokenBridgeContract.address)) + await expect(tx) + .to.emit(newStarkNetERC20Bridge, 'LogSetL2TokenBridge') + .withArgs(BigInt(tokenBridgeContract.address)) + }) + + it('Test Set and Get function for L1 bridge address', async () => { + await owner.invoke(tokenBridgeContract, 'set_l1_bridge', { + l1_bridge_address: newStarkNetERC20Bridge.address, + }) + const { res: l1_address } = await tokenBridgeContract.call('get_l1_bridge', {}) + expectAddressEquality(l1_address.toString(), newStarkNetERC20Bridge.address) + }) + + it('Should setBalance to the token bridge', async () => { + await testERC20.setBalance(newStarkNetERC20Bridge.address, 1000) + const balance = await testERC20.balanceOf(newStarkNetERC20Bridge.address) + expect(balance).to.equal(1000) + + await testERC20.setBalance(deployer.address, 10) + const balance2 = await testERC20.balanceOf(deployer.address) + expect(balance2).to.equal(10) + }) + + it('Should set Max total balance', async () => { + await newStarkNetERC20Bridge.setMaxTotalBalance(100000) + const totalbalance = await newStarkNetERC20Bridge.maxTotalBalance() + expect(totalbalance).to.equal(100000) + }) + + it('Should set Max deposit', async () => { + await newStarkNetERC20Bridge.setMaxDeposit(100) + const deposit = await newStarkNetERC20Bridge.maxDeposit() + expect(deposit).to.equal(100) + }) + + it('Should deposit to the L2 contract, L1 balance should be decreased by 2', async () => { + await testERC20.approve(newStarkNetERC20Bridge.address, 2) + await newStarkNetERC20Bridge.deposit(2, owner.starknetContract.address) + + const balance = await testERC20.balanceOf(deployer.address) + expect(balance).to.equal(8) + }) + }) + describe('Test bridge from L2 to L1', function () { + it('Should flush the L1 messages so that they can be consumed by the L2.', async () => { + const flushL1Response = await starknet.devnet.flush() + const flushL1Messages = flushL1Response.consumed_messages.from_l1 + expect(flushL1Messages).to.have.a.lengthOf(1) + expect(flushL1Response.consumed_messages.from_l2).to.be.empty + + expectAddressEquality(flushL1Messages[0].args.from_address, newStarkNetERC20Bridge.address) + expectAddressEquality(flushL1Messages[0].args.to_address, tokenBridgeContract.address) + expectAddressEquality(flushL1Messages[0].address, mockStarknetMessaging.address) + + let { balance: balance } = await linkTokenContract.call('balanceOf', { + account: owner.starknetContract.address, + }) + expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(2)) + }) + + it('Should initiate withdraw and send message to L1 ', async () => { + await owner.invoke(tokenBridgeContract, 'initiate_withdraw', { + l1_recipient: BigInt(deployer.address), + amount: uint256.bnToUint256(2), + }) + let { balance: balance } = await linkTokenContract.call('balanceOf', { + account: owner.starknetContract.address, + }) + expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(0)) + + const flushL2Response = await starknet.devnet.flush() + expect(flushL2Response.consumed_messages.from_l1).to.be.empty + const flushL2Messages = flushL2Response.consumed_messages.from_l2 + + expect(flushL2Messages).to.have.a.lengthOf(1) + expectAddressEquality(flushL2Messages[0].from_address, tokenBridgeContract.address) + expectAddressEquality(flushL2Messages[0].to_address, newStarkNetERC20Bridge.address) + }) + + it('Should withdraw 2 which will consume the L2 message successfully', async () => { + await newStarkNetERC20Bridge['withdraw(uint256)'](2) + + const balance = await testERC20.balanceOf(deployer.address) + expect(balance).to.equal(10) + }) + }) +}) diff --git a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol new file mode 100644 index 000000000..70ac4f9df --- /dev/null +++ b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: Apache-2.0. +pragma solidity ^0.6.12; + +import "./IERC20.sol"; +import "./IERC20Metadata.sol"; + +abstract contract ERC20 is IERC20, IERC20Metadata { + mapping(address => uint256) internal _balances; + + mapping(address => mapping(address => uint256)) internal _allowances; + + uint256 internal _totalSupply; + string internal name_; + string internal symbol_; + uint8 internal decimals_; + + function name() external view override returns (string memory) { + return name_; + } + + function symbol() external view override returns (string memory) { + return symbol_; + } + + function decimals() external view override returns (uint8) { + return decimals_; + } + + function totalSupply() public view override returns (uint256) { + return _totalSupply; + } + + function balanceOf(address account) public view override returns (uint256) { + return _balances[account]; + } + + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(msg.sender, recipient, amount); + return true; + } + + function allowance(address owner, address spender) public view override returns (uint256) { + return _allowances[owner][spender]; + } + + function approve(address spender, uint256 value) public override returns (bool) { + _approve(msg.sender, spender, value); + return true; + } + + function transferFrom( + address sender, + address recipient, + uint256 amount + ) public virtual override returns (bool) { + _transfer(sender, recipient, amount); + uint256 sender_allowance = _allowances[sender][msg.sender]; + require(sender_allowance >= amount, "ERC20: transfer exceeds allowance"); + _approve(sender, msg.sender, sender_allowance - amount); + return true; + } + + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + uint256 spender_allowance = _allowances[msg.sender][spender]; + require(spender_allowance + addedValue >= spender_allowance, "ERC20: Overflow"); + _approve(msg.sender, spender, spender_allowance + addedValue); + return true; + } + + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + uint256 sender_allowance = _allowances[msg.sender][spender]; + require(sender_allowance >= subtractedValue, "ERC20: transfer exceeds allowance"); + _approve(msg.sender, spender, sender_allowance - subtractedValue); + return true; + } + + function _transfer( + address sender, + address recipient, + uint256 amount + ) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + uint256 sender_balance = _balances[sender]; + uint256 recipient_balance = _balances[recipient]; + require(sender_balance >= amount, "ERC20: transfer amount exceeds balance"); + require(recipient_balance + amount >= recipient_balance, "ERC20: Overflow"); + _balances[sender] -= amount; + _balances[recipient] += amount; + emit Transfer(sender, recipient, amount); + } + + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); + uint256 _total = _totalSupply; + require(_total + amount >= _total, "ERC20: Overflow"); + _totalSupply = _total + amount; + _balances[account] += amount; + emit Transfer(address(0), account, amount); + } + + function _burn(address account, uint256 value) internal { + require(account != address(0), "ERC20: burn from the zero address"); + uint256 current_balance = _balances[account]; + require(current_balance >= value, "ERC20: burn amount exceeds balance"); + _balances[account] = current_balance - value; + _totalSupply -= value; + emit Transfer(account, address(0), value); + } + + function _approve( + address owner, + address spender, + uint256 value + ) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = value; + emit Approval(owner, spender, value); + } + + function _burnFrom(address account, uint256 amount) internal { + _burn(account, amount); + uint256 current_allowance = _allowances[account][msg.sender]; + require(current_allowance >= amount, "ERC20: burn amount exceeds allowance"); + _approve(account, msg.sender, current_allowance - amount); + } +} diff --git a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol new file mode 100644 index 000000000..df2caf623 --- /dev/null +++ b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: Apache-2.0. +pragma solidity ^0.6.12; + +/** + Interface of the ERC20 standard as defined in the EIP. Does not include + the optional functions; to access them see {ERC20Detailed}. +*/ +interface IERC20 { + function totalSupply() external view returns (uint256); + + function balanceOf(address account) external view returns (uint256); + + function transfer(address recipient, uint256 amount) external returns (bool); + + function allowance(address owner, address spender) external view returns (uint256); + + function approve(address spender, uint256 amount) external returns (bool); + + function transferFrom( + address sender, + address recipient, + uint256 amount + ) external returns (bool); + + event Transfer(address indexed from, address indexed to, uint256 value); + + event Approval(address indexed owner, address indexed spender, uint256 value); +} diff --git a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol new file mode 100644 index 000000000..5f465a57e --- /dev/null +++ b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: Apache-2.0. +pragma solidity ^0.6.12; + +import "./IERC20.sol"; + +/** + Interface for the optional metadata functions from the ERC20 standard. +*/ +interface IERC20Metadata is IERC20 { + /** + Returns the name of the token. + */ + function name() external view returns (string memory); + + /** + Returns the symbol of the token. + */ + function symbol() external view returns (string memory); + + /** + Returns the decimals places of the token. + */ + function decimals() external view returns (uint8); +} From ffb2ec25727d2ea4ac9c35a548d35be26e0d3ba2 Mon Sep 17 00:00:00 2001 From: qperrot Date: Thu, 1 Sep 2022 11:12:18 +0200 Subject: [PATCH 03/20] use loadContract in test and fixe ERC20 test --- contracts/test/bridge/tokenBridge.ts | 23 ++++++++----------- .../test/token/starkgate/behavior/ERC20.ts | 16 ++++++------- contracts/test/utils.ts | 18 +++++++++++++++ 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/contracts/test/bridge/tokenBridge.ts b/contracts/test/bridge/tokenBridge.ts index 8930446f8..fecbfbc34 100644 --- a/contracts/test/bridge/tokenBridge.ts +++ b/contracts/test/bridge/tokenBridge.ts @@ -5,8 +5,7 @@ import { uint256, number } from 'starknet' import { StarknetContract, HttpNetworkConfig, Account } from 'hardhat/types' import { expect } from 'chai' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { expectAddressEquality } from '../utils' -import fs from 'fs' +import { expectAddressEquality, loadStarkgateContract, loadProxyContract } from '../utils' describe('Test starkgate bridge with link token', function () { this.timeout(TIMEOUT) @@ -25,7 +24,9 @@ describe('Test starkgate bridge with link token', function () { before(async () => { owner = await starknet.deployAccount('OpenZeppelin') - let tokenBridgeFactory = await starknet.getContractFactory('token_bridge.cairo') + let tokenBridgeFactory = await starknet.getContractFactory( + '../../node_modules/@chainlink-dev/starkgate-contracts/artifacts/token_bridge.cairo', + ) tokenBridgeContract = await tokenBridgeFactory.deploy({ governor_address: owner.starknetContract.address, }) @@ -36,10 +37,7 @@ describe('Test starkgate bridge with link token', function () { const accounts = await ethers.getSigners() deployer = accounts[0] - const contractFile = fs.readFileSync( - '../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/StarknetERC20Bridge.json', - ) - const contract = await JSON.parse(contractFile.toString()) + const contract = await loadStarkgateContract('StarknetERC20Bridge') const starkNetERC20BridgeFactory = new ethers.ContractFactory( contract.abi, contract.bytecode, @@ -61,8 +59,7 @@ describe('Test starkgate bridge with link token', function () { testERC20 = await testERC20Factory.deploy() await testERC20.deployed() - const proxyContractFile = fs.readFileSync('./test/bridge/artifacts-test/Proxy.json') - const proxyContract = await JSON.parse(proxyContractFile.toString()) + const proxyContract = loadProxyContract('Proxy') const proxyFactory = new ethers.ContractFactory( proxyContract.abi, proxyContract.bytecode, @@ -93,10 +90,7 @@ describe('Test starkgate bridge with link token', function () { }) it('Should wrap contract and set L2 TokenBridge successfully', async () => { - const contractFile = fs.readFileSync( - '../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/StarknetERC20Bridge.json', - ) - const contract = await JSON.parse(contractFile.toString()) + const contract = await loadStarkgateContract('StarknetERC20Bridge') newStarkNetERC20Bridge = await ethers.getContractAt(contract.abi, proxy.address) const tx = await newStarkNetERC20Bridge.setL2TokenBridge(BigInt(tokenBridgeContract.address)) @@ -143,6 +137,7 @@ describe('Test starkgate bridge with link token', function () { expect(balance).to.equal(8) }) }) + describe('Test bridge from L2 to L1', function () { it('Should flush the L1 messages so that they can be consumed by the L2.', async () => { const flushL1Response = await starknet.devnet.flush() @@ -160,7 +155,7 @@ describe('Test starkgate bridge with link token', function () { expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(2)) }) - it('Should initiate withdraw and send message to L1 ', async () => { + it('Should initiate withdraw and send message to L1', async () => { await owner.invoke(tokenBridgeContract, 'initiate_withdraw', { l1_recipient: BigInt(deployer.address), amount: uint256.bnToUint256(2), diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index db18a923a..795adb278 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -99,7 +99,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } try { @@ -109,7 +109,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } }) @@ -190,7 +190,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } try { await t.alice.invoke(t.token, 'transfer', { @@ -199,7 +199,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } }) @@ -265,7 +265,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -275,7 +275,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } }) @@ -375,7 +375,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -385,7 +385,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - expect(/assert_not_zero/gi.test(error.message)).to.be.true + expect(/assert/gi.test(error.message)).to.be.true } }) }) diff --git a/contracts/test/utils.ts b/contracts/test/utils.ts index 126443ac6..ad63614eb 100644 --- a/contracts/test/utils.ts +++ b/contracts/test/utils.ts @@ -1,4 +1,22 @@ import { expect } from 'chai' +import fs from 'fs' +import { json } from 'starknet' + +export const loadStarkgateContract = (name: string): any => { + return json.parse( + fs + .readFileSync( + `${__dirname}/../../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/${name}.json`, + ) + .toString('ascii'), + ) +} + +export const loadProxyContract = (name: string): any => { + return json.parse( + fs.readFileSync(`${__dirname}/bridge/artifacts-test/${name}.json`).toString('ascii'), + ) +} export const expectInvokeError = (full: string, expected: string) => { // Match transaction error From 18b80407b6eaa759767cbec0530f2da4835f3169 Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 2 Sep 2022 11:32:40 +0200 Subject: [PATCH 04/20] move test to package and use openZeppelin contracts --- .../chainlink/solidity/mocks/TestERC20.sol | 16 - .../test/bridge/artifacts-test/Proxy.json | 371 ------------------ contracts/test/bridge/tokenBridge.ts | 184 --------- .../test/token/starkgate/behavior/ERC20.ts | 10 + contracts/test/utils.ts | 18 - .../starkware/solidity/tokens/ERC20/ERC20.sol | 129 ------ .../solidity/tokens/ERC20/IERC20.sol | 28 -- .../solidity/tokens/ERC20/IERC20Metadata.sol | 24 -- .../integration-starkgate/hardhat.config.ts | 5 +- .../integration-starkgate/package.json | 5 +- .../integration-starkgate/test/tokenBridge.ts | 203 ++++++++-- .../integration-starkgate/tsconfig.json | 15 + .../integration-starkgate/utils/index.ts | 26 +- 13 files changed, 220 insertions(+), 814 deletions(-) delete mode 100644 contracts/src/chainlink/solidity/mocks/TestERC20.sol delete mode 100644 contracts/test/bridge/artifacts-test/Proxy.json delete mode 100644 contracts/test/bridge/tokenBridge.ts delete mode 100644 contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol delete mode 100644 contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol delete mode 100644 contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol create mode 100644 packages-ts/integration-starkgate/tsconfig.json diff --git a/contracts/src/chainlink/solidity/mocks/TestERC20.sol b/contracts/src/chainlink/solidity/mocks/TestERC20.sol deleted file mode 100644 index c771a3b67..000000000 --- a/contracts/src/chainlink/solidity/mocks/TestERC20.sol +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0. -pragma solidity ^0.6.12; - -import "../../../../vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol"; - -/* - An ERC20 for testing where anyone can set the balance for everyone. -*/ -contract TestERC20 is ERC20 { - function setBalance(address account, uint256 amount) external { - _totalSupply -= _balances[account]; - require(_totalSupply <= _totalSupply + amount, "TOTAL_SUPPLY_OVERFLOW"); - _balances[account] = amount; - _totalSupply += amount; - } -} diff --git a/contracts/test/bridge/artifacts-test/Proxy.json b/contracts/test/bridge/artifacts-test/Proxy.json deleted file mode 100644 index d7397937e..000000000 --- a/contracts/test/bridge/artifacts-test/Proxy.json +++ /dev/null @@ -1,371 +0,0 @@ -{ - "contractName": "Proxy", - "abi": [ - { - "inputs": [ - { - "internalType": "uint256", - "name": "upgradeActivationDelay", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "FinalizedImplementation", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "initializer", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bool", - "name": "finalize", - "type": "bool" - } - ], - "name": "ImplementationAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "initializer", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "bool", - "name": "finalize", - "type": "bool" - } - ], - "name": "ImplementationRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "initializer", - "type": "bytes" - } - ], - "name": "ImplementationUpgraded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "acceptedGovernor", - "type": "address" - } - ], - "name": "LogNewGovernorAccepted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "nominatedGovernor", - "type": "address" - } - ], - "name": "LogNominatedGovernor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "LogNominationCancelled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "removedGovernor", - "type": "address" - } - ], - "name": "LogRemovedGovernor", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [], - "name": "PROXY_GOVERNANCE_TAG", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PROXY_VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "UPGRADE_DELAY_SLOT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "finalize", - "type": "bool" - } - ], - "name": "addImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getUpgradeActivationDelay", - "outputs": [ - { - "internalType": "uint256", - "name": "delay", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "isNotFinalized", - "outputs": [ - { - "internalType": "bool", - "name": "notFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "proxyAcceptGovernance", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "proxyCancelNomination", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "user", - "type": "address" - } - ], - "name": "proxyIsGovernor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newGovernor", - "type": "address" - } - ], - "name": "proxyNominateNewGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "governorForRemoval", - "type": "address" - } - ], - "name": "proxyRemoveGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "removedImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "finalize", - "type": "bool" - } - ], - "name": "removeImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bool", - "name": "finalize", - "type": "bool" - } - ], - "name": "upgradeTo", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162001ba238038062001ba2833981810160405260208110156200003757600080fd5b50516200004362000055565b6200004e816200014f565b50620002a9565b60006200006162000173565b6001810154909150600160a01b900460ff1615620000c6576040805162461bcd60e51b815260206004820152601360248201527f414c52454144595f494e495449414c495a454400000000000000000000000000604482015290519081900360640190fd5b60018101805460ff60a01b1916600160a01b179055620000e633620001f3565b6040805133815290517f6166272c8d3f5f579082f2827532732f97195007983bb5b83ac12c56700b01a69181900360200190a16040805133815290517fcfb473e6c03f9a29ddaf990e736fa3de5188a0bd85d684f5b6e164ebfbfff5d29181900360200190a150565b7fc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f55565b60008060405180606001604052806027815260200162001b7b602791396040518082805190602001908083835b60208310620001c15780518252601f199092019160209182019101620001a0565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092209392505050565b620001fe8162000278565b1562000244576040805162461bcd60e51b815260206004820152601060248201526f20a62922a0a22cafa3a7ab22a92727a960811b604482015290519081900360640190fd5b60006200025062000173565b6001600160a01b0390921660009081526020929092525060409020805460ff19166001179055565b6000806200028562000173565b6001600160a01b039390931660009081526020939093525050604090205460ff1690565b6118c280620002b96000396000f3fe6080604052600436106100ec5760003560e01c80636684b1d61161008a578063b449ea5d11610059578063b449ea5d1461054b578063c5ab845314610592578063e907fa3c146105a7578063f9bcdde4146105bc5761013e565b80636684b1d61461046e5780637147855d1461048357806372a44f07146105035780638757653f146105185761013e565b806356f36dbf116100c657806356f36dbf146102995780635c60da1b146103235780635cef2e86146103545780635e3a97e7146103e15761013e565b806312f16e6d146101c257806320cea94d146101f7578063439fab911461021e5761013e565b3661013e576040805162461bcd60e51b815260206004820181905260248201527f434f4e54524143545f4e4f545f45585045435445445f544f5f52454345495645604482015290519081900360640190fd5b60006101486105d1565b90506001600160a01b03811661019e576040805162461bcd60e51b815260206004820152601660248201527526a4a9a9a4a723afa4a6a82622a6a2a72a20aa24a7a760511b604482015290519081900360640190fd5b3660008037600080366000845af43d6000803e8080156101bd573d6000f35b3d6000fd5b3480156101ce57600080fd5b506101f5600480360360208110156101e557600080fd5b50356001600160a01b03166105f6565b005b34801561020357600080fd5b5061020c610602565b60408051918252519081900360200190f35b34801561022a57600080fd5b506101f56004803603602081101561024157600080fd5b810190602081018135600160201b81111561025b57600080fd5b82018360208201111561026d57600080fd5b803590602001918460018302840111600160201b8311171561028e57600080fd5b509092509050610626565b3480156102a557600080fd5b506102ae61066c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102e85781810151838201526020016102d0565b50505050905090810190601f1680156103155780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032f57600080fd5b506103386105d1565b604080516001600160a01b039092168252519081900360200190f35b34801561036057600080fd5b506101f56004803603606081101561037757600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156103a157600080fd5b8201836020820111156103b357600080fd5b803590602001918460018302840111600160201b831117156103d457600080fd5b9193509150351515610688565b3480156103ed57600080fd5b506101f56004803603606081101561040457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561042e57600080fd5b82018360208201111561044057600080fd5b803590602001918460018302840111600160201b8311171561046157600080fd5b9193509150351515610846565b34801561047a57600080fd5b506101f5610a00565b6101f56004803603606081101561049957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156104c357600080fd5b8201836020820111156104d557600080fd5b803590602001918460018302840111600160201b831117156104f657600080fd5b9193509150351515610a0a565b34801561050f57600080fd5b5061020c61108d565b34801561052457600080fd5b506101f56004803603602081101561053b57600080fd5b50356001600160a01b03166110b3565b34801561055757600080fd5b5061057e6004803603602081101561056e57600080fd5b50356001600160a01b03166110bc565b604080519115158252519081900360200190f35b34801561059e57600080fd5b506102ae6110cd565b3480156105b357600080fd5b5061057e6110ee565b3480156105c857600080fd5b506101f5611114565b7f177667240aeeea7e35eabe3a35e18306f336219e1386f7710a6bf8783f761b245490565b6105ff8161111c565b50565b7fc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f81565b6040805162461bcd60e51b815260206004820152601660248201527543414e4e4f545f43414c4c5f494e495449414c495a4560501b604482015290519081900360640190fd5b6040518060600160405280602781526020016118666027913981565b61069133611269565b6106d4576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b60008484848460405160200180856001600160a01b031681526020018060200183151581526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050604051602081830303815290604052805190602001209050600060026000838152602001908152602001600020549050600081116107b3576040805162461bcd60e51b815260206004820152601b60248201527f554e4b4e4f574e5f555047524144455f494e464f524d4154494f4e0000000000604482015290519081900360640190fd5b6002600083815260200190815260200160002060009055856001600160a01b03167fe99b980b5259f200e4c1da973ff0251b6d9aaa144714c8773976ecd62b8ebe8d868686604051808060200183151581526020018281038252858582818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a2505050505050565b61084f33611269565b610892576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b6108a4846001600160a01b0316611298565b6108ec576040805162461bcd60e51b8152602060048201526014602482015273105111149154d4d7d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b60008484848460405160200180856001600160a01b031681526020018060200183151581526020018281038252858582818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050604051602081830303815290604052805190602001209050600061096861108d565b42019050806002600084815260200190815260200160002081905550856001600160a01b03167f723a7080d63c133cf338e44e00705cc1b7b2bde7e88d6218a8d62710a329ce1b868686604051808060200183151581526020018281038252858582818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a2505050505050565b610a0861129e565b565b610a1333611269565b610a56576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b610a5e6110ee565b610aaf576040805162461bcd60e51b815260206004820152601860248201527f494d504c454d454e544154494f4e5f46494e414c495a45440000000000000000604482015290519081900360640190fd5b610ab761136b565b15610afb576040805162461bcd60e51b815260206004820152600f60248201526e29aa20aa22afa4a9afa32927ad22a760891b604482015290519081900360640190fd5b60008484848460405160200180856001600160a01b031681526020018060200183151581526020018281038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060405160208183030381529060405280519060200120905060006002600083815260200190815260200160002054905060008111610bda576040805162461bcd60e51b815260206004820152601b60248201527f554e4b4e4f574e5f555047524144455f494e464f524d4154494f4e0000000000604482015290519081900360640190fd5b610bec866001600160a01b0316611298565b610c34576040805162461bcd60e51b8152602060048201526014602482015273105111149154d4d7d393d517d0d3d395149050d560621b604482015290519081900360640190fd5b4281111580610c5357506000610c486105d1565b6001600160a01b0316145b610ca4576040805162461bcd60e51b815260206004820152601760248201527f555047524144455f4e4f545f454e41424c45445f594554000000000000000000604482015290519081900360640190fd5b610cad866114ce565b60006060876001600160a01b031663439fab9160e01b88886040516024018080602001828103825284848281815260200192508082843760008382015260408051601f909201601f1990811690940182810390940182529283526020810180516001600160e01b03166001600160e01b0319909916989098178852915182519297909650869550935090915081905083835b60208310610d5e5780518252601f199092019160209182019101610d3f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610dbe576040519150601f19603f3d011682016040523d82523d6000602084013e610dc3565b606091505b5091509150818190610e535760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e18578181015183820152602001610e00565b50505050905090810190601f168015610e455780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060408051600481526024810182526020810180516001600160e01b03166333eeb14760e01b178152915181516001600160a01b038c169382918083835b60208310610eb05780518252601f199092019160209182019101610e91565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610f10576040519150601f19603f3d011682016040523d82523d6000602084013e610f15565b606091505b50909250905081610f6d576040805162461bcd60e51b815260206004820152601960248201527f43414c4c5f544f5f495346524f5a454e5f524556455254454400000000000000604482015290519081900360640190fd5b808060200190516020811015610f8257600080fd5b505115610fd6576040805162461bcd60e51b815260206004820152601960248201527f4e45575f494d504c454d454e544154494f4e5f46524f5a454e00000000000000604482015290519081900360640190fd5b841561101957610fe46114f2565b6040516001600160a01b038916907fc13b75a5f14b69ebdc2431a5d475b3bff371abe251b5064144306fbd9c4de35c90600090a25b876001600160a01b03167fff14288d542bc1c1d15a652cb52af735f065c0c9d70b48e454a203c260733544888860405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a25050505050505050565b7fc21dbb3089fcb2c4f4c6a67854ab4db2b0f233ea4b21b21f912d52d18fc5db1f545b90565b6105ff81611518565b60006110c782611269565b92915050565b60405180604001604052806005815260200164332e302e3160d81b81525081565b7f7d433c6f837e8f93009937c466c82efbb5ba621fae36886d0cac433c5d0aa7d2541590565b610a086116be565b61112533611269565b611168576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b336001600160a01b03821614156111bd576040805162461bcd60e51b8152602060048201526014602482015273474f5645524e4f525f53454c465f52454d4f564560601b604482015290519081900360640190fd5b60006111c7611768565b90506111d282611269565b611212576040805162461bcd60e51b815260206004820152600c60248201526b2727aa2fa3a7ab22a92727a960a11b604482015290519081900360640190fd5b6001600160a01b03821660008181526020838152604091829020805460ff19169055815192835290517fd75f94825e770b8b512be8e74759e252ad00e102e38f50cce2f7c6f868a295999281900390910190a15050565b600080611274611768565b6001600160a01b039390931660009081526020939093525050604090205460ff1690565b3b151590565b60006112a8611768565b60018101549091506001600160a01b0316331461130c576040805162461bcd60e51b815260206004820152601760248201527f4f4e4c595f43414e4449444154455f474f5645524e4f52000000000000000000604482015290519081900360640190fd5b6001810154611323906001600160a01b03166117e5565b6001810180546001600160a01b03191690556040805133815290517fcfb473e6c03f9a29ddaf990e736fa3de5188a0bd85d684f5b6e164ebfbfff5d29181900360200190a150565b6000806113766105d1565b90506001600160a01b0381166113905760009150506110b0565b60408051600481526024810182526020810180516001600160e01b03166333eeb14760e01b178152915181516000936060936001600160a01b038716939092909182918083835b602083106113f65780518252601f1990920191602091820191016113d7565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611456576040519150601f19603f3d011682016040523d82523d6000602084013e61145b565b606091505b50915091508181906114ae5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610e18578181015183820152602001610e00565b508080602001905160208110156114c457600080fd5b5051935050505090565b7f177667240aeeea7e35eabe3a35e18306f336219e1386f7710a6bf8783f761b2455565b60017f7d433c6f837e8f93009937c466c82efbb5ba621fae36886d0cac433c5d0aa7d255565b61152133611269565b611564576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b600061156e611768565b90506001600160a01b0382166115b9576040805162461bcd60e51b815260206004820152600b60248201526a4241445f4144445245535360a81b604482015290519081900360640190fd5b6115c282611269565b15611607576040805162461bcd60e51b815260206004820152601060248201526f20a62922a0a22cafa3a7ab22a92727a960811b604482015290519081900360640190fd5b60018101546001600160a01b031615611667576040805162461bcd60e51b815260206004820152601760248201527f4f544845525f43414e4449444154455f50454e44494e47000000000000000000604482015290519081900360640190fd5b6001810180546001600160a01b0384166001600160a01b0319909116811790915560408051918252517f6166272c8d3f5f579082f2827532732f97195007983bb5b83ac12c56700b01a69181900360200190a15050565b6116c733611269565b61170a576040805162461bcd60e51b815260206004820152600f60248201526e4f4e4c595f474f5645524e414e434560881b604482015290519081900360640190fd5b6000611714611768565b60018101549091506001600160a01b0316156105ff576001810180546001600160a01b03191690556040517f7a8dc7dd7fffb43c4807438fa62729225156941e641fd877938f4edade3429f590600090a150565b600080604051806060016040528060278152602001611866602791396040518082805190602001908083835b602083106117b35780518252601f199092019160209182019101611794565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092209392505050565b6117ee81611269565b15611833576040805162461bcd60e51b815260206004820152601060248201526f20a62922a0a22cafa3a7ab22a92727a960811b604482015290519081900360640190fd5b600061183d611768565b6001600160a01b0390921660009081526020929092525060409020805460ff1916600117905556fe537461726b45782e50726f78792e323031392e476f7665726e6f7273496e666f726d6174696f6ea264697066735822122061cf4be222cad8207c0602cf45eb7846d3b5c130d64d6d5a46cbec9c93b28e9d64736f6c634300060c0033537461726b45782e50726f78792e323031392e476f7665726e6f7273496e666f726d6174696f6e" -} \ No newline at end of file diff --git a/contracts/test/bridge/tokenBridge.ts b/contracts/test/bridge/tokenBridge.ts deleted file mode 100644 index fecbfbc34..000000000 --- a/contracts/test/bridge/tokenBridge.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { TIMEOUT } from '../constants' -import { ethers, starknet, network } from 'hardhat' -import { Contract } from 'ethers' -import { uint256, number } from 'starknet' -import { StarknetContract, HttpNetworkConfig, Account } from 'hardhat/types' -import { expect } from 'chai' -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { expectAddressEquality, loadStarkgateContract, loadProxyContract } from '../utils' - -describe('Test starkgate bridge with link token', function () { - this.timeout(TIMEOUT) - const networkUrl: string = (network.config as HttpNetworkConfig).url - let owner: Account - let tokenBridgeContract: StarknetContract - let linkTokenContract: StarknetContract - let deployer: SignerWithAddress - - let starkNetERC20Bridge: Contract - let mockStarknetMessaging: Contract - let proxy: Contract - let testERC20: Contract - let newStarkNetERC20Bridge: Contract - - before(async () => { - owner = await starknet.deployAccount('OpenZeppelin') - - let tokenBridgeFactory = await starknet.getContractFactory( - '../../node_modules/@chainlink-dev/starkgate-contracts/artifacts/token_bridge.cairo', - ) - tokenBridgeContract = await tokenBridgeFactory.deploy({ - governor_address: owner.starknetContract.address, - }) - - let linkTokenFactory = await starknet.getContractFactory('link_token') - linkTokenContract = await linkTokenFactory.deploy({ owner: tokenBridgeContract.address }) - - const accounts = await ethers.getSigners() - deployer = accounts[0] - - const contract = await loadStarkgateContract('StarknetERC20Bridge') - const starkNetERC20BridgeFactory = new ethers.ContractFactory( - contract.abi, - contract.bytecode, - deployer, - ) - starkNetERC20Bridge = await starkNetERC20BridgeFactory.deploy() - await starkNetERC20Bridge.deployed() - - const mockStarknetMessagingFactory = await ethers.getContractFactory( - 'MockStarkNetMessaging', - deployer, - ) - mockStarknetMessaging = await mockStarknetMessagingFactory.deploy() - await mockStarknetMessaging.deployed() - - await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address) - - const testERC20Factory = await ethers.getContractFactory('TestERC20', deployer) - testERC20 = await testERC20Factory.deploy() - await testERC20.deployed() - - const proxyContract = loadProxyContract('Proxy') - const proxyFactory = new ethers.ContractFactory( - proxyContract.abi, - proxyContract.bytecode, - deployer, - ) - proxy = await proxyFactory.deploy(0) - await proxy.deployed() - }) - - describe('Test bridge from L1 to L2', function () { - it('Test Set and Get function for L2 token address', async () => { - const new_data = ethers.utils.hexConcat([ - ethers.utils.hexZeroPad(ethers.constants.AddressZero, 32), - ethers.utils.hexZeroPad(testERC20.address, 32), - ethers.utils.hexZeroPad(mockStarknetMessaging.address, 32), - ]) - - await proxy.connect(deployer).addImplementation(starkNetERC20Bridge.address, new_data, false) - await proxy.connect(deployer).upgradeTo(starkNetERC20Bridge.address, new_data, false) - }) - - it('Should add implementation and upgrade successfully', async () => { - await owner.invoke(tokenBridgeContract, 'set_l2_token', { - l2_token_address: linkTokenContract.address, - }) - const { res: l2_address } = await tokenBridgeContract.call('get_l2_token', {}) - expectAddressEquality(l2_address.toString(), linkTokenContract.address) - }) - - it('Should wrap contract and set L2 TokenBridge successfully', async () => { - const contract = await loadStarkgateContract('StarknetERC20Bridge') - newStarkNetERC20Bridge = await ethers.getContractAt(contract.abi, proxy.address) - - const tx = await newStarkNetERC20Bridge.setL2TokenBridge(BigInt(tokenBridgeContract.address)) - await expect(tx) - .to.emit(newStarkNetERC20Bridge, 'LogSetL2TokenBridge') - .withArgs(BigInt(tokenBridgeContract.address)) - }) - - it('Test Set and Get function for L1 bridge address', async () => { - await owner.invoke(tokenBridgeContract, 'set_l1_bridge', { - l1_bridge_address: newStarkNetERC20Bridge.address, - }) - const { res: l1_address } = await tokenBridgeContract.call('get_l1_bridge', {}) - expectAddressEquality(l1_address.toString(), newStarkNetERC20Bridge.address) - }) - - it('Should setBalance to the token bridge', async () => { - await testERC20.setBalance(newStarkNetERC20Bridge.address, 1000) - const balance = await testERC20.balanceOf(newStarkNetERC20Bridge.address) - expect(balance).to.equal(1000) - - await testERC20.setBalance(deployer.address, 10) - const balance2 = await testERC20.balanceOf(deployer.address) - expect(balance2).to.equal(10) - }) - - it('Should set Max total balance', async () => { - await newStarkNetERC20Bridge.setMaxTotalBalance(100000) - const totalbalance = await newStarkNetERC20Bridge.maxTotalBalance() - expect(totalbalance).to.equal(100000) - }) - - it('Should set Max deposit', async () => { - await newStarkNetERC20Bridge.setMaxDeposit(100) - const deposit = await newStarkNetERC20Bridge.maxDeposit() - expect(deposit).to.equal(100) - }) - - it('Should deposit to the L2 contract, L1 balance should be decreased by 2', async () => { - await testERC20.approve(newStarkNetERC20Bridge.address, 2) - await newStarkNetERC20Bridge.deposit(2, owner.starknetContract.address) - - const balance = await testERC20.balanceOf(deployer.address) - expect(balance).to.equal(8) - }) - }) - - describe('Test bridge from L2 to L1', function () { - it('Should flush the L1 messages so that they can be consumed by the L2.', async () => { - const flushL1Response = await starknet.devnet.flush() - const flushL1Messages = flushL1Response.consumed_messages.from_l1 - expect(flushL1Messages).to.have.a.lengthOf(1) - expect(flushL1Response.consumed_messages.from_l2).to.be.empty - - expectAddressEquality(flushL1Messages[0].args.from_address, newStarkNetERC20Bridge.address) - expectAddressEquality(flushL1Messages[0].args.to_address, tokenBridgeContract.address) - expectAddressEquality(flushL1Messages[0].address, mockStarknetMessaging.address) - - let { balance: balance } = await linkTokenContract.call('balanceOf', { - account: owner.starknetContract.address, - }) - expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(2)) - }) - - it('Should initiate withdraw and send message to L1', async () => { - await owner.invoke(tokenBridgeContract, 'initiate_withdraw', { - l1_recipient: BigInt(deployer.address), - amount: uint256.bnToUint256(2), - }) - let { balance: balance } = await linkTokenContract.call('balanceOf', { - account: owner.starknetContract.address, - }) - expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(0)) - - const flushL2Response = await starknet.devnet.flush() - expect(flushL2Response.consumed_messages.from_l1).to.be.empty - const flushL2Messages = flushL2Response.consumed_messages.from_l2 - - expect(flushL2Messages).to.have.a.lengthOf(1) - expectAddressEquality(flushL2Messages[0].from_address, tokenBridgeContract.address) - expectAddressEquality(flushL2Messages[0].to_address, newStarkNetERC20Bridge.address) - }) - - it('Should withdraw 2 which will consume the L2 message successfully', async () => { - await newStarkNetERC20Bridge['withdraw(uint256)'](2) - - const balance = await testERC20.balanceOf(deployer.address) - expect(balance).to.equal(10) - }) - }) -}) diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index 795adb278..e0eeded6e 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -3,6 +3,7 @@ import { StarknetContract, Account } from 'hardhat/types/runtime' import { uint256 } from 'starknet' import { toBN } from 'starknet/utils/number' import { TIMEOUT } from '../../../constants' +import { assertErrorMsg } from '../../../utils' export type TestData = { token: StarknetContract @@ -100,6 +101,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { @@ -110,6 +112,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -123,6 +126,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { + console.log(error.message) expect(/assert/gi.test(error.message)).to.be.true } @@ -191,6 +195,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.alice.invoke(t.token, 'transfer', { @@ -200,6 +205,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -266,6 +272,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -276,6 +283,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -376,6 +384,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -386,6 +395,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) }) diff --git a/contracts/test/utils.ts b/contracts/test/utils.ts index ad63614eb..126443ac6 100644 --- a/contracts/test/utils.ts +++ b/contracts/test/utils.ts @@ -1,22 +1,4 @@ import { expect } from 'chai' -import fs from 'fs' -import { json } from 'starknet' - -export const loadStarkgateContract = (name: string): any => { - return json.parse( - fs - .readFileSync( - `${__dirname}/../../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/${name}.json`, - ) - .toString('ascii'), - ) -} - -export const loadProxyContract = (name: string): any => { - return json.parse( - fs.readFileSync(`${__dirname}/bridge/artifacts-test/${name}.json`).toString('ascii'), - ) -} export const expectInvokeError = (full: string, expected: string) => { // Match transaction error diff --git a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol deleted file mode 100644 index 70ac4f9df..000000000 --- a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/ERC20.sol +++ /dev/null @@ -1,129 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0. -pragma solidity ^0.6.12; - -import "./IERC20.sol"; -import "./IERC20Metadata.sol"; - -abstract contract ERC20 is IERC20, IERC20Metadata { - mapping(address => uint256) internal _balances; - - mapping(address => mapping(address => uint256)) internal _allowances; - - uint256 internal _totalSupply; - string internal name_; - string internal symbol_; - uint8 internal decimals_; - - function name() external view override returns (string memory) { - return name_; - } - - function symbol() external view override returns (string memory) { - return symbol_; - } - - function decimals() external view override returns (uint8) { - return decimals_; - } - - function totalSupply() public view override returns (uint256) { - return _totalSupply; - } - - function balanceOf(address account) public view override returns (uint256) { - return _balances[account]; - } - - function transfer(address recipient, uint256 amount) public virtual override returns (bool) { - _transfer(msg.sender, recipient, amount); - return true; - } - - function allowance(address owner, address spender) public view override returns (uint256) { - return _allowances[owner][spender]; - } - - function approve(address spender, uint256 value) public override returns (bool) { - _approve(msg.sender, spender, value); - return true; - } - - function transferFrom( - address sender, - address recipient, - uint256 amount - ) public virtual override returns (bool) { - _transfer(sender, recipient, amount); - uint256 sender_allowance = _allowances[sender][msg.sender]; - require(sender_allowance >= amount, "ERC20: transfer exceeds allowance"); - _approve(sender, msg.sender, sender_allowance - amount); - return true; - } - - function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { - uint256 spender_allowance = _allowances[msg.sender][spender]; - require(spender_allowance + addedValue >= spender_allowance, "ERC20: Overflow"); - _approve(msg.sender, spender, spender_allowance + addedValue); - return true; - } - - function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { - uint256 sender_allowance = _allowances[msg.sender][spender]; - require(sender_allowance >= subtractedValue, "ERC20: transfer exceeds allowance"); - _approve(msg.sender, spender, sender_allowance - subtractedValue); - return true; - } - - function _transfer( - address sender, - address recipient, - uint256 amount - ) internal { - require(sender != address(0), "ERC20: transfer from the zero address"); - require(recipient != address(0), "ERC20: transfer to the zero address"); - uint256 sender_balance = _balances[sender]; - uint256 recipient_balance = _balances[recipient]; - require(sender_balance >= amount, "ERC20: transfer amount exceeds balance"); - require(recipient_balance + amount >= recipient_balance, "ERC20: Overflow"); - _balances[sender] -= amount; - _balances[recipient] += amount; - emit Transfer(sender, recipient, amount); - } - - function _mint(address account, uint256 amount) internal { - require(account != address(0), "ERC20: mint to the zero address"); - uint256 _total = _totalSupply; - require(_total + amount >= _total, "ERC20: Overflow"); - _totalSupply = _total + amount; - _balances[account] += amount; - emit Transfer(address(0), account, amount); - } - - function _burn(address account, uint256 value) internal { - require(account != address(0), "ERC20: burn from the zero address"); - uint256 current_balance = _balances[account]; - require(current_balance >= value, "ERC20: burn amount exceeds balance"); - _balances[account] = current_balance - value; - _totalSupply -= value; - emit Transfer(account, address(0), value); - } - - function _approve( - address owner, - address spender, - uint256 value - ) internal { - require(owner != address(0), "ERC20: approve from the zero address"); - require(spender != address(0), "ERC20: approve to the zero address"); - - _allowances[owner][spender] = value; - emit Approval(owner, spender, value); - } - - function _burnFrom(address account, uint256 amount) internal { - _burn(account, amount); - uint256 current_allowance = _allowances[account][msg.sender]; - require(current_allowance >= amount, "ERC20: burn amount exceeds allowance"); - _approve(account, msg.sender, current_allowance - amount); - } -} diff --git a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol deleted file mode 100644 index df2caf623..000000000 --- a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20.sol +++ /dev/null @@ -1,28 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0. -pragma solidity ^0.6.12; - -/** - Interface of the ERC20 standard as defined in the EIP. Does not include - the optional functions; to access them see {ERC20Detailed}. -*/ -interface IERC20 { - function totalSupply() external view returns (uint256); - - function balanceOf(address account) external view returns (uint256); - - function transfer(address recipient, uint256 amount) external returns (bool); - - function allowance(address owner, address spender) external view returns (uint256); - - function approve(address spender, uint256 amount) external returns (bool); - - function transferFrom( - address sender, - address recipient, - uint256 amount - ) external returns (bool); - - event Transfer(address indexed from, address indexed to, uint256 value); - - event Approval(address indexed owner, address indexed spender, uint256 value); -} diff --git a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol b/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol deleted file mode 100644 index 5f465a57e..000000000 --- a/contracts/vendor/starkware-libs/starkgate-contracts/src/starkware/solidity/tokens/ERC20/IERC20Metadata.sol +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0. -pragma solidity ^0.6.12; - -import "./IERC20.sol"; - -/** - Interface for the optional metadata functions from the ERC20 standard. -*/ -interface IERC20Metadata is IERC20 { - /** - Returns the name of the token. - */ - function name() external view returns (string memory); - - /** - Returns the symbol of the token. - */ - function symbol() external view returns (string memory); - - /** - Returns the decimals places of the token. - */ - function decimals() external view returns (uint8); -} diff --git a/packages-ts/integration-starkgate/hardhat.config.ts b/packages-ts/integration-starkgate/hardhat.config.ts index 25b5bd892..38f6a25ba 100644 --- a/packages-ts/integration-starkgate/hardhat.config.ts +++ b/packages-ts/integration-starkgate/hardhat.config.ts @@ -1,4 +1,6 @@ import '@shardlabs/starknet-hardhat-plugin' +import '@nomiclabs/hardhat-ethers' +import '@nomiclabs/hardhat-waffle' import { HardhatUserConfig } from 'hardhat/types' @@ -6,6 +8,7 @@ const config: HardhatUserConfig = { solidity: '0.8.14', starknet: { venv: 'active', + network: 'devnet', wallets: { OpenZeppelin: { accountName: 'OpenZeppelin', @@ -15,7 +18,7 @@ const config: HardhatUserConfig = { }, }, paths: { - starknetArtifacts: 'node_modules/@chainlink-dev/starkgate-contracts/artifacts', + starknetArtifacts: '../../contracts/starknet-artifacts', }, networks: { devnet: { diff --git a/packages-ts/integration-starkgate/package.json b/packages-ts/integration-starkgate/package.json index ea6de517b..ab09a2217 100644 --- a/packages-ts/integration-starkgate/package.json +++ b/packages-ts/integration-starkgate/package.json @@ -18,12 +18,13 @@ "typescript": "^4.7.2" }, "scripts": { - "test": "npx hardhat test --starknet-network devnet" + "test": "npx hardhat --network localhost test" }, "keywords": [], "author": "", "license": "MIT", "dependencies": { - "@chainlink-dev/starkgate-contracts": "^0.0.3" + "@chainlink-dev/starkgate-contracts": "^0.0.3", + "@openzeppelin/contracts": "^4.7.3" } } diff --git a/packages-ts/integration-starkgate/test/tokenBridge.ts b/packages-ts/integration-starkgate/test/tokenBridge.ts index 79b6958ea..6d36c32eb 100644 --- a/packages-ts/integration-starkgate/test/tokenBridge.ts +++ b/packages-ts/integration-starkgate/test/tokenBridge.ts @@ -1,57 +1,184 @@ -import { starknet } from 'hardhat' -import { expect } from 'chai' -import { StarknetContract, ArgentAccount } from 'hardhat/types/runtime' import { TIMEOUT } from './constants' +import { ethers, starknet, network } from 'hardhat' +import { Contract, ContractFactory } from 'ethers' +import { uint256, number } from 'starknet' +import { StarknetContract, HttpNetworkConfig, Account } from 'hardhat/types' +import { expect } from 'chai' +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' +import { expectAddressEquality } from '../../../contracts/test/utils' +import { loadSolidityContract, loadStarkgateContract, loadOpenzepplinContract } from '../utils' -const NAME = starknet.shortStringToBigInt('Chainlink') -const SYMBOL = starknet.shortStringToBigInt('LINK') -const DECIMALS = 18 -const L1_BRIDGE_ADDRESS = 42n - -function adaptAddress(address: string) { - return '0x' + BigInt(address).toString(16) -} - -function expectAddressEquality(actual: string, expected: string) { - expect(adaptAddress(actual)).to.equal(adaptAddress(expected)) -} +const NAME = 'ChainLink Token' +const SYMBOL = 'LINK' -describe('ContractTokenBridge', function () { +describe('Test starkgate bridge with link token', function () { this.timeout(TIMEOUT) - let accountUser1: ArgentAccount + const networkUrl: string = (network.config as HttpNetworkConfig).url + let owner: Account let tokenBridgeContract: StarknetContract - let ERC20Contract: StarknetContract + let linkTokenContract: StarknetContract + let deployer: SignerWithAddress + + let proxyFactory: ContractFactory + + let starkNetERC20Bridge: Contract + let mockStarknetMessaging: Contract + let proxy: Contract + let testERC20: Contract + let newStarkNetERC20Bridge: Contract + + let starkNetERC20BridgeContract: any before(async () => { - accountUser1 = (await starknet.deployAccount('Argent')) as ArgentAccount + owner = await starknet.deployAccount('OpenZeppelin') - let tokenBridgeFactory = await starknet.getContractFactory('token_bridge.cairo') + let tokenBridgeFactory = await starknet.getContractFactory( + '../../node_modules/@chainlink-dev/starkgate-contracts/artifacts/token_bridge.cairo', + ) tokenBridgeContract = await tokenBridgeFactory.deploy({ - governor_address: accountUser1.starknetContract.address, + governor_address: owner.starknetContract.address, }) - let ERC20Factory = await starknet.getContractFactory('ERC20.cairo') - ERC20Contract = await ERC20Factory.deploy({ - name: NAME, - symbol: SYMBOL, - decimals: DECIMALS, - minter_address: tokenBridgeContract.address, - }) + let linkTokenFactory = await starknet.getContractFactory('link_token') + linkTokenContract = await linkTokenFactory.deploy({ owner: tokenBridgeContract.address }) + + const accounts = await ethers.getSigners() + deployer = accounts[0] + + starkNetERC20BridgeContract = await loadStarkgateContract('StarknetERC20Bridge') + const starkNetERC20BridgeFactory = new ethers.ContractFactory( + starkNetERC20BridgeContract.abi, + starkNetERC20BridgeContract.bytecode, + deployer, + ) + starkNetERC20Bridge = await starkNetERC20BridgeFactory.deploy() + await starkNetERC20Bridge.deployed() + + const mockStarknetMessagingContract = await loadSolidityContract('MockStarkNetMessaging') + const mockStarknetMessagingFactory = new ethers.ContractFactory( + mockStarknetMessagingContract.abi, + mockStarknetMessagingContract.bytecode, + deployer, + ) + mockStarknetMessaging = await mockStarknetMessagingFactory.deploy() + await mockStarknetMessaging.deployed() + + await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address) + + const testERC20contract = await loadOpenzepplinContract('ERC20PresetFixedSupply') + const testERC20Factory = new ethers.ContractFactory( + testERC20contract.abi, + testERC20contract.bytecode, + deployer, + ) + testERC20 = await testERC20Factory.deploy(NAME, SYMBOL, 10, deployer.address) + await testERC20.deployed() + + const proxyContract = await loadOpenzepplinContract('ERC1967Proxy') + proxyFactory = new ethers.ContractFactory(proxyContract.abi, proxyContract.bytecode, deployer) + + const inter = new ethers.utils.Interface(starkNetERC20BridgeContract.abi) + const data = ethers.utils.hexConcat([ + ethers.utils.hexZeroPad(ethers.constants.AddressZero, 32), + ethers.utils.hexZeroPad(testERC20.address, 32), + ethers.utils.hexZeroPad(mockStarknetMessaging.address, 32), + ]) + let encode_data = inter.encodeFunctionData('initialize(bytes data)', [data]) + proxy = await proxyFactory.deploy(starkNetERC20Bridge.address, encode_data) + await proxy.deployed() }) - it('Test Set and Get function for L1 bridge address', async () => { - await accountUser1.invoke(tokenBridgeContract, 'set_l1_bridge', { - l1_bridge_address: L1_BRIDGE_ADDRESS, + describe('Test bridge from L1 to L2', function () { + it('Test Set and Get function for L2 token address', async () => { + await owner.invoke(tokenBridgeContract, 'set_l2_token', { + l2_token_address: linkTokenContract.address, + }) + const { res: l2_address } = await tokenBridgeContract.call('get_l2_token', {}) + expectAddressEquality(l2_address.toString(), linkTokenContract.address) + }) + + it('Should wrap contract and set L2 TokenBridge successfully', async () => { + newStarkNetERC20Bridge = await ethers.getContractAt( + starkNetERC20BridgeContract.abi, + proxy.address, + ) + + const tx = await newStarkNetERC20Bridge.setL2TokenBridge(BigInt(tokenBridgeContract.address)) + await expect(tx) + .to.emit(newStarkNetERC20Bridge, 'LogSetL2TokenBridge') + .withArgs(BigInt(tokenBridgeContract.address)) + }) + + it('Test Set and Get function for L1 bridge address', async () => { + await owner.invoke(tokenBridgeContract, 'set_l1_bridge', { + l1_bridge_address: newStarkNetERC20Bridge.address, + }) + const { res: l1_address } = await tokenBridgeContract.call('get_l1_bridge', {}) + expectAddressEquality(l1_address.toString(), newStarkNetERC20Bridge.address) + }) + + it('Should set Max total balance', async () => { + await newStarkNetERC20Bridge.setMaxTotalBalance(100000) + const totalbalance = await newStarkNetERC20Bridge.maxTotalBalance() + expect(totalbalance).to.equal(100000) + }) + + it('Should set Max deposit', async () => { + await newStarkNetERC20Bridge.setMaxDeposit(100) + const deposit = await newStarkNetERC20Bridge.maxDeposit() + expect(deposit).to.equal(100) + }) + + it('Should deposit to the L2 contract, L1 balance should be decreased by 2', async () => { + await testERC20.approve(newStarkNetERC20Bridge.address, 2) + await newStarkNetERC20Bridge.deposit(2, owner.starknetContract.address) + + const balance = await testERC20.balanceOf(deployer.address) + expect(balance).to.equal(8) + }) + + it('Should flush the L1 messages so that they can be consumed by the L2.', async () => { + const flushL1Response = await starknet.devnet.flush() + const flushL1Messages = flushL1Response.consumed_messages.from_l1 + expect(flushL1Messages).to.have.a.lengthOf(1) + expect(flushL1Response.consumed_messages.from_l2).to.be.empty + + expectAddressEquality(flushL1Messages[0].args.from_address, newStarkNetERC20Bridge.address) + expectAddressEquality(flushL1Messages[0].args.to_address, tokenBridgeContract.address) + expectAddressEquality(flushL1Messages[0].address, mockStarknetMessaging.address) + + let { balance: balance } = await linkTokenContract.call('balanceOf', { + account: owner.starknetContract.address, + }) + expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(2)) }) - const { res: l1_address } = await tokenBridgeContract.call('get_l1_bridge', {}) - expectAddressEquality(l1_address.toString(), L1_BRIDGE_ADDRESS.toString()) }) - it('Test Set and Get function for L2 token address', async () => { - await accountUser1.invoke(tokenBridgeContract, 'set_l2_token', { - l2_token_address: ERC20Contract.address, + describe('Test bridge from L2 to L1', function () { + it('Should initiate withdraw and send message to L1', async () => { + await owner.invoke(tokenBridgeContract, 'initiate_withdraw', { + l1_recipient: BigInt(deployer.address), + amount: uint256.bnToUint256(2), + }) + let { balance: balance } = await linkTokenContract.call('balanceOf', { + account: owner.starknetContract.address, + }) + expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(0)) + + const flushL2Response = await starknet.devnet.flush() + expect(flushL2Response.consumed_messages.from_l1).to.be.empty + const flushL2Messages = flushL2Response.consumed_messages.from_l2 + + expect(flushL2Messages).to.have.a.lengthOf(1) + expectAddressEquality(flushL2Messages[0].from_address, tokenBridgeContract.address) + expectAddressEquality(flushL2Messages[0].to_address, newStarkNetERC20Bridge.address) + }) + + it('Should withdraw 2 which will consume the L2 message successfully', async () => { + await newStarkNetERC20Bridge['withdraw(uint256)'](2) + + const balance = await testERC20.balanceOf(deployer.address) + expect(balance).to.equal(10) }) - const { res: l2_address } = await tokenBridgeContract.call('get_l2_token', {}) - expectAddressEquality(l2_address.toString(), ERC20Contract.address) }) }) diff --git a/packages-ts/integration-starkgate/tsconfig.json b/packages-ts/integration-starkgate/tsconfig.json new file mode 100644 index 000000000..81ef9c450 --- /dev/null +++ b/packages-ts/integration-starkgate/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "dist", + "**/*.spec.ts", + "**/*.test.ts" + ] +} diff --git a/packages-ts/integration-starkgate/utils/index.ts b/packages-ts/integration-starkgate/utils/index.ts index 82e410948..04348bccb 100644 --- a/packages-ts/integration-starkgate/utils/index.ts +++ b/packages-ts/integration-starkgate/utils/index.ts @@ -1,11 +1,31 @@ import fs from 'fs' -import { CompiledContract, json } from 'starknet' +import { json } from 'starknet' -export const loadStarkgateContract = (name: string): CompiledContract => { +export const loadStarkgateContract = (name: string): any => { return json.parse( fs .readFileSync( - `${__dirname}/../node_modules/@chainlink-dev/starkgate-contracts/artifacts/${name}.cairo/${name}.json`, + `${__dirname}/../../../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/${name}.json`, + ) + .toString('ascii'), + ) +} + +export const loadOpenzepplinContract = (name: string): any => { + return json.parse( + fs + .readFileSync( + `${__dirname}/../../../node_modules/@openzeppelin/contracts/build/contracts/${name}.json`, + ) + .toString('ascii'), + ) +} + +export const loadSolidityContract = (name: string): any => { + return json.parse( + fs + .readFileSync( + `${__dirname}/../../../contracts/artifacts/src/chainlink/solidity/mocks/${name}.sol/${name}.json`, ) .toString('ascii'), ) From 0baa78926f9fefd183764d74b9f254d4f492dc81 Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 2 Sep 2022 15:10:05 +0200 Subject: [PATCH 05/20] fixe name and loadContract_ but not module error yet --- contracts/package.json | 3 +-- contracts/test/token/starkgate/behavior/ERC20.ts | 1 - .../aggregator-consumer/scripts/deploy_accounts.ts | 4 ++-- .../contracts/aggregator-consumer/scripts/index.ts | 2 +- packages-ts/integration-starkgate/package.json | 3 ++- .../test/{tokenBridge.ts => tokenBridge.test.ts} | 14 +++++++++----- packages-ts/integration-starkgate/utils/index.ts | 6 +++--- .../starknet-gauntlet-ocr2/src/lib/contracts.ts | 8 ++++---- .../test/commands/ocr2.test.ts | 6 +++--- 9 files changed, 25 insertions(+), 22 deletions(-) rename packages-ts/integration-starkgate/test/{tokenBridge.ts => tokenBridge.test.ts} (94%) diff --git a/contracts/package.json b/contracts/package.json index 10d5259b9..d1040200a 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -32,7 +32,6 @@ "dependencies": { "@chainlink/contracts": "^0.4.2", "@toruslabs/starkware-crypto": "^1.0.0", - "axios": "^0.24.0", - "internals-starkgate-contracts": "^0.0.3" + "axios": "^0.24.0" } } diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index e0eeded6e..6b68231ca 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -126,7 +126,6 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) throw new Error('This should not pass!') } catch (error: any) { - console.log(error.message) expect(/assert/gi.test(error.message)).to.be.true } diff --git a/examples/contracts/aggregator-consumer/scripts/deploy_accounts.ts b/examples/contracts/aggregator-consumer/scripts/deploy_accounts.ts index fc64d1a0c..fa9c4cd94 100644 --- a/examples/contracts/aggregator-consumer/scripts/deploy_accounts.ts +++ b/examples/contracts/aggregator-consumer/scripts/deploy_accounts.ts @@ -1,7 +1,7 @@ import fs from 'fs' import { defaultProvider, ec, stark } from 'starknet' -import { loadAccount } from './index' +import { loadContract_Account } from './index' const ACCOUNT_NAME = 'Account' interface UserAccount { @@ -33,7 +33,7 @@ async function main() { } async function createAccount(): Promise { - const compiledAccount = loadAccount(ACCOUNT_NAME) + const compiledAccount = loadContract_Account(ACCOUNT_NAME) const privateKey = stark.randomAddress() const starkKeyPair = ec.getKeyPair(privateKey) diff --git a/examples/contracts/aggregator-consumer/scripts/index.ts b/examples/contracts/aggregator-consumer/scripts/index.ts index 349883482..20eff2ed4 100644 --- a/examples/contracts/aggregator-consumer/scripts/index.ts +++ b/examples/contracts/aggregator-consumer/scripts/index.ts @@ -9,7 +9,7 @@ export const loadContract = (name: string): CompiledContract => { ) } -export const loadAccount = (name: string): CompiledContract => { +export const loadContract_Account = (name: string): CompiledContract => { return json.parse( fs .readFileSync( diff --git a/packages-ts/integration-starkgate/package.json b/packages-ts/integration-starkgate/package.json index ab09a2217..88d337562 100644 --- a/packages-ts/integration-starkgate/package.json +++ b/packages-ts/integration-starkgate/package.json @@ -25,6 +25,7 @@ "license": "MIT", "dependencies": { "@chainlink-dev/starkgate-contracts": "^0.0.3", - "@openzeppelin/contracts": "^4.7.3" + "@openzeppelin/contracts": "^4.7.3", + "internals-starkgate-contracts": "^0.0.3" } } diff --git a/packages-ts/integration-starkgate/test/tokenBridge.ts b/packages-ts/integration-starkgate/test/tokenBridge.test.ts similarity index 94% rename from packages-ts/integration-starkgate/test/tokenBridge.ts rename to packages-ts/integration-starkgate/test/tokenBridge.test.ts index 6d36c32eb..91a9a4553 100644 --- a/packages-ts/integration-starkgate/test/tokenBridge.ts +++ b/packages-ts/integration-starkgate/test/tokenBridge.test.ts @@ -6,7 +6,11 @@ import { StarknetContract, HttpNetworkConfig, Account } from 'hardhat/types' import { expect } from 'chai' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expectAddressEquality } from '../../../contracts/test/utils' -import { loadSolidityContract, loadStarkgateContract, loadOpenzepplinContract } from '../utils' +import { + loadContract_Solidity, + loadContract_InternalStarkgate, + loadContract_Openzepplin, +} from '../utils' const NAME = 'ChainLink Token' const SYMBOL = 'LINK' @@ -45,7 +49,7 @@ describe('Test starkgate bridge with link token', function () { const accounts = await ethers.getSigners() deployer = accounts[0] - starkNetERC20BridgeContract = await loadStarkgateContract('StarknetERC20Bridge') + starkNetERC20BridgeContract = await loadContract_InternalStarkgate('StarknetERC20Bridge') const starkNetERC20BridgeFactory = new ethers.ContractFactory( starkNetERC20BridgeContract.abi, starkNetERC20BridgeContract.bytecode, @@ -54,7 +58,7 @@ describe('Test starkgate bridge with link token', function () { starkNetERC20Bridge = await starkNetERC20BridgeFactory.deploy() await starkNetERC20Bridge.deployed() - const mockStarknetMessagingContract = await loadSolidityContract('MockStarkNetMessaging') + const mockStarknetMessagingContract = await loadContract_Solidity('MockStarkNetMessaging') const mockStarknetMessagingFactory = new ethers.ContractFactory( mockStarknetMessagingContract.abi, mockStarknetMessagingContract.bytecode, @@ -65,7 +69,7 @@ describe('Test starkgate bridge with link token', function () { await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address) - const testERC20contract = await loadOpenzepplinContract('ERC20PresetFixedSupply') + const testERC20contract = await loadContract_Openzepplin('ERC20PresetFixedSupply') const testERC20Factory = new ethers.ContractFactory( testERC20contract.abi, testERC20contract.bytecode, @@ -74,7 +78,7 @@ describe('Test starkgate bridge with link token', function () { testERC20 = await testERC20Factory.deploy(NAME, SYMBOL, 10, deployer.address) await testERC20.deployed() - const proxyContract = await loadOpenzepplinContract('ERC1967Proxy') + const proxyContract = await loadContract_Openzepplin('ERC1967Proxy') proxyFactory = new ethers.ContractFactory(proxyContract.abi, proxyContract.bytecode, deployer) const inter = new ethers.utils.Interface(starkNetERC20BridgeContract.abi) diff --git a/packages-ts/integration-starkgate/utils/index.ts b/packages-ts/integration-starkgate/utils/index.ts index 04348bccb..754e60be7 100644 --- a/packages-ts/integration-starkgate/utils/index.ts +++ b/packages-ts/integration-starkgate/utils/index.ts @@ -1,7 +1,7 @@ import fs from 'fs' import { json } from 'starknet' -export const loadStarkgateContract = (name: string): any => { +export const loadContract_InternalStarkgate = (name: string): any => { return json.parse( fs .readFileSync( @@ -11,7 +11,7 @@ export const loadStarkgateContract = (name: string): any => { ) } -export const loadOpenzepplinContract = (name: string): any => { +export const loadContract_Openzepplin = (name: string): any => { return json.parse( fs .readFileSync( @@ -21,7 +21,7 @@ export const loadOpenzepplinContract = (name: string): any => { ) } -export const loadSolidityContract = (name: string): any => { +export const loadContract_Solidity = (name: string): any => { return json.parse( fs .readFileSync( diff --git a/packages-ts/starknet-gauntlet-ocr2/src/lib/contracts.ts b/packages-ts/starknet-gauntlet-ocr2/src/lib/contracts.ts index 8147ff042..03ee0399d 100644 --- a/packages-ts/starknet-gauntlet-ocr2/src/lib/contracts.ts +++ b/packages-ts/starknet-gauntlet-ocr2/src/lib/contracts.ts @@ -6,7 +6,7 @@ export enum CONTRACT_LIST { ACCESS_CONTROLLER = 'access_controller', } -export const loadContractOcr2 = (name: CONTRACT_LIST): CompiledContract => { +export const loadContract_Ocr2 = (name: CONTRACT_LIST): CompiledContract => { return json.parse( fs .readFileSync( @@ -16,7 +16,7 @@ export const loadContractOcr2 = (name: CONTRACT_LIST): CompiledContract => { ) } -export const loadContractAccessController = (name: CONTRACT_LIST): CompiledContract => { +export const loadContract_AccessController = (name: CONTRACT_LIST): CompiledContract => { return json.parse( fs .readFileSync( @@ -26,6 +26,6 @@ export const loadContractAccessController = (name: CONTRACT_LIST): CompiledContr ) } -export const ocr2ContractLoader = () => loadContractOcr2(CONTRACT_LIST.OCR2) +export const ocr2ContractLoader = () => loadContract_Ocr2(CONTRACT_LIST.OCR2) export const accessControllerContractLoader = () => - loadContractAccessController(CONTRACT_LIST.ACCESS_CONTROLLER) + loadContract_AccessController(CONTRACT_LIST.ACCESS_CONTROLLER) diff --git a/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts b/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts index 4337a92ed..a54d771bf 100644 --- a/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts +++ b/packages-ts/starknet-gauntlet-ocr2/test/commands/ocr2.test.ts @@ -10,7 +10,7 @@ import { startNetwork, IntegratedDevnet, } from '@chainlink/starknet-gauntlet/test/utils' -import { loadContractOcr2, CONTRACT_LIST } from '../../src/lib/contracts' +import { loadContract_Ocr2, CONTRACT_LIST } from '../../src/lib/contracts' import { Contract } from 'starknet' import { BN } from '@chainlink/gauntlet-core/dist/utils' @@ -125,7 +125,7 @@ describe('OCR2 Contract', () => { const report = await command.execute() expect(report.responses[0].tx.status).toEqual('ACCEPTED') - const ocr2 = loadContractOcr2(CONTRACT_LIST.OCR2) + const ocr2 = loadContract_Ocr2(CONTRACT_LIST.OCR2) const ocr2Contract = new Contract(ocr2.abi, contractAddress, makeProvider(LOCAL_URL).provider) const response = await ocr2Contract.billing() const billing = response[0] @@ -150,7 +150,7 @@ describe('OCR2 Contract', () => { expect(report.responses[0].tx.status).toEqual('ACCEPTED') const provider = makeProvider(LOCAL_URL).provider - const ocr2 = loadContractOcr2(CONTRACT_LIST.OCR2) + const ocr2 = loadContract_Ocr2(CONTRACT_LIST.OCR2) const ocr2Contract = new Contract(ocr2.abi, contractAddress, provider) const response = await ocr2Contract.transmitters() const resultTrasmitters = response[0] From 5c5444f2d2f2ea7dd88095c1598ded164ae06444 Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 2 Sep 2022 15:29:30 +0200 Subject: [PATCH 06/20] test for modules utils --- .../test/token/starkgate/behavior/ERC20.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index 6b68231ca..cdcb342e0 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -3,7 +3,7 @@ import { StarknetContract, Account } from 'hardhat/types/runtime' import { uint256 } from 'starknet' import { toBN } from 'starknet/utils/number' import { TIMEOUT } from '../../../constants' -import { assertErrorMsg } from '../../../utils' +import * as utils from '../../../utils' export type TestData = { token: StarknetContract @@ -25,6 +25,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) it('should mint successfully', async () => { + console.log(Object.keys(utils)) /* Mint some token with the good minter and check the user's balance */ await t.owner.invoke(t.token, 'permissionedMint', { recipient: t.alice.starknetContract.address, @@ -101,7 +102,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { @@ -112,7 +113,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -194,7 +195,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.alice.invoke(t.token, 'transfer', { @@ -204,7 +205,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -271,7 +272,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -282,7 +283,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -383,7 +384,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -394,7 +395,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) }) From 507bb0cde293bcde0a372146e884c3c46858ec0b Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 2 Sep 2022 15:42:22 +0200 Subject: [PATCH 07/20] change name to ERC20.test.ts --- .../behavior/{ERC20.ts => ERC20.test.ts} | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) rename contracts/test/token/starkgate/behavior/{ERC20.ts => ERC20.test.ts} (95%) diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.test.ts similarity index 95% rename from contracts/test/token/starkgate/behavior/ERC20.ts rename to contracts/test/token/starkgate/behavior/ERC20.test.ts index cdcb342e0..6b68231ca 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.test.ts @@ -3,7 +3,7 @@ import { StarknetContract, Account } from 'hardhat/types/runtime' import { uint256 } from 'starknet' import { toBN } from 'starknet/utils/number' import { TIMEOUT } from '../../../constants' -import * as utils from '../../../utils' +import { assertErrorMsg } from '../../../utils' export type TestData = { token: StarknetContract @@ -25,7 +25,6 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { }) it('should mint successfully', async () => { - console.log(Object.keys(utils)) /* Mint some token with the good minter and check the user's balance */ await t.owner.invoke(t.token, 'permissionedMint', { recipient: t.alice.starknetContract.address, @@ -102,7 +101,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { @@ -113,7 +112,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -195,7 +194,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.alice.invoke(t.token, 'transfer', { @@ -205,7 +204,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -272,7 +271,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -283,7 +282,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) @@ -384,7 +383,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } try { await t.owner.invoke(t.token, 'transferFrom', { @@ -395,7 +394,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { throw new Error('This should not pass!') } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true - utils.assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') + assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') } }) }) From c30da1b05b9524c2e5705c2acf724c96caf7757e Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 2 Sep 2022 15:45:34 +0200 Subject: [PATCH 08/20] change link_token.test.ts with new name of ERC20 fill --- contracts/test/token/starkgate/link_token.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/test/token/starkgate/link_token.test.ts b/contracts/test/token/starkgate/link_token.test.ts index 7d7d8f08e..6455d6a1b 100644 --- a/contracts/test/token/starkgate/link_token.test.ts +++ b/contracts/test/token/starkgate/link_token.test.ts @@ -1,6 +1,6 @@ import { starknet } from 'hardhat' import { TIMEOUT } from '../../constants' -import { shouldBehaveLikeStarkGateERC20 } from '../starkgate/behavior/ERC20' +import { shouldBehaveLikeStarkGateERC20 } from './behavior/ERC20.test' describe('link_token', function () { this.timeout(TIMEOUT) From cc380c311ea5344df5dcf818f1b96253f01360c1 Mon Sep 17 00:00:00 2001 From: qperrot Date: Fri, 2 Sep 2022 16:13:12 +0200 Subject: [PATCH 09/20] restor to original but still have module not found --- .../test/token/starkgate/behavior/{ERC20.test.ts => ERC20.ts} | 2 +- contracts/test/token/starkgate/link_token.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename contracts/test/token/starkgate/behavior/{ERC20.test.ts => ERC20.ts} (99%) diff --git a/contracts/test/token/starkgate/behavior/ERC20.test.ts b/contracts/test/token/starkgate/behavior/ERC20.ts similarity index 99% rename from contracts/test/token/starkgate/behavior/ERC20.test.ts rename to contracts/test/token/starkgate/behavior/ERC20.ts index 6b68231ca..ae9faec07 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.test.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -3,7 +3,7 @@ import { StarknetContract, Account } from 'hardhat/types/runtime' import { uint256 } from 'starknet' import { toBN } from 'starknet/utils/number' import { TIMEOUT } from '../../../constants' -import { assertErrorMsg } from '../../../utils' +import { assertErrorMsg } from '../../../../test/utils' export type TestData = { token: StarknetContract diff --git a/contracts/test/token/starkgate/link_token.test.ts b/contracts/test/token/starkgate/link_token.test.ts index 6455d6a1b..010e50d18 100644 --- a/contracts/test/token/starkgate/link_token.test.ts +++ b/contracts/test/token/starkgate/link_token.test.ts @@ -1,6 +1,6 @@ import { starknet } from 'hardhat' import { TIMEOUT } from '../../constants' -import { shouldBehaveLikeStarkGateERC20 } from './behavior/ERC20.test' +import { shouldBehaveLikeStarkGateERC20 } from './behavior/ERC20' describe('link_token', function () { this.timeout(TIMEOUT) From c249d07bf384f73ec526402fe11364cc36366492 Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 11:54:55 +0200 Subject: [PATCH 10/20] Clean up ERC20 cairo behaviour test --- .../test/token/starkgate/behavior/ERC20.ts | 187 +++++------------- 1 file changed, 52 insertions(+), 135 deletions(-) diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index ae9faec07..41e8443d7 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -14,6 +14,20 @@ export type TestData = { export type BeforeFn = () => Promise +const expectERC20Balance = async (token: StarknetContract, acc: Account, expected: number) => { + const { balance: raw } = await token.call('balanceOf', { + account: acc.starknetContract.address, + }) + const balance = uint256.uint256ToBN(raw) + expect(balance).to.deep.equal(toBN(expected)) +} + +const expectERC20TotalSupply = async (token: StarknetContract, expected: number) => { + const { totalSupply: raw } = await token.call('totalSupply', {}) + const totalSupply = uint256.uint256ToBN(raw) + expect(totalSupply).to.deep.equal(toBN(expected)) +} + export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { describe('ContractERC20Token', function () { this.timeout(TIMEOUT) @@ -30,29 +44,16 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.alice.starknetContract.address, amount: uint256.bnToUint256(15), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance = uint256.uint256ToBN(balance) - expect(sum_balance).to.deep.equal(toBN(15)) - } + + await expectERC20Balance(t.token, t.alice, 15) await t.owner.invoke(t.token, 'permissionedMint', { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(12), }) - { - const { totalSupply: totalSupply } = await t.token.call('totalSupply', {}) - let supply = uint256.uint256ToBN(totalSupply) - expect(supply).to.deep.equal(toBN(27)) - const { balance: balance } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance = uint256.uint256ToBN(balance) - expect(sum_balance).to.deep.equal(toBN(12)) - } + await expectERC20TotalSupply(t.token, 27) + await expectERC20Balance(t.token, t.bob, 12) }) it('should burn successfully', async () => { @@ -61,33 +62,17 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { account: t.alice.starknetContract.address, amount: uint256.bnToUint256(3), }) - { - const { totalSupply: totalSupply } = await t.token.call('totalSupply', {}) - let supply = uint256.uint256ToBN(totalSupply) - expect(supply).to.deep.equal(toBN(24)) - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance = uint256.uint256ToBN(balance) - expect(sum_balance).to.deep.equal(toBN(12)) - } + await expectERC20TotalSupply(t.token, 24) + await expectERC20Balance(t.token, t.alice, 12) await t.owner.invoke(t.token, 'permissionedBurn', { account: t.bob.starknetContract.address, amount: uint256.bnToUint256(10), }) - { - const { totalSupply: totalSupply } = await t.token.call('totalSupply', {}) - let supply = uint256.uint256ToBN(totalSupply) - expect(supply).to.deep.equal(toBN(14)) - const { balance: balance } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance = uint256.uint256ToBN(balance) - expect(sum_balance).to.deep.equal(toBN(2)) - } + await expectERC20TotalSupply(t.token, 14) + await expectERC20Balance(t.token, t.bob, 2) }) it('should burn fail because amount bigger than balance', async () => { @@ -98,7 +83,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { account: t.bob.starknetContract.address, amount: uint256.bnToUint256(103), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -109,7 +94,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { account: t.alice.starknetContract.address, amount: uint256.bnToUint256(189), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -124,7 +109,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { account: t.bob.starknetContract.address, amount: uint256.bnToUint256(103), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true } @@ -134,7 +119,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { account: t.alice.starknetContract.address, amount: uint256.bnToUint256(189), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true } @@ -146,41 +131,21 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(3), }) - { - await t.alice.invoke(t.token, 'transfer', { - recipient: t.bob.starknetContract.address, - amount: uint256.bnToUint256(3), - }) - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance = uint256.uint256ToBN(balance) - expect(sum_balance).to.deep.equal(toBN(9)) + await t.alice.invoke(t.token, 'transfer', { + recipient: t.bob.starknetContract.address, + amount: uint256.bnToUint256(3), + }) - const { balance: balance1 } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance1) - expect(sum_balance1).to.deep.equal(toBN(8)) - } + await expectERC20Balance(t.token, t.alice, 9) + await expectERC20Balance(t.token, t.bob, 8) await t.bob.invoke(t.token, 'transfer', { recipient: t.alice.starknetContract.address, amount: uint256.bnToUint256(4), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance) - expect(sum_balance1).to.deep.equal(toBN(4)) - const { balance: balance1 } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance2 = uint256.uint256ToBN(balance1) - expect(sum_balance2).to.deep.equal(toBN(13)) - } + await expectERC20Balance(t.token, t.alice, 13) + await expectERC20Balance(t.token, t.bob, 4) }) it('should transfer fail because amount bigger than balance', async () => { @@ -191,7 +156,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.alice.starknetContract.address, amount: uint256.bnToUint256(12), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -201,7 +166,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(17), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -225,38 +190,19 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(3), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance) - expect(sum_balance1).to.deep.equal(toBN(10)) - const { balance: balance1 } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance2 = uint256.uint256ToBN(balance1) - expect(sum_balance2).to.deep.equal(toBN(7)) - } + + await expectERC20Balance(t.token, t.alice, 10) + await expectERC20Balance(t.token, t.bob, 7) await t.owner.invoke(t.token, 'transferFrom', { sender: t.bob.starknetContract.address, recipient: t.alice.starknetContract.address, amount: uint256.bnToUint256(4), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance) - expect(sum_balance1).to.deep.equal(toBN(14)) - const { balance: balance1 } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance2 = uint256.uint256ToBN(balance1) - expect(sum_balance2).to.deep.equal(toBN(3)) - } + await expectERC20Balance(t.token, t.alice, 14) + await expectERC20Balance(t.token, t.bob, 3) }) it('should transferFrom fail because amount bigger than allowance', async () => { @@ -268,7 +214,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.alice.starknetContract.address, amount: uint256.bnToUint256(200), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -279,7 +225,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(300), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -302,19 +248,10 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(3), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance) - expect(sum_balance1).to.deep.equal(toBN(11)) - const { balance: balance1 } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance2 = uint256.uint256ToBN(balance1) - expect(sum_balance2).to.deep.equal(toBN(6)) - } + await expectERC20Balance(t.token, t.alice, 11) + await expectERC20Balance(t.token, t.bob, 6) + await t.bob.invoke(t.token, 'increaseAllowance', { spender: t.owner.starknetContract.address, added_value: uint256.bnToUint256(15), @@ -329,19 +266,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(11), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance) - expect(sum_balance1).to.deep.equal(toBN(0)) - const { balance: balance1 } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance2 = uint256.uint256ToBN(balance1) - expect(sum_balance2).to.deep.equal(toBN(17)) - } + await expectERC20Balance(t.token, t.alice, 0) + await expectERC20Balance(t.token, t.bob, 17) }) it('should decrease alllowance and transfer successfully', async () => { @@ -356,19 +283,9 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.alice.starknetContract.address, amount: uint256.bnToUint256(1), }) - { - const { balance: balance } = await t.token.call('balanceOf', { - account: t.alice.starknetContract.address, - }) - let sum_balance1 = uint256.uint256ToBN(balance) - expect(sum_balance1).to.deep.equal(toBN(1)) - const { balance: balance2 } = await t.token.call('balanceOf', { - account: t.bob.starknetContract.address, - }) - let sum_balance2 = uint256.uint256ToBN(balance2) - expect(sum_balance2).to.deep.equal(toBN(16)) - } + await expectERC20Balance(t.token, t.alice, 1) + await expectERC20Balance(t.token, t.bob, 16) }) it('should transferFrom fail because amount bigger than allowance', async () => { @@ -380,7 +297,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.alice.starknetContract.address, amount: { low: 8n, high: 10n }, }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') @@ -391,7 +308,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { recipient: t.bob.starknetContract.address, amount: uint256.bnToUint256(208), }) - throw new Error('This should not pass!') + expect.fail() } catch (error: any) { expect(/assert/gi.test(error.message)).to.be.true assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') From 2c1c892e55a6a9950f428bbcad8355e1e5cd95fd Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 15:23:38 +0200 Subject: [PATCH 11/20] Fix link_token.cairo interface and fix/refactor ERC20 tests --- .../token/starkgate/presets/link_token.cairo | 12 +- .../emergency/sequencer_uptime_feed.test.ts | 30 +- contracts/test/ocr2/aggregator.test.ts | 2 +- contracts/test/token/ERC677/ERC677.test.ts | 2 +- .../test/token/ERC677/link-receiver.test.ts | 4 +- .../test/token/starkgate/behavior/ERC20.ts | 262 ++++++++---------- contracts/test/utils.ts | 45 ++- .../src/commands/token/mint.ts | 8 +- yarn.lock | 24 ++ 9 files changed, 197 insertions(+), 192 deletions(-) diff --git a/contracts/src/chainlink/cairo/token/starkgate/presets/link_token.cairo b/contracts/src/chainlink/cairo/token/starkgate/presets/link_token.cairo index 14c20c9ee..fd019db4f 100644 --- a/contracts/src/chainlink/cairo/token/starkgate/presets/link_token.cairo +++ b/contracts/src/chainlink/cairo/token/starkgate/presets/link_token.cairo @@ -143,13 +143,15 @@ end @external func permissionedMint{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr}( - recipient : felt, amount : Uint256 + account : felt, amount : Uint256 ): alloc_locals - permitted_minter_only() + with_attr error_message("LinkToken: no permission"): + permitted_minter_only() + end local syscall_ptr : felt* = syscall_ptr - ERC20._mint(recipient=recipient, amount=amount) + ERC20._mint(recipient=account, amount=amount) return () end @@ -159,7 +161,9 @@ func permissionedBurn{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_ch account : felt, amount : Uint256 ): alloc_locals - permitted_minter_only() + with_attr error_message("LinkToken: no permission"): + permitted_minter_only() + end local syscall_ptr : felt* = syscall_ptr ERC20._burn(account=account, amount=amount) diff --git a/contracts/test/emergency/sequencer_uptime_feed.test.ts b/contracts/test/emergency/sequencer_uptime_feed.test.ts index cec15121d..80751755f 100644 --- a/contracts/test/emergency/sequencer_uptime_feed.test.ts +++ b/contracts/test/emergency/sequencer_uptime_feed.test.ts @@ -31,12 +31,10 @@ describe('SequencerUptimeFeed', function () { it('should block non-owners from making admin changes', async function () { await owner.invoke(uptimeFeedContract, 'add_access', { user }) - try { - await nonOwner.invoke(uptimeFeedContract, 'add_access', { user }) - expect.fail() - } catch (err: any) { - expectInvokeError(err?.message, 'Ownable: caller is not the owner') - } + await expectInvokeError( + nonOwner.invoke(uptimeFeedContract, 'add_access', { user }), + 'Ownable: caller is not the owner', + ) }) it('should report access information correctly', async function () { @@ -54,12 +52,10 @@ describe('SequencerUptimeFeed', function () { it('should error on `check_access` without access', async function () { await uptimeFeedContract.call('check_access', { user: user }) - try { - await owner.invoke(uptimeFeedContract, 'check_access', { user: user + 1 }) - expect.fail() - } catch (err: any) { - expectInvokeError(err?.message, 'AccessController: address does not have access') - } + await expectInvokeError( + owner.invoke(uptimeFeedContract, 'check_access', { user: user + 1 }), + 'AccessController: address does not have access', + ) }) }) @@ -93,12 +89,10 @@ describe('SequencerUptimeFeed', function () { it('should block access when using an account without access', async function () { const accWithoutAccess = await starknet.deployAccount('OpenZeppelin') - try { - await accWithoutAccess.call(proxyContract, 'latest_round_data') - expect.fail() - } catch (err: any) { - expectCallError(err?.message, 'AccessController: address does not have access') - } + await expectCallError( + accWithoutAccess.call(proxyContract, 'latest_round_data'), + 'AccessController: address does not have access', + ) }) it('should respond via a Proxy', async function () { diff --git a/contracts/test/ocr2/aggregator.test.ts b/contracts/test/ocr2/aggregator.test.ts index 782de2fdd..dec439591 100644 --- a/contracts/test/ocr2/aggregator.test.ts +++ b/contracts/test/ocr2/aggregator.test.ts @@ -93,7 +93,7 @@ describe('aggregator.cairo', function () { token = await tokenFactory.deploy({ owner: owner.starknetContract.address }) await owner.invoke(token, 'permissionedMint', { - recipient: owner.starknetContract.address, + account: owner.starknetContract.address, amount: uint256.bnToUint256(100_000_000_000), }) diff --git a/contracts/test/token/ERC677/ERC677.test.ts b/contracts/test/token/ERC677/ERC677.test.ts index db714e353..63fe34dbf 100644 --- a/contracts/test/token/ERC677/ERC677.test.ts +++ b/contracts/test/token/ERC677/ERC677.test.ts @@ -25,7 +25,7 @@ describe('ERC677', function () { token = await tokenFactory.deploy({ owner: sender.starknetContract.address }) await sender.invoke(token, 'permissionedMint', { - recipient: sender.starknetContract.address, + account: sender.starknetContract.address, amount: uint256.bnToUint256(1000), }) diff --git a/contracts/test/token/ERC677/link-receiver.test.ts b/contracts/test/token/ERC677/link-receiver.test.ts index 86e08ffce..6ccf4c3bd 100644 --- a/contracts/test/token/ERC677/link-receiver.test.ts +++ b/contracts/test/token/ERC677/link-receiver.test.ts @@ -28,7 +28,7 @@ describe('LinkToken', function () { token = await tokenFactory.deploy({ owner: owner.starknetContract.address }) await owner.invoke(token, 'permissionedMint', { - recipient: owner.starknetContract.address, + account: owner.starknetContract.address, amount: uint256.bnToUint256(1000000000000000), }) }) @@ -63,7 +63,7 @@ describe('LinkToken', function () { }) // TODO For now it let you transfer to the contract itself - xit('does not let you transfer to the contract itself', async () => { + it.skip('does not let you transfer to the contract itself', async () => { try { await sender.invoke(token, 'transfer', { recipient: token.address, diff --git a/contracts/test/token/starkgate/behavior/ERC20.ts b/contracts/test/token/starkgate/behavior/ERC20.ts index 41e8443d7..fe103ccf2 100644 --- a/contracts/test/token/starkgate/behavior/ERC20.ts +++ b/contracts/test/token/starkgate/behavior/ERC20.ts @@ -3,8 +3,9 @@ import { StarknetContract, Account } from 'hardhat/types/runtime' import { uint256 } from 'starknet' import { toBN } from 'starknet/utils/number' import { TIMEOUT } from '../../../constants' -import { assertErrorMsg } from '../../../../test/utils' +import { expectInvokeError } from '../../../../test/utils' +export type BeforeFn = () => Promise export type TestData = { token: StarknetContract owner: Account @@ -12,7 +13,11 @@ export type TestData = { bob: Account } -export type BeforeFn = () => Promise +const addresses = (t: TestData) => ({ + owner: t.owner.starknetContract.address, + bob: t.bob.starknetContract.address, + alice: t.alice.starknetContract.address, +}) const expectERC20Balance = async (token: StarknetContract, acc: Account, expected: number) => { const { balance: raw } = await token.call('balanceOf', { @@ -29,7 +34,7 @@ const expectERC20TotalSupply = async (token: StarknetContract, expected: number) } export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { - describe('ContractERC20Token', function () { + describe('StarkGate.ERC20 behavior', function () { this.timeout(TIMEOUT) let t: TestData @@ -38,17 +43,18 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { t = await beforeFn() }) - it('should mint successfully', async () => { - /* Mint some token with the good minter and check the user's balance */ + it(`should 'permissionedMint' successfully (2x)`, async () => { + const { alice, bob } = addresses(t) + await t.owner.invoke(t.token, 'permissionedMint', { - recipient: t.alice.starknetContract.address, + account: alice, amount: uint256.bnToUint256(15), }) await expectERC20Balance(t.token, t.alice, 15) await t.owner.invoke(t.token, 'permissionedMint', { - recipient: t.bob.starknetContract.address, + account: bob, amount: uint256.bnToUint256(12), }) @@ -56,10 +62,11 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 12) }) - it('should burn successfully', async () => { - /* Burn some token with the good minter and check the user's balance */ + it(`should 'permissionedBurn' successfully (2x)`, async () => { + const { alice, bob } = addresses(t) + await t.owner.invoke(t.token, 'permissionedBurn', { - account: t.alice.starknetContract.address, + account: alice, amount: uint256.bnToUint256(3), }) @@ -67,7 +74,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.alice, 12) await t.owner.invoke(t.token, 'permissionedBurn', { - account: t.bob.starknetContract.address, + account: bob, amount: uint256.bnToUint256(10), }) @@ -75,64 +82,51 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 2) }) - it('should burn fail because amount bigger than balance', async () => { - /* Burn some token with the good minter but with an amount bigger than the balance */ - /* All test should fail */ - try { - await t.owner.invoke(t.token, 'permissionedBurn', { - account: t.bob.starknetContract.address, + it(`reverts on 'permissionedBurn' (amount > balance)`, async () => { + const { alice, bob } = addresses(t) + + await expectInvokeError( + t.owner.invoke(t.token, 'permissionedBurn', { + account: bob, amount: uint256.bnToUint256(103), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } - - try { - await t.owner.invoke(t.token, 'permissionedBurn', { - account: t.alice.starknetContract.address, + }), + ) + + await expectInvokeError( + t.owner.invoke(t.token, 'permissionedBurn', { + account: alice, amount: uint256.bnToUint256(189), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } + }), + ) }) - it('should burn fail because wrong minter', async () => { - /* Burn some token with the wrong minter */ - /* All test should fail */ - try { - await t.alice.invoke(t.token, 'permissionedBurn', { - account: t.bob.starknetContract.address, + it(`reverts on 'permissionedBurn' without permission`, async () => { + const { alice, bob } = addresses(t) + + await expectInvokeError( + t.alice.invoke(t.token, 'permissionedBurn', { + account: bob, amount: uint256.bnToUint256(103), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - } - - try { - await t.bob.invoke(t.token, 'permissionedBurn', { - account: t.alice.starknetContract.address, + }), + ) + + await expectInvokeError( + t.bob.invoke(t.token, 'permissionedBurn', { + account: alice, amount: uint256.bnToUint256(189), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - } + }), + ) }) - it('should transfer successfully', async () => { - /* Transfer some token from one user to another and check balance of both users */ + it(`should 'permissionedMint' and 'transfer' successfully`, async () => { + const { alice, bob } = addresses(t) + await t.owner.invoke(t.token, 'permissionedMint', { - recipient: t.bob.starknetContract.address, + account: bob, amount: uint256.bnToUint256(3), }) await t.alice.invoke(t.token, 'transfer', { - recipient: t.bob.starknetContract.address, + recipient: bob, amount: uint256.bnToUint256(3), }) @@ -140,7 +134,7 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 8) await t.bob.invoke(t.token, 'transfer', { - recipient: t.alice.starknetContract.address, + recipient: alice, amount: uint256.bnToUint256(4), }) @@ -148,56 +142,50 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 4) }) - it('should transfer fail because amount bigger than balance', async () => { - /* Transfer some token from one user to another with amout bigger than balance */ - /* All tests should fail */ - try { - await t.bob.invoke(t.token, 'transfer', { - recipient: t.alice.starknetContract.address, + it(`reverts on 'transfer' (amount > balance)`, async () => { + const { alice, bob } = addresses(t) + + await expectInvokeError( + t.bob.invoke(t.token, 'transfer', { + recipient: alice, amount: uint256.bnToUint256(12), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } - try { - await t.alice.invoke(t.token, 'transfer', { - recipient: t.bob.starknetContract.address, + }), + 'ERC20: transfer amount exceeds balance', + ) + + await expectInvokeError( + t.alice.invoke(t.token, 'transfer', { + recipient: bob, amount: uint256.bnToUint256(17), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } + }), + 'ERC20: transfer amount exceeds balance', + ) }) - it('should transferFrom successfully', async () => { - /* Increase balance then use transferFrom to transfer some token from one user to another and check balance of both users */ + it(`should 'increaseAllowance' and 'transferFrom' successfully - #1`, async () => { + const { owner, alice, bob } = addresses(t) await t.bob.invoke(t.token, 'increaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, added_value: uint256.bnToUint256(7), }) await t.alice.invoke(t.token, 'increaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, added_value: uint256.bnToUint256(7), }) await t.owner.invoke(t.token, 'transferFrom', { - sender: t.alice.starknetContract.address, - recipient: t.bob.starknetContract.address, + sender: alice, + recipient: bob, amount: uint256.bnToUint256(3), }) - await expectERC20Balance(t.token, t.alice, 10) await expectERC20Balance(t.token, t.bob, 7) await t.owner.invoke(t.token, 'transferFrom', { - sender: t.bob.starknetContract.address, - recipient: t.alice.starknetContract.address, + sender: bob, + recipient: alice, amount: uint256.bnToUint256(4), }) @@ -205,47 +193,21 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 3) }) - it('should transferFrom fail because amount bigger than allowance', async () => { - /* Use transferFrom to transfer some token from one user to another */ - /* All test should fail because amount bigger than allowance */ - try { - await t.owner.invoke(t.token, 'transferFrom', { - sender: t.bob.starknetContract.address, - recipient: t.alice.starknetContract.address, - amount: uint256.bnToUint256(200), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } - try { - await t.owner.invoke(t.token, 'transferFrom', { - sender: t.alice.starknetContract.address, - recipient: t.bob.starknetContract.address, - amount: uint256.bnToUint256(300), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } - }) + it(`should 'increaseAllowance' and 'transferFrom' successfully - #2`, async () => { + const { owner, alice, bob } = addresses(t) - it('should increase alllowance and transfer some tokens successfully', async () => { - /* Increase allowance and check if we can use transferFrom to transfer some tokens */ await t.bob.invoke(t.token, 'increaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, added_value: uint256.bnToUint256(7), }) await t.alice.invoke(t.token, 'increaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, added_value: uint256.bnToUint256(7), }) await t.owner.invoke(t.token, 'transferFrom', { - sender: t.alice.starknetContract.address, - recipient: t.bob.starknetContract.address, + sender: alice, + recipient: bob, amount: uint256.bnToUint256(3), }) @@ -253,17 +215,17 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 6) await t.bob.invoke(t.token, 'increaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, added_value: uint256.bnToUint256(15), }) await t.alice.invoke(t.token, 'increaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, added_value: uint256.bnToUint256(15), }) await t.owner.invoke(t.token, 'transferFrom', { - sender: t.alice.starknetContract.address, - recipient: t.bob.starknetContract.address, + sender: alice, + recipient: bob, amount: uint256.bnToUint256(11), }) @@ -271,16 +233,17 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 17) }) - it('should decrease alllowance and transfer successfully', async () => { - /* Decrease allowance and check if we can use transferFrom to transfer some tokens */ + it(`should 'decreaseAllowance' and 'transferFrom' successfully`, async () => { + const { owner, alice, bob } = addresses(t) + await t.bob.invoke(t.token, 'decreaseAllowance', { - spender: t.owner.starknetContract.address, + spender: owner, subtracted_value: uint256.bnToUint256(10), }) await t.owner.invoke(t.token, 'transferFrom', { - sender: t.bob.starknetContract.address, - recipient: t.alice.starknetContract.address, + sender: bob, + recipient: alice, amount: uint256.bnToUint256(1), }) @@ -288,31 +251,26 @@ export const shouldBehaveLikeStarkGateERC20 = (beforeFn: BeforeFn) => { await expectERC20Balance(t.token, t.bob, 16) }) - it('should transferFrom fail because amount bigger than allowance', async () => { - /* Increase allowance and check if we can use transferFrom to transfer some tokens */ - /* All test should fail because amount bigger than allowance */ - try { - await t.owner.invoke(t.token, 'transferFrom', { - sender: t.bob.starknetContract.address, - recipient: t.alice.starknetContract.address, + it(`reverts on 'transferFrom' (amount > allowance)`, async () => { + const { alice, bob } = addresses(t) + + await expectInvokeError( + t.owner.invoke(t.token, 'transferFrom', { + sender: bob, + recipient: alice, amount: { low: 8n, high: 10n }, - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } - try { - await t.owner.invoke(t.token, 'transferFrom', { - sender: t.alice.starknetContract.address, - recipient: t.bob.starknetContract.address, + }), + 'ERC20: insufficient allowance', + ) + + await expectInvokeError( + t.owner.invoke(t.token, 'transferFrom', { + sender: alice, + recipient: bob, amount: uint256.bnToUint256(208), - }) - expect.fail() - } catch (error: any) { - expect(/assert/gi.test(error.message)).to.be.true - assertErrorMsg(error?.message, 'SafeUint256: subtraction overflow') - } + }), + 'ERC20: insufficient allowance', + ) }) }) } diff --git a/contracts/test/utils.ts b/contracts/test/utils.ts index 126443ac6..3cb47b472 100644 --- a/contracts/test/utils.ts +++ b/contracts/test/utils.ts @@ -1,21 +1,46 @@ import { expect } from 'chai' -export const expectInvokeError = (full: string, expected: string) => { +export const expectInvokeError = async (invoke: Promise, expected?: string) => { + try { + await invoke + } catch (err: any) { + expectInvokeErrorMsg(err?.message, expected) + return // force + } + expect.fail("Unexpected! Invoke didn't error!?") +} + +export const expectInvokeErrorMsg = (actual: string, expected?: string) => { // Match transaction error - expect(full).to.deep.contain('Transaction rejected. Error message:') + expect(actual).to.deep.contain('Transaction rejected. Error message:') // Match specific error - const match = /Error message: (.+?)\n/.exec(full) - if (match && match.length > 1) expect(match[1]).to.equal(expected) - else expect.fail(`No expected error found: ${expected} \nFull error message: ${full}`) + if (expected) expectSpecificMsg(actual, expected) +} + +export const expectCallError = async (call: Promise, expected?: string) => { + try { + await call + } catch (err: any) { + expectCallErrorMsg(err?.message, expected) + return // force + } + expect.fail("Unexpected! Call didn't error!?") } -export const expectCallError = (full: string, expected: string) => { +export const expectCallErrorMsg = (actual: string, expected?: string) => { // Match call error - expect(full).to.deep.contain('Could not perform call') + expect(actual).to.deep.contain('Could not perform call') + // Match specific error + if (expected) expectSpecificMsg(actual, expected) +} + +export const expectSpecificMsg = (actual: string, expected: string) => { // Match specific error - const match = /Error message: (.+?)\n/.exec(full) - if (match && match.length > 1) expect(match[1]).to.equal(expected) - else expect.fail(`No expected error found: ${expected} \nFull error message: ${full}`) + const matches = actual.match(/Error message: (.+?)\n/g) + // Joint matches should contain the expected, or fail + if (matches && matches.length > 1) { + expect(matches.join()).to.contain(expected) + } else expect.fail(actual, expected, 'Specific error message not found.') } /** diff --git a/packages-ts/starknet-gauntlet-starkgate/src/commands/token/mint.ts b/packages-ts/starknet-gauntlet-starkgate/src/commands/token/mint.ts index 29028579b..822b0834c 100644 --- a/packages-ts/starknet-gauntlet-starkgate/src/commands/token/mint.ts +++ b/packages-ts/starknet-gauntlet-starkgate/src/commands/token/mint.ts @@ -10,23 +10,23 @@ import { CATEGORIES } from '../../lib/categories' import { contractLoader, CONTRACT_LIST } from '../../lib/contracts' type UserInput = { - recipient: string + account: string amount: string } -type ContractInput = [recipient: string, amount: Uint256] +type ContractInput = [account: string, amount: Uint256] const makeUserInput = async (flags, args): Promise => { if (flags.input) return flags.input as UserInput return { - recipient: flags.recipient, + account: flags.account, amount: flags.amount, } } const makeContractInput = async (input: UserInput): Promise => { - return [input.recipient, bnToUint256(input.amount)] + return [input.account, bnToUint256(input.amount)] } const beforeExecute: BeforeExecute = ( diff --git a/yarn.lock b/yarn.lock index 01340070b..c1697b4d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1516,6 +1516,11 @@ "@types/sinon-chai" "^3.2.3" "@types/web3" "1.0.19" +"@openzeppelin/contracts@^4.7.3": + version "4.7.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" + integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -6147,6 +6152,25 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" +internals-starkgate-contracts@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/internals-starkgate-contracts/-/internals-starkgate-contracts-0.0.0.tgz#93d85cd670a7f0257de45091eeacf6037b2122ea" + integrity sha512-P26ftro7Z7QaZ7fZ0njSAMpeiDLNwZoXeDANK9keHSP/ZEu4KeGyVMOzBuFKmrDw1nG6vP8q2wh5hI7w1EHvAA== + +internals-starkgate-contracts@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/internals-starkgate-contracts/-/internals-starkgate-contracts-0.0.2.tgz#08b8f68a198a80b3197064edbf1e8caa3fda8f29" + integrity sha512-Ig29kLZtGmf2z/elr98AM6BFJfSWv8zRU7fVzaV2RpY+WItJjOWWLMBVLhmD4qyZkcPVBfUO8WTMZlJDSBxS9Q== + dependencies: + internals-starkgate-contracts "^0.0.0" + +internals-starkgate-contracts@^0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/internals-starkgate-contracts/-/internals-starkgate-contracts-0.0.3.tgz#d19f550b65bf153c8d1862d4a27e7fab28af370b" + integrity sha512-yCP3lpegs1XJstX2JDLTpLBH4t7Yet7P058hG1ZBN/BVP6nVMIsd1CW11Qq9zUY67c5BX9cSxaqxaP1Yih1AxA== + dependencies: + internals-starkgate-contracts "^0.0.2" + into-stream@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702" From f1759b65e86cc788200b10876246445db68395ac Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 17:31:30 +0200 Subject: [PATCH 12/20] Fix tests and restructure tests runners --- .github/workflows/contracts.yml | 7 +++++-- Makefile | 14 +++++++++++++- contracts/test/utils.ts | 8 ++++---- jest.config.js | 1 + ops/scripts/devnet-hardhat.sh | 4 +++- package.json | 7 +++---- .../integration-eqlabs-multisig/package.json | 2 +- .../starknet-gauntlet-argent/package.json | 13 ++++++++++++- packages-ts/starknet-gauntlet-cli/package.json | 13 ++++++++++++- .../starknet-gauntlet-example/package.json | 13 ++++++++++++- .../starknet-gauntlet-multisig/package.json | 13 ++++++++++++- packages-ts/starknet-gauntlet-ocr2/package.json | 13 ++++++++++++- packages-ts/starknet-gauntlet-oz/package.json | 13 ++++++++++++- .../starknet-gauntlet-starkgate/package.json | 13 ++++++++++++- packages-ts/starknet-gauntlet/package.json | 13 ++++++++++++- scripts/test.sh | 16 ---------------- 16 files changed, 126 insertions(+), 37 deletions(-) mode change 100644 => 100755 ops/scripts/devnet-hardhat.sh delete mode 100755 scripts/test.sh diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index 99f2d7d08..692d45b2c 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -23,5 +23,8 @@ jobs: - name: Check format run: nix develop -c make format-cairo-check - - name: Run unit tests - run: nix develop -c ./scripts/test.sh + - name: Build + run: nix develop -c make build-ts-contracts + + - name: Test + run: nix develop -c make test-contracts diff --git a/Makefile b/Makefile index 220a42dbb..ee6cc9332 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,8 @@ build-ts-workspace: yarn install yarn build +# TODO: use yarn workspaces features instead of managing separately like this +# https://yarnpkg.com/cli/workspaces/foreach .PHONY: build-ts-contracts build-ts-contracts: cd contracts/ && \ @@ -93,7 +95,7 @@ build-ts-examples: cd examples/contracts/aggregator-consumer && \ yarn install && \ yarn compile - + .PHONY: gowork gowork: go work init @@ -162,3 +164,13 @@ test-integration: test-integration-smoke .PHONY: test-integration-smoke test-integration-smoke: ginkgo -v -r --junit-report=tests-smoke-report.xml --keep-going --trace integration-tests/smoke + +.PHONY: test-contracts +test-contracts: build-ts-contracts env-devnet-hardhat + cd contracts/ && \ + yarn test + +# TODO: this script needs to be replaced with a predefined K8s enviroment +.PHONY: env-devnet-hardhat +env-devnet-hardhat: + ./ops/scripts/devnet-hardhat.sh diff --git a/contracts/test/utils.ts b/contracts/test/utils.ts index 3cb47b472..182ffcc0e 100644 --- a/contracts/test/utils.ts +++ b/contracts/test/utils.ts @@ -37,10 +37,10 @@ export const expectCallErrorMsg = (actual: string, expected?: string) => { export const expectSpecificMsg = (actual: string, expected: string) => { // Match specific error const matches = actual.match(/Error message: (.+?)\n/g) - // Joint matches should contain the expected, or fail - if (matches && matches.length > 1) { - expect(matches.join()).to.contain(expected) - } else expect.fail(actual, expected, 'Specific error message not found.') + // Joint matches should include the expected, or fail + if (matches && matches.length > 0) { + expect(matches.join()).to.include(expected) + } else expect.fail(`\nActual: ${actual}\n\nExpected: ${expected}`) } /** diff --git a/jest.config.js b/jest.config.js index adea57397..880336dd3 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,4 @@ +// TODO: it doesn't seem this file is actually used module.exports = { rootDir: '.', projects: [ diff --git a/ops/scripts/devnet-hardhat.sh b/ops/scripts/devnet-hardhat.sh old mode 100644 new mode 100755 index bf8bbb453..cd0f55ea8 --- a/ops/scripts/devnet-hardhat.sh +++ b/ops/scripts/devnet-hardhat.sh @@ -1,4 +1,6 @@ -#!/bin/sh +#!/usr/bin/env bash +# TODO: this script needs to be replaced with a predefined K8s enviroment + cpu_struct=`arch`; echo $cpu_struct; diff --git a/package.json b/package.json index 6415c1630..54c9c1b60 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,9 @@ "version": "0.0.1", "description": "Chainlink's StarkNet integration monorepo", "workspaces": [ - "packages-ts/*", "contracts", - "integration-tests", - "relayer" + "examples/contracts/*", + "packages-ts/*" ], "keywords": [ "typescript", @@ -17,7 +16,7 @@ "bin": "packages-ts/starknet-gauntlet-cli/dist/index.js", "scripts": { "gauntlet": "yarn build && node ./packages-ts/starknet-gauntlet-cli/dist/index.js", - "test": "yarn build && SKIP_PROMPTS=true jest --runInBand ./packages-ts", + "test": "yarn build && yarn workspaces run test", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "lint": "tsc -b ./tsconfig.json", diff --git a/packages-ts/integration-eqlabs-multisig/package.json b/packages-ts/integration-eqlabs-multisig/package.json index d9a9b1062..2c31f99f4 100644 --- a/packages-ts/integration-eqlabs-multisig/package.json +++ b/packages-ts/integration-eqlabs-multisig/package.json @@ -7,7 +7,7 @@ "test": "test" }, "scripts": { - "test": "npx hardhat test" + "test": "npx hardhat --network localhost test" }, "devDependencies": { "@changesets/cli": "^2.22.0", diff --git a/packages-ts/starknet-gauntlet-argent/package.json b/packages-ts/starknet-gauntlet-argent/package.json index 3b9d70e27..7fe90b57b 100644 --- a/packages-ts/starknet-gauntlet-argent/package.json +++ b/packages-ts/starknet-gauntlet-argent/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-cli/package.json b/packages-ts/starknet-gauntlet-cli/package.json index b986d37ef..709420905 100644 --- a/packages-ts/starknet-gauntlet-cli/package.json +++ b/packages-ts/starknet-gauntlet-cli/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-example/package.json b/packages-ts/starknet-gauntlet-example/package.json index ead95b799..65e2f34d1 100644 --- a/packages-ts/starknet-gauntlet-example/package.json +++ b/packages-ts/starknet-gauntlet-example/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-multisig/package.json b/packages-ts/starknet-gauntlet-multisig/package.json index 999e8a9ba..a46e535d7 100644 --- a/packages-ts/starknet-gauntlet-multisig/package.json +++ b/packages-ts/starknet-gauntlet-multisig/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-ocr2/package.json b/packages-ts/starknet-gauntlet-ocr2/package.json index f8d32d342..b486a0b50 100644 --- a/packages-ts/starknet-gauntlet-ocr2/package.json +++ b/packages-ts/starknet-gauntlet-ocr2/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-oz/package.json b/packages-ts/starknet-gauntlet-oz/package.json index 514cb0e15..a3c3231c7 100644 --- a/packages-ts/starknet-gauntlet-oz/package.json +++ b/packages-ts/starknet-gauntlet-oz/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-starkgate/package.json b/packages-ts/starknet-gauntlet-starkgate/package.json index 3ca6de426..a2a7fcc2a 100644 --- a/packages-ts/starknet-gauntlet-starkgate/package.json +++ b/packages-ts/starknet-gauntlet-starkgate/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet/package.json b/packages-ts/starknet-gauntlet/package.json index 02f891d4e..ab88adeb5 100644 --- a/packages-ts/starknet-gauntlet/package.json +++ b/packages-ts/starknet-gauntlet/package.json @@ -12,10 +12,21 @@ "dist/**/*", "!dist/**/*.test.js" ], + "jest": { + "transform": { + ".(ts|tsx)": "ts-jest" + }, + "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", + "moduleFileExtensions": [ + "ts", + "tsx", + "js" + ] + }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand", + "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/scripts/test.sh b/scripts/test.sh deleted file mode 100755 index 84ea510d8..000000000 --- a/scripts/test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -set -euxo pipefail - -# TODO: this script needs to be replaced with a predefined K8s enviroment -sh ./ops/scripts/devnet-hardhat.sh - -cd contracts -yarn install -yarn compile -yarn test - -# Example tests -cd ../examples/contracts/aggregator-consumer -yarn install -yarn compile -yarn test From 7d786ed9e4f8f0d3513c01e59bc4e7e7555f49ca Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 17:59:50 +0200 Subject: [PATCH 13/20] Restructure GH workflows --- .github/workflows/contracts.yml | 13 ++--- .github/workflows/contracts_integration.yml | 30 ++++++++++ .github/workflows/gauntlet.yml | 63 --------------------- .github/workflows/lint.yml | 23 ++++++++ Makefile | 19 +++++-- 5 files changed, 71 insertions(+), 77 deletions(-) create mode 100644 .github/workflows/contracts_integration.yml delete mode 100644 .github/workflows/gauntlet.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index 692d45b2c..a5727b299 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -1,3 +1,5 @@ +name: Contracts + on: push: branches: @@ -5,11 +7,9 @@ on: - main pull_request: -name: contracts - jobs: - contract-tests: - name: Contract tests + contracts_tests: + name: Contracts tests runs-on: ubuntu-latest steps: - name: Checkout sources @@ -20,11 +20,8 @@ jobs: with: nix_path: nixpkgs=channel:nixos-unstable - - name: Check format - run: nix develop -c make format-cairo-check - - name: Build run: nix develop -c make build-ts-contracts - name: Test - run: nix develop -c make test-contracts + run: nix develop -c make test-ts-contracts diff --git a/.github/workflows/contracts_integration.yml b/.github/workflows/contracts_integration.yml new file mode 100644 index 000000000..4989b5756 --- /dev/null +++ b/.github/workflows/contracts_integration.yml @@ -0,0 +1,30 @@ +name: Contracts Integration (Vendor, Examples, Gauntlet) + +on: + push: + branches: + - develop + - main + pull_request: + +jobs: + contracts_integration: + name: Contracts Integration + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 + - name: Install Nix + uses: cachix/install-nix-action@d64e0553100205688c0fb2fa16edb0fc8663c590 # v17 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Build + run: nix develop -c make build-ts + + - name: Test + run: nix develop -c make test-integration-contracts + + - name: Test - Run Gauntlet CLI via Yarn + run: nix develop -c yarn gauntlet + diff --git a/.github/workflows/gauntlet.yml b/.github/workflows/gauntlet.yml deleted file mode 100644 index 1805a0207..000000000 --- a/.github/workflows/gauntlet.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: gauntlet - -on: - push: - branches: - - develop - - main - pull_request: - -jobs: - gauntlet_build: - name: Gauntlet Build - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 - - name: Install Nix - uses: cachix/install-nix-action@d64e0553100205688c0fb2fa16edb0fc8663c590 # v17 - with: - nix_path: nixpkgs=channel:nixos-unstable - - - name: Install - run: nix develop -c yarn install --frozen-lockfile - - - name: Build - run: nix develop -c yarn build - - - name: Run Gauntlet - run: nix develop -c yarn gauntlet - - gauntlet_format: - name: Gauntlet Format - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 - - name: Install Nix - uses: cachix/install-nix-action@d64e0553100205688c0fb2fa16edb0fc8663c590 # v17 - with: - nix_path: nixpkgs=channel:nixos-unstable - - - name: Install - run: nix develop -c yarn install --frozen-lockfile - - - name: Format Check - run: nix develop -c yarn format:check - - gauntlet_run_tests: - name: Gauntlet Run Tests - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 - - name: Install Nix - uses: cachix/install-nix-action@d64e0553100205688c0fb2fa16edb0fc8663c590 # v17 - with: - nix_path: nixpkgs=channel:nixos-unstable - - - name: Install - run: nix develop -c yarn install --frozen-lockfile - - - name: Test - run: nix develop -c yarn test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..689093513 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: lint + +on: + push: + branches: + - develop + - main + pull_request: + +jobs: + format_check: + name: Format Check + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 + - name: Install Nix + uses: cachix/install-nix-action@d64e0553100205688c0fb2fa16edb0fc8663c590 # v17 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Check + run: nix develop -c make format-check diff --git a/Makefile b/Makefile index ee6cc9332..5a0b2af7b 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ build-ts: build-ts-workspace build-ts-contracts build-ts-examples .PHONY: build-ts-workspace build-ts-workspace: - yarn install + yarn install --frozen-lockfile yarn build # TODO: use yarn workspaces features instead of managing separately like this @@ -87,13 +87,13 @@ build-ts-workspace: .PHONY: build-ts-contracts build-ts-contracts: cd contracts/ && \ - yarn install && \ + yarn install --frozen-lockfile && \ yarn compile .PHONY: build-ts-examples build-ts-examples: cd examples/contracts/aggregator-consumer && \ - yarn install && \ + yarn install --frozen-lockfile && \ yarn compile .PHONY: gowork @@ -159,14 +159,21 @@ test-unit-go: cd ./relayer && go test -v ./... -race -count=10 .PHONY: test-integration -test-integration: test-integration-smoke +test-integration: test-integration-smoke test-integration-contracts .PHONY: test-integration-smoke test-integration-smoke: ginkgo -v -r --junit-report=tests-smoke-report.xml --keep-going --trace integration-tests/smoke -.PHONY: test-contracts -test-contracts: build-ts-contracts env-devnet-hardhat +.PHONY: test-integration-contracts +test-integration-contracts: test-ts + +.PHONY: test-ts +test-ts: env-devnet-hardhat + yarn test + +.PHONY: test-ts-contracts +test-ts-contracts: build-ts-contracts env-devnet-hardhat cd contracts/ && \ yarn test From a1bc6a0887a2aa5193ec915ad9d89196b46f2466 Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 18:04:06 +0200 Subject: [PATCH 14/20] Rename workflow/job names --- .github/workflows/contracts.yml | 4 ++-- .github/workflows/contracts_integration.yml | 4 ++-- .github/workflows/lint.yml | 4 ++-- .github/workflows/relayer.yml | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index a5727b299..1b603f8ec 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -8,8 +8,8 @@ on: pull_request: jobs: - contracts_tests: - name: Contracts tests + contracts_run_tests: + name: Run Tests runs-on: ubuntu-latest steps: - name: Checkout sources diff --git a/.github/workflows/contracts_integration.yml b/.github/workflows/contracts_integration.yml index 4989b5756..2d9f462d0 100644 --- a/.github/workflows/contracts_integration.yml +++ b/.github/workflows/contracts_integration.yml @@ -8,8 +8,8 @@ on: pull_request: jobs: - contracts_integration: - name: Contracts Integration + contracts_integration_run_tests: + name: Run Tests runs-on: ubuntu-latest steps: - name: Checkout sources diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 689093513..757eae875 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: lint +name: Lint on: push: @@ -8,7 +8,7 @@ on: pull_request: jobs: - format_check: + lint_format_check: name: Format Check runs-on: ubuntu-latest steps: diff --git a/.github/workflows/relayer.yml b/.github/workflows/relayer.yml index 6fa85b3ad..4fb3af0d6 100644 --- a/.github/workflows/relayer.yml +++ b/.github/workflows/relayer.yml @@ -1,4 +1,4 @@ -name: relayer +name: Relayer on: push: @@ -9,7 +9,7 @@ on: jobs: relayer_run_unit_tests: - name: Relayer Run Unit Tests + name: Run Unit Tests runs-on: ubuntu-latest env: DATABASE_URL: postgres://postgres@localhost:5432/postgres?sslmode=disable @@ -34,8 +34,8 @@ jobs: with: nix_path: nixpkgs=channel:nixos-unstable - - name: Compile module + - name: Build run: nix develop -c make build-go-relayer - - name: Run unit tests + - name: Test run: nix develop -c make test-unit-go From 6622de8157f624054c15c9d7f7f3a994586c00d0 Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 18:08:22 +0200 Subject: [PATCH 15/20] Remove postgress service as part of relayer workflow --- .github/workflows/relayer.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/relayer.yml b/.github/workflows/relayer.yml index 4fb3af0d6..0969639e4 100644 --- a/.github/workflows/relayer.yml +++ b/.github/workflows/relayer.yml @@ -11,21 +11,6 @@ jobs: relayer_run_unit_tests: name: Run Unit Tests runs-on: ubuntu-latest - env: - DATABASE_URL: postgres://postgres@localhost:5432/postgres?sslmode=disable - services: - postgres: - image: postgres - ports: - - 5432:5432 - env: - POSTGRES_HOST_AUTH_METHOD: trust - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 steps: - name: Checkout sources uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 From 2d298b64a684d5870454759ffd46c2b0760390e3 Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 18:14:26 +0200 Subject: [PATCH 16/20] Lint workflow fix --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 757eae875..d2ad95842 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,5 +19,8 @@ jobs: with: nix_path: nixpkgs=channel:nixos-unstable + - name: Install + run: nix develop -c yarn install --frozen-lockfile + - name: Check run: nix develop -c make format-check From c0ce6ee7e251542aa95aafd9cf853bef9f29b13b Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sat, 3 Sep 2022 18:47:48 +0200 Subject: [PATCH 17/20] Cleanup NPM dependency tree, use Yarn workspaces more --- contracts/package.json | 13 +- .../aggregator-consumer/package.json | 11 +- .../contracts/aggregator-consumer/yarn.lock | 2937 ----------------- package.json | 15 +- .../integration-eqlabs-multisig/package.json | 13 +- .../integration-starkgate/package.json | 17 +- .../starknet-gauntlet-argent/package.json | 3 +- .../starknet-gauntlet-example/package.json | 3 +- .../starknet-gauntlet-multisig/package.json | 3 +- .../starknet-gauntlet-ocr2/package.json | 3 +- packages-ts/starknet-gauntlet-oz/package.json | 3 +- .../starknet-gauntlet-starkgate/package.json | 3 +- packages-ts/starknet-gauntlet/package.json | 3 +- yarn.lock | 731 ++-- 14 files changed, 443 insertions(+), 3315 deletions(-) delete mode 100644 examples/contracts/aggregator-consumer/yarn.lock diff --git a/contracts/package.json b/contracts/package.json index d1040200a..af7035370 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -15,23 +15,16 @@ "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.3", "@shardlabs/starknet-hardhat-plugin": "^0.6.2", - "@types/chai": "^4.2.22", "@types/elliptic": "^6.4.14", - "@types/mocha": "^9.0.0", - "@types/node": "^18.7.11", - "bn.js": "^5.2.0", + "@types/mocha": "^9.1.1", "cairo-ls": "^0.0.4", - "chai": "^4.3.4", + "chai": "^4.3.6", "ethereum-waffle": "^3.4.4", "ethers": "^5.6.8", - "hardhat": "^2.10.2", - "starknet": "3.9.0", - "ts-node": "^10.4.0", - "typescript": "^4.5.2" + "hardhat": "^2.10.2" }, "dependencies": { "@chainlink/contracts": "^0.4.2", - "@toruslabs/starkware-crypto": "^1.0.0", "axios": "^0.24.0" } } diff --git a/examples/contracts/aggregator-consumer/package.json b/examples/contracts/aggregator-consumer/package.json index 7714fbbbf..5a9b69aaf 100644 --- a/examples/contracts/aggregator-consumer/package.json +++ b/examples/contracts/aggregator-consumer/package.json @@ -16,16 +16,11 @@ "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.1.0", "@shardlabs/starknet-hardhat-plugin": "^0.6.2", - "@types/chai": "^4.3.1", - "@types/jest": "^28.1.0", "@types/mocha": "^9.1.1", - "hardhat": "^2.10.2", - "ts-node": "^10.8.0", - "typescript": "^4.7.2" + "chai": "^4.3.6", + "hardhat": "^*" }, "dependencies": { - "chai": "^4.3.6", - "dotenv": "^16.0.1", - "starknet": "^3.15.0" + "dotenv": "^16.0.1" } } diff --git a/examples/contracts/aggregator-consumer/yarn.lock b/examples/contracts/aggregator-consumer/yarn.lock deleted file mode 100644 index bed65a026..000000000 --- a/examples/contracts/aggregator-consumer/yarn.lock +++ /dev/null @@ -1,2937 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@babel/code-frame@^7.12.13": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/helper-validator-identifier@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" - integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@ethereumjs/block@^3.5.0", "@ethereumjs/block@^3.6.2", "@ethereumjs/block@^3.6.3": - version "3.6.3" - resolved "https://registry.npmjs.org/@ethereumjs/block/-/block-3.6.3.tgz#d96cbd7af38b92ebb3424223dbf773f5ccd27f84" - integrity sha512-CegDeryc2DVKnDkg5COQrE0bJfw/p0v3GBk2W5/Dj5dOVfEmb50Ux0GLnSPypooLnfqjwFaorGuT9FokWB3GRg== - dependencies: - "@ethereumjs/common" "^2.6.5" - "@ethereumjs/tx" "^3.5.2" - ethereumjs-util "^7.1.5" - merkle-patricia-tree "^4.2.4" - -"@ethereumjs/blockchain@^5.5.2", "@ethereumjs/blockchain@^5.5.3": - version "5.5.3" - resolved "https://registry.npmjs.org/@ethereumjs/blockchain/-/blockchain-5.5.3.tgz#aa49a6a04789da6b66b5bcbb0d0b98efc369f640" - integrity sha512-bi0wuNJ1gw4ByNCV56H0Z4Q7D+SxUbwyG12Wxzbvqc89PXLRNR20LBcSUZRKpN0+YCPo6m0XZL/JLio3B52LTw== - dependencies: - "@ethereumjs/block" "^3.6.2" - "@ethereumjs/common" "^2.6.4" - "@ethereumjs/ethash" "^1.1.0" - debug "^4.3.3" - ethereumjs-util "^7.1.5" - level-mem "^5.0.1" - lru-cache "^5.1.1" - semaphore-async-await "^1.5.1" - -"@ethereumjs/common@^2.6.4", "@ethereumjs/common@^2.6.5": - version "2.6.5" - resolved "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" - integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.5" - -"@ethereumjs/ethash@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@ethereumjs/ethash/-/ethash-1.1.0.tgz#7c5918ffcaa9cb9c1dc7d12f77ef038c11fb83fb" - integrity sha512-/U7UOKW6BzpA+Vt+kISAoeDie1vAvY4Zy2KF5JJb+So7+1yKmJeJEHOGSnQIj330e9Zyl3L5Nae6VZyh2TJnAA== - dependencies: - "@ethereumjs/block" "^3.5.0" - "@types/levelup" "^4.3.0" - buffer-xor "^2.0.1" - ethereumjs-util "^7.1.1" - miller-rabin "^4.0.0" - -"@ethereumjs/tx@^3.5.1", "@ethereumjs/tx@^3.5.2": - version "3.5.2" - resolved "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" - integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== - dependencies: - "@ethereumjs/common" "^2.6.4" - ethereumjs-util "^7.1.5" - -"@ethereumjs/vm@^5.9.0": - version "5.9.3" - resolved "https://registry.npmjs.org/@ethereumjs/vm/-/vm-5.9.3.tgz#6d69202e4c132a4a1e1628ac246e92062e230823" - integrity sha512-Ha04TeF8goEglr8eL7hkkYyjhzdZS0PsoRURzYlTF6I0VVId5KjKb0N7MrA8GMgheN+UeTncfTgYx52D/WhEmg== - dependencies: - "@ethereumjs/block" "^3.6.3" - "@ethereumjs/blockchain" "^5.5.3" - "@ethereumjs/common" "^2.6.5" - "@ethereumjs/tx" "^3.5.2" - async-eventemitter "^0.2.4" - core-js-pure "^3.0.1" - debug "^4.3.3" - ethereumjs-util "^7.1.5" - functional-red-black-tree "^1.0.1" - mcl-wasm "^0.7.1" - merkle-patricia-tree "^4.2.4" - rustbn.js "~0.2.0" - -"@ethersproject/abi@^5.1.2": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" - integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/hash" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/abstract-provider@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" - integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/networks" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/transactions" "^5.7.0" - "@ethersproject/web" "^5.7.0" - -"@ethersproject/abstract-signer@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" - integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== - dependencies: - "@ethersproject/abstract-provider" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - -"@ethersproject/address@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" - integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - -"@ethersproject/base64@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" - integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== - dependencies: - "@ethersproject/bytes" "^5.7.0" - -"@ethersproject/bignumber@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" - integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - bn.js "^5.2.1" - -"@ethersproject/bytes@^5.6.1", "@ethersproject/bytes@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" - integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/constants@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" - integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== - dependencies: - "@ethersproject/bignumber" "^5.7.0" - -"@ethersproject/hash@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" - integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== - dependencies: - "@ethersproject/abstract-signer" "^5.7.0" - "@ethersproject/address" "^5.7.0" - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@ethersproject/keccak256@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" - integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - js-sha3 "0.8.0" - -"@ethersproject/logger@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" - integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== - -"@ethersproject/networks@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" - integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/properties@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" - integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== - dependencies: - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/rlp@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" - integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/signing-key@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" - integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - bn.js "^5.2.1" - elliptic "6.5.4" - hash.js "1.1.7" - -"@ethersproject/strings@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" - integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== - dependencies: - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - -"@ethersproject/transactions@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" - integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== - dependencies: - "@ethersproject/address" "^5.7.0" - "@ethersproject/bignumber" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/constants" "^5.7.0" - "@ethersproject/keccak256" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/rlp" "^5.7.0" - "@ethersproject/signing-key" "^5.7.0" - -"@ethersproject/web@^5.7.0": - version "5.7.0" - resolved "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" - integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== - dependencies: - "@ethersproject/base64" "^5.7.0" - "@ethersproject/bytes" "^5.7.0" - "@ethersproject/logger" "^5.7.0" - "@ethersproject/properties" "^5.7.0" - "@ethersproject/strings" "^5.7.0" - -"@jest/expect-utils@^28.1.3": - version "28.1.3" - resolved "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" - integrity sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA== - dependencies: - jest-get-type "^28.0.2" - -"@jest/schemas@^28.1.3": - version "28.1.3" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" - integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== - dependencies: - "@sinclair/typebox" "^0.24.1" - -"@jest/types@^28.1.3": - version "28.1.3" - resolved "https://registry.npmjs.org/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" - integrity sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ== - dependencies: - "@jest/schemas" "^28.1.3" - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^17.0.8" - chalk "^4.0.0" - -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.0" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.14" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@metamask/eth-sig-util@^4.0.0": - version "4.0.1" - resolved "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" - integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== - dependencies: - ethereumjs-abi "^0.6.8" - ethereumjs-util "^6.2.1" - ethjs-util "^0.1.6" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.1" - -"@noble/hashes@1.1.2", "@noble/hashes@~1.1.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" - integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== - -"@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0": - version "1.6.3" - resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94" - integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ== - -"@nomiclabs/hardhat-docker@^2.0.2": - version "2.0.2" - resolved "https://registry.npmjs.org/@nomiclabs/hardhat-docker/-/hardhat-docker-2.0.2.tgz#ae964be17951275a55859ff7358e9e7c77448846" - integrity sha512-XgGEpRT3wlA1VslyB57zyAHV+oll8KnV1TjwnxxC1tpAL04/lbdwpdO5KxInVN8irMSepqFpsiSkqlcnvbE7Ng== - dependencies: - dockerode "^2.5.8" - fs-extra "^7.0.1" - node-fetch "^2.6.0" - -"@nomiclabs/hardhat-ethers@^2.1.0": - version "2.1.1" - resolved "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.1.1.tgz#3f1d1ab49813d1bae4c035cc1adec224711e528b" - integrity sha512-Gg0IFkT/DW3vOpih4/kMjeZCLYqtfgECLeLXTs7ZDPzcK0cfoc5wKk4nq5n/izCUzdhidO/Utd6ptF9JrWwWVA== - -"@scure/base@~1.1.0": - version "1.1.1" - resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" - integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== - -"@scure/bip32@1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.0.tgz#dea45875e7fbc720c2b4560325f1cf5d2246d95b" - integrity sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q== - dependencies: - "@noble/hashes" "~1.1.1" - "@noble/secp256k1" "~1.6.0" - "@scure/base" "~1.1.0" - -"@scure/bip39@1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.0.tgz#92f11d095bae025f166bef3defcc5bf4945d419a" - integrity sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w== - dependencies: - "@noble/hashes" "~1.1.1" - "@scure/base" "~1.1.0" - -"@sentry/core@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" - integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/minimal" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/hub@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" - integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== - dependencies: - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/minimal@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" - integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/types" "5.30.0" - tslib "^1.9.3" - -"@sentry/node@^5.18.1": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" - integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== - dependencies: - "@sentry/core" "5.30.0" - "@sentry/hub" "5.30.0" - "@sentry/tracing" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - cookie "^0.4.1" - https-proxy-agent "^5.0.0" - lru_map "^0.3.3" - tslib "^1.9.3" - -"@sentry/tracing@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" - integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== - dependencies: - "@sentry/hub" "5.30.0" - "@sentry/minimal" "5.30.0" - "@sentry/types" "5.30.0" - "@sentry/utils" "5.30.0" - tslib "^1.9.3" - -"@sentry/types@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" - integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== - -"@sentry/utils@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" - integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== - dependencies: - "@sentry/types" "5.30.0" - tslib "^1.9.3" - -"@shardlabs/starknet-hardhat-plugin@^0.6.2": - version "0.6.4" - resolved "https://registry.npmjs.org/@shardlabs/starknet-hardhat-plugin/-/starknet-hardhat-plugin-0.6.4.tgz#5512e403c2599c0ecd7dcb325d9c400d5c9a43cb" - integrity sha512-cZogb4Uz3JtcjYhH9UkmjXnP0qsZDveBeZQ0Tk+L4Xe81V9Ej6tKlOc9ykRjPGpkN8s0LyGZEvdT82mQ9oy47Q== - dependencies: - "@nomiclabs/hardhat-docker" "^2.0.2" - axios "^0.24.0" - exit-hook "2.2.1" - form-data "^4.0.0" - glob "^7.2.0" - is-wsl "^2.2.0" - starknet "^3.15.0" - -"@sinclair/typebox@^0.24.1": - version "0.24.28" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.28.tgz#15aa0b416f82c268b1573ab653e4413c965fe794" - integrity sha512-dgJd3HLOkLmz4Bw50eZx/zJwtBq65nms3N9VBYu5LTjJ883oBFkTyXRlCB/ZGGwqYpJJHA5zW2Ibhl5ngITfow== - -"@solidity-parser/parser@^0.14.2": - version "0.14.3" - resolved "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.3.tgz#0d627427b35a40d8521aaa933cc3df7d07bfa36f" - integrity sha512-29g2SZ29HtsqA58pLCtopI1P/cPy5/UAzlcAXO6T/CNJimG6yA8kx4NaseMyJULiC+TEs02Y9/yeHzClqoA0hw== - dependencies: - antlr4ts "^0.5.0-alpha.4" - -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - -"@types/abstract-leveldown@*": - version "7.2.0" - resolved "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz#f055979a99f7654e84d6b8e6267419e9c4cfff87" - integrity sha512-q5veSX6zjUy/DlDhR4Y4cU0k2Ar+DT2LUraP00T19WLmTO6Se1djepCCaqU6nQrwcJ5Hyo/CWqxTzrrFg8eqbQ== - -"@types/bn.js@^4.11.3": - version "4.11.6" - resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/bn.js@^5.1.0": - version "5.1.0" - resolved "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" - integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== - dependencies: - "@types/node" "*" - -"@types/chai@^4.3.1": - version "4.3.3" - resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" - integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": - version "2.0.4" - resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== - -"@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== - dependencies: - "@types/istanbul-lib-report" "*" - -"@types/jest@^28.1.0": - version "28.1.7" - resolved "https://registry.npmjs.org/@types/jest/-/jest-28.1.7.tgz#a680c5d05b69634c2d54a63cb106d7fb1adaba16" - integrity sha512-acDN4VHD40V24tgu0iC44jchXavRNVFXQ/E6Z5XNsswgoSO/4NgsXoEYmPUGookKldlZQyIpmrEXsHI9cA3ZTA== - dependencies: - expect "^28.0.0" - pretty-format "^28.0.0" - -"@types/level-errors@*": - version "3.0.0" - resolved "https://registry.npmjs.org/@types/level-errors/-/level-errors-3.0.0.tgz#15c1f4915a5ef763b51651b15e90f6dc081b96a8" - integrity sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ== - -"@types/levelup@^4.3.0": - version "4.3.3" - resolved "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.3.tgz#4dc2b77db079b1cf855562ad52321aa4241b8ef4" - integrity sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA== - dependencies: - "@types/abstract-leveldown" "*" - "@types/level-errors" "*" - "@types/node" "*" - -"@types/lru-cache@^5.1.0": - version "5.1.1" - resolved "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" - integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== - -"@types/mocha@^9.1.1": - version "9.1.1" - resolved "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" - integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== - -"@types/node@*": - version "18.7.11" - resolved "https://registry.npmjs.org/@types/node/-/node-18.7.11.tgz#486e72cfccde88da24e1f23ff1b7d8bfb64e6250" - integrity sha512-KZhFpSLlmK/sdocfSAjqPETTMd0ug6HIMIAwkwUpU79olnZdQtMxpQP+G1wDzCH7na+FltSIhbaZuKdwZ8RDrw== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== - dependencies: - "@types/node" "*" - -"@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== - -"@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^17.0.8": - version "17.0.11" - resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.11.tgz#5e10ca33e219807c0eee0f08b5efcba9b6a42c06" - integrity sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA== - dependencies: - "@types/yargs-parser" "*" - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -JSONStream@1.3.2: - version "1.3.2" - resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" - integrity sha512-mn0KSip7N4e0UDPZHnqDsHECo5uGQrixQKnAskOM1BIB8hd7QKbd6il8IPRPudPHOeHiECoCFqhyMaRO9+nWyA== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -abstract-leveldown@^6.2.1: - version "6.3.0" - resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" - integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== - dependencies: - buffer "^5.5.0" - immediate "^3.2.3" - level-concat-iterator "~2.0.0" - level-supports "~1.0.0" - xtend "~4.0.0" - -abstract-leveldown@~6.2.1: - version "6.2.3" - resolved "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" - integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== - dependencies: - buffer "^5.5.0" - immediate "^3.2.3" - level-concat-iterator "~2.0.0" - level-supports "~1.0.0" - xtend "~4.0.0" - -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1: - version "8.8.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" - integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== - -adm-zip@^0.4.16: - version "0.4.16" - resolved "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" - integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== - -agent-base@6: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.3.0: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -antlr4ts@^0.5.0-alpha.4: - version "0.5.0-alpha.4" - resolved "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" - integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== - -anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -async-eventemitter@^0.2.4: - version "0.2.4" - resolved "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" - integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== - dependencies: - async "^2.4.0" - -async@^2.4.0: - version "2.6.4" - resolved "https://registry.npmjs.org/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" - integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -axios@^0.24.0: - version "0.24.0" - resolved "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" - integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== - dependencies: - follow-redirects "^1.14.4" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-x@^3.0.2: - version "3.0.9" - resolved "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" - integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -bignumber.js@^9.0.0: - version "9.1.0" - resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" - integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bl@^1.0.0: - version "1.2.3" - resolved "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" - integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== - -bn.js@^4.0.0, bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: - version "5.2.1" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" - integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - -buffer-xor@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" - integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== - dependencies: - safe-buffer "^5.1.1" - -buffer@^5.5.0, buffer@^5.6.0: - version "5.7.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -call-bind@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -camelcase@^6.0.0: - version "6.3.0" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" - integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== - -chai@^4.3.6: - version "4.3.6" - resolved "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" - integrity sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - loupe "^2.3.1" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^2.0.0, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== - -chokidar@3.5.3, chokidar@^3.4.0: - version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^1.0.1: - version "1.1.4" - resolved "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -ci-info@^3.2.0: - version "3.3.2" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz#6d2967ffa407466481c6c90b6e16b3098f080128" - integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg== - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -command-exists@^1.2.8: - version "1.2.9" - resolved "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -concat-stream@~1.6.2: - version "1.6.2" - resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -cookie@^0.4.1: - version "0.4.2" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - -core-js-pure@^3.0.1: - version "3.24.1" - resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.24.1.tgz#8839dde5da545521bf282feb7dc6d0b425f39fd3" - integrity sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg== - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -crc-32@^1.2.0: - version "1.2.2" - resolved "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" - integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - -cross-fetch@^3.1.5: - version "3.1.5" - resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" - integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== - dependencies: - node-fetch "2.6.7" - -debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.3: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debug@^3.2.6: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - -deferred-leveldown@~5.3.0: - version "5.3.0" - resolved "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" - integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== - dependencies: - abstract-leveldown "~6.2.1" - inherits "^2.0.3" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -diff-sequences@^28.1.1: - version "28.1.1" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" - integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - -docker-modem@^1.0.8: - version "1.0.9" - resolved "https://registry.npmjs.org/docker-modem/-/docker-modem-1.0.9.tgz#a1f13e50e6afb6cf3431b2d5e7aac589db6aaba8" - integrity sha512-lVjqCSCIAUDZPAZIeyM125HXfNvOmYYInciphNrLrylUtKyW66meAjSPXWchKVzoIYZx69TPnAepVSSkeawoIw== - dependencies: - JSONStream "1.3.2" - debug "^3.2.6" - readable-stream "~1.0.26-4" - split-ca "^1.0.0" - -dockerode@^2.5.8: - version "2.5.8" - resolved "https://registry.npmjs.org/dockerode/-/dockerode-2.5.8.tgz#1b661e36e1e4f860e25f56e0deabe9f87f1d0acc" - integrity sha512-+7iOUYBeDTScmOmQqpUYQaE7F4vvIt6+gIZNHWhqAQEI887tiPFB9OvXI/HzQYqfUNvukMK+9myLW63oTJPZpw== - dependencies: - concat-stream "~1.6.2" - docker-modem "^1.0.8" - tar-fs "~1.16.3" - -dotenv@^16.0.1: - version "16.0.1" - resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.0.1.tgz#8f8f9d94876c35dac989876a5d3a82a267fdce1d" - integrity sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ== - -elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encoding-down@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" - integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== - dependencies: - abstract-leveldown "^6.2.1" - inherits "^2.0.3" - level-codec "^9.0.0" - level-errors "^2.0.0" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enquirer@^2.3.0: - version "2.3.6" - resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -errno@~0.1.1: - version "0.1.8" - resolved "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereum-cryptography@^1.0.3: - version "1.1.2" - resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.1.2.tgz#74f2ac0f0f5fe79f012c889b3b8446a9a6264e6d" - integrity sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ== - dependencies: - "@noble/hashes" "1.1.2" - "@noble/secp256k1" "1.6.3" - "@scure/bip32" "1.1.0" - "@scure/bip39" "1.1.0" - -ethereumjs-abi@^0.6.8: - version "0.6.8" - resolved "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: - version "7.1.5" - resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" - -ethjs-util@0.1.6, ethjs-util@^0.1.6: - version "0.1.6" - resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -exit-hook@2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz#007b2d92c6428eda2b76e7016a34351586934593" - integrity sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw== - -expect@^28.0.0: - version "28.1.3" - resolved "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" - integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== - dependencies: - "@jest/expect-utils" "^28.1.3" - jest-get-type "^28.0.2" - jest-matcher-utils "^28.1.3" - jest-message-util "^28.1.3" - jest-util "^28.1.3" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== - dependencies: - locate-path "^2.0.0" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -follow-redirects@^1.12.1, follow-redirects@^1.14.4: - version "1.15.1" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" - integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -fp-ts@1.19.3: - version "1.19.3" - resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" - integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== - -fp-ts@^1.0.0: - version "1.19.5" - resolved "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" - integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-extra@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== - -get-intrinsic@^1.0.2: - version "1.1.2" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" - integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3, glob@^7.2.0: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -hardhat@^2.10.2: - version "2.10.2" - resolved "https://registry.npmjs.org/hardhat/-/hardhat-2.10.2.tgz#ff94ee4cb144a9c114641581ff5e4d7bea5f93a9" - integrity sha512-L/KvDDT/MA6332uAtYTqdcHoSABljw4pPjHQe5SHdIJ+xKfaSc6vDKw03CmrQ5Xup0gHs8XnVSBpZo1AbbIW7g== - dependencies: - "@ethereumjs/block" "^3.6.2" - "@ethereumjs/blockchain" "^5.5.2" - "@ethereumjs/common" "^2.6.4" - "@ethereumjs/tx" "^3.5.1" - "@ethereumjs/vm" "^5.9.0" - "@ethersproject/abi" "^5.1.2" - "@metamask/eth-sig-util" "^4.0.0" - "@sentry/node" "^5.18.1" - "@solidity-parser/parser" "^0.14.2" - "@types/bn.js" "^5.1.0" - "@types/lru-cache" "^5.1.0" - abort-controller "^3.0.0" - adm-zip "^0.4.16" - aggregate-error "^3.0.0" - ansi-escapes "^4.3.0" - chalk "^2.4.2" - chokidar "^3.4.0" - ci-info "^2.0.0" - debug "^4.1.1" - enquirer "^2.3.0" - env-paths "^2.2.0" - ethereum-cryptography "^1.0.3" - ethereumjs-abi "^0.6.8" - ethereumjs-util "^7.1.4" - find-up "^2.1.0" - fp-ts "1.19.3" - fs-extra "^7.0.1" - glob "7.2.0" - immutable "^4.0.0-rc.12" - io-ts "1.10.4" - lodash "^4.17.11" - merkle-patricia-tree "^4.2.4" - mnemonist "^0.38.0" - mocha "^10.0.0" - p-map "^4.0.0" - qs "^6.7.0" - raw-body "^2.4.1" - resolve "1.17.0" - semver "^6.3.0" - slash "^3.0.0" - solc "0.7.3" - source-map-support "^0.5.13" - stacktrace-parser "^0.1.10" - "true-case-path" "^2.2.1" - tsort "0.0.1" - undici "^5.4.0" - uuid "^8.3.2" - ws "^7.4.6" - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -immediate@^3.2.3: - version "3.3.0" - resolved "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" - integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== - -immediate@~3.2.3: - version "3.2.3" - resolved "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" - integrity sha512-RrGCXRm/fRVqMIhqXrGEX9rRADavPiDFSoMb/k64i9XMk8uH4r/Omi5Ctierj6XzNecwDbO4WuFbDD1zmpl3Tg== - -immutable@^4.0.0-rc.12: - version "4.1.0" - resolved "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz#f795787f0db780183307b9eb2091fcac1f6fafef" - integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -io-ts@1.10.4: - version "1.10.4" - resolved "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" - integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== - dependencies: - fp-ts "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -jest-diff@^28.1.3: - version "28.1.3" - resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" - integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== - dependencies: - chalk "^4.0.0" - diff-sequences "^28.1.1" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" - -jest-get-type@^28.0.2: - version "28.0.2" - resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" - integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== - -jest-matcher-utils@^28.1.3: - version "28.1.3" - resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" - integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== - dependencies: - chalk "^4.0.0" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" - -jest-message-util@^28.1.3: - version "28.1.3" - resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" - integrity sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g== - dependencies: - "@babel/code-frame" "^7.12.13" - "@jest/types" "^28.1.3" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.9" - micromatch "^4.0.4" - pretty-format "^28.1.3" - slash "^3.0.0" - stack-utils "^2.0.3" - -jest-util@^28.1.3: - version "28.1.3" - resolved "https://registry.npmjs.org/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" - integrity sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ== - dependencies: - "@jest/types" "^28.1.3" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" - -js-sha3@0.8.0: - version "0.8.0" - resolved "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -json-bigint@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" - integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== - dependencies: - bignumber.js "^9.0.0" - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== - -keccak@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" - integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== - optionalDependencies: - graceful-fs "^4.1.9" - -level-codec@^9.0.0: - version "9.0.2" - resolved "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" - integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== - dependencies: - buffer "^5.6.0" - -level-concat-iterator@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" - integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== - -level-errors@^2.0.0, level-errors@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" - integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== - dependencies: - errno "~0.1.1" - -level-iterator-stream@~4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" - integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== - dependencies: - inherits "^2.0.4" - readable-stream "^3.4.0" - xtend "^4.0.2" - -level-mem@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz#c345126b74f5b8aa376dc77d36813a177ef8251d" - integrity sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg== - dependencies: - level-packager "^5.0.3" - memdown "^5.0.0" - -level-packager@^5.0.3: - version "5.1.1" - resolved "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" - integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== - dependencies: - encoding-down "^6.3.0" - levelup "^4.3.2" - -level-supports@~1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" - integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== - dependencies: - xtend "^4.0.2" - -level-ws@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" - integrity sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA== - dependencies: - inherits "^2.0.3" - readable-stream "^3.1.0" - xtend "^4.0.1" - -levelup@^4.3.2: - version "4.4.0" - resolved "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" - integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== - dependencies: - deferred-leveldown "~5.3.0" - level-errors "~2.0.0" - level-iterator-stream "~4.0.0" - level-supports "~1.0.0" - xtend "~4.0.0" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash@^4.17.11, lodash@^4.17.14: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -loupe@^2.3.1: - version "2.3.4" - resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" - integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== - dependencies: - get-func-name "^2.0.0" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru_map@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" - integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== - -ltgt@~2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" - integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== - -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - -mcl-wasm@^0.7.1: - version "0.7.9" - resolved "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" - integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -memdown@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz#608e91a9f10f37f5b5fe767667a8674129a833cb" - integrity sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw== - dependencies: - abstract-leveldown "~6.2.1" - functional-red-black-tree "~1.0.1" - immediate "~3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.2.0" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== - -merkle-patricia-tree@^4.2.4: - version "4.2.4" - resolved "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz#ff988d045e2bf3dfa2239f7fabe2d59618d57413" - integrity sha512-eHbf/BG6eGNsqqfbLED9rIqbsF4+sykEaBn6OLNs71tjclbMcMOk1tEPmJKcNcNCLkvbpY/lwyOlizWsqPNo8w== - dependencies: - "@types/levelup" "^4.3.0" - ethereumjs-util "^7.1.4" - level-mem "^5.0.1" - level-ws "^2.0.0" - readable-stream "^3.6.0" - semaphore-async-await "^1.5.1" - -micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - -minimatch@5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" - integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.6: - version "1.2.6" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" - integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== - -mkdirp@^0.5.1: - version "0.5.6" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mnemonist@^0.38.0: - version "0.38.5" - resolved "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" - integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== - dependencies: - obliterator "^2.0.0" - -mocha@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" - integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.4" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "5.0.1" - ms "2.1.3" - nanoid "3.3.3" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - workerpool "6.2.1" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -nanoid@3.3.3: - version "3.3.3" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" - integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-fetch@2.6.7, node-fetch@^2.6.0: - version "2.6.7" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - -node-gyp-build@^4.2.0: - version "4.5.0" - resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" - integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -obliterator@^2.0.0: - version "2.0.4" - resolved "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" - integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== - dependencies: - p-limit "^1.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== - -pako@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" - integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-parse@^1.0.6: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -pbkdf2@^3.0.17: - version "3.1.2" - resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pretty-format@^28.0.0, pretty-format@^28.1.3: - version "28.1.3" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" - integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== - dependencies: - "@jest/schemas" "^28.1.3" - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - -pump@^1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" - integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -qs@^6.7.0: - version "6.11.0" - resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -raw-body@^2.4.1: - version "2.5.1" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - -readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5: - version "2.3.7" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.1.0, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~1.0.26-4: - version "1.0.34" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -resolve@1.17.0: - version "1.17.0" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -rimraf@^2.2.8: - version "2.7.1" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.2.3, rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - -rustbn.js@~0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" - integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -"safer-buffer@>= 2.1.2 < 3": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -scrypt-js@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" - integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== - dependencies: - elliptic "^6.5.4" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -semaphore-async-await@^1.5.1: - version "1.5.1" - resolved "https://registry.npmjs.org/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" - integrity sha512-b/ptP11hETwYWpeilHXXQiV5UJNJl7ZWWooKRE5eBIYWoom6dZ0SluCIdCtKycsMtZgKWE01/qAw6jblw1YVhg== - -semver@^5.5.0: - version "5.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -solc@0.7.3: - version "0.7.3" - resolved "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== - dependencies: - command-exists "^1.2.8" - commander "3.0.2" - follow-redirects "^1.12.1" - fs-extra "^0.30.0" - js-sha3 "0.8.0" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - tmp "0.0.33" - -source-map-support@^0.5.13: - version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -split-ca@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz#6c83aff3692fa61256e0cd197e05e9de157691a6" - integrity sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ== - -stack-utils@^2.0.3: - version "2.0.5" - resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" - integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== - dependencies: - escape-string-regexp "^2.0.0" - -stacktrace-parser@^0.1.10: - version "0.1.10" - resolved "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" - integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== - dependencies: - type-fest "^0.7.1" - -starknet@^3.15.0: - version "3.18.2" - resolved "https://registry.npmjs.org/starknet/-/starknet-3.18.2.tgz#ec0c83ca97763663722f8e4b6a6872bf2cb18e05" - integrity sha512-w42BOws9np3C9dy4y9MOwY+KqxNhwTseci7CLVlLkui+jzQ7gGWoPVqn9OMeKy0PWIcZadCeuHvLez2xrg3zMg== - dependencies: - "@ethersproject/bytes" "^5.6.1" - bn.js "^5.2.1" - cross-fetch "^3.1.5" - elliptic "^6.5.4" - ethereum-cryptography "^1.0.3" - hash.js "^1.1.7" - json-bigint "^1.0.0" - minimalistic-assert "^1.0.1" - pako "^2.0.4" - ts-custom-error "^3.2.0" - url-join "^4.0.1" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== - dependencies: - is-hex-prefixed "1.0.0" - -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -tar-fs@~1.16.3: - version "1.16.3" - resolved "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" - integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== - dependencies: - chownr "^1.0.1" - mkdirp "^0.5.1" - pump "^1.0.0" - tar-stream "^1.1.2" - -tar-stream@^1.1.2: - version "1.6.2" - resolved "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -"through@>=2.2.7 <3": - version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -tmp@0.0.33: - version "0.0.33" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - -"true-case-path@^2.2.1": - version "2.2.1" - resolved "https://registry.npmjs.org/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" - integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== - -ts-custom-error@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/ts-custom-error/-/ts-custom-error-3.2.0.tgz#ff8f80a3812bab9dc448536312da52dce1b720fb" - integrity sha512-cBvC2QjtvJ9JfWLvstVnI45Y46Y5dMxIaG1TDMGAD/R87hpvqFL+7LhvUDhnRCfOnx/xitollFWWvUKKKhbN0A== - -ts-node@^10.8.0: - version "10.9.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - -tslib@^1.9.3: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tsort@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" - integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== - -tweetnacl-util@^0.15.1: - version "0.15.1" - resolved "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" - integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== - -tweetnacl@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-fest@^0.7.1: - version "0.7.1" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" - integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== - -typescript@^4.7.2: - version "4.7.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== - -undici@^5.4.0: - version "5.9.1" - resolved "https://registry.npmjs.org/undici/-/undici-5.9.1.tgz#fc9fd85dd488f965f153314a63d9426a11f3360b" - integrity sha512-6fB3a+SNnWEm4CJbgo0/CWR8RGcOCQP68SF4X0mxtYTq2VNN8T88NYrWVBAeSX+zb7bny2dx2iYhP3XHi00omg== - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unpipe@1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -url-join@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz#b642e21a2646808ffa178c4c5fda39844e12cde7" - integrity sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -workerpool@6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" - integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@^7.4.6: - version "7.5.9" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== - -xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/package.json b/package.json index 54c9c1b60..ee95eba8b 100644 --- a/package.json +++ b/package.json @@ -44,15 +44,20 @@ }, "devDependencies": { "@changesets/cli": "^2.22.0", - "@types/bn.js": "^5.1.0", - "@types/chai": "^4.2.22", + "@types/bn.js": "^5.1.1", + "@types/mocha": "^9.1.1", + "@types/chai": "^4.3.1", "@types/jest": "^28.1.0", - "@types/node": "^18.7.10", + "@types/node": "^18.7.11", + "bn.js": "^5.2.1", "jest": "^28.1.0", "pkg": "^5.2.1", "prettier": "2.1.1", "ts-jest": "^28.0.7", - "ts-node": "^8.3.0", - "typescript": "4.3.5" + "ts-node": "^10.8.0", + "typescript": "4.7.2" + }, + "dependencies": { + "starknet": "^3.15.0" } } diff --git a/packages-ts/integration-eqlabs-multisig/package.json b/packages-ts/integration-eqlabs-multisig/package.json index 2c31f99f4..d075ad7f7 100644 --- a/packages-ts/integration-eqlabs-multisig/package.json +++ b/packages-ts/integration-eqlabs-multisig/package.json @@ -13,18 +13,11 @@ "@changesets/cli": "^2.22.0", "@nomiclabs/hardhat-ethers": "^2.0.5", "@shardlabs/starknet-hardhat-plugin": "^0.6.2", - "@types/chai": "^4.3.1", "@types/elliptic": "^6.4.14", - "@types/mocha": "^9.0.0", - "@types/node": "^18.7.11", - "chai": "^4.3.4", + "@types/mocha": "^9.1.1", + "chai": "^4.3.6", "ethers": "^5.6.8", "starsign-multisig": "^0.2.3", - "ts-node": "^10.7.0", - "typescript": "^4.7.2" - }, - "dependencies": { - "hardhat": "2.10.2", - "starknet": "^3.9.0" + "hardhat": "^2.10.2" } } diff --git a/packages-ts/integration-starkgate/package.json b/packages-ts/integration-starkgate/package.json index 88d337562..cd03ab008 100644 --- a/packages-ts/integration-starkgate/package.json +++ b/packages-ts/integration-starkgate/package.json @@ -6,23 +6,18 @@ "directories": { "test": "test" }, - "devDependencies": { - "@shardlabs/starknet-hardhat-plugin": "^0.6.2", - "@types/chai": "^4.3.1", - "@types/jest": "^28.1.0", - "@types/mocha": "^9.1.1", - "bn.js": "^5.2.1", - "chai": "^4.3.6", - "hardhat": "^2.10.2", - "ts-node": "^10.8.0", - "typescript": "^4.7.2" - }, "scripts": { "test": "npx hardhat --network localhost test" }, "keywords": [], "author": "", "license": "MIT", + "devDependencies": { + "@shardlabs/starknet-hardhat-plugin": "^0.6.2", + "@types/mocha": "^9.1.1", + "chai": "^4.3.6", + "hardhat": "^2.10.2" + }, "dependencies": { "@chainlink-dev/starkgate-contracts": "^0.0.3", "@openzeppelin/contracts": "^4.7.3", diff --git a/packages-ts/starknet-gauntlet-argent/package.json b/packages-ts/starknet-gauntlet-argent/package.json index 7fe90b57b..9fc167092 100644 --- a/packages-ts/starknet-gauntlet-argent/package.json +++ b/packages-ts/starknet-gauntlet-argent/package.json @@ -37,7 +37,6 @@ }, "dependencies": { "@chainlink/gauntlet-core": "0.3.1", - "@chainlink/starknet-gauntlet": "*", - "starknet": "^3.15.0" + "@chainlink/starknet-gauntlet": "*" } } diff --git a/packages-ts/starknet-gauntlet-example/package.json b/packages-ts/starknet-gauntlet-example/package.json index 65e2f34d1..ebac039a9 100644 --- a/packages-ts/starknet-gauntlet-example/package.json +++ b/packages-ts/starknet-gauntlet-example/package.json @@ -38,7 +38,6 @@ "dependencies": { "@chainlink/gauntlet-contracts-example": "0.1.1", "@chainlink/gauntlet-core": "0.3.1", - "@chainlink/starknet-gauntlet": "*", - "starknet": "^3.15.0" + "@chainlink/starknet-gauntlet": "*" } } diff --git a/packages-ts/starknet-gauntlet-multisig/package.json b/packages-ts/starknet-gauntlet-multisig/package.json index a46e535d7..0d4c53f29 100644 --- a/packages-ts/starknet-gauntlet-multisig/package.json +++ b/packages-ts/starknet-gauntlet-multisig/package.json @@ -38,7 +38,6 @@ "dependencies": { "starsign-multisig": "0.2.3", "@chainlink/gauntlet-core": "0.3.1", - "@chainlink/starknet-gauntlet": "*", - "starknet": "^3.15.0" + "@chainlink/starknet-gauntlet": "*" } } diff --git a/packages-ts/starknet-gauntlet-ocr2/package.json b/packages-ts/starknet-gauntlet-ocr2/package.json index b486a0b50..46b64781b 100644 --- a/packages-ts/starknet-gauntlet-ocr2/package.json +++ b/packages-ts/starknet-gauntlet-ocr2/package.json @@ -39,7 +39,6 @@ "@chainlink-dev/starknet-contracts-ocr2": "^0.0.5", "@chainlink/gauntlet-contracts-ocr2": "0.2.2", "@chainlink/gauntlet-core": "0.3.1", - "@chainlink/starknet-gauntlet": "*", - "starknet": "3.15.0" + "@chainlink/starknet-gauntlet": "*" } } diff --git a/packages-ts/starknet-gauntlet-oz/package.json b/packages-ts/starknet-gauntlet-oz/package.json index a3c3231c7..e4c2978d3 100644 --- a/packages-ts/starknet-gauntlet-oz/package.json +++ b/packages-ts/starknet-gauntlet-oz/package.json @@ -38,7 +38,6 @@ "dependencies": { "@chainlink-dev/starkgate-open-zeppelin": "^0.0.4", "@chainlink/gauntlet-core": "0.3.1", - "@chainlink/starknet-gauntlet": "*", - "starknet": "^3.15.0" + "@chainlink/starknet-gauntlet": "*" } } diff --git a/packages-ts/starknet-gauntlet-starkgate/package.json b/packages-ts/starknet-gauntlet-starkgate/package.json index a2a7fcc2a..a34f8a5ae 100644 --- a/packages-ts/starknet-gauntlet-starkgate/package.json +++ b/packages-ts/starknet-gauntlet-starkgate/package.json @@ -38,7 +38,6 @@ "dependencies": { "@chainlink-dev/starkgate-contracts": "^0.0.3", "@chainlink/gauntlet-core": "0.3.1", - "@chainlink/starknet-gauntlet": "*", - "starknet": "^3.15.0" + "@chainlink/starknet-gauntlet": "*" } } diff --git a/packages-ts/starknet-gauntlet/package.json b/packages-ts/starknet-gauntlet/package.json index ab88adeb5..418f00a63 100644 --- a/packages-ts/starknet-gauntlet/package.json +++ b/packages-ts/starknet-gauntlet/package.json @@ -37,7 +37,6 @@ }, "dependencies": { "@chainlink/gauntlet-core": "0.3.1", - "cross-fetch": "^3.1.5", - "starknet": "^3.15.0" + "cross-fetch": "^3.1.5" } } diff --git a/yarn.lock b/yarn.lock index c1697b4d0..b8af8ddba 100644 --- a/yarn.lock +++ b/yarn.lock @@ -982,7 +982,7 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.5.0", "@ethersproject/rlp@^5.7.0": +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": version "5.7.0" resolved "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== @@ -1356,75 +1356,6 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@ledgerhq/cryptoassets@^6.32.0": - version "6.32.0" - resolved "https://registry.npmjs.org/@ledgerhq/cryptoassets/-/cryptoassets-6.32.0.tgz#6e4aadae22781294114291b15af81f3d627a8a0a" - integrity sha512-PoUZLw8HNKYPyxOBZPDJDs0Usqy0RyaSioTrC5Nlm5sVHEWPwssGJAAWxXO4q60j2PvLAOnfXPPo2pRWxcBTeg== - dependencies: - invariant "2" - -"@ledgerhq/devices@^7.0.0": - version "7.0.0" - resolved "https://registry.npmjs.org/@ledgerhq/devices/-/devices-7.0.0.tgz#ba743aa6d0725562e8b1bd5c4f0b7db2cf573710" - integrity sha512-vq4B33WdU0dRAJIRFWZMj6w1W1yw1i4mekCmhk7N9wPaFrtGWZ2iI9WDihsNOBooCWKQe8Jsb9eD8RVThbSlFQ== - dependencies: - "@ledgerhq/errors" "^6.10.1" - "@ledgerhq/logs" "^6.10.0" - rxjs "6" - semver "^7.3.5" - -"@ledgerhq/errors@^6.10.1": - version "6.10.1" - resolved "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.10.1.tgz#510688251b6261744c6b1cde6cfd2dfb13fc27b2" - integrity sha512-92d1zRQleR1AQ4CAXgWgDtKUms+8EwShLVUcajI+BLWvgJ1Vclmq6PsBIDEQbsm+riVu/Ji3LcHdmgFgmi0VGw== - -"@ledgerhq/hw-app-eth@^6.26.0": - version "6.29.4" - resolved "https://registry.npmjs.org/@ledgerhq/hw-app-eth/-/hw-app-eth-6.29.4.tgz#73fbdbec96000573e1f807c2a3158171225d34e0" - integrity sha512-lKiL7/H+fkknRnXMKyDhrldG3OQGH0mgC8TCudVl9R6Ddh2jL0Yqxip2Dne0djr9awPMvJT6DDzE9P3KiJO0ag== - dependencies: - "@ethersproject/abi" "^5.5.0" - "@ethersproject/rlp" "^5.5.0" - "@ledgerhq/cryptoassets" "^6.32.0" - "@ledgerhq/errors" "^6.10.1" - "@ledgerhq/hw-transport" "^6.27.2" - "@ledgerhq/hw-transport-mocker" "^6.27.2" - "@ledgerhq/logs" "^6.10.0" - axios "^0.26.1" - bignumber.js "^9.0.2" - -"@ledgerhq/hw-transport-mocker@^6.27.2": - version "6.27.2" - resolved "https://registry.npmjs.org/@ledgerhq/hw-transport-mocker/-/hw-transport-mocker-6.27.2.tgz#53b90d4316b2a5740a9703d005fbc999a2053875" - integrity sha512-UDlOLRGh5pn2lfLZuOws25zXF2HFqEMJlX3sIRMYIr61vO5H/r/4tU4rADBKQWgVvQ2hkINa3XXvDLnjEyFEAw== - dependencies: - "@ledgerhq/hw-transport" "^6.27.2" - "@ledgerhq/logs" "^6.10.0" - -"@ledgerhq/hw-transport-webhid@^6.24.1": - version "6.27.2" - resolved "https://registry.npmjs.org/@ledgerhq/hw-transport-webhid/-/hw-transport-webhid-6.27.2.tgz#e3ee2501b1353a335d7436c1f2b95821d2b2f426" - integrity sha512-ZlyNheUhcxBZqjJzhSfJfeGQvNbeyWs9866rdQjVeG1zsbTJi0+6tfRv8J248QISS8vHtG5IMSxgMg9mtux9dQ== - dependencies: - "@ledgerhq/devices" "^7.0.0" - "@ledgerhq/errors" "^6.10.1" - "@ledgerhq/hw-transport" "^6.27.2" - "@ledgerhq/logs" "^6.10.0" - -"@ledgerhq/hw-transport@^6.24.1", "@ledgerhq/hw-transport@^6.27.2": - version "6.27.2" - resolved "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.27.2.tgz#318e24b13b4bc392277d0b3b6fbc568f86b41f01" - integrity sha512-GF4pmK78rEKhZfbmunwQ131c+0MGa6L5IoYlwgFcg6CaFpUjjPiTCKUFsm4flsE0Z0Ltn9QuKoe+xEHULo7rGA== - dependencies: - "@ledgerhq/devices" "^7.0.0" - "@ledgerhq/errors" "^6.10.1" - events "^3.3.0" - -"@ledgerhq/logs@^6.10.0": - version "6.10.0" - resolved "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.0.tgz#c012c1ecc1a0e53d50e6af381618dca5268461c1" - integrity sha512-lLseUPEhSFUXYTKj6q7s2O3s2vW2ebgA11vMAlKodXGf5AFw4zUoEbTz9CoFOC9jS6xY4Qr8BmRnxP/odT4Uuw== - "@manypkg/find-root@^1.1.0": version "1.1.0" resolved "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f" @@ -1463,12 +1394,7 @@ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== -"@noble/hashes@^0.5.7": - version "0.5.9" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-0.5.9.tgz#9f3051a4cc6f7c168022b3b7fbbe9fe2a35cccf0" - integrity sha512-7lN1Qh6d8DUGmfN36XRsbN/WcGIPNtTGhkw26vWId/DlCIGsYJJootTtPGghTLcn/AaXPx2Q0b3cacrwXa7OVw== - -"@noble/secp256k1@1.6.3", "@noble/secp256k1@^1.4.0", "@noble/secp256k1@~1.6.0": +"@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0": version "1.6.3" resolved "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94" integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ== @@ -1494,6 +1420,204 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nomicfoundation/ethereumjs-block@4.0.0-rc.3", "@nomicfoundation/ethereumjs-block@^4.0.0-rc.3": + version "4.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-4.0.0-rc.3.tgz#759d361968b23f06fd0f3f24023005bd3f05aa76" + integrity sha512-T+KzsCOEB4iP2Wy0OmjsxARbX8czN8LjF2pfdz9ucx37jAHfVAhWmEZaB+wfh7NZqumsBfgRtYbRJ572+nlTBQ== + dependencies: + "@nomicfoundation/ethereumjs-common" "3.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-trie" "5.0.0-rc.3" + "@nomicfoundation/ethereumjs-tx" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-blockchain@6.0.0-rc.3", "@nomicfoundation/ethereumjs-blockchain@^6.0.0-rc.3": + version "6.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-6.0.0-rc.3.tgz#d6f4111447caad4f2f9c30fbe71117a7fdf081c2" + integrity sha512-GxaMYLXcyY/aFFXOiIwYYDVwHFffnddymldOsBGtGHbs0HM/kYLLF+dp3C31Q0+EaFNa6mF1L0NqAbC82CJRNA== + dependencies: + "@nomicfoundation/ethereumjs-block" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-common" "3.0.0-rc.3" + "@nomicfoundation/ethereumjs-ethash" "2.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-trie" "5.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + abstract-level "^1.0.3" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + level "^8.0.0" + lru-cache "^5.1.1" + memory-level "^1.0.0" + +"@nomicfoundation/ethereumjs-common@3.0.0-rc.3", "@nomicfoundation/ethereumjs-common@^3.0.0-rc.3": + version "3.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-3.0.0-rc.3.tgz#f0a43d0a9db0a0ebb587e8b5bac022c152c1da31" + integrity sha512-r7qLtNabVEHNihLZevHV0weNshDpXo/o7i0JD9O10OExdicpgHPsU4qGnAvzO9bby9ANO2ydrOIlrYSm4lBkTg== + dependencies: + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + crc-32 "^1.2.0" + +"@nomicfoundation/ethereumjs-ethash@2.0.0-rc.3": + version "2.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-2.0.0-rc.3.tgz#78476d68fd15f3ab3ade8b1ad68407d8ac7b96eb" + integrity sha512-l75FH3KYUXuXjEdVZ3P7iVBbFhsghIMUuOBVfau4vx90SEGUQZnrU6cg9jBTyYvn0w9IIKJ76ZmDV8RDohZktA== + dependencies: + "@nomicfoundation/ethereumjs-block" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + abstract-level "^1.0.3" + bigint-crypto-utils "^3.0.23" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-evm@1.0.0-rc.3", "@nomicfoundation/ethereumjs-evm@^1.0.0-rc.3": + version "1.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-1.0.0-rc.3.tgz#b09b470e33984211df9e1ca7fdff3261b6caef84" + integrity sha512-FY/SxIazYeJQ2uvx5uXV+MRgThrPjzr0nKMEyrFZPgbZb4KvcZarJuQVaJhQ4a5foqq8aHHRbWLdJQyWn9c2jw== + dependencies: + "@nomicfoundation/ethereumjs-common" "3.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + "@types/async-eventemitter" "^0.2.1" + async-eventemitter "^0.2.4" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/ethereumjs-rlp@4.0.0-rc.3", "@nomicfoundation/ethereumjs-rlp@^4.0.0-beta.2", "@nomicfoundation/ethereumjs-rlp@^4.0.0-rc.3": + version "4.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-4.0.0-rc.3.tgz#f654b6aaf74b0859ba68bac9522df82d847070cd" + integrity sha512-4F3fYTdqJhBNDoZ4o7uGzorvcbXuSeRXz46X/Z1TGMri5FjpWFl48qEOse2RpXCFudlAv7n/MpgJSuFzN1vreQ== + +"@nomicfoundation/ethereumjs-statemanager@1.0.0-rc.3", "@nomicfoundation/ethereumjs-statemanager@^1.0.0-rc.3": + version "1.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-1.0.0-rc.3.tgz#1057e81406f058166f68c6af9aac48693cc9ad1a" + integrity sha512-c69I4eZN9LFXUp1OI8hGwTvQMmcICus+MLgK5HELKLexV1SKs+K0iA4jgTK6VMM4wrzkmljyVxU5pM0Cb82XAQ== + dependencies: + "@nomicfoundation/ethereumjs-common" "3.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-trie" "5.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + functional-red-black-tree "^1.0.1" + +"@nomicfoundation/ethereumjs-trie@5.0.0-rc.3", "@nomicfoundation/ethereumjs-trie@^5.0.0-rc.3": + version "5.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-5.0.0-rc.3.tgz#df642ca1883eea0e2c2555028ae912b585d69da6" + integrity sha512-hz84rSGiYOs3vANLGxQm12gKtERMQzkgt1fZBu/OJulMCU+kR1CZxptVpmeg7W8n4NCyIcMPpGeshTMhg8zC5A== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + ethereum-cryptography "0.1.3" + readable-stream "^3.6.0" + +"@nomicfoundation/ethereumjs-tx@4.0.0-rc.3", "@nomicfoundation/ethereumjs-tx@^4.0.0-rc.3": + version "4.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-4.0.0-rc.3.tgz#0b56bbaee0908491b21419808a44bc0356438060" + integrity sha512-Z3/EYglP+uKyzQj5pc2oMv/vuJ3ZZ2v3qVqRG9k5EsGXNB1lzN1zIh6NCW/vw/AdGoH69MDNGzG5hqGZ9cJJiw== + dependencies: + "@nomicfoundation/ethereumjs-common" "3.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@8.0.0-rc.3", "@nomicfoundation/ethereumjs-util@^8.0.0-rc.3": + version "8.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-8.0.0-rc.3.tgz#d47dca076b5ea41b4498cf8292666d21f31b4e88" + integrity sha512-Ldd1NVbk+FtP/JKCQTOVrBJzHMXpMnUdqE9oetAqKVnaLszXMEUa/B0fBdJaPIXKU/c9tAba29/pGxRpcQbgKQ== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "^4.0.0-beta.2" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-vm@^6.0.0-rc.3": + version "6.0.0-rc.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-6.0.0-rc.3.tgz#e1e3f29b45a206fdaafdff8316081c98a558407b" + integrity sha512-MF6WeU0sx+6zM8ustttlZZFZtI6/c/qIWVnxrT6K5VRaiC1Us1ih3S8HBr6xNkl6JgBHj0e0oC1CA9xiowwlUQ== + dependencies: + "@nomicfoundation/ethereumjs-block" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-blockchain" "6.0.0-rc.3" + "@nomicfoundation/ethereumjs-common" "3.0.0-rc.3" + "@nomicfoundation/ethereumjs-evm" "1.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-statemanager" "1.0.0-rc.3" + "@nomicfoundation/ethereumjs-trie" "5.0.0-rc.3" + "@nomicfoundation/ethereumjs-tx" "4.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "8.0.0-rc.3" + "@types/async-eventemitter" "^0.2.1" + async-eventemitter "^0.2.4" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.0.3.tgz#1d49e4ac028831a3011a9f3dca60bd1963185342" + integrity sha512-W+bIiNiZmiy+MTYFZn3nwjyPUO6wfWJ0lnXx2zZrM8xExKObMrhCh50yy8pQING24mHfpPFCn89wEB/iG7vZDw== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.0.3.tgz#c0fccecc5506ff5466225e41e65691abafef3dbe" + integrity sha512-HuJd1K+2MgmFIYEpx46uzwEFjvzKAI765mmoMxy4K+Aqq1p+q7hHRlsFU2kx3NB8InwotkkIq3A5FLU1sI1WDw== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.0.3.tgz#8261d033f7172b347490cd005931ef8168ab4d73" + integrity sha512-2cR8JNy23jZaO/vZrsAnWCsO73asU7ylrHIe0fEsXbZYqBP9sMr+/+xP3CELDHJxUbzBY8zqGvQt1ULpyrG+Kw== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.0.3.tgz#1ba64b1d76425f8953dedc6367bd7dd46f31dfc5" + integrity sha512-Eyv50EfYbFthoOb0I1568p+eqHGLwEUhYGOxcRNywtlTE9nj+c+MT1LA53HnxD9GsboH4YtOOmJOulrjG7KtbA== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.0.3.tgz#8d864c49b55e683f7e3b5cce9d10b628797280ac" + integrity sha512-V8grDqI+ivNrgwEt2HFdlwqV2/EQbYAdj3hbOvjrA8Qv+nq4h9jhQUxFpegYMDtpU8URJmNNlXgtfucSrAQwtQ== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.0.3.tgz#16e769500cf1a8bb42ab9498cee3b93c30f78295" + integrity sha512-uRfVDlxtwT1vIy7MAExWAkRD4r9M79zMG7S09mCrWUn58DbLs7UFl+dZXBX0/8FTGYWHhOT/1Etw1ZpAf5DTrg== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.0.3.tgz#75f4e1a25526d54c506e4eba63b3d698b6255b8f" + integrity sha512-8HPwYdLbhcPpSwsE0yiU/aZkXV43vlXT2ycH+XlOjWOnLfH8C41z0njK8DHRtEFnp4OVN6E7E5lHBBKDZXCliA== + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.0.3.tgz#ef6e20cfad5eedfdb145cc34a44501644cd7d015" + integrity sha512-5WWcT6ZNvfCuxjlpZOY7tdvOqT1kIQYlDF9Q42wMpZ5aTm4PvjdCmFDDmmTvyXEBJ4WTVmY5dWNWaxy8h/E28g== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.0.3.tgz#98c4e3af9cee68896220fa7e270aefdf7fc89c7b" + integrity sha512-P/LWGZwWkyjSwkzq6skvS2wRc3gabzAbk6Akqs1/Iiuggql2CqdLBkcYWL5Xfv3haynhL+2jlNkak+v2BTZI4A== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.0.3.tgz#12da288e7ef17ec14848f19c1e8561fed20d231d" + integrity sha512-4AcTtLZG1s/S5mYAIr/sdzywdNwJpOcdStGF3QMBzEt+cGn3MchMaS9b1gyhb2KKM2c39SmPF5fUuWq1oBSQZQ== + +"@nomicfoundation/solidity-analyzer@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.0.3.tgz#d1029f872e66cb1082503b02cc8b0be12f8dd95e" + integrity sha512-VFMiOQvsw7nx5bFmrmVp2Q9rhIjw2AFST4DYvWVVO9PMHPE23BY2+kyfrQ4J3xCMFC8fcBbGLt7l4q7m1SlTqg== + optionalDependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.0.3" + "@nomicfoundation/solidity-analyzer-darwin-x64" "0.0.3" + "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.0.3" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.0.3" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.0.3" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.0.3" + "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.0.3" + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.0.3" + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.0.3" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.0.3" + "@nomiclabs/hardhat-docker@^2.0.2": version "2.0.2" resolved "https://registry.npmjs.org/@nomiclabs/hardhat-docker/-/hardhat-docker-2.0.2.tgz#ae964be17951275a55859ff7358e9e7c77448846" @@ -1503,7 +1627,7 @@ fs-extra "^7.0.1" node-fetch "^2.6.0" -"@nomiclabs/hardhat-ethers@^2.0.5": +"@nomiclabs/hardhat-ethers@^2.0.5", "@nomiclabs/hardhat-ethers@^2.1.0": version "2.1.1" resolved "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.1.1.tgz#3f1d1ab49813d1bae4c035cc1adec224711e528b" integrity sha512-Gg0IFkT/DW3vOpih4/kMjeZCLYqtfgECLeLXTs7ZDPzcK0cfoc5wKk4nq5n/izCUzdhidO/Utd6ptF9JrWwWVA== @@ -1752,19 +1876,6 @@ dependencies: defer-to-connect "^1.0.1" -"@toruslabs/starkware-crypto@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@toruslabs/starkware-crypto/-/starkware-crypto-1.1.0.tgz#754da7f0d6529de619ded73bd7636372d3da4b5d" - integrity sha512-IWqri38bd6kIlj7GDhxLby2Sw9LKJ+ShbfbKUPl0CAuv2QLOjGFFL17o9m7s2CUIZ9IMmz1a+yDT9uEfQvNRKg== - dependencies: - assert "^2.0.0" - bip39 "^3.0.4" - bn.js "^5.2.0" - elliptic "~6.5.4" - enc-utils "^3.0.0" - ethereumjs-wallet "^1.0.2" - hash.js "^1.1.7" - "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -1797,6 +1908,11 @@ resolved "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz#f055979a99f7654e84d6b8e6267419e9c4cfff87" integrity sha512-q5veSX6zjUy/DlDhR4Y4cU0k2Ar+DT2LUraP00T19WLmTO6Se1djepCCaqU6nQrwcJ5Hyo/CWqxTzrrFg8eqbQ== +"@types/async-eventemitter@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/async-eventemitter/-/async-eventemitter-0.2.1.tgz#f8e6280e87e8c60b2b938624b0a3530fb3e24712" + integrity sha512-M2P4Ng26QbAeITiH7w1d7OxtldgfAe0wobpyJzVK/XOb0cUGKU2R4pfAhqcJBXAe2ife5ZOhSv4wk7p+ffURtg== + "@types/babel__core@^7.1.14": version "7.1.19" resolved "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" @@ -1844,7 +1960,14 @@ dependencies: "@types/node" "*" -"@types/chai@*", "@types/chai@^4.2.22", "@types/chai@^4.3.1": +"@types/bn.js@^5.1.1": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + +"@types/chai@*", "@types/chai@^4.3.1": version "4.3.3" resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== @@ -1933,7 +2056,7 @@ dependencies: "@types/node" "*" -"@types/mocha@^9.0.0", "@types/mocha@^9.1.1": +"@types/mocha@^9.1.1": version "9.1.1" resolved "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== @@ -1946,16 +2069,11 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@>=13.7.0", "@types/node@^18.7.10", "@types/node@^18.7.11": +"@types/node@*", "@types/node@>=13.7.0", "@types/node@^18.7.11": version "18.7.11" resolved "https://registry.npmjs.org/@types/node/-/node-18.7.11.tgz#486e72cfccde88da24e1f23ff1b7d8bfb64e6250" integrity sha512-KZhFpSLlmK/sdocfSAjqPETTMd0ug6HIMIAwkwUpU79olnZdQtMxpQP+G1wDzCH7na+FltSIhbaZuKdwZ8RDrw== -"@types/node@11.11.6": - version "11.11.6" - resolved "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" - integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== - "@types/node@^12.12.6", "@types/node@^12.7.1": version "12.20.55" resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" @@ -2072,6 +2190,19 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" +abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" + integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== + dependencies: + buffer "^6.0.3" + catering "^2.1.0" + is-buffer "^2.0.5" + level-supports "^4.0.0" + level-transcoder "^1.0.1" + module-error "^1.0.1" + queue-microtask "^1.2.3" + abstract-leveldown@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz#5cb89f958a44f526779d740d1440e743e0c30a57" @@ -2150,7 +2281,7 @@ aes-js@3.0.0: resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -aes-js@^3.1.1, aes-js@^3.1.2: +aes-js@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== @@ -2366,16 +2497,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== -assert@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz#95fc1c616d48713510680f2eaf2d10dd22e02d32" - integrity sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A== - dependencies: - es6-object-assign "^1.1.0" - is-nan "^1.2.1" - object-is "^1.0.1" - util "^0.12.0" - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" @@ -2432,11 +2553,6 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -2447,13 +2563,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axios@^0.23.0: - version "0.23.0" - resolved "https://registry.npmjs.org/axios/-/axios-0.23.0.tgz#b0fa5d0948a8d1d75e3d5635238b6c4625b05149" - integrity sha512-NmvAE4i0YAv5cKq8zlDoPd1VLKAqX5oLuZKs8xkJa4qi6RGn0uhCYFjWtHHC9EM/MwOwYWOs53W+V0aqEXq1sg== - dependencies: - follow-redirects "^1.14.4" - axios@^0.24.0: version "0.24.0" resolved "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" @@ -2461,13 +2570,6 @@ axios@^0.24.0: dependencies: follow-redirects "^1.14.4" -axios@^0.26.1: - version "0.26.1" - resolved "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" - integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== - dependencies: - follow-redirects "^1.14.8" - babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -3103,7 +3205,19 @@ better-path-resolve@1.0.0: dependencies: is-windows "^1.0.0" -bignumber.js@^9.0.0, bignumber.js@^9.0.2: +bigint-crypto-utils@^3.0.23: + version "3.1.4" + resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.4.tgz#b00aa00eb792b14f2f71ead916105c17aac98a4c" + integrity sha512-niSkvARUEe8MiAiH+zKXPkgXzlvGDbOqXL3JDevWaA1TrPhUGSCgV+iedm8qMEBQwvSlMMn8GpSuoUjvsm2QfQ== + dependencies: + bigint-mod-arith "^3.1.0" + +bigint-mod-arith@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bigint-mod-arith/-/bigint-mod-arith-3.1.0.tgz#ee7186ff512248e245f8c6ed0aa5c0ccf0c116b4" + integrity sha512-vpiKCiv9B1nK8HhFOU7PMC4k9nrufQxeivgCj5yOH2ZMLD+UPwc/RfNgBCX+v8C6t0sF4q7mEZgZij6k53zpWA== + +bignumber.js@^9.0.0: version "9.1.0" resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== @@ -3124,16 +3238,6 @@ bip39@2.5.0: safe-buffer "^5.0.1" unorm "^1.3.3" -bip39@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" - integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== - dependencies: - "@types/node" "11.11.6" - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - bl@^1.0.0: version "1.2.3" resolved "https://registry.npmjs.org/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" @@ -3244,6 +3348,16 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== +browser-level@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" + integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.1" + module-error "^1.0.2" + run-parallel-limit "^1.1.0" + browser-stdout@1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" @@ -3399,6 +3513,14 @@ buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: base64-js "^1.3.1" ieee754 "^1.1.13" +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + bufferutil@^4.0.1: version "4.0.6" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.6.tgz#ebd6c67c7922a0e902f053e5d8be5ec850e48433" @@ -3531,6 +3653,11 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== +catering@^2.1.0, catering@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + chai@^4.3.4, chai@^4.3.6: version "4.3.6" resolved "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz#ffe4ba2d9fa9d6680cc0b370adae709ec9011e9c" @@ -3663,6 +3790,17 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +classic-level@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.2.0.tgz#2d52bdec8e7a27f534e67fdeb890abef3e643c27" + integrity sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.0" + module-error "^1.0.1" + napi-macros "~2.0.0" + node-gyp-build "^4.3.0" + clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -4307,6 +4445,11 @@ dom-walk@^0.1.0: resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +dotenv@^16.0.1: + version "16.0.2" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.2.tgz#0b0f8652c016a3858ef795024508cddc4bffc5bf" + integrity sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA== + dotignore@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" @@ -4342,7 +4485,7 @@ electron-to-chromium@^1.4.202: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.226.tgz#837ea1d19b8305a913cd5f31d135681c4b6d63b1" integrity sha512-CvevLaSiUp0u12K0e+QhMX1hn724nSUNO9ToBek+FMHk/5RofrQs5MChjrD0re0IwqxDFxFMSZD+uic05i2Z5w== -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4, elliptic@~6.5.4: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -4365,14 +4508,6 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -enc-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/enc-utils/-/enc-utils-3.0.0.tgz#65935d2d6a867fa0ae995f05f3a2f055ce764dcf" - integrity sha512-e57t/Z2HzWOLwOp7DZcV0VMEY8t7ptWwsxyp6kM2b2zrk6JqIpXxzkruHAMiBsy5wg9jp/183GdiRXCvBtzsYg== - dependencies: - is-typedarray "1.0.0" - typedarray-to-buffer "3.1.5" - encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -4439,7 +4574,7 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.19.0, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.0, es-abstract@^1.20.1: +es-abstract@^1.19.0, es-abstract@^1.19.2, es-abstract@^1.19.5, es-abstract@^1.20.1: version "1.20.1" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== @@ -4507,11 +4642,6 @@ es6-iterator@^2.0.3: es5-ext "^0.10.35" es6-symbol "^3.1.1" -es6-object-assign@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c" - integrity sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw== - es6-symbol@^3.1.1, es6-symbol@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" @@ -4702,7 +4832,7 @@ ethereum-common@^0.0.18: resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" integrity sha512-EoltVQTRNg2Uy4o84qpa2aXymXDJhxm7eos/ACOg0DG4baAbMjhbdAEsx9GeE8sC3XCxnYvrrzZDH8D8MtA2iQ== -ethereum-cryptography@^0.1.3: +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== @@ -4723,15 +4853,6 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" -ethereum-cryptography@^0.2.0: - version "0.2.5" - resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.2.5.tgz#dfa636f0fa1978d962a13362d0850befb9ab8e7e" - integrity sha512-aWvqiegXgSTwbuDE1DDnM7taLteLcHVHh5nMZnnD2dwlvH6w5bOxcdXW20oS+1aLDorDlrK1c82stB8jsLDN5Q== - dependencies: - "@noble/hashes" "^0.5.7" - "@noble/secp256k1" "^1.4.0" - micro-base "^0.10.1" - ethereum-cryptography@^1.0.3: version "1.1.2" resolved "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.1.2.tgz#74f2ac0f0f5fe79f012c889b3b8446a9a6264e6d" @@ -4895,7 +5016,7 @@ ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereum rlp "^2.0.0" safe-buffer "^5.1.1" -ethereumjs-util@^7.0.2, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: +ethereumjs-util@^7.0.2, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: version "7.1.5" resolved "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -4959,20 +5080,6 @@ ethereumjs-wallet@0.6.5: utf8 "^3.0.0" uuid "^3.3.2" -ethereumjs-wallet@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz#2c000504b4c71e8f3782dabe1113d192522e99b6" - integrity sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA== - dependencies: - aes-js "^3.1.2" - bs58check "^2.1.2" - ethereum-cryptography "^0.1.3" - ethereumjs-util "^7.1.2" - randombytes "^2.1.0" - scrypt-js "^3.0.1" - utf8 "^3.0.0" - uuid "^8.3.2" - ethers@^5.0.1, ethers@^5.0.2, ethers@^5.5.2, ethers@^5.6.8: version "5.7.0" resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.0.tgz#0055da174b9e076b242b8282638bc94e04b39835" @@ -5035,7 +5142,7 @@ eventemitter3@4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== -events@^3.0.0, events@^3.3.0: +events@^3.0.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -5246,11 +5353,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -fetch-intercept@^2.4.0: - version "2.4.0" - resolved "https://registry.npmjs.org/fetch-intercept/-/fetch-intercept-2.4.0.tgz#be8b0f17abaadeea6de52ecdb6e9ed081f03480a" - integrity sha512-BPZ2LM9Dh1ua2ovQf03N6rhWg1qxdVD5qK/G4llvcemt6M+jjxCuIDxJ+6IiG+uz//3UQmgfKEv0gOGvYIxZ7g== - fetch-ponyfill@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" @@ -5365,7 +5467,7 @@ flow-stoplight@^1.0.0: resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" integrity sha512-rDjbZUKpN8OYhB0IE/vY/I8UWO/602IIJEU/76Tv4LvYnwHCk0BCsvz4eRr9n+FQcri7L5cyaXOo0+/Kh4HisA== -follow-redirects@^1.12.1, follow-redirects@^1.14.4, follow-redirects@^1.14.8: +follow-redirects@^1.12.1, follow-redirects@^1.14.4: version "1.15.1" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== @@ -5804,7 +5906,63 @@ hard-rejection@^2.1.0: resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== -hardhat@2.10.2, hardhat@^2.10.2: +hardhat@^*: + version "2.11.0" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.11.0.tgz#027fc7336fac9e6eeea985d4b63a63cb839451f4" + integrity sha512-0Mkz8s2cor2vnIYi6HukyhiLOBe5+QeeNkN+RyTJqMqyBouF8ATpyuFyDfA2Jff8HmeFiwTxwSSZ41lFgSFCrw== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/ethereumjs-block" "^4.0.0-rc.3" + "@nomicfoundation/ethereumjs-blockchain" "^6.0.0-rc.3" + "@nomicfoundation/ethereumjs-common" "^3.0.0-rc.3" + "@nomicfoundation/ethereumjs-evm" "^1.0.0-rc.3" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0-rc.3" + "@nomicfoundation/ethereumjs-statemanager" "^1.0.0-rc.3" + "@nomicfoundation/ethereumjs-trie" "^5.0.0-rc.3" + "@nomicfoundation/ethereumjs-tx" "^4.0.0-rc.3" + "@nomicfoundation/ethereumjs-util" "^8.0.0-rc.3" + "@nomicfoundation/ethereumjs-vm" "^6.0.0-rc.3" + "@nomicfoundation/solidity-analyzer" "^0.0.3" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + 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.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.4.0" + uuid "^8.3.2" + ws "^7.4.6" + +hardhat@^2.10.2: version "2.10.2" resolved "https://registry.npmjs.org/hardhat/-/hardhat-2.10.2.tgz#ff94ee4cb144a9c114641581ff5e4d7bea5f93a9" integrity sha512-L/KvDDT/MA6332uAtYTqdcHoSABljw4pPjHQe5SHdIJ+xKfaSc6vDKw03CmrQ5Xup0gHs8XnVSBpZo1AbbIW7g== @@ -6077,7 +6235,7 @@ idna-uts46-hx@^2.3.1: dependencies: punycode "2.1.0" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -6179,7 +6337,7 @@ into-stream@^6.0.0: from2 "^2.3.0" p-is-promise "^3.0.0" -invariant@2, invariant@^2.2.2: +invariant@^2.2.2: version "2.2.4" resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -6257,6 +6415,11 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-buffer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.4: version "1.2.4" resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" @@ -6383,13 +6546,6 @@ is-generator-fn@^2.0.0: resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-generator-function@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" - integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== - dependencies: - has-tostringtag "^1.0.0" - is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -6402,14 +6558,6 @@ is-hex-prefixed@1.0.0: resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== -is-nan@^1.2.1: - version "1.3.2" - resolved "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" - integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -6507,18 +6655,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" -is-typed-array@^1.1.3, is-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.9.tgz#246d77d2871e7d9f5aeb1d54b9f52c71329ece67" - integrity sha512-kfrlnTTn8pZkfpJMUgYD7YZ3qzeJgWUn8XfVYBARc4wnmNOmLbmuuaAs3q5fvB0UJOn6yHAKaGTPM7d6ezoD/A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.20.0" - for-each "^0.3.3" - has-tostringtag "^1.0.0" - -is-typedarray@1.0.0, is-typedarray@^1.0.0, is-typedarray@~1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== @@ -7176,7 +7313,7 @@ keccak@3.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -keccak@^3.0.0: +keccak@^3.0.0, keccak@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== @@ -7377,6 +7514,11 @@ level-sublevel@6.6.4: typewiselite "~1.0.0" xtend "~4.0.0" +level-supports@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" + integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== + level-supports@~1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" @@ -7384,6 +7526,14 @@ level-supports@~1.0.0: dependencies: xtend "^4.0.2" +level-transcoder@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" + integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== + dependencies: + buffer "^6.0.3" + module-error "^1.0.1" + level-ws@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" @@ -7410,6 +7560,14 @@ level-ws@^2.0.0: readable-stream "^3.1.0" xtend "^4.0.1" +level@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" + integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== + dependencies: + browser-level "^1.0.1" + classic-level "^1.2.0" + levelup@3.1.1, levelup@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" @@ -7709,6 +7867,15 @@ memdown@~3.0.0: ltgt "~2.2.0" safe-buffer "~5.1.1" +memory-level@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" + integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== + dependencies: + abstract-level "^1.0.0" + functional-red-black-tree "^1.0.1" + module-error "^1.0.1" + memorystream@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" @@ -7790,11 +7957,6 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micro-base@^0.10.1: - version "0.10.2" - resolved "https://registry.npmjs.org/micro-base/-/micro-base-0.10.2.tgz#f6f9f0bd949ce511883e5a99f9147d80ddc32f5a" - integrity sha512-lqqJrT7lfJtDmmiQ4zRLZuIJBk96t0RAc5pCrrWpL9zDeH5i/SUL85mku9HqzTI/OCZ8EQ3aicbMW+eK5Nyu5w== - micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -8004,6 +8166,11 @@ mock-fs@^4.1.0: resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== +module-error@^1.0.1, module-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" + integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -8099,6 +8266,11 @@ napi-build-utils@^1.0.1: resolved "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -8974,7 +9146,7 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== -queue-microtask@^1.2.2: +queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== @@ -9370,6 +9542,13 @@ rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4: dependencies: bn.js "^5.2.0" +run-parallel-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" + integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== + dependencies: + queue-microtask "^1.2.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -9382,13 +9561,6 @@ rustbn.js@~0.2.0: resolved "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@6: - version "6.6.7" - resolved "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" - integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== - dependencies: - tslib "^1.9.0" - safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -9758,7 +9930,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.13, source-map-support@^0.5.17: +source-map-support@^0.5.13: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -9861,43 +10033,7 @@ stacktrace-parser@^0.1.10: dependencies: type-fest "^0.7.1" -starknet@3.15.0: - version "3.15.0" - resolved "https://registry.npmjs.org/starknet/-/starknet-3.15.0.tgz#3f9ab20c6d6a094b33272f971f01fc5fa9b92c2a" - integrity sha512-+wqAHky7ffTpyJGGSLkzVt8c2FrMyu/8R1cAB3n++VyuBuTTS9+qD8SLXhXWJiBxCzlznP8KkdWQC9N0SCTokw== - dependencies: - "@ethersproject/bytes" "^5.6.1" - bn.js "^5.2.1" - cross-fetch "^3.1.5" - elliptic "^6.5.4" - ethereum-cryptography "^1.0.3" - fetch-intercept "^2.4.0" - hash.js "^1.1.7" - json-bigint "^1.0.0" - minimalistic-assert "^1.0.1" - pako "^2.0.4" - url-join "^4.0.1" - -starknet@3.9.0: - version "3.9.0" - resolved "https://registry.npmjs.org/starknet/-/starknet-3.9.0.tgz#ee7a3d99effef0998b365d95dd85f9b01cdb463c" - integrity sha512-/sn3WHFX7f+A3vVf3I+Kamg2KIW6494vpCcZWA09IQ5RZXrozjaBtYWT41SoKKWZ3b0Xg8WF//SOkRVCTZOZkQ== - dependencies: - "@ledgerhq/hw-app-eth" "^6.26.0" - "@ledgerhq/hw-transport" "^6.24.1" - "@ledgerhq/hw-transport-webhid" "^6.24.1" - axios "^0.23.0" - bn.js "^5.2.0" - elliptic "^6.5.4" - ethereum-cryptography "^0.2.0" - hash.js "^1.1.7" - json-bigint "^1.0.0" - minimalistic-assert "^1.0.1" - pako "^2.0.4" - superstruct "^0.15.3" - url-join "^4.0.1" - -starknet@^3.15.0, starknet@^3.5.1, starknet@^3.9.0: +starknet@^3.15.0, starknet@^3.5.1: version "3.18.2" resolved "https://registry.npmjs.org/starknet/-/starknet-3.18.2.tgz#ec0c83ca97763663722f8e4b6a6872bf2cb18e05" integrity sha512-w42BOws9np3C9dy4y9MOwY+KqxNhwTseci7CLVlLkui+jzQ7gGWoPVqn9OMeKy0PWIcZadCeuHvLez2xrg3zMg== @@ -10098,11 +10234,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -superstruct@^0.15.3: - version "0.15.5" - resolved "https://registry.npmjs.org/superstruct/-/superstruct-0.15.5.tgz#0f0a8d3ce31313f0d84c6096cd4fa1bfdedc9dab" - integrity sha512-4AOeU+P5UuE/4nOUkmcQdW5y7i9ndt1cQd/3iUe+LTz3RxESf/W/5lg4B74HbDMMv8PHnPnGCQFH45kBcrQYoQ== - supports-color@8.1.1, supports-color@^8.0.0: version "8.1.1" resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -10438,7 +10569,7 @@ ts-jest@^28.0.7: semver "7.x" yargs-parser "^21.0.1" -ts-node@^10.4.0, ts-node@^10.7.0, ts-node@^10.8.0: +ts-node@^10.8.0: version "10.9.1" resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== @@ -10457,18 +10588,7 @@ ts-node@^10.4.0, ts-node@^10.7.0, ts-node@^10.8.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" -ts-node@^8.3.0: - version "8.10.2" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" - integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== - dependencies: - arg "^4.1.0" - diff "^4.0.1" - make-error "^1.1.1" - source-map-support "^0.5.17" - yn "3.1.1" - -tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.9.3: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -10574,7 +10694,7 @@ typechain@^3.0.0: ts-essentials "^6.0.3" ts-generator "^0.1.1" -typedarray-to-buffer@3.1.5, typedarray-to-buffer@^3.1.5: +typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== @@ -10586,15 +10706,10 @@ typedarray@^0.0.6: resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@4.3.5: - version "4.3.5" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" - integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== - -typescript@^4.5.2, typescript@^4.7.2: - version "4.7.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== +typescript@4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4" + integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A== typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0" @@ -10771,18 +10886,6 @@ util.promisify@^1.0.0: has-symbols "^1.0.1" object.getownpropertydescriptors "^2.1.1" -util@^0.12.0: - version "0.12.4" - resolved "https://registry.npmjs.org/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" - integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" @@ -11237,18 +11340,6 @@ which-pm@2.0.0: load-yaml-file "^0.2.0" path-exists "^4.0.0" -which-typed-array@^1.1.2: - version "1.1.8" - resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.8.tgz#0cfd53401a6f334d90ed1125754a42ed663eb01f" - integrity sha512-Jn4e5PItbcAHyLoRDwvPj1ypu27DJbtdYXUa5zsinrUx77Uvfb0cXwwnGMTn7cjUfhhqgVQnVJCwF+7cgU7tpw== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - es-abstract "^1.20.0" - for-each "^0.3.3" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.9" - which@^1.2.9: version "1.3.1" resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From d8213784b66f0b024d279d04ae63de789c55b6c6 Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sun, 4 Sep 2022 14:08:45 +0200 Subject: [PATCH 18/20] Update jest/ts-jest configuration --- jest.config.js | 83 ------------------- jest.config.ts | 36 ++++++++ .../test/tokenBridge.test.ts | 14 ++-- .../starknet-gauntlet-argent/package.json | 13 +-- .../starknet-gauntlet-cli/package.json | 13 +-- .../starknet-gauntlet-example/package.json | 13 +-- .../starknet-gauntlet-multisig/package.json | 13 +-- .../starknet-gauntlet-ocr2/package.json | 13 +-- packages-ts/starknet-gauntlet-oz/package.json | 13 +-- .../starknet-gauntlet-starkgate/package.json | 13 +-- packages-ts/starknet-gauntlet/package.json | 13 +-- 11 files changed, 51 insertions(+), 186 deletions(-) delete mode 100644 jest.config.js create mode 100644 jest.config.ts diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 880336dd3..000000000 --- a/jest.config.js +++ /dev/null @@ -1,83 +0,0 @@ -// TODO: it doesn't seem this file is actually used -module.exports = { - rootDir: '.', - projects: [ - { - displayName: 'starknet-gauntlet', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet/tsconfig.json', - }, - }, - }, - { - displayName: 'starknet-gauntlet-example', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet-example/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet-example/tsconfig.json', - }, - }, - }, - { - displayName: 'starknet-gauntlet-ocr2', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet-ocr2/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet-ocr2/tsconfig.json', - }, - }, - }, - { - displayName: 'starknet-gauntlet-oz', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet-oz/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet-oz/tsconfig.json', - }, - }, - }, - { - displayName: 'starknet-gauntlet-multisig', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet-multisig/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet-multisig/tsconfig.json', - }, - }, - }, - { - displayName: 'starknet-gauntlet-starkgate', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet-starkgate/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet-starkgate/tsconfig.json', - }, - }, - }, - { - displayName: 'starknet-gauntlet-argent', - preset: 'ts-jest', - testEnvironment: 'node', - testMatch: ['/packages-ts/starknet-gauntlet-argent/**/*.test.ts'], - globals: { - 'ts-jest': { - tsconfig: '/packages-ts/starknet-gauntlet-argent/tsconfig.json', - }, - }, - }, - ], -} diff --git a/jest.config.ts b/jest.config.ts new file mode 100644 index 000000000..ff0d90d16 --- /dev/null +++ b/jest.config.ts @@ -0,0 +1,36 @@ +// jest.config.ts +import type { Config } from '@jest/types' + +// Prepares 'config.projects' entry for a Jest TS project under '/packages-ts' +const projectConfig = (name: string) => ({ + displayName: name, + testMatch: [`/packages-ts/${name}/**/*.test.ts`], + transform: { + '^.+\\.(ts|tsx)$': 'ts-jest', + }, + globals: { + 'ts-jest': { + tsconfig: `/packages-ts/${name}/tsconfig.json`, + }, + }, +}) + +const config: Config.InitialOptions = { + rootDir: '.', + preset: 'ts-jest', + testEnvironment: 'node', + verbose: true, + automock: true, + testPathIgnorePatterns: ['dist/', 'node_modules/'], + projects: [ + projectConfig('starknet-gauntlet'), + projectConfig('starknet-gauntlet-argent'), + projectConfig('starknet-gauntlet-cli'), + projectConfig('starknet-gauntlet-example'), + projectConfig('starknet-gauntlet-multisig'), + projectConfig('starknet-gauntlet-ocr2'), + projectConfig('starknet-gauntlet-oz'), + projectConfig('starknet-gauntlet-starkgate'), + ], +} +export default config diff --git a/packages-ts/integration-starkgate/test/tokenBridge.test.ts b/packages-ts/integration-starkgate/test/tokenBridge.test.ts index 91a9a4553..ed3cfb9c9 100644 --- a/packages-ts/integration-starkgate/test/tokenBridge.test.ts +++ b/packages-ts/integration-starkgate/test/tokenBridge.test.ts @@ -101,7 +101,7 @@ describe('Test starkgate bridge with link token', function () { expectAddressEquality(l2_address.toString(), linkTokenContract.address) }) - it('Should wrap contract and set L2 TokenBridge successfully', async () => { + it('should wrap contract and set L2 TokenBridge successfully', async () => { newStarkNetERC20Bridge = await ethers.getContractAt( starkNetERC20BridgeContract.abi, proxy.address, @@ -121,19 +121,19 @@ describe('Test starkgate bridge with link token', function () { expectAddressEquality(l1_address.toString(), newStarkNetERC20Bridge.address) }) - it('Should set Max total balance', async () => { + it('should set Max total balance', async () => { await newStarkNetERC20Bridge.setMaxTotalBalance(100000) const totalbalance = await newStarkNetERC20Bridge.maxTotalBalance() expect(totalbalance).to.equal(100000) }) - it('Should set Max deposit', async () => { + it('should set Max deposit', async () => { await newStarkNetERC20Bridge.setMaxDeposit(100) const deposit = await newStarkNetERC20Bridge.maxDeposit() expect(deposit).to.equal(100) }) - it('Should deposit to the L2 contract, L1 balance should be decreased by 2', async () => { + it('should deposit to the L2 contract, L1 balance should be decreased by 2', async () => { await testERC20.approve(newStarkNetERC20Bridge.address, 2) await newStarkNetERC20Bridge.deposit(2, owner.starknetContract.address) @@ -141,7 +141,7 @@ describe('Test starkgate bridge with link token', function () { expect(balance).to.equal(8) }) - it('Should flush the L1 messages so that they can be consumed by the L2.', async () => { + it('should flush the L1 messages so that they can be consumed by the L2.', async () => { const flushL1Response = await starknet.devnet.flush() const flushL1Messages = flushL1Response.consumed_messages.from_l1 expect(flushL1Messages).to.have.a.lengthOf(1) @@ -159,7 +159,7 @@ describe('Test starkgate bridge with link token', function () { }) describe('Test bridge from L2 to L1', function () { - it('Should initiate withdraw and send message to L1', async () => { + it('should initiate withdraw and send message to L1', async () => { await owner.invoke(tokenBridgeContract, 'initiate_withdraw', { l1_recipient: BigInt(deployer.address), amount: uint256.bnToUint256(2), @@ -178,7 +178,7 @@ describe('Test starkgate bridge with link token', function () { expectAddressEquality(flushL2Messages[0].to_address, newStarkNetERC20Bridge.address) }) - it('Should withdraw 2 which will consume the L2 message successfully', async () => { + it('should withdraw 2 which will consume the L2 message successfully', async () => { await newStarkNetERC20Bridge['withdraw(uint256)'](2) const balance = await testERC20.balanceOf(deployer.address) diff --git a/packages-ts/starknet-gauntlet-argent/package.json b/packages-ts/starknet-gauntlet-argent/package.json index 9fc167092..ecc08a933 100644 --- a/packages-ts/starknet-gauntlet-argent/package.json +++ b/packages-ts/starknet-gauntlet-argent/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-argent --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-cli/package.json b/packages-ts/starknet-gauntlet-cli/package.json index 709420905..6d37b2778 100644 --- a/packages-ts/starknet-gauntlet-cli/package.json +++ b/packages-ts/starknet-gauntlet-cli/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-cli --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-example/package.json b/packages-ts/starknet-gauntlet-example/package.json index ebac039a9..db5419da5 100644 --- a/packages-ts/starknet-gauntlet-example/package.json +++ b/packages-ts/starknet-gauntlet-example/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-example --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-multisig/package.json b/packages-ts/starknet-gauntlet-multisig/package.json index 0d4c53f29..bb2995cb8 100644 --- a/packages-ts/starknet-gauntlet-multisig/package.json +++ b/packages-ts/starknet-gauntlet-multisig/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-multisig --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-ocr2/package.json b/packages-ts/starknet-gauntlet-ocr2/package.json index 46b64781b..9914f004d 100644 --- a/packages-ts/starknet-gauntlet-ocr2/package.json +++ b/packages-ts/starknet-gauntlet-ocr2/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-ocr2 --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-oz/package.json b/packages-ts/starknet-gauntlet-oz/package.json index e4c2978d3..2acb36b77 100644 --- a/packages-ts/starknet-gauntlet-oz/package.json +++ b/packages-ts/starknet-gauntlet-oz/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-oz --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet-starkgate/package.json b/packages-ts/starknet-gauntlet-starkgate/package.json index a34f8a5ae..1d6aeedc2 100644 --- a/packages-ts/starknet-gauntlet-starkgate/package.json +++ b/packages-ts/starknet-gauntlet-starkgate/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet-starkgate --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", diff --git a/packages-ts/starknet-gauntlet/package.json b/packages-ts/starknet-gauntlet/package.json index 418f00a63..1e193bac7 100644 --- a/packages-ts/starknet-gauntlet/package.json +++ b/packages-ts/starknet-gauntlet/package.json @@ -12,21 +12,10 @@ "dist/**/*", "!dist/**/*.test.js" ], - "jest": { - "transform": { - ".(ts|tsx)": "ts-jest" - }, - "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js" - ] - }, "scripts": { "gauntlet": "ts-node ./src/index.ts", "lint": "tsc", - "test": "SKIP_PROMPTS=true jest --runInBand --passWithNoTests", + "test": "SKIP_PROMPTS=true jest --runInBand --config ../../jest.config.ts --selectProjects starknet-gauntlet --passWithNoTests", "test:coverage": "yarn test --collectCoverage", "test:ci": "yarn test --ci", "format": "yarn prettier --write ./src", From 8ea8fbe59e6cf2d34cea4eb0a92fa9a7fd524075 Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sun, 4 Sep 2022 16:40:06 +0200 Subject: [PATCH 19/20] Restructure integration tests + docker env --- .github/workflows/integration_contracts.yml | 23 +++++++++++ ...tegration.yml => integration_gauntlet.yml} | 10 ++--- Makefile | 38 +++++++++++++++-- contracts/package.json | 1 + .../aggregator-consumer/package.json | 1 + ops/scripts/devnet-hardhat-down.sh | 28 +++++++++++++ ops/scripts/devnet-hardhat.sh | 41 +++---------------- package.json | 2 - .../integration-eqlabs-multisig/package.json | 1 + .../integration-starkgate/package.json | 1 + yarn.lock | 2 +- 11 files changed, 98 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/integration_contracts.yml rename .github/workflows/{contracts_integration.yml => integration_gauntlet.yml} (71%) create mode 100755 ops/scripts/devnet-hardhat-down.sh diff --git a/.github/workflows/integration_contracts.yml b/.github/workflows/integration_contracts.yml new file mode 100644 index 000000000..599794830 --- /dev/null +++ b/.github/workflows/integration_contracts.yml @@ -0,0 +1,23 @@ +name: Integration Contracts (Vendor, Examples) + +on: + push: + branches: + - develop + - main + pull_request: + +jobs: + integration_contracts_run_tests: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2 + - name: Install Nix + uses: cachix/install-nix-action@d64e0553100205688c0fb2fa16edb0fc8663c590 # v17 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - name: Test + run: nix develop -c make test-integration-contracts diff --git a/.github/workflows/contracts_integration.yml b/.github/workflows/integration_gauntlet.yml similarity index 71% rename from .github/workflows/contracts_integration.yml rename to .github/workflows/integration_gauntlet.yml index 2d9f462d0..bb185a597 100644 --- a/.github/workflows/contracts_integration.yml +++ b/.github/workflows/integration_gauntlet.yml @@ -1,4 +1,4 @@ -name: Contracts Integration (Vendor, Examples, Gauntlet) +name: Integration Gauntlet on: push: @@ -8,7 +8,7 @@ on: pull_request: jobs: - contracts_integration_run_tests: + integration_gauntlet_run_tests: name: Run Tests runs-on: ubuntu-latest steps: @@ -19,12 +19,8 @@ jobs: with: nix_path: nixpkgs=channel:nixos-unstable - - name: Build - run: nix develop -c make build-ts - - name: Test - run: nix develop -c make test-integration-contracts + run: nix develop -c make test-integration-gauntlet - name: Test - Run Gauntlet CLI via Yarn run: nix develop -c yarn gauntlet - diff --git a/Makefile b/Makefile index 5a0b2af7b..c7f03b82e 100644 --- a/Makefile +++ b/Makefile @@ -159,18 +159,44 @@ test-unit-go: cd ./relayer && go test -v ./... -race -count=10 .PHONY: test-integration -test-integration: test-integration-smoke test-integration-contracts +test-integration: test-integration-smoke test-integration-contracts test-integration-gauntlet .PHONY: test-integration-smoke test-integration-smoke: ginkgo -v -r --junit-report=tests-smoke-report.xml --keep-going --trace integration-tests/smoke .PHONY: test-integration-contracts -test-integration-contracts: test-ts +# TODO: better network lifecycle setup - requires external network (L1 + L2) +test-integration-contracts: build-ts env-devnet-hardhat + cd examples/contracts/aggregator-consumer/ && \ + yarn test + cd packages-ts/integration-eqlabs-multisig/ && \ + yarn test + cd packages-ts/integration-starkgate/ && \ + yarn test + +.PHONY: test-integration-gauntlet +# TODO: better network lifecycle setup - tests setup/run their own network (L1 + conflict w/ above if not cleaned up) +test-integration-gauntlet: build-ts env-devnet-hardhat-down + cd packages-ts/starknet-gauntlet/ && \ + yarn test + cd packages-ts/starknet-gauntlet-argent/ && \ + yarn test + cd packages-ts/starknet-gauntlet-cli/ && \ + yarn test + cd packages-ts/starknet-gauntlet-example/ && \ + yarn test + cd packages-ts/starknet-gauntlet-multisig/ && \ + yarn test + cd packages-ts/starknet-gauntlet-ocr2/ && \ + yarn test + cd packages-ts/starknet-gauntlet-oz/ && \ + yarn test + cd packages-ts/starknet-gauntlet-starkgate/ && \ + yarn test .PHONY: test-ts -test-ts: env-devnet-hardhat - yarn test +test-ts: test-ts-contracts test-integration-contracts test-integration-gauntlet .PHONY: test-ts-contracts test-ts-contracts: build-ts-contracts env-devnet-hardhat @@ -181,3 +207,7 @@ test-ts-contracts: build-ts-contracts env-devnet-hardhat .PHONY: env-devnet-hardhat env-devnet-hardhat: ./ops/scripts/devnet-hardhat.sh + +.PHONY: env-devnet-hardhat-down +env-devnet-hardhat-down: + ./ops/scripts/devnet-hardhat-down.sh diff --git a/contracts/package.json b/contracts/package.json index af7035370..9a84681d6 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -15,6 +15,7 @@ "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.3", "@shardlabs/starknet-hardhat-plugin": "^0.6.2", + "@types/chai": "^4.3.3", "@types/elliptic": "^6.4.14", "@types/mocha": "^9.1.1", "cairo-ls": "^0.0.4", diff --git a/examples/contracts/aggregator-consumer/package.json b/examples/contracts/aggregator-consumer/package.json index 5a9b69aaf..2312c5f98 100644 --- a/examples/contracts/aggregator-consumer/package.json +++ b/examples/contracts/aggregator-consumer/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.1.0", "@shardlabs/starknet-hardhat-plugin": "^0.6.2", + "@types/chai": "^4.3.3", "@types/mocha": "^9.1.1", "chai": "^4.3.6", "hardhat": "^*" diff --git a/ops/scripts/devnet-hardhat-down.sh b/ops/scripts/devnet-hardhat-down.sh new file mode 100755 index 000000000..ecabcca42 --- /dev/null +++ b/ops/scripts/devnet-hardhat-down.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# TODO: this script needs to be replaced with a predefined K8s enviroment + +echo "Cleaning up StarkNet Devnet container..." + +dpid=`docker ps | grep chainlink-starknet.starknet-devnet | awk '{print $1}'`; +echo "Checking for existing 'chainlink-starknet.starknet-devnet' docker container..." +if [ -z "$dpid" ] +then + echo "No docker StarkNet Devnet container running."; +else + docker kill $dpid; + docker rm $dpid; +fi + +echo "Cleaning up Hardhat container..." + +dpid=`docker ps | grep chainlink-starknet.hardhat | awk '{print $1}'`; +echo "Checking for existing 'chainlink-starknet.hardhat' docker container..." +if [ -z "$dpid" ] +then + echo "No docker Hardhat container running."; +else + docker kill $dpid; + docker rm $dpid; +fi + +echo "Cleanup finished." diff --git a/ops/scripts/devnet-hardhat.sh b/ops/scripts/devnet-hardhat.sh index cd0f55ea8..afb0d8c96 100755 --- a/ops/scripts/devnet-hardhat.sh +++ b/ops/scripts/devnet-hardhat.sh @@ -5,50 +5,19 @@ cpu_struct=`arch`; echo $cpu_struct; node --version; -dpid=`docker ps | grep devnet | awk '{print $1}'`; -echo "Checking for existing docker containers for devnet..." -if [ -z "$dpid" ] -then - echo "No docker devnet container running..."; -else - docker kill $dpid; -fi -devnet_image=`docker ps -a | grep devnet_local | awk '{print $1}'` -if [ -z "$devnet_image" ] -then - echo "No docker devnet imagse found..."; -else - docker rm $devnet_image; -fi +# Clean up first +bash "$(dirname -- "$0";)/devnet-hardhat-down.sh" echo "Checking CPU structure..." if [[ $cpu_struct == *"arm"* ]] then echo "Starting arm devnet container..." - docker run -p 5050:5050 -p 8545:8545 -d --name devnet_local shardlabs/starknet-devnet:0.2.11-arm; + docker run -p 5050:5050 -p 8545:8545 -d --name chainlink-starknet.starknet-devnet shardlabs/starknet-devnet:0.2.11-arm; else echo "Starting i386 devnet container..." - docker run -p 5050:5050 -p 8545:8545 -d --name devnet_local shardlabs/starknet-devnet:0.2.11; -fi - -echo "Checking for running hardhat process..." - -hardhat_image=`docker image ls | grep hardhat | awk '{print $3}'` -if [ -z "$hardhat_image" ] -then - echo "No docker hardhat image found..."; -else - docker rm $hardhat_image; + docker run -p 5050:5050 -p 8545:8545 -d --name chainlink-starknet.starknet-devnet shardlabs/starknet-devnet:0.2.11; fi -dpid=`docker ps | grep hardhat | awk '{print $1}'`; -echo "Checking for existing docker containers for hardhat..." -if [ -z "$dpid" ] -then - echo "No docker hardhat container running..."; -else - docker kill $dpid; -fi echo "Starting hardhat..." -docker run --net container:devnet_local -d ethereumoptimism/hardhat +docker run --net container:chainlink-starknet.starknet-devnet -d --name chainlink-starknet.hardhat ethereumoptimism/hardhat diff --git a/package.json b/package.json index ee95eba8b..86b03eb22 100644 --- a/package.json +++ b/package.json @@ -45,8 +45,6 @@ "devDependencies": { "@changesets/cli": "^2.22.0", "@types/bn.js": "^5.1.1", - "@types/mocha": "^9.1.1", - "@types/chai": "^4.3.1", "@types/jest": "^28.1.0", "@types/node": "^18.7.11", "bn.js": "^5.2.1", diff --git a/packages-ts/integration-eqlabs-multisig/package.json b/packages-ts/integration-eqlabs-multisig/package.json index d075ad7f7..5f19c3d66 100644 --- a/packages-ts/integration-eqlabs-multisig/package.json +++ b/packages-ts/integration-eqlabs-multisig/package.json @@ -13,6 +13,7 @@ "@changesets/cli": "^2.22.0", "@nomiclabs/hardhat-ethers": "^2.0.5", "@shardlabs/starknet-hardhat-plugin": "^0.6.2", + "@types/chai": "^4.3.3", "@types/elliptic": "^6.4.14", "@types/mocha": "^9.1.1", "chai": "^4.3.6", diff --git a/packages-ts/integration-starkgate/package.json b/packages-ts/integration-starkgate/package.json index cd03ab008..296d6c5a7 100644 --- a/packages-ts/integration-starkgate/package.json +++ b/packages-ts/integration-starkgate/package.json @@ -14,6 +14,7 @@ "license": "MIT", "devDependencies": { "@shardlabs/starknet-hardhat-plugin": "^0.6.2", + "@types/chai": "^4.3.3", "@types/mocha": "^9.1.1", "chai": "^4.3.6", "hardhat": "^2.10.2" diff --git a/yarn.lock b/yarn.lock index b8af8ddba..0956ce93c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1967,7 +1967,7 @@ dependencies: "@types/node" "*" -"@types/chai@*", "@types/chai@^4.3.1": +"@types/chai@*", "@types/chai@^4.3.3": version "4.3.3" resolved "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== From 1db4a8e7ee67e5c3f4bbc6549681c6b010a43d5d Mon Sep 17 00:00:00 2001 From: Kristijan Rebernisak Date: Sun, 4 Sep 2022 20:01:58 +0200 Subject: [PATCH 20/20] Simplify tests - remove 'expectAddressEquality' fn --- .../test/emergency/StarkNetValidator.test.ts | 45 ++--- contracts/test/ocr2/aggregator.test.ts | 16 +- contracts/test/utils.ts | 25 ++- .../{ => src}/utils/index.ts | 8 +- .../test/tokenBridge.test.ts | 169 +++++++++--------- 5 files changed, 117 insertions(+), 146 deletions(-) rename packages-ts/integration-starkgate/{ => src}/utils/index.ts (54%) diff --git a/contracts/test/emergency/StarkNetValidator.test.ts b/contracts/test/emergency/StarkNetValidator.test.ts index cf99dcba4..b46c3c10a 100644 --- a/contracts/test/emergency/StarkNetValidator.test.ts +++ b/contracts/test/emergency/StarkNetValidator.test.ts @@ -9,7 +9,6 @@ import { } from 'hardhat/types' import { expect } from 'chai' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { expectAddressEquality } from '../utils' import { getSelectorFromName } from 'starknet/dist/utils/hash' describe('StarkNetValidator', () => { @@ -63,31 +62,25 @@ describe('StarkNetValidator', () => { describe('StarkNetValidator', () => { it('should get the selector from the name successfully', async () => { - const setSelector = getSelectorFromName('update_status') - expect(BigInt(setSelector)).to.equal( - 1585322027166395525705364165097050997465692350398750944680096081848180365267n, - ) + const actual = getSelectorFromName('update_status') + const expected = 1585322027166395525705364165097050997465692350398750944680096081848180365267n + expect(BigInt(actual)).to.equal(expected) }) it('reverts if `StarkNetValidator.validate` called by account with no access', async () => { - await expect(starkNetValidator.connect(eoaValidator).validate(0, 0, 1, 1)).to.be.revertedWith( - 'No access', - ) + const c = starkNetValidator.connect(eoaValidator) + await expect(c.validate(0, 0, 1, 1)).to.be.revertedWith('No access') }) it('should not revert if `sequencer_uptime_feed.latest_round_data` called by an Account with no explicit access (Accounts are allowed read access)', async () => { - const res = await account.call(l2Contract, 'latest_round_data') - expect(res.round.answer).to.equal(0n) + const { round } = await account.call(l2Contract, 'latest_round_data') + expect(round.answer).to.equal(0n) }) it('should deploy the messaging contract', async () => { - const { - address: deployedTo, - l1_provider: L1Provider, - } = await starknet.devnet.loadL1MessagingContract(networkUrl) - - expect(deployedTo).not.to.be.undefined - expect(L1Provider).to.equal(networkUrl) + const { address, l1_provider } = await starknet.devnet.loadL1MessagingContract(networkUrl) + expect(address).not.to.be.undefined + expect(l1_provider).to.equal(networkUrl) }) it('should load the already deployed contract if the address is provided', async () => { @@ -113,9 +106,9 @@ describe('StarkNetValidator', () => { expect(msgFromL1).to.have.a.lengthOf(1) expect(resp.consumed_messages.from_l2).to.be.empty - expectAddressEquality(msgFromL1[0].args.from_address, starkNetValidator.address) - expectAddressEquality(msgFromL1[0].args.to_address, l2Contract.address) - expectAddressEquality(msgFromL1[0].address, mockStarkNetMessaging.address) + expect(msgFromL1[0].args.from_address).to.equal(starkNetValidator.address) + expect(msgFromL1[0].args.to_address).to.equal(l2Contract.address) + expect(msgFromL1[0].address).to.equal(mockStarkNetMessaging.address) // Assert L2 effects const res = await account.call(l2Contract, 'latest_round_data') @@ -136,9 +129,9 @@ describe('StarkNetValidator', () => { expect(msgFromL1).to.have.a.lengthOf(1) expect(resp.consumed_messages.from_l2).to.be.empty - expectAddressEquality(msgFromL1[0].args.from_address, starkNetValidator.address) - expectAddressEquality(msgFromL1[0].args.to_address, l2Contract.address) - expectAddressEquality(msgFromL1[0].address, mockStarkNetMessaging.address) + expect(msgFromL1[0].args.from_address).to.equal(starkNetValidator.address) + expect(msgFromL1[0].args.to_address).to.equal(l2Contract.address) + expect(msgFromL1[0].address).to.equal(mockStarkNetMessaging.address) // Assert L2 effects const res = await account.call(l2Contract, 'latest_round_data') @@ -163,9 +156,9 @@ describe('StarkNetValidator', () => { expect(msgFromL1).to.have.a.lengthOf(4) expect(resp.consumed_messages.from_l2).to.be.empty - expectAddressEquality(msgFromL1[0].args.from_address, starkNetValidator.address) - expectAddressEquality(msgFromL1[0].args.to_address, l2Contract.address) - expectAddressEquality(msgFromL1[0].address, mockStarkNetMessaging.address) + expect(msgFromL1[0].args.from_address).to.equal(starkNetValidator.address) + expect(msgFromL1[0].args.to_address).to.equal(l2Contract.address) + expect(msgFromL1[0].address).to.equal(mockStarkNetMessaging.address) // Assert L2 effects const res = await account.call(l2Contract, 'latest_round_data') diff --git a/contracts/test/ocr2/aggregator.test.ts b/contracts/test/ocr2/aggregator.test.ts index dec439591..bf23610a9 100644 --- a/contracts/test/ocr2/aggregator.test.ts +++ b/contracts/test/ocr2/aggregator.test.ts @@ -1,28 +1,18 @@ import { assert, expect } from 'chai' import BN from 'bn.js' import { starknet } from 'hardhat' -import { constants, ec, encode, hash, number, uint256, stark, KeyPair } from 'starknet' +import { ec, hash, number, uint256, KeyPair } from 'starknet' import { BigNumberish } from 'starknet/utils/number' import { Account, StarknetContract, StarknetContractFactory } from 'hardhat/types/runtime' import { TIMEOUT } from '../constants' +import { toFelt, hexPadStart } from '../utils' + interface Oracle { signer: KeyPair transmitter: Account } -// Required to convert negative values into [0, PRIME) range -const toFelt = (int: number | BigNumberish): BigNumberish => { - const prime = number.toBN(encode.addHexPrefix(constants.FIELD_PRIME)) - return number.toBN(int).umod(prime) -} - -// NOTICE: Leading zeros are trimmed for an encoded felt (number). -// To decode, the raw felt needs to be start padded up to max felt size (252 bits or < 32 bytes). -const hexPadStart = (data: number, len: number) => { - return `0x${data.toString(16).padStart(len, '0')}` -} - const CHUNK_SIZE = 31 // Observers - max 31 oracles or 31 bytes diff --git a/contracts/test/utils.ts b/contracts/test/utils.ts index 182ffcc0e..e49813c3d 100644 --- a/contracts/test/utils.ts +++ b/contracts/test/utils.ts @@ -1,3 +1,5 @@ +import { constants, ec, encode, hash, number, uint256, stark, KeyPair } from 'starknet' +import { BigNumberish } from 'starknet/utils/number' import { expect } from 'chai' export const expectInvokeError = async (invoke: Promise, expected?: string) => { @@ -43,21 +45,14 @@ export const expectSpecificMsg = (actual: string, expected: string) => { } else expect.fail(`\nActual: ${actual}\n\nExpected: ${expected}`) } -/** - * Receives a hex address, converts it to bigint, converts it back to hex. - * This is done to strip leading zeros. - * @param address a hex string representation of an address - * @returns an adapted hex string representation of the address - */ -function adaptAddress(address: string) { - return '0x' + BigInt(address).toString(16) +// Required to convert negative values into [0, PRIME) range +export const toFelt = (int: number | BigNumberish): BigNumberish => { + const prime = number.toBN(encode.addHexPrefix(constants.FIELD_PRIME)) + return number.toBN(int).umod(prime) } -/** - * Expects address equality after adapting them. - * @param actual - * @param expected - */ -export function expectAddressEquality(actual: string, expected: string) { - expect(adaptAddress(actual)).to.equal(adaptAddress(expected)) +// NOTICE: Leading zeros are trimmed for an encoded felt (number). +// To decode, the raw felt needs to be start padded up to max felt size (252 bits or < 32 bytes). +export const hexPadStart = (data: number | bigint, len: number) => { + return `0x${data.toString(16).padStart(len, '0')}` } diff --git a/packages-ts/integration-starkgate/utils/index.ts b/packages-ts/integration-starkgate/src/utils/index.ts similarity index 54% rename from packages-ts/integration-starkgate/utils/index.ts rename to packages-ts/integration-starkgate/src/utils/index.ts index 754e60be7..001de24a0 100644 --- a/packages-ts/integration-starkgate/utils/index.ts +++ b/packages-ts/integration-starkgate/src/utils/index.ts @@ -5,17 +5,17 @@ export const loadContract_InternalStarkgate = (name: string): any => { return json.parse( fs .readFileSync( - `${__dirname}/../../../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/${name}.json`, + `${__dirname}/../../../../node_modules/internals-starkgate-contracts/artifacts/0.0.3/eth/${name}.json`, ) .toString('ascii'), ) } -export const loadContract_Openzepplin = (name: string): any => { +export const loadContract_OpenZepplin = (name: string): any => { return json.parse( fs .readFileSync( - `${__dirname}/../../../node_modules/@openzeppelin/contracts/build/contracts/${name}.json`, + `${__dirname}/../../../../node_modules/@openzeppelin/contracts/build/contracts/${name}.json`, ) .toString('ascii'), ) @@ -25,7 +25,7 @@ export const loadContract_Solidity = (name: string): any => { return json.parse( fs .readFileSync( - `${__dirname}/../../../contracts/artifacts/src/chainlink/solidity/mocks/${name}.sol/${name}.json`, + `${__dirname}/../../../../contracts/artifacts/src/chainlink/solidity/mocks/${name}.sol/${name}.json`, ) .toString('ascii'), ) diff --git a/packages-ts/integration-starkgate/test/tokenBridge.test.ts b/packages-ts/integration-starkgate/test/tokenBridge.test.ts index ed3cfb9c9..21153100f 100644 --- a/packages-ts/integration-starkgate/test/tokenBridge.test.ts +++ b/packages-ts/integration-starkgate/test/tokenBridge.test.ts @@ -1,37 +1,34 @@ import { TIMEOUT } from './constants' import { ethers, starknet, network } from 'hardhat' -import { Contract, ContractFactory } from 'ethers' +import { Contract } from 'ethers' import { uint256, number } from 'starknet' import { StarknetContract, HttpNetworkConfig, Account } from 'hardhat/types' import { expect } from 'chai' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { expectAddressEquality } from '../../../contracts/test/utils' +import { hexPadStart } from '../../../contracts/test/utils' import { loadContract_Solidity, loadContract_InternalStarkgate, - loadContract_Openzepplin, -} from '../utils' + loadContract_OpenZepplin, +} from '../src/utils' const NAME = 'ChainLink Token' const SYMBOL = 'LINK' -describe('Test starkgate bridge with link token', function () { +describe('Test StarkGate token bridge + link_token.cairo', function () { this.timeout(TIMEOUT) + + // L2 StarkNet const networkUrl: string = (network.config as HttpNetworkConfig).url let owner: Account - let tokenBridgeContract: StarknetContract - let linkTokenContract: StarknetContract - let deployer: SignerWithAddress + let tokenBridge: StarknetContract + let tokenL2: StarknetContract - let proxyFactory: ContractFactory - - let starkNetERC20Bridge: Contract + // L1 Ethereum + let deployer: SignerWithAddress let mockStarknetMessaging: Contract - let proxy: Contract - let testERC20: Contract - let newStarkNetERC20Bridge: Contract - - let starkNetERC20BridgeContract: any + let tokenL1: Contract + let starknetERC20Bridge: Contract before(async () => { owner = await starknet.deployAccount('OpenZeppelin') @@ -39,29 +36,26 @@ describe('Test starkgate bridge with link token', function () { let tokenBridgeFactory = await starknet.getContractFactory( '../../node_modules/@chainlink-dev/starkgate-contracts/artifacts/token_bridge.cairo', ) - tokenBridgeContract = await tokenBridgeFactory.deploy({ + tokenBridge = await tokenBridgeFactory.deploy({ governor_address: owner.starknetContract.address, }) let linkTokenFactory = await starknet.getContractFactory('link_token') - linkTokenContract = await linkTokenFactory.deploy({ owner: tokenBridgeContract.address }) - - const accounts = await ethers.getSigners() - deployer = accounts[0] - - starkNetERC20BridgeContract = await loadContract_InternalStarkgate('StarknetERC20Bridge') + tokenL2 = await linkTokenFactory.deploy({ owner: tokenBridge.address }) + ;[deployer] = await ethers.getSigners() + // Different .json artifact - incompatible with 'ethers.getContractFactoryFromArtifact' + const starknetERC20BridgeArtifact = await loadContract_InternalStarkgate('StarknetERC20Bridge') const starkNetERC20BridgeFactory = new ethers.ContractFactory( - starkNetERC20BridgeContract.abi, - starkNetERC20BridgeContract.bytecode, + starknetERC20BridgeArtifact.abi, + starknetERC20BridgeArtifact.bytecode, deployer, ) - starkNetERC20Bridge = await starkNetERC20BridgeFactory.deploy() - await starkNetERC20Bridge.deployed() + const starkNetERC20BridgeCode = await starkNetERC20BridgeFactory.deploy() + await starkNetERC20BridgeCode.deployed() - const mockStarknetMessagingContract = await loadContract_Solidity('MockStarkNetMessaging') - const mockStarknetMessagingFactory = new ethers.ContractFactory( - mockStarknetMessagingContract.abi, - mockStarknetMessagingContract.bytecode, + const mockStarknetMessagingArtifact = await loadContract_Solidity('MockStarkNetMessaging') + const mockStarknetMessagingFactory = await ethers.getContractFactoryFromArtifact( + mockStarknetMessagingArtifact, deployer, ) mockStarknetMessaging = await mockStarknetMessagingFactory.deploy() @@ -69,102 +63,98 @@ describe('Test starkgate bridge with link token', function () { await starknet.devnet.loadL1MessagingContract(networkUrl, mockStarknetMessaging.address) - const testERC20contract = await loadContract_Openzepplin('ERC20PresetFixedSupply') - const testERC20Factory = new ethers.ContractFactory( - testERC20contract.abi, - testERC20contract.bytecode, + const tokenERC20Artifact = await loadContract_OpenZepplin('ERC20PresetFixedSupply') + const tokenERC20Factory = await ethers.getContractFactoryFromArtifact( + tokenERC20Artifact, deployer, ) - testERC20 = await testERC20Factory.deploy(NAME, SYMBOL, 10, deployer.address) - await testERC20.deployed() + tokenL1 = await tokenERC20Factory.deploy(NAME, SYMBOL, 10, deployer.address) + await tokenL1.deployed() - const proxyContract = await loadContract_Openzepplin('ERC1967Proxy') - proxyFactory = new ethers.ContractFactory(proxyContract.abi, proxyContract.bytecode, deployer) + const proxyArtifact = await loadContract_OpenZepplin('ERC1967Proxy') + const proxyFactory = await ethers.getContractFactoryFromArtifact(proxyArtifact, deployer) - const inter = new ethers.utils.Interface(starkNetERC20BridgeContract.abi) + const inter = new ethers.utils.Interface(starknetERC20BridgeArtifact.abi) const data = ethers.utils.hexConcat([ ethers.utils.hexZeroPad(ethers.constants.AddressZero, 32), - ethers.utils.hexZeroPad(testERC20.address, 32), + ethers.utils.hexZeroPad(tokenL1.address, 32), ethers.utils.hexZeroPad(mockStarknetMessaging.address, 32), ]) let encode_data = inter.encodeFunctionData('initialize(bytes data)', [data]) - proxy = await proxyFactory.deploy(starkNetERC20Bridge.address, encode_data) + const proxy = await proxyFactory.deploy(starkNetERC20BridgeCode.address, encode_data) await proxy.deployed() + + starknetERC20Bridge = await ethers.getContractAt(starknetERC20BridgeArtifact.abi, proxy.address) }) - describe('Test bridge from L1 to L2', function () { - it('Test Set and Get function for L2 token address', async () => { - await owner.invoke(tokenBridgeContract, 'set_l2_token', { - l2_token_address: linkTokenContract.address, + describe('deposit (L1 -> L2)', function () { + it('should configure L2 token bridge with L2 token successfully', async () => { + await owner.invoke(tokenBridge, 'set_l2_token', { + l2_token_address: tokenL2.address, }) - const { res: l2_address } = await tokenBridgeContract.call('get_l2_token', {}) - expectAddressEquality(l2_address.toString(), linkTokenContract.address) + const { res: l2Token } = await tokenBridge.call('get_l2_token', {}) + expect(hexPadStart(l2Token, 32 * 2)).to.equal(tokenL2.address) }) - it('should wrap contract and set L2 TokenBridge successfully', async () => { - newStarkNetERC20Bridge = await ethers.getContractAt( - starkNetERC20BridgeContract.abi, - proxy.address, - ) - - const tx = await newStarkNetERC20Bridge.setL2TokenBridge(BigInt(tokenBridgeContract.address)) - await expect(tx) - .to.emit(newStarkNetERC20Bridge, 'LogSetL2TokenBridge') - .withArgs(BigInt(tokenBridgeContract.address)) + it(`should configure L2 token bridge with L1 token bridge successfully`, async () => { + await owner.invoke(tokenBridge, 'set_l1_bridge', { + l1_bridge_address: starknetERC20Bridge.address, + }) + const { res: l1Bridge } = await tokenBridge.call('get_l1_bridge', {}) + expect(hexPadStart(l1Bridge, 20 * 2)).to.equal(starknetERC20Bridge.address.toLowerCase()) }) - it('Test Set and Get function for L1 bridge address', async () => { - await owner.invoke(tokenBridgeContract, 'set_l1_bridge', { - l1_bridge_address: newStarkNetERC20Bridge.address, - }) - const { res: l1_address } = await tokenBridgeContract.call('get_l1_bridge', {}) - expectAddressEquality(l1_address.toString(), newStarkNetERC20Bridge.address) + it('should configure L1 token bridge with L2 token bridge successfully', async () => { + const tx = await starknetERC20Bridge.setL2TokenBridge(BigInt(tokenBridge.address)) + await expect(tx) + .to.emit(starknetERC20Bridge, 'LogSetL2TokenBridge') + .withArgs(BigInt(tokenBridge.address)) }) - it('should set Max total balance', async () => { - await newStarkNetERC20Bridge.setMaxTotalBalance(100000) - const totalbalance = await newStarkNetERC20Bridge.maxTotalBalance() + it('should configure L1 token bridge MaxTotalBalance', async () => { + await starknetERC20Bridge.setMaxTotalBalance(100000) + const totalbalance = await starknetERC20Bridge.maxTotalBalance() expect(totalbalance).to.equal(100000) }) - it('should set Max deposit', async () => { - await newStarkNetERC20Bridge.setMaxDeposit(100) - const deposit = await newStarkNetERC20Bridge.maxDeposit() + it('should configure L1 token bridge MaxDeposit', async () => { + await starknetERC20Bridge.setMaxDeposit(100) + const deposit = await starknetERC20Bridge.maxDeposit() expect(deposit).to.equal(100) }) - it('should deposit to the L2 contract, L1 balance should be decreased by 2', async () => { - await testERC20.approve(newStarkNetERC20Bridge.address, 2) - await newStarkNetERC20Bridge.deposit(2, owner.starknetContract.address) + it('should deposit to L1 token bridge', async () => { + await tokenL1.approve(starknetERC20Bridge.address, 2) + await starknetERC20Bridge.deposit(2, owner.starknetContract.address) - const balance = await testERC20.balanceOf(deployer.address) + const balance = await tokenL1.balanceOf(deployer.address) expect(balance).to.equal(8) }) - it('should flush the L1 messages so that they can be consumed by the L2.', async () => { + it('should flush L1 messages and consume on L2.', async () => { const flushL1Response = await starknet.devnet.flush() const flushL1Messages = flushL1Response.consumed_messages.from_l1 expect(flushL1Messages).to.have.a.lengthOf(1) expect(flushL1Response.consumed_messages.from_l2).to.be.empty - expectAddressEquality(flushL1Messages[0].args.from_address, newStarkNetERC20Bridge.address) - expectAddressEquality(flushL1Messages[0].args.to_address, tokenBridgeContract.address) - expectAddressEquality(flushL1Messages[0].address, mockStarknetMessaging.address) + expect(flushL1Messages[0].args.from_address).to.equal(starknetERC20Bridge.address) + expect(flushL1Messages[0].args.to_address).to.equal(tokenBridge.address) + expect(flushL1Messages[0].address).to.equal(mockStarknetMessaging.address) - let { balance: balance } = await linkTokenContract.call('balanceOf', { + const { balance } = await tokenL2.call('balanceOf', { account: owner.starknetContract.address, }) expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(2)) }) }) - describe('Test bridge from L2 to L1', function () { - it('should initiate withdraw and send message to L1', async () => { - await owner.invoke(tokenBridgeContract, 'initiate_withdraw', { + describe('withdraw (L1 <- L2)', function () { + it('should initiate withdraw on L2 and send message to L1', async () => { + await owner.invoke(tokenBridge, 'initiate_withdraw', { l1_recipient: BigInt(deployer.address), amount: uint256.bnToUint256(2), }) - let { balance: balance } = await linkTokenContract.call('balanceOf', { + let { balance } = await tokenL2.call('balanceOf', { account: owner.starknetContract.address, }) expect(uint256.uint256ToBN(balance)).to.deep.equal(number.toBN(0)) @@ -174,14 +164,17 @@ describe('Test starkgate bridge with link token', function () { const flushL2Messages = flushL2Response.consumed_messages.from_l2 expect(flushL2Messages).to.have.a.lengthOf(1) - expectAddressEquality(flushL2Messages[0].from_address, tokenBridgeContract.address) - expectAddressEquality(flushL2Messages[0].to_address, newStarkNetERC20Bridge.address) + expect(flushL2Messages[0].from_address).to.equal(tokenBridge.address) + // TODO: Starknet Devnet bug - 'consumed_messages.from_l2.[].to_address' not always padded to 20 bytes (expected b/c address) + expect(hexPadStart(BigInt(flushL2Messages[0].to_address), 20 * 2)).to.equal( + starknetERC20Bridge.address.toLowerCase(), + ) }) - it('should withdraw 2 which will consume the L2 message successfully', async () => { - await newStarkNetERC20Bridge['withdraw(uint256)'](2) + it('should withdraw from L1 token bridge and consume the L2 message successfully', async () => { + await starknetERC20Bridge['withdraw(uint256)'](2) - const balance = await testERC20.balanceOf(deployer.address) + const balance = await tokenL1.balanceOf(deployer.address) expect(balance).to.equal(10) }) })