From c53812dff5a77acccbbe15ea043c4fa935aeac1d Mon Sep 17 00:00:00 2001 From: Aku-mi Date: Mon, 22 Nov 2021 14:29:33 -0500 Subject: [PATCH 1/3] Contracts updated Contracts and truffle tests were updated. Also some configuration was made. --- cattleia-backend/.env.example | 3 +- cattleia-backend/.gitignore | 3 +- cattleia-backend/package.json | 2 + .../src/contracts/CattleiaERC20.sol | 15 + .../src/contracts/CattleiaERC721.sol | 32 + .../src/contracts/CattleiaToken.sol | 71 -- cattleia-backend/src/contracts/Migrations.sol | 2 +- .../src/migrations/2_ERC20_migration.js | 8 + .../src/migrations/2_deploy_cattleia_token.js | 5 - .../src/migrations/3_ERC721_migration.js | 9 + .../src/test/truffle/CattleiaERC20.js | 33 + .../src/test/truffle/CattleiaERC721.js | 42 + .../src/test/truffle/CattleiaToken.js | 15 - cattleia-backend/truffle-config.js | 81 +- cattleia-backend/types.d.ts | 1 + cattleia-backend/yarn.lock | 832 +++++++++++++++++- 16 files changed, 970 insertions(+), 184 deletions(-) create mode 100644 cattleia-backend/src/contracts/CattleiaERC20.sol create mode 100644 cattleia-backend/src/contracts/CattleiaERC721.sol delete mode 100644 cattleia-backend/src/contracts/CattleiaToken.sol create mode 100644 cattleia-backend/src/migrations/2_ERC20_migration.js delete mode 100644 cattleia-backend/src/migrations/2_deploy_cattleia_token.js create mode 100644 cattleia-backend/src/migrations/3_ERC721_migration.js create mode 100644 cattleia-backend/src/test/truffle/CattleiaERC20.js create mode 100644 cattleia-backend/src/test/truffle/CattleiaERC721.js delete mode 100644 cattleia-backend/src/test/truffle/CattleiaToken.js diff --git a/cattleia-backend/.env.example b/cattleia-backend/.env.example index ef4f2f2..d119ad0 100644 --- a/cattleia-backend/.env.example +++ b/cattleia-backend/.env.example @@ -10,4 +10,5 @@ INFURA_RINKEBY= GANACHE= STRIPE_SECRET= STRIPE_PUBLISHABLE= -TEST_PRIVATE_KEY= \ No newline at end of file +TEST_PRIVATE_KEY= +TRUFFLE_KEY= \ No newline at end of file diff --git a/cattleia-backend/.gitignore b/cattleia-backend/.gitignore index acc745d..a9f83ee 100644 --- a/cattleia-backend/.gitignore +++ b/cattleia-backend/.gitignore @@ -1,6 +1,7 @@ node_modules/ coverage/ dist/ +src/abis/**.json junit.xml .env -.secret +.secret \ No newline at end of file diff --git a/cattleia-backend/package.json b/cattleia-backend/package.json index bf7824a..c3beab8 100644 --- a/cattleia-backend/package.json +++ b/cattleia-backend/package.json @@ -47,6 +47,8 @@ "wsreq": "^1.1.2" }, "dependencies": { + "@openzeppelin/contracts": "^4.3.3", + "@truffle/hdwallet-provider": "^1.7.0", "argon2": "^0.28.2", "axios": "^0.24.0", "cookie-parser": "^1.4.5", diff --git a/cattleia-backend/src/contracts/CattleiaERC20.sol b/cattleia-backend/src/contracts/CattleiaERC20.sol new file mode 100644 index 0000000..33e47fd --- /dev/null +++ b/cattleia-backend/src/contracts/CattleiaERC20.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.3; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract CattleiaERC20 is ERC20 { + constructor( + string memory name_, + string memory symbol_, + uint256 supply_ + ) ERC20(name_, symbol_) { + _mint(address(this), supply_); + _transfer(address(this), msg.sender, uint256((supply_ * 10) / 100)); + } +} diff --git a/cattleia-backend/src/contracts/CattleiaERC721.sol b/cattleia-backend/src/contracts/CattleiaERC721.sol new file mode 100644 index 0000000..f2c2698 --- /dev/null +++ b/cattleia-backend/src/contracts/CattleiaERC721.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.3; + +import "@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol"; + +contract CattleiaERC721 is ERC721PresetMinterPauserAutoId { + string private _baseUri; + + event BaseURIChanged(string _old, string _new); + + constructor( + string memory name_, + string memory symbol_, + string memory baseURI_ + ) ERC721PresetMinterPauserAutoId(name_, symbol_, baseURI_) { + _baseUri = baseURI_; + } + + function changeBaseURI(string memory _newURI) public { + require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender)); + emit BaseURIChanged(_baseUri, _newURI); + _baseUri = _newURI; + } + + function baseURI() public view returns (string memory) { + return _baseURI(); + } + + function _baseURI() internal view virtual override returns (string memory) { + return _baseUri; + } +} diff --git a/cattleia-backend/src/contracts/CattleiaToken.sol b/cattleia-backend/src/contracts/CattleiaToken.sol deleted file mode 100644 index 5b77b42..0000000 --- a/cattleia-backend/src/contracts/CattleiaToken.sol +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; - -// import "@openzeppelin/contracts/token/ERC20/"; - -contract CattleiaToken { - string public name; - string public symbol; - uint8 public decimals; - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - mapping(address => mapping(address => uint256)) allowanceMap; - - event Transfer(address indexed _from, address indexed _to, uint256 _value); - event Approval( - address indexed _owner, - address indexed _spender, - uint256 _value - ); - - constructor(string memory _name, string memory _symbol) public { - name = _name; - symbol = _symbol; - decimals = 18; - totalSupply = 1000000 * (uint256(10)**decimals); - balanceOf[msg.sender] = totalSupply; - } - - function transfer(address _to, uint256 _value) - public - returns (bool success) - { - require(balanceOf[msg.sender] >= _value); - balanceOf[msg.sender] -= _value; - balanceOf[_to] += _value; - emit Transfer(msg.sender, _to, _value); - return true; - } - - function allowance(address _from, address _to) - public - view - returns (uint256) - { - return allowanceMap[_from][_to]; - } - - function aprove(address _spender, uint256 _value) - public - returns (bool success) - { - allowanceMap[msg.sender][_spender] = _value; - emit Approval(msg.sender, _spender, _value); - return true; - } - - function transferFrom( - address _from, - address _to, - uint256 _value - ) public returns (bool success) { - require(balanceOf[_from] >= _value); - require(allowanceMap[_from][msg.sender] >= _value); - balanceOf[_from] -= _value; - balanceOf[_to] += _value; - allowanceMap[_from][msg.sender] -= _value; - emit Transfer(_from, _to, _value); - return true; - } -} diff --git a/cattleia-backend/src/contracts/Migrations.sol b/cattleia-backend/src/contracts/Migrations.sol index 026b0dd..b6aec47 100644 --- a/cattleia-backend/src/contracts/Migrations.sol +++ b/cattleia-backend/src/contracts/Migrations.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.5.0; +pragma solidity ^0.8.3; contract Migrations { address public owner = msg.sender; diff --git a/cattleia-backend/src/migrations/2_ERC20_migration.js b/cattleia-backend/src/migrations/2_ERC20_migration.js new file mode 100644 index 0000000..0861fb2 --- /dev/null +++ b/cattleia-backend/src/migrations/2_ERC20_migration.js @@ -0,0 +1,8 @@ +const CattleiaERC20 = artifacts.require("CattleiaERC20"); + +const name = "CattleiaToken"; +const symbol = "CTT"; +const supply = 100000000; +module.exports = function (deployer) { + deployer.deploy(CattleiaERC20, name, symbol, supply); +}; diff --git a/cattleia-backend/src/migrations/2_deploy_cattleia_token.js b/cattleia-backend/src/migrations/2_deploy_cattleia_token.js deleted file mode 100644 index 69b66e9..0000000 --- a/cattleia-backend/src/migrations/2_deploy_cattleia_token.js +++ /dev/null @@ -1,5 +0,0 @@ -const CattleiaToken = artifacts.require("CattleiaToken"); - -module.exports = function (deployer) { - deployer.deploy(CattleiaToken); -}; diff --git a/cattleia-backend/src/migrations/3_ERC721_migration.js b/cattleia-backend/src/migrations/3_ERC721_migration.js new file mode 100644 index 0000000..ed20290 --- /dev/null +++ b/cattleia-backend/src/migrations/3_ERC721_migration.js @@ -0,0 +1,9 @@ +const CattleiaERC721 = artifacts.require("CattleiaERC721"); + +const name = "Cattleia"; +const symbol = "CTN"; +const baseURI = "https://api.aku-mi.xyz/api/v1/nft/metadata/"; + +module.exports = function (deployer) { + deployer.deploy(CattleiaERC721, name, symbol, baseURI); +}; diff --git a/cattleia-backend/src/test/truffle/CattleiaERC20.js b/cattleia-backend/src/test/truffle/CattleiaERC20.js new file mode 100644 index 0000000..ce548bc --- /dev/null +++ b/cattleia-backend/src/test/truffle/CattleiaERC20.js @@ -0,0 +1,33 @@ +const CattleiaERC20 = artifacts.require("CattleiaERC20"); + +contract("CattleiaERC20", (accounts) => { + before(async () => { + this.CattleiaERC20 = await CattleiaERC20.deployed(); + }); + + it("should migrate successfully", async () => { + const address = this.CattleiaERC20.address; + assert.notEqual(address, null); + assert.notEqual(address, undefined); + assert.notEqual(address, 0x0); + assert.notEqual(address, ""); + }); + + it("should have 90% supply in contract and 10% in owner", async () => { + const supply = 100000000; + const balance1 = ( + await this.CattleiaERC20.balanceOf(this.CattleiaERC20.address) + ).toString(); + const balance2 = ( + await this.CattleiaERC20.balanceOf(accounts[0]) + ).toString(); + assert.equal(balance1, (supply * 0.9).toString()); + assert.equal(balance2, (supply * 0.1).toString()); + }); + + it("should be able to transfer tokens", async () => { + await this.CattleiaERC20.transfer(accounts[1], 100); + const balance = await this.CattleiaERC20.balanceOf(accounts[1]); + assert.equal(balance, "100"); + }); +}); diff --git a/cattleia-backend/src/test/truffle/CattleiaERC721.js b/cattleia-backend/src/test/truffle/CattleiaERC721.js new file mode 100644 index 0000000..e98dfcb --- /dev/null +++ b/cattleia-backend/src/test/truffle/CattleiaERC721.js @@ -0,0 +1,42 @@ +const CattleiaERC721 = artifacts.require("CattleiaERC721"); + +contract("CattleiaERC721", (accounts) => { + before(async () => { + this.CattleiaERC721 = await CattleiaERC721.deployed(); + }); + + it("should migrate successfully", async () => { + const address = this.CattleiaERC721.address; + assert.notEqual(address, null); + assert.notEqual(address, undefined); + assert.notEqual(address, 0x0); + assert.notEqual(address, ""); + }); + + it("should be able to mint", async () => { + await this.CattleiaERC721.mint(accounts[0]); + const balance = ( + await this.CattleiaERC721.balanceOf(accounts[0]) + ).toString(); + assert.equal(balance, "1"); + }); + + it("should be able to change the base uri", async () => { + const newUri = "http://some-uri.com/"; + await this.CattleiaERC721.changeBaseURI(newUri); + const uri = await this.CattleiaERC721.baseURI(); + assert.equal(uri, newUri); + }); + + it("should be able to transfer", async () => { + await this.CattleiaERC721.transferFrom(accounts[0], accounts[1], 0); + const balance1 = ( + await this.CattleiaERC721.balanceOf(accounts[0]) + ).toString(); + const balance2 = ( + await this.CattleiaERC721.balanceOf(accounts[1]) + ).toString(); + assert.equal(balance1, "0"); + assert.equal(balance2, "1"); + }); +}); diff --git a/cattleia-backend/src/test/truffle/CattleiaToken.js b/cattleia-backend/src/test/truffle/CattleiaToken.js deleted file mode 100644 index 67d189d..0000000 --- a/cattleia-backend/src/test/truffle/CattleiaToken.js +++ /dev/null @@ -1,15 +0,0 @@ -const CattleiaToken = artifacts.require("CattleiaToken"); - -contract("CattleiaToken", async () => { - before(async () => { - this.cattleiaToken = await CattleiaToken.deployed(); - }); - - it("migration successfull", async () => { - const address = this.cattleiaToken.address; - assert.notEqual(address, null); - assert.notEqual(address, undefined); - assert.notEqual(address, 0x0); - assert.notEqual(address, ""); - }); -}); diff --git a/cattleia-backend/truffle-config.js b/cattleia-backend/truffle-config.js index 68382f7..9ab2fc8 100644 --- a/cattleia-backend/truffle-config.js +++ b/cattleia-backend/truffle-config.js @@ -1,49 +1,13 @@ -/** - * Use this file to configure your truffle project. It's seeded with some - * common settings for different networks and features like migrations, - * compilation and testing. Uncomment the ones you need or modify - * them to suit your project as necessary. - * - * More information about configuration can be found at: - * - * trufflesuite.com/docs/advanced/configuration - * - * To deploy via Infura you'll need a wallet provider (like @truffle/hdwallet-provider) - * to sign your transactions before they're sent to a remote public node. Infura accounts - * are available for free at: infura.io/register. - * - * You'll also need a mnemonic - the twelve word phrase the wallet uses to generate - * public/private key pairs. If you're publishing your code to GitHub make sure you load this - * phrase from a file you've .gitignored so it doesn't accidentally become public. - * - */ - -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// -// const fs = require('fs'); -// const mnemonic = fs.readFileSync(".secret").toString().trim(); +// require("dotenv").config(); +// const HDWalletProvider = require("@truffle/hdwallet-provider"); +// const mnemonic = process.env.TRUFFLE_KEY.trim(); module.exports = { - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ contracts_directory: "./src/contracts", contracts_build_directory: "./src/abis", migrations_directory: "./src/migrations", test_directory: "./src/test/truffle", networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // development: { host: "127.0.0.1", // Localhost (default: none) port: 7545, // Standard Ethereum port (default: none) @@ -84,36 +48,15 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.5.0", // Fetch exact version from solc-bin (default: truffle's version) - // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - // settings: { // See the solidity docs for advice about optimization and evmVersion - // optimizer: { - // enabled: false, - // runs: 200 - // }, - // evmVersion: "byzantium" - // } + version: "0.8.3", // Fetch exact version from solc-bin (default: truffle's version) + settings: { + // See the solidity docs for advice about optimization and evmVersion + optimizer: { + enabled: false, + runs: 200, + }, + // evmVersion: "byzantium" + }, }, }, - - // Truffle DB is currently disabled by default; to enable it, change enabled: - // false to enabled: true. The default storage location can also be - // overridden by specifying the adapter settings, as shown in the commented code below. - // - // NOTE: It is not possible to migrate your contracts to truffle DB and you should - // make a backup of your artifacts to a safe location before enabling this feature. - // - // After you backed up your artifacts you can utilize db by running migrate as follows: - // $ truffle migrate --reset --compile-all - // - // db: { - // enabled: false, - // host: "127.0.0.1", - // adapter: { - // name: "sqlite", - // settings: { - // directory: ".db" - // } - // } - // } }; diff --git a/cattleia-backend/types.d.ts b/cattleia-backend/types.d.ts index 9f8f4ff..e46d28f 100644 --- a/cattleia-backend/types.d.ts +++ b/cattleia-backend/types.d.ts @@ -22,6 +22,7 @@ declare namespace NodeJS { STRIPE_PUBLISHABLE: string; NODE_ENV: "production" | "development" | "test"; TEST_PRIVATE_KEY: string; + TRUFFLE_KEY: string; } } diff --git a/cattleia-backend/yarn.lock b/cattleia-backend/yarn.lock index 9d9d6b8..88d1006 100644 --- a/cattleia-backend/yarn.lock +++ b/cattleia-backend/yarn.lock @@ -9,6 +9,11 @@ dependencies: "@babel/highlight" "^7.16.0" +"@babel/compat-data@^7.13.11": + version "7.16.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e" + integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== + "@babel/compat-data@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.0.tgz#ea269d7f78deb3a7826c39a4048eecda541ebdaa" @@ -44,7 +49,7 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/helper-compilation-targets@^7.16.0": +"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.16.0": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz#5b480cd13f68363df6ec4dc8ac8e2da11363cbf0" integrity sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA== @@ -54,6 +59,20 @@ browserslist "^4.17.5" semver "^6.3.0" +"@babel/helper-define-polyfill-provider@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz#c5b10cf4b324ff840140bb07e05b8564af2ae971" + integrity sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg== + dependencies: + "@babel/helper-compilation-targets" "^7.13.0" + "@babel/helper-module-imports" "^7.12.13" + "@babel/helper-plugin-utils" "^7.13.0" + "@babel/traverse" "^7.13.0" + debug "^4.1.1" + lodash.debounce "^4.0.8" + resolve "^1.14.2" + semver "^6.1.2" + "@babel/helper-function-name@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz#b7dd0797d00bbfee4f07e9c4ea5b0e30c8bb1481" @@ -84,7 +103,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-module-imports@^7.16.0": +"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz#90538e60b672ecf1b448f5f4f5433d37e79a3ec3" integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== @@ -112,7 +131,7 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== @@ -265,6 +284,25 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" +"@babel/plugin-transform-runtime@^7.5.5": + version "7.16.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.4.tgz#f9ba3c7034d429c581e1bd41b4952f3db3c2c7e8" + integrity sha512-pru6+yHANMTukMtEZGC4fs7XPwg35v8sj5CIEmE+gEkFljFiVJxEWxx/7ZDkTK+iZRYo1bFXBtfIN95+K3cJ5A== + dependencies: + "@babel/helper-module-imports" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + babel-plugin-polyfill-corejs2 "^0.3.0" + babel-plugin-polyfill-corejs3 "^0.4.0" + babel-plugin-polyfill-regenerator "^0.3.0" + semver "^6.3.0" + +"@babel/runtime@^7.5.5": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.3.tgz#b86f0db02a04187a3c17caa77de69840165d42d5" + integrity sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.16.0", "@babel/template@^7.3.3": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.0.tgz#d16a35ebf4cd74e202083356fab21dd89363ddd6" @@ -274,7 +312,7 @@ "@babel/parser" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.16.0", "@babel/traverse@^7.16.3", "@babel/traverse@^7.7.2": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.13.0", "@babel/traverse@^7.16.0", "@babel/traverse@^7.16.3", "@babel/traverse@^7.7.2": version "7.16.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.3.tgz#f63e8a938cc1b780f66d9ed3c54f532ca2d14787" integrity sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag== @@ -310,6 +348,14 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.0" +"@ethereumjs/common@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.0.tgz#feb96fb154da41ee2cc2c5df667621a440f36348" + integrity sha512-Cq2qS0FTu6O2VU1sgg+WyU9Ps0M6j/BEMHN+hRaECXCV/r0aI78u4N6p52QW/BDVhwWZpCdrvG8X7NJdzlpNUA== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.3" + "@ethereumjs/tx@^3.2.1": version "3.3.0" resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.0.tgz#14ed1b7fa0f28e1cd61e3ecbdab824205f6a4378" @@ -318,6 +364,14 @@ "@ethereumjs/common" "^2.4.0" ethereumjs-util "^7.1.0" +"@ethereumjs/tx@^3.3.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.4.0.tgz#7eb1947eefa55eb9cf05b3ca116fb7a3dbd0bce7" + integrity sha512-WWUwg1PdjHKZZxPPo274ZuPsJCWV3SqATrEKQP1n2DrVYVP1aZIYpo/mFaA0BDoE0tIQmBeimRCEA0Lgil+yYw== + dependencies: + "@ethereumjs/common" "^2.6.0" + ethereumjs-util "^7.1.3" + "@ethersproject/abi@5.0.7": version "5.0.7" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" @@ -694,6 +748,11 @@ semver "^7.3.4" tar "^6.1.0" +"@openzeppelin/contracts@^4.3.3": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.3.3.tgz#ff6ee919fc2a1abaf72b22814bfb72ed129ec137" + integrity sha512-tDBopO1c98Yk7Cv/PZlHqrvtVjlgK5R4J6jxLwoO7qxK4xqOiZG+zSkIvGFpPZ0ikc3QOED3plgdqjgNTnBc7g== + "@phc/format@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@phc/format/-/format-1.0.0.tgz#b5627003b3216dc4362125b13f48a4daa76680e4" @@ -735,6 +794,98 @@ resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== +"@truffle/hdwallet-provider@^1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@truffle/hdwallet-provider/-/hdwallet-provider-1.7.0.tgz#5cfa8bc67c2a30b3943d3dab78f74c6a191cde02" + integrity sha512-nT7BPJJ2jPCLJc5uZdVtRnRMny5he5d3kO9Hi80ZSqe5xlnK905grBptM/+CwOfbeqHKQirI1btwm6r3wIBM8A== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + "@trufflesuite/web3-provider-engine" "15.0.14" + eth-sig-util "^3.0.1" + ethereum-cryptography "^0.1.3" + ethereum-protocol "^1.0.1" + ethereumjs-util "^6.1.0" + ethereumjs-wallet "^1.0.1" + +"@trufflesuite/eth-json-rpc-filters@^4.1.2-1": + version "4.1.2-1" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz#61ab78c52e98a883e5cf086925b34a30297b1824" + integrity sha512-/MChvC5dw2ck9NU1cZmdovCz2VKbOeIyR4tcxDvA5sT+NaL0rA2/R5U0yI7zsbo1zD+pgqav77rQHTzpUdDNJQ== + dependencies: + "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-0" + await-semaphore "^0.1.3" + eth-query "^2.1.2" + json-rpc-engine "^5.1.3" + lodash.flatmap "^4.5.0" + safe-event-emitter "^1.0.1" + +"@trufflesuite/eth-json-rpc-infura@^4.0.3-0": + version "4.0.3-0" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.3-0.tgz#6d22122937cf60ec9d21a02351c101fdc608c4fe" + integrity sha512-xaUanOmo0YLqRsL0SfXpFienhdw5bpQ1WEXxMTRi57az4lwpZBv4tFUDvcerdwJrxX9wQqNmgUgd1BrR01dumw== + dependencies: + "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-1" + cross-fetch "^2.1.1" + eth-json-rpc-errors "^1.0.1" + json-rpc-engine "^5.1.3" + +"@trufflesuite/eth-json-rpc-middleware@^4.4.2-0", "@trufflesuite/eth-json-rpc-middleware@^4.4.2-1": + version "4.4.2-1" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.2-1.tgz#8c3638ed8a7ed89a1e5e71407de068a65bef0df2" + integrity sha512-iEy9H8ja7/8aYES5HfrepGBKU9n/Y4OabBJEklVd/zIBlhCCBAWBqkIZgXt11nBXO/rYAeKwYuE3puH3ByYnLA== + dependencies: + "@trufflesuite/eth-sig-util" "^1.4.2" + btoa "^1.2.1" + clone "^2.1.1" + eth-json-rpc-errors "^1.0.1" + eth-query "^2.1.2" + ethereumjs-block "^1.6.0" + ethereumjs-tx "^1.3.7" + ethereumjs-util "^5.1.2" + ethereumjs-vm "^2.6.0" + fetch-ponyfill "^4.0.0" + json-rpc-engine "^5.1.3" + json-stable-stringify "^1.0.1" + pify "^3.0.0" + safe-event-emitter "^1.0.1" + +"@trufflesuite/eth-sig-util@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@trufflesuite/eth-sig-util/-/eth-sig-util-1.4.2.tgz#b529e2f38ac08e652116f48981132a26242a4f08" + integrity sha512-+GyfN6b0LNW77hbQlH3ufZ/1eCON7mMrGym6tdYf7xiNw9Vv3jBO72bmmos1EId2NgBvPMhmYYm6DSLQFTmzrA== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^5.1.1" + +"@trufflesuite/web3-provider-engine@15.0.14": + version "15.0.14" + resolved "https://registry.yarnpkg.com/@trufflesuite/web3-provider-engine/-/web3-provider-engine-15.0.14.tgz#8f9696f434585cc0ab2e57c312090c1f138bc471" + integrity sha512-6/LoWvNMxYf0oaYzJldK2a9AdnkAdIeJhHW4nuUBAeO29eK9xezEaEYQ0ph1QRTaICxGxvn+1Azp4u8bQ8NEZw== + dependencies: + "@ethereumjs/tx" "^3.3.0" + "@trufflesuite/eth-json-rpc-filters" "^4.1.2-1" + "@trufflesuite/eth-json-rpc-infura" "^4.0.3-0" + "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-1" + "@trufflesuite/eth-sig-util" "^1.4.2" + async "^2.5.0" + backoff "^2.5.0" + clone "^2.0.0" + cross-fetch "^2.1.0" + eth-block-tracker "^4.4.2" + eth-json-rpc-errors "^2.0.2" + ethereumjs-block "^1.2.2" + ethereumjs-util "^5.1.5" + ethereumjs-vm "^2.3.4" + json-stable-stringify "^1.0.1" + promise-to-callback "^1.0.0" + readable-stream "^2.2.9" + request "^2.85.0" + semaphore "^1.0.3" + ws "^5.1.1" + xhr "^2.2.0" + xtend "^4.0.1" + "@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": version "7.1.16" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.16.tgz#bc12c74b7d65e82d29876b5d0baf5c625ac58702" @@ -768,7 +919,7 @@ dependencies: "@babel/types" "^7.3.0" -"@types/bn.js@^4.11.5": +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== @@ -1047,6 +1198,20 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== +abstract-leveldown@~2.6.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" + integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== + dependencies: + xtend "~4.0.0" + +abstract-leveldown@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" + integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== + dependencies: + xtend "~4.0.0" + accepts@~1.3.4, accepts@~1.3.7: version "1.3.7" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" @@ -1078,6 +1243,11 @@ acorn@^8.2.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.5.0.tgz#4512ccb99b3698c752591e9bb4472e38ad43cee2" integrity sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q== +aes-js@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" + integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -1206,11 +1376,30 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= +async-eventemitter@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== +async@^1.4.2: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= + +async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1221,6 +1410,11 @@ available-typed-arrays@^1.0.4: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== +await-semaphore@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/await-semaphore/-/await-semaphore-0.1.3.tgz#2b88018cc8c28e06167ae1cdff02504f1f9688d3" + integrity sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q== + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -1273,6 +1467,30 @@ babel-plugin-jest-hoist@^27.2.0: "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" +babel-plugin-polyfill-corejs2@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz#407082d0d355ba565af24126fb6cb8e9115251fd" + integrity sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA== + dependencies: + "@babel/compat-data" "^7.13.11" + "@babel/helper-define-polyfill-provider" "^0.3.0" + semver "^6.1.1" + +babel-plugin-polyfill-corejs3@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz#0b571f4cf3d67f911512f5c04842a7b8e8263087" + integrity sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.0" + core-js-compat "^3.18.0" + +babel-plugin-polyfill-regenerator@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz#9ebbcd7186e1a33e21c5e20cae4e7983949533be" + integrity sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.0" + babel-preset-current-node-syntax@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" @@ -1304,6 +1522,13 @@ backo2@~1.0.2: resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947" integrity sha1-MasayLEpNjRj41s+u2n038+6eUc= +backoff@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" + integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= + dependencies: + precond "0.2" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1383,12 +1608,12 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.9: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2: +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== @@ -1499,6 +1724,17 @@ browserslist@^4.17.5: node-releases "^2.0.1" picocolors "^1.0.0" +browserslist@^4.17.6: + version "4.18.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.18.1.tgz#60d3920f25b6860eb917c6c7b185576f4d8b017f" + integrity sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ== + dependencies: + caniuse-lite "^1.0.30001280" + electron-to-chromium "^1.3.896" + escalade "^3.1.1" + node-releases "^2.0.1" + picocolors "^1.0.0" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -1541,6 +1777,11 @@ bson@^4.2.2, bson@^4.5.1: dependencies: buffer "^5.6.0" +btoa@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" + integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== + buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" @@ -1622,6 +1863,11 @@ caniuse-lite@^1.0.30001274: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001279.tgz#eb06818da481ef5096a3b3760f43e5382ed6b0ce" integrity sha512-VfEHpzHEXj6/CxggTwSFoZBBYGQfQv9Cf42KPlO79sWXCD1QNKWKsKzFeWL7QpZHJQYAvocqV6Rty1yJMkqWLQ== +caniuse-lite@^1.0.30001280: + version "1.0.30001282" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz#38c781ee0a90ccfe1fe7fefd00e43f5ffdcb96fd" + integrity sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg== + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -1649,6 +1895,13 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== +checkpoint-store@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" + integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= + dependencies: + functional-red-black-tree "^1.0.1" + chokidar@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" @@ -1724,6 +1977,11 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone@^2.0.0, clone@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1846,6 +2104,14 @@ cookiejar@^2.1.2: resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.3.tgz#fc7a6216e408e74414b90230050842dacda75acc" integrity sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ== +core-js-compat@^3.18.0: + version "3.19.1" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.19.1.tgz#fe598f1a9bf37310d77c3813968e9f7c7bb99476" + integrity sha512-Q/VJ7jAF/y68+aUsQJ/afPOewdsGkDtcMb40J8MbuWKlK3Y+wtHq8bTHKPj2WKWLIqmS5JhHs4CzHtz6pT2W6g== + dependencies: + browserslist "^4.17.6" + semver "7.0.0" + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1910,6 +2176,14 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" +cross-fetch@^2.1.0, cross-fetch@^2.1.1: + version "2.2.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.5.tgz#afaf5729f3b6c78d89c9296115c9f142541a5705" + integrity sha512-xqYAhQb4NhCJSRym03dwxpP1bYXpK3y7UN83Bo2WFi3x1Zmzn0SL/6xGoPr+gpt4WmNrgCCX3HPysvOwFOW36w== + dependencies: + node-fetch "2.6.1" + whatwg-fetch "2.0.4" + cross-spawn@^7.0.1, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -2035,6 +2309,13 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +deferred-leveldown@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" + integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== + dependencies: + abstract-leveldown "~2.6.0" + define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -2163,6 +2444,11 @@ electron-to-chromium@^1.3.886: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.895.tgz#9b0f8f2e32d8283bbb200156fd5d8dfd775f31ed" integrity sha512-9Ww3fB8CWctjqHwkOt7DQbMZMpal2x2reod+/lU4b9axO1XJEDUpPMBxs7YnjLhhqpKXIIB5SRYN/B4K0QpvyQ== +electron-to-chromium@^1.3.896: + version "1.3.904" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.904.tgz#52a353994faeb0f2a9fab3606b4e0614d1af7b58" + integrity sha512-x5uZWXcVNYkTh4JubD7KSC1VMKz0vZwJUqVwY3ihsW0bst1BXDe494Uqbg3Y0fDGVjJqA8vEeGuvO5foyH2+qw== + elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -2191,6 +2477,13 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= +encoding@^0.1.11: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2236,6 +2529,13 @@ engine.io@~6.0.0: engine.io-parser "~5.0.0" ws "~8.2.3" +errno@~0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + es-abstract@^1.18.5: version "1.18.5" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" @@ -2346,6 +2646,18 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +eth-block-tracker@^4.4.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz#766a0a0eb4a52c867a28328e9ae21353812cf626" + integrity sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw== + dependencies: + "@babel/plugin-transform-runtime" "^7.5.5" + "@babel/runtime" "^7.5.5" + eth-query "^2.1.0" + json-rpc-random-id "^1.0.1" + pify "^3.0.0" + safe-event-emitter "^1.0.1" + eth-ens-namehash@2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" @@ -2354,6 +2666,20 @@ eth-ens-namehash@2.0.8: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" +eth-json-rpc-errors@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz#148377ef55155585981c21ff574a8937f9d6991f" + integrity sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg== + dependencies: + fast-safe-stringify "^2.0.6" + +eth-json-rpc-errors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz#c1965de0301fe941c058e928bebaba2e1285e3c4" + integrity sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA== + dependencies: + fast-safe-stringify "^2.0.6" + eth-lib@0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" @@ -2375,6 +2701,31 @@ eth-lib@^0.1.26: ws "^3.0.0" xhr-request-promise "^0.1.2" +eth-query@^2.1.0, eth-query@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" + integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= + dependencies: + json-rpc-random-id "^1.0.0" + xtend "^4.0.1" + +eth-rpc-errors@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz#d7b22653c70dbf9defd4ef490fd08fe70608ca10" + integrity sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg== + dependencies: + fast-safe-stringify "^2.0.6" + +eth-sig-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.1.tgz#8753297c83a3f58346bd13547b59c4b2cd110c96" + integrity sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + ethereum-bloom-filters@^1.0.6: version "1.0.10" resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" @@ -2382,6 +2733,16 @@ ethereum-bloom-filters@^1.0.6: dependencies: js-sha3 "^0.8.0" +ethereum-common@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" + integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== + +ethereum-common@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" + integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= + ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" @@ -2403,6 +2764,97 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" +ethereum-protocol@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz#b7d68142f4105e0ae7b5e178cf42f8d4dc4b93cf" + integrity sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg== + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-account@^2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" + integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== + dependencies: + ethereumjs-util "^5.0.0" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-block@^1.2.2, ethereumjs-block@^1.6.0: + version "1.7.1" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" + integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== + dependencies: + async "^2.0.1" + ethereum-common "0.2.0" + ethereumjs-tx "^1.2.2" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-block@~2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" + integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== + dependencies: + async "^2.0.1" + ethereumjs-common "^1.5.0" + ethereumjs-tx "^2.1.1" + ethereumjs-util "^5.0.0" + merkle-patricia-tree "^2.1.2" + +ethereumjs-common@^1.1.0, ethereumjs-common@^1.5.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" + integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + +ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" + integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== + dependencies: + ethereum-common "^0.0.18" + ethereumjs-util "^5.0.0" + +ethereumjs-tx@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" + integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== + dependencies: + ethereumjs-common "^1.5.0" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^5.0.0, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.5: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" @@ -2415,6 +2867,48 @@ ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0: ethjs-util "0.1.6" rlp "^2.2.4" +ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz#b55d7b64dde3e3e45749e4c41288238edec32d23" + integrity sha512-y+82tEbyASO0K0X1/SRhbJJoAlfcvq8JbrG4a5cjrOks7HS/36efU/0j2flxCPOUM++HFahk33kr/ZxyC4vNuw== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + rlp "^2.2.4" + +ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" + integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== + dependencies: + async "^2.1.2" + async-eventemitter "^0.2.2" + ethereumjs-account "^2.0.3" + ethereumjs-block "~2.2.0" + ethereumjs-common "^1.1.0" + ethereumjs-util "^6.0.0" + fake-merkle-patricia-tree "^1.0.1" + functional-red-black-tree "^1.0.1" + merkle-patricia-tree "^2.3.2" + rustbn.js "~0.2.0" + safe-buffer "^5.1.1" + +ethereumjs-wallet@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz#2c000504b4c71e8f3782dabe1113d192522e99b6" + integrity sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA== + dependencies: + aes-js "^3.1.2" + bs58check "^2.1.2" + ethereum-cryptography "^0.1.3" + ethereumjs-util "^7.1.2" + randombytes "^2.1.0" + scrypt-js "^3.0.1" + utf8 "^3.0.0" + uuid "^8.3.2" + ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -2423,7 +2917,7 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" -ethjs-util@0.1.6: +ethjs-util@0.1.6, ethjs-util@^0.1.3: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== @@ -2436,6 +2930,11 @@ eventemitter3@4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== +events@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" + integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== + evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -2539,6 +3038,13 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= +fake-merkle-patricia-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" + integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= + dependencies: + checkpoint-store "^1.1.0" + fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -2554,7 +3060,7 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= -fast-safe-stringify@^2.0.7: +fast-safe-stringify@^2.0.6, fast-safe-stringify@^2.0.7: version "2.1.1" resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== @@ -2566,6 +3072,13 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +fetch-ponyfill@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" + integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= + dependencies: + node-fetch "~1.7.1" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2680,6 +3193,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3012,6 +3530,13 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + idna-uts46-hx@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" @@ -3024,6 +3549,11 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + import-local@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.3.tgz#4d51c2c495ca9393da259ec66b62e022920211e0" @@ -3045,7 +3575,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3123,6 +3653,11 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= +is-fn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" + integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= + is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" @@ -3214,7 +3749,7 @@ is-retry-allowed@^1.0.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== -is-stream@^1.0.0: +is-stream@^1.0.0, is-stream@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -3254,6 +3789,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -3820,6 +4360,19 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= +json-rpc-engine@^5.1.3: + version "5.4.0" + resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz#75758609d849e1dba1e09021ae473f3ab63161e5" + integrity sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g== + dependencies: + eth-rpc-errors "^3.0.0" + safe-event-emitter "^1.0.1" + +json-rpc-random-id@^1.0.0, json-rpc-random-id@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" + integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -3830,6 +4383,13 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= + dependencies: + jsonify "~0.0.0" + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -3849,6 +4409,11 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= + jsonwebtoken@^8.5.1: version "8.5.1" resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" @@ -3918,6 +4483,56 @@ kleur@^3.0.3: resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== +level-codec@~7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" + integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== + +level-errors@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" + integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== + dependencies: + errno "~0.1.1" + +level-errors@~1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" + integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" + integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= + dependencies: + inherits "^2.0.1" + level-errors "^1.0.3" + readable-stream "^1.0.33" + xtend "^4.0.0" + +level-ws@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" + integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= + dependencies: + readable-stream "~1.0.15" + xtend "~2.1.1" + +levelup@^1.2.1: + version "1.3.9" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" + integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== + dependencies: + deferred-leveldown "~1.2.1" + level-codec "~7.0.0" + level-errors "~1.0.3" + level-iterator-stream "~1.3.0" + prr "~1.0.1" + semver "~5.4.1" + xtend "~4.0.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -3938,6 +4553,16 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= + +lodash.flatmap@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz#ef8cbf408f6e48268663345305c6acc0b778702e" + integrity sha1-74y/QI9uSCaGYzRTBcaswLd4cC4= + lodash.includes@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" @@ -3978,7 +4603,7 @@ lodash.once@^4.0.0: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= -lodash@^4.7.0: +lodash@^4.17.14, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4000,6 +4625,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + make-dir@^3.0.0, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -4033,6 +4663,18 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= +memdown@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" + integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= + dependencies: + abstract-leveldown "~2.7.1" + functional-red-black-tree "^1.0.1" + immediate "^3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.1.1" + memory-pager@^1.0.2: version "1.5.0" resolved "https://registry.yarnpkg.com/memory-pager/-/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5" @@ -4048,6 +4690,20 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" + integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== + dependencies: + async "^1.4.2" + ethereumjs-util "^5.0.0" + level-ws "0.0.0" + levelup "^1.2.1" + memdown "^1.0.0" + readable-stream "^2.0.0" + rlp "^2.0.0" + semaphore ">=1.0.1" + methods@^1.1.2, methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -4381,11 +5037,19 @@ node-addon-api@^3.0.2: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== -node-fetch@^2.6.1: +node-fetch@2.6.1, node-fetch@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@~1.7.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-gyp-build@^4.2.0: version "4.2.3" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" @@ -4478,6 +5142,11 @@ object-keys@^1.0.12, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== +object-keys@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" + integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= + object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" @@ -4678,6 +5347,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + pirates@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" @@ -4692,6 +5366,11 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +precond@0.2: + version "0.2.3" + resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" + integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -4732,6 +5411,14 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= +promise-to-callback@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" + integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= + dependencies: + is-fn "^1.0.0" + set-immediate-shim "^1.0.1" + prompts@^2.0.1: version "2.4.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" @@ -4748,6 +5435,11 @@ proxy-addr@~2.0.5: forwarded "0.2.0" ipaddr.js "1.9.1" +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -4844,7 +5536,17 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -readable-stream@^2.0.6, readable-stream@^2.3.5: +readable-stream@^1.0.33: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.6, readable-stream@^2.2.9, readable-stream@^2.3.5: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -4866,6 +5568,16 @@ readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@~1.0.15: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -4873,12 +5585,17 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + regexp-clone@1.0.0, regexp-clone@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63" integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw== -request@^2.79.0: +request@^2.79.0, request@^2.85.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -4931,7 +5648,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.0.0, resolve@^1.20.0: +resolve@^1.0.0, resolve@^1.14.2, resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== @@ -4968,6 +5685,13 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rlp@^2.0.0, rlp@^2.2.3: + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + rlp@^2.2.4: version "2.2.6" resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" @@ -4975,6 +5699,11 @@ rlp@^2.2.4: dependencies: bn.js "^4.11.1" +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -4985,7 +5714,14 @@ safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +safe-event-emitter@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" + integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== + dependencies: + events "^3.0.0" + +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -5018,6 +5754,16 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" +semaphore@>=1.0.1, semaphore@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" + integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + semver@7.x, semver@^7.3.2, semver@^7.3.4: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" @@ -5030,11 +5776,16 @@ semver@^5.6.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.0.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@~5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" + integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" @@ -5080,6 +5831,11 @@ set-blocking@~2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-immediate-shim@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -5341,6 +6097,11 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -5657,11 +6418,21 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" @@ -5772,7 +6543,7 @@ utf-8-validate@^5.0.2: dependencies: node-gyp-build "^4.2.0" -utf8@3.0.0: +utf8@3.0.0, utf8@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== @@ -6121,6 +6892,11 @@ whatwg-encoding@^1.0.5: dependencies: iconv-lite "0.4.24" +whatwg-fetch@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" + integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== + whatwg-mimetype@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" @@ -6223,6 +6999,13 @@ ws@^3.0.0: safe-buffer "~5.1.0" ultron "~1.1.0" +ws@^5.1.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" + integrity sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA== + dependencies: + async-limiter "~1.0.0" + ws@^7.4.6: version "7.5.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.5.tgz#8b4bc4af518cfabd0473ae4f99144287b33eb881" @@ -6263,7 +7046,7 @@ xhr2-cookies@1.1.0: dependencies: cookiejar "^2.1.1" -xhr@^2.0.4, xhr@^2.3.3: +xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: version "2.6.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== @@ -6293,11 +7076,18 @@ xmlhttprequest-ssl@~2.0.0: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.0.0.tgz#91360c86b914e67f44dce769180027c0da618c67" integrity sha512-QKxVRxiRACQcVuQEYFsI1hhkrMlrXHPegbbd1yn9UHOmRxY+si12nQYzri3vbzt8VdTTRviqcKxcyllFas5z2A== -xtend@^4.0.0: +xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== +xtend@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" + integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= + dependencies: + object-keys "~0.4.0" + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" From f68f80238016e4ea12ecd9d293d0ac29da68aed0 Mon Sep 17 00:00:00 2001 From: Aku-mi Date: Mon, 22 Nov 2021 16:31:34 -0500 Subject: [PATCH 2/3] Truffle Networks Rinkeby netword added and solidity version changed to 0.8.0 --- .../src/contracts/CattleiaERC20.sol | 2 +- .../src/contracts/CattleiaERC721.sol | 2 +- cattleia-backend/src/contracts/Migrations.sol | 2 +- cattleia-backend/truffle-config.js | 44 ++++++------------- 4 files changed, 16 insertions(+), 34 deletions(-) diff --git a/cattleia-backend/src/contracts/CattleiaERC20.sol b/cattleia-backend/src/contracts/CattleiaERC20.sol index 33e47fd..b309a3f 100644 --- a/cattleia-backend/src/contracts/CattleiaERC20.sol +++ b/cattleia-backend/src/contracts/CattleiaERC20.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.3; +pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; diff --git a/cattleia-backend/src/contracts/CattleiaERC721.sol b/cattleia-backend/src/contracts/CattleiaERC721.sol index f2c2698..37c8686 100644 --- a/cattleia-backend/src/contracts/CattleiaERC721.sol +++ b/cattleia-backend/src/contracts/CattleiaERC721.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.3; +pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol"; diff --git a/cattleia-backend/src/contracts/Migrations.sol b/cattleia-backend/src/contracts/Migrations.sol index b6aec47..fcbf5cb 100644 --- a/cattleia-backend/src/contracts/Migrations.sol +++ b/cattleia-backend/src/contracts/Migrations.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.3; +pragma solidity ^0.8.0; contract Migrations { address public owner = msg.sender; diff --git a/cattleia-backend/truffle-config.js b/cattleia-backend/truffle-config.js index 9ab2fc8..63edf8f 100644 --- a/cattleia-backend/truffle-config.js +++ b/cattleia-backend/truffle-config.js @@ -1,6 +1,7 @@ -// require("dotenv").config(); -// const HDWalletProvider = require("@truffle/hdwallet-provider"); -// const mnemonic = process.env.TRUFFLE_KEY.trim(); +require("dotenv").config(); +const HDWalletProvider = require("@truffle/hdwallet-provider"); +const mnemonic = process.env.TRUFFLE_KEY.trim(); +const rinkebyEndpoint = process.env.INFURA_RINKEBY; module.exports = { contracts_directory: "./src/contracts", @@ -13,31 +14,14 @@ module.exports = { port: 7545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) }, - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websocket: true // Enable EventEmitter interface for web3 (default: false) - // }, - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } + rinkeby: { + provider: function () { + return new HDWalletProvider(mnemonic, rinkebyEndpoint); + }, + network_id: 4, + gas: 4500000, + gasPrice: 10000000000, + }, }, // Set default mocha options here, use special reporters etc. @@ -48,14 +32,12 @@ module.exports = { // Configure your compilers compilers: { solc: { - version: "0.8.3", // Fetch exact version from solc-bin (default: truffle's version) + version: "0.8.0", // Fetch exact version from solc-bin (default: truffle's version) settings: { - // See the solidity docs for advice about optimization and evmVersion optimizer: { enabled: false, runs: 200, }, - // evmVersion: "byzantium" }, }, }, From 718fd1fe27b7c5b5d9832e68610221a0ab15179b Mon Sep 17 00:00:00 2001 From: Aku-mi Date: Mon, 22 Nov 2021 22:52:03 -0500 Subject: [PATCH 3/3] NFT Metadata API endpoint for NFTs metadata now available. Also tests were refactored and some corrections were made in base of the result of them. --- .../src/controllers/admin.controller.ts | 65 +++++++++++++-- .../src/controllers/auth.controller.ts | 18 +--- .../src/controllers/index.controller.ts | 5 +- cattleia-backend/src/controllers/index.ts | 1 + .../src/controllers/nft.controller.ts | 26 ++++++ cattleia-backend/src/libs/errors.ts | 10 ++- cattleia-backend/src/libs/interfaces.ts | 15 ++++ cattleia-backend/src/middlewares/index.ts | 13 +++ cattleia-backend/src/models/index.ts | 1 + cattleia-backend/src/models/meta.ts | 40 +++++++++ cattleia-backend/src/routes/admin.routes.ts | 8 +- cattleia-backend/src/routes/index.routes.ts | 5 +- cattleia-backend/src/routes/nft.routes.ts | 8 ++ cattleia-backend/src/test/jest/admin.spec.ts | 82 ++++++++++++++++++- cattleia-backend/src/test/jest/auth.spec.ts | 2 + cattleia-backend/src/test/jest/helper.ts | 53 ++++++++++++ cattleia-backend/src/test/jest/index.spec.ts | 52 +++++++++++- cattleia-backend/src/test/jest/nft.spec.ts | 43 ++++++++++ .../src/test/jest/payment.spec.ts | 4 + cattleia-backend/src/test/jest/web3.spec.ts | 4 +- 20 files changed, 422 insertions(+), 33 deletions(-) create mode 100644 cattleia-backend/src/controllers/nft.controller.ts create mode 100644 cattleia-backend/src/models/meta.ts create mode 100644 cattleia-backend/src/routes/nft.routes.ts create mode 100644 cattleia-backend/src/test/jest/nft.spec.ts diff --git a/cattleia-backend/src/controllers/admin.controller.ts b/cattleia-backend/src/controllers/admin.controller.ts index f2513e5..82bf883 100644 --- a/cattleia-backend/src/controllers/admin.controller.ts +++ b/cattleia-backend/src/controllers/admin.controller.ts @@ -1,12 +1,65 @@ import { Request, Response } from "express"; -import { errors } from "../libs"; +import { errors, Meta } from "../libs"; +import { MetaModel } from "../models"; -export const admin = async (req: Request, res: Response): Promise => { - if (req.role !== "admin") - return res.status(401).json({ +export const admin = (_req: Request, res: Response): Response => { + return res.json({ ok: true, msg: "admin" }); +}; + +export const addMeta = async ( + req: Request, + res: Response +): Promise => { + const { attributes, description, external_url, image, name, nft } = req.body; + + const found = await MetaModel.findOne({ nft }); + + console.log(req.body); + + if (found) { + return res.status(400).json({ + ok: false, + error: errors.metadataAlreadyExist, + }); + } + + const meta = new MetaModel({ + attributes, + description, + external_url, + nft, + image, + name, + }); + + await meta.save(); + + return res.json({ ok: true }); +}; + +export const editMeta = async ( + req: Request, + res: Response +): Promise => { + const { id: nft } = req.params; + const { attributes, description, external_url, image, name } = req.body; + + const found = await MetaModel.findOne({ nft }); + + if (!found) { + return res.status(404).json({ ok: false, - error: errors.noAdmin, + error: errors.metadataDoesntExist, }); + } + + found.name = name; + found.description = description; + found.image = image; + found.external_url = external_url; + found.attributes = attributes; + + await found.save(); - return res.json({ msg: "admin" }); + return res.json({ ok: true }); }; diff --git a/cattleia-backend/src/controllers/auth.controller.ts b/cattleia-backend/src/controllers/auth.controller.ts index 2d15155..12b4a61 100644 --- a/cattleia-backend/src/controllers/auth.controller.ts +++ b/cattleia-backend/src/controllers/auth.controller.ts @@ -129,20 +129,10 @@ export const signUp = async ( _user.rank = _ranks[0]; - let balance = ""; - - let address = ""; - - if (_user.account.payload) { - const balanceWeis = await web3.eth.getBalance( - _user.account.payload.address - ); - balance = web3.utils.fromWei(balanceWeis, "ether"); - address = _user.account.payload.address; - } - await _user.save(); + res.cookie("jid", createRefreshToken(_user), cookieConf); + return res.json({ ok: true, user: { @@ -152,8 +142,8 @@ export const signUp = async ( role: _user.role.name, account: { hasAccount: false, - balance, - address, + balance: "", + address: "", }, rank: { color: rankColor(_user.rank.name), diff --git a/cattleia-backend/src/controllers/index.controller.ts b/cattleia-backend/src/controllers/index.controller.ts index e435a6a..2c341de 100644 --- a/cattleia-backend/src/controllers/index.controller.ts +++ b/cattleia-backend/src/controllers/index.controller.ts @@ -23,6 +23,7 @@ export const refreshToken = async ( res: Response ): Promise => { const token = req.cookies.jid; + if (!token) return res.status(400).json({ ok: false, @@ -39,7 +40,7 @@ export const refreshToken = async ( res.cookie("jid", createRefreshToken(user), cookieConf); return res.json({ ok: true, - accessToken: createAcessToken(user), + token: createAcessToken(user), }); } catch (error) { return res.status(400).json({ @@ -58,7 +59,7 @@ export const revokeRefreshTokens = async ( if (!user) return res.status(400).json({ ok: false, - error: errors.invalidIDorNoWallet(id), + error: errors.invalidID(id), }); user.tokenVersion += 1; diff --git a/cattleia-backend/src/controllers/index.ts b/cattleia-backend/src/controllers/index.ts index b9e5d1f..92703b7 100644 --- a/cattleia-backend/src/controllers/index.ts +++ b/cattleia-backend/src/controllers/index.ts @@ -1,4 +1,5 @@ export * from "./index.controller"; +export * from "./nft.controller"; export * from "./auth.controller"; export * from "./admin.controller"; export * from "./payment.controller"; diff --git a/cattleia-backend/src/controllers/nft.controller.ts b/cattleia-backend/src/controllers/nft.controller.ts new file mode 100644 index 0000000..ae97947 --- /dev/null +++ b/cattleia-backend/src/controllers/nft.controller.ts @@ -0,0 +1,26 @@ +import { Request, Response } from "express"; +import { errors } from "../libs"; +import { MetaModel } from "../models"; + +export const metadata = async ( + req: Request, + res: Response +): Promise => { + const { id } = req.params; + + const meta = await MetaModel.findOne({ nft: id }); + + if (!meta) + return res.status(404).json({ + ok: false, + error: errors.metadataDoesntExist, + }); + + return res.json({ + name: meta.name, + description: meta.description, + image: meta.image, + external_url: meta.external_url, + attributes: meta.attributes, + }); +}; diff --git a/cattleia-backend/src/libs/errors.ts b/cattleia-backend/src/libs/errors.ts index f7a18fa..d740d74 100644 --- a/cattleia-backend/src/libs/errors.ts +++ b/cattleia-backend/src/libs/errors.ts @@ -2,7 +2,7 @@ export interface Stacked { message: string; code: number; } - +/* istanbul ignore next */ export const errorStack = (stack: Stacked[], e: Error) => { if ( e.message.includes("is invalid, the capitalization checksum test failed") @@ -28,6 +28,14 @@ export const errors = { message: "Invalid role.", code: 8020, }, + metadataAlreadyExist: { + message: "The metadata for this NFT already exist.", + code: 7001, + }, + metadataDoesntExist: { + message: "The metadata for this NFT doesn't exist.", + code: 7004, + }, invalidAmount: { message: "Invalid amount, must be greater than 0.5$", code: 6060, diff --git a/cattleia-backend/src/libs/interfaces.ts b/cattleia-backend/src/libs/interfaces.ts index 2038a8b..39e8c52 100644 --- a/cattleia-backend/src/libs/interfaces.ts +++ b/cattleia-backend/src/libs/interfaces.ts @@ -44,3 +44,18 @@ export interface Payload { iat: number; exp: number; } + +interface Traits { + display_types?: string; + trait_type: string; + value: string | number; +} + +export interface Meta extends Document { + nft: string; + name: string; + description: string; + image?: string; + external_url?: string; + attributes?: Traits[]; +} diff --git a/cattleia-backend/src/middlewares/index.ts b/cattleia-backend/src/middlewares/index.ts index 1409038..9194822 100644 --- a/cattleia-backend/src/middlewares/index.ts +++ b/cattleia-backend/src/middlewares/index.ts @@ -37,3 +37,16 @@ export const validateToken = ( } next(); }; + +export const validateAdmin = ( + req: Request, + res: Response, + next: NextFunction +) => { + if (req.role !== "admin") + return res.status(401).json({ + ok: false, + error: errors.noAdmin, + }); + next(); +}; diff --git a/cattleia-backend/src/models/index.ts b/cattleia-backend/src/models/index.ts index fca9a86..ab0a503 100644 --- a/cattleia-backend/src/models/index.ts +++ b/cattleia-backend/src/models/index.ts @@ -1,4 +1,5 @@ export * from "./role"; export * from "./rank"; +export * from "./meta"; export * from "./user"; export * from "./account"; diff --git a/cattleia-backend/src/models/meta.ts b/cattleia-backend/src/models/meta.ts new file mode 100644 index 0000000..77d8dc4 --- /dev/null +++ b/cattleia-backend/src/models/meta.ts @@ -0,0 +1,40 @@ +import { Schema, model } from "mongoose"; +import { Meta } from "../libs"; + +const metaSchema: Schema = new Schema( + { + nft: { + type: String, + required: true, + unique: true, + }, + + name: { + type: String, + required: true, + }, + + description: { + type: String, + required: true, + }, + + image: { + type: String, + }, + + external_url: { + type: String, + }, + + attributes: { + type: [Object], + }, + }, + { + timestamps: false, + versionKey: false, + } +); + +export const MetaModel = model("Meta", metaSchema); diff --git a/cattleia-backend/src/routes/admin.routes.ts b/cattleia-backend/src/routes/admin.routes.ts index 7d24f9f..1a66838 100644 --- a/cattleia-backend/src/routes/admin.routes.ts +++ b/cattleia-backend/src/routes/admin.routes.ts @@ -1,9 +1,11 @@ import { Router } from "express"; -import { validateToken } from "../middlewares"; -import { admin } from "../controllers"; +import { validateAdmin, validateToken } from "../middlewares"; +import { addMeta, admin, editMeta } from "../controllers"; const router = Router(); -router.get("/", validateToken, admin); +router.get("/", validateToken, validateAdmin, admin); +router.post("/add-meta", validateToken, validateAdmin, addMeta); +router.put("/edit-meta/:id", validateToken, validateAdmin, editMeta); export default router; diff --git a/cattleia-backend/src/routes/index.routes.ts b/cattleia-backend/src/routes/index.routes.ts index 7f1da8e..9d31b5b 100644 --- a/cattleia-backend/src/routes/index.routes.ts +++ b/cattleia-backend/src/routes/index.routes.ts @@ -1,10 +1,11 @@ -import { Router } from "express"; +import nft from "./nft.routes"; import auth from "./auth.routes"; import admin from "./admin.routes"; import web3 from "./web3.routes"; import payment from "./payment.routes"; import { index, refreshToken, revokeRefreshTokens } from "../controllers"; import { validateToken } from "../middlewares"; +import { Router } from "express"; const router = Router(); @@ -14,6 +15,8 @@ router.post("/refresh_token", refreshToken); router.post("/revoke_token", validateToken, revokeRefreshTokens); +router.use("/nft", nft); + router.use("/auth", auth); router.use("/admin", admin); diff --git a/cattleia-backend/src/routes/nft.routes.ts b/cattleia-backend/src/routes/nft.routes.ts new file mode 100644 index 0000000..4458803 --- /dev/null +++ b/cattleia-backend/src/routes/nft.routes.ts @@ -0,0 +1,8 @@ +import { Router } from "express"; +import { metadata } from "../controllers"; + +const router = Router(); + +router.get("/metadata/:id", metadata); + +export default router; diff --git a/cattleia-backend/src/test/jest/admin.spec.ts b/cattleia-backend/src/test/jest/admin.spec.ts index d276537..e897058 100644 --- a/cattleia-backend/src/test/jest/admin.spec.ts +++ b/cattleia-backend/src/test/jest/admin.spec.ts @@ -1,16 +1,31 @@ import mongoose from "mongoose"; import { connect } from "../../database"; import { errors } from "../../libs"; -import { api } from "./helper"; +import { MetaModel, UserModel } from "../../models"; +import { + api, + gettWithToken, + meta, + postWithToken, + putWithToken, + user, +} from "./helper"; + +jest.setTimeout(30000); beforeAll(async () => { await connect(); + await MetaModel.deleteMany({}); }); -afterEach(async () => { +afterAll(async () => { await mongoose.connection.close(true); }); +beforeEach(async () => { + await UserModel.deleteMany({}); +}); + describe("GET /api/v1/admin", () => { test("should response with no token error.", async () => { const res = await api.get("/api/v1/admin"); @@ -18,4 +33,67 @@ describe("GET /api/v1/admin", () => { expect(res.body.error.message).toEqual(errors.noAuthToken.message); expect(res.body.error.code).toEqual(errors.noAuthToken.code); }); + + test("should respond with no admin error.", async () => { + const { res } = await gettWithToken("/auth/sign-up", "/admin", user); + expect(res.body.ok).toEqual(false); + expect(res.body.error.message).toEqual(errors.noAdmin.message); + expect(res.body.error.code).toEqual(errors.noAdmin.code); + }); + + test("should respond with admin msg.", async () => { + const { res } = await gettWithToken("/auth/sign-up", "/admin", { + ...user, + role: "admin", + }); + expect(res.body.ok).toEqual(true); + expect(res.body.msg).toEqual("admin"); + }); +}); + +describe("POST /api/v1/admin/add-meta", () => { + test("should be able to add metadata.", async () => { + const { res } = await postWithToken( + "/auth/sign-up", + "/admin/add-meta", + { ...user, role: "admin" }, + meta + ); + expect(res.body.ok).toEqual(true); + }); + test("should respond with metadata exist error.", async () => { + const { res } = await postWithToken( + "/auth/sign-up", + "/admin/add-meta", + { ...user, role: "admin" }, + meta + ); + expect(res.status).toBe(400); + expect(res.body.ok).toEqual(false); + expect(res.body.error.message).toEqual(errors.metadataAlreadyExist.message); + expect(res.body.error.code).toEqual(errors.metadataAlreadyExist.code); + }); +}); + +describe("PUT /api/v1/admin/edit-meta", () => { + test("should respond with no metadata error.", async () => { + const { res } = await putWithToken( + "/auth/sign-up", + "/admin/edit-meta/10", + { ...user, role: "admin" }, + meta + ); + expect(res.body.ok).toEqual(false); + expect(res.body.error.message).toEqual(errors.metadataDoesntExist.message); + expect(res.body.error.code).toEqual(errors.metadataDoesntExist.code); + }); + test("should be able to edit metadata.", async () => { + const { res } = await putWithToken( + "/auth/sign-up", + "/admin/edit-meta/0", + { ...user, role: "admin" }, + meta + ); + expect(res.body.ok).toEqual(true); + }); }); diff --git a/cattleia-backend/src/test/jest/auth.spec.ts b/cattleia-backend/src/test/jest/auth.spec.ts index 7dd01eb..afa27ca 100644 --- a/cattleia-backend/src/test/jest/auth.spec.ts +++ b/cattleia-backend/src/test/jest/auth.spec.ts @@ -4,6 +4,8 @@ import { api, user, user2 } from "./helper"; import { UserModel } from "../../models"; import { connect } from "../../database"; +jest.setTimeout(20000); + beforeAll(async () => { await connect(); }); diff --git a/cattleia-backend/src/test/jest/helper.ts b/cattleia-backend/src/test/jest/helper.ts index 792b672..574e963 100644 --- a/cattleia-backend/src/test/jest/helper.ts +++ b/cattleia-backend/src/test/jest/helper.ts @@ -27,6 +27,25 @@ export const user3 = { password: "1234", }; +export const meta = { + nft: "0", + name: "NFT Name", + description: "Meta description", + image: "http://some-uri/image.png", + external_url: "http://external.com", + attributes: [ + { + trait_type: "level", + value: 5, + }, + { + display_type: "boost_number", + trait_type: "aqua power", + value: 40, + }, + ], +}; + export const invalidToken = async ( url: string, token: boolean @@ -61,3 +80,37 @@ export const postWithToken = async ( res1, }; }; + +export const putWithToken = async ( + url1: string, + url2: string, + data1: object, + data2: object +): Promise<{ res: request.Response; res1: request.Response }> => { + const res1 = await api.post(baseUrl + url1).send(data1); + const res = await api + .put(baseUrl + url2) + .set({ Authorization: `bearer ${res1.body.user.token}` }) + .send(data2); + + return { + res, + res1, + }; +}; + +export const gettWithToken = async ( + url1: string, + url2: string, + data1: object +): Promise<{ res: request.Response; res1: request.Response }> => { + const res1 = await api.post(baseUrl + url1).send(data1); + const res = await api + .get(baseUrl + url2) + .set({ Authorization: `bearer ${res1.body.user.token}` }); + + return { + res, + res1, + }; +}; diff --git a/cattleia-backend/src/test/jest/index.spec.ts b/cattleia-backend/src/test/jest/index.spec.ts index dbf0cad..74f6695 100644 --- a/cattleia-backend/src/test/jest/index.spec.ts +++ b/cattleia-backend/src/test/jest/index.spec.ts @@ -1,13 +1,21 @@ import mongoose from "mongoose"; -import { api, app } from "./helper"; +import { api, app, postWithToken, simplePost, user } from "./helper"; import { wsrequest } from "wsreq"; import { connect } from "../../database"; +import { errors } from "../../libs"; +import { UserModel } from "../../models"; + +jest.setTimeout(20000); beforeAll(async () => { await connect(); }); -afterEach(async () => { +beforeEach(async () => { + await UserModel.deleteMany({}); +}); + +afterAll(async () => { await mongoose.connection.close(true); }); @@ -41,3 +49,43 @@ describe("WS /api/v1/ws", () => { conn.close(); }); }); + +describe("POST /api/v1/refresh_token", () => { + test("should respond with no token error.", async () => { + const res = await simplePost("/refresh_token", {}); + expect(res.body.ok).toEqual(false); + expect(res.body.error.message).toEqual(errors.noAuthToken.message); + expect(res.body.error.code).toEqual(errors.noAuthToken.code); + }); + test("should respond with invalid token error.", async () => { + const res = await api + .post("/api/v1/refresh_token") + .set("Cookie", ["jid=invalid"]) + .send({}); + expect(res.body.ok).toEqual(false); + expect(res.body.error.message).toEqual(errors.invalidAuthToken.message); + expect(res.body.error.code).toEqual(errors.invalidAuthToken.code); + }); + test("should respond with token.", async () => { + const res1 = await api.post("/api/v1/auth/sign-up").send(user); + const jid = (res1.headers["set-cookie"][0] as string).split(";")[0]; + const res = await api + .post("/api/v1/refresh_token") + .set("Cookie", [jid]) + .send({}); + expect(res.body.ok).toEqual(true); + expect(res.body.token).toBeDefined(); + }); +}); + +describe("POST /api/v1/revoke_token", () => { + test("should respond with ok.", async () => { + const { res } = await postWithToken( + "/auth/sign-up", + "/revoke_token", + user, + {} + ); + expect(res.body.ok).toEqual(true); + }); +}); diff --git a/cattleia-backend/src/test/jest/nft.spec.ts b/cattleia-backend/src/test/jest/nft.spec.ts new file mode 100644 index 0000000..b394dd1 --- /dev/null +++ b/cattleia-backend/src/test/jest/nft.spec.ts @@ -0,0 +1,43 @@ +import mongoose from "mongoose"; +import { connect } from "../../database"; +import { errors } from "../../libs"; +import { MetaModel, UserModel } from "../../models"; +import { api, meta, postWithToken, user } from "./helper"; + +jest.setTimeout(20000); + +beforeAll(async () => { + await connect(); +}); + +afterAll(async () => { + await mongoose.connection.close(true); +}); + +beforeEach(async () => { + await UserModel.deleteMany({}); + await MetaModel.deleteMany({}); +}); + +describe("GET /api/v1/nft/metadata", () => { + test("should respond with no metadata error.", async () => { + const res = await api.get("/api/v1/nft/metadata/0"); + expect(res.status).toBe(404); + expect(res.body.ok).toEqual(false); + expect(res.body.error.message).toEqual(errors.metadataDoesntExist.message); + expect(res.body.error.code).toEqual(errors.metadataDoesntExist.code); + }); + test("should respond with metadata.", async () => { + await postWithToken( + "/auth/sign-up", + "/admin/add-meta", + { ...user, role: "admin" }, + meta + ); + const res = await api.get("/api/v1/nft/metadata/0"); + const should = { ...meta }; + //@ts-ignore + delete should.nft; + expect(res.body).toEqual(should); + }); +}); diff --git a/cattleia-backend/src/test/jest/payment.spec.ts b/cattleia-backend/src/test/jest/payment.spec.ts index d52a57f..41e31ff 100644 --- a/cattleia-backend/src/test/jest/payment.spec.ts +++ b/cattleia-backend/src/test/jest/payment.spec.ts @@ -4,6 +4,8 @@ import { connect } from "../../database"; import { errors } from "../../libs"; import { api } from "./helper"; +jest.setTimeout(20000); + beforeAll(async () => { await connect(); }); @@ -12,6 +14,8 @@ afterAll(async () => { await mongoose.connection.close(true); }); +jest.setTimeout(20000); + describe("GET /api/v1/payment/get-publishable-key", () => { test("should respond with a stripe publishableKey.", async () => { const res = await api.get("/api/v1/payment/get-publishable-key"); diff --git a/cattleia-backend/src/test/jest/web3.spec.ts b/cattleia-backend/src/test/jest/web3.spec.ts index 5e2545b..d5e76c4 100644 --- a/cattleia-backend/src/test/jest/web3.spec.ts +++ b/cattleia-backend/src/test/jest/web3.spec.ts @@ -11,6 +11,8 @@ import { simplePost, } from "./helper"; +jest.setTimeout(35000); + beforeAll(async () => { await connect(); await AccountModel.deleteMany({}); @@ -222,8 +224,6 @@ describe("POST /api/v1/web3/get-key", () => { }); }); -jest.setTimeout(30000); - describe("POST /api/v1/web3/transfer-to", () => { test("shouldn't be able to transfer eth (token error).", async () => { const res = await invalidToken("/web3/transfer-to", true);