diff --git a/packages/deploy/deploy/marketplace/03_deploy_asset_matcher.ts b/packages/deploy/deploy/marketplace/03_deploy_asset_matcher.ts index f83bfc7079..912d86bedd 100644 --- a/packages/deploy/deploy/marketplace/03_deploy_asset_matcher.ts +++ b/packages/deploy/deploy/marketplace/03_deploy_asset_matcher.ts @@ -12,7 +12,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const assetMatcher = await deploy('AssetMatcher', { from: deployer, - contract: `@sandbox-smart-contracts/marketplace/src/exchange/AssetMatcher.sol:AssetMatcher`, + contract: + '@sandbox-smart-contracts/marketplace/src/exchange/AssetMatcher.sol:AssetMatcher', log: true, skipIfAlreadyDeployed: true, }); diff --git a/packages/marketplace/hardhat.config.ts b/packages/marketplace/hardhat.config.ts index 36dcff8554..17bd59c95d 100644 --- a/packages/marketplace/hardhat.config.ts +++ b/packages/marketplace/hardhat.config.ts @@ -1,8 +1,57 @@ -import {HardhatUserConfig} from 'hardhat/config'; +import '@nomiclabs/hardhat-ethers'; +import '@nomiclabs/hardhat-etherscan'; +import '@nomicfoundation/hardhat-network-helpers'; +import '@nomicfoundation/hardhat-chai-matchers'; +import 'hardhat-deploy'; +import 'hardhat-contract-sizer'; +import 'solidity-coverage'; +import 'dotenv/config'; -import "@nomiclabs/hardhat-truffle5"; +/** + * TAGS: + * - mainnet -> production networks (you must pay for gas!!!) + * - L1 -> Layer 1 networks + * - L2 -> Layer 2 networks + */ +const networks = { + hardhat: { + tags: ['L1', 'L2'], + deploy: ['deploy_mocks/', 'deploy/'], + companionNetworks: { + l1: 'hardhat', + l2: 'hardhat', + }, + blockGasLimit: + parseInt(process.env.HARDHAT_BLOCK_GAS_LIMIT || '0') || 30000000, + }, + goerli: { + tags: ['L1'], + // gasPrice: 600000000000, // Uncomment in case of pending txs, and adjust gas + companionNetworks: { + l2: 'mumbai', + }, + }, + mainnet: { + tags: ['mainnet', 'L1'], + companionNetworks: { + l2: 'polygon', + }, + }, + mumbai: { + tags: ['L2'], + companionNetworks: { + l1: 'goerli', + }, + }, + polygon: { + tags: ['mainnet', 'L2'], + companionNetworks: { + l1: 'mainnet', + }, + }, +}; -const config: HardhatUserConfig = { +const config = { // solidity compiler version may be updated for new packages as required // to ensure packages use up-to-date dependencies solidity: { diff --git a/packages/marketplace/package.json b/packages/marketplace/package.json index 8d672c4d58..823afb6334 100644 --- a/packages/marketplace/package.json +++ b/packages/marketplace/package.json @@ -3,18 +3,46 @@ "version": "1.0.0", "description": "", "dependencies": { - "@sandbox-smart-contracts/dependency-metatx": "^0.0.2" + "@sandbox-smart-contracts/dependency-metatx": "^0.0.2", + "web3-core-helpers": "^1.10.0", + "web3-core-promievent": "^1.10.0", + "web3-eth-abi": "^4.1.1" }, "devDependencies": { - "@daonomic/tests-common": "^0.2.2", - "@nomiclabs/hardhat-truffle5": "^2.0.7", - "@nomiclabs/hardhat-web3": "^2.0.0", - "@openzeppelin/contracts": "4.9.3", - "@openzeppelin/contracts-upgradeable": "4.9.3", + "@ethereumjs/block": "^3.5.1", + "@ethereumjs/common": "^2.5.0", + "@ethereumjs/tx": "^3.3.2", + "@ethersproject/units": "^5.7.0", + "@ethersproject/wallet": "^5.0.5", + "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", + "@nomicfoundation/hardhat-network-helpers": "^1.0.9", + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.7", + "@nomiclabs/hardhat-etherscan": "^3.0.3", + "@openzeppelin/contracts": "^4.9.3", + "@openzeppelin/contracts-upgradeable": "^4.9.3", "@types/chai": "^4.2.11", - "hardhat": "^2.17.2", + "@types/mocha": "^8.0.2", + "@types/node": "^14.10.2", + "@typescript-eslint/eslint-plugin": "^4.6.0", + "@typescript-eslint/parser": "^4.6.0", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "dotenv": "^8.2.0", + "dotenv-cli": "^4.0.0", + "eslint": "^7.7.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-mocha": "^8.0.0", + "ethereumjs-util": "^7.1.3", + "ethers": "^5.7.2", + "hardhat": "~2.15.0", "hardhat-contract-sizer": "^2.0.3", "hardhat-deploy": "^0.10.5", + "hardhat-gas-reporter": "^1.0.4", + "prettier": "2.0.5", + "prettier-plugin-solidity": "1.0.0-beta.11", + "readline": "^1.3.0", + "solhint-plugin-prettier": "^0.0.5", + "solidity-coverage": "0.8.2", "ts-node": "^10.9.1", "typescript": "^4.0.5", "web3": "^1.10.2" diff --git a/packages/marketplace/src/test/FakeProxy.sol b/packages/marketplace/src/test/FakeProxy.sol new file mode 100644 index 0000000000..6055f0cd62 --- /dev/null +++ b/packages/marketplace/src/test/FakeProxy.sol @@ -0,0 +1,36 @@ +//SPDX-License-Identifier: MIT +// solhint-disable-next-line compiler-version +pragma solidity 0.8.19; + +import {ERC1967UpgradeUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol"; + +/// @dev just for testing don't use this code on production !!!! +contract FakeProxy is ERC1967UpgradeUpgradeable { + constructor(address newImplementation) { + _upgradeTo(newImplementation); + } + + function _delegate(address implementation) internal virtual { + // solhint-disable-next-line no-inline-assembly + assembly { + calldatacopy(0, 0, calldatasize()) + let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) + returndatacopy(0, 0, returndatasize()) + switch result + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) + } + } + } + + fallback() external payable { + _delegate(_getImplementation()); + } + + receive() external payable { + _delegate(_getImplementation()); + } +} diff --git a/packages/marketplace/test/AssetMatcher.test.js b/packages/marketplace/test/AssetMatcher.test.js deleted file mode 100644 index 5aa5ca0bf6..0000000000 --- a/packages/marketplace/test/AssetMatcher.test.js +++ /dev/null @@ -1,216 +0,0 @@ -const AssetMatcher = artifacts.require('AssetMatcher.sol'); -const TestAssetMatcher = artifacts.require('TestAssetMatcher.sol'); - -const {expectThrow} = require('@daonomic/tests-common'); - -const order = require('./utils/order.js'); -const { - enc, - ETH, - ERC20, - ERC721, - ERC1155, - BUNDLE, - id, -} = require('./utils/assets.js'); - -contract('AssetMatcher', (accounts) => { - let testing; - - before(async function () { - testing = await AssetMatcher.new(); - }); - - it('setAssetMatcher works', async function () { - const encoded = enc(accounts[5]); - await expectThrow( - testing.matchAssets( - order.AssetType(ERC20, encoded), - order.AssetType(id('BLA'), encoded) - ) - ); - const testMatcher = await TestAssetMatcher.new(); - await testing.setAssetMatcher(id('BLA'), testMatcher.address); - const result = await testing.matchAssets( - order.AssetType(ERC20, encoded), - order.AssetType(id('BLA'), encoded) - ); - assert.equal(result[0], ERC20); - assert.equal(result[1], encoded); - }); - - describe('ETH', function () { - it('should extract ETH type if both are ETHs', async function () { - const result = await testing.matchAssets( - order.AssetType(ETH, '0x'), - order.AssetType(ETH, '0x') - ); - assert.equal(result[0], ETH); - }); - - it('should extract nothing if one is not ETH', async function () { - const result = await testing.matchAssets( - order.AssetType(ETH, '0x'), - order.AssetType(ERC20, '0x') - ); - assert.equal(result[0], 0); - }); - }); - - describe('ERC20', function () { - it('should extract ERC20 type if both are and addresses equal', async function () { - const encoded = enc(accounts[5]); - const result = await testing.matchAssets( - order.AssetType(ERC20, encoded), - order.AssetType(ERC20, encoded) - ); - assert.equal(result[0], ERC20); - assert.equal(result[1], encoded); - }); - - it("should extract nothing if erc20 don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(ERC20, enc(accounts[1])), - order.AssetType(ERC20, enc(accounts[2])) - ); - assert.equal(result[0], 0); - }); - - it('should extract nothing if other type is not ERC20', async function () { - const result = await testing.matchAssets( - order.AssetType(ERC20, enc(accounts[1])), - order.AssetType(ETH, '0x') - ); - assert.equal(result[0], 0); - }); - }); - - describe('ERC721', function () { - it('should extract ERC721 type if both are equal', async function () { - const encoded = enc(accounts[5], 100); - const result = await testing.matchAssets( - order.AssetType(ERC721, encoded), - order.AssetType(ERC721, encoded) - ); - assert.equal(result[0], ERC721); - assert.equal(result[1], encoded); - }); - - it("should extract nothing if tokenIds don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(ERC721, enc(accounts[5], 100)), - order.AssetType(ERC721, enc(accounts[5], 101)) - ); - assert.equal(result[0], 0); - }); - - it("should extract nothing if addresses don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(ERC721, enc(accounts[4], 100)), - order.AssetType(ERC721, enc(accounts[5], 100)) - ); - assert.equal(result[0], 0); - }); - - it('should extract nothing if other type is not ERC721', async function () { - const result = await testing.matchAssets( - order.AssetType(ERC721, enc(accounts[5], 100)), - order.AssetType(ETH, '0x') - ); - assert.equal(result[0], 0); - }); - }); - - describe('ERC1155', function () { - it('should extract ERC1155 type if both are equal', async function () { - const encoded = enc(accounts[5], 100); - const result = await testing.matchAssets( - order.AssetType(ERC1155, encoded), - order.AssetType(ERC1155, encoded) - ); - assert.equal(result[0], ERC1155); - assert.equal(result[1], encoded); - }); - - it("should extract nothing if tokenIds don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(ERC1155, enc(accounts[5], 100)), - order.AssetType(ERC1155, enc(accounts[5], 101)) - ); - assert.equal(result[0], 0); - }); - - it("should extract nothing if addresses don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(ERC1155, enc(accounts[4], 100)), - order.AssetType(ERC1155, enc(accounts[5], 100)) - ); - assert.equal(result[0], 0); - }); - - it('should extract nothing if other type is not erc1155', async function () { - const encoded = enc(accounts[5], 100); - const result = await testing.matchAssets( - order.AssetType(ERC1155, encoded), - order.AssetType(ERC721, encoded) - ); - assert.equal(result[0], 0); - }); - }); - - describe('BUNDLE', function () { - it('should extract BUNDLE type if both are equal', async function () { - const encoded = enc(accounts[5], 100); - const result = await testing.matchAssets( - order.AssetType(BUNDLE, encoded), - order.AssetType(BUNDLE, encoded) - ); - assert.equal(result[0], BUNDLE); - assert.equal(result[1], encoded); - }); - - it("should extract nothing if tokenIds don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(BUNDLE, enc(accounts[5], 100)), - order.AssetType(BUNDLE, enc(accounts[5], 101)) - ); - assert.equal(result[0], 0); - }); - - it("should extract nothing if addresses don't match", async function () { - const result = await testing.matchAssets( - order.AssetType(BUNDLE, enc(accounts[4], 100)), - order.AssetType(BUNDLE, enc(accounts[5], 100)) - ); - assert.equal(result[0], 0); - }); - - it('should extract nothing if other type is not a BUNDLE', async function () { - const encoded = enc(accounts[5], 100); - const result = await testing.matchAssets( - order.AssetType(BUNDLE, encoded), - order.AssetType(ERC721, encoded) - ); - assert.equal(result[0], 0); - }); - }); - - describe('generic', function () { - it('should extract left type if asset types are equal', async function () { - const result = await testing.matchAssets( - order.AssetType('0x00112233', '0x1122'), - order.AssetType('0x00112233', '0x1122') - ); - assert.equal(result[0], '0x00112233'); - assert.equal(result[1], '0x1122'); - }); - - it('should extract nothing single byte differs', async function () { - const result = await testing.matchAssets( - order.AssetType('0x00112233', '0x1122'), - order.AssetType('0x00112233', '0x1111') - ); - assert.equal(result[0], 0); - }); - }); -}); diff --git a/packages/marketplace/test/LibFill.test.js b/packages/marketplace/test/LibFill.test.js deleted file mode 100644 index a136561b5f..0000000000 --- a/packages/marketplace/test/LibFill.test.js +++ /dev/null @@ -1,303 +0,0 @@ -const LibFillTest = artifacts.require('LibFillTest.sol'); - -const order = require('./utils/order.js'); -const ZERO = '0x0000000000000000000000000000000000000000'; -const {expectThrow} = require('@daonomic/tests-common'); - -contract('LibFill', () => { - let lib; - - before(async function () { - lib = await LibFillTest.new(); - }); - - describe('right order fill', function () { - it('should fill fully right order if amounts are fully matched', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 50), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 50); - assert.equal(fill[1], 100); - }); - - it('should throw if right order is fully matched, but price is not ok', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 99), - ZERO, - order.Asset('0x00000000', '0x', 50), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await expectThrow(lib.fillOrder(left, right, 0, 0, false, false)); - }); - - it('should fill right order and return profit if more than needed', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 101), - ZERO, - order.Asset('0x00000000', '0x', 50), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 50); - assert.equal(fill[1], 100); - }); - }); - - describe('left order fill', function () { - it('should fill orders when prices match exactly', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 400), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 100); - assert.equal(fill[1], 200); - }); - - it('should fill orders when right order has better price', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 1000), - ZERO, - order.Asset('0x00000000', '0x', 2000), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 4001), - ZERO, - order.Asset('0x00000000', '0x', 2000), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 1000); - assert.equal(fill[1], 2000); - }); - - it('should throw if price is not ok', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 1000), - ZERO, - order.Asset('0x00000000', '0x', 2000), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 3990), - ZERO, - order.Asset('0x00000000', '0x', 2000), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await expectThrow(lib.fillOrder(left, right, 0, 0, false, false)); - }); - }); - - describe('both orders fill', function () { - it('should fill orders when prices match exactly', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 200), - ZERO, - order.Asset('0x00000000', '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 100); - assert.equal(fill[1], 200); - }); - - it('should fill orders when right order has better price', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 300), - ZERO, - order.Asset('0x00000000', '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 100); - assert.equal(fill[1], 200); - }); - - it('should fill orders when right order has better price with less needed amount', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 300), - ZERO, - order.Asset('0x00000000', '0x', 50), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - const fill = await lib.fillOrder(left, right, 0, 0, false, false); - assert.equal(fill[0], 50); - assert.equal(fill[1], 100); - }); - - it('should throw if price is not ok', async function () { - const left = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 100), - ZERO, - order.Asset('0x00000000', '0x', 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = order.Order( - ZERO, - order.Asset('0x00000000', '0x', 199), - ZERO, - order.Asset('0x00000000', '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await expectThrow(lib.fillOrder(left, right, 0, 0, false, false)); - }); - }); -}); diff --git a/packages/marketplace/test/LibOrder.test.js b/packages/marketplace/test/LibOrder.test.js deleted file mode 100644 index cf4f97a036..0000000000 --- a/packages/marketplace/test/LibOrder.test.js +++ /dev/null @@ -1,228 +0,0 @@ -const LibOrderTest = artifacts.require('LibOrderTest.sol'); - -const order = require('./utils/order.js'); -const {ORDER_DATA_SELL} = require('./utils/assets.js'); - -const ZERO = '0x0000000000000000000000000000000000000000'; -const {expectThrow} = require('@daonomic/tests-common'); - -contract('LibOrder', (accounts) => { - let lib; - - before(async function () { - lib = await LibOrderTest.new(); - }); - - describe('calculateRemaining', function () { - it('should calculate remaining amounts if fill=0', async function () { - const make = order.Asset('0x00000000', '0x', 100); - const take = order.Asset('0x00000000', '0x', 200); - const result = await lib.calculateRemaining( - order.Order(ZERO, make, ZERO, take, 1, 0, 0, '0xffffffff', '0x'), - 0, - false - ); - assert.equal(result[0], 100); - assert.equal(result[1], 200); - }); - - it('should calculate remaining amounts if fill is specified', async function () { - const make = order.Asset('0x00000000', '0x', 100); - const take = order.Asset('0x00000000', '0x', 200); - const result = await lib.calculateRemaining( - order.Order(ZERO, make, ZERO, take, 1, 0, 0, '0xffffffff', '0x'), - 20, - false - ); - assert.equal(result[0], 90); - assert.equal(result[1], 180); - }); - - it('should return 0s if filled fully', async function () { - const make = order.Asset('0x00000000', '0x', 100); - const take = order.Asset('0x00000000', '0x', 200); - const result = await lib.calculateRemaining( - order.Order(ZERO, make, ZERO, take, 1, 0, 0, '0xffffffff', '0x'), - 200, - false - ); - assert.equal(result[0], 0); - assert.equal(result[1], 0); - }); - - it('should throw if fill is more than in the order', async function () { - const make = order.Asset('0x00000000', '0x', 100); - const take = order.Asset('0x00000000', '0x', 200); - await expectThrow( - lib.calculateRemaining( - order.Order(ZERO, make, ZERO, take, 1, 0, 0, '0xffffffff', '0x'), - 220, - false - ) - ); - }); - - it('should return correct reaming value for makeFill = true', async function () { - const make = order.Asset('0x00000000', '0x', 200); - const take = order.Asset('0x00000000', '0x', 600); - const result = await lib.calculateRemaining( - order.Order(ZERO, make, ZERO, take, 1, 0, 0, ORDER_DATA_SELL, '0x'), - 100, - true - ); - assert.equal(result.makeAmount, 100, 'makeAmount'); - assert.equal(result.takeAmount, 300, 'takeAmount'); - }); - - it('should return correct reaming value for makeFill = false', async function () { - const make = order.Asset('0x00000000', '0x', 100); - const take = order.Asset('0x00000000', '0x', 200); - const result = await lib.calculateRemaining( - order.Order(ZERO, make, ZERO, take, 1, 0, 0, ORDER_DATA_SELL, '0x'), - 20, - false - ); - assert.equal(result.makeAmount, 90, 'makeAmount'); - assert.equal(result.takeAmount, 180, 'takeAmount'); - }); - }); - - describe('validate', function () { - let testAsset; - - beforeEach(async function () { - testAsset = order.Asset('0x00000000', '0x', 100); - }); - - it('should not throw if dates not set', async function () { - await lib.validate( - order.Order( - ZERO, - testAsset, - ZERO, - testAsset, - 0, - 0, - 0, - '0xffffffff', - '0x' - ) - ); - }); - - it('should not throw if dates are correct', async function () { - const now = parseInt(new Date() / 1000); - await lib.validate( - order.Order( - ZERO, - testAsset, - ZERO, - testAsset, - 0, - now - 100, - now + 100, - '0xffffffff', - '0x' - ) - ); - }); - - it('should throw if start date error', async function () { - const now = parseInt(new Date() / 1000); - await expectThrow( - lib.validate( - order.Order( - ZERO, - testAsset, - ZERO, - testAsset, - 0, - now + 100, - 0, - '0xffffffff', - '0x' - ) - ) - ); - }); - - it('should throw if end date error', async function () { - const now = parseInt(new Date() / 1000); - await expectThrow( - lib.validate( - order.Order( - ZERO, - testAsset, - ZERO, - testAsset, - 0, - 0, - now - 100, - '0xffffffff', - '0x' - ) - ) - ); - }); - - it('should throw if both dates error', async function () { - const now = parseInt(new Date() / 1000); - await expectThrow( - lib.validate( - order.Order( - ZERO, - testAsset, - ZERO, - testAsset, - 0, - now + 100, - now - 100, - '0xffffffff', - '0x' - ) - ) - ); - }); - }); - - describe('hashKey', function () { - let maker; - let makeAsset; - let takeAsset; - const salt = 1; - const data = '0x12'; - - beforeEach(async function () { - maker = accounts[1]; - makeAsset = order.Asset('0x00000000', '0x', 100); - takeAsset = order.Asset('0x00000000', '0x', 100); - }); - - it('should calculate correct hash key for no type order', async function () { - const test_order = order.Order( - maker, - makeAsset, - ZERO, - takeAsset, - salt, - 0, - 0, - '0xffffffff', - data - ); - - const hash = await lib.hashKey(test_order); - const test_hash = await lib.hashV1(maker, makeAsset, takeAsset, salt); - const test_wrong_hash = await lib.hashV2( - maker, - makeAsset, - takeAsset, - salt, - data - ); - - assert.notEqual(hash, test_wrong_hash, 'not equal to wrong hash'); - assert.equal(hash, test_hash, 'correct hash no type order'); - }); - }); -}); diff --git a/packages/marketplace/test/OrderValidator.test.js b/packages/marketplace/test/OrderValidator.test.js deleted file mode 100644 index 6a0ccdb129..0000000000 --- a/packages/marketplace/test/OrderValidator.test.js +++ /dev/null @@ -1,143 +0,0 @@ -const TestERC1271 = artifacts.require('TestERC1271.sol'); -const OrderValidator = artifacts.require('OrderValidator.sol'); -const order = require('./utils/order.js'); -const {ETH} = require('./utils/assets'); -const ZERO = '0x0000000000000000000000000000000000000000'; -const {expectThrow} = require('@daonomic/tests-common'); - -contract('OrderValidator', (accounts) => { - let testing; - let erc1271; - - before(async function () { - testing = await OrderValidator.new(); - await testing.__OrderValidator_init_unchained(false, false, false, false); - erc1271 = await TestERC1271.new(); - }); - - it('Test1. should validate if signer is correct', async function () { - const testOrder = order.Order( - accounts[1], - order.Asset(ETH, '0x', 100), - ZERO, - order.Asset(ETH, '0x', 200), - 1, - 0, - 0, - ETH, - '0x' - ); - const signature = await getSignature( - testOrder, - accounts[1], - testing.address - ); - await testing.validate(testOrder, signature, accounts[0]); - }); - - it('Test2. should fail validate if signer is incorrect', async function () { - const testOrder = order.Order( - accounts[1], - order.Asset(ETH, '0x', 100), - ZERO, - order.Asset(ETH, '0x', 200), - 1, - 0, - 0, - ETH, - '0x' - ); - const signature = await getSignature( - testOrder, - accounts[2], - testing.address - ); - await expectThrow(testing.validate(testOrder, signature, accounts[0])); - }); - - it('Test3. should bypass signature if maker is msg.sender', async function () { - const testOrder = order.Order( - accounts[5], - order.Asset(ETH, '0x', 100), - ZERO, - order.Asset(ETH, '0x', 200), - 1, - 0, - 0, - ETH, - '0x' - ); - await testing.validate(testOrder, '0x', accounts[5], {from: accounts[5]}); - }); - - it('Test4. should validate if signer is contract and 1271 passes', async function () { - const testOrder = order.Order( - erc1271.address, - order.Asset(ETH, '0x', 100), - ZERO, - order.Asset(ETH, '0x', 200), - 1, - 0, - 0, - ETH, - '0x' - ); - const signature = await getSignature( - testOrder, - accounts[2], - testing.address - ); - - await expectThrow(testing.validate(testOrder, signature, accounts[0])); - - await erc1271.setReturnSuccessfulValidSignature(true); - - await testing.validate(testOrder, signature, accounts[0]); - }); - - it('Test5. should not validate contract don`t support ERC1271_INTERFACE', async function () { - const testOrder = order.Order( - testing.address, - order.Asset(ETH, '0x', 100), - ZERO, - order.Asset(ETH, '0x', 200), - 1, - 0, - 0, - ETH, - '0x' - ); - const signature = await getSignature( - testOrder, - accounts[2], - testing.address - ); - await expectThrow(testing.validate(testOrder, signature, accounts[0])); - }); - - it('Test6. should validate IERC1271 with empty signature', async function () { - const testOrder = order.Order( - erc1271.address, - order.Asset(ETH, '0x', 100), - ZERO, - order.Asset(ETH, '0x', 200), - 1, - 0, - 0, - ETH, - '0x' - ); - - await erc1271.setReturnSuccessfulValidSignature(false); - - await expectThrow(testing.validate(testOrder, '0x', accounts[0])); - - await erc1271.setReturnSuccessfulValidSignature(true); - - await testing.validate(testOrder, '0x', accounts[0]); - }); - - async function getSignature(Order, signer) { - return order.sign(Order, signer, testing.address); - } -}); diff --git a/packages/marketplace/test/TransferManager.test.js b/packages/marketplace/test/TransferManager.test.js deleted file mode 100644 index 6de7a57686..0000000000 --- a/packages/marketplace/test/TransferManager.test.js +++ /dev/null @@ -1,802 +0,0 @@ -const TransferManagerTest = artifacts.require('TransferManagerTest.sol'); -const TestRoyaltiesRegistry = artifacts.require('TestRoyaltiesRegistry.sol'); -const TestERC20 = artifacts.require('TestERC20.sol'); -const TestERC721Royalties2981Multi = artifacts.require( - 'TestERC721WithRoyaltyV2981Multi.sol' -); -const TestERC1155Royalties2981 = artifacts.require( - 'TestERC1155WithRoyaltyV2981.sol' -); - -const TestERC721WithRoyaltyV2981 = artifacts.require( - 'TestERC721WithRoyaltyV2981' -); - -const ERC721LazyMintTest = artifacts.require('ERC721LazyMintTest.sol'); -const ERC1155LazyMintTest = artifacts.require('ERC1155LazyMintTest.sol'); - -const {Order, Asset} = require('./utils/order.js'); -const ZERO = '0x0000000000000000000000000000000000000000'; -const {expectThrow, verifyBalanceChange} = require('@daonomic/tests-common'); -const { - ETH, - ERC20, - ERC721, - ERC1155, - enc, - id, -} = require('./utils/assets.js'); - -contract('TransferManagerTest:doTransferTest()', (accounts) => { - let RTM; - let royaltiesRegistry; - - const protocol = accounts[9]; - const community = accounts[8]; - const erc721TokenId1 = 53; - const erc1155TokenId1 = 54; - const erc1155TokenId2 = 55; - const protocolFeePrimary = 0; - const protocolFeeSecondary = 250; - - before(async function () { - RTM = await TransferManagerTest.new(); - royaltiesRegistry = await TestRoyaltiesRegistry.new(); - - await RTM.init____( - protocolFeePrimary, - protocolFeeSecondary, - community, - royaltiesRegistry.address - ); - }); - - describe('Check doTransfersExternal()', function () { - it('Transfer from ETH to ERC1155, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc1155 = await prepareERC1155(accounts[2], 10); - - const left = Order( - accounts[0], - Asset(ETH, '0x', 100), - ZERO, - Asset(ERC1155, enc(erc1155.address, erc1155TokenId1), 7), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC1155, enc(erc1155.address, erc1155TokenId1), 7), - ZERO, - Asset(ETH, '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await verifyBalanceChange(accounts[0], 100, () => - verifyBalanceChange(accounts[2], -98, () => - verifyBalanceChange(protocol, 0, () => - RTM.doTransfersExternal(left, right, { - value: 100, - from: accounts[0], - gasPrice: 0, - }) - ) - ) - ); - assert.equal(await erc1155.balanceOf(accounts[0], erc1155TokenId1), 7); - assert.equal(await erc1155.balanceOf(accounts[2], erc1155TokenId1), 3); - }); - - it('Transfer from ERC1155 to ERC721, (buyerFee3%, sallerFee3% = 6%) of ERC1155 protocol (buyerFee3%, sallerFee3%)', async function () { - const erc721 = await prepareERC721(accounts[2]); - const erc1155 = await prepareERC1155(accounts[1], 105); - - const left = Order( - accounts[1], - Asset(ERC1155, enc(erc1155.address, erc1155TokenId1), 100), - ZERO, - Asset(ERC721, enc(erc721.address, erc721TokenId1), 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC721, enc(erc721.address, erc721TokenId1), 1), - ZERO, - Asset(ERC1155, enc(erc1155.address, erc1155TokenId1), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc721.balanceOf(accounts[2]), 0); - assert.equal(await erc721.balanceOf(accounts[1]), 1); - assert.equal(await erc1155.balanceOf(accounts[2], erc1155TokenId1), 98); - assert.equal(await erc1155.balanceOf(community, erc1155TokenId1), 2); //protocol fee - assert.equal(await erc1155.balanceOf(accounts[1], erc1155TokenId1), 5); - assert.equal(await erc1155.balanceOf(protocol, erc1155TokenId1), 0); - }); - - it('Transfer from ERC20 to ERC1155, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc20 = await prepareERC20(accounts[1], 105); - const erc1155 = await prepareERC1155(accounts[2], 10); - - const left = Order( - accounts[1], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC1155, enc(erc1155.address, erc1155TokenId1), 7), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC1155, enc(erc1155.address, erc1155TokenId1), 7), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[1]), 5); - assert.equal(await erc20.balanceOf(accounts[2]), 98); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc1155.balanceOf(accounts[1], erc1155TokenId1), 7); - assert.equal(await erc1155.balanceOf(accounts[2], erc1155TokenId1), 3); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC1155 to ERC20, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc20 = await prepareERC20(accounts[4], 105); - const erc1155 = await prepareERC1155(accounts[3], 10, erc1155TokenId2); - - const left = Order( - accounts[3], - Asset(ERC1155, enc(erc1155.address, erc1155TokenId2), 7), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[4], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC1155, enc(erc1155.address, erc1155TokenId2), 7), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[3]), 98); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc20.balanceOf(accounts[4]), 5); - assert.equal(await erc1155.balanceOf(accounts[3], erc1155TokenId2), 3); - assert.equal(await erc1155.balanceOf(accounts[4], erc1155TokenId2), 7); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC20 to ERC721, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc20 = await prepareERC20(accounts[1], 105); - const erc721 = await prepareERC721(accounts[2]); - - const left = Order( - accounts[1], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC721, enc(erc721.address, erc721TokenId1), 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC721, enc(erc721.address, erc721TokenId1), 1), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[1]), 5); - assert.equal(await erc20.balanceOf(accounts[2]), 98); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc721.balanceOf(accounts[1]), 1); - assert.equal(await erc721.balanceOf(accounts[2]), 0); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC721 to ERC20, no protocol fee ', async function () { - const erc20 = await prepareERC20(accounts[2], 105); - const erc721 = await prepareERC721(accounts[1]); - - const left = Order( - accounts[1], - Asset(ERC721, enc(erc721.address, erc721TokenId1), 1), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC721, enc(erc721.address, erc721TokenId1), 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[1]), 98); - assert.equal(await erc20.balanceOf(community), 2); // no protocol fee - assert.equal(await erc20.balanceOf(accounts[2]), 5); - assert.equal(await erc721.balanceOf(accounts[1]), 0); - assert.equal(await erc721.balanceOf(accounts[2]), 1); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC20 to ERC20, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc20 = await prepareERC20(accounts[1], 105); - const t2 = await prepareERC20(accounts[2], 220); - - const left = Order( - accounts[1], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC20, enc(t2.address), 200), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC20, enc(t2.address), 200), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[1]), 5); - assert.equal(await erc20.balanceOf(accounts[2]), 98); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await t2.balanceOf(accounts[1]), 200); - assert.equal(await t2.balanceOf(accounts[2]), 20); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - }); - - describe('Check lazy with royalties', function () { - it('Transfer from ERC721lazy to ERC20 ', async function () { - const erc721Test = await ERC721LazyMintTest.new(); - - const erc20 = await prepareERC20(accounts[2], 106); - - const encodedMintData = await erc721Test.encode([ - 1, - 'uri', - [[accounts[1], 0]], - [ - [accounts[5], 2000], - [accounts[6], 1000], - ], - [], - ]); - - const left = Order( - accounts[1], - Asset(id('ERC721_LAZY'), encodedMintData, 1), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(id('ERC721_LAZY'), encodedMintData, 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc721Test.ownerOf(1), accounts[2]); - assert.equal(await erc20.balanceOf(accounts[1]), 68); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc20.balanceOf(accounts[2]), 6); - assert.equal(await erc20.balanceOf(accounts[5]), 20); - assert.equal(await erc20.balanceOf(accounts[6]), 10); - }); - - it('Transfer from ERC1155lazy to ERC20 ', async function () { - const erc1155Test = await ERC1155LazyMintTest.new(); - - const erc20 = await prepareERC20(accounts[2], 106); - - const encodedMintData = await erc1155Test.encode([ - 1, - 'uri', - 5, - [[accounts[1], 0]], - [ - [accounts[5], 2000], - [accounts[6], 1000], - ], - [], - ]); - - const left = Order( - accounts[1], - Asset(id('ERC1155_LAZY'), encodedMintData, 5), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(id('ERC1155_LAZY'), encodedMintData, 5), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc1155Test.balanceOf(accounts[2], 1), 5); - assert.equal(await erc20.balanceOf(accounts[1]), 68); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc20.balanceOf(accounts[2]), 6); - assert.equal(await erc20.balanceOf(accounts[5]), 20); - assert.equal(await erc20.balanceOf(accounts[6]), 10); - }); - - it('Transfer from ETH to ERC721Lazy', async function () { - const erc721Test = await ERC721LazyMintTest.new(); - - const encodedMintData = await erc721Test.encode([ - 1, - 'uri', - [[accounts[2], 0]], - [ - [accounts[5], 2000], - [accounts[6], 1000], - ], - [], - ]); - - const left = Order( - accounts[1], - Asset(ETH, '0x', 100), - ZERO, - Asset(id('ERC721_LAZY'), encodedMintData, 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(id('ERC721_LAZY'), encodedMintData, 1), - ZERO, - Asset(ETH, '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await verifyBalanceChange(accounts[1], 100, () => - verifyBalanceChange(accounts[2], -68, () => - verifyBalanceChange(accounts[5], -20, () => - verifyBalanceChange(accounts[6], -10, () => - verifyBalanceChange(protocol, 0, () => - RTM.doTransfersExternal(left, right, { - value: 100, - from: accounts[1], - gasPrice: 0, - }) - ) - ) - ) - ) - ); - assert.equal(await erc721Test.ownerOf(1), accounts[1]); - }); - - it('Transfer from ETH to ERC1155Lazy', async function () { - const erc1155Test = await ERC1155LazyMintTest.new(); - - const encodedMintData = await erc1155Test.encode([ - 1, - 'uri', - 5, - [[accounts[2], 0]], - [ - [accounts[5], 2000], - [accounts[6], 1000], - ], - [], - ]); - - const left = Order( - accounts[1], - Asset(ETH, '0x', 100), - ZERO, - Asset(id('ERC1155_LAZY'), encodedMintData, 5), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[2], - Asset(id('ERC1155_LAZY'), encodedMintData, 5), - ZERO, - Asset(ETH, '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await verifyBalanceChange(accounts[1], 100, () => - verifyBalanceChange(accounts[2], -68, () => - verifyBalanceChange(accounts[5], -20, () => - verifyBalanceChange(accounts[6], -10, () => - verifyBalanceChange(protocol, 0, () => - RTM.doTransfersExternal(left, right, { - value: 100, - from: accounts[1], - gasPrice: 0, - }) - ) - ) - ) - ) - ); - assert.equal(await erc1155Test.balanceOf(accounts[1], 1), 5); - }); - }); - - describe('Check doTransfersExternal() with Royalties fees', function () { - it('Transfer from ERC20 to ERC721 multi receivers, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc20 = await prepareERC20(accounts[1], 105); - const erc721V2 = await prepareERC721Multi( - accounts[0], - erc721TokenId1, - [] - ); - - await royaltiesRegistry.setRoyaltiesByToken(erc721V2.address, [ - [accounts[2], 1000], - [accounts[3], 500], - ]); - - const left = Order( - accounts[1], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC721, enc(erc721V2.address, erc721TokenId1), 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[0], - Asset(ERC721, enc(erc721V2.address, erc721TokenId1), 1), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[1]), 5); - assert.equal(await erc20.balanceOf(accounts[0]), 83); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc20.balanceOf(accounts[2]), 10); - assert.equal(await erc20.balanceOf(accounts[3]), 5); - assert.equal(await erc721V2.balanceOf(accounts[1]), 1); - assert.equal(await erc721V2.balanceOf(accounts[0]), 0); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC721 to ERC20 no royalties, no protocol fee - primary market', async function () { - const erc20 = await prepareERC20(accounts[0], 105); - const erc721V2 = await prepareERC721Multi( - accounts[1], - erc721TokenId1, - [] - ); - - await royaltiesRegistry.setRoyaltiesByToken(erc721V2.address, [ - [accounts[2], 1000], - [accounts[3], 500], - ]); - - const left = Order( - accounts[1], - Asset(ERC721, enc(erc721V2.address, erc721TokenId1), 1), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[0], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC721, enc(erc721V2.address, erc721TokenId1), 1), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[0]), 5); - assert.equal(await erc20.balanceOf(accounts[1]), 100); - assert.equal(await erc20.balanceOf(community), 0); // no protocol fee - assert.equal(await erc20.balanceOf(accounts[2]), 0); // no royaties - assert.equal(await erc20.balanceOf(accounts[3]), 0); // no royaties - assert.equal(await erc721V2.balanceOf(accounts[0]), 1); - assert.equal(await erc721V2.balanceOf(accounts[1]), 0); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC20 to ERC1155, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc20 = await prepareERC20(accounts[1], 105); - const erc1155V2 = await prepareERC1155(accounts[0], 8); - - await royaltiesRegistry.setRoyaltiesByToken(erc1155V2.address, [ - [accounts[2], 1000], - [accounts[3], 500], - ]); //set royalties by token - - const left = Order( - accounts[1], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC1155, enc(erc1155V2.address, erc1155TokenId1), 6), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[0], - Asset(ERC1155, enc(erc1155V2.address, erc1155TokenId1), 6), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await RTM.doTransfersExternal(left, right); - - assert.equal(await erc20.balanceOf(accounts[1]), 5); - assert.equal(await erc20.balanceOf(accounts[0]), 83); - assert.equal(await erc20.balanceOf(community), 2); // protocol fee - assert.equal(await erc20.balanceOf(accounts[2]), 10); - assert.equal(await erc20.balanceOf(accounts[3]), 5); - assert.equal(await erc1155V2.balanceOf(accounts[1], erc1155TokenId1), 6); - assert.equal(await erc1155V2.balanceOf(accounts[0], erc1155TokenId1), 2); - assert.equal(await erc20.balanceOf(protocol), 0); - }); - - it('Transfer from ERC20 to ERC1155, royalties are too high', async function () { - const erc20 = await prepareERC20(accounts[1], 105); - const erc1155V2 = await prepareERC1155(accounts[0], 8); - - await royaltiesRegistry.setRoyaltiesByToken(erc1155V2.address, [ - [accounts[2], 2000], - [accounts[3], 3001], - ]); //set royalties by token - const left = Order( - accounts[1], - Asset(ERC20, enc(erc20.address), 100), - ZERO, - Asset(ERC1155, enc(erc1155V2.address, erc1155TokenId1), 6), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[0], - Asset(ERC1155, enc(erc1155V2.address, erc1155TokenId1), 6), - ZERO, - Asset(ERC20, enc(erc20.address), 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await expectThrow(RTM.doTransfersExternal(left, right)); - }); - - it('Transfer from ETH to ERC1155V2, protocol fee 6% (buyerFee3%, sallerFee3%)', async function () { - const erc1155V2 = await prepareERC1155(accounts[1], 10); - - await royaltiesRegistry.setRoyaltiesByToken(erc1155V2.address, [ - [accounts[2], 1000], - [accounts[3], 500], - ]); //set royalties by token - - const left = Order( - accounts[0], - Asset(ETH, '0x', 100), - ZERO, - Asset(ERC1155, enc(erc1155V2.address, erc1155TokenId1), 7), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - const right = Order( - accounts[1], - Asset(ERC1155, enc(erc1155V2.address, erc1155TokenId1), 7), - ZERO, - Asset(ETH, '0x', 100), - 1, - 0, - 0, - '0xffffffff', - '0x' - ); - - await verifyBalanceChange(accounts[0], 100, () => - verifyBalanceChange(accounts[1], -83, () => - verifyBalanceChange(accounts[2], -10, () => - verifyBalanceChange(accounts[3], -5, () => - verifyBalanceChange(protocol, 0, () => - RTM.doTransfersExternal(left, right, { - value: 100, - from: accounts[0], - gasPrice: 0, - }) - ) - ) - ) - ) - ); - assert.equal(await erc1155V2.balanceOf(accounts[0], erc1155TokenId1), 7); - assert.equal(await erc1155V2.balanceOf(accounts[1], erc1155TokenId1), 3); - }); - }); - - async function prepareERC20(user, value = 1000) { - const erc20Token = await TestERC20.new(); - - await erc20Token.mint(user, value); - await erc20Token.approve(RTM.address, value, {from: user}); - return erc20Token; - } - - async function prepareERC721(user, tokenId = erc721TokenId1, royalties = []) { - const erc721 = await TestERC721WithRoyaltyV2981.new(); - - await erc721.mint(user, tokenId, royalties); - await erc721.setApprovalForAll(RTM.address, true, {from: user}); - return erc721; - } - - async function prepareERC721Multi( - user, - tokenId = erc721TokenId1, - royalties = [] - ) { - const erc721 = await TestERC721Royalties2981Multi.new({from: accounts[1]}); - await erc721.initialize({from: accounts[1]}); - - await erc721.mint(user, tokenId, royalties, {from: accounts[1]}); - await erc721.setApprovalForAll(RTM.address, true, {from: user}); - return erc721; - } - - async function prepareERC1155( - user, - value = 100, - tokenId = erc1155TokenId1, - royalties = [] - ) { - const erc1155 = await TestERC1155Royalties2981.new({ - from: accounts[1], - }); - - await erc1155.initialize({from: accounts[1]}); - - await erc1155.mint(user, tokenId, value, royalties); - await erc1155.setApprovalForAll(RTM.address, true, {from: user}); - return erc1155; - } -}); diff --git a/packages/marketplace/test/utils/EIP712.js b/packages/marketplace/test/utils/EIP712.js deleted file mode 100644 index c63fd686d6..0000000000 --- a/packages/marketplace/test/utils/EIP712.js +++ /dev/null @@ -1,78 +0,0 @@ -// TODO: This is the same as the root folder scripts... fix it -const DOMAIN_TYPE = [ - { - type: 'string', - name: 'name', - }, - { - type: 'string', - name: 'version', - }, - { - type: 'uint256', - name: 'chainId', - }, - { - type: 'address', - name: 'verifyingContract', - }, -]; - -module.exports = { - createTypeData: function (domainData, primaryType, message, types) { - return { - types: Object.assign( - { - EIP712Domain: DOMAIN_TYPE, - }, - types - ), - domain: domainData, - primaryType: primaryType, - message: message, - }; - }, - - signTypedData: function (web3, from, data) { - return new Promise((resolve, reject) => { - function cb(err, result) { - if (result.error) { - return reject(result.error); - } - if (err) { - return reject(err); - } - - const sig = result.result; - const sig0 = sig.substring(2); - const r = '0x' + sig0.substring(0, 64); - const s = '0x' + sig0.substring(64, 128); - const v = parseInt(sig0.substring(128, 130), 16); - - resolve({ - data, - sig, - v, - r, - s, - }); - } - - let send = web3.currentProvider.sendAsync; - if (!send) send = web3.currentProvider.send; - send.bind(web3.currentProvider)( - { - jsonrpc: '2.0', - method: web3.currentProvider.isMetaMask - ? 'eth_signTypedData_v3' - : 'eth_signTypedData', - params: web3.currentProvider.isMetaMask - ? [from, JSON.stringify(data)] - : [from, data], - id: new Date().getTime(), - }, - cb - ); - }); - }, -}; diff --git a/packages/marketplace/test/utils/order.js b/packages/marketplace/test/utils/order.js deleted file mode 100644 index b7f68ac683..0000000000 --- a/packages/marketplace/test/utils/order.js +++ /dev/null @@ -1,129 +0,0 @@ -// TODO: This is the same as the root folder scripts... fix it -const EIP712 = require('./EIP712'); - -function AssetType(assetClass, data) { - return {assetClass, data}; -} - -function Asset(assetClass, assetData, value) { - return {assetType: AssetType(assetClass, assetData), value}; -} - -function Order( - maker, - makeAsset, - taker, - takeAsset, - salt, - start, - end, - dataType, - data -) { - return {maker, makeAsset, taker, takeAsset, salt, start, end, dataType, data}; -} - -function OrderBack( - buyer, - maker, - makeAsset, - taker, - takeAsset, - salt, - start, - end, - dataType, - data -) { - return { - buyer, - maker, - makeAsset, - taker, - takeAsset, - salt, - start, - end, - dataType, - data, - }; -} - -const Types = { - AssetType: [ - {name: 'assetClass', type: 'bytes4'}, - {name: 'data', type: 'bytes'}, - ], - Asset: [ - {name: 'assetType', type: 'AssetType'}, - {name: 'value', type: 'uint256'}, - ], - Order: [ - {name: 'maker', type: 'address'}, - {name: 'makeAsset', type: 'Asset'}, - {name: 'taker', type: 'address'}, - {name: 'takeAsset', type: 'Asset'}, - {name: 'salt', type: 'uint256'}, - {name: 'start', type: 'uint256'}, - {name: 'end', type: 'uint256'}, - {name: 'dataType', type: 'bytes4'}, - {name: 'data', type: 'bytes'}, - ], -}; - -const TypesBack = { - AssetType: [ - {name: 'assetClass', type: 'bytes4'}, - {name: 'data', type: 'bytes'}, - ], - Asset: [ - {name: 'assetType', type: 'AssetType'}, - {name: 'value', type: 'uint256'}, - ], - OrderBack: [ - {name: 'buyer', type: 'address'}, - {name: 'maker', type: 'address'}, - {name: 'makeAsset', type: 'Asset'}, - {name: 'taker', type: 'address'}, - {name: 'takeAsset', type: 'Asset'}, - {name: 'salt', type: 'uint256'}, - {name: 'start', type: 'uint256'}, - {name: 'end', type: 'uint256'}, - {name: 'dataType', type: 'bytes4'}, - {name: 'data', type: 'bytes'}, - ], -}; - -async function sign(web3, order, account, verifyingContract) { - const chainId = config.network_id; - const data = EIP712.createTypeData( - { - name: 'Exchange', - version: '1', - chainId, - verifyingContract, - }, - 'Order', - order, - Types - ); - return (await EIP712.signTypedData(web3, account, data)).sig; -} - -async function signBack(web3, order, account, verifyingContract) { - const chainId = config.network_id; - const data = EIP712.createTypeData( - { - name: 'Exchange', - version: '1', - chainId, - verifyingContract, - }, - 'OrderBack', - order, - TypesBack - ); - return (await EIP712.signTypedData(web3, account, data)).sig; -} - -module.exports = {AssetType, Asset, Order, OrderBack, sign, signBack}; diff --git a/packages/marketplace/tests/chai-setup.ts b/packages/marketplace/tests/chai-setup.ts new file mode 100644 index 0000000000..aaba65af8f --- /dev/null +++ b/packages/marketplace/tests/chai-setup.ts @@ -0,0 +1,4 @@ +import chaiModule from 'chai'; +import '@nomicfoundation/hardhat-chai-matchers'; + +export = chaiModule; diff --git a/packages/marketplace/tests/exchange/AssetMatcher.test.ts b/packages/marketplace/tests/exchange/AssetMatcher.test.ts new file mode 100644 index 0000000000..d135c79127 --- /dev/null +++ b/packages/marketplace/tests/exchange/AssetMatcher.test.ts @@ -0,0 +1,193 @@ +import {ethers} from 'hardhat'; +import {expect} from '../chai-setup'; +import {deployAssetMatcher} from '../fixtures'; +import {loadFixture} from '@nomicfoundation/hardhat-network-helpers'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'; +import {Contract} from 'ethers'; + +// const order = require('../../scripts/order.js'); +const {id} = require('../helpers/assets'); + +const MOCK_ADDRESS_1 = '0x0000000000000000000000000000000000000001'; + +describe('AssetMatcher.sol', function () { + let assetMatcher: Contract; + let owner: SignerWithAddress; + + this.beforeAll(async function () { + const {contract, deployer} = await loadFixture(deployAssetMatcher); + assetMatcher = contract; + owner = deployer; + }); + + it('setAssetMatcher should revert if msg sender is not owner', async function () { + const [, user] = await ethers.getSigners(); + await expect( + assetMatcher.connect(user).setAssetMatcher(id('BLA'), MOCK_ADDRESS_1) + ).to.revertedWith('Ownable: caller is not the owner'); + }); + + it('setAssetMatcher works', async function () { + await expect(assetMatcher.setAssetMatcher(id('BLA'), MOCK_ADDRESS_1)) + .to.emit(assetMatcher, 'MatcherChange') + .withArgs(id('BLA'), MOCK_ADDRESS_1); + }); + + // describe('ETH', function () { + // it('should extract ETH type if both are ETHs', async function () { + // const result = await testing.matchAssets( + // order.AssetType(ETH, '0x'), + // order.AssetType(ETH, '0x') + // ); + // assert.equal(result[0], ETH); + // }); + // it('should extract nothing if one is not ETH', async function () { + // const result = await testing.matchAssets( + // order.AssetType(ETH, '0x'), + // order.AssetType(ERC20, '0x') + // ); + // assert.equal(result[0], 0); + // }); + // }); + + // describe('ERC20', function () { + // it('should extract ERC20 type if both are and addresses equal', async function () { + // const encoded = enc(accounts[5]); + // const result = await testing.matchAssets( + // order.AssetType(ERC20, encoded), + // order.AssetType(ERC20, encoded) + // ); + // assert.equal(result[0], ERC20); + // assert.equal(result[1], encoded); + // }); + // it("should extract nothing if erc20 don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC20, enc(accounts[1])), + // order.AssetType(ERC20, enc(accounts[2])) + // ); + // assert.equal(result[0], 0); + // }); + // it('should extract nothing if other type is not ERC20', async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC20, enc(accounts[1])), + // order.AssetType(ETH, '0x') + // ); + // assert.equal(result[0], 0); + // }); + // }); + // describe('ERC721', function () { + // it('should extract ERC721 type if both are equal', async function () { + // const encoded = enc(accounts[5], 100); + // const result = await testing.matchAssets( + // order.AssetType(ERC721, encoded), + // order.AssetType(ERC721, encoded) + // ); + // assert.equal(result[0], ERC721); + // assert.equal(result[1], encoded); + // }); + // it("should extract nothing if tokenIds don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC721, enc(accounts[5], 100)), + // order.AssetType(ERC721, enc(accounts[5], 101)) + // ); + // assert.equal(result[0], 0); + // }); + // it("should extract nothing if addresses don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC721, enc(accounts[4], 100)), + // order.AssetType(ERC721, enc(accounts[5], 100)) + // ); + // assert.equal(result[0], 0); + // }); + // it('should extract nothing if other type is not ERC721', async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC721, enc(accounts[5], 100)), + // order.AssetType(ETH, '0x') + // ); + // assert.equal(result[0], 0); + // }); + // }); + // describe('ERC1155', function () { + // it('should extract ERC1155 type if both are equal', async function () { + // const encoded = enc(accounts[5], 100); + // const result = await testing.matchAssets( + // order.AssetType(ERC1155, encoded), + // order.AssetType(ERC1155, encoded) + // ); + // assert.equal(result[0], ERC1155); + // assert.equal(result[1], encoded); + // }); + // it("should extract nothing if tokenIds don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC1155, enc(accounts[5], 100)), + // order.AssetType(ERC1155, enc(accounts[5], 101)) + // ); + // assert.equal(result[0], 0); + // }); + // it("should extract nothing if addresses don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(ERC1155, enc(accounts[4], 100)), + // order.AssetType(ERC1155, enc(accounts[5], 100)) + // ); + // assert.equal(result[0], 0); + // }); + // it('should extract nothing if other type is not erc1155', async function () { + // const encoded = enc(accounts[5], 100); + // const result = await testing.matchAssets( + // order.AssetType(ERC1155, encoded), + // order.AssetType(ERC721, encoded) + // ); + // assert.equal(result[0], 0); + // }); + // }); + // describe('BUNDLE', function () { + // it('should extract BUNDLE type if both are equal', async function () { + // const encoded = enc(accounts[5], 100); + // const result = await testing.matchAssets( + // order.AssetType(BUNDLE, encoded), + // order.AssetType(BUNDLE, encoded) + // ); + // assert.equal(result[0], BUNDLE); + // assert.equal(result[1], encoded); + // }); + // it("should extract nothing if tokenIds don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(BUNDLE, enc(accounts[5], 100)), + // order.AssetType(BUNDLE, enc(accounts[5], 101)) + // ); + // assert.equal(result[0], 0); + // }); + // it("should extract nothing if addresses don't match", async function () { + // const result = await testing.matchAssets( + // order.AssetType(BUNDLE, enc(accounts[4], 100)), + // order.AssetType(BUNDLE, enc(accounts[5], 100)) + // ); + // assert.equal(result[0], 0); + // }); + // it('should extract nothing if other type is not a BUNDLE', async function () { + // const encoded = enc(accounts[5], 100); + // const result = await testing.matchAssets( + // order.AssetType(BUNDLE, encoded), + // order.AssetType(ERC721, encoded) + // ); + // assert.equal(result[0], 0); + // }); + // }); + // describe('generic', function () { + // it('should extract left type if asset types are equal', async function () { + // const result = await testing.matchAssets( + // order.AssetType('0x00112233', '0x1122'), + // order.AssetType('0x00112233', '0x1122') + // ); + // assert.equal(result[0], '0x00112233'); + // assert.equal(result[1], '0x1122'); + // }); + // it('should extract nothing single byte differs', async function () { + // const result = await testing.matchAssets( + // order.AssetType('0x00112233', '0x1122'), + // order.AssetType('0x00112233', '0x1111') + // ); + // assert.equal(result[0], 0); + // }); + // }); +}); diff --git a/packages/marketplace/tests/fixtures.ts b/packages/marketplace/tests/fixtures.ts new file mode 100644 index 0000000000..5fb7643f83 --- /dev/null +++ b/packages/marketplace/tests/fixtures.ts @@ -0,0 +1,48 @@ +import {ethers} from 'hardhat'; +import {Contract, Signer} from 'ethers'; + +export async function deploy( + name: string, + users: Signer[] = [] +): Promise { + const Contract = await ethers.getContractFactory(name); + const contract = await Contract.deploy(); + await contract.deployed(); + const ret = Array(); + for (const s of users) { + ret.push(await contract.connect(s)); + } + ret.push(contract); + return ret; +} + +export async function deployWithProxy( + name: string, + users: Signer[] = [] +): Promise { + const contract = await deploy(name, users); + + const Proxy = await ethers.getContractFactory('FakeProxy'); + // This uses signers[0] + const proxy = await Proxy.deploy(contract[0].address); + await proxy.deployed(); + const ret = Array(); + for (let i = 0; i < contract.length; i++) { + ret[i] = await contract[i].attach(proxy.address); + } + // add implementation contract + ret.push(contract[0]); + return ret; +} + +export async function deployAssetMatcher() { + const [deployer] = await ethers.getSigners(); + const [contract] = await deploy( + 'AssetMatcher', + [deployer] + ); + return { + contract, + deployer, + }; +} diff --git a/packages/marketplace/test/utils/assets.js b/packages/marketplace/tests/helpers/assets.ts similarity index 90% rename from packages/marketplace/test/utils/assets.js rename to packages/marketplace/tests/helpers/assets.ts index 8acf03bd7a..fad20d1cce 100644 --- a/packages/marketplace/test/utils/assets.js +++ b/packages/marketplace/tests/helpers/assets.ts @@ -1,6 +1,4 @@ -// TODO: This is the same as the root folder scripts... fix it const ethUtil = require('ethereumjs-util'); -const Web3 = require('web3'); function id(str) { return `0x${ethUtil @@ -10,7 +8,6 @@ function id(str) { } function enc(token, tokenId) { - const web3 = new Web3(); if (tokenId) { return web3.eth.abi.encodeParameters( ['address', 'uint256'], @@ -22,7 +19,6 @@ function enc(token, tokenId) { } function encBundle(erc20, erc721, erc1155) { - const web3 = new Web3(); return web3.eth.abi.encodeParameters( [ { @@ -80,10 +76,6 @@ function encBundle(erc20, erc721, erc1155) { ); } -function percentage(number, percentage) { - return (number * percentage) / 10000; -} - const ETH = id('ETH'); const ERC20 = id('ERC20'); const ERC721 = id('ERC721'); @@ -127,5 +119,4 @@ module.exports = { TO_LOCK, enc, encBundle, - percentage, }; diff --git a/packages/marketplace/tests/helpers/order.ts b/packages/marketplace/tests/helpers/order.ts new file mode 100644 index 0000000000..83d00221c8 --- /dev/null +++ b/packages/marketplace/tests/helpers/order.ts @@ -0,0 +1,63 @@ +const EIP712 = require('./EIP712'); + +function AssetType(assetClass, data) { + return {assetClass, data}; +} + +function Asset(assetClass, assetData, value) { + return {assetType: AssetType(assetClass, assetData), value}; +} + +function Order( + maker: any, + makeAsset: any, + taker: any, + takeAsset: any, + salt: any, + start: any, + end: any, + dataType: any, + data: any +) { + return {maker, makeAsset, taker, takeAsset, salt, start, end, dataType, data}; +} + +const Types = { + AssetType: [ + {name: 'assetClass', type: 'bytes4'}, + {name: 'data', type: 'bytes'}, + ], + Asset: [ + {name: 'assetType', type: 'AssetType'}, + {name: 'value', type: 'uint256'}, + ], + Order: [ + {name: 'maker', type: 'address'}, + {name: 'makeAsset', type: 'Asset'}, + {name: 'taker', type: 'address'}, + {name: 'takeAsset', type: 'Asset'}, + {name: 'salt', type: 'uint256'}, + {name: 'start', type: 'uint256'}, + {name: 'end', type: 'uint256'}, + {name: 'dataType', type: 'bytes4'}, + {name: 'data', type: 'bytes'}, + ], +}; + +async function sign(order, account, verifyingContract) { + const chainId = config.network_id; + const data = EIP712.createTypeData( + { + name: 'Exchange', + version: '1', + chainId, + verifyingContract, + }, + 'Order', + order, + Types + ); + return (await EIP712.signTypedData(web3, account, data)).sig; +} + +module.exports = {AssetType, Asset, Order, sign}; diff --git a/packages/marketplace/tests/utils.ts b/packages/marketplace/tests/utils.ts new file mode 100644 index 0000000000..4ad6401463 --- /dev/null +++ b/packages/marketplace/tests/utils.ts @@ -0,0 +1,231 @@ +/* eslint-disable mocha/no-exports */ +import {BigNumber} from '@ethersproject/bignumber'; +import { + Contract, + ContractReceipt, + ContractTransaction, + Event, + utils, +} from 'ethers'; +import {Receipt} from 'hardhat-deploy/types'; +import {Result} from 'ethers/lib/utils'; +import {deployments, ethers, network} from 'hardhat'; +import {FixtureFunc} from 'hardhat-deploy/dist/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; + +export async function sequentially( + arr: Array, + callbackfn: (value: S, index: number, array: S[]) => Promise +): Promise { + const ret = []; + for (let i = 0; i < arr.length; i++) { + ret.push(await callbackfn(arr[i], i, arr)); + } + return ret; +} + +export async function mine(): Promise { + await ethers.provider.send('evm_mine', []); +} + +export async function increaseTime( + numSec: number, + callMine = true +): Promise { + // must do something (mine, send a tx) to move the time + await ethers.provider.send('evm_increaseTime', [numSec]); + if (callMine) await mine(); +} + +export async function getTime(): Promise { + const latestBlock = await ethers.provider.getBlock('latest'); + return latestBlock.timestamp; +} + +export async function setNextBlockTime( + time: number, + callMine = false +): Promise { + // must do something (mine, send a tx) to move the time + await ethers.provider.send('evm_setNextBlockTimestamp', [time]); + if (callMine) await mine(); +} + +type Test = { + title: string; + subTests?: Test[]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + test: any; +}; + +export function recurseTests(test: Test): void { + /* eslint-disable mocha/no-setup-in-describe */ + if (test.subTests) { + describe(test.title, function () { + if (test.subTests) { + for (const subTest of test.subTests) { + recurseTests(subTest); + } + } + }); + } else { + it(test.title, test.test); + } + /* eslint-enable mocha/no-setup-in-describe */ +} + +export function toWei(number: string | number | BigNumber): BigNumber { + return BigNumber.from(number).mul('1000000000000000000'); +} + +export function cubeRoot6(bigNum: BigNumber): BigNumber { + const DECIMALS_18 = BigNumber.from(1).mul('1000000000000000000'); + const a = bigNum.mul(DECIMALS_18); + const base = BigNumber.from(2); + const root = BigNumber.from(3); + let tmp = a.add(base).div(root); + let c = a; + while (tmp.lt(c)) { + c = tmp; + const tmpSquare = tmp.mul(tmp); + const numerator = a.div(tmpSquare).add(tmp.mul(base)); + tmp = numerator.div(root); + } + return c; +} + +export async function findEvents( + contract: Contract, + event: string, + blockHash: string +): Promise { + const filter = contract.filters[event](); + return await contract.queryFilter(filter, blockHash); +} + +export type EventWithArgs = Event & {args: Result}; + +export async function expectReceiptEventWithArgs( + receipt: ContractReceipt, + name: string +): Promise { + if (!receipt.events) { + throw new Error('no events'); + } + for (const event of receipt.events) { + if (event.event === name) { + if (!event.args) { + throw new Error('event has no args'); + } + return event as EventWithArgs; + } + } + throw new Error('no matching events'); +} + +export async function expectEventWithArgs( + contract: Contract, + receipt: ContractReceipt, + event: string +): Promise { + const events = await findEvents(contract, event, receipt.blockHash); + if (events.length == 0) { + throw new Error('no events'); + } + if (!events[0].args) { + throw new Error('event has no args'); + } + return events[0] as EventWithArgs; +} + +export async function expectEventWithArgsFromReceipt( + contract: Contract, + receipt: Receipt, + event: string +): Promise { + const events = await findEvents(contract, event, receipt.blockHash); + if (events.length == 0) { + throw new Error('no events'); + } + if (!events[0].args) { + throw new Error('event has no args'); + } + return events[0] as EventWithArgs; +} + +export function waitFor( + p: Promise +): Promise { + return p.then((tx) => tx.wait()); +} + +type Contracts = Record; + +export async function setupUsers( + addresses: string[], + contracts: T +): Promise<({address: string} & T)[]> { + const users: ({address: string} & T)[] = []; + for (const address of addresses) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const user: any = {address}; + for (const key of Object.keys(contracts)) { + user[key] = contracts[key].connect(await ethers.getSigner(address)); + } + users.push(user); + } + return users; +} + +export async function setupUser( + address: string, + contracts: T +): Promise<{address: string} & T> { + const users = await setupUsers([address], contracts); + return users[0]; +} + +export function getNftIndex(id: BigNumber): number { + // js bitwise & operands are converted to 32-bit integers + const idAsHexString = utils.hexValue(id); + const slicedId = Number('0x' + idAsHexString.slice(48, 56)); + const SLICED_NFT_INDEX_MASK = Number('0x7F800000'); + return (slicedId & SLICED_NFT_INDEX_MASK) >>> 23; +} + +export function getAssetChainIndex(id: BigNumber): number { + // js bitwise & operands are converted to 32-bit integers + const idAsHexString = utils.hexValue(id); + const slicedId = Number('0x' + idAsHexString.slice(42, 50)); + const SLICED_CHAIN_INDEX_MASK = Number('0x7F800000'); + return (slicedId & SLICED_CHAIN_INDEX_MASK) >>> 23; +} + +export async function evmRevertToInitialState(): Promise { + console.log('Revert to initial snapshot, calling reset'); + // This revert the evm state. + await network.provider.request({ + method: 'hardhat_reset', + params: [network.config], + }); +} + +export function withSnapshot( + tags: string | string[] = [], + func: FixtureFunc = async () => { + return {}; + } +): (options?: O) => Promise { + return deployments.createFixture( + async (env: HardhatRuntimeEnvironment, options?: O) => { + // TODO: This has problems with solidity-coverage, when the fix that we can use it + // TODO: We need a way to revert to initial state!!! + // await evmRevertToInitialState(); + await deployments.fixture(tags, { + fallbackToGlobal: false, + keepExistingDeployments: false, + }); + return func(env, options); + } + ); +} diff --git a/packages/marketplace/utils/hardhatConfig.ts b/packages/marketplace/utils/hardhatConfig.ts new file mode 100644 index 0000000000..acccceb17f --- /dev/null +++ b/packages/marketplace/utils/hardhatConfig.ts @@ -0,0 +1,89 @@ +import {HARDHAT_NETWORK_NAME} from 'hardhat/plugins'; +import {HardhatUserConfig} from 'hardhat/config'; +import {NetworksUserConfig} from 'hardhat/types'; + +export function nodeUrl(networkName: string): string { + if (networkName) { + const uri = process.env['ETH_NODE_URI_' + networkName.toUpperCase()]; + if (uri && uri !== '') { + return uri; + } + } + + let uri = process.env.ETH_NODE_URI; + if (uri) { + uri = uri.replace('{{networkName}}', networkName); + } + if (!uri || uri === '') { + // throw new Error(`environment variable "ETH_NODE_URI" not configured `); + return ''; + } + if (uri.indexOf('{{') >= 0) { + throw new Error( + `invalid uri or network not supported by node provider : ${uri}` + ); + } + return uri; +} + +export function getMnemonic(networkName?: string): string { + if (networkName) { + const mnemonic = process.env['MNEMONIC_' + networkName.toUpperCase()]; + if (mnemonic && mnemonic !== '') { + return mnemonic; + } + } + + const mnemonic = process.env.MNEMONIC; + if (!mnemonic || mnemonic === '') { + return 'test test test test test test test test test test test junk'; + } + return mnemonic; +} + +export function addNodeAndMnemonic( + networks: NetworksUserConfig +): NetworksUserConfig { + for (const k in networks) { + if (k === 'localhost' || k == HARDHAT_NETWORK_NAME) continue; + networks[k] = { + ...networks[k], + url: nodeUrl(k), + accounts: { + mnemonic: getMnemonic(k), + }, + }; + } + return networks; +} + +export function addForkingSupport(conf: HardhatUserConfig): HardhatUserConfig { + if (!process.env.HARDHAT_FORK) { + return conf; + } + return { + ...conf, + networks: { + ...conf.networks, + hardhat: { + ...(conf.networks ? conf.networks['hardhat'] : {}), + forking: process.env.HARDHAT_FORK + ? { + enabled: true, + url: nodeUrl(process.env.HARDHAT_FORK), + blockNumber: process.env.HARDHAT_FORK_NUMBER + ? parseInt(process.env.HARDHAT_FORK_NUMBER) + : undefined, + } + : undefined, + }, + }, + external: process.env.HARDHAT_FORK + ? { + deployments: { + hardhat: ['deployments/' + process.env.HARDHAT_FORK], + }, + } + : undefined, + }; +} diff --git a/yarn.lock b/yarn.lock index 0c6574ee02..5a6671500a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -273,6 +273,16 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/common@npm:2.5.0": + version: 2.5.0 + resolution: "@ethereumjs/common@npm:2.5.0" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.1 + checksum: f08830c5b86f215e5bd9b80c7202beeeacfcd6094e493efb1cad75dd9d4605bae6c3d4a991447fc14e494c6c4ce99ea41f77e2032f3a9e1976f44308d3757ea7 + languageName: node + linkType: hard + "@ethereumjs/common@npm:^2.5.0, @ethereumjs/common@npm:^2.6.4, @ethereumjs/common@npm:^2.6.5": version: 2.6.5 resolution: "@ethereumjs/common@npm:2.6.5" @@ -283,6 +293,25 @@ __metadata: languageName: node linkType: hard +"@ethereumjs/rlp@npm:^4.0.1": + version: 4.0.1 + resolution: "@ethereumjs/rlp@npm:4.0.1" + bin: + rlp: bin/rlp + checksum: 30db19c78faa2b6ff27275ab767646929207bb207f903f09eb3e4c273ce2738b45f3c82169ddacd67468b4f063d8d96035f2bf36f02b6b7e4d928eefe2e3ecbc + languageName: node + linkType: hard + +"@ethereumjs/tx@npm:3.3.2": + version: 3.3.2 + resolution: "@ethereumjs/tx@npm:3.3.2" + dependencies: + "@ethereumjs/common": ^2.5.0 + ethereumjs-util: ^7.1.2 + checksum: e18c871fa223fcb23af1c3dde0ff9c82c91e962556fd531e1c75df63afb3941dd71e3def733d8c442a80224c6dcefb256f169cc286176e6ffb33c19349189c53 + languageName: node + linkType: hard + "@ethereumjs/tx@npm:^3.3.2, @ethereumjs/tx@npm:^3.5.2": version: 3.5.2 resolution: "@ethereumjs/tx@npm:3.5.2" @@ -293,7 +322,18 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.0.9, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.4.0, @ethersproject/abi@npm:^5.7.0": +"@ethereumjs/util@npm:^8.1.0": + version: 8.1.0 + resolution: "@ethereumjs/util@npm:8.1.0" + dependencies: + "@ethereumjs/rlp": ^4.0.1 + ethereum-cryptography: ^2.0.0 + micro-ftch: ^0.3.1 + checksum: 9ae5dee8f12b0faf81cd83f06a41560e79b0ba96a48262771d897a510ecae605eb6d84f687da001ab8ccffd50f612ae50f988ef76e6312c752897f462f3ac08d + languageName: node + linkType: hard + +"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.0.0-beta.146, @ethersproject/abi@npm:^5.0.9, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.4.0, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abi@npm:5.7.0" dependencies: @@ -618,7 +658,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.4.0, @ethersproject/transactions@npm:^5.7.0": +"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.4.0, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/transactions@npm:5.7.0" dependencies: @@ -800,6 +840,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.1.0, @noble/curves@npm:~1.1.0": + version: 1.1.0 + resolution: "@noble/curves@npm:1.1.0" + dependencies: + "@noble/hashes": 1.3.1 + checksum: 2658cdd3f84f71079b4e3516c47559d22cf4b55c23ac8ee9d2b1f8e5b72916d9689e59820e0f9d9cb4a46a8423af5b56dc6bb7782405c88be06a015180508db5 + languageName: node + linkType: hard + "@noble/hashes@npm:1.1.2": version: 1.1.2 resolution: "@noble/hashes@npm:1.1.2" @@ -814,6 +863,20 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.3.1": + version: 1.3.1 + resolution: "@noble/hashes@npm:1.3.1" + checksum: 7fdefc0f7a0c1ec27acc6ff88841793e3f93ec4ce6b8a6a12bfc0dd70ae6b7c4c82fe305fdfeda1735d5ad4a9eebe761e6693b3d355689c559e91242f4bc95b1 + languageName: node + linkType: hard + +"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: fe23536b436539d13f90e4b9be843cc63b1b17666a07634a2b1259dded6f490be3d050249e6af98076ea8f2ea0d56f578773c2197f2aa0eeaa5fba5bc18ba474 + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -863,21 +926,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-block@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - checksum: 7ff744f44a01f1c059ca7812a1cfc8089f87aa506af6cb39c78331dca71b32993cbd6fa05ad03f8c4f4fab73bb998a927af69e0d8ff01ae192ee5931606e09f5 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-blockchain@npm:7.0.1": version: 7.0.1 resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.1" @@ -899,27 +947,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-ethash": 3.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - 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 - checksum: b7e440dcd73e32aa72d13bfd28cb472773c9c60ea808a884131bf7eb3f42286ad594a0864215f599332d800f3fe1f772fff4b138d2dcaa8f41e4d8389bff33e7 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-common@npm:4.0.1": version: 4.0.1 resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.1" @@ -930,16 +957,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:4.0.2": - version: 4.0.2 - resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.2" - dependencies: - "@nomicfoundation/ethereumjs-util": 9.0.2 - crc-32: ^1.2.0 - checksum: f0d84704d6254d374299c19884312bd5666974b4b6f342d3f10bc76e549de78d20e45a53d25fbdc146268a52335497127e4f069126da7c60ac933a158e704887 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-ethash@npm:3.0.1": version: 3.0.1 resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.1" @@ -954,20 +971,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:3.0.2": - version: 3.0.2 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - abstract-level: ^1.0.3 - bigint-crypto-utils: ^3.0.23 - ethereum-cryptography: 0.1.3 - checksum: e4011e4019dd9b92f7eeebfc1e6c9a9685c52d8fd0ee4f28f03e50048a23b600c714490827f59fdce497b3afb503b3fd2ebf6815ff307e9949c3efeff1403278 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-evm@npm:2.0.1": version: 2.0.1 resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.1" @@ -984,22 +987,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.2" - dependencies: - "@ethersproject/providers": ^5.7.1 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: a23cf570836ddc147606b02df568069de946108e640f902358fef67e589f6b371d856056ee44299d9b4e3497f8ae25faa45e6b18fefd90e9b222dc6a761d85f0 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-rlp@npm:5.0.1": version: 5.0.1 resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.1" @@ -1009,15 +996,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.2" - bin: - rlp: bin/rlp - checksum: a74434cadefca9aa8754607cc1ad7bb4bbea4ee61c6214918e60a5bbee83206850346eb64e39fd1fe97f854c7ec0163e01148c0c881dda23881938f0645a0ef2 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-statemanager@npm:2.0.1": version: 2.0.1 resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.1" @@ -1032,20 +1010,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-statemanager@npm:2.0.2": - version: 2.0.2 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.2" - dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - ethers: ^5.7.1 - js-sdsl: ^4.1.4 - checksum: 3ab6578e252e53609afd98d8ba42a99f182dcf80252f23ed9a5e0471023ffb2502130f85fc47fa7c94cd149f9be799ed9a0942ca52a143405be9267f4ad94e64 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-trie@npm:6.0.1": version: 6.0.1 resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.1" @@ -1059,19 +1023,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-trie@npm:6.0.2": - version: 6.0.2 - resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.2" - dependencies: - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@types/readable-stream": ^2.3.13 - ethereum-cryptography: 0.1.3 - readable-stream: ^3.6.0 - checksum: d4da918d333851b9f2cce7dbd25ab5753e0accd43d562d98fd991b168b6a08d1794528f0ade40fe5617c84900378376fe6256cdbe52c8d66bf4c53293bbc7c40 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-tx@npm:5.0.1": version: 5.0.1 resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.1" @@ -1086,20 +1037,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-tx@npm:5.0.2": - version: 5.0.2 - resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.2" - dependencies: - "@chainsafe/ssz": ^0.9.2 - "@ethersproject/providers": ^5.7.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - ethereum-cryptography: 0.1.3 - checksum: 0bbcea75786b2ccb559afe2ecc9866fb4566a9f157b6ffba4f50960d14f4b3da2e86e273f6fadda9b860e67cfcabf589970fb951b328cb5f900a585cd21842a2 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-util@npm:9.0.1": version: 9.0.1 resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.1" @@ -1111,17 +1048,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:9.0.2": - version: 9.0.2 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.2" - dependencies: - "@chainsafe/ssz": ^0.10.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - ethereum-cryptography: 0.1.3 - checksum: 3a08f7b88079ef9f53b43da9bdcb8195498fd3d3911c2feee2571f4d1204656053f058b2f650471c86f7d2d0ba2f814768c7cfb0f266eede41c848356afc4900 - languageName: node - linkType: hard - "@nomicfoundation/ethereumjs-vm@npm:7.0.1": version: 7.0.1 resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.1" @@ -1143,27 +1069,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-vm@npm:7.0.2": - version: 7.0.2 - resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.2" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - debug: ^4.3.3 - ethereum-cryptography: 0.1.3 - mcl-wasm: ^0.7.1 - rustbn.js: ~0.2.0 - checksum: 1c25ba4d0644cadb8a2b0241a4bb02e578bfd7f70e3492b855c2ab5c120cb159cb8f7486f84dc1597884bd1697feedbfb5feb66e91352afb51f3694fd8e4a043 - languageName: node - linkType: hard - "@nomicfoundation/hardhat-chai-matchers@npm:1, @nomicfoundation/hardhat-chai-matchers@npm:^1.0.6": version: 1.0.6 resolution: "@nomicfoundation/hardhat-chai-matchers@npm:1.0.6" @@ -1223,6 +1128,17 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/hardhat-network-helpers@npm:^1.0.9": + version: 1.0.9 + resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.9" + dependencies: + ethereumjs-util: ^7.1.4 + peerDependencies: + hardhat: ^2.9.5 + checksum: ff378795075af853aeaacb7bc0783928d947d7f9fb043c046fcaffdf1e1219c4af47b18ea7fa2c10fe0b25daef48f13ae8b103bc11ea494ecdfbe34a3dcdf936 + languageName: node + linkType: hard + "@nomicfoundation/hardhat-toolbox@npm:^2.0.2": version: 2.0.2 resolution: "@nomicfoundation/hardhat-toolbox@npm:2.0.2" @@ -1570,20 +1486,13 @@ __metadata: languageName: node linkType: hard -"@openzeppelin/contracts-upgradeable@npm:4.9.3, @openzeppelin/contracts-upgradeable@npm:^4.8.2, @openzeppelin/contracts-upgradeable@npm:^4.9.0, @openzeppelin/contracts-upgradeable@npm:^4.9.2": +"@openzeppelin/contracts-upgradeable@npm:^4.8.2, @openzeppelin/contracts-upgradeable@npm:^4.9.0, @openzeppelin/contracts-upgradeable@npm:^4.9.2, @openzeppelin/contracts-upgradeable@npm:^4.9.3": version: 4.9.3 resolution: "@openzeppelin/contracts-upgradeable@npm:4.9.3" checksum: bda0240b1d44c913ec5a4e109c622f216c2bbd7b468d210822f75782a5f7fe0609d08bf03b78b253333625e99e507cf2f75212f1de3b274bd9fc64ae967aeec3 languageName: node linkType: hard -"@openzeppelin/contracts@npm:4.9.3, @openzeppelin/contracts@npm:^4.2.0, @openzeppelin/contracts@npm:^4.7.3": - version: 4.9.3 - resolution: "@openzeppelin/contracts@npm:4.9.3" - checksum: 4932063e733b35fa7669b9fe2053f69b062366c5c208b0c6cfa1ac451712100c78acff98120c3a4b88d94154c802be05d160d71f37e7d74cadbe150964458838 - languageName: node - linkType: hard - "@openzeppelin/contracts@npm:^3.2.1-solc-0.7": version: 3.4.2 resolution: "@openzeppelin/contracts@npm:3.4.2" @@ -1591,6 +1500,13 @@ __metadata: languageName: node linkType: hard +"@openzeppelin/contracts@npm:^4.2.0, @openzeppelin/contracts@npm:^4.7.3, @openzeppelin/contracts@npm:^4.9.3": + version: 4.9.3 + resolution: "@openzeppelin/contracts@npm:4.9.3" + checksum: 4932063e733b35fa7669b9fe2053f69b062366c5c208b0c6cfa1ac451712100c78acff98120c3a4b88d94154c802be05d160d71f37e7d74cadbe150964458838 + languageName: node + linkType: hard + "@parcel/watcher@npm:2.0.4": version: 2.0.4 resolution: "@parcel/watcher@npm:2.0.4" @@ -1847,15 +1763,47 @@ __metadata: version: 0.0.0-use.local resolution: "@sandbox-smart-contracts/marketplace@workspace:packages/marketplace" dependencies: - "@openzeppelin/contracts": 4.9.3 - "@openzeppelin/contracts-upgradeable": 4.9.3 + "@ethereumjs/block": ^3.5.1 + "@ethereumjs/common": ^2.5.0 + "@ethereumjs/tx": ^3.3.2 + "@ethersproject/units": ^5.7.0 + "@ethersproject/wallet": ^5.0.5 + "@nomicfoundation/hardhat-chai-matchers": ^1.0.6 + "@nomicfoundation/hardhat-network-helpers": ^1.0.9 + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.7" + "@nomiclabs/hardhat-etherscan": ^3.0.3 + "@openzeppelin/contracts": ^4.9.3 + "@openzeppelin/contracts-upgradeable": ^4.9.3 "@sandbox-smart-contracts/dependency-metatx": ^0.0.2 "@types/chai": ^4.2.11 - hardhat: ^2.17.2 + "@types/mocha": ^8.0.2 + "@types/node": ^14.10.2 + "@typescript-eslint/eslint-plugin": ^4.6.0 + "@typescript-eslint/parser": ^4.6.0 + chai: ^4.2.0 + cross-env: ^7.0.2 + dotenv: ^8.2.0 + dotenv-cli: ^4.0.0 + eslint: ^7.7.0 + eslint-config-prettier: ^6.11.0 + eslint-plugin-mocha: ^8.0.0 + ethereumjs-util: ^7.1.3 + ethers: ^5.7.2 + hardhat: ~2.15.0 hardhat-contract-sizer: ^2.0.3 hardhat-deploy: ^0.10.5 + hardhat-gas-reporter: ^1.0.4 + prettier: 2.0.5 + prettier-plugin-solidity: 1.0.0-beta.11 + readline: ^1.3.0 + solhint-plugin-prettier: ^0.0.5 + solidity-coverage: 0.8.2 ts-node: ^10.9.1 typescript: ^4.0.5 + web3: ^1.10.2 + web3-core-helpers: ^1.10.0 + web3-core-promievent: ^1.10.0 + web3-eth-abi: ^4.1.1 languageName: unknown linkType: soft @@ -1877,6 +1825,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.3.1": + version: 1.3.1 + resolution: "@scure/bip32@npm:1.3.1" + dependencies: + "@noble/curves": ~1.1.0 + "@noble/hashes": ~1.3.1 + "@scure/base": ~1.1.0 + checksum: 394d65f77a40651eba21a5096da0f4233c3b50d422864751d373fcf142eeedb94a1149f9ab1dbb078086dab2d0bc27e2b1afec8321bf22d4403c7df2fea5bfe2 + languageName: node + linkType: hard + "@scure/bip39@npm:1.1.1": version: 1.1.1 resolution: "@scure/bip39@npm:1.1.1" @@ -1887,6 +1846,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.2.1": + version: 1.2.1 + resolution: "@scure/bip39@npm:1.2.1" + dependencies: + "@noble/hashes": ~1.3.0 + "@scure/base": ~1.1.0 + checksum: c5bd6f1328fdbeae2dcdd891825b1610225310e5e62a4942714db51066866e4f7bef242c7b06a1b9dcc8043a4a13412cf5c5df76d3b10aa9e36b82e9b6e3eeaa + languageName: node + linkType: hard + "@sentry/core@npm:5.30.0": version: 5.30.0 resolution: "@sentry/core@npm:5.30.0" @@ -1969,6 +1938,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 83839f13da2c29d55c97abc3bc2c55b250d33a0447554997a85c539e058e57b8da092da396e252b11ec24a0279a0bed1f537fa26302209327060643e327f81d2 + languageName: node + linkType: hard + "@smithy/types@npm:^2.1.0": version: 2.1.0 resolution: "@smithy/types@npm:2.1.0" @@ -2005,6 +1981,24 @@ __metadata: languageName: node linkType: hard +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" + dependencies: + defer-to-connect: ^2.0.0 + checksum: c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 + languageName: node + linkType: hard + +"@szmarczak/http-timer@npm:^5.0.1": + version: 5.0.1 + resolution: "@szmarczak/http-timer@npm:5.0.1" + dependencies: + defer-to-connect: ^2.0.1 + checksum: fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -2132,7 +2126,7 @@ __metadata: languageName: node linkType: hard -"@types/bn.js@npm:^5.1.0": +"@types/bn.js@npm:^5.1.0, @types/bn.js@npm:^5.1.1": version: 5.1.1 resolution: "@types/bn.js@npm:5.1.1" dependencies: @@ -2141,6 +2135,18 @@ __metadata: languageName: node linkType: hard +"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": + version: 6.0.3 + resolution: "@types/cacheable-request@npm:6.0.3" + dependencies: + "@types/http-cache-semantics": "*" + "@types/keyv": ^3.1.4 + "@types/node": "*" + "@types/responselike": ^1.0.0 + checksum: d9b26403fe65ce6b0cb3720b7030104c352bcb37e4fac2a7089a25a97de59c355fa08940658751f2f347a8512aa9d18fdb66ab3ade835975b2f454f2d5befbd9 + languageName: node + linkType: hard + "@types/chai-as-promised@npm:^7.1.3": version: 7.1.5 resolution: "@types/chai-as-promised@npm:7.1.5" @@ -2211,6 +2217,13 @@ __metadata: languageName: node linkType: hard +"@types/http-cache-semantics@npm:*": + version: 4.0.1 + resolution: "@types/http-cache-semantics@npm:4.0.1" + checksum: 1048aacf627829f0d5f00184e16548205cd9f964bf0841c29b36bc504509230c40bc57c39778703a1c965a6f5b416ae2cbf4c1d4589c889d2838dd9dbfccf6e9 + languageName: node + linkType: hard + "@types/inquirer@npm:^7.3.1": version: 7.3.3 resolution: "@types/inquirer@npm:7.3.3" @@ -2228,6 +2241,15 @@ __metadata: languageName: node linkType: hard +"@types/keyv@npm:^3.1.4": + version: 3.1.4 + resolution: "@types/keyv@npm:3.1.4" + dependencies: + "@types/node": "*" + checksum: e009a2bfb50e90ca9b7c6e8f648f8464067271fd99116f881073fa6fa76dc8d0133181dd65e6614d5fb1220d671d67b0124aef7d97dc02d7e342ab143a47779d + languageName: node + linkType: hard + "@types/level-errors@npm:*": version: 3.0.0 resolution: "@types/level-errors@npm:3.0.0" @@ -2302,6 +2324,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^12.12.6": + version: 12.20.55 + resolution: "@types/node@npm:12.20.55" + checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 + languageName: node + linkType: hard + "@types/node@npm:^14.10.2": version: 14.18.54 resolution: "@types/node@npm:14.18.54" @@ -2356,6 +2385,15 @@ __metadata: languageName: node linkType: hard +"@types/responselike@npm:^1.0.0": + version: 1.0.0 + resolution: "@types/responselike@npm:1.0.0" + dependencies: + "@types/node": "*" + checksum: e99fc7cc6265407987b30deda54c1c24bb1478803faf6037557a774b2f034c5b097ffd65847daa87e82a61a250d919f35c3588654b0fdaa816906650f596d1b0 + languageName: node + linkType: hard + "@types/secp256k1@npm:^4.0.1": version: 4.0.3 resolution: "@types/secp256k1@npm:4.0.3" @@ -2672,6 +2710,13 @@ __metadata: languageName: node linkType: hard +"abortcontroller-polyfill@npm:^1.7.5": + version: 1.7.5 + resolution: "abortcontroller-polyfill@npm:1.7.5" + checksum: daf4169f4228ae0e4f4dbcfa782e501b923667f2666b7c55bd3b7664e5d6b100e333a93371173985fdf21f65d7dfba15bdb2e6031bdc9e57e4ce0297147da3aa + languageName: node + linkType: hard + "abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": version: 1.0.3 resolution: "abstract-level@npm:1.0.3" @@ -2713,6 +2758,16 @@ __metadata: languageName: node linkType: hard +"accepts@npm:~1.3.8": + version: 1.3.8 + resolution: "accepts@npm:1.3.8" + dependencies: + mime-types: ~2.1.34 + negotiator: 0.6.3 + checksum: 50c43d32e7b50285ebe84b613ee4a3aa426715a7d131b65b786e2ead0fd76b6b60091b9916d3478a75f11f162628a2139991b6c03ab3f1d9ab7c86075dc8eab4 + languageName: node + linkType: hard + "acorn-jsx@npm:^5.3.1, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" @@ -3034,6 +3089,13 @@ __metadata: languageName: node linkType: hard +"array-flatten@npm:1.1.1": + version: 1.1.1 + resolution: "array-flatten@npm:1.1.1" + checksum: a9925bf3512d9dce202112965de90c222cd59a4fbfce68a0951d25d965cf44642931f40aac72309c41f12df19afa010ecadceb07cfff9ccc1621e99d89ab5f3b + languageName: node + linkType: hard + "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -3135,6 +3197,13 @@ __metadata: languageName: node linkType: hard +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b + languageName: node + linkType: hard + "async-retry@npm:^1.3.3": version: 1.3.3 resolution: "async-retry@npm:1.3.3" @@ -3213,7 +3282,7 @@ __metadata: languageName: node linkType: hard -"base-x@npm:^3.0.2": +"base-x@npm:^3.0.2, base-x@npm:^3.0.8": version: 3.0.9 resolution: "base-x@npm:3.0.9" dependencies: @@ -3298,7 +3367,7 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^4.11.0, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": +"bn.js@npm:^4.11.0, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": version: 4.12.0 resolution: "bn.js@npm:4.12.0" checksum: 39afb4f15f4ea537b55eaf1446c896af28ac948fdcf47171961475724d1bb65118cca49fa6e3d67706e4790955ec0e74de584e45c8f1ef89f46c812bee5b5a12 @@ -3312,6 +3381,46 @@ __metadata: languageName: node linkType: hard +"body-parser@npm:1.20.1": + version: 1.20.1 + resolution: "body-parser@npm:1.20.1" + dependencies: + bytes: 3.1.2 + content-type: ~1.0.4 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.1 + type-is: ~1.6.18 + unpipe: 1.0.0 + checksum: f1050dbac3bede6a78f0b87947a8d548ce43f91ccc718a50dd774f3c81f2d8b04693e52acf62659fad23101827dd318da1fb1363444ff9a8482b886a3e4a5266 + languageName: node + linkType: hard + +"body-parser@npm:^1.16.0": + version: 1.20.2 + resolution: "body-parser@npm:1.20.2" + dependencies: + bytes: 3.1.2 + content-type: ~1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.2 + type-is: ~1.6.18 + unpipe: 1.0.0 + checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737 + languageName: node + linkType: hard + "brace-expansion@npm:^1.0.0, brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -3414,7 +3523,14 @@ __metadata: languageName: node linkType: hard -"buffer-xor@npm:^1.0.3": +"buffer-to-arraybuffer@npm:^0.0.5": + version: 0.0.5 + resolution: "buffer-to-arraybuffer@npm:0.0.5" + checksum: b2e6493a6679e03d0e0e146b4258b9a6d92649d528d8fc4a74423b77f0d4f9398c9f965f3378d1683a91738054bae2761196cfe233f41ab3695126cb58cb25f9 + languageName: node + linkType: hard + +"buffer-xor@npm:^1.0.3": version: 1.0.3 resolution: "buffer-xor@npm:1.0.3" checksum: 10c520df29d62fa6e785e2800e586a20fc4f6dfad84bcdbd12e1e8a83856de1cb75c7ebd7abe6d036bbfab738a6cf18a3ae9c8e5a2e2eb3167ca7399ce65373a @@ -3432,7 +3548,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.0.5, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -3452,6 +3568,16 @@ __metadata: languageName: node linkType: hard +"bufferutil@npm:^4.0.1": + version: 4.0.7 + resolution: "bufferutil@npm:4.0.7" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: f75aa87e3d1b99b87a95f60a855e63f70af07b57fb8443e75a2ddfef2e47788d130fdd46e3a78fd7e0c10176082b26dfbed970c5b8632e1cc299cafa0e93ce45 + languageName: node + linkType: hard + "busboy@npm:^1.6.0": version: 1.6.0 resolution: "busboy@npm:1.6.0" @@ -3488,6 +3614,35 @@ __metadata: languageName: node linkType: hard +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 763e02cf9196bc9afccacd8c418d942fc2677f22261969a4c2c2e760fa44a2351a81557bd908291c3921fe9beb10b976ba8fa50c5ca837c5a0dd945f16468f2d + languageName: node + linkType: hard + +"cacheable-lookup@npm:^6.0.4": + version: 6.1.0 + resolution: "cacheable-lookup@npm:6.1.0" + checksum: 4e37afe897219b1035335b0765106a2c970ffa930497b43cac5000b860f3b17f48d004187279fae97e2e4cbf6a3693709b6d64af65279c7d6c8453321d36d118 + languageName: node + linkType: hard + +"cacheable-request@npm:^7.0.2": + version: 7.0.4 + resolution: "cacheable-request@npm:7.0.4" + dependencies: + clone-response: ^1.0.2 + get-stream: ^5.1.0 + http-cache-semantics: ^4.0.0 + keyv: ^4.0.0 + lowercase-keys: ^2.0.0 + normalize-url: ^6.0.1 + responselike: ^2.0.0 + checksum: 0de9df773fd4e7dd9bd118959878f8f2163867e2e1ab3575ffbecbe6e75e80513dd0c68ba30005e5e5a7b377cc6162bbc00ab1db019bb4e9cb3c2f3f7a6f1ee4 + languageName: node + linkType: hard + "call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": version: 1.0.2 resolution: "call-bind@npm:1.0.2" @@ -3686,6 +3841,13 @@ __metadata: languageName: node linkType: hard +"chownr@npm:^1.1.4": + version: 1.1.4 + resolution: "chownr@npm:1.1.4" + checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -3700,6 +3862,19 @@ __metadata: languageName: node linkType: hard +"cids@npm:^0.7.1": + version: 0.7.5 + resolution: "cids@npm:0.7.5" + dependencies: + buffer: ^5.5.0 + class-is: ^1.1.0 + multibase: ~0.6.0 + multicodec: ^1.0.0 + multihashes: ~0.4.15 + checksum: 54aa031bef76b08a2c934237696a4af2cfc8afb5d2727cb39ab69f6ac142ef312b9a0c6070dc2b4be0a43076d8961339d8bf85287773c647b3d1d25ce203f325 + languageName: node + linkType: hard + "cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": version: 1.0.4 resolution: "cipher-base@npm:1.0.4" @@ -3710,6 +3885,13 @@ __metadata: languageName: node linkType: hard +"class-is@npm:^1.1.0": + version: 1.1.0 + resolution: "class-is@npm:1.1.0" + checksum: 49024de3b264fc501a38dd59d8668f1a2b4973fa6fcef6b83d80fe6fe99a2000a8fbea5b50d4607169c65014843c9f6b41a4f8473df806c1b4787b4d47521880 + languageName: node + linkType: hard + "classic-level@npm:^1.2.0": version: 1.3.0 resolution: "classic-level@npm:1.3.0" @@ -3823,6 +4005,15 @@ __metadata: languageName: node linkType: hard +"clone-response@npm:^1.0.2": + version: 1.0.3 + resolution: "clone-response@npm:1.0.3" + dependencies: + mimic-response: ^1.0.0 + checksum: 4e671cac39b11c60aa8ba0a450657194a5d6504df51bca3fac5b3bd0145c4f8e8464898f87c8406b83232e3bc5cca555f51c1f9c8ac023969ebfbf7f6bdabb2e + languageName: node + linkType: hard + "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -3965,6 +4156,33 @@ __metadata: languageName: node linkType: hard +"content-disposition@npm:0.5.4": + version: 0.5.4 + resolution: "content-disposition@npm:0.5.4" + dependencies: + safe-buffer: 5.2.1 + checksum: afb9d545e296a5171d7574fcad634b2fdf698875f4006a9dd04a3e1333880c5c0c98d47b560d01216fb6505a54a2ba6a843ee3a02ec86d7e911e8315255f56c3 + languageName: node + linkType: hard + +"content-hash@npm:^2.5.2": + version: 2.5.2 + resolution: "content-hash@npm:2.5.2" + dependencies: + cids: ^0.7.1 + multicodec: ^0.5.5 + multihashes: ^0.4.15 + checksum: 31869e4d137b59d02003df0c0f0ad080744d878ed12a57f7d20b2cfd526d59d6317e9f52fa6e49cba59df7f9ab49ceb96d6a832685b85bae442e0c906f7193be + languageName: node + linkType: hard + +"content-type@npm:~1.0.4, content-type@npm:~1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 + languageName: node + linkType: hard + "contracts@workspace:.": version: 0.0.0-use.local resolution: "contracts@workspace:." @@ -3975,6 +4193,20 @@ __metadata: languageName: unknown linkType: soft +"cookie-signature@npm:1.0.6": + version: 1.0.6 + resolution: "cookie-signature@npm:1.0.6" + checksum: f4e1b0a98a27a0e6e66fd7ea4e4e9d8e038f624058371bf4499cfcd8f3980be9a121486995202ba3fca74fbed93a407d6d54d43a43f96fd28d0bd7a06761591a + languageName: node + linkType: hard + +"cookie@npm:0.5.0": + version: 0.5.0 + resolution: "cookie@npm:0.5.0" + checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 + languageName: node + linkType: hard + "cookie@npm:^0.4.1": version: 0.4.2 resolution: "cookie@npm:0.4.2" @@ -3996,6 +4228,16 @@ __metadata: languageName: node linkType: hard +"cors@npm:^2.8.1": + version: 2.8.5 + resolution: "cors@npm:2.8.5" + dependencies: + object-assign: ^4 + vary: ^1 + checksum: ced838404ccd184f61ab4fdc5847035b681c90db7ac17e428f3d81d69e2989d2b680cc254da0e2554f5ed4f8a341820a1ce3d1c16b499f6e2f47a1b9b07b5006 + languageName: node + linkType: hard + "cosmiconfig@npm:^8.0.0": version: 8.2.0 resolution: "cosmiconfig@npm:8.2.0" @@ -4063,6 +4305,15 @@ __metadata: languageName: node linkType: hard +"cross-fetch@npm:^4.0.0": + version: 4.0.0 + resolution: "cross-fetch@npm:4.0.0" + dependencies: + node-fetch: ^2.6.12 + checksum: ecca4f37ffa0e8283e7a8a590926b66713a7ef7892757aa36c2d20ffa27b0ac5c60dcf453119c809abe5923fc0bae3702a4d896bfb406ef1077b0d0018213e24 + languageName: node + linkType: hard + "cross-spawn@npm:^6.0.0": version: 6.0.5 resolution: "cross-spawn@npm:6.0.5" @@ -4138,6 +4389,16 @@ __metadata: languageName: node linkType: hard +"d@npm:1, d@npm:^1.0.1": + version: 1.0.1 + resolution: "d@npm:1.0.1" + dependencies: + es5-ext: ^0.10.50 + type: ^1.0.1 + checksum: 49ca0639c7b822db670de93d4fbce44b4aa072cd848c76292c9978a8cd0fff1028763020ff4b0f147bd77bfe29b4c7f82e0f71ade76b2a06100543cdfd948d19 + languageName: node + linkType: hard + "dashdash@npm:^1.12.0": version: 1.14.1 resolution: "dashdash@npm:1.14.1" @@ -4154,6 +4415,15 @@ __metadata: languageName: node linkType: hard +"debug@npm:2.6.9, debug@npm:^2.2.0": + version: 2.6.9 + resolution: "debug@npm:2.6.9" + dependencies: + ms: 2.0.0 + checksum: d2f51589ca66df60bf36e1fa6e4386b318c3f1e06772280eea5b1ae9fd3d05e9c2b7fd8a7d862457d00853c75b00451aa2d7459b924629ee385287a650f58fe6 + languageName: node + linkType: hard + "debug@npm:3.2.6": version: 3.2.6 resolution: "debug@npm:3.2.6" @@ -4201,6 +4471,31 @@ __metadata: languageName: node linkType: hard +"decode-uri-component@npm:^0.2.0": + version: 0.2.2 + resolution: "decode-uri-component@npm:0.2.2" + checksum: 95476a7d28f267292ce745eac3524a9079058bbb35767b76e3ee87d42e34cd0275d2eb19d9d08c3e167f97556e8a2872747f5e65cbebcac8b0c98d83e285f139 + languageName: node + linkType: hard + +"decompress-response@npm:^3.3.0": + version: 3.3.0 + resolution: "decompress-response@npm:3.3.0" + dependencies: + mimic-response: ^1.0.0 + checksum: 952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 + languageName: node + linkType: hard + +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: ^3.1.0 + checksum: d377cf47e02d805e283866c3f50d3d21578b779731e8c5072d6ce8c13cc31493db1c2f6784da9d1d5250822120cefa44f1deab112d5981015f2e17444b763812 + languageName: node + linkType: hard + "deep-eql@npm:^4.0.1, deep-eql@npm:^4.1.2": version: 4.1.3 resolution: "deep-eql@npm:4.1.3" @@ -4258,6 +4553,13 @@ __metadata: languageName: node linkType: hard +"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b + languageName: node + linkType: hard + "deferred-leveldown@npm:~5.3.0": version: 5.3.0 resolution: "deferred-leveldown@npm:5.3.0" @@ -4306,6 +4608,13 @@ __metadata: languageName: node linkType: hard +"destroy@npm:1.2.0": + version: 1.2.0 + resolution: "destroy@npm:1.2.0" + checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 + languageName: node + linkType: hard + "detect-port@npm:^1.3.0": version: 1.5.1 resolution: "detect-port@npm:1.5.1" @@ -4374,6 +4683,13 @@ __metadata: languageName: node linkType: hard +"dom-walk@npm:^0.1.0": + version: 0.1.2 + resolution: "dom-walk@npm:0.1.2" + checksum: 19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3 + languageName: node + linkType: hard + "dotenv-cli@npm:^4.0.0": version: 4.1.1 resolution: "dotenv-cli@npm:4.1.1" @@ -4470,7 +4786,14 @@ __metadata: languageName: node linkType: hard -"elliptic@npm:6.5.4, elliptic@npm:^6.5.2, elliptic@npm:^6.5.4": +"ee-first@npm:1.1.1": + version: 1.1.1 + resolution: "ee-first@npm:1.1.1" + checksum: 1b4cac778d64ce3b582a7e26b218afe07e207a0f9bfe13cc7395a6d307849cfe361e65033c3251e00c27dd060cab43014c2d6b2647676135e18b77d2d05b3f4f + languageName: node + linkType: hard + +"elliptic@npm:6.5.4, elliptic@npm:^6.4.0, elliptic@npm:^6.5.2, elliptic@npm:^6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" dependencies: @@ -4513,6 +4836,13 @@ __metadata: languageName: node linkType: hard +"encodeurl@npm:~1.0.2": + version: 1.0.2 + resolution: "encodeurl@npm:1.0.2" + checksum: e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c + languageName: node + linkType: hard + "encoding-down@npm:^6.3.0": version: 6.3.0 resolution: "encoding-down@npm:6.3.0" @@ -4672,6 +5002,45 @@ __metadata: languageName: node linkType: hard +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50": + version: 0.10.62 + resolution: "es5-ext@npm:0.10.62" + dependencies: + es6-iterator: ^2.0.3 + es6-symbol: ^3.1.3 + next-tick: ^1.1.0 + checksum: 25f42f6068cfc6e393cf670bc5bba249132c5f5ec2dd0ed6e200e6274aca2fed8e9aec8a31c76031744c78ca283c57f0b41c7e737804c6328c7b8d3fbcba7983 + languageName: node + linkType: hard + +"es6-iterator@npm:^2.0.3": + version: 2.0.3 + resolution: "es6-iterator@npm:2.0.3" + dependencies: + d: 1 + es5-ext: ^0.10.35 + es6-symbol: ^3.1.1 + checksum: 6e48b1c2d962c21dee604b3d9f0bc3889f11ed5a8b33689155a2065d20e3107e2a69cc63a71bd125aeee3a589182f8bbcb5c8a05b6a8f38fa4205671b6d09697 + languageName: node + linkType: hard + +"es6-promise@npm:^4.2.8": + version: 4.2.8 + resolution: "es6-promise@npm:4.2.8" + checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d + languageName: node + linkType: hard + +"es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": + version: 3.1.3 + resolution: "es6-symbol@npm:3.1.3" + dependencies: + d: ^1.0.1 + ext: ^1.1.2 + checksum: cd49722c2a70f011eb02143ef1c8c70658d2660dead6641e160b94619f408b9cf66425515787ffe338affdf0285ad54f4eae30ea5bd510e33f8659ec53bcaa70 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -4679,6 +5048,13 @@ __metadata: languageName: node linkType: hard +"escape-html@npm:~1.0.3": + version: 1.0.3 + resolution: "escape-html@npm:1.0.3" + checksum: 6213ca9ae00d0ab8bccb6d8d4e0a98e76237b2410302cf7df70aaa6591d509a2a37ce8998008cbecae8fc8ffaadf3fb0229535e6a145f3ce0b211d060decbb24 + languageName: node + linkType: hard + "escape-string-regexp@npm:1.0.5, escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -5070,6 +5446,23 @@ __metadata: languageName: node linkType: hard +"etag@npm:~1.8.1": + version: 1.8.1 + resolution: "etag@npm:1.8.1" + checksum: 571aeb3dbe0f2bbd4e4fadbdb44f325fc75335cd5f6f6b6a091e6a06a9f25ed5392f0863c5442acb0646787446e816f13cbfc6edce5b07658541dff573cab1ff + languageName: node + linkType: hard + +"eth-ens-namehash@npm:2.0.8": + version: 2.0.8 + resolution: "eth-ens-namehash@npm:2.0.8" + dependencies: + idna-uts46-hx: ^2.3.1 + js-sha3: ^0.5.7 + checksum: 40ce4aeedaa4e7eb4485c8d8857457ecc46a4652396981d21b7e3a5f922d5beff63c71cb4b283c935293e530eba50b329d9248be3c433949c6bc40c850c202a3 + languageName: node + linkType: hard + "eth-gas-reporter@npm:^0.2.25": version: 0.2.25 resolution: "eth-gas-reporter@npm:0.2.25" @@ -5098,6 +5491,31 @@ __metadata: languageName: node linkType: hard +"eth-lib@npm:0.2.8": + version: 0.2.8 + resolution: "eth-lib@npm:0.2.8" + dependencies: + bn.js: ^4.11.6 + elliptic: ^6.4.0 + xhr-request-promise: ^0.1.2 + checksum: be7efb0b08a78e20d12d2892363ecbbc557a367573ac82fc26a549a77a1b13c7747e6eadbb88026634828fcf9278884b555035787b575b1cab5e6958faad0fad + languageName: node + linkType: hard + +"eth-lib@npm:^0.1.26": + version: 0.1.29 + resolution: "eth-lib@npm:0.1.29" + dependencies: + bn.js: ^4.11.6 + elliptic: ^6.4.0 + nano-json-stream-parser: ^0.1.2 + servify: ^0.1.12 + ws: ^3.0.0 + xhr-request-promise: ^0.1.2 + checksum: d1494fc0af372d46d1c9e7506cfbfa81b9073d98081cf4cbe518932f88bee40cf46a764590f1f8aba03d4a534fa2b1cd794fa2a4f235f656d82b8ab185b5cb9d + languageName: node + linkType: hard + "eth-sig-util@npm:^3.0.1": version: 3.0.1 resolution: "eth-sig-util@npm:3.0.1" @@ -5163,6 +5581,18 @@ __metadata: languageName: node linkType: hard +"ethereum-cryptography@npm:^2.0.0, ethereum-cryptography@npm:^2.1.2": + version: 2.1.2 + resolution: "ethereum-cryptography@npm:2.1.2" + dependencies: + "@noble/curves": 1.1.0 + "@noble/hashes": 1.3.1 + "@scure/bip32": 1.3.1 + "@scure/bip39": 1.2.1 + checksum: 2e8f7b8cc90232ae838ab6a8167708e8362621404d26e79b5d9e762c7b53d699f7520aff358d9254de658fcd54d2d0af168ff909943259ed27dc4cef2736410c + languageName: node + linkType: hard + "ethereumjs-abi@npm:^0.6.8": version: 0.6.8 resolution: "ethereumjs-abi@npm:0.6.8" @@ -5203,7 +5633,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.3, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": +"ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.3, ethereumjs-util@npm:^7.1.4, ethereumjs-util@npm:^7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -5313,6 +5743,13 @@ __metadata: languageName: node linkType: hard +"eventemitter3@npm:4.0.4": + version: 4.0.4 + resolution: "eventemitter3@npm:4.0.4" + checksum: 7afb1cd851d19898bc99cc55ca894fe18cb1f8a07b0758652830a09bd6f36082879a25345be6219b81d74764140688b1a8fa75bcd1073d96b9a6661e444bc2ea + languageName: node + linkType: hard + "evp_bytestokey@npm:^1.0.3": version: 1.0.3 resolution: "evp_bytestokey@npm:1.0.3" @@ -5346,6 +5783,54 @@ __metadata: languageName: node linkType: hard +"express@npm:^4.14.0": + version: 4.18.2 + resolution: "express@npm:4.18.2" + dependencies: + accepts: ~1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.1 + content-disposition: 0.5.4 + content-type: ~1.0.4 + cookie: 0.5.0 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + etag: ~1.8.1 + finalhandler: 1.2.0 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.1 + methods: ~1.1.2 + on-finished: 2.4.1 + parseurl: ~1.3.3 + path-to-regexp: 0.1.7 + proxy-addr: ~2.0.7 + qs: 6.11.0 + range-parser: ~1.2.1 + safe-buffer: 5.2.1 + send: 0.18.0 + serve-static: 1.15.0 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: ~1.6.18 + utils-merge: 1.0.1 + vary: ~1.1.2 + checksum: 3c4b9b076879442f6b968fe53d85d9f1eeacbb4f4c41e5f16cc36d77ce39a2b0d81b3f250514982110d815b2f7173f5561367f9110fcc541f9371948e8c8b037 + languageName: node + linkType: hard + +"ext@npm:^1.1.2": + version: 1.7.0 + resolution: "ext@npm:1.7.0" + dependencies: + type: ^2.7.2 + checksum: ef481f9ef45434d8c867cfd09d0393b60945b7c8a1798bedc4514cb35aac342ccb8d8ecb66a513e6a2b4ec1e294a338e3124c49b29736f8e7c735721af352c31 + languageName: node + linkType: hard + "extend@npm:^3.0.2, extend@npm:~3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" @@ -5499,6 +5984,21 @@ __metadata: languageName: node linkType: hard +"finalhandler@npm:1.2.0": + version: 1.2.0 + resolution: "finalhandler@npm:1.2.0" + dependencies: + debug: 2.6.9 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + on-finished: 2.4.1 + parseurl: ~1.3.3 + statuses: 2.0.1 + unpipe: ~1.0.0 + checksum: 92effbfd32e22a7dff2994acedbd9bcc3aa646a3e919ea6a53238090e87097f8ef07cced90aa2cc421abdf993aefbdd5b00104d55c7c5479a8d00ed105b45716 + languageName: node + linkType: hard + "find-replace@npm:^3.0.0": version: 3.0.0 resolution: "find-replace@npm:3.0.0" @@ -5618,6 +6118,13 @@ __metadata: languageName: node linkType: hard +"form-data-encoder@npm:1.7.1": + version: 1.7.1 + resolution: "form-data-encoder@npm:1.7.1" + checksum: a2a360d5588a70d323c12a140c3db23a503a38f0a5d141af1efad579dde9f9fff2e49e5f31f378cb4631518c1ab4a826452c92f0d2869e954b6b2d77b05613e1 + languageName: node + linkType: hard + "form-data@npm:^2.2.0": version: 2.5.1 resolution: "form-data@npm:2.5.1" @@ -5651,6 +6158,13 @@ __metadata: languageName: node linkType: hard +"forwarded@npm:0.2.0": + version: 0.2.0 + resolution: "forwarded@npm:0.2.0" + checksum: fd27e2394d8887ebd16a66ffc889dc983fbbd797d5d3f01087c020283c0f019a7d05ee85669383d8e0d216b116d720fc0cef2f6e9b7eb9f4c90c6e0bc7fd28e6 + languageName: node + linkType: hard + "fp-ts@npm:1.19.3": version: 1.19.3 resolution: "fp-ts@npm:1.19.3" @@ -5665,6 +6179,13 @@ __metadata: languageName: node linkType: hard +"fresh@npm:0.5.2": + version: 0.5.2 + resolution: "fresh@npm:0.5.2" + checksum: 13ea8b08f91e669a64e3ba3a20eb79d7ca5379a81f1ff7f4310d54e2320645503cc0c78daedc93dfb6191287295f6479544a649c64d8e41a1c0fb0c221552346 + languageName: node + linkType: hard + "fs-constants@npm:^1.0.0": version: 1.0.0 resolution: "fs-constants@npm:1.0.0" @@ -5707,6 +6228,17 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:^4.0.2": + version: 4.0.3 + resolution: "fs-extra@npm:4.0.3" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: c5ae3c7043ad7187128e619c0371da01b58694c1ffa02c36fb3f5b459925d9c27c3cb1e095d9df0a34a85ca993d8b8ff6f6ecef868fd5ebb243548afa7fc0936 + languageName: node + linkType: hard + "fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -5741,6 +6273,15 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^1.2.7": + version: 1.2.7 + resolution: "fs-minipass@npm:1.2.7" + dependencies: + minipass: ^2.6.0 + checksum: 40fd46a2b5dcb74b3a580269f9a0c36f9098c2ebd22cef2e1a004f375b7b665c11f1507ec3f66ee6efab5664109f72d0a74ea19c3370842214c3da5168d6fdd7 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -5941,6 +6482,22 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^5.1.0": + version: 5.2.0 + resolution: "get-stream@npm:5.2.0" + dependencies: + pump: ^3.0.0 + checksum: 8bc1a23174a06b2b4ce600df38d6c98d2ef6d84e020c1ddad632ad75bac4e092eeb40e4c09e0761c35fc2dbc5e7fff5dab5e763a383582c4a167dd69a905bd12 + languageName: node + linkType: hard + +"get-stream@npm:^6.0.1": + version: 6.0.1 + resolution: "get-stream@npm:6.0.1" + checksum: e04ecece32c92eebf5b8c940f51468cd53554dcbb0ea725b2748be583c9523d00128137966afce410b9b051eb2ef16d657cd2b120ca8edafcf5a65e81af63cad + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -6147,6 +6704,16 @@ __metadata: languageName: node linkType: hard +"global@npm:~4.4.0": + version: 4.4.0 + resolution: "global@npm:4.4.0" + dependencies: + min-document: ^2.19.0 + process: ^0.11.10 + checksum: 9c057557c8f5a5bcfbeb9378ba4fe2255d04679452be504608dd5f13b54edf79f7be1db1031ea06a4ec6edd3b9f5f17d2d172fb47e6c69dae57fd84b7e72b77f + languageName: node + linkType: hard + "globals@npm:^13.19.0, globals@npm:^13.6.0, globals@npm:^13.9.0": version: 13.21.0 resolution: "globals@npm:13.21.0" @@ -6256,6 +6823,46 @@ __metadata: languageName: node linkType: hard +"got@npm:12.1.0": + version: 12.1.0 + resolution: "got@npm:12.1.0" + dependencies: + "@sindresorhus/is": ^4.6.0 + "@szmarczak/http-timer": ^5.0.1 + "@types/cacheable-request": ^6.0.2 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^6.0.4 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + form-data-encoder: 1.7.1 + get-stream: ^6.0.1 + http2-wrapper: ^2.1.10 + lowercase-keys: ^3.0.0 + p-cancelable: ^3.0.0 + responselike: ^2.0.0 + checksum: 1cc9af6ca511338a7f1bbb0943999e6ac324ea3c7d826066c02e530b4ac41147b1a4cadad21b28c3938de82185ac99c33d64a3a4560c6e0b0b125191ba6ee619 + languageName: node + linkType: hard + +"got@npm:^11.8.5": + version: 11.8.6 + resolution: "got@npm:11.8.6" + dependencies: + "@sindresorhus/is": ^4.0.0 + "@szmarczak/http-timer": ^4.0.5 + "@types/cacheable-request": ^6.0.1 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^5.0.3 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + http2-wrapper: ^1.0.0-beta.5.2 + lowercase-keys: ^2.0.0 + p-cancelable: ^2.0.0 + responselike: ^2.0.0 + checksum: bbc783578a8d5030c8164ef7f57ce41b5ad7db2ed13371e1944bef157eeca5a7475530e07c0aaa71610d7085474d0d96222c9f4268d41db333a17e39b463f45d + languageName: node + linkType: hard + "graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.6": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -6487,26 +7094,27 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:^2.17.2": - version: 2.17.3 - resolution: "hardhat@npm:2.17.3" +"hardhat@npm:~2.15.0": + version: 2.15.0 + resolution: "hardhat@npm:2.15.0" dependencies: "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.2 - "@nomicfoundation/ethereumjs-blockchain": 7.0.2 - "@nomicfoundation/ethereumjs-common": 4.0.2 - "@nomicfoundation/ethereumjs-evm": 2.0.2 - "@nomicfoundation/ethereumjs-rlp": 5.0.2 - "@nomicfoundation/ethereumjs-statemanager": 2.0.2 - "@nomicfoundation/ethereumjs-trie": 6.0.2 - "@nomicfoundation/ethereumjs-tx": 5.0.2 - "@nomicfoundation/ethereumjs-util": 9.0.2 - "@nomicfoundation/ethereumjs-vm": 7.0.2 + "@nomicfoundation/ethereumjs-block": 5.0.1 + "@nomicfoundation/ethereumjs-blockchain": 7.0.1 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-evm": 2.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-statemanager": 2.0.1 + "@nomicfoundation/ethereumjs-trie": 6.0.1 + "@nomicfoundation/ethereumjs-tx": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 + "@nomicfoundation/ethereumjs-vm": 7.0.1 "@nomicfoundation/solidity-analyzer": ^0.1.0 "@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 @@ -6529,6 +7137,7 @@ __metadata: 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 @@ -6549,75 +7158,7 @@ __metadata: optional: true bin: hardhat: internal/cli/bootstrap.js - checksum: 0540ef225b3992749c6b828540a9b9a20b4aaa0f2b4f25556d0769b9f32687593ef0fa9e753496647d772e5d4b07300694d588b13cfb5f7d5fb33ed8238ea9fe - languageName: node - linkType: hard - -"hardhat@npm:~2.15.0": - version: 2.15.0 - resolution: "hardhat@npm:2.15.0" - dependencies: - "@ethersproject/abi": ^5.1.2 - "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.1 - "@nomicfoundation/ethereumjs-blockchain": 7.0.1 - "@nomicfoundation/ethereumjs-common": 4.0.1 - "@nomicfoundation/ethereumjs-evm": 2.0.1 - "@nomicfoundation/ethereumjs-rlp": 5.0.1 - "@nomicfoundation/ethereumjs-statemanager": 2.0.1 - "@nomicfoundation/ethereumjs-trie": 6.0.1 - "@nomicfoundation/ethereumjs-tx": 5.0.1 - "@nomicfoundation/ethereumjs-util": 9.0.1 - "@nomicfoundation/ethereumjs-vm": 7.0.1 - "@nomicfoundation/solidity-analyzer": ^0.1.0 - "@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.14.0 - uuid: ^8.3.2 - ws: ^7.4.6 - peerDependencies: - ts-node: "*" - typescript: "*" - peerDependenciesMeta: - ts-node: - optional: true - typescript: - optional: true - bin: - hardhat: internal/cli/bootstrap.js - checksum: 46767f0eb75f08e1f47585d3aec3261932251b47909051bfffcbff317f7efe06fdab7cb8686cb67c46cc7ed4cedb80d0c21157fe03f103054001b2762085ef92 + checksum: 46767f0eb75f08e1f47585d3aec3261932251b47909051bfffcbff317f7efe06fdab7cb8686cb67c46cc7ed4cedb80d0c21157fe03f103054001b2762085ef92 languageName: node linkType: hard @@ -6774,7 +7315,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.1.1": +"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 @@ -6794,6 +7335,13 @@ __metadata: languageName: node linkType: hard +"http-https@npm:^1.0.0": + version: 1.0.0 + resolution: "http-https@npm:1.0.0" + checksum: 82fc4d2e512c64b35680944d1ae13e68220acfa05b06329832e271fd199c5c7fcff1f53fc1f91a1cd65a737ee4de14004dd3ba9a73cce33da970940c6e6ca774 + languageName: node + linkType: hard + "http-proxy-agent@npm:^5.0.0": version: 5.0.0 resolution: "http-proxy-agent@npm:5.0.0" @@ -6825,6 +7373,26 @@ __metadata: languageName: node linkType: hard +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.0.0 + checksum: 74160b862ec699e3f859739101ff592d52ce1cb207b7950295bf7962e4aa1597ef709b4292c673bece9c9b300efad0559fc86c71b1409c7a1e02b7229456003e + languageName: node + linkType: hard + +"http2-wrapper@npm:^2.1.10": + version: 2.2.0 + resolution: "http2-wrapper@npm:2.2.0" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.2.0 + checksum: 6fd20e5cb6a58151715b3581e06a62a47df943187d2d1f69e538a50cccb7175dd334ecfde7900a37d18f3e13a1a199518a2c211f39860e81e9a16210c199cfaa + languageName: node + linkType: hard + "https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" @@ -6862,6 +7430,15 @@ __metadata: languageName: node linkType: hard +"idna-uts46-hx@npm:^2.3.1": + version: 2.3.1 + resolution: "idna-uts46-hx@npm:2.3.1" + dependencies: + punycode: 2.1.0 + checksum: d434c3558d2bc1090eb90f978f995101f469cb26593414ac57aa082c9352e49972b332c6e4188b9b15538172ccfeae3121e5a19b96972a97e6aeb0676d86639c + languageName: node + linkType: hard + "ieee754@npm:^1.1.13, ieee754@npm:^1.1.4, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -7021,6 +7598,23 @@ __metadata: languageName: node linkType: hard +"ipaddr.js@npm:1.9.1": + version: 1.9.1 + resolution: "ipaddr.js@npm:1.9.1" + checksum: f88d3825981486f5a1942414c8d77dd6674dd71c065adcfa46f578d677edcb99fda25af42675cb59db492fdf427b34a5abfcde3982da11a8fd83a500b41cfe77 + languageName: node + linkType: hard + +"is-arguments@npm:^1.0.4": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 7f02700ec2171b691ef3e4d0e3e6c0ba408e8434368504bb593d0d7c891c0dbfda6d19d30808b904a6cb1929bca648c061ba438c39f296c2a8ca083229c49f27 + languageName: node + linkType: hard + "is-array-buffer@npm:^3.0.1, is-array-buffer@npm:^3.0.2": version: 3.0.2 resolution: "is-array-buffer@npm:3.0.2" @@ -7129,6 +7723,22 @@ __metadata: languageName: node linkType: hard +"is-function@npm:^1.0.1": + version: 1.0.2 + resolution: "is-function@npm:1.0.2" + checksum: 7d564562e07b4b51359547d3ccc10fb93bb392fd1b8177ae2601ee4982a0ece86d952323fc172a9000743a3971f09689495ab78a1d49a9b14fc97a7e28521dc0 + languageName: node + linkType: hard + +"is-generator-function@npm:^1.0.7": + version: 1.0.10 + resolution: "is-generator-function@npm:1.0.10" + dependencies: + has-tostringtag: ^1.0.0 + checksum: d54644e7dbaccef15ceb1e5d91d680eb5068c9ee9f9eb0a9e04173eb5542c9b51b5ab52c5537f5703e48d5fddfd376817c1ca07a84a407b7115b769d4bdde72b + languageName: node + linkType: hard + "is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" @@ -7240,7 +7850,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.3, is-typed-array@npm:^1.1.9": version: 1.1.12 resolution: "is-typed-array@npm:1.1.12" dependencies: @@ -7249,7 +7859,7 @@ __metadata: languageName: node linkType: hard -"is-typedarray@npm:~1.0.0": +"is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" checksum: 3508c6cd0a9ee2e0df2fa2e9baabcdc89e911c7bd5cf64604586697212feec525aa21050e48affb5ffc3df20f0f5d2e2cf79b08caa64e1ccc9578e251763aef7 @@ -7384,7 +7994,7 @@ __metadata: languageName: node linkType: hard -"js-sha3@npm:0.5.7": +"js-sha3@npm:0.5.7, js-sha3@npm:^0.5.7": version: 0.5.7 resolution: "js-sha3@npm:0.5.7" checksum: 973a28ea4b26cc7f12d2ab24f796e24ee4a71eef45a6634a052f6eb38cf8b2333db798e896e6e094ea6fa4dfe8e42a2a7942b425cf40da3f866623fd05bb91ea @@ -7467,6 +8077,13 @@ __metadata: languageName: node linkType: hard +"json-buffer@npm:3.0.1": + version: 3.0.1 + resolution: "json-buffer@npm:3.0.1" + checksum: 9026b03edc2847eefa2e37646c579300a1f3a4586cfb62bf857832b60c852042d0d6ae55d1afb8926163fa54c2b01d83ae24705f34990348bdac6273a29d4581 + languageName: node + linkType: hard + "json-parse-even-better-errors@npm:^2.3.0": version: 2.3.1 resolution: "json-parse-even-better-errors@npm:2.3.1" @@ -7623,6 +8240,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:^4.0.0": + version: 4.5.3 + resolution: "keyv@npm:4.5.3" + dependencies: + json-buffer: 3.0.1 + checksum: 3ffb4d5b72b6b4b4af443bbb75ca2526b23c750fccb5ac4c267c6116888b4b65681015c2833cb20d26cf3e6e32dac6b988c77f7f022e1a571b7d90f1442257da + languageName: node + linkType: hard + "kind-of@npm:^6.0.2": version: 6.0.3 resolution: "kind-of@npm:6.0.3" @@ -7910,6 +8536,20 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:^2.0.0": + version: 2.0.0 + resolution: "lowercase-keys@npm:2.0.0" + checksum: 24d7ebd56ccdf15ff529ca9e08863f3c54b0b9d1edb97a3ae1af34940ae666c01a1e6d200707bce730a8ef76cb57cc10e65f245ecaaf7e6bc8639f2fb460ac23 + languageName: node + linkType: hard + +"lowercase-keys@npm:^3.0.0": + version: 3.0.0 + resolution: "lowercase-keys@npm:3.0.0" + checksum: 67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -8043,6 +8683,13 @@ __metadata: languageName: node linkType: hard +"media-typer@npm:0.3.0": + version: 0.3.0 + resolution: "media-typer@npm:0.3.0" + checksum: af1b38516c28ec95d6b0826f6c8f276c58aec391f76be42aa07646b4e39d317723e869700933ca6995b056db4b09a78c92d5440dc23657e6764be5d28874bba1 + languageName: node + linkType: hard + "memdown@npm:^5.0.0": version: 5.1.0 resolution: "memdown@npm:5.1.0" @@ -8075,6 +8722,13 @@ __metadata: languageName: node linkType: hard +"merge-descriptors@npm:1.0.1": + version: 1.0.1 + resolution: "merge-descriptors@npm:1.0.1" + checksum: 5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26 + languageName: node + linkType: hard + "merge2@npm:^1.2.3, merge2@npm:^1.3.0, merge2@npm:^1.4.1": version: 1.4.1 resolution: "merge2@npm:1.4.1" @@ -8096,6 +8750,20 @@ __metadata: languageName: node linkType: hard +"methods@npm:~1.1.2": + version: 1.1.2 + resolution: "methods@npm:1.1.2" + checksum: 0917ff4041fa8e2f2fda5425a955fe16ca411591fbd123c0d722fcf02b73971ed6f764d85f0a6f547ce49ee0221ce2c19a5fa692157931cecb422984f1dcd13a + languageName: node + linkType: hard + +"micro-ftch@npm:^0.3.1": + version: 0.3.1 + resolution: "micro-ftch@npm:0.3.1" + checksum: 0e496547253a36e98a83fb00c628c53c3fb540fa5aaeaf718438873785afd193244988c09d219bb1802984ff227d04938d9571ef90fe82b48bd282262586aaff + languageName: node + linkType: hard + "micromatch@npm:^4.0.4": version: 4.0.5 resolution: "micromatch@npm:4.0.5" @@ -8113,7 +8781,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:~2.1.19": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -8122,6 +8790,15 @@ __metadata: languageName: node linkType: hard +"mime@npm:1.6.0": + version: 1.6.0 + resolution: "mime@npm:1.6.0" + bin: + mime: cli.js + checksum: fef25e39263e6d207580bdc629f8872a3f9772c923c7f8c7e793175cee22777bbe8bba95e5d509a40aaa292d8974514ce634ae35769faa45f22d17edda5e8557 + languageName: node + linkType: hard + "mimic-fn@npm:^2.1.0": version: 2.1.0 resolution: "mimic-fn@npm:2.1.0" @@ -8129,6 +8806,29 @@ __metadata: languageName: node linkType: hard +"mimic-response@npm:^1.0.0": + version: 1.0.1 + resolution: "mimic-response@npm:1.0.1" + checksum: 034c78753b0e622bc03c983663b1cdf66d03861050e0c8606563d149bc2b02d63f62ce4d32be4ab50d0553ae0ffe647fc34d1f5281184c6e1e8cf4d85e8d9823 + languageName: node + linkType: hard + +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 25739fee32c17f433626bf19f016df9036b75b3d84a3046c7d156e72ec963dd29d7fc8a302f55a3d6c5a4ff24259676b15d915aad6480815a969ff2ec0836867 + languageName: node + linkType: hard + +"min-document@npm:^2.19.0": + version: 2.19.0 + resolution: "min-document@npm:2.19.0" + dependencies: + dom-walk: ^0.1.0 + checksum: da6437562ea2228041542a2384528e74e22d1daa1a4ec439c165abf0b9d8a63e17e3b8a6dc6e0c731845e85301198730426932a0e813d23f932ca668340c9623 + languageName: node + linkType: hard + "minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": version: 1.0.1 resolution: "minimalistic-assert@npm:1.0.1" @@ -8273,6 +8973,16 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^2.6.0, minipass@npm:^2.9.0": + version: 2.9.0 + resolution: "minipass@npm:2.9.0" + dependencies: + safe-buffer: ^5.1.2 + yallist: ^3.0.0 + checksum: 077b66f31ba44fd5a0d27d12a9e6a86bff8f97a4978dedb0373167156b5599fadb6920fdde0d9f803374164d810e05e8462ce28e86abbf7f0bea293a93711fc6 + languageName: node + linkType: hard + "minipass@npm:^3.0.0": version: 3.3.6 resolution: "minipass@npm:3.3.6" @@ -8303,6 +9013,15 @@ __metadata: languageName: node linkType: hard +"minizlib@npm:^1.3.3": + version: 1.3.3 + resolution: "minizlib@npm:1.3.3" + dependencies: + minipass: ^2.9.0 + checksum: b0425c04d2ae6aad5027462665f07cc0d52075f7fa16e942b4611115f9b31f02924073b7221be6f75929d3c47ab93750c63f6dc2bbe8619ceacb3de1f77732c0 + languageName: node + linkType: hard + "minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": version: 2.1.2 resolution: "minizlib@npm:2.1.2" @@ -8320,6 +9039,24 @@ __metadata: languageName: node linkType: hard +"mkdirp-promise@npm:^5.0.1": + version: 5.0.1 + resolution: "mkdirp-promise@npm:5.0.1" + dependencies: + mkdirp: "*" + checksum: 31ddc9478216adf6d6bee9ea7ce9ccfe90356d9fcd1dfb18128eac075390b4161356d64c3a7b0a75f9de01a90aadd990a0ec8c7434036563985c4b853a053ee2 + languageName: node + linkType: hard + +"mkdirp@npm:*": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d + languageName: node + linkType: hard + "mkdirp@npm:0.5.5": version: 0.5.5 resolution: "mkdirp@npm:0.5.5" @@ -8331,7 +9068,7 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:0.5.x, mkdirp@npm:^0.5.1": +"mkdirp@npm:0.5.x, mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.5": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -8498,6 +9235,13 @@ __metadata: languageName: node linkType: hard +"mock-fs@npm:^4.1.0": + version: 4.14.0 + resolution: "mock-fs@npm:4.14.0" + checksum: dccd976a8d753e19d3c7602ea422d1f7137def3c1128c177e1f5500fe8c50ec15fe0937cfc3a15c4577fe7adb9a37628b92da9294d13d90f08be4b669b0fca76 + languageName: node + linkType: hard + "module-error@npm:^1.0.1, module-error@npm:^1.0.2": version: 1.0.2 resolution: "module-error@npm:1.0.2" @@ -8512,6 +9256,13 @@ __metadata: languageName: node linkType: hard +"ms@npm:2.0.0": + version: 2.0.0 + resolution: "ms@npm:2.0.0" + checksum: 0e6a22b8b746d2e0b65a430519934fefd41b6db0682e3477c10f60c76e947c4c0ad06f63ffdf1d78d335f83edee8c0aa928aa66a36c7cd95b69b26f468d527f4 + languageName: node + linkType: hard + "ms@npm:2.1.1": version: 2.1.1 resolution: "ms@npm:2.1.1" @@ -8533,6 +9284,56 @@ __metadata: languageName: node linkType: hard +"multibase@npm:^0.7.0": + version: 0.7.0 + resolution: "multibase@npm:0.7.0" + dependencies: + base-x: ^3.0.8 + buffer: ^5.5.0 + checksum: 3a520897d706b3064b59ddee286a9e1a5b35bb19bd830f93d7ddecdbf69fa46648c8fda0fec49a5d4640b8b7ac9d5fe360417d6de2906599aa535f55bf6b8e58 + languageName: node + linkType: hard + +"multibase@npm:~0.6.0": + version: 0.6.1 + resolution: "multibase@npm:0.6.1" + dependencies: + base-x: ^3.0.8 + buffer: ^5.5.0 + checksum: 0e25a978d2b5cf73e4cce31d032bad85230ea99e9394d259210f676a76539316e7c51bd7dcc9d83523ec7ea1f0e7a3353c5f69397639d78be9acbefa29431faa + languageName: node + linkType: hard + +"multicodec@npm:^0.5.5": + version: 0.5.7 + resolution: "multicodec@npm:0.5.7" + dependencies: + varint: ^5.0.0 + checksum: 5af1febc3bb5381c303c964a4c3bacb9d0d16615599426d58c68722c46e66a7085082995479943084322028324ad692cd70ea14b5eefb2791d325fa00ead04a3 + languageName: node + linkType: hard + +"multicodec@npm:^1.0.0": + version: 1.0.4 + resolution: "multicodec@npm:1.0.4" + dependencies: + buffer: ^5.6.0 + varint: ^5.0.0 + checksum: e6a2916fa76c023b1c90b32ae74f8a781cf0727f71660b245a5ed1db46add6f2ce1586bee5713b16caf0a724e81bfe0678d89910c20d3bb5fd9649dacb2be79e + languageName: node + linkType: hard + +"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": + version: 0.4.21 + resolution: "multihashes@npm:0.4.21" + dependencies: + buffer: ^5.5.0 + multibase: ^0.7.0 + varint: ^5.0.0 + checksum: 688731560cf7384e899dc75c0da51e426eb7d058c5ea5eb57b224720a1108deb8797f1cd7f45599344d512d2877de99dd6a7b7773a095812365dea4ffe6ebd4c + languageName: node + linkType: hard + "murmur-128@npm:^0.2.1": version: 0.2.1 resolution: "murmur-128@npm:0.2.1" @@ -8551,6 +9352,13 @@ __metadata: languageName: node linkType: hard +"nano-json-stream-parser@npm:^0.1.2": + version: 0.1.2 + resolution: "nano-json-stream-parser@npm:0.1.2" + checksum: 5bfe146358c659e0aa7d5e0003416be929c9bd02ba11b1e022b78dddf25be655e33d810249c1687d2c9abdcee5cd4d00856afd1b266a5a127236c0d16416d33a + languageName: node + linkType: hard + "nanoid@npm:3.1.20": version: 3.1.20 resolution: "nanoid@npm:3.1.20" @@ -8590,7 +9398,7 @@ __metadata: languageName: node linkType: hard -"negotiator@npm:^0.6.3": +"negotiator@npm:0.6.3, negotiator@npm:^0.6.3": version: 0.6.3 resolution: "negotiator@npm:0.6.3" checksum: b8ffeb1e262eff7968fc90a2b6767b04cfd9842582a9d0ece0af7049537266e7b2506dfb1d107a32f06dd849ab2aea834d5830f7f4d0e5cb7d36e1ae55d021d9 @@ -8604,6 +9412,13 @@ __metadata: languageName: node linkType: hard +"next-tick@npm:^1.1.0": + version: 1.1.0 + resolution: "next-tick@npm:1.1.0" + checksum: 83b5cf36027a53ee6d8b7f9c0782f2ba87f4858d977342bfc3c20c21629290a2111f8374d13a81221179603ffc4364f38374b5655d17b6a8f8a8c77bdea4fe8b + languageName: node + linkType: hard + "nice-try@npm:^1.0.4": version: 1.0.5 resolution: "nice-try@npm:1.0.5" @@ -8662,6 +9477,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^2.6.12": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + languageName: node + linkType: hard + "node-forge@npm:^1.3.1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -8737,6 +9566,13 @@ __metadata: languageName: node linkType: hard +"normalize-url@npm:^6.0.1": + version: 6.1.0 + resolution: "normalize-url@npm:6.1.0" + checksum: 4a4944631173e7d521d6b80e4c85ccaeceb2870f315584fa30121f505a6dfd86439c5e3fdd8cd9e0e291290c41d0c3599f0cb12ab356722ed242584c30348e50 + languageName: node + linkType: hard + "npm-run-path@npm:^2.0.0": version: 2.0.2 resolution: "npm-run-path@npm:2.0.2" @@ -8865,7 +9701,7 @@ __metadata: languageName: node linkType: hard -"object-assign@npm:^4.1.0": +"object-assign@npm:^4, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": version: 4.1.1 resolution: "object-assign@npm:4.1.1" checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f @@ -8939,6 +9775,24 @@ __metadata: languageName: node linkType: hard +"oboe@npm:2.1.5": + version: 2.1.5 + resolution: "oboe@npm:2.1.5" + dependencies: + http-https: ^1.0.0 + checksum: e6171b33645ffc3559688a824a461952380d0b8f6a203b2daf6767647f277554a73fd7ad795629d88cd8eab68c0460aabb1e1b8b52ef80e3ff7621ac39f832ed + languageName: node + linkType: hard + +"on-finished@npm:2.4.1": + version: 2.4.1 + resolution: "on-finished@npm:2.4.1" + dependencies: + ee-first: 1.1.1 + checksum: d20929a25e7f0bb62f937a425b5edeb4e4cde0540d77ba146ec9357f00b0d497cdb3b9b05b9c8e46222407d1548d08166bff69cc56dfa55ba0e4469228920ff0 + languageName: node + linkType: hard + "once@npm:1.x, once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" @@ -9034,6 +9888,20 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^2.0.0": + version: 2.1.1 + resolution: "p-cancelable@npm:2.1.1" + checksum: 3dba12b4fb4a1e3e34524535c7858fc82381bbbd0f247cc32dedc4018592a3950ce66b106d0880b4ec4c2d8d6576f98ca885dc1d7d0f274d1370be20e9523ddf + languageName: node + linkType: hard + +"p-cancelable@npm:^3.0.0": + version: 3.0.0 + resolution: "p-cancelable@npm:3.0.0" + checksum: 2b5ae34218f9c2cf7a7c18e5d9a726ef9b165ef07e6c959f6738371509e747334b5f78f3bcdeb03d8a12dcb978faf641fd87eb21486ed7d36fb823b8ddef3219 + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -9134,6 +10002,13 @@ __metadata: languageName: node linkType: hard +"parse-headers@npm:^2.0.0": + version: 2.0.5 + resolution: "parse-headers@npm:2.0.5" + checksum: 3e97f01e4c7f960bfbfd0ee489f0bd8d3c72b6c814f1f79b66abec2cca8eaf8e4ecd89deba0b6e61266469aed87350bc932001181c01ff8c29a59e696abe251f + languageName: node + linkType: hard + "parse-json@npm:^5.0.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -9146,6 +10021,13 @@ __metadata: languageName: node linkType: hard +"parseurl@npm:~1.3.3": + version: 1.3.3 + resolution: "parseurl@npm:1.3.3" + checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 + languageName: node + linkType: hard + "path-exists@npm:^3.0.0": version: 3.0.0 resolution: "path-exists@npm:3.0.0" @@ -9198,6 +10080,13 @@ __metadata: languageName: node linkType: hard +"path-to-regexp@npm:0.1.7": + version: 0.1.7 + resolution: "path-to-regexp@npm:0.1.7" + checksum: 69a14ea24db543e8b0f4353305c5eac6907917031340e5a8b37df688e52accd09e3cebfe1660b70d76b6bd89152f52183f28c74813dbf454ba1a01c82a38abce + languageName: node + linkType: hard + "path-type@npm:^4.0.0": version: 4.0.0 resolution: "path-type@npm:4.0.0" @@ -9337,6 +10226,13 @@ __metadata: languageName: node linkType: hard +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 + languageName: node + linkType: hard + "progress@npm:^2.0.0": version: 2.0.3 resolution: "progress@npm:2.0.3" @@ -9363,7 +10259,17 @@ __metadata: languageName: node linkType: hard -"proxy-from-env@npm:^1.1.0": +"proxy-addr@npm:~2.0.7": + version: 2.0.7 + resolution: "proxy-addr@npm:2.0.7" + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + checksum: 29c6990ce9364648255454842f06f8c46fcd124d3e6d7c5066df44662de63cdc0bad032e9bf5a3d653ff72141cc7b6019873d685708ac8210c30458ad99f2b74 + languageName: node + linkType: hard + +"proxy-from-env@npm:^1.1.0": version: 1.1.0 resolution: "proxy-from-env@npm:1.1.0" checksum: ed7fcc2ba0a33404958e34d95d18638249a68c430e30fcb6c478497d72739ba64ce9810a24f53a7d921d0c065e5b78e3822759800698167256b04659366ca4d4 @@ -9394,6 +10300,13 @@ __metadata: languageName: node linkType: hard +"punycode@npm:2.1.0": + version: 2.1.0 + resolution: "punycode@npm:2.1.0" + checksum: d125d8f86cd89303c33bad829388c49ca23197e16ccf8cd398dcbd81b026978f6543f5066c66825b25b1dfea7790a42edbeea82908e103474931789714ab86cd + languageName: node + linkType: hard + "punycode@npm:^2.1.0, punycode@npm:^2.1.1": version: 2.3.0 resolution: "punycode@npm:2.3.0" @@ -9408,6 +10321,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:6.11.0": + version: 6.11.0 + resolution: "qs@npm:6.11.0" + dependencies: + side-channel: ^1.0.4 + checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 + languageName: node + linkType: hard + "qs@npm:^6.4.0, qs@npm:^6.7.0, qs@npm:^6.9.4": version: 6.11.2 resolution: "qs@npm:6.11.2" @@ -9424,6 +10346,17 @@ __metadata: languageName: node linkType: hard +"query-string@npm:^5.0.1": + version: 5.1.1 + resolution: "query-string@npm:5.1.1" + dependencies: + decode-uri-component: ^0.2.0 + object-assign: ^4.1.0 + strict-uri-encode: ^1.0.0 + checksum: 4ac760d9778d413ef5f94f030ed14b1a07a1708dd13fd3bc54f8b9ef7b425942c7577f30de0bf5a7d227ee65a9a0350dfa3a43d1d266880882fb7ce4c434a4dd + languageName: node + linkType: hard + "queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" @@ -9431,6 +10364,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed + languageName: node + linkType: hard + "rambda@npm:^7.1.0": version: 7.5.0 resolution: "rambda@npm:7.5.0" @@ -9454,7 +10394,26 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:^2.4.1": +"range-parser@npm:~1.2.1": + version: 1.2.1 + resolution: "range-parser@npm:1.2.1" + checksum: 0a268d4fea508661cf5743dfe3d5f47ce214fd6b7dec1de0da4d669dd4ef3d2144468ebe4179049eff253d9d27e719c88dae55be64f954e80135a0cada804ec9 + languageName: node + linkType: hard + +"raw-body@npm:2.5.1": + version: 2.5.1 + resolution: "raw-body@npm:2.5.1" + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + checksum: 5362adff1575d691bb3f75998803a0ffed8c64eabeaa06e54b4ada25a0cd1b2ae7f4f5ec46565d1bec337e08b5ac90c76eaa0758de6f72a633f025d754dec29e + languageName: node + linkType: hard + +"raw-body@npm:2.5.2, raw-body@npm:^2.4.1": version: 2.5.2 resolution: "raw-body@npm:2.5.2" dependencies: @@ -9634,7 +10593,7 @@ __metadata: languageName: node linkType: hard -"request@npm:^2.88.0": +"request@npm:^2.79.0, request@npm:^2.88.0": version: 2.88.2 resolution: "request@npm:2.88.2" dependencies: @@ -9683,6 +10642,13 @@ __metadata: languageName: node linkType: hard +"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: f558071fcb2c60b04054c99aebd572a2af97ef64128d59bef7ab73bd50d896a222a056de40ffc545b633d99b304c259ea9d0c06830d5c867c34f0bfa60b8eae0 + languageName: node + linkType: hard + "resolve-from@npm:^3.0.0": version: 3.0.0 resolution: "resolve-from@npm:3.0.0" @@ -9755,6 +10721,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:^2.0.0": + version: 2.0.1 + resolution: "responselike@npm:2.0.1" + dependencies: + lowercase-keys: ^2.0.0 + checksum: b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a + languageName: node + linkType: hard + "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -9893,7 +10868,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:5.2.1, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 @@ -9956,7 +10931,7 @@ __metadata: languageName: node linkType: hard -"scrypt-js@npm:3.0.1, scrypt-js@npm:^3.0.0": +"scrypt-js@npm:3.0.1, scrypt-js@npm:^3.0.0, scrypt-js@npm:^3.0.1": version: 3.0.1 resolution: "scrypt-js@npm:3.0.1" checksum: b7c7d1a68d6ca946f2fbb0778e0c4ec63c65501b54023b2af7d7e9f48fdb6c6580d6f7675cd53bda5944c5ebc057560d5a6365079752546865defb3b79dea454 @@ -10022,6 +10997,27 @@ __metadata: languageName: node linkType: hard +"send@npm:0.18.0": + version: 0.18.0 + resolution: "send@npm:0.18.0" + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + etag: ~1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: ~1.2.1 + statuses: 2.0.1 + checksum: 74fc07ebb58566b87b078ec63e5a3e41ecd987e4272ba67b7467e86c6ad51bc6b0b0154133b6d8b08a2ddda360464f71382f7ef864700f34844a76c8027817a8 + languageName: node + linkType: hard + "serialize-javascript@npm:5.0.1": version: 5.0.1 resolution: "serialize-javascript@npm:5.0.1" @@ -10040,6 +11036,31 @@ __metadata: languageName: node linkType: hard +"serve-static@npm:1.15.0": + version: 1.15.0 + resolution: "serve-static@npm:1.15.0" + dependencies: + encodeurl: ~1.0.2 + escape-html: ~1.0.3 + parseurl: ~1.3.3 + send: 0.18.0 + checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d + languageName: node + linkType: hard + +"servify@npm:^0.1.12": + version: 0.1.12 + resolution: "servify@npm:0.1.12" + dependencies: + body-parser: ^1.16.0 + cors: ^2.8.1 + express: ^4.14.0 + request: ^2.79.0 + xhr: ^2.3.3 + checksum: f90e8f4e31b2981b31e3fa8be0b570b0876136b4cf818ba3bfb65e1bfb3c54cb90a0c30898a7c2974b586800bd26ff525c838a8c170148d9e6674c2170f535d8 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -10160,6 +11181,24 @@ __metadata: languageName: node linkType: hard +"simple-concat@npm:^1.0.0": + version: 1.0.1 + resolution: "simple-concat@npm:1.0.1" + checksum: 4d211042cc3d73a718c21ac6c4e7d7a0363e184be6a5ad25c8a1502e49df6d0a0253979e3d50dbdd3f60ef6c6c58d756b5d66ac1e05cda9cacd2e9fc59e3876a + languageName: node + linkType: hard + +"simple-get@npm:^2.7.0": + version: 2.8.2 + resolution: "simple-get@npm:2.8.2" + dependencies: + decompress-response: ^3.3.0 + once: ^1.3.1 + simple-concat: ^1.0.0 + checksum: 230bd931d3198f21a5a1a566687a5ee1ef651b13b61c7a01b547b2a0c2bf72769b5fe14a3b4dd518e99a18ba1002ba8af3901c0e61e8a0d1e7631a3c2eb1f7a9 + languageName: node + linkType: hard + "slash@npm:^3.0.0": version: 3.0.0 resolution: "slash@npm:3.0.0" @@ -10479,6 +11518,13 @@ __metadata: languageName: node linkType: hard +"strict-uri-encode@npm:^1.0.0": + version: 1.1.0 + resolution: "strict-uri-encode@npm:1.1.0" + checksum: 9466d371f7b36768d43f7803f26137657559e4c8b0161fb9e320efb8edba3ae22f8e99d4b0d91da023b05a13f62ec5412c3f4f764b5788fac11d1fea93720bb3 + languageName: node + linkType: hard + "string-format@npm:^2.0.0": version: 2.0.0 resolution: "string-format@npm:2.0.0" @@ -10728,6 +11774,25 @@ __metadata: languageName: node linkType: hard +"swarm-js@npm:^0.1.40": + version: 0.1.42 + resolution: "swarm-js@npm:0.1.42" + dependencies: + bluebird: ^3.5.0 + buffer: ^5.0.5 + eth-lib: ^0.1.26 + fs-extra: ^4.0.2 + got: ^11.8.5 + mime-types: ^2.1.16 + mkdirp-promise: ^5.0.1 + mock-fs: ^4.1.0 + setimmediate: ^1.0.5 + tar: ^4.0.2 + xhr-request: ^1.0.1 + checksum: bbb54b84232ef113ee106cf8158d1c827fbf84b309799576f61603f63d7653fde7e71df981d07f9e4c41781bbbbd72be77e5a47e6b694d6a83b96a6a20641475 + languageName: node + linkType: hard + "sync-request@npm:^6.0.0": version: 6.1.0 resolution: "sync-request@npm:6.1.0" @@ -10786,6 +11851,21 @@ __metadata: languageName: node linkType: hard +"tar@npm:^4.0.2": + version: 4.4.19 + resolution: "tar@npm:4.4.19" + dependencies: + chownr: ^1.1.4 + fs-minipass: ^1.2.7 + minipass: ^2.9.0 + minizlib: ^1.3.3 + mkdirp: ^0.5.5 + safe-buffer: ^5.2.1 + yallist: ^3.1.1 + checksum: 423c8259b17f8f612cef9c96805d65f90ba9a28e19be582cd9d0fcb217038219f29b7547198e8fd617da5f436376d6a74b99827acd1238d2f49cf62330f9664e + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.15 resolution: "tar@npm:6.1.15" @@ -10833,6 +11913,13 @@ __metadata: languageName: node linkType: hard +"timed-out@npm:^4.0.1": + version: 4.0.1 + resolution: "timed-out@npm:4.0.1" + checksum: 98efc5d6fc0d2a329277bd4d34f65c1bf44d9ca2b14fd267495df92898f522e6f563c5e9e467c418e0836f5ca1f47a84ca3ee1de79b1cc6fe433834b7f02ec54 + languageName: node + linkType: hard + "tmp@npm:0.0.33, tmp@npm:^0.0.33": version: 0.0.33 resolution: "tmp@npm:0.0.33" @@ -11098,6 +12185,30 @@ __metadata: languageName: node linkType: hard +"type-is@npm:~1.6.18": + version: 1.6.18 + resolution: "type-is@npm:1.6.18" + dependencies: + media-typer: 0.3.0 + mime-types: ~2.1.24 + checksum: 2c8e47675d55f8b4e404bcf529abdf5036c537a04c2b20177bcf78c9e3c1da69da3942b1346e6edb09e823228c0ee656ef0e033765ec39a70d496ef601a0c657 + languageName: node + linkType: hard + +"type@npm:^1.0.1": + version: 1.2.0 + resolution: "type@npm:1.2.0" + checksum: dae8c64f82c648b985caf321e9dd6e8b7f4f2e2d4f846fc6fd2c8e9dc7769382d8a52369ddbaccd59aeeceb0df7f52fb339c465be5f2e543e81e810e413451ee + languageName: node + linkType: hard + +"type@npm:^2.7.2": + version: 2.7.2 + resolution: "type@npm:2.7.2" + checksum: 0f42379a8adb67fe529add238a3e3d16699d95b42d01adfe7b9a7c5da297f5c1ba93de39265ba30ffeb37dfd0afb3fb66ae09f58d6515da442219c086219f6f4 + languageName: node + linkType: hard + "typechain@npm:^8.2.0": version: 8.3.1 resolution: "typechain@npm:8.3.1" @@ -11167,6 +12278,15 @@ __metadata: languageName: node linkType: hard +"typedarray-to-buffer@npm:^3.1.5": + version: 3.1.5 + resolution: "typedarray-to-buffer@npm:3.1.5" + dependencies: + is-typedarray: ^1.0.0 + checksum: 99c11aaa8f45189fcfba6b8a4825fd684a321caa9bd7a76a27cf0c7732c174d198b99f449c52c3818107430b5f41c0ccbbfb75cb2ee3ca4a9451710986d61a60 + languageName: node + linkType: hard + "typedarray@npm:^0.0.6": version: 0.0.6 resolution: "typedarray@npm:0.0.6" @@ -11237,6 +12357,13 @@ __metadata: languageName: node linkType: hard +"ultron@npm:~1.1.0": + version: 1.1.1 + resolution: "ultron@npm:1.1.1" + checksum: aa7b5ebb1b6e33287b9d873c6756c4b7aa6d1b23d7162ff25b0c0ce5c3c7e26e2ab141a5dc6e96c10ac4d00a372e682ce298d784f06ffcd520936590b4bc0653 + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -11297,7 +12424,7 @@ __metadata: languageName: node linkType: hard -"unpipe@npm:1.0.0": +"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": version: 1.0.0 resolution: "unpipe@npm:1.0.0" checksum: 4fa18d8d8d977c55cb09715385c203197105e10a6d220087ec819f50cb68870f02942244f1017565484237f1f8c5d3cd413631b1ae104d3096f24fdfde1b4aa2 @@ -11320,6 +12447,13 @@ __metadata: languageName: node linkType: hard +"url-set-query@npm:^1.0.0": + version: 1.0.0 + resolution: "url-set-query@npm:1.0.0" + checksum: 5ad73525e8f3ab55c6bf3ddc70a43912e65ff9ce655d7868fdcefdf79f509cfdddde4b07150797f76186f1a47c0ecd2b7bb3687df8f84757dee4110cf006e12d + languageName: node + linkType: hard + "url-template@npm:^2.0.8": version: 2.0.8 resolution: "url-template@npm:2.0.8" @@ -11327,6 +12461,16 @@ __metadata: languageName: node linkType: hard +"utf-8-validate@npm:^5.0.2": + version: 5.0.10 + resolution: "utf-8-validate@npm:5.0.10" + dependencies: + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 5579350a023c66a2326752b6c8804cc7b39dcd251bb088241da38db994b8d78352e388dcc24ad398ab98385ba3c5ffcadb6b5b14b2637e43f767869055e46ba6 + languageName: node + linkType: hard + "utf8@npm:3.0.0": version: 3.0.0 resolution: "utf8@npm:3.0.0" @@ -11341,6 +12485,26 @@ __metadata: languageName: node linkType: hard +"util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" + dependencies: + inherits: ^2.0.3 + is-arguments: ^1.0.4 + is-generator-function: ^1.0.7 + is-typed-array: ^1.1.3 + which-typed-array: ^1.1.2 + checksum: 705e51f0de5b446f4edec10739752ac25856541e0254ea1e7e45e5b9f9b0cb105bc4bd415736a6210edc68245a7f903bf085ffb08dd7deb8a0e847f60538a38a + languageName: node + linkType: hard + +"utils-merge@npm:1.0.1": + version: 1.0.1 + resolution: "utils-merge@npm:1.0.1" + checksum: c81095493225ecfc28add49c106ca4f09cdf56bc66731aa8dabc2edbbccb1e1bfe2de6a115e5c6a380d3ea166d1636410b62ef216bb07b3feb1cfde1d95d5080 + languageName: node + linkType: hard + "uuid@npm:2.0.1": version: 2.0.1 resolution: "uuid@npm:2.0.1" @@ -11366,6 +12530,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:^9.0.0": + version: 9.0.1 + resolution: "uuid@npm:9.0.1" + bin: + uuid: dist/bin/uuid + checksum: 39931f6da74e307f51c0fb463dc2462807531dc80760a9bff1e35af4316131b4fc3203d16da60ae33f07fdca5b56f3f1dd662da0c99fea9aaeab2004780cc5f4 + languageName: node + linkType: hard + "v8-compile-cache-lib@npm:^3.0.1": version: 3.0.1 resolution: "v8-compile-cache-lib@npm:3.0.1" @@ -11380,6 +12553,20 @@ __metadata: languageName: node linkType: hard +"varint@npm:^5.0.0": + version: 5.0.2 + resolution: "varint@npm:5.0.2" + checksum: e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 + languageName: node + linkType: hard + +"vary@npm:^1, vary@npm:~1.1.2": + version: 1.1.2 + resolution: "vary@npm:1.1.2" + checksum: ae0123222c6df65b437669d63dfa8c36cee20a504101b2fcd97b8bf76f91259c17f9f2b4d70a1e3c6bbcee7f51b28392833adb6b2770b23b01abec84e369660b + languageName: node + linkType: hard + "verror@npm:1.10.0": version: 1.10.0 resolution: "verror@npm:1.10.0" @@ -11432,6 +12619,292 @@ __metadata: languageName: node linkType: hard +"web3-bzz@npm:1.10.2": + version: 1.10.2 + resolution: "web3-bzz@npm:1.10.2" + dependencies: + "@types/node": ^12.12.6 + got: 12.1.0 + swarm-js: ^0.1.40 + checksum: 50bc1bb26dfe0192ed7476bd8390e207c57f508621e848aea001714603bd6f9c1c60eae952fe9a7b3c93352cc02c7bbc2e1e62aabd5b69167ee7a7db74713f64 + languageName: node + linkType: hard + +"web3-core-helpers@npm:1.10.2, web3-core-helpers@npm:^1.10.0": + version: 1.10.2 + resolution: "web3-core-helpers@npm:1.10.2" + dependencies: + web3-eth-iban: 1.10.2 + web3-utils: 1.10.2 + checksum: 0bbc87051bcd9fa9979812348d066f95ed1e6d2425ce5f004649119e5112adaf5352b4a77ab6292706a4a075433b249a6d7eb07a99a9b280c639759a4c201438 + languageName: node + linkType: hard + +"web3-core-method@npm:1.10.2": + version: 1.10.2 + resolution: "web3-core-method@npm:1.10.2" + dependencies: + "@ethersproject/transactions": ^5.6.2 + web3-core-helpers: 1.10.2 + web3-core-promievent: 1.10.2 + web3-core-subscriptions: 1.10.2 + web3-utils: 1.10.2 + checksum: 07af27d66fdfbdefe54478264dc0b24375218a5f7ced52af0de0ee4ad9088c931f048c6d7f1cec531f450d08c7372ad3898401183928a3d062fbba363eeef577 + languageName: node + linkType: hard + +"web3-core-promievent@npm:1.10.2, web3-core-promievent@npm:^1.10.0": + version: 1.10.2 + resolution: "web3-core-promievent@npm:1.10.2" + dependencies: + eventemitter3: 4.0.4 + checksum: 2341ee71e66127821dffeb33fedc65b59550641e5318653e60b9fadb95ccd79c7b3d729c1e4bf4f5c06d907639e6f0c5b22558518b599ec04d3da044d086b67d + languageName: node + linkType: hard + +"web3-core-requestmanager@npm:1.10.2": + version: 1.10.2 + resolution: "web3-core-requestmanager@npm:1.10.2" + dependencies: + util: ^0.12.5 + web3-core-helpers: 1.10.2 + web3-providers-http: 1.10.2 + web3-providers-ipc: 1.10.2 + web3-providers-ws: 1.10.2 + checksum: be086fdd2749b12aa6cc54ea1a6bb933e0f4a59a52662e4ba7b8ebf53abf16d82c1ad6e508255ac94fadc62754c25f8f3917d3cab3a7d733339caf9671c74537 + languageName: node + linkType: hard + +"web3-core-subscriptions@npm:1.10.2": + version: 1.10.2 + resolution: "web3-core-subscriptions@npm:1.10.2" + dependencies: + eventemitter3: 4.0.4 + web3-core-helpers: 1.10.2 + checksum: 07464a4e868fe93fb96be5f89e9415230c428367c4a7caf4bdec69291490e83902533aebc289d3a95d6b60a549caab94a7224644db3fe6a31ac295dae2d51c06 + languageName: node + linkType: hard + +"web3-core@npm:1.10.2": + version: 1.10.2 + resolution: "web3-core@npm:1.10.2" + dependencies: + "@types/bn.js": ^5.1.1 + "@types/node": ^12.12.6 + bignumber.js: ^9.0.0 + web3-core-helpers: 1.10.2 + web3-core-method: 1.10.2 + web3-core-requestmanager: 1.10.2 + web3-utils: 1.10.2 + checksum: c959bb041e96bcf111cf46a8a55ac17eb9a0e2e9cac16bfd3cd47d0e9685bed637f1aad86b19db4836122bd24e3eca32d2add42c1713d1cbd7bc994ae935305f + languageName: node + linkType: hard + +"web3-errors@npm:^1.1.1": + version: 1.1.1 + resolution: "web3-errors@npm:1.1.1" + dependencies: + web3-types: ^1.1.1 + checksum: 1ac088d49e32f0952f4098a618cf1a89b318b052b6b9e58c9d54976e6b43ef5cd7583c2411275c6d6f7b0f3990e9cf6b2c86c1c1023d50b014cbd04fc18ac73e + languageName: node + linkType: hard + +"web3-eth-abi@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth-abi@npm:1.10.2" + dependencies: + "@ethersproject/abi": ^5.6.3 + web3-utils: 1.10.2 + checksum: 0f2ec674c4e804e85e168dea12d5a371f2cc95c55be460e4cd94699620f52a745df349ab4a99defac0bfb05916ca9002c785161b37a8e43ea45007e04cb83d8f + languageName: node + linkType: hard + +"web3-eth-abi@npm:^4.1.1": + version: 4.1.1 + resolution: "web3-eth-abi@npm:4.1.1" + dependencies: + "@ethersproject/abi": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + web3-errors: ^1.1.1 + web3-types: ^1.1.1 + web3-utils: ^4.0.5 + checksum: 99e197707396a1083e46f28d5b6bc3af299ad17d196d00a78ce9b87c6dc4b00ce0b68750c7bc0a7809916f8f1d834b6de5c35dc7e04454b990b30f64beafc82c + languageName: node + linkType: hard + +"web3-eth-accounts@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth-accounts@npm:1.10.2" + dependencies: + "@ethereumjs/common": 2.5.0 + "@ethereumjs/tx": 3.3.2 + "@ethereumjs/util": ^8.1.0 + eth-lib: 0.2.8 + scrypt-js: ^3.0.1 + uuid: ^9.0.0 + web3-core: 1.10.2 + web3-core-helpers: 1.10.2 + web3-core-method: 1.10.2 + web3-utils: 1.10.2 + checksum: 31a71902f8dda004b5de879d52ad6e09ab7386837adae6e158ca30482853eca55745f74c2732bea5dc411c9f83f310b3bcdfb487b7c314fafe55a438e33e6bc5 + languageName: node + linkType: hard + +"web3-eth-contract@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth-contract@npm:1.10.2" + dependencies: + "@types/bn.js": ^5.1.1 + web3-core: 1.10.2 + web3-core-helpers: 1.10.2 + web3-core-method: 1.10.2 + web3-core-promievent: 1.10.2 + web3-core-subscriptions: 1.10.2 + web3-eth-abi: 1.10.2 + web3-utils: 1.10.2 + checksum: e3a75fa8cfb85141822b7ec945b84406c8c4ab176d99cc77333c2414d2e9bc267a7c36bdef0db82ad72547231a38d753383f57aa65d0bc9e88eb9072282e7452 + languageName: node + linkType: hard + +"web3-eth-ens@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth-ens@npm:1.10.2" + dependencies: + content-hash: ^2.5.2 + eth-ens-namehash: 2.0.8 + web3-core: 1.10.2 + web3-core-helpers: 1.10.2 + web3-core-promievent: 1.10.2 + web3-eth-abi: 1.10.2 + web3-eth-contract: 1.10.2 + web3-utils: 1.10.2 + checksum: f077501937ca7eec02251b7a0358727f0d20067fd8100833fcbb06fc9aa6e3aa1fc7999751501a7716d96df707c0c7f1d3cc04607d7ceedc6f197f28771a75b2 + languageName: node + linkType: hard + +"web3-eth-iban@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth-iban@npm:1.10.2" + dependencies: + bn.js: ^5.2.1 + web3-utils: 1.10.2 + checksum: 05abda6ebd9a520aae7ecbbeffcef0b5b7b39c273e366a221e4fadd3f98074e6426f0ba817d92fdd3a4e30cd1219999facd5778b38b0ba48852d4720a5ebbcac + languageName: node + linkType: hard + +"web3-eth-personal@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth-personal@npm:1.10.2" + dependencies: + "@types/node": ^12.12.6 + web3-core: 1.10.2 + web3-core-helpers: 1.10.2 + web3-core-method: 1.10.2 + web3-net: 1.10.2 + web3-utils: 1.10.2 + checksum: f38abadc156e67730005ac136dcba9b6fc36fc9a88a1f2909b069eb7418dcdd106e6db7c19406dd5ba5daa8ab3da7258793e20e0ffab223eaaa6eb044eb0d53e + languageName: node + linkType: hard + +"web3-eth@npm:1.10.2": + version: 1.10.2 + resolution: "web3-eth@npm:1.10.2" + dependencies: + web3-core: 1.10.2 + web3-core-helpers: 1.10.2 + web3-core-method: 1.10.2 + web3-core-subscriptions: 1.10.2 + web3-eth-abi: 1.10.2 + web3-eth-accounts: 1.10.2 + web3-eth-contract: 1.10.2 + web3-eth-ens: 1.10.2 + web3-eth-iban: 1.10.2 + web3-eth-personal: 1.10.2 + web3-net: 1.10.2 + web3-utils: 1.10.2 + checksum: 30c8b9e5427565ca0a0f15a9a0cb09ab1b4a79db99d8313416f40e98d760ce0cd920e42b3c12c3e4af1d9e630bdfda5085f9dedb23dc772a00dbdf2f0dcae465 + languageName: node + linkType: hard + +"web3-net@npm:1.10.2": + version: 1.10.2 + resolution: "web3-net@npm:1.10.2" + dependencies: + web3-core: 1.10.2 + web3-core-method: 1.10.2 + web3-utils: 1.10.2 + checksum: 066ac69db7c5556e6a808f8061df3010501924b05a75202d752217831c991d509ba6437446a16196dc547a8638ff24cac04584a771c8873d694d98af9eed8d1e + languageName: node + linkType: hard + +"web3-providers-http@npm:1.10.2": + version: 1.10.2 + resolution: "web3-providers-http@npm:1.10.2" + dependencies: + abortcontroller-polyfill: ^1.7.5 + cross-fetch: ^4.0.0 + es6-promise: ^4.2.8 + web3-core-helpers: 1.10.2 + checksum: 156f6f939c86552adada0af1371944d5da3c6f921ec1be1bff7849c53e9306fc93abb5549df97fc7f246f51605cac5d89f9f39a2e5e4dd216ee4c40f413ed215 + languageName: node + linkType: hard + +"web3-providers-ipc@npm:1.10.2": + version: 1.10.2 + resolution: "web3-providers-ipc@npm:1.10.2" + dependencies: + oboe: 2.1.5 + web3-core-helpers: 1.10.2 + checksum: fb46c0cfd2e5089b4ce0f88c17efe094eac51305927942eec8649455a6c9f15507095d200cbc245e2afff3a20d2fa3c72745cc5ece87fd0c64879511de12a916 + languageName: node + linkType: hard + +"web3-providers-ws@npm:1.10.2": + version: 1.10.2 + resolution: "web3-providers-ws@npm:1.10.2" + dependencies: + eventemitter3: 4.0.4 + web3-core-helpers: 1.10.2 + websocket: ^1.0.32 + checksum: 978317b4a6575eb7dbd9f6eaf3eead43748d06e712d31626d22c218df909d8cc85e3ac50379915e63ec85be744563ee92638e1709e584a4bcf488e9f71d2e16e + languageName: node + linkType: hard + +"web3-shh@npm:1.10.2": + version: 1.10.2 + resolution: "web3-shh@npm:1.10.2" + dependencies: + web3-core: 1.10.2 + web3-core-method: 1.10.2 + web3-core-subscriptions: 1.10.2 + web3-net: 1.10.2 + checksum: 419feada0f9cdfe4b464c00d6eab7aec14e75e28c17ed4041dd49a48475297dce08b6ea6c8d61bd5c72c385c28308808a79441790466e4d135a19560814da3a0 + languageName: node + linkType: hard + +"web3-types@npm:^1.1.1": + version: 1.1.1 + resolution: "web3-types@npm:1.1.1" + checksum: d477bf427581ed7350129d9c79958321afdbcb0f2ac9a956fc00ff1c534fc021d8fe8c9b8fb787926f7c487a29074bc85bda7eee3098e5abbe91fbb3e11b89f0 + languageName: node + linkType: hard + +"web3-utils@npm:1.10.2": + version: 1.10.2 + resolution: "web3-utils@npm:1.10.2" + dependencies: + "@ethereumjs/util": ^8.1.0 + bn.js: ^5.2.1 + ethereum-bloom-filters: ^1.0.6 + ethereum-cryptography: ^2.1.2 + ethjs-unit: 0.1.6 + number-to-bn: 1.7.0 + randombytes: ^2.1.0 + utf8: 3.0.0 + checksum: a5f8db69603fdd5e984aa6407f47f7a4e0dab83af42e10de25a6d9eeaf2e7d4d18fe665b569e364b2e916233fb73b26cc70ff0d730e7909720118c4790dfb043 + languageName: node + linkType: hard + "web3-utils@npm:^1.3.6": version: 1.10.0 resolution: "web3-utils@npm:1.10.0" @@ -11447,6 +12920,46 @@ __metadata: languageName: node linkType: hard +"web3-utils@npm:^4.0.5": + version: 4.0.5 + resolution: "web3-utils@npm:4.0.5" + dependencies: + ethereum-cryptography: ^2.0.0 + web3-errors: ^1.1.1 + web3-types: ^1.1.1 + web3-validator: ^2.0.1 + checksum: bf4b49b6aaec4444d430e89a84ec4adede828ff363be941c5ba0b13781c8778bbbb4a2f58133173c245b42c8133612e27591ec58558c8507a96f5b0b9c780439 + languageName: node + linkType: hard + +"web3-validator@npm:^2.0.1": + version: 2.0.1 + resolution: "web3-validator@npm:2.0.1" + dependencies: + ethereum-cryptography: ^2.0.0 + util: ^0.12.5 + web3-errors: ^1.1.1 + web3-types: ^1.1.1 + zod: ^3.21.4 + checksum: 4382a0d034751ca04d3f919efd4f1115abecee8541585179158662e46dd10b051c4ee29c885067d7aeff618dec971c4a2075baeb7df63249e3ed5b2d5695b782 + languageName: node + linkType: hard + +"web3@npm:^1.10.2": + version: 1.10.2 + resolution: "web3@npm:1.10.2" + dependencies: + web3-bzz: 1.10.2 + web3-core: 1.10.2 + web3-eth: 1.10.2 + web3-eth-personal: 1.10.2 + web3-net: 1.10.2 + web3-shh: 1.10.2 + web3-utils: 1.10.2 + checksum: 5e4e5da71a2f47b8555ed0ed3072bf2766c73f75fce9dfc40a3764fd57fd0b7bba64fbfa19ae2a8be32ede72ebfc6d112dc3829dce79ca8e5bce3210dedcb55b + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" @@ -11454,6 +12967,20 @@ __metadata: languageName: node linkType: hard +"websocket@npm:^1.0.32": + version: 1.0.34 + resolution: "websocket@npm:1.0.34" + dependencies: + bufferutil: ^4.0.1 + debug: ^2.2.0 + es5-ext: ^0.10.50 + typedarray-to-buffer: ^3.1.5 + utf-8-validate: ^5.0.2 + yaeti: ^0.0.6 + checksum: 8a0ce6d79cc1334bb6ea0d607f0092f3d32700b4dd19e4d5540f2a85f3b50e1f8110da0e4716737056584dde70bbebcb40bbd94bbb437d7468c71abfbfa077d8 + languageName: node + linkType: hard + "whatwg-url@npm:^5.0.0": version: 5.0.0 resolution: "whatwg-url@npm:5.0.0" @@ -11484,7 +13011,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.10, which-typed-array@npm:^1.1.11": +"which-typed-array@npm:^1.1.10, which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.2": version: 1.1.11 resolution: "which-typed-array@npm:1.1.11" dependencies: @@ -11659,6 +13186,17 @@ __metadata: languageName: node linkType: hard +"ws@npm:^3.0.0": + version: 3.3.3 + resolution: "ws@npm:3.3.3" + dependencies: + async-limiter: ~1.0.0 + safe-buffer: ~5.1.0 + ultron: ~1.1.0 + checksum: 20b7bf34bb88715b9e2d435b76088d770e063641e7ee697b07543815fabdb752335261c507a973955e823229d0af8549f39cc669825e5c8404aa0422615c81d9 + languageName: node + linkType: hard + "ws@npm:^7.4.6": version: 7.5.9 resolution: "ws@npm:7.5.9" @@ -11674,6 +13212,42 @@ __metadata: languageName: node linkType: hard +"xhr-request-promise@npm:^0.1.2": + version: 0.1.3 + resolution: "xhr-request-promise@npm:0.1.3" + dependencies: + xhr-request: ^1.1.0 + checksum: 2e127c0de063db0aa704b8d5b805fd34f0f07cac21284a88c81f96727eb71af7d2dfa3ad43e96ed3e851e05a1bd88933048ec183378b48594dfbead1c9043aee + languageName: node + linkType: hard + +"xhr-request@npm:^1.0.1, xhr-request@npm:^1.1.0": + version: 1.1.0 + resolution: "xhr-request@npm:1.1.0" + dependencies: + buffer-to-arraybuffer: ^0.0.5 + object-assign: ^4.1.1 + query-string: ^5.0.1 + simple-get: ^2.7.0 + timed-out: ^4.0.1 + url-set-query: ^1.0.0 + xhr: ^2.0.4 + checksum: fd8186f33e8696dabcd1ad2983f8125366f4cd799c6bf30aa8d942ac481a7e685a5ee8c38eeee6fca715a7084b432a3a326991375557dc4505c928d3f7b0f0a8 + languageName: node + linkType: hard + +"xhr@npm:^2.0.4, xhr@npm:^2.3.3": + version: 2.6.0 + resolution: "xhr@npm:2.6.0" + dependencies: + global: ~4.4.0 + is-function: ^1.0.1 + parse-headers: ^2.0.0 + xtend: ^4.0.0 + checksum: a1db277e37737caf3ed363d2a33ce4b4ea5b5fc190b663a6f70bc252799185b840ccaa166eaeeea4841c9c60b87741f0a24e29cbcf6708dd425986d4df186d2f + languageName: node + linkType: hard + "xmlhttprequest@npm:1.8.0": version: 1.8.0 resolution: "xmlhttprequest@npm:1.8.0" @@ -11681,7 +13255,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0": +"xtend@npm:^4.0.0, xtend@npm:^4.0.1, xtend@npm:^4.0.2, xtend@npm:~4.0.0": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -11702,7 +13276,14 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^3.0.2": +"yaeti@npm:^0.0.6": + version: 0.0.6 + resolution: "yaeti@npm:0.0.6" + checksum: 6db12c152f7c363b80071086a3ebf5032e03332604eeda988872be50d6c8469e1f13316175544fa320f72edad696c2d83843ad0ff370659045c1a68bcecfcfea + languageName: node + linkType: hard + +"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": version: 3.1.1 resolution: "yallist@npm:3.1.1" checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d @@ -11840,3 +13421,10 @@ __metadata: checksum: f702a3437f48a8d42c4bb35b8dd13671a168aadfc4e23ce723d62959220ccb6bf9c529c60331fe5b91afaa622147c6a37490551474fe3e35c06ac476524b5160 languageName: node linkType: hard + +"zod@npm:^3.21.4": + version: 3.22.2 + resolution: "zod@npm:3.22.2" + checksum: 231e2180c8eabb56e88680d80baff5cf6cbe6d64df3c44c50ebe52f73081ecd0229b1c7215b9552537f537a36d9e36afac2737ddd86dc14e3519bdbc777e82b9 + languageName: node + linkType: hard