diff --git a/.github/actions/js-setup/action.yml b/.github/actions/js-setup/action.yml index dd5149f73..22665e0f6 100644 --- a/.github/actions/js-setup/action.yml +++ b/.github/actions/js-setup/action.yml @@ -44,3 +44,6 @@ runs: - name: Install dependencies run: pnpm install -r --frozen-lockfile shell: bash + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@cb603ca0abb544f301eaed59ac0baf579aa6aecf diff --git a/.github/workflows/js-build.yml b/.github/workflows/js-build.yml index 1cca8b45c..e083e91a0 100644 --- a/.github/workflows/js-build.yml +++ b/.github/workflows/js-build.yml @@ -27,7 +27,15 @@ jobs: run: pnpm run typecheck-all - name: Test - run: pnpm run test-all + run: anvil & pnpm run test-all + env: + API_PUBLIC_KEY: ${{ secrets.API_PUBLIC_KEY }} + API_PRIVATE_KEY: ${{ secrets.API_PRIVATE_KEY }} + BASE_URL: "https://api.turnkey.com" + ORGANIZATION_ID: ${{ secrets.ORGANIZATION_ID }} + PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }} + EXPECTED_ETH_ADDRESS: ${{ secrets.EXPECTED_ETH_ADDRESS }} + BANNED_TO_ADDRESS: "0x6F72eDB2429820c2A0606a9FC3cA364f5E9b2375" - name: Prettier run: pnpm run prettier-all:check diff --git a/examples/with-ethers/package.json b/examples/with-ethers/package.json index 66abf87f7..407b49644 100644 --- a/examples/with-ethers/package.json +++ b/examples/with-ethers/package.json @@ -4,6 +4,7 @@ "private": true, "scripts": { "start": "pnpm -w run build-all && tsx src/index.ts", + "start-advanced": "pnpm -w run build-all && tsx src/advanced.ts", "start-legacy-sepolia": "pnpm -w run build-all && tsx src/legacySepolia.ts", "clean": "rimraf ./dist ./.cache", "typecheck": "tsc --noEmit" diff --git a/examples/with-ethers/src/advanced.ts b/examples/with-ethers/src/advanced.ts new file mode 100644 index 000000000..13b383dcd --- /dev/null +++ b/examples/with-ethers/src/advanced.ts @@ -0,0 +1,115 @@ +import * as path from "path"; +import * as dotenv from "dotenv"; + +// Load environment variables from `.env.local` +dotenv.config({ path: path.resolve(process.cwd(), ".env.local") }); + +import { TurnkeySigner } from "@turnkey/ethers"; +import { ethers } from "ethers"; +import { TurnkeyClient } from "@turnkey/http"; +import { ApiKeyStamper } from "@turnkey/api-key-stamper"; +import { createNewEthereumPrivateKey } from "./createNewEthereumPrivateKey"; + +async function main() { + if (!process.env.PRIVATE_KEY_ID) { + // If you don't specify a `PRIVATE_KEY_ID`, we'll create one for you via calling the Turnkey API. + await createNewEthereumPrivateKey(); + return; + } + + const turnkeyClient = new TurnkeyClient( + { + baseUrl: process.env.BASE_URL!, + }, + new ApiKeyStamper({ + apiPublicKey: process.env.API_PUBLIC_KEY!, + apiPrivateKey: process.env.API_PRIVATE_KEY!, + }) + ); + + // Initialize a Turnkey Signer + const turnkeySigner = new TurnkeySigner({ + client: turnkeyClient, + organizationId: process.env.ORGANIZATION_ID!, + privateKeyId: process.env.PRIVATE_KEY_ID!, + }); + + // Bring your own provider (such as Alchemy or Infura: https://docs.ethers.org/v5/api/providers/) + const network = "goerli"; + const provider = new ethers.providers.InfuraProvider(network); + const connectedSigner = turnkeySigner.connect(provider); + const address = await connectedSigner.getAddress(); + + print("Address:", address); + + const baseMessage = "Hello Turnkey"; + + // 1. Sign a raw hex message + const hexMessage = ethers.utils.hexlify( + ethers.utils.toUtf8Bytes(baseMessage) + ); + let signature = await connectedSigner.signMessage(hexMessage); + let recoveredAddress = ethers.utils.verifyMessage(hexMessage, signature); + + print("Turnkey-powered signature - raw hex message:", `${signature}`); + assertEqual(recoveredAddress, address); + + // 2. Sign a raw bytes message + const bytesMessage = ethers.utils.toUtf8Bytes(baseMessage); + signature = await connectedSigner.signMessage(bytesMessage); + recoveredAddress = ethers.utils.verifyMessage(bytesMessage, signature); + + print("Turnkey-powered signature - raw bytes message:", `${signature}`); + assertEqual(recoveredAddress, address); + + // 3. Sign typed data (EIP-712) + const typedData = { + types: { + // Note that we do not need to include `EIP712Domain` as a type here, as Ethers will automatically inject it for us + Person: [ + { name: "name", type: "string" }, + { name: "wallet", type: "address" }, + ], + }, + domain: { + name: "EIP712 Test", + version: "1", + }, + primaryType: "Person", + message: { + name: "Alice", + wallet: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", + }, + }; + + signature = await connectedSigner.signTypedData( + typedData.domain, + typedData.types, + typedData.message + ); + + recoveredAddress = ethers.utils.verifyTypedData( + typedData.domain, + typedData.types, + typedData.message, + signature + ); + + print("Turnkey-powered signature - typed data (EIP-712):", `${signature}`); + assertEqual(recoveredAddress, address); +} + +main().catch((error) => { + console.error(error); + process.exit(1); +}); + +function print(header: string, body: string): void { + console.log(`${header}\n\t${body}\n`); +} + +function assertEqual(left: T, right: T) { + if (left !== right) { + throw new Error(`${JSON.stringify(left)} !== ${JSON.stringify(right)}`); + } +} diff --git a/examples/with-ethers/src/index.ts b/examples/with-ethers/src/index.ts index c2e04f440..fa209eabd 100644 --- a/examples/with-ethers/src/index.ts +++ b/examples/with-ethers/src/index.ts @@ -9,6 +9,7 @@ import { ethers } from "ethers"; import { TurnkeyClient } from "@turnkey/http"; import { ApiKeyStamper } from "@turnkey/api-key-stamper"; import { createNewEthereumPrivateKey } from "./createNewEthereumPrivateKey"; +import { print, assertEqual } from "./util"; import WETH_TOKEN_ABI from "./weth-contract-abi.json"; const WETH_TOKEN_ADDRESS_GOERLI = "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6"; @@ -123,13 +124,3 @@ main().catch((error) => { console.error(error); process.exit(1); }); - -function print(header: string, body: string): void { - console.log(`${header}\n\t${body}\n`); -} - -function assertEqual(left: T, right: T) { - if (left !== right) { - throw new Error(`${JSON.stringify(left)} !== ${JSON.stringify(right)}`); - } -} diff --git a/examples/with-ethers/src/util.ts b/examples/with-ethers/src/util.ts new file mode 100644 index 000000000..de3641621 --- /dev/null +++ b/examples/with-ethers/src/util.ts @@ -0,0 +1,9 @@ +export function print(header: string, body: string): void { + console.log(`${header}\n\t${body}\n`); +} + +export function assertEqual(left: T, right: T) { + if (left !== right) { + throw new Error(`${JSON.stringify(left)} !== ${JSON.stringify(right)}`); + } +} diff --git a/examples/with-viem-and-passkeys/package.json b/examples/with-viem-and-passkeys/package.json index eb32c99b1..dbbd9ae51 100644 --- a/examples/with-viem-and-passkeys/package.json +++ b/examples/with-viem-and-passkeys/package.json @@ -32,6 +32,6 @@ "react-dom": "18.2.0", "react-hook-form": "^7.45.1", "typescript": "5.1.3", - "viem": "^1.5.3" + "viem": "^1.10.0" } } diff --git a/examples/with-viem/package.json b/examples/with-viem/package.json index 949683f74..17e85f322 100644 --- a/examples/with-viem/package.json +++ b/examples/with-viem/package.json @@ -18,6 +18,6 @@ "dotenv": "^16.0.3", "fetch": "^1.1.0", "typescript": "5.1", - "viem": "^1.5.3" + "viem": "^1.10.0" } } diff --git a/examples/with-viem/src/advanced.ts b/examples/with-viem/src/advanced.ts index d49790bd2..e4fbe51c7 100644 --- a/examples/with-viem/src/advanced.ts +++ b/examples/with-viem/src/advanced.ts @@ -45,6 +45,8 @@ async function main() { }); const address = client.account.address; + print("Address:", address); + const baseMessage = "Hello Turnkey"; // 1. Sign a raw hex message @@ -118,7 +120,7 @@ async function main() { signature, }); - print("Turnkey-powered signature - typed data:", `${signature}`); + print("Turnkey-powered signature - typed data (EIP-712):", `${signature}`); assertEqual(address, recoveredAddress); } diff --git a/packages/ethers/.env.example b/packages/ethers/.env.example new file mode 100644 index 000000000..92fa436e9 --- /dev/null +++ b/packages/ethers/.env.example @@ -0,0 +1,8 @@ +# If you want to run unit tests, populate these values and save this file as a new `.env` file +API_PUBLIC_KEY="" +API_PRIVATE_KEY="" +BASE_URL="https://api.turnkey.com" +ORGANIZATION_ID="" +PRIVATE_KEY_ID="" +EXPECTED_ETH_ADDRESS="" +BANNED_TO_ADDRESS="<0x...>" diff --git a/packages/ethers/README.md b/packages/ethers/README.md index 7f2dbe11b..414fd6358 100644 --- a/packages/ethers/README.md +++ b/packages/ethers/README.md @@ -92,6 +92,10 @@ main().catch((error) => { }); ``` +## Testing (Local) + +See `.env.example` to get your local testing environment right. Run `pnpm jest` to run the tests. + ## More examples | Example | Description | diff --git a/packages/ethers/src/__tests__/index-test.ts b/packages/ethers/src/__tests__/index-test.ts index fec6a5b9a..75642a8e0 100644 --- a/packages/ethers/src/__tests__/index-test.ts +++ b/packages/ethers/src/__tests__/index-test.ts @@ -11,7 +11,7 @@ import { ApiKeyStamper } from "@turnkey/api-key-stamper"; // @ts-expect-error const testCase: typeof test = (...argList) => { if (!process.env.BANNED_TO_ADDRESS) { - // For now, this test requires certain environment variables to be injected (from Turnkey's internal environment) + // For now, this test requires certain environment variables to be injected (from Turnkey's internal environment, or a local `.env` file) return test.skip(...argList); } @@ -28,7 +28,7 @@ describe("TurnkeySigner", () => { beforeEach(async () => { if (!process.env.BANNED_TO_ADDRESS) { - // For now, this test requires certain environment variables to be injected (from Turnkey's internal environment) + // For now, this test requires certain environment variables to be injected (from Turnkey's internal environment, or a local `.env` file) return; } diff --git a/packages/viem/.env.example b/packages/viem/.env.example index 5bf3b71f7..92fa436e9 100644 --- a/packages/viem/.env.example +++ b/packages/viem/.env.example @@ -3,4 +3,6 @@ API_PUBLIC_KEY="" API_PRIVATE_KEY="" BASE_URL="https://api.turnkey.com" ORGANIZATION_ID="" -PRIVATE_KEY_ID="" \ No newline at end of file +PRIVATE_KEY_ID="" +EXPECTED_ETH_ADDRESS="" +BANNED_TO_ADDRESS="<0x...>" diff --git a/packages/viem/.gitignore b/packages/viem/.gitignore new file mode 100644 index 000000000..6a4f1e809 --- /dev/null +++ b/packages/viem/.gitignore @@ -0,0 +1 @@ +src/__tests__/contracts/artifacts \ No newline at end of file diff --git a/packages/viem/README.md b/packages/viem/README.md index 3847fe262..2b3aa1abd 100644 --- a/packages/viem/README.md +++ b/packages/viem/README.md @@ -68,6 +68,10 @@ main().catch((error) => { }); ``` +## Testing (Local) + +See `.env.example` to get your local testing environment right. In order to run the tests, run an Anvil node in one shell (via `pnpm anvil`), and run `pnpm jest` in another. + ## See also - [`@turnkey/example-with-viem`](https://github.com/tkhq/sdk/tree/main/examples/with-viem): example using this package to create, sign, and broadcast a transaction on Sepolia (Ethereum testnet) diff --git a/packages/viem/hardhat.config.js b/packages/viem/hardhat.config.js new file mode 100644 index 000000000..0a38cb91c --- /dev/null +++ b/packages/viem/hardhat.config.js @@ -0,0 +1,14 @@ +// require("@nomiclabs/hardhat-ethers"); +// require("hardhat-jest-plugin"); + +/** @type import('hardhat/config').HardhatUserConfig */ +const config = { + solidity: "0.8.17", + paths: { + sources: "./src/__tests__/contracts/source", + artifacts: "./src/__tests__/contracts/artifacts", + cache: "./.cache", + }, +}; + +module.exports = config; diff --git a/packages/viem/package.json b/packages/viem/package.json index 615bc1dd6..829b8d3e5 100644 --- a/packages/viem/package.json +++ b/packages/viem/package.json @@ -38,20 +38,23 @@ "build": "tsc", "clean": "rimraf ./dist ./.cache", "test": "jest", - "typecheck": "tsc -p tsconfig.typecheck.json" + "anvil": "anvil", + "typecheck": "tsc -p tsconfig.typecheck.json", + "compile:contracts": "hardhat compile" }, "peerDependencies": { - "viem": "^1.5.0" + "viem": "^1.10.0" }, "dependencies": { - "@turnkey/http": "workspace:*", "@turnkey/api-key-stamper": "workspace:*", + "@turnkey/http": "workspace:*", + "cross-fetch": "^4.0.0", "typescript": "5.1" }, "devDependencies": { "@types/jest": "^29.5.3", "jest": "^29.3.1", - "viem": "^1.5.3" + "viem": "^1.10.0" }, "engines": { "node": ">=18.0.0" diff --git a/packages/viem/src/__tests__/Test721.json b/packages/viem/src/__tests__/Test721.json new file mode 100644 index 000000000..c9767658b --- /dev/null +++ b/packages/viem/src/__tests__/Test721.json @@ -0,0 +1,411 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Test721", + "sourceName": "src/__tests__/contracts/source/Test721.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "safeMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600781526020017f54657374373231000000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f544553540000000000000000000000000000000000000000000000000000000081525081600090816200008f919062000412565b508060019081620000a1919062000412565b505050620000c4620000b8620000ca60201b60201c565b620000d260201b60201c565b620004f9565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200021a57607f821691505b60208210810362000230576200022f620001d2565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200029a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200025b565b620002a686836200025b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002f3620002ed620002e784620002be565b620002c8565b620002be565b9050919050565b6000819050919050565b6200030f83620002d2565b620003276200031e82620002fa565b84845462000268565b825550505050565b600090565b6200033e6200032f565b6200034b81848462000304565b505050565b5b8181101562000373576200036760008262000334565b60018101905062000351565b5050565b601f821115620003c2576200038c8162000236565b62000397846200024b565b81016020851015620003a7578190505b620003bf620003b6856200024b565b83018262000350565b50505b505050565b600082821c905092915050565b6000620003e760001984600802620003c7565b1980831691505092915050565b6000620004028383620003d4565b9150826002028217905092915050565b6200041d8262000198565b67ffffffffffffffff811115620004395762000438620001a3565b5b62000445825462000201565b6200045282828562000377565b600060209050601f8311600181146200048a576000841562000475578287015190505b620004818582620003f4565b865550620004f1565b601f1984166200049a8662000236565b60005b82811015620004c4578489015182556001820191506020850194506020810190506200049d565b86831015620004e45784890151620004e0601f891682620003d4565b8355505b6001600288020188555050505b505050505050565b61287f80620005096000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a2578063a22cb46511610071578063a22cb465146102a4578063b88d4fde146102c0578063c87b56dd146102dc578063e985e9c51461030c578063f2fde38b1461033c5761010b565b806370a082311461022e578063715018a61461025e5780638da5cb5b1461026857806395d89b41146102865761010b565b806323b872dd116100de57806323b872dd146101aa57806340d097c3146101c657806342842e0e146101e25780636352211e146101fe5761010b565b806301ffc9a71461011057806306fdde0314610140578063081812fc1461015e578063095ea7b31461018e575b600080fd5b61012a60048036038101906101259190611a7d565b610358565b6040516101379190611ac5565b60405180910390f35b61014861043a565b6040516101559190611b70565b60405180910390f35b61017860048036038101906101739190611bc8565b6104cc565b6040516101859190611c36565b60405180910390f35b6101a860048036038101906101a39190611c7d565b610512565b005b6101c460048036038101906101bf9190611cbd565b610629565b005b6101e060048036038101906101db9190611d10565b610689565b005b6101fc60048036038101906101f79190611cbd565b6106b7565b005b61021860048036038101906102139190611bc8565b6106d7565b6040516102259190611c36565b60405180910390f35b61024860048036038101906102439190611d10565b61075d565b6040516102559190611d4c565b60405180910390f35b610266610814565b005b610270610828565b60405161027d9190611c36565b60405180910390f35b61028e610852565b60405161029b9190611b70565b60405180910390f35b6102be60048036038101906102b99190611d93565b6108e4565b005b6102da60048036038101906102d59190611f08565b6108fa565b005b6102f660048036038101906102f19190611bc8565b61095c565b6040516103039190611b70565b60405180910390f35b61032660048036038101906103219190611f8b565b6109c4565b6040516103339190611ac5565b60405180910390f35b61035660048036038101906103519190611d10565b610a58565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061042357507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610433575061043282610adb565b5b9050919050565b60606000805461044990611ffa565b80601f016020809104026020016040519081016040528092919081815260200182805461047590611ffa565b80156104c25780601f10610497576101008083540402835291602001916104c2565b820191906000526020600020905b8154815290600101906020018083116104a557829003601f168201915b5050505050905090565b60006104d782610b45565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061051d826106d7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361058d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105849061209d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166105ac610b90565b73ffffffffffffffffffffffffffffffffffffffff1614806105db57506105da816105d5610b90565b6109c4565b5b61061a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106119061212f565b60405180910390fd5b6106248383610b98565b505050565b61063a610634610b90565b82610c51565b610679576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610670906121c1565b60405180910390fd5b610684838383610ce6565b505050565b610691610fdf565b600061069d600761105d565b90506106a9600761106b565b6106b38282611081565b5050565b6106d2838383604051806020016040528060008152506108fa565b505050565b6000806106e38361109f565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074b9061222d565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c4906122bf565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61081c610fdf565b61082660006110dc565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461086190611ffa565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90611ffa565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b5050505050905090565b6108f66108ef610b90565b83836111a2565b5050565b61090b610905610b90565b83610c51565b61094a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610941906121c1565b60405180910390fd5b6109568484848461130e565b50505050565b606061096782610b45565b600061097161136a565b9050600081511161099157604051806020016040528060008152506109bc565b8061099b84611381565b6040516020016109ac92919061231b565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610a60610fdf565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610acf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac6906123b1565b60405180910390fd5b610ad8816110dc565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610b4e8161144f565b610b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b849061222d565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16610c0b836106d7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610c5d836106d7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610c9f5750610c9e81856109c4565b5b80610cdd57508373ffffffffffffffffffffffffffffffffffffffff16610cc5846104cc565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16610d06826106d7565b73ffffffffffffffffffffffffffffffffffffffff1614610d5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5390612443565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610dcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc2906124d5565b60405180910390fd5b610dd88383836001611490565b8273ffffffffffffffffffffffffffffffffffffffff16610df8826106d7565b73ffffffffffffffffffffffffffffffffffffffff1614610e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4590612443565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610fda8383836001611496565b505050565b610fe7610b90565b73ffffffffffffffffffffffffffffffffffffffff16611005610828565b73ffffffffffffffffffffffffffffffffffffffff161461105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105290612541565b60405180910390fd5b565b600081600001549050919050565b6001816000016000828254019250508190555050565b61109b82826040518060200160405280600081525061149c565b5050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611210576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611207906125ad565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113019190611ac5565b60405180910390a3505050565b611319848484610ce6565b611325848484846114f7565b611364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135b9061263f565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b6060600060016113908461167e565b01905060008167ffffffffffffffff8111156113af576113ae611ddd565b5b6040519080825280601f01601f1916602001820160405280156113e15781602001600182028036833780820191505090505b509050600082602001820190505b600115611444578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816114385761143761265f565b5b049450600085036113ef575b819350505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166114718361109f565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b50505050565b50505050565b6114a683836117d1565b6114b360008484846114f7565b6114f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e99061263f565b60405180910390fd5b505050565b60006115188473ffffffffffffffffffffffffffffffffffffffff166119ee565b15611671578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611541610b90565b8786866040518563ffffffff1660e01b815260040161156394939291906126e3565b6020604051808303816000875af192505050801561159f57506040513d601f19601f8201168201806040525081019061159c9190612744565b60015b611621573d80600081146115cf576040519150601f19603f3d011682016040523d82523d6000602084013e6115d4565b606091505b506000815103611619576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116109061263f565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611676565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106116dc577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816116d2576116d161265f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611719576d04ee2d6d415b85acef8100000000838161170f5761170e61265f565b5b0492506020810190505b662386f26fc10000831061174857662386f26fc10000838161173e5761173d61265f565b5b0492506010810190505b6305f5e1008310611771576305f5e10083816117675761176661265f565b5b0492506008810190505b612710831061179657612710838161178c5761178b61265f565b5b0492506004810190505b606483106117b957606483816117af576117ae61265f565b5b0492506002810190505b600a83106117c8576001810190505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611840576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611837906127bd565b60405180910390fd5b6118498161144f565b15611889576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188090612829565b60405180910390fd5b611897600083836001611490565b6118a08161144f565b156118e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d790612829565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46119ea600083836001611496565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611a5a81611a25565b8114611a6557600080fd5b50565b600081359050611a7781611a51565b92915050565b600060208284031215611a9357611a92611a1b565b5b6000611aa184828501611a68565b91505092915050565b60008115159050919050565b611abf81611aaa565b82525050565b6000602082019050611ada6000830184611ab6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611b1a578082015181840152602081019050611aff565b60008484015250505050565b6000601f19601f8301169050919050565b6000611b4282611ae0565b611b4c8185611aeb565b9350611b5c818560208601611afc565b611b6581611b26565b840191505092915050565b60006020820190508181036000830152611b8a8184611b37565b905092915050565b6000819050919050565b611ba581611b92565b8114611bb057600080fd5b50565b600081359050611bc281611b9c565b92915050565b600060208284031215611bde57611bdd611a1b565b5b6000611bec84828501611bb3565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611c2082611bf5565b9050919050565b611c3081611c15565b82525050565b6000602082019050611c4b6000830184611c27565b92915050565b611c5a81611c15565b8114611c6557600080fd5b50565b600081359050611c7781611c51565b92915050565b60008060408385031215611c9457611c93611a1b565b5b6000611ca285828601611c68565b9250506020611cb385828601611bb3565b9150509250929050565b600080600060608486031215611cd657611cd5611a1b565b5b6000611ce486828701611c68565b9350506020611cf586828701611c68565b9250506040611d0686828701611bb3565b9150509250925092565b600060208284031215611d2657611d25611a1b565b5b6000611d3484828501611c68565b91505092915050565b611d4681611b92565b82525050565b6000602082019050611d616000830184611d3d565b92915050565b611d7081611aaa565b8114611d7b57600080fd5b50565b600081359050611d8d81611d67565b92915050565b60008060408385031215611daa57611da9611a1b565b5b6000611db885828601611c68565b9250506020611dc985828601611d7e565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611e1582611b26565b810181811067ffffffffffffffff82111715611e3457611e33611ddd565b5b80604052505050565b6000611e47611a11565b9050611e538282611e0c565b919050565b600067ffffffffffffffff821115611e7357611e72611ddd565b5b611e7c82611b26565b9050602081019050919050565b82818337600083830152505050565b6000611eab611ea684611e58565b611e3d565b905082815260208101848484011115611ec757611ec6611dd8565b5b611ed2848285611e89565b509392505050565b600082601f830112611eef57611eee611dd3565b5b8135611eff848260208601611e98565b91505092915050565b60008060008060808587031215611f2257611f21611a1b565b5b6000611f3087828801611c68565b9450506020611f4187828801611c68565b9350506040611f5287828801611bb3565b925050606085013567ffffffffffffffff811115611f7357611f72611a20565b5b611f7f87828801611eda565b91505092959194509250565b60008060408385031215611fa257611fa1611a1b565b5b6000611fb085828601611c68565b9250506020611fc185828601611c68565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061201257607f821691505b60208210810361202557612024611fcb565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000612087602183611aeb565b91506120928261202b565b604082019050919050565b600060208201905081810360008301526120b68161207a565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000612119603d83611aeb565b9150612124826120bd565b604082019050919050565b600060208201905081810360008301526121488161210c565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b60006121ab602d83611aeb565b91506121b68261214f565b604082019050919050565b600060208201905081810360008301526121da8161219e565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000612217601883611aeb565b9150612222826121e1565b602082019050919050565b600060208201905081810360008301526122468161220a565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006122a9602983611aeb565b91506122b48261224d565b604082019050919050565b600060208201905081810360008301526122d88161229c565b9050919050565b600081905092915050565b60006122f582611ae0565b6122ff81856122df565b935061230f818560208601611afc565b80840191505092915050565b600061232782856122ea565b915061233382846122ea565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061239b602683611aeb565b91506123a68261233f565b604082019050919050565b600060208201905081810360008301526123ca8161238e565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061242d602583611aeb565b9150612438826123d1565b604082019050919050565b6000602082019050818103600083015261245c81612420565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006124bf602483611aeb565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061252b602083611aeb565b9150612536826124f5565b602082019050919050565b6000602082019050818103600083015261255a8161251e565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000612597601983611aeb565b91506125a282612561565b602082019050919050565b600060208201905081810360008301526125c68161258a565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000612629603283611aeb565b9150612634826125cd565b604082019050919050565b600060208201905081810360008301526126588161261c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600081519050919050565b600082825260208201905092915050565b60006126b58261268e565b6126bf8185612699565b93506126cf818560208601611afc565b6126d881611b26565b840191505092915050565b60006080820190506126f86000830187611c27565b6127056020830186611c27565b6127126040830185611d3d565b818103606083015261272481846126aa565b905095945050505050565b60008151905061273e81611a51565b92915050565b60006020828403121561275a57612759611a1b565b5b60006127688482850161272f565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006127a7602083611aeb565b91506127b282612771565b602082019050919050565b600060208201905081810360008301526127d68161279a565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000612813601c83611aeb565b915061281e826127dd565b602082019050919050565b6000602082019050818103600083015261284281612806565b905091905056fea2646970667358221220763ad1b2c1633eb458e358cc058bc9d00dbedc4ed1579cfcf8723c69b7b829eb64736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a2578063a22cb46511610071578063a22cb465146102a4578063b88d4fde146102c0578063c87b56dd146102dc578063e985e9c51461030c578063f2fde38b1461033c5761010b565b806370a082311461022e578063715018a61461025e5780638da5cb5b1461026857806395d89b41146102865761010b565b806323b872dd116100de57806323b872dd146101aa57806340d097c3146101c657806342842e0e146101e25780636352211e146101fe5761010b565b806301ffc9a71461011057806306fdde0314610140578063081812fc1461015e578063095ea7b31461018e575b600080fd5b61012a60048036038101906101259190611a7d565b610358565b6040516101379190611ac5565b60405180910390f35b61014861043a565b6040516101559190611b70565b60405180910390f35b61017860048036038101906101739190611bc8565b6104cc565b6040516101859190611c36565b60405180910390f35b6101a860048036038101906101a39190611c7d565b610512565b005b6101c460048036038101906101bf9190611cbd565b610629565b005b6101e060048036038101906101db9190611d10565b610689565b005b6101fc60048036038101906101f79190611cbd565b6106b7565b005b61021860048036038101906102139190611bc8565b6106d7565b6040516102259190611c36565b60405180910390f35b61024860048036038101906102439190611d10565b61075d565b6040516102559190611d4c565b60405180910390f35b610266610814565b005b610270610828565b60405161027d9190611c36565b60405180910390f35b61028e610852565b60405161029b9190611b70565b60405180910390f35b6102be60048036038101906102b99190611d93565b6108e4565b005b6102da60048036038101906102d59190611f08565b6108fa565b005b6102f660048036038101906102f19190611bc8565b61095c565b6040516103039190611b70565b60405180910390f35b61032660048036038101906103219190611f8b565b6109c4565b6040516103339190611ac5565b60405180910390f35b61035660048036038101906103519190611d10565b610a58565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061042357507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610433575061043282610adb565b5b9050919050565b60606000805461044990611ffa565b80601f016020809104026020016040519081016040528092919081815260200182805461047590611ffa565b80156104c25780601f10610497576101008083540402835291602001916104c2565b820191906000526020600020905b8154815290600101906020018083116104a557829003601f168201915b5050505050905090565b60006104d782610b45565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061051d826106d7565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361058d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105849061209d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166105ac610b90565b73ffffffffffffffffffffffffffffffffffffffff1614806105db57506105da816105d5610b90565b6109c4565b5b61061a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106119061212f565b60405180910390fd5b6106248383610b98565b505050565b61063a610634610b90565b82610c51565b610679576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610670906121c1565b60405180910390fd5b610684838383610ce6565b505050565b610691610fdf565b600061069d600761105d565b90506106a9600761106b565b6106b38282611081565b5050565b6106d2838383604051806020016040528060008152506108fa565b505050565b6000806106e38361109f565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074b9061222d565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c4906122bf565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61081c610fdf565b61082660006110dc565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461086190611ffa565b80601f016020809104026020016040519081016040528092919081815260200182805461088d90611ffa565b80156108da5780601f106108af576101008083540402835291602001916108da565b820191906000526020600020905b8154815290600101906020018083116108bd57829003601f168201915b5050505050905090565b6108f66108ef610b90565b83836111a2565b5050565b61090b610905610b90565b83610c51565b61094a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610941906121c1565b60405180910390fd5b6109568484848461130e565b50505050565b606061096782610b45565b600061097161136a565b9050600081511161099157604051806020016040528060008152506109bc565b8061099b84611381565b6040516020016109ac92919061231b565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610a60610fdf565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610acf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ac6906123b1565b60405180910390fd5b610ad8816110dc565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610b4e8161144f565b610b8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b849061222d565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16610c0b836106d7565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610c5d836106d7565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610c9f5750610c9e81856109c4565b5b80610cdd57508373ffffffffffffffffffffffffffffffffffffffff16610cc5846104cc565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16610d06826106d7565b73ffffffffffffffffffffffffffffffffffffffff1614610d5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5390612443565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610dcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc2906124d5565b60405180910390fd5b610dd88383836001611490565b8273ffffffffffffffffffffffffffffffffffffffff16610df8826106d7565b73ffffffffffffffffffffffffffffffffffffffff1614610e4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4590612443565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610fda8383836001611496565b505050565b610fe7610b90565b73ffffffffffffffffffffffffffffffffffffffff16611005610828565b73ffffffffffffffffffffffffffffffffffffffff161461105b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105290612541565b60405180910390fd5b565b600081600001549050919050565b6001816000016000828254019250508190555050565b61109b82826040518060200160405280600081525061149c565b5050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611210576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611207906125ad565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516113019190611ac5565b60405180910390a3505050565b611319848484610ce6565b611325848484846114f7565b611364576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135b9061263f565b60405180910390fd5b50505050565b606060405180602001604052806000815250905090565b6060600060016113908461167e565b01905060008167ffffffffffffffff8111156113af576113ae611ddd565b5b6040519080825280601f01601f1916602001820160405280156113e15781602001600182028036833780820191505090505b509050600082602001820190505b600115611444578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816114385761143761265f565b5b049450600085036113ef575b819350505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166114718361109f565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b50505050565b50505050565b6114a683836117d1565b6114b360008484846114f7565b6114f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114e99061263f565b60405180910390fd5b505050565b60006115188473ffffffffffffffffffffffffffffffffffffffff166119ee565b15611671578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611541610b90565b8786866040518563ffffffff1660e01b815260040161156394939291906126e3565b6020604051808303816000875af192505050801561159f57506040513d601f19601f8201168201806040525081019061159c9190612744565b60015b611621573d80600081146115cf576040519150601f19603f3d011682016040523d82523d6000602084013e6115d4565b606091505b506000815103611619576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116109061263f565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611676565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106116dc577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816116d2576116d161265f565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310611719576d04ee2d6d415b85acef8100000000838161170f5761170e61265f565b5b0492506020810190505b662386f26fc10000831061174857662386f26fc10000838161173e5761173d61265f565b5b0492506010810190505b6305f5e1008310611771576305f5e10083816117675761176661265f565b5b0492506008810190505b612710831061179657612710838161178c5761178b61265f565b5b0492506004810190505b606483106117b957606483816117af576117ae61265f565b5b0492506002810190505b600a83106117c8576001810190505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611840576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611837906127bd565b60405180910390fd5b6118498161144f565b15611889576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188090612829565b60405180910390fd5b611897600083836001611490565b6118a08161144f565b156118e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d790612829565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46119ea600083836001611496565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611a5a81611a25565b8114611a6557600080fd5b50565b600081359050611a7781611a51565b92915050565b600060208284031215611a9357611a92611a1b565b5b6000611aa184828501611a68565b91505092915050565b60008115159050919050565b611abf81611aaa565b82525050565b6000602082019050611ada6000830184611ab6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611b1a578082015181840152602081019050611aff565b60008484015250505050565b6000601f19601f8301169050919050565b6000611b4282611ae0565b611b4c8185611aeb565b9350611b5c818560208601611afc565b611b6581611b26565b840191505092915050565b60006020820190508181036000830152611b8a8184611b37565b905092915050565b6000819050919050565b611ba581611b92565b8114611bb057600080fd5b50565b600081359050611bc281611b9c565b92915050565b600060208284031215611bde57611bdd611a1b565b5b6000611bec84828501611bb3565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611c2082611bf5565b9050919050565b611c3081611c15565b82525050565b6000602082019050611c4b6000830184611c27565b92915050565b611c5a81611c15565b8114611c6557600080fd5b50565b600081359050611c7781611c51565b92915050565b60008060408385031215611c9457611c93611a1b565b5b6000611ca285828601611c68565b9250506020611cb385828601611bb3565b9150509250929050565b600080600060608486031215611cd657611cd5611a1b565b5b6000611ce486828701611c68565b9350506020611cf586828701611c68565b9250506040611d0686828701611bb3565b9150509250925092565b600060208284031215611d2657611d25611a1b565b5b6000611d3484828501611c68565b91505092915050565b611d4681611b92565b82525050565b6000602082019050611d616000830184611d3d565b92915050565b611d7081611aaa565b8114611d7b57600080fd5b50565b600081359050611d8d81611d67565b92915050565b60008060408385031215611daa57611da9611a1b565b5b6000611db885828601611c68565b9250506020611dc985828601611d7e565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611e1582611b26565b810181811067ffffffffffffffff82111715611e3457611e33611ddd565b5b80604052505050565b6000611e47611a11565b9050611e538282611e0c565b919050565b600067ffffffffffffffff821115611e7357611e72611ddd565b5b611e7c82611b26565b9050602081019050919050565b82818337600083830152505050565b6000611eab611ea684611e58565b611e3d565b905082815260208101848484011115611ec757611ec6611dd8565b5b611ed2848285611e89565b509392505050565b600082601f830112611eef57611eee611dd3565b5b8135611eff848260208601611e98565b91505092915050565b60008060008060808587031215611f2257611f21611a1b565b5b6000611f3087828801611c68565b9450506020611f4187828801611c68565b9350506040611f5287828801611bb3565b925050606085013567ffffffffffffffff811115611f7357611f72611a20565b5b611f7f87828801611eda565b91505092959194509250565b60008060408385031215611fa257611fa1611a1b565b5b6000611fb085828601611c68565b9250506020611fc185828601611c68565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061201257607f821691505b60208210810361202557612024611fcb565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000612087602183611aeb565b91506120928261202b565b604082019050919050565b600060208201905081810360008301526120b68161207a565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000612119603d83611aeb565b9150612124826120bd565b604082019050919050565b600060208201905081810360008301526121488161210c565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b60006121ab602d83611aeb565b91506121b68261214f565b604082019050919050565b600060208201905081810360008301526121da8161219e565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000612217601883611aeb565b9150612222826121e1565b602082019050919050565b600060208201905081810360008301526122468161220a565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b60006122a9602983611aeb565b91506122b48261224d565b604082019050919050565b600060208201905081810360008301526122d88161229c565b9050919050565b600081905092915050565b60006122f582611ae0565b6122ff81856122df565b935061230f818560208601611afc565b80840191505092915050565b600061232782856122ea565b915061233382846122ea565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061239b602683611aeb565b91506123a68261233f565b604082019050919050565b600060208201905081810360008301526123ca8161238e565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061242d602583611aeb565b9150612438826123d1565b604082019050919050565b6000602082019050818103600083015261245c81612420565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006124bf602483611aeb565b91506124ca82612463565b604082019050919050565b600060208201905081810360008301526124ee816124b2565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061252b602083611aeb565b9150612536826124f5565b602082019050919050565b6000602082019050818103600083015261255a8161251e565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000612597601983611aeb565b91506125a282612561565b602082019050919050565b600060208201905081810360008301526125c68161258a565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000612629603283611aeb565b9150612634826125cd565b604082019050919050565b600060208201905081810360008301526126588161261c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600081519050919050565b600082825260208201905092915050565b60006126b58261268e565b6126bf8185612699565b93506126cf818560208601611afc565b6126d881611b26565b840191505092915050565b60006080820190506126f86000830187611c27565b6127056020830186611c27565b6127126040830185611d3d565b818103606083015261272481846126aa565b905095945050505050565b60008151905061273e81611a51565b92915050565b60006020828403121561275a57612759611a1b565b5b60006127688482850161272f565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b60006127a7602083611aeb565b91506127b282612771565b602082019050919050565b600060208201905081810360008301526127d68161279a565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000612813601c83611aeb565b915061281e826127dd565b602082019050919050565b6000602082019050818103600083015261284281612806565b905091905056fea2646970667358221220763ad1b2c1633eb458e358cc058bc9d00dbedc4ed1579cfcf8723c69b7b829eb64736f6c63430008110033", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/packages/viem/src/__tests__/contracts/source/Test721.sol b/packages/viem/src/__tests__/contracts/source/Test721.sol new file mode 100644 index 000000000..05e0dd730 --- /dev/null +++ b/packages/viem/src/__tests__/contracts/source/Test721.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.9; + +import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/Counters.sol"; + +contract Test721 is ERC721, Ownable { + using Counters for Counters.Counter; + + Counters.Counter private _tokenIdCounter; + + constructor() ERC721("Test721", "TEST") {} + + function safeMint(address to) public onlyOwner { + uint256 tokenId = _tokenIdCounter.current(); + _tokenIdCounter.increment(); + _safeMint(to, tokenId); + } +} diff --git a/packages/viem/src/__tests__/index-test.ts b/packages/viem/src/__tests__/index-test.ts index 92bd31324..48637a12d 100644 --- a/packages/viem/src/__tests__/index-test.ts +++ b/packages/viem/src/__tests__/index-test.ts @@ -1,15 +1,51 @@ -import { WalletClient, createWalletClient, http } from "viem"; -import { sepolia } from "viem/chains"; +import { TurnkeyActivityError } from "@turnkey/http"; +import { + type LocalAccount, + type Chain, + type Hex, + createTestClient, + publicActions, + walletActions, + http, + stringToHex, + getContract, + getContractAddress, + parseEther, + parseUnits, +} from "viem"; +import { foundry } from "viem/chains"; +import { TurnkeyClient } from "@turnkey/http"; +import { ApiKeyStamper } from "@turnkey/api-key-stamper"; +import { createAccount } from "../"; +import Test721 from "./Test721.json"; +import { expect, beforeEach, describe, test } from "@jest/globals"; -import { createApiKeyAccount } from "../"; +import fetch from "cross-fetch"; +globalThis.fetch = fetch; -import { expect, beforeEach, describe, test } from "@jest/globals"; +// @ts-expect-error +const testCase: typeof test = (...argList) => { + if (!process.env.BANNED_TO_ADDRESS) { + // For now, this test requires certain environment variables to be injected (from either Turnkey's internal environment, or a local `.env` file) + return test.skip(...argList); + } + + return test(...argList); +}; -describe("createApiKeyAccount", () => { - let client: WalletClient; - let expectedEthAddress: string; +describe("TurnkeyAccount", () => { + let walletClient: any; + let turnkeyAccount: LocalAccount; + let chain: Chain | undefined; + let expectedEthAddress: Hex; + let bannedToAddress: Hex; beforeEach(async () => { + if (!process.env.BANNED_TO_ADDRESS) { + // For now, this test requires certain environment variables to be injected (from either Turnkey's internal environment, or a local `.env` file) + return; + } + const apiPublicKey = assertNonEmptyString( process.env.API_PUBLIC_KEY, `process.env.API_PUBLIC_KEY` @@ -34,35 +70,266 @@ describe("createApiKeyAccount", () => { expectedEthAddress = assertNonEmptyString( process.env.EXPECTED_ETH_ADDRESS, `process.env.EXPECTED_ETH_ADDRESS` + ) as Hex; + + bannedToAddress = assertNonEmptyString( + process.env.BANNED_TO_ADDRESS, + `process.env.BANNED_TO_ADDRESS` + ) as Hex; + + // create new client + const turnkeyClient = new TurnkeyClient( + { + baseUrl, + }, + new ApiKeyStamper({ + apiPublicKey, + apiPrivateKey, + }) ); - const turnkeyAccount = await createApiKeyAccount({ - apiPublicKey, - apiPrivateKey, - baseUrl, + turnkeyAccount = await createAccount({ + client: turnkeyClient, organizationId, privateKeyId, }); - client = createWalletClient({ + walletClient = createTestClient({ account: turnkeyAccount, - chain: sepolia, + chain: foundry, + mode: "anvil", transport: http(), + }) + .extend(publicActions) + .extend(walletActions); + + chain = walletClient.chain; + + await walletClient.setBalance({ + address: expectedEthAddress, + value: parseEther("999999"), }); }); - // Create a .env file with credentials and modify this to "test(" to run tests - // TODO: make this work on CI - test.skip("basics", async () => { - expect(client.account?.address).toEqual(expectedEthAddress); + testCase("it signs transactions", async () => { + const request = await walletClient.prepareTransactionRequest({ + account: turnkeyAccount, + chain, + to: "0x2Ad9eA1E677949a536A270CEC812D6e868C88108", + value: parseEther("1.0"), + }); + const tx = await walletClient.signTransaction(request); - const signature = await client.signMessage({ - message: "rno was here", - account: client.account!, + expect(tx).toMatch(/^0x/); + }); + + testCase("it sends transactions", async () => { + const transactionCount = await walletClient.getTransactionCount({ + address: expectedEthAddress, }); - expect(signature).toEqual( - "0x42ea50d0e54726f9ce0eabf2823381a89ee9131eb2095f431ced65087213a1b767c112bd892dd9221cd269364a9938bbe63c65eea4794abbb7b7d355eadeb9131c" - ); + + const txHash = await walletClient.sendTransaction({ + account: turnkeyAccount, + to: "0x2Ad9eA1E677949a536A270CEC812D6e868C88108", + value: parseEther("1.0"), + chain, + nonce: transactionCount, + gas: 21000n, + maxFeePerGas: parseUnits("2", 9), + maxPriorityFeePerGas: parseUnits("2", 9), + type: "eip1559", + }); + + expect(txHash).toMatch(/^0x/); + }); + + testCase( + "it throws when there's a deny policy on the transaction", + async () => { + try { + await walletClient.signTransaction({ + account: turnkeyAccount, + to: bannedToAddress, + value: parseEther("1.0"), + chain, + nonce: 0, + gas: 21000n, + maxFeePerGas: parseUnits("2", 9), + maxPriorityFeePerGas: parseUnits("2", 9), + type: "eip1559", + }); + } catch (error) { + expect(error).toBeInstanceOf(TurnkeyActivityError); + + const { message, cause, activityId, activityStatus, activityType } = + error as TurnkeyActivityError; + + // We don't have activity info here, because signer returns an http error + expect({ + message, + cause, + activityId, + activityStatus, + activityType, + }).toMatchInlineSnapshot(` + { + "activityId": null, + "activityStatus": null, + "activityType": null, + "cause": [TurnkeyRequestError: Turnkey error 7: policy engine denied request explicitly (Details: [])], + "message": "Failed to sign: Turnkey error 7: policy engine denied request explicitly (Details: [])", + } + `); + } + } + ); + + testCase("it signs messages, `eth_sign` style", async () => { + // Test message (raw payload) signing, `eth_sign` style + const message = "Hello Turnkey"; + const signMessageSignature = await walletClient.signMessage({ + account: turnkeyAccount, + message: { raw: stringToHex(message) }, + }); + const verified = await walletClient.verifyMessage({ + address: expectedEthAddress, + message: message, + signature: signMessageSignature, + }); + + expect(signMessageSignature).toMatch(/^0x/); + expect(verified).toBeTruthy(); + }); + + testCase("it signs typed data (EIP-712)", async () => { + // Test typed data signing (EIP-712) + // All properties on a domain are optional + const domain = { + name: "Ether Mail", + version: "1", + chainId: 1, + verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", + } as const; + + // The named list of all type definitions + const types = { + Person: [ + { name: "name", type: "string" }, + { name: "wallet", type: "address" }, + ], + Mail: [ + { name: "from", type: "Person" }, + { name: "to", type: "Person" }, + { name: "contents", type: "string" }, + ], + } as const; + + const typedData = { + account: turnkeyAccount, + domain, + types, + primaryType: "Mail", + message: { + from: { + name: "Cow", + wallet: "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826", + }, + to: { + name: "Bob", + wallet: "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB", + }, + contents: "Hello, Bob!", + }, + } as const; + + const signTypedDataSignature = await walletClient.signTypedData(typedData); + const verified = await walletClient.verifyTypedData({ + ...typedData, + address: expectedEthAddress, + signature: signTypedDataSignature, + }); + + expect(signTypedDataSignature).toMatch(/^0x/); + expect(verified).toBeTruthy(); + }); + + // NOTE: disabling this test case for now until we can also test via React Native app + // describe("it signs walletconnect v1 payloads, bridged via EIP-1193", () => { + // // https://docs.walletconnect.com/1.0/json-rpc-api-methods/ethereum + + // testCase("Uniswap payload", async () => { + // const payload: any = { + // id: 1683062025301507, + // jsonrpc: "2.0", + // method: "eth_sendTransaction", + // params: [ + // { + // gas: "0x2fe08", // See comment below + // value: "0xf4240", + // from: expectedEthAddress, // See comment below + // to: "0x4648a43b2c14da09fdf82b161150d3f634f40491", + // data: "0x3593564c000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000006451840800000000000000000000000000000000000000000000000000000000000000020b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000677493600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002bb4fbf271143f4fbf7b91a5ded31805e42b2208d6000bb81f9840a85d5af5bf1d1762f925bdaddc4201f984000000000000000000000000000000000000000000", + // }, + // ], + // }; + + // // Looks like here, too, we are subject to similar issues as described below: + // // See https://github.com/ethers-io/ethers.js/issues/1683 + // delete payload.params[0].gas; + // // In a real-world scenario you should also verify that `from` matches the wallet's address + // delete payload.params[0].from; + + // // Anvil client seems to be able to host eip1193 requests just fine + // const tx = await walletClient.request(payload); + // expect(tx).toMatch(/^0x/); + // }); + // }); + + // Use `pnpm run compile:contracts` to update the ABI if needed + testCase("ERC-721", async () => { + const { abi, bytecode } = Test721; + + const transactionCount = await walletClient.getTransactionCount({ + address: expectedEthAddress, + }); + + // Deploy + const deployHash = await walletClient.deployContract({ + abi, + chain, + account: turnkeyAccount, + bytecode: bytecode as Hex, + }); + + const contractAddress = getContractAddress({ + from: expectedEthAddress, + nonce: transactionCount, + }); + + expect(deployHash).toMatch(/^0x/); + expect(contractAddress).toMatch(/^0x/); + + // Create contract instance + const contract = getContract({ + address: contractAddress, + abi, + walletClient, + }); + + // Mint + // @ts-expect-error + const mintHash = await contract.write.safeMint([expectedEthAddress]); + + expect(mintHash).toMatch(/^0x/); + + // Approve + // @ts-expect-error + const approveHash = await contract.write.approve([ + "0x2Ad9eA1E677949a536A270CEC812D6e868C88108", + 0, // `tokenId` is `0` because we've only minted once + ]); + + expect(approveHash).toMatch(/^0x/); }); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 933d38a69..9f255b23d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,7 +131,7 @@ importers: version: 1.0.1 '@uniswap/v3-sdk': specifier: ^3.9.0 - version: 3.9.0(hardhat@2.12.7) + version: 3.9.0(hardhat@2.17.3) dotenv: specifier: ^16.0.3 version: 16.0.3 @@ -234,7 +234,7 @@ importers: version: 0.13.0 next: specifier: 13.4.7 - version: 13.4.7(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.7(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0) npm: specifier: ^9.7.2 version: 9.7.2 @@ -291,7 +291,7 @@ importers: version: 0.13.0 next: specifier: 13.4.7 - version: 13.4.7(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.7(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0) npm: specifier: ^9.7.2 version: 9.7.2 @@ -443,8 +443,8 @@ importers: specifier: '5.1' version: 5.1.3 viem: - specifier: ^1.5.3 - version: 1.5.3(typescript@5.1.3) + specifier: ^1.10.0 + version: 1.10.0(typescript@5.1.3) examples/with-viem-and-passkeys: dependencies: @@ -489,7 +489,7 @@ importers: version: 0.13.0 next: specifier: 13.4.7 - version: 13.4.7(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + version: 13.4.7(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0) npm: specifier: ^9.7.2 version: 9.7.2 @@ -506,8 +506,8 @@ importers: specifier: 5.1.3 version: 5.1.3 viem: - specifier: ^1.5.3 - version: 1.5.3(typescript@5.1.3) + specifier: ^1.10.0 + version: 1.10.0(typescript@5.1.3) internal/jest-config: dependencies: @@ -602,6 +602,9 @@ importers: '@turnkey/http': specifier: workspace:* version: link:../http + cross-fetch: + specifier: ^4.0.0 + version: 4.0.0 typescript: specifier: '5.1' version: 5.1.3 @@ -613,8 +616,8 @@ importers: specifier: ^29.3.1 version: 29.4.3(@types/node@16.18.12) viem: - specifier: ^1.5.3 - version: 1.5.3(typescript@5.1.3) + specifier: ^1.10.0 + version: 1.10.0(typescript@5.1.3) packages/webauthn-stamper: {} @@ -635,16 +638,37 @@ packages: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.17 + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + dev: false + /@babel/code-frame@7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.18.6 + /@babel/code-frame@7.22.13: + resolution: {integrity: sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.20 + chalk: 2.4.2 + dev: false + /@babel/compat-data@7.20.14: resolution: {integrity: sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw==} engines: {node: '>=6.9.0'} + /@babel/compat-data@7.22.20: + resolution: {integrity: sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/core@7.20.12: resolution: {integrity: sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==} engines: {node: '>=6.9.0'} @@ -667,6 +691,29 @@ packages: transitivePeerDependencies: - supports-color + /@babel/core@7.22.20: + resolution: {integrity: sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-compilation-targets': 7.22.15 + '@babel/helper-module-transforms': 7.22.20(@babel/core@7.22.20) + '@babel/helpers': 7.22.15 + '@babel/parser': 7.22.16 + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.20 + '@babel/types': 7.22.19 + convert-source-map: 1.9.0 + debug: 4.3.4(supports-color@8.1.1) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: false + /@babel/generator@7.20.14: resolution: {integrity: sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg==} engines: {node: '>=6.9.0'} @@ -675,6 +722,16 @@ packages: '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 + /@babel/generator@7.22.15: + resolution: {integrity: sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.19 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.19 + jsesc: 2.5.2 + dev: false + /@babel/helper-annotate-as-pure@7.18.6: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} @@ -703,6 +760,17 @@ packages: lru-cache: 5.1.1 semver: 6.3.0 + /@babel/helper-compilation-targets@7.22.15: + resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.22.20 + '@babel/helper-validator-option': 7.22.15 + browserslist: 4.21.10 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: false + /@babel/helper-create-class-features-plugin@7.20.12(@babel/core@7.20.12): resolution: {integrity: sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==} engines: {node: '>=6.9.0'} @@ -753,6 +821,11 @@ packages: resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} engines: {node: '>=6.9.0'} + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/helper-explode-assignable-expression@7.18.6: resolution: {integrity: sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==} engines: {node: '>=6.9.0'} @@ -767,12 +840,27 @@ packages: '@babel/template': 7.20.7 '@babel/types': 7.20.7 + /@babel/helper-function-name@7.22.5: + resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/types': 7.22.19 + dev: false + /@babel/helper-hoist-variables@7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.20.7 + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.19 + dev: false + /@babel/helper-member-expression-to-functions@7.20.7: resolution: {integrity: sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==} engines: {node: '>=6.9.0'} @@ -786,6 +874,13 @@ packages: dependencies: '@babel/types': 7.20.7 + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.19 + dev: false + /@babel/helper-module-transforms@7.20.11: resolution: {integrity: sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==} engines: {node: '>=6.9.0'} @@ -801,6 +896,20 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helper-module-transforms@7.22.20(@babel/core@7.22.20): + resolution: {integrity: sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.22.20 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: false + /@babel/helper-optimise-call-expression@7.18.6: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} @@ -847,6 +956,13 @@ packages: dependencies: '@babel/types': 7.20.7 + /@babel/helper-simple-access@7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.19 + dev: false + /@babel/helper-skip-transparent-expression-wrappers@7.20.0: resolution: {integrity: sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==} engines: {node: '>=6.9.0'} @@ -860,18 +976,40 @@ packages: dependencies: '@babel/types': 7.20.7 + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.19 + dev: false + /@babel/helper-string-parser@7.19.4: resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} engines: {node: '>=6.9.0'} + /@babel/helper-string-parser@7.22.5: + resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/helper-validator-identifier@7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/helper-validator-option@7.18.6: resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} engines: {node: '>=6.9.0'} + /@babel/helper-validator-option@7.22.15: + resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} + engines: {node: '>=6.9.0'} + dev: false + /@babel/helper-wrap-function@7.20.5: resolution: {integrity: sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==} engines: {node: '>=6.9.0'} @@ -894,6 +1032,17 @@ packages: transitivePeerDependencies: - supports-color + /@babel/helpers@7.22.15: + resolution: {integrity: sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/traverse': 7.22.20 + '@babel/types': 7.22.19 + transitivePeerDependencies: + - supports-color + dev: false + /@babel/highlight@7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} @@ -902,6 +1051,15 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 + /@babel/highlight@7.22.20: + resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: false + /@babel/parser@7.20.15: resolution: {integrity: sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==} engines: {node: '>=6.0.0'} @@ -909,6 +1067,14 @@ packages: dependencies: '@babel/types': 7.20.7 + /@babel/parser@7.22.16: + resolution: {integrity: sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.22.19 + dev: false + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.20.12): resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==} engines: {node: '>=6.9.0'} @@ -1844,6 +2010,15 @@ packages: '@babel/parser': 7.20.15 '@babel/types': 7.20.7 + /@babel/template@7.22.15: + resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.19 + dev: false + /@babel/traverse@7.20.13: resolution: {integrity: sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==} engines: {node: '>=6.9.0'} @@ -1861,6 +2036,24 @@ packages: transitivePeerDependencies: - supports-color + /@babel/traverse@7.22.20: + resolution: {integrity: sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.22.13 + '@babel/generator': 7.22.15 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.22.16 + '@babel/types': 7.22.19 + debug: 4.3.4(supports-color@8.1.1) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: false + /@babel/types@7.20.7: resolution: {integrity: sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==} engines: {node: '>=6.9.0'} @@ -1869,10 +2062,50 @@ packages: '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 + /@babel/types@7.22.19: + resolution: {integrity: sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.22.5 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: false + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@chainsafe/as-sha256@0.3.1: + resolution: {integrity: sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==} + dev: false + + /@chainsafe/persistent-merkle-tree@0.4.2: + resolution: {integrity: sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==} + dependencies: + '@chainsafe/as-sha256': 0.3.1 + dev: false + + /@chainsafe/persistent-merkle-tree@0.5.0: + resolution: {integrity: sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==} + dependencies: + '@chainsafe/as-sha256': 0.3.1 + dev: false + + /@chainsafe/ssz@0.10.2: + resolution: {integrity: sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==} + dependencies: + '@chainsafe/as-sha256': 0.3.1 + '@chainsafe/persistent-merkle-tree': 0.5.0 + dev: false + + /@chainsafe/ssz@0.9.4: + resolution: {integrity: sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==} + dependencies: + '@chainsafe/as-sha256': 0.3.1 + '@chainsafe/persistent-merkle-tree': 0.4.2 + case: 1.6.3 + dev: false + /@changesets/apply-release-plan@6.1.3: resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} dependencies: @@ -3228,10 +3461,24 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 '@jridgewell/trace-mapping': 0.3.17 + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.19 + dev: false + /@jridgewell/resolve-uri@3.1.0: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + dev: false + /@jridgewell/set-array@1.1.2: resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} @@ -3239,12 +3486,23 @@ packages: /@jridgewell/sourcemap-codec@1.4.14: resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: false + /@jridgewell/trace-mapping@0.3.17: resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} dependencies: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + /@jridgewell/trace-mapping@0.3.19: + resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: false + /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: @@ -3375,7 +3633,6 @@ packages: resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==} dependencies: '@noble/hashes': 1.3.1 - dev: false /@noble/hashes@1.2.0: resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} @@ -3419,6 +3676,22 @@ packages: '@nomicfoundation/ethereumjs-util': 8.0.0 ethereum-cryptography: 0.1.3 + /@nomicfoundation/ethereumjs-block@5.0.2: + resolution: {integrity: sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q==} + engines: {node: '>=14'} + dependencies: + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-trie': 6.0.2 + '@nomicfoundation/ethereumjs-tx': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + ethereum-cryptography: 0.1.3 + ethers: 5.7.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + /@nomicfoundation/ethereumjs-blockchain@6.0.0: resolution: {integrity: sha512-pLFEoea6MWd81QQYSReLlLfH7N9v7lH66JC/NMPN848ySPPQA5renWnE7wPByfQFzNrPBuDDRFFULMDmj1C0xw==} engines: {node: '>=14'} @@ -3438,12 +3711,42 @@ packages: transitivePeerDependencies: - supports-color + /@nomicfoundation/ethereumjs-blockchain@7.0.2: + resolution: {integrity: sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w==} + engines: {node: '>=14'} + dependencies: + '@nomicfoundation/ethereumjs-block': 5.0.2 + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-ethash': 3.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-trie': 6.0.2 + '@nomicfoundation/ethereumjs-tx': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + abstract-level: 1.0.3 + debug: 4.3.4(supports-color@8.1.1) + ethereum-cryptography: 0.1.3 + level: 8.0.0 + lru-cache: 5.1.1 + memory-level: 1.0.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@nomicfoundation/ethereumjs-common@3.0.0: resolution: {integrity: sha512-WS7qSshQfxoZOpHG/XqlHEGRG1zmyjYrvmATvc4c62+gZXgre1ymYP8ZNgx/3FyZY0TWe9OjFlKOfLqmgOeYwA==} dependencies: '@nomicfoundation/ethereumjs-util': 8.0.0 crc-32: 1.2.2 + /@nomicfoundation/ethereumjs-common@4.0.2: + resolution: {integrity: sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg==} + dependencies: + '@nomicfoundation/ethereumjs-util': 9.0.2 + crc-32: 1.2.2 + dev: false + /@nomicfoundation/ethereumjs-ethash@2.0.0: resolution: {integrity: sha512-WpDvnRncfDUuXdsAXlI4lXbqUDOA+adYRQaEezIkxqDkc+LDyYDbd/xairmY98GnQzo1zIqsIL6GB5MoMSJDew==} engines: {node: '>=14'} @@ -3455,6 +3758,21 @@ packages: bigint-crypto-utils: 3.1.8 ethereum-cryptography: 0.1.3 + /@nomicfoundation/ethereumjs-ethash@3.0.2: + resolution: {integrity: sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg==} + engines: {node: '>=14'} + dependencies: + '@nomicfoundation/ethereumjs-block': 5.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + abstract-level: 1.0.3 + bigint-crypto-utils: 3.3.0 + ethereum-cryptography: 0.1.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + /@nomicfoundation/ethereumjs-evm@1.0.0: resolution: {integrity: sha512-hVS6qRo3V1PLKCO210UfcEQHvlG7GqR8iFzp0yyjTg2TmJQizcChKgWo8KFsdMw6AyoLgLhHGHw4HdlP8a4i+Q==} engines: {node: '>=14'} @@ -3470,11 +3788,35 @@ packages: transitivePeerDependencies: - supports-color + /@nomicfoundation/ethereumjs-evm@2.0.2: + resolution: {integrity: sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ==} + engines: {node: '>=14'} + dependencies: + '@ethersproject/providers': 5.7.2 + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-tx': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + debug: 4.3.4(supports-color@8.1.1) + ethereum-cryptography: 0.1.3 + mcl-wasm: 0.7.9 + rustbn.js: 0.2.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@nomicfoundation/ethereumjs-rlp@4.0.0: resolution: {integrity: sha512-GaSOGk5QbUk4eBP5qFbpXoZoZUj/NrW7MRa0tKY4Ew4c2HAS0GXArEMAamtFrkazp0BO4K5p2ZCG3b2FmbShmw==} engines: {node: '>=14'} hasBin: true + /@nomicfoundation/ethereumjs-rlp@5.0.2: + resolution: {integrity: sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA==} + engines: {node: '>=14'} + hasBin: true + dev: false + /@nomicfoundation/ethereumjs-statemanager@1.0.0: resolution: {integrity: sha512-jCtqFjcd2QejtuAMjQzbil/4NHf5aAWxUc+CvS0JclQpl+7M0bxMofR2AJdtz+P3u0ke2euhYREDiE7iSO31vQ==} dependencies: @@ -3488,6 +3830,21 @@ packages: transitivePeerDependencies: - supports-color + /@nomicfoundation/ethereumjs-statemanager@2.0.2: + resolution: {integrity: sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA==} + dependencies: + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + debug: 4.3.4(supports-color@8.1.1) + ethereum-cryptography: 0.1.3 + ethers: 5.7.2 + js-sdsl: 4.4.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@nomicfoundation/ethereumjs-trie@5.0.0: resolution: {integrity: sha512-LIj5XdE+s+t6WSuq/ttegJzZ1vliwg6wlb+Y9f4RlBpuK35B9K02bO7xU+E6Rgg9RGptkWd6TVLdedTI4eNc2A==} engines: {node: '>=14'} @@ -3497,6 +3854,17 @@ packages: ethereum-cryptography: 0.1.3 readable-stream: 3.6.0 + /@nomicfoundation/ethereumjs-trie@6.0.2: + resolution: {integrity: sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ==} + engines: {node: '>=14'} + dependencies: + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + '@types/readable-stream': 2.3.15 + ethereum-cryptography: 0.1.3 + readable-stream: 3.6.2 + dev: false + /@nomicfoundation/ethereumjs-tx@4.0.0: resolution: {integrity: sha512-Gg3Lir2lNUck43Kp/3x6TfBNwcWC9Z1wYue9Nz3v4xjdcv6oDW9QSMJxqsKw9QEGoBBZ+gqwpW7+F05/rs/g1w==} engines: {node: '>=14'} @@ -3506,6 +3874,21 @@ packages: '@nomicfoundation/ethereumjs-util': 8.0.0 ethereum-cryptography: 0.1.3 + /@nomicfoundation/ethereumjs-tx@5.0.2: + resolution: {integrity: sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g==} + engines: {node: '>=14'} + dependencies: + '@chainsafe/ssz': 0.9.4 + '@ethersproject/providers': 5.7.2 + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + ethereum-cryptography: 0.1.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + /@nomicfoundation/ethereumjs-util@8.0.0: resolution: {integrity: sha512-2emi0NJ/HmTG+CGY58fa+DQuAoroFeSH9gKu9O6JnwTtlzJtgfTixuoOqLEgyyzZVvwfIpRueuePb8TonL1y+A==} engines: {node: '>=14'} @@ -3513,6 +3896,15 @@ packages: '@nomicfoundation/ethereumjs-rlp': 4.0.0 ethereum-cryptography: 0.1.3 + /@nomicfoundation/ethereumjs-util@9.0.2: + resolution: {integrity: sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ==} + engines: {node: '>=14'} + dependencies: + '@chainsafe/ssz': 0.10.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + ethereum-cryptography: 0.1.3 + dev: false + /@nomicfoundation/ethereumjs-vm@6.0.0: resolution: {integrity: sha512-JMPxvPQ3fzD063Sg3Tp+UdwUkVxMoo1uML6KSzFhMH3hoQi/LMuXBoEHAoW83/vyNS9BxEe6jm6LmT5xdeEJ6w==} engines: {node: '>=14'} @@ -3536,6 +3928,29 @@ packages: transitivePeerDependencies: - supports-color + /@nomicfoundation/ethereumjs-vm@7.0.2: + resolution: {integrity: sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA==} + engines: {node: '>=14'} + dependencies: + '@nomicfoundation/ethereumjs-block': 5.0.2 + '@nomicfoundation/ethereumjs-blockchain': 7.0.2 + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-evm': 2.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-statemanager': 2.0.2 + '@nomicfoundation/ethereumjs-trie': 6.0.2 + '@nomicfoundation/ethereumjs-tx': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + debug: 4.3.4(supports-color@8.1.1) + ethereum-cryptography: 0.1.3 + mcl-wasm: 0.7.9 + rustbn.js: 0.2.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /@nomicfoundation/hardhat-network-helpers@1.0.8(hardhat@2.12.7): resolution: {integrity: sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q==} peerDependencies: @@ -3553,6 +3968,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1: + resolution: {integrity: sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0: resolution: {integrity: sha512-dlHeIg0pTL4dB1l9JDwbi/JG6dHQaU1xpDK+ugYO8eJ1kxx9Dh2isEUtA4d02cQAl22cjOHTvifAk96A+ItEHA==} engines: {node: '>= 10'} @@ -3561,6 +3985,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1: + resolution: {integrity: sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0: resolution: {integrity: sha512-WFCZYMv86WowDA4GiJKnebMQRt3kCcFqHeIomW6NMyqiKqhK1kIZCxSLDYsxqlx396kKLPN1713Q1S8tu68GKg==} engines: {node: '>= 10'} @@ -3569,6 +4002,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1: + resolution: {integrity: sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0: resolution: {integrity: sha512-DTw6MNQWWlCgc71Pq7CEhEqkb7fZnS7oly13pujs4cMH1sR0JzNk90Mp1zpSCsCs4oKan2ClhMlLKtNat/XRKQ==} engines: {node: '>= 10'} @@ -3577,6 +4019,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1: + resolution: {integrity: sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0: resolution: {integrity: sha512-wUpUnR/3GV5Da88MhrxXh/lhb9kxh9V3Jya2NpBEhKDIRCDmtXMSqPMXHZmOR9DfCwCvG6vLFPr/+YrPCnUN0w==} engines: {node: '>= 10'} @@ -3585,6 +4036,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1: + resolution: {integrity: sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0: resolution: {integrity: sha512-lR0AxK1x/MeKQ/3Pt923kPvwigmGX3OxeU5qNtQ9pj9iucgk4PzhbS3ruUeSpYhUxG50jN4RkIGwUMoev5lguw==} engines: {node: '>= 10'} @@ -3593,6 +4053,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1: + resolution: {integrity: sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0: resolution: {integrity: sha512-A1he/8gy/JeBD3FKvmI6WUJrGrI5uWJNr5Xb9WdV+DK0F8msuOqpEByLlnTdLkXMwW7nSl3awvLezOs9xBHJEg==} engines: {node: '>= 10'} @@ -3601,6 +4070,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1: + resolution: {integrity: sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0: resolution: {integrity: sha512-7x5SXZ9R9H4SluJZZP8XPN+ju7Mx+XeUMWZw7ZAqkdhP5mK19I4vz3x0zIWygmfE8RT7uQ5xMap0/9NPsO+ykw==} engines: {node: '>= 10'} @@ -3609,6 +4087,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1: + resolution: {integrity: sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0: resolution: {integrity: sha512-m7w3xf+hnE774YRXu+2mGV7RiF3QJtUoiYU61FascCkQhX3QMQavh7saH/vzb2jN5D24nT/jwvaHYX/MAM9zUw==} engines: {node: '>= 10'} @@ -3617,6 +4104,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1: + resolution: {integrity: sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0: resolution: {integrity: sha512-xCuybjY0sLJQnJhupiFAXaek2EqF0AP0eBjgzaalPXSNvCEN6ZYHvUzdA50ENDVeSYFXcUsYf3+FsD3XKaeptA==} engines: {node: '>= 10'} @@ -3625,6 +4121,15 @@ packages: requiresBuild: true optional: true + /@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1: + resolution: {integrity: sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@nomicfoundation/solidity-analyzer@0.1.0: resolution: {integrity: sha512-xGWAiVCGOycvGiP/qrlf9f9eOn7fpNbyJygcB0P21a1MDuVPlKt0Srp7rvtBEutYQ48ouYnRXm33zlRnlTOPHg==} engines: {node: '>= 12'} @@ -3640,6 +4145,22 @@ packages: '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.0 '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.0 + /@nomicfoundation/solidity-analyzer@0.1.1: + resolution: {integrity: sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==} + engines: {node: '>= 12'} + optionalDependencies: + '@nomicfoundation/solidity-analyzer-darwin-arm64': 0.1.1 + '@nomicfoundation/solidity-analyzer-darwin-x64': 0.1.1 + '@nomicfoundation/solidity-analyzer-freebsd-x64': 0.1.1 + '@nomicfoundation/solidity-analyzer-linux-arm64-gnu': 0.1.1 + '@nomicfoundation/solidity-analyzer-linux-arm64-musl': 0.1.1 + '@nomicfoundation/solidity-analyzer-linux-x64-gnu': 0.1.1 + '@nomicfoundation/solidity-analyzer-linux-x64-musl': 0.1.1 + '@nomicfoundation/solidity-analyzer-win32-arm64-msvc': 0.1.1 + '@nomicfoundation/solidity-analyzer-win32-ia32-msvc': 0.1.1 + '@nomicfoundation/solidity-analyzer-win32-x64-msvc': 0.1.1 + dev: false + /@nomiclabs/hardhat-ethers@2.2.3(ethers@5.7.2)(hardhat@2.12.7): resolution: {integrity: sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==} peerDependencies: @@ -3956,6 +4477,12 @@ packages: dependencies: '@types/node': 16.18.12 + /@types/bn.js@5.1.2: + resolution: {integrity: sha512-dkpZu0szUtn9UXTmw+e0AJFd4D2XAxDnsCLdc05SfqpqzPEBft8eQr8uaFitfo/dUUOZERaLec2hHMG87A4Dxg==} + dependencies: + '@types/node': 20.6.2 + dev: false + /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: @@ -4018,6 +4545,10 @@ packages: resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} dev: false + /@types/node@20.6.2: + resolution: {integrity: sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==} + dev: false + /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -4056,6 +4587,13 @@ packages: csstype: 3.1.2 dev: false + /@types/readable-stream@2.3.15: + resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} + dependencies: + '@types/node': 20.6.2 + safe-buffer: 5.1.2 + dev: false + /@types/scheduler@0.16.3: resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} dev: false @@ -4185,6 +4723,20 @@ packages: - hardhat dev: false + /@uniswap/swap-router-contracts@1.3.0(hardhat@2.17.3): + resolution: {integrity: sha512-iKvCuRkHXEe0EMjOf8HFUISTIhlxI57kKFllf3C3PUIE0HmwxrayyoflwAz5u/TRsFGYqJ9IjX2UgzLCsrNa5A==} + engines: {node: '>=10'} + dependencies: + '@openzeppelin/contracts': 3.4.2-solc-0.7 + '@uniswap/v2-core': 1.0.1 + '@uniswap/v3-core': 1.0.0 + '@uniswap/v3-periphery': 1.4.1(hardhat@2.17.3) + dotenv: 14.3.2 + hardhat-watcher: 2.5.0(hardhat@2.17.3) + transitivePeerDependencies: + - hardhat + dev: false + /@uniswap/v2-core@1.0.1: resolution: {integrity: sha512-MtybtkUPSyysqLY2U210NBDeCHX+ltHt3oADGdjqoThZaFRDKwM6k1Nb3F0A3hk5hwuQvytFWhrWHOEq6nVJ8Q==} engines: {node: '>=10'} @@ -4214,6 +4766,20 @@ packages: - hardhat dev: false + /@uniswap/v3-periphery@1.4.1(hardhat@2.17.3): + resolution: {integrity: sha512-Ab0ZCKOQrQMKIcpBTezTsEhWfQjItd0TtkCG8mPhoQu+wC67nPaf4hYUhM6wGHeFUmDiYY5MpEQuokB0ENvoTg==} + engines: {node: '>=10'} + dependencies: + '@openzeppelin/contracts': 3.4.2-solc-0.7 + '@uniswap/lib': 4.0.1-alpha + '@uniswap/v2-core': 1.0.1 + '@uniswap/v3-core': 1.0.0 + base64-sol: 1.0.1 + hardhat-watcher: 2.5.0(hardhat@2.17.3) + transitivePeerDependencies: + - hardhat + dev: false + /@uniswap/v3-periphery@1.4.3: resolution: {integrity: sha512-80c+wtVzl5JJT8UQskxVYYG3oZb4pkhY0zDe0ab/RX4+8f9+W5d8wI4BT0wLB0wFQTSnbW+QdBSpkHA/vRyGBA==} engines: {node: '>=10'} @@ -4241,6 +4807,22 @@ packages: - hardhat dev: false + /@uniswap/v3-sdk@3.9.0(hardhat@2.17.3): + resolution: {integrity: sha512-LuoF3UcY1DxSAQKJ3E4/1Eq4HaNp+x+7q9mvbpiu+/PBj+O1DjLforAMrKxu+RsA0aarmZtz7yBnAPy+akgfgQ==} + engines: {node: '>=10'} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/solidity': 5.7.0 + '@uniswap/sdk-core': 3.1.1 + '@uniswap/swap-router-contracts': 1.3.0(hardhat@2.17.3) + '@uniswap/v3-periphery': 1.4.3 + '@uniswap/v3-staker': 1.0.0 + tiny-invariant: 1.3.1 + tiny-warning: 1.0.3 + transitivePeerDependencies: + - hardhat + dev: false + /@uniswap/v3-staker@1.0.0: resolution: {integrity: sha512-JV0Qc46Px5alvg6YWd+UIaGH9lDuYG/Js7ngxPit1SPaIP30AlVer1UYB7BRYeUVVxE+byUyIeN5jeQ7LLDjIw==} engines: {node: '>=10'} @@ -4251,16 +4833,6 @@ packages: '@uniswap/v3-periphery': 1.4.3 dev: false - /@wagmi/chains@1.6.0(typescript@5.1.3): - resolution: {integrity: sha512-5FRlVxse5P4ZaHG3GTvxwVANSmYJas1eQrTBHhjxVtqXoorm0aLmCHbhmN8Xo1yu09PaWKlleEvfE98yH4AgIw==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - typescript: 5.1.3 - /JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} hasBin: true @@ -4671,6 +5243,11 @@ packages: dependencies: bigint-mod-arith: 3.1.2 + /bigint-crypto-utils@3.3.0: + resolution: {integrity: sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg==} + engines: {node: '>=14.0.0'} + dev: false + /bigint-mod-arith@3.1.2: resolution: {integrity: sha512-nx8J8bBeiRR+NlsROFH9jHswW5HO8mgfOSqW0AmjicMMvaONDa8AO+5ViKDUUNytBPWiwfvZP4/Bj4Y3lUfvgQ==} engines: {node: '>=10.4.0'} @@ -4771,6 +5348,17 @@ packages: inherits: 2.0.4 safe-buffer: 5.2.1 + /browserslist@4.21.10: + resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001535 + electron-to-chromium: 1.4.523 + node-releases: 2.0.13 + update-browserslist-db: 1.0.11(browserslist@4.21.10) + dev: false + /browserslist@4.21.5: resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -4871,6 +5459,15 @@ packages: /caniuse-lite@1.0.30001453: resolution: {integrity: sha512-R9o/uySW38VViaTrOtwfbFEiBFUh7ST3uIG4OEymIG3/uKdHDO4xk/FaqfUw0d+irSUyFPy3dZszf9VvSTPnsA==} + /caniuse-lite@1.0.30001535: + resolution: {integrity: sha512-48jLyUkiWFfhm/afF7cQPqPjaUmSraEhK4j+FCTJpgnGGEZHqyLe3hmWH7lIooZdSzXL0ReMvHz0vKDoTBsrwg==} + dev: false + + /case@1.6.3: + resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} + engines: {node: '>= 0.8.0'} + dev: false + /catering@2.1.1: resolution: {integrity: sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==} engines: {node: '>=6'} @@ -4910,7 +5507,7 @@ packages: normalize-path: 3.0.0 readdirp: 3.6.0 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} @@ -5092,6 +5689,22 @@ packages: - encoding dev: false + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: false + + /cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: false + /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -5320,6 +5933,10 @@ packages: /electron-to-chromium@1.4.298: resolution: {integrity: sha512-dJZurgxDeaqn90VmS23Xz+QPQQl84BxnlAfwCDFNjfEhqO2yLMDkeaDoJ1yPXAbmiqTi+hd5TpB5zi1N4hwBuQ==} + /electron-to-chromium@1.4.523: + resolution: {integrity: sha512-9AreocSUWnzNtvLcbpng6N+GkXnCcBR80IQkxRC9Dfdyg4gaWNUPBujAHUpKkiUkoSoR9UlhA4zD/IgBklmhzg==} + dev: false + /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: @@ -5369,6 +5986,14 @@ packages: dependencies: ansi-colors: 4.1.3 + /enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + dev: false + /env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -6179,8 +6804,8 @@ packages: /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true @@ -6354,6 +6979,15 @@ packages: hardhat: 2.12.7(typescript@5.1.5) dev: false + /hardhat-watcher@2.5.0(hardhat@2.17.3): + resolution: {integrity: sha512-Su2qcSMIo2YO2PrmJ0/tdkf+6pSt8zf9+4URR5edMVti6+ShI8T3xhPrwugdyTOFuyj8lKHrcTZNKUFYowYiyA==} + peerDependencies: + hardhat: ^2.0.0 + dependencies: + chokidar: 3.5.3 + hardhat: 2.17.3(typescript@5.1.5) + dev: false + /hardhat@2.12.7(typescript@5.1.5): resolution: {integrity: sha512-voWoN6zn5d8BOEaczSyK/1PyfdeOeI3SbGCFb36yCHTJUt6OIqLb+ZDX30VhA1UsYKzLqG7UnWl3fKJUuANc6A==} engines: {node: ^14.0.0 || ^16.0.0 || ^18.0.0} @@ -6423,6 +7057,73 @@ packages: - supports-color - utf-8-validate + /hardhat@2.17.3(typescript@5.1.5): + resolution: {integrity: sha512-SFZoYVXW1bWJZrIIKXOA+IgcctfuKXDwENywiYNT2dM3YQc4fXNaTbuk/vpPzHIF50upByx4zW5EqczKYQubsA==} + hasBin: true + peerDependencies: + ts-node: '*' + typescript: '*' + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + dependencies: + '@ethersproject/abi': 5.7.0 + '@metamask/eth-sig-util': 4.0.1 + '@nomicfoundation/ethereumjs-block': 5.0.2 + '@nomicfoundation/ethereumjs-blockchain': 7.0.2 + '@nomicfoundation/ethereumjs-common': 4.0.2 + '@nomicfoundation/ethereumjs-evm': 2.0.2 + '@nomicfoundation/ethereumjs-rlp': 5.0.2 + '@nomicfoundation/ethereumjs-statemanager': 2.0.2 + '@nomicfoundation/ethereumjs-trie': 6.0.2 + '@nomicfoundation/ethereumjs-tx': 5.0.2 + '@nomicfoundation/ethereumjs-util': 9.0.2 + '@nomicfoundation/ethereumjs-vm': 7.0.2 + '@nomicfoundation/solidity-analyzer': 0.1.1 + '@sentry/node': 5.30.0 + '@types/bn.js': 5.1.2 + '@types/lru-cache': 5.1.1 + adm-zip: 0.4.16 + aggregate-error: 3.1.0 + ansi-escapes: 4.3.2 + chalk: 2.4.2 + chokidar: 3.5.3 + ci-info: 2.0.0 + debug: 4.3.4(supports-color@8.1.1) + enquirer: 2.4.1 + env-paths: 2.2.1 + ethereum-cryptography: 1.2.0 + ethereumjs-abi: 0.6.8 + find-up: 2.1.0 + fp-ts: 1.19.3 + fs-extra: 7.0.1 + glob: 7.2.0 + immutable: 4.3.4 + io-ts: 1.10.4 + keccak: 3.0.3 + lodash: 4.17.21 + mnemonist: 0.38.5 + mocha: 10.2.0 + p-map: 4.0.0 + raw-body: 2.5.2 + resolve: 1.17.0 + semver: 6.3.1 + solc: 0.7.3(debug@4.3.4) + source-map-support: 0.5.21 + stacktrace-parser: 0.1.10 + tsort: 0.0.1 + typescript: 5.1.5 + undici: 5.24.0 + uuid: 8.3.2 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + dev: false + /has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -6557,6 +7258,10 @@ packages: /immutable@4.2.4: resolution: {integrity: sha512-WDxL3Hheb1JkRN3sQkyujNlL/xRjAo3rJtaU5xeufUauG66JdMr32bLj4gF+vWl84DIA3Zxw7tiAjneYzRRw+w==} + /immutable@4.3.4: + resolution: {integrity: sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==} + dev: false + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -7072,7 +7777,7 @@ packages: micromatch: 4.0.5 walker: 1.0.8 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 /jest-leak-detector@29.4.3: resolution: {integrity: sha512-9yw4VC1v2NspMMeV3daQ1yXPNxMgCzwq9BocCwYrRgXe4uaEJPAN0ZK37nFBhcy3cUwEVstFecFLaTHpF7NiGA==} @@ -7314,6 +8019,10 @@ packages: - ts-node dev: true + /js-sdsl@4.4.2: + resolution: {integrity: sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==} + dev: false + /js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} @@ -7777,7 +8486,7 @@ packages: resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} dev: false - /next@13.4.7(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0): + /next@13.4.7(@babel/core@7.22.20)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-M8z3k9VmG51SRT6v5uDKdJXcAqLzP3C+vaKfLIAM0Mhx1um1G7MDnO63+m52qPdZfrTFzMZNzfsgvm3ghuVHIQ==} engines: {node: '>=16.8.0'} hasBin: true @@ -7802,7 +8511,7 @@ packages: postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.20.12)(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.22.20)(react@18.2.0) watchpack: 2.4.0 zod: 3.21.4 optionalDependencies: @@ -7835,6 +8544,18 @@ packages: whatwg-url: 5.0.0 dev: false + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: false + /node-gyp-build@4.6.0: resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==} hasBin: true @@ -7845,6 +8566,10 @@ packages: /node-releases@2.0.10: resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + /node-releases@2.0.13: + resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} + dev: false + /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -8321,6 +9046,16 @@ packages: iconv-lite: 0.4.24 unpipe: 1.0.0 + /raw-body@2.5.2: + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: false + /react-dom@18.2.0(react@18.2.0): resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: @@ -8392,6 +9127,15 @@ packages: string_decoder: 1.3.0 util-deprecate: 1.0.2 + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: false + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -8577,6 +9321,10 @@ packages: /rustbn.js@0.2.0: resolution: {integrity: sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==} + /safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + dev: false + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -8616,6 +9364,11 @@ packages: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: false + /semver@7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} @@ -8905,7 +9658,7 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - /styled-jsx@5.1.1(@babel/core@7.20.12)(react@18.2.0): + /styled-jsx@5.1.1(@babel/core@7.22.20)(react@18.2.0): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -8918,7 +9671,7 @@ packages: babel-plugin-macros: optional: true dependencies: - '@babel/core': 7.20.12 + '@babel/core': 7.22.20 client-only: 0.0.1 react: 18.2.0 dev: false @@ -9078,7 +9831,7 @@ packages: '@esbuild-kit/core-utils': 3.1.0 '@esbuild-kit/esm-loader': 2.5.5 optionalDependencies: - fsevents: 2.3.2 + fsevents: 2.3.3 dev: true /tty-table@4.1.6: @@ -9186,6 +9939,13 @@ packages: dependencies: busboy: 1.6.0 + /undici@5.24.0: + resolution: {integrity: sha512-OKlckxBjFl0oXxcj9FU6oB8fDAaiRUq+D8jrFWGmOfI/gIyjk/IeS75LMzgYKUaeHzLUcYvf9bbJGSrUwTfwwQ==} + engines: {node: '>=14.0'} + dependencies: + busboy: 1.6.0 + dev: false + /unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} engines: {node: '>=4'} @@ -9232,6 +9992,17 @@ packages: escalade: 3.1.1 picocolors: 1.0.0 + /update-browserslist-db@1.0.11(browserslist@4.21.10): + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.10 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: false + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: @@ -9283,8 +10054,8 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /viem@1.5.3(typescript@5.1.3): - resolution: {integrity: sha512-oImpSDDvm8Y72qxXV0pCAGAqQLYgo8YENdz9EKS8ExnnOJLascpex4LNazNyp9cksjm3ORpVpbqGMr9Cy1z2mg==} + /viem@1.10.0(typescript@5.1.3): + resolution: {integrity: sha512-uV8ICcgu+3BghTpzsSiYtpyPUrZpTYgPjBkwhPoM6WsF34JAKdV7HVWiWKxrrkP5GqIRJhkT5lRflJrdv5ftng==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -9292,12 +10063,11 @@ packages: optional: true dependencies: '@adraffy/ens-normalize': 1.9.0 - '@noble/curves': 1.0.0 + '@noble/curves': 1.1.0 '@noble/hashes': 1.3.0 '@scure/bip32': 1.3.0 '@scure/bip39': 1.2.0 '@types/ws': 8.5.5 - '@wagmi/chains': 1.6.0(typescript@5.1.3) abitype: 0.9.3(typescript@5.1.3) isomorphic-ws: 5.0.0(ws@8.12.0) typescript: 5.1.3 @@ -9403,7 +10173,7 @@ packages: engines: {node: '>=8.0.0'} dependencies: abortcontroller-polyfill: 1.7.5 - cross-fetch: 3.1.5 + cross-fetch: 3.1.8 es6-promise: 4.2.8 web3-core-helpers: 1.9.0 transitivePeerDependencies: