diff --git a/package.json b/package.json index 26e1b89..caf9bad 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,18 @@ { + "scripts": { + "start": "tsc src/create-pool.ts", + "build": "tsc", + "format": "prettier --write .", + "lint": "eslint . --ext .ts", + "test": "jest" + }, "devDependencies": { "dotenv": "^16.4.0", "prettier": "^3.1.1", "typescript": "^5.3.3" }, "dependencies": { - "@allo-team/allo-v2-sdk": "^1.0.39", + "@allo-team/allo-v2-sdk": "^1.0.61", "@superfluid-finance/sdk-core": "^0.6.12", "ethers": "5.7.2", "viem": "^2.0.5" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ceacd4c..a8756a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@allo-team/allo-v2-sdk': - specifier: ^1.0.39 - version: 1.0.39(typescript@5.3.3) + specifier: ^1.0.61 + version: 1.0.61(@typechain/ethers-v6@0.5.1)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.3.3) '@superfluid-finance/sdk-core': specifier: ^0.6.12 version: 0.6.12(@openzeppelin/test-helpers@0.5.16)(ethers@5.7.2)(graphql@16.8.1)(typescript@5.3.3) @@ -35,14 +35,24 @@ packages: resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} dev: false - /@allo-team/allo-v2-sdk@1.0.39(typescript@5.3.3): - resolution: {integrity: sha512-t6mxj/sGOuQjb95hvsqKBT6SADyEbgCfXiIFlVmuft95In6YbeRKyzNEx2OZKrNZA9vze3vEkCIx8v0wVtplOA==} + /@allo-team/allo-v2-sdk@1.0.61(@typechain/ethers-v6@0.5.1)(ethers@5.7.2)(typechain@8.3.2)(typescript@5.3.3): + resolution: {integrity: sha512-6feDh5Ld67+oJc3m+9JAtTwQ2eBRwY7xYTtqzSscd5lpKk5ksImVQoU00cH4cdd3hvIcPPH3GB6cM18MGCaAKg==} + engines: {node: '>=16.15.0', npm: '>=8.5.5'} dependencies: + '@typechain/hardhat': 9.1.0(@typechain/ethers-v6@0.5.1)(ethers@5.7.2)(hardhat@2.22.2)(typechain@8.3.2) dotenv: 16.4.0 events: 3.3.0 + hardhat: 2.22.2(typescript@5.3.3) + mocha: 10.4.0 viem: 1.21.4(typescript@5.3.3) transitivePeerDependencies: + - '@typechain/ethers-v6' - bufferutil + - c-kzg + - ethers + - supports-color + - ts-node + - typechain - typescript - utf-8-validate - zod @@ -466,6 +476,11 @@ packages: '@ethersproject/strings': 5.7.0 dev: false + /@fastify/busboy@2.1.1: + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} + dev: false + /@graphql-typed-document-node/core@3.2.0(graphql@16.8.1): resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} peerDependencies: @@ -474,6 +489,17 @@ packages: graphql: 16.8.1 dev: false + /@metamask/eth-sig-util@4.0.1: + resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} + engines: {node: '>=12.0.0'} + dependencies: + ethereumjs-abi: 0.6.8 + ethereumjs-util: 6.2.1 + ethjs-util: 0.1.6 + tweetnacl: 1.0.3 + tweetnacl-util: 0.15.1 + dev: false + /@noble/curves@1.2.0: resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} dependencies: @@ -486,6 +512,10 @@ packages: '@noble/hashes': 1.3.3 dev: false + /@noble/hashes@1.2.0: + resolution: {integrity: sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==} + dev: false + /@noble/hashes@1.3.2: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} @@ -496,6 +526,254 @@ packages: engines: {node: '>= 16'} dev: false + /@noble/secp256k1@1.7.1: + resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} + dev: false + + /@nomicfoundation/edr-darwin-arm64@0.3.3: + resolution: {integrity: sha512-E9VGsUD+1Ga4mn/5ooHsMi8JEfhZbKP6CXN/BhJ8kXbIC10NqTD1RuhCKGRtYq4vqH/3Nfq25Xg8E8RWOF4KBQ==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-darwin-x64@0.3.3: + resolution: {integrity: sha512-vkZXZ1ydPg+Ijb2iyqENA+KCkxGTCUWG5itCSliiA0Li2YE7ujDMGhheEpFp1WVlZadviz0bfk1rZXbCqlirpg==} + engines: {node: '>= 18'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-linux-arm64-gnu@0.3.3: + resolution: {integrity: sha512-gdIg0Yj1qqS9wVuywc5B/+DqKylfUGB6/CQn/shMqwAfsAVAVpchkhy66PR+REEx7fh/GkNctxLlENXPeLzDiA==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-linux-arm64-musl@0.3.3: + resolution: {integrity: sha512-AXZ08MFvhNeBZbOBNmz1SJ/DMrMOE2mHEJtaNnsctlxIunjxfrWww4q+WXB34jbr9iaVYYlPsaWe5sueuw6s3Q==} + engines: {node: '>= 18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-linux-x64-gnu@0.3.3: + resolution: {integrity: sha512-xElOs1U+E6lBLtv1mnJ+E8nr2MxZgKiLo8bZAgBboy9odYtmkDVwhMjtsFKSuZbGxFtsSyGRT4cXw3JAbtUDeA==} + engines: {node: '>= 18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-linux-x64-musl@0.3.3: + resolution: {integrity: sha512-2Fe6gwm1RAGQ/PfMYiaSba2OrFp8zzYWh+am9lYObOFjV9D+A1zhIzfy0UC74glPks5eV8eY4pBPrVR042m2Nw==} + engines: {node: '>= 18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-win32-arm64-msvc@0.3.3: + resolution: {integrity: sha512-8NHyxIsFrl0ufSQ/ErqF2lKIa/gz1gaaa1a2vKkDEqvqCUcPhBTYhA5NHgTPhLETFTnCFr0z+YbctFCyjh4qrA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-win32-ia32-msvc@0.3.3: + resolution: {integrity: sha512-0F6hM0kGia4dQVb/kauho9JcP1ozWisY2/She+ISR5ceuhzmAwQJluM0g+0TYDME0LtxBxiMPq/yPiZMQeq31w==} + engines: {node: '>= 18'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr-win32-x64-msvc@0.3.3: + resolution: {integrity: sha512-d75q1uaMb6z9i+GQZoblbOfFBvlBnWc+5rB13UWRkCOJSnoYwyFWhGJx5GeM59gC7aIblc5VD9qOAhHuvM9N+w==} + engines: {node: '>= 18'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + + /@nomicfoundation/edr@0.3.3: + resolution: {integrity: sha512-zP+e+3B1nEUx6bW5BPnIzCQbkhmYfdMBJdiVggTqqTfAA82sOkdOG7wsOMcz5qF3fYfx/irNRM1kgc9HVFIbpQ==} + engines: {node: '>= 18'} + optionalDependencies: + '@nomicfoundation/edr-darwin-arm64': 0.3.3 + '@nomicfoundation/edr-darwin-x64': 0.3.3 + '@nomicfoundation/edr-linux-arm64-gnu': 0.3.3 + '@nomicfoundation/edr-linux-arm64-musl': 0.3.3 + '@nomicfoundation/edr-linux-x64-gnu': 0.3.3 + '@nomicfoundation/edr-linux-x64-musl': 0.3.3 + '@nomicfoundation/edr-win32-arm64-msvc': 0.3.3 + '@nomicfoundation/edr-win32-ia32-msvc': 0.3.3 + '@nomicfoundation/edr-win32-x64-msvc': 0.3.3 + dev: false + + /@nomicfoundation/ethereumjs-common@4.0.4: + resolution: {integrity: sha512-9Rgb658lcWsjiicr5GzNCjI1llow/7r0k50dLL95OJ+6iZJcVbi15r3Y0xh2cIO+zgX0WIHcbzIu6FeQf9KPrg==} + dependencies: + '@nomicfoundation/ethereumjs-util': 9.0.4 + transitivePeerDependencies: + - c-kzg + dev: false + + /@nomicfoundation/ethereumjs-rlp@5.0.4: + resolution: {integrity: sha512-8H1S3s8F6QueOc/X92SdrA4RDenpiAEqMg5vJH99kcQaCy/a3Q6fgseo75mgWlbanGJXSlAPtnCeG9jvfTYXlw==} + engines: {node: '>=18'} + hasBin: true + dev: false + + /@nomicfoundation/ethereumjs-tx@5.0.4: + resolution: {integrity: sha512-Xjv8wAKJGMrP1f0n2PeyfFCCojHd7iS3s/Ab7qzF1S64kxZ8Z22LCMynArYsVqiFx6rzYy548HNVEyI+AYN/kw==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + dependencies: + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-rlp': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 + ethereum-cryptography: 0.1.3 + dev: false + + /@nomicfoundation/ethereumjs-util@9.0.4: + resolution: {integrity: sha512-sLOzjnSrlx9Bb9EFNtHzK/FJFsfg2re6bsGqinFinH1gCqVfz9YYlXiMWwDM4C/L4ywuHFCYwfKTVr/QHQcU0Q==} + engines: {node: '>=18'} + peerDependencies: + c-kzg: ^2.1.2 + peerDependenciesMeta: + c-kzg: + optional: true + dependencies: + '@nomicfoundation/ethereumjs-rlp': 5.0.4 + ethereum-cryptography: 0.1.3 + dev: false + + /@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.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.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.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.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.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.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.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.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.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.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 + /@openzeppelin/contract-loader@0.6.3: resolution: {integrity: sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==} dependencies: @@ -532,6 +810,14 @@ packages: resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} dev: false + /@scure/bip32@1.1.5: + resolution: {integrity: sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==} + dependencies: + '@noble/hashes': 1.2.0 + '@noble/secp256k1': 1.7.1 + '@scure/base': 1.1.5 + dev: false + /@scure/bip32@1.3.2: resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} dependencies: @@ -548,6 +834,13 @@ packages: '@scure/base': 1.1.5 dev: false + /@scure/bip39@1.1.1: + resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} + dependencies: + '@noble/hashes': 1.2.0 + '@scure/base': 1.1.5 + dev: false + /@scure/bip39@1.2.1: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: @@ -562,6 +855,76 @@ packages: '@scure/base': 1.1.5 dev: false + /@sentry/core@5.30.0: + resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} + engines: {node: '>=6'} + dependencies: + '@sentry/hub': 5.30.0 + '@sentry/minimal': 5.30.0 + '@sentry/types': 5.30.0 + '@sentry/utils': 5.30.0 + tslib: 1.14.1 + dev: false + + /@sentry/hub@5.30.0: + resolution: {integrity: sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==} + engines: {node: '>=6'} + dependencies: + '@sentry/types': 5.30.0 + '@sentry/utils': 5.30.0 + tslib: 1.14.1 + dev: false + + /@sentry/minimal@5.30.0: + resolution: {integrity: sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==} + engines: {node: '>=6'} + dependencies: + '@sentry/hub': 5.30.0 + '@sentry/types': 5.30.0 + tslib: 1.14.1 + dev: false + + /@sentry/node@5.30.0: + resolution: {integrity: sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==} + engines: {node: '>=6'} + dependencies: + '@sentry/core': 5.30.0 + '@sentry/hub': 5.30.0 + '@sentry/tracing': 5.30.0 + '@sentry/types': 5.30.0 + '@sentry/utils': 5.30.0 + cookie: 0.4.2 + https-proxy-agent: 5.0.1 + lru_map: 0.3.3 + tslib: 1.14.1 + transitivePeerDependencies: + - supports-color + dev: false + + /@sentry/tracing@5.30.0: + resolution: {integrity: sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==} + engines: {node: '>=6'} + dependencies: + '@sentry/hub': 5.30.0 + '@sentry/minimal': 5.30.0 + '@sentry/types': 5.30.0 + '@sentry/utils': 5.30.0 + tslib: 1.14.1 + dev: false + + /@sentry/types@5.30.0: + resolution: {integrity: sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==} + engines: {node: '>=6'} + dev: false + + /@sentry/utils@5.30.0: + resolution: {integrity: sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==} + engines: {node: '>=6'} + dependencies: + '@sentry/types': 5.30.0 + tslib: 1.14.1 + dev: false + /@sindresorhus/is@4.6.0: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} @@ -651,7 +1014,7 @@ packages: big.js: 6.2.1 bn.js: 5.2.1 cbor: 5.2.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) lodash: 4.17.21 semver: 7.5.4 utf8: 3.0.0 @@ -673,7 +1036,7 @@ packages: engines: {node: ^16.20 || ^18.16 || >=20} dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color dev: false @@ -688,7 +1051,7 @@ packages: '@truffle/error': 0.2.2 '@truffle/interface-adapter': 0.5.37 bignumber.js: 7.2.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) ethers: 4.0.49 web3: 1.10.0 web3-core-helpers: 1.10.0 @@ -705,6 +1068,7 @@ packages: /@truffle/contract@4.6.31: resolution: {integrity: sha512-s+oHDpXASnZosiCdzu+X1Tx5mUJUs1L1CYXIcgRmzMghzqJkaUFmR6NpNo7nJYliYbO+O9/aW8oCKqQ7rCHfmQ==} engines: {node: ^16.20 || ^18.16 || >=20} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. dependencies: '@ensdomains/ensjs': 2.1.0 '@truffle/blockchain-utils': 0.1.9 @@ -713,7 +1077,7 @@ packages: '@truffle/error': 0.2.2 '@truffle/interface-adapter': 0.5.37 bignumber.js: 7.2.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) ethers: 4.0.49 web3: 1.10.0 web3-core-helpers: 1.10.0 @@ -735,7 +1099,7 @@ packages: '@trufflesuite/chromafi': 3.0.0 bn.js: 5.2.1 chalk: 2.4.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) highlightjs-solidity: 2.0.6 transitivePeerDependencies: - supports-color @@ -773,6 +1137,35 @@ packages: strip-indent: 2.0.0 dev: false + /@typechain/ethers-v6@0.5.1(ethers@5.7.2)(typechain@8.3.2)(typescript@5.3.3): + resolution: {integrity: sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==} + peerDependencies: + ethers: 6.x + typechain: ^8.3.2 + typescript: '>=4.7.0' + dependencies: + ethers: 5.7.2 + lodash: 4.17.21 + ts-essentials: 7.0.3(typescript@5.3.3) + typechain: 8.3.2(typescript@5.3.3) + typescript: 5.3.3 + dev: false + + /@typechain/hardhat@9.1.0(@typechain/ethers-v6@0.5.1)(ethers@5.7.2)(hardhat@2.22.2)(typechain@8.3.2): + resolution: {integrity: sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==} + peerDependencies: + '@typechain/ethers-v6': ^0.5.1 + ethers: ^6.1.0 + hardhat: ^2.9.9 + typechain: ^8.3.2 + dependencies: + '@typechain/ethers-v6': 0.5.1(ethers@5.7.2)(typechain@8.3.2)(typescript@5.3.3) + ethers: 5.7.2 + fs-extra: 9.1.0 + hardhat: 2.22.2(typescript@5.3.3) + typechain: 8.3.2(typescript@5.3.3) + dev: false + /@types/bn.js@4.11.6: resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} dependencies: @@ -804,6 +1197,10 @@ packages: '@types/node': 12.20.55 dev: false + /@types/lru-cache@5.1.1: + resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} + dev: false + /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: false @@ -820,6 +1217,10 @@ packages: '@types/node': 20.11.5 dev: false + /@types/prettier@2.7.3: + resolution: {integrity: sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==} + dev: false + /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: @@ -899,10 +1300,32 @@ packages: hasBin: true dev: false + /adm-zip@0.4.16: + resolution: {integrity: sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==} + engines: {node: '>=0.3.0'} + dev: false + /aes-js@3.0.0: resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} dev: false + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: false + + /aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: false + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -912,11 +1335,34 @@ packages: uri-js: 4.4.1 dev: false + /ansi-align@3.0.1: + resolution: {integrity: sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==} + dependencies: + string-width: 4.2.3 + dev: false + /ansi-colors@3.2.4: resolution: {integrity: sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==} engines: {node: '>=6'} dev: false + /ansi-colors@4.1.1: + resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} + engines: {node: '>=6'} + dev: false + + /ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + dev: false + + /ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.21.3 + dev: false + /ansi-regex@2.1.1: resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} @@ -927,6 +1373,11 @@ packages: engines: {node: '>=4'} dev: false + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: false + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -934,10 +1385,39 @@ packages: color-convert: 1.9.3 dev: false + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: false + /any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} dev: false + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: false + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: false + + /array-back@3.1.0: + resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==} + engines: {node: '>=6'} + dev: false + + /array-back@4.0.2: + resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} + engines: {node: '>=8'} + dev: false + /array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false @@ -981,6 +1461,11 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: false + /at-least-node@1.0.0: + resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} + engines: {node: '>= 4.0.0'} + dev: false + /available-typed-arrays@1.0.5: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} @@ -1035,6 +1520,11 @@ packages: resolution: {integrity: sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==} dev: false + /binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} + dev: false + /blakejs@1.2.1: resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} dev: false @@ -1099,6 +1589,20 @@ packages: resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} dev: false + /boxen@5.1.2: + resolution: {integrity: sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==} + engines: {node: '>=10'} + dependencies: + ansi-align: 3.0.1 + camelcase: 6.3.0 + chalk: 4.1.2 + cli-boxes: 2.2.1 + string-width: 4.2.3 + type-fest: 0.20.2 + widest-line: 3.1.0 + wrap-ansi: 7.0.0 + dev: false + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -1106,6 +1610,19 @@ packages: concat-map: 0.0.1 dev: false + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: false + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: false + /brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} dev: false @@ -1128,6 +1645,10 @@ packages: resolve: 1.22.8 dev: false + /browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + dev: false + /browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} dependencies: @@ -1355,6 +1876,11 @@ packages: engines: {node: '>=4'} dev: false + /camelcase@6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + dev: false + /caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} dev: false @@ -1399,6 +1925,14 @@ packages: supports-color: 5.5.0 dev: false + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: false + /change-case@3.0.2: resolution: {integrity: sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==} dependencies: @@ -1452,10 +1986,44 @@ packages: parse5-htmlparser2-tree-adapter: 7.0.0 dev: false + /chokidar@3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + dev: false + + /chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + dev: false + /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} dev: false + /ci-info@2.0.0: + resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} + dev: false + /cids@0.7.5: resolution: {integrity: sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==} engines: {node: '>=4.0.0', npm: '>=3.0.0'} @@ -1479,6 +2047,16 @@ packages: resolution: {integrity: sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==} dev: false + /clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + dev: false + + /cli-boxes@2.2.1: + resolution: {integrity: sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==} + engines: {node: '>=6'} + dev: false + /cliui@3.2.0: resolution: {integrity: sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==} dependencies: @@ -1487,6 +2065,14 @@ packages: wrap-ansi: 2.1.0 dev: false + /cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: false + /clone-response@1.0.3: resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} dependencies: @@ -1504,10 +2090,21 @@ packages: color-name: 1.1.3 dev: false + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: false + /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: false + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: false + /colors@1.4.0: resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} engines: {node: '>=0.1.90'} @@ -1529,6 +2126,34 @@ packages: delayed-stream: 1.0.0 dev: false + /command-exists@1.2.9: + resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} + dev: false + + /command-line-args@5.2.1: + resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + find-replace: 3.0.0 + lodash.camelcase: 4.3.0 + typical: 4.0.0 + dev: false + + /command-line-usage@6.1.3: + resolution: {integrity: sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==} + engines: {node: '>=8.0.0'} + dependencies: + array-back: 4.0.2 + chalk: 2.4.2 + table-layout: 1.0.2 + typical: 5.2.0 + dev: false + + /commander@3.0.2: + resolution: {integrity: sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==} + dev: false + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false @@ -1590,6 +2215,11 @@ packages: resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false + /cookie@0.4.2: + resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} + engines: {node: '>= 0.6'} + dev: false + /cookie@0.5.0: resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} engines: {node: '>= 0.6'} @@ -1733,7 +2363,7 @@ packages: ms: 2.0.0 dev: false - /debug@4.3.4: + /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} peerDependencies: @@ -1743,6 +2373,7 @@ packages: optional: true dependencies: ms: 2.1.2 + supports-color: 8.1.1 dev: false /decamelize@1.2.0: @@ -1750,6 +2381,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + dev: false + /decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} @@ -1776,6 +2412,11 @@ packages: type-detect: 4.0.8 dev: false + /deep-extend@0.6.0: + resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} + engines: {node: '>=4.0.0'} + dev: false + /defer-to-connect@2.0.1: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} @@ -1850,6 +2491,11 @@ packages: minimist: 1.2.8 dev: false + /diff@5.0.0: + resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + engines: {node: '>=0.3.1'} + dev: false + /diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} dependencies: @@ -1933,6 +2579,10 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: false + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: false + /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -1944,11 +2594,24 @@ packages: once: 1.4.0 dev: false + /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 + /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} dev: false + /env-paths@2.2.1: + resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} + engines: {node: '>=6'} + dev: false + /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: @@ -1984,6 +2647,11 @@ packages: ext: 1.7.0 dev: false + /escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + dev: false + /escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} dev: false @@ -1993,6 +2661,11 @@ packages: engines: {node: '>=0.8.0'} dev: false + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: false + /etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -2054,6 +2727,15 @@ packages: setimmediate: 1.0.5 dev: false + /ethereum-cryptography@1.2.0: + resolution: {integrity: sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==} + dependencies: + '@noble/hashes': 1.2.0 + '@noble/secp256k1': 1.7.1 + '@scure/bip32': 1.1.5 + '@scure/bip39': 1.1.1 + dev: false + /ethereum-cryptography@2.1.3: resolution: {integrity: sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==} dependencies: @@ -2063,6 +2745,13 @@ packages: '@scure/bip39': 1.2.2 dev: false + /ethereumjs-abi@0.6.8: + resolution: {integrity: sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==} + dependencies: + bn.js: 4.12.0 + ethereumjs-util: 6.2.1 + dev: false + /ethereumjs-common@1.5.2: resolution: {integrity: sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==} deprecated: 'New package name format for new versions: @ethereumjs/common. Please update.' @@ -2265,6 +2954,13 @@ packages: resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} dev: false + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: false + /finalhandler@1.2.0: resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} engines: {node: '>= 0.8'} @@ -2280,6 +2976,13 @@ packages: - supports-color dev: false + /find-replace@3.0.0: + resolution: {integrity: sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==} + engines: {node: '>=4.0.0'} + dependencies: + array-back: 3.1.0 + dev: false + /find-up@1.1.2: resolution: {integrity: sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==} engines: {node: '>=0.10.0'} @@ -2288,6 +2991,13 @@ packages: pinkie-promise: 2.0.1 dev: false + /find-up@2.1.0: + resolution: {integrity: sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==} + engines: {node: '>=4'} + dependencies: + locate-path: 2.0.0 + dev: false + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -2296,6 +3006,31 @@ packages: path-exists: 4.0.0 dev: false + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: false + + /flat@5.0.2: + resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} + hasBin: true + dev: false + + /follow-redirects@1.15.6(debug@4.3.4): + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dependencies: + debug: 4.3.4(supports-color@8.1.1) + dev: false + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -2324,6 +3059,10 @@ packages: engines: {node: '>= 0.6'} dev: false + /fp-ts@1.19.3: + resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} + dev: false + /fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} @@ -2347,6 +3086,15 @@ packages: universalify: 0.1.2 dev: false + /fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + dev: false + /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -2356,6 +3104,16 @@ packages: universalify: 0.1.2 dev: false + /fs-extra@9.1.0: + resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} + engines: {node: '>=10'} + dependencies: + at-least-node: 1.0.0 + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: false + /fs-minipass@1.2.7: resolution: {integrity: sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==} dependencies: @@ -2366,6 +3124,14 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: false + /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 + dev: false + optional: true + /function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: false @@ -2378,6 +3144,11 @@ packages: resolution: {integrity: sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==} dev: false + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: false + /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} dev: false @@ -2409,6 +3180,35 @@ packages: assert-plus: 1.0.0 dev: false + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: false + + /glob@7.1.7: + resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: false + + /glob@7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: false + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -2420,6 +3220,17 @@ packages: path-is-absolute: 1.0.1 dev: false + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.0.1 + once: 1.4.0 + dev: false + /global@4.4.0: resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} dependencies: @@ -2504,11 +3315,79 @@ packages: har-schema: 2.0.0 dev: false + /hardhat@2.22.2(typescript@5.3.3): + resolution: {integrity: sha512-0xZ7MdCZ5sJem4MrvpQWLR3R3zGDoHw5lsR+pBFimqwagimIOn3bWuZv69KA+veXClwI1s/zpqgwPwiFrd4Dxw==} + 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/edr': 0.3.3 + '@nomicfoundation/ethereumjs-common': 4.0.4 + '@nomicfoundation/ethereumjs-tx': 5.0.4 + '@nomicfoundation/ethereumjs-util': 9.0.4 + '@nomicfoundation/solidity-analyzer': 0.1.1 + '@sentry/node': 5.30.0 + '@types/bn.js': 5.1.5 + '@types/lru-cache': 5.1.1 + adm-zip: 0.4.16 + aggregate-error: 3.1.0 + ansi-escapes: 4.3.2 + boxen: 5.1.2 + chalk: 2.4.2 + chokidar: 3.6.0 + 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.5 + io-ts: 1.10.4 + keccak: 3.0.4 + lodash: 4.17.21 + mnemonist: 0.38.5 + mocha: 10.4.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.3.3 + undici: 5.28.4 + uuid: 8.3.2 + ws: 7.4.6 + transitivePeerDependencies: + - bufferutil + - c-kzg + - supports-color + - utf-8-validate + dev: false + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: false + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: false + /has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} dependencies: @@ -2567,6 +3446,11 @@ packages: function-bind: 1.1.2 dev: false + /he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: false + /header-case@1.0.1: resolution: {integrity: sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ==} dependencies: @@ -2656,6 +3540,16 @@ packages: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} dev: false + /https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: false + /iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -2674,6 +3568,15 @@ packages: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: false + /immutable@4.3.5: + resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + dev: false + + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: false + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -2716,6 +3619,12 @@ packages: engines: {node: '>=0.10.0'} dev: false + /io-ts@1.10.4: + resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} + dependencies: + fp-ts: 1.19.3 + dev: false + /ipaddr.js@1.9.1: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} @@ -2733,6 +3642,13 @@ packages: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: false + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.3.0 + dev: false + /is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} dev: false @@ -2748,6 +3664,11 @@ packages: hasown: 2.0.0 dev: false + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: false + /is-fullwidth-code-point@1.0.0: resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} engines: {node: '>=0.10.0'} @@ -2755,6 +3676,11 @@ packages: number-is-nan: 1.0.1 dev: false + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: false + /is-function@1.0.2: resolution: {integrity: sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==} dev: false @@ -2766,6 +3692,13 @@ packages: has-tostringtag: 1.0.0 dev: false + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: false + /is-hex-prefixed@1.0.0: resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==} engines: {node: '>=6.5.0', npm: '>=3'} @@ -2777,6 +3710,16 @@ packages: lower-case: 1.1.4 dev: false + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: false + + /is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + dev: false + /is-typed-array@1.1.12: resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} engines: {node: '>= 0.4'} @@ -2788,6 +3731,11 @@ packages: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} dev: false + /is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + dev: false + /is-upper-case@1.1.2: resolution: {integrity: sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw==} dependencies: @@ -2826,6 +3774,13 @@ packages: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} dev: false + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: false + /jsbn@0.1.1: resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} dev: false @@ -2858,6 +3813,14 @@ packages: graceful-fs: 4.2.11 dev: false + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + dev: false + /jsonparse@1.3.1: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} @@ -2920,6 +3883,14 @@ packages: strip-bom: 2.0.0 dev: false + /locate-path@2.0.0: + resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} + engines: {node: '>=4'} + dependencies: + p-locate: 2.0.0 + path-exists: 3.0.0 + dev: false + /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -2927,10 +3898,21 @@ packages: p-locate: 4.1.0 dev: false + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: false + /lodash.assign@4.2.0: resolution: {integrity: sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw==} dev: false + /lodash.camelcase@4.3.0: + resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} + dev: false + /lodash.flatten@4.4.0: resolution: {integrity: sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==} dev: false @@ -2947,6 +3929,14 @@ packages: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: false + /log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + dev: false + /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: @@ -2980,6 +3970,10 @@ packages: yallist: 4.0.0 dev: false + /lru_map@0.3.3: + resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} + dev: false + /md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} dependencies: @@ -3067,6 +4061,13 @@ packages: brace-expansion: 1.1.11 dev: false + /minimatch@5.0.1: + resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false @@ -3103,12 +4104,51 @@ packages: minimist: 1.2.8 dev: false + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: false + /mkdirp@3.0.1: resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} hasBin: true dev: false + /mnemonist@0.38.5: + resolution: {integrity: sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==} + dependencies: + obliterator: 2.0.4 + dev: false + + /mocha@10.4.0: + resolution: {integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==} + engines: {node: '>= 14.0.0'} + hasBin: true + dependencies: + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.4(supports-color@8.1.1) + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 8.1.0 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 5.0.1 + ms: 2.1.3 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.2.1 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + dev: false + /mock-fs@4.14.0: resolution: {integrity: sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==} dev: false @@ -3244,6 +4284,11 @@ packages: validate-npm-package-license: 3.0.4 dev: false + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: false + /normalize-url@6.1.0: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} @@ -3296,6 +4341,10 @@ packages: object-keys: 1.1.1 dev: false + /obliterator@2.0.4: + resolution: {integrity: sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==} + dev: false + /oboe@2.1.5: resolution: {integrity: sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA==} dependencies: @@ -3326,6 +4375,11 @@ packages: lcid: 1.0.0 dev: false + /os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + dev: false + /p-cancelable@2.1.1: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} @@ -3336,6 +4390,13 @@ packages: engines: {node: '>=12.20'} dev: false + /p-limit@1.3.0: + resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==} + engines: {node: '>=4'} + dependencies: + p-try: 1.0.0 + dev: false + /p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -3343,6 +4404,20 @@ packages: p-try: 2.2.0 dev: false + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: false + + /p-locate@2.0.0: + resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} + engines: {node: '>=4'} + dependencies: + p-limit: 1.3.0 + dev: false + /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -3350,6 +4425,25 @@ packages: p-limit: 2.3.0 dev: false + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: false + + /p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + dependencies: + aggregate-error: 3.1.0 + dev: false + + /p-try@1.0.0: + resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} + engines: {node: '>=4'} + dev: false + /p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -3434,6 +4528,11 @@ packages: pinkie-promise: 2.0.1 dev: false + /path-exists@3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} + dev: false + /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -3485,6 +4584,11 @@ packages: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} dev: false + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: false + /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -3502,6 +4606,12 @@ packages: engines: {node: '>=0.10.0'} dev: false + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: false + /prettier@3.1.1: resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} engines: {node: '>=14'} @@ -3685,6 +4795,18 @@ packages: util-deprecate: 1.0.2 dev: false + /readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: false + + /reduce-flatten@2.0.0: + resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} + engines: {node: '>=6'} + dev: false + /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: false @@ -3726,6 +4848,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: false + /require-main-filename@1.0.1: resolution: {integrity: sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==} dev: false @@ -3734,6 +4861,12 @@ packages: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} dev: false + /resolve@1.17.0: + resolution: {integrity: sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==} + dependencies: + path-parse: 1.0.7 + dev: false + /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -3851,6 +4984,12 @@ packages: upper-case-first: 1.1.2 dev: false + /serialize-javascript@6.0.0: + resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + dependencies: + randombytes: 2.1.0 + dev: false + /serve-static@1.15.0: resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} engines: {node: '>= 0.8.0'} @@ -3964,11 +5103,41 @@ packages: yargs: 4.8.1 dev: false + /solc@0.7.3(debug@4.3.4): + resolution: {integrity: sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==} + engines: {node: '>=8.0.0'} + hasBin: true + dependencies: + command-exists: 1.2.9 + commander: 3.0.2 + follow-redirects: 1.15.6(debug@4.3.4) + fs-extra: 0.30.0 + js-sha3: 0.8.0 + memorystream: 0.3.1 + require-from-string: 2.0.2 + semver: 5.7.2 + tmp: 0.0.33 + transitivePeerDependencies: + - debug + dev: false + + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: false + /source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} dev: false + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: false + /spdx-correct@3.2.0: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: @@ -4007,6 +5176,13 @@ packages: tweetnacl: 0.14.5 dev: false + /stacktrace-parser@0.1.10: + resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} + engines: {node: '>=6'} + dependencies: + type-fest: 0.7.1 + dev: false + /statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} @@ -4047,6 +5223,10 @@ packages: engines: {node: '>=0.10.0'} dev: false + /string-format@2.0.0: + resolution: {integrity: sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==} + dev: false + /string-width@1.0.2: resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} engines: {node: '>=0.10.0'} @@ -4056,6 +5236,15 @@ packages: strip-ansi: 3.0.1 dev: false + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: false + /string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} dependencies: @@ -4082,6 +5271,13 @@ packages: ansi-regex: 3.0.1 dev: false + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: false + /strip-bom@2.0.0: resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} engines: {node: '>=0.10.0'} @@ -4106,6 +5302,11 @@ packages: engines: {node: '>=0.10.0'} dev: false + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: false + /subarg@1.0.0: resolution: {integrity: sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==} dependencies: @@ -4119,6 +5320,20 @@ packages: has-flag: 3.0.0 dev: false + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: false + + /supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + dependencies: + has-flag: 4.0.0 + dev: false + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -4157,6 +5372,16 @@ packages: acorn-node: 1.8.2 dev: false + /table-layout@1.0.2: + resolution: {integrity: sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==} + engines: {node: '>=8.0.0'} + dependencies: + array-back: 4.0.2 + deep-extend: 0.6.0 + typical: 5.2.0 + wordwrapjs: 4.0.1 + dev: false + /tar@4.4.19: resolution: {integrity: sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==} engines: {node: '>=4.5'} @@ -4205,6 +5430,20 @@ packages: upper-case: 1.1.3 dev: false + /tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + dependencies: + os-tmpdir: 1.0.2 + dev: false + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: false + /toidentifier@1.0.1: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} @@ -4222,6 +5461,24 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false + /ts-command-line-args@2.5.1: + resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} + hasBin: true + dependencies: + chalk: 4.1.2 + command-line-args: 5.2.1 + command-line-usage: 6.1.3 + string-format: 2.0.0 + dev: false + + /ts-essentials@7.0.3(typescript@5.3.3): + resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} + peerDependencies: + typescript: '>=3.7.0' + dependencies: + typescript: 5.3.3 + dev: false + /tsconfig@5.0.3: resolution: {integrity: sha512-Cq65A3kVp6BbsUgg9DRHafaGmbMb9EhAc7fjWvudNWKjkbWrt43FnrtZt6awshH1R0ocfF2Z0uxock3lVqEgOg==} dependencies: @@ -4248,6 +5505,14 @@ packages: typescript: 5.3.3 dev: false + /tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + dev: false + + /tsort@0.0.1: + resolution: {integrity: sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==} + dev: false + /tty-browserify@0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} dev: false @@ -4258,15 +5523,38 @@ packages: safe-buffer: 5.2.1 dev: false + /tweetnacl-util@0.15.1: + resolution: {integrity: sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==} + dev: false + /tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} dev: false + /tweetnacl@1.0.3: + resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} + dev: false + /type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} dev: false + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: false + + /type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + dev: false + + /type-fest@0.7.1: + resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} + engines: {node: '>=8'} + dev: false + /type-is@1.6.18: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} @@ -4283,6 +5571,27 @@ packages: resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} dev: false + /typechain@8.3.2(typescript@5.3.3): + resolution: {integrity: sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==} + hasBin: true + peerDependencies: + typescript: '>=4.3.0' + dependencies: + '@types/prettier': 2.7.3 + debug: 4.3.4(supports-color@8.1.1) + fs-extra: 7.0.1 + glob: 7.1.7 + js-sha3: 0.8.0 + lodash: 4.17.21 + mkdirp: 1.0.4 + prettier: 2.8.8 + ts-command-line-args: 2.5.1 + ts-essentials: 7.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: false + /typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} dependencies: @@ -4298,6 +5607,16 @@ packages: engines: {node: '>=14.17'} hasBin: true + /typical@4.0.0: + resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==} + engines: {node: '>=8'} + dev: false + + /typical@5.2.0: + resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} + engines: {node: '>=8'} + dev: false + /ultron@1.1.1: resolution: {integrity: sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==} dev: false @@ -4322,11 +5641,23 @@ packages: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: false + /undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + dependencies: + '@fastify/busboy': 2.1.1 + dev: false + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} dev: false + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + dev: false + /unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} @@ -4407,6 +5738,11 @@ packages: hasBin: true dev: false + /uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + dev: false + /uuid@9.0.1: resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true @@ -5072,12 +6408,31 @@ packages: has-tostringtag: 1.0.0 dev: false + /widest-line@3.1.0: + resolution: {integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==} + engines: {node: '>=8'} + dependencies: + string-width: 4.2.3 + dev: false + /window-size@0.2.0: resolution: {integrity: sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw==} engines: {node: '>= 0.10.0'} hasBin: true dev: false + /wordwrapjs@4.0.1: + resolution: {integrity: sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==} + engines: {node: '>=8.0.0'} + dependencies: + reduce-flatten: 2.0.0 + typical: 5.2.0 + dev: false + + /workerpool@6.2.1: + resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} + dev: false + /wrap-ansi@2.1.0: resolution: {integrity: sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==} engines: {node: '>=0.10.0'} @@ -5086,6 +6441,15 @@ packages: strip-ansi: 3.0.1 dev: false + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: false + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: false @@ -5173,6 +6537,11 @@ packages: resolution: {integrity: sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==} dev: false + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: false + /yaeti@0.0.6: resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==} engines: {node: '>=0.10.32'} @@ -5193,6 +6562,34 @@ packages: lodash.assign: 4.2.0 dev: false + /yargs-parser@20.2.4: + resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + engines: {node: '>=10'} + dev: false + + /yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + dev: false + + /yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + dependencies: + cliui: 7.0.4 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.4 + dev: false + /yargs@4.8.1: resolution: {integrity: sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA==} dependencies: @@ -5211,3 +6608,8 @@ packages: y18n: 3.2.2 yargs-parser: 2.4.1 dev: false + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: false diff --git a/src/common.js b/src/common.js new file mode 100644 index 0000000..8e3731e --- /dev/null +++ b/src/common.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.commonConfig = exports.base64Image = void 0; +var dotenv = require("dotenv"); +dotenv.config(); +// NOTE: Update this with your own base64 image +exports.base64Image = ""; +exports.commonConfig = { + chainId: 8453, + poolId: 0, + nonce: Math.floor(Math.random() * 10000), + rpc: process.env.NEXT_PUBLIC_RPC_URL, // arbitrum-sepolia + ownerProfileId: "0x57132bcaad3cb1af283f89a53a438ded9329002893a3bb070b9908fb9ed4929d", + ownerAddress: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + anchorAddress: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + profileName: "Allo Workshop", + managers: [], + application: { + requestedAmount: BigInt(0), + recipientAddress: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + profileId: "0x57132bcaad3cb1af283f89a53a438ded9329002893a3bb070b9908fb9ed4929d", + name: "Test Application", + website: "https://docs.allo.gitcoin.co/", + profileName: "Jax Test", + email: "test@gitcoin.co", + description: "This is a test application", + base64Image: exports.base64Image, + }, + metadata: { + protocol: BigInt(1), // NOTE: This is the pointer to the metadata on IPFS + pointer: "bafybeia4khbew3r2mkflyn7nzlvfzcb3qpfeftz5ivpzfwn77ollj47gqi", + }, + recipientId: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + members: [], + pool: { + profileId: "0x", + name: "Test Debate Pool", + description: "A pool for debate demo", + website: "https://allo.gitcoin.co/", + base64Image: exports.base64Image, + }, +}; diff --git a/src/common.ts b/src/common.ts new file mode 100644 index 0000000..c17d093 --- /dev/null +++ b/src/common.ts @@ -0,0 +1,66 @@ +import { TNewApplication, TPoolMetadata } from "./types"; +import * as dotenv from "dotenv"; + +dotenv.config(); + +type CommonConfig = { + chainId: number; + poolId: number; + nonce: number; + rpc: string; + ownerProfileId: `0x${string}`; + ownerAddress: `0x${string}`; + anchorAddress: `0x${string}`; + profileName: string; + managers: `0x${string}`[]; + application: TNewApplication; + recipientId: `0x${string}`; + metadata: { + protocol: bigint; + pointer: string; + }; + members: `0x${string}`[]; + pool: TPoolMetadata; +}; + +// NOTE: Update this with your own base64 image +export const base64Image = ``; + +export const commonConfig: CommonConfig = { + chainId: 8453, + poolId: 0, + nonce: Math.floor(Math.random() * 10000), + rpc: process.env.NEXT_PUBLIC_RPC_URL as string, // arbitrum-sepolia + ownerProfileId: + "0x57132bcaad3cb1af283f89a53a438ded9329002893a3bb070b9908fb9ed4929d", + ownerAddress: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + anchorAddress: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + profileName: "Allo Workshop", + managers: [], + application: { + requestedAmount: BigInt(0), + recipientAddress: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + profileId: + "0x57132bcaad3cb1af283f89a53a438ded9329002893a3bb070b9908fb9ed4929d", + name: "Test Application", + website: "https://docs.allo.gitcoin.co/", + profileName: "Jax Test", + email: "test@gitcoin.co", + description: "This is a test application", + base64Image: base64Image, + }, + metadata: { + protocol: BigInt(1), // NOTE: This is the pointer to the metadata on IPFS + pointer: "bafybeia4khbew3r2mkflyn7nzlvfzcb3qpfeftz5ivpzfwn77ollj47gqi", + }, + recipientId: "0x3f15B8c6F9939879Cb030D6dd935348E57109637", + members: [], + pool: { + profileId: + "0x", + name: "Test Debate Pool", + description: "A pool for debate demo", + website: "https://allo.gitcoin.co/", + base64Image: base64Image, + }, +}; diff --git a/src/create-pool-manager.js b/src/create-pool-manager.js new file mode 100644 index 0000000..f0c5ca1 --- /dev/null +++ b/src/create-pool-manager.js @@ -0,0 +1,97 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var viem_1 = require("viem"); +var allo_v2_sdk_1 = require("@allo-team/allo-v2-sdk"); +var chains_1 = require("viem/chains"); +var accounts_1 = require("viem/accounts"); +var constants_1 = require("./lib/constants"); +var dotenv = require("dotenv"); +var sendTransaction_1 = require("viem/_types/actions/wallet/sendTransaction"); +var common_1 = require("./common"); +var wagmi_1 = require("./wagmi"); +// import { getEventValues } from "./lib/utils"; +dotenv.config(); +var registry = new allo_v2_sdk_1.Registry({ + chain: chains_1.base.id, + rpc: process.env.RPC_URL, +}); +function main() { + return __awaiter(this, void 0, void 0, function () { + var walletClient, createProfileArgs, txData, txHash, receipt; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + walletClient = (0, viem_1.createWalletClient)({ + chain: chains_1.base, + transport: (0, viem_1.http)(process.env.RPC_URL), + account: (0, accounts_1.privateKeyToAccount)(process.env.DEPLOYER_PRIVATE_KEY), + }); + createProfileArgs = { + nonce: BigInt(common_1.commonConfig.nonce), + name: common_1.commonConfig.profileName, + metadata: common_1.commonConfig.metadata, + owner: common_1.commonConfig.ownerAddress, + members: common_1.commonConfig.members, + }; + console.log("Creating profile with args: ", createProfileArgs); + return [4 /*yield*/, registry.createProfile(createProfileArgs)]; + case 1: + txData = _a.sent(); + return [4 /*yield*/, (0, sendTransaction_1.sendTransaction)(walletClient, { + account: walletClient.account, + to: constants_1.ALLO_REGISTRY_ADDRESS, + data: txData.data, + })]; + case 2: + txHash = _a.sent(); + return [4 /*yield*/, wagmi_1.publicClient.waitForTransactionReceipt({ + hash: txHash, + confirmations: 2, + })]; + case 3: + receipt = _a.sent(); + console.log(receipt); + return [2 /*return*/]; + } + }); + }); +} +main() + .then(function () { return process.exit(); }) + .catch(function (err) { return console.error(err); }); diff --git a/src/create-pool-manager.ts b/src/create-pool-manager.ts index 2b7952f..129643f 100644 --- a/src/create-pool-manager.ts +++ b/src/create-pool-manager.ts @@ -5,46 +5,68 @@ import { http, Address, } from "viem"; -import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk"; -import { optimism } from "viem/chains"; +import { CreateProfileArgs, Registry, SQFSuperFluidStrategy, TransactionData } from "@allo-team/allo-v2-sdk"; +import { base, optimism } from "viem/chains"; import { privateKeyToAccount } from "viem/accounts"; import { registryAbi } from "./lib/abi/registry"; import { ALLO_REGISTRY_ADDRESS } from "./lib/constants"; -import dotenv from "dotenv"; +import * as dotenv from "dotenv"; +import { sendTransaction } from "viem/_types/actions/wallet/sendTransaction"; +import { commonConfig } from "./common"; +import { publicClient } from "./wagmi"; +// import { getEventValues } from "./lib/utils"; + dotenv.config(); -const poolManagerAddress = "0x8FC4308da9310479dF48ef77142Eef05c363e099" -const profile = { - name: "Pool Manager", - metadata: { protocol: BigInt(1), pointer: "ipfs://" }, - members: [poolManagerAddress], -}; +const registry = new Registry({ + chain: base.id, + rpc: process.env.RPC_URL as string, +}); async function main() { - const publicClient = createPublicClient({ - chain: optimism, + const walletClient = createWalletClient({ + chain: base, transport: http(process.env.RPC_URL), + account: privateKeyToAccount( + process.env.DEPLOYER_PRIVATE_KEY as `0x${string}`, + ), }); - const { name, metadata, members } = profile; + const createProfileArgs: CreateProfileArgs = { + nonce: BigInt(commonConfig.nonce), + name: commonConfig.profileName, + metadata: commonConfig.metadata, + owner: commonConfig.ownerAddress, + members: commonConfig.members, + }; + + console.log("Creating profile with args: ", createProfileArgs); + + // create the transaction with the arguments -> type comes from SDK + // todo: snippet => createProfileTx + const txData: TransactionData = await registry.createProfile( + createProfileArgs + ); - const nonce = await publicClient.getTransactionCount({ - address: poolManagerAddress, + const txHash = await sendTransaction(walletClient, { + account: walletClient.account, + to: ALLO_REGISTRY_ADDRESS, + data: txData.data, }); - const data = encodeFunctionData({ - abi: registryAbi, - functionName: "createProfile", - args: [ - BigInt(nonce), - name, - metadata, - poolManagerAddress, - members as Address[], - ], + + const receipt = await publicClient.waitForTransactionReceipt({ + hash: txHash, + confirmations: 2, }); - console.log("TO: ", ALLO_REGISTRY_ADDRESS); - console.log(data); + console.log(receipt); + + // const profileId = + // getEventValues(receipt, registryAbi, "ProfileCreated").profileId || "0x"; + + // if (profileId === "0x") { + // throw new Error("Profile creation failed"); + // } } main() diff --git a/src/create-pool.js b/src/create-pool.js new file mode 100644 index 0000000..a5b8301 --- /dev/null +++ b/src/create-pool.js @@ -0,0 +1,120 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var viem_1 = require("viem"); +var dist_1 = require("@allo-team/allo-v2-sdk/dist"); +var chains_1 = require("viem/chains"); +var constants_1 = require("./lib/constants"); +var dotenv = require("dotenv"); +var accounts_1 = require("viem/accounts"); +dotenv.config(); +// pool admin profile id 0x5c98d8f8f09192c3b2f8ae590a9a1ff9d64dd21960f5eba6d26aca945cf9f906 +var poolManagerAddress = "0x3f15B8c6F9939879Cb030D6dd935348E57109637"; +var now = (Date.now() / 1000) | 0; +var params = { + useRegistryAnchor: false, + metadataRequired: true, + passportDecoder: constants_1.PASSPORT_DECODER_ADDRESS, + superfluidHost: constants_1.SUPERFLUID_HOST_ADDRESS, + allocationSuperToken: constants_1.DAIX_ADDRESS, + recipientSuperAppFactory: constants_1.RECIPIENT_SUPERAPP_FACTORY, + registrationStartTime: BigInt(now + 600), + registrationEndTime: BigInt(now + 1200), + allocationStartTime: BigInt(1708448426), + allocationEndTime: BigInt(1713743999), + minPassportScore: BigInt(30000), + initialSuperAppBalance: (0, viem_1.parseEther)("0.00000001"), +}; +var metadata = { protocol: BigInt(1), pointer: "ipfs://" }; +function main() { + return __awaiter(this, void 0, void 0, function () { + var strategy, allo, initData, tx, walletClient, receipt; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + strategy = new dist_1.SQFSuperFluidStrategy({ + chain: chains_1.optimismSepolia.id, + rpc: process.env.RPC_URL, + }); + return [4 /*yield*/, strategy.getAllo()]; + case 1: + allo = _a.sent(); + initData = (0, viem_1.encodeAbiParameters)((0, viem_1.parseAbiParameters)("bool, bool, address, address, address, address, uint64, uint64, uint64, uint64, uint256, uint256"), [ + params.useRegistryAnchor, + params.metadataRequired, + params.passportDecoder, + params.superfluidHost, + params.allocationSuperToken, + params.recipientSuperAppFactory, + params.registrationStartTime, + params.registrationEndTime, + params.allocationStartTime, + params.allocationEndTime, + params.minPassportScore, + params.initialSuperAppBalance, + ]); + tx = allo.createPoolWithCustomStrategy({ + profileId: constants_1.POOL_MANAGER_PROFILE_ID, + strategy: constants_1.SQF_STRATEGY_ADDRESS, + initStrategyData: initData, + token: constants_1.ETHX_ADDRESS, + amount: (0, viem_1.parseEther)("0"), + metadata: metadata, + managers: [poolManagerAddress], + }); + console.log(tx); + walletClient = (0, viem_1.createWalletClient)({ + chain: chains_1.optimismSepolia, + transport: (0, viem_1.http)(process.env.RPC_URL), + account: (0, accounts_1.privateKeyToAccount)(process.env.DEPLOYER_PRIVATE_KEY), + }); + return [4 /*yield*/, walletClient.sendTransaction({ + to: tx.to, + data: tx.data, + })]; + case 2: + receipt = _a.sent(); + console.log(receipt); + return [2 /*return*/]; + } + }); + }); +} +main() + .then(function () { return process.exit(); }) + .catch(function (err) { return console.error(err); }); diff --git a/src/create-pool.ts b/src/create-pool.ts index 542d721..c2a7faf 100644 --- a/src/create-pool.ts +++ b/src/create-pool.ts @@ -5,10 +5,10 @@ import { http, Address, parseAbiParameters, - encodeAbiParameters + encodeAbiParameters, } from "viem"; -import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk"; -import { optimism } from "viem/chains"; +import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk/dist"; +import { optimismSepolia } from "viem/chains"; import { PASSPORT_DECODER_ADDRESS, SUPERFLUID_HOST_ADDRESS, @@ -18,13 +18,15 @@ import { POOL_MANAGER_PROFILE_ID, RECIPIENT_SUPERAPP_FACTORY, } from "./lib/constants"; -import dotenv from "dotenv"; +import * as dotenv from "dotenv"; +import { privateKeyToAccount } from "viem/accounts"; dotenv.config(); -const poolManagerAddress = "0x8FC4308da9310479dF48ef77142Eef05c363e099" +// pool admin profile id 0x5c98d8f8f09192c3b2f8ae590a9a1ff9d64dd21960f5eba6d26aca945cf9f906 +const poolManagerAddress = "0x3f15B8c6F9939879Cb030D6dd935348E57109637"; const now = (Date.now() / 1000) | 0; const params = { - useRegistryAnchor: true, + useRegistryAnchor: false, metadataRequired: true, passportDecoder: PASSPORT_DECODER_ADDRESS as Address, superfluidHost: SUPERFLUID_HOST_ADDRESS as Address, @@ -32,38 +34,38 @@ const params = { recipientSuperAppFactory: RECIPIENT_SUPERAPP_FACTORY as Address, registrationStartTime: BigInt(now + 600), registrationEndTime: BigInt(now + 1200), - allocationStartTime: BigInt(1708448426), - allocationEndTime: BigInt(1713743999), - minPassportScore: BigInt(30000), + allocationStartTime: BigInt(new Date().getTime() / 1000 + 1200), + allocationEndTime: BigInt(new Date().getTime() / 1000 + 18000), + minPassportScore: BigInt(0), initialSuperAppBalance: parseEther("0.00000001"), }; const metadata = { protocol: BigInt(1), pointer: "ipfs://" }; async function main() { const strategy = new SQFSuperFluidStrategy({ - chain: optimism.id, + chain: optimismSepolia.id, rpc: process.env.RPC_URL, }); const allo = await strategy.getAllo(); const initData: `0x${string}` = encodeAbiParameters( - parseAbiParameters( - "bool, bool, address, address, address, address, uint64, uint64, uint64, uint64, uint256, uint256", - ), - [ - params.useRegistryAnchor, - params.metadataRequired, - params.passportDecoder, - params.superfluidHost, - params.allocationSuperToken, - params.recipientSuperAppFactory, - params.registrationStartTime, - params.registrationEndTime, - params.allocationStartTime, - params.allocationEndTime, - params.minPassportScore, - params.initialSuperAppBalance, - ], - ); + parseAbiParameters( + "bool, bool, address, address, address, address, uint64, uint64, uint64, uint64, uint256, uint256", + ), + [ + params.useRegistryAnchor, + params.metadataRequired, + params.passportDecoder, + params.superfluidHost, + params.allocationSuperToken, + params.recipientSuperAppFactory, + params.registrationStartTime, + params.registrationEndTime, + params.allocationStartTime, + params.allocationEndTime, + params.minPassportScore, + params.initialSuperAppBalance, + ], + ); const tx = allo.createPoolWithCustomStrategy({ profileId: POOL_MANAGER_PROFILE_ID, strategy: SQF_STRATEGY_ADDRESS, @@ -75,6 +77,22 @@ async function main() { }); console.log(tx); + + const walletClient = createWalletClient({ + chain: optimismSepolia, + transport: http(process.env.RPC_URL), + account: privateKeyToAccount( + process.env.DEPLOYER_PRIVATE_KEY as `0x${string}`, + ), + }); + + const receipt = await walletClient.sendTransaction({ + to: tx.to, + data: tx.data, + value: BigInt(tx.value), + }); + + console.log(receipt); } main() diff --git a/src/create-profile.ts b/src/create-profile.ts index 9fa9785..9a06755 100644 --- a/src/create-profile.ts +++ b/src/create-profile.ts @@ -12,42 +12,17 @@ import { ALLO_REGISTRY_ADDRESS } from "./lib/constants"; import dotenv from "dotenv"; dotenv.config(); -const poolManagerAddress = "0x8FC4308da9310479dF48ef77142Eef05c363e099"; +const poolManagerAddress = "0x3f15B8c6F9939879Cb030D6dd935348E57109637"; const profiles = [ { name: "Geo Web", metadata: { protocol: BigInt(1), pointer: "ipfs://" }, members: ["0xE9222B92790cB72ec31A96Df3eeDf3fE8Da5EB10"], }, - { - name: "RadicalxChange", - metadata: { protocol: BigInt(1), pointer: "ipfs://" }, - members: ["0x3945d766185e2264900c84fac10958b3619c2bd4"], - }, - { - name: "Public Goods Wave Pool", - metadata: { protocol: BigInt(1), pointer: "ipfs://" }, - members: ["0xF04a7dF3CaaAdc7a38696aF934C3a8Ef2b71e207"], - }, - { - name: "AW House", - metadata: { protocol: BigInt(1), pointer: "ipfs://" }, - members: ["0x1626Cc835842C480c1689A0A69AA419B9F761a4e"], - }, - { - name: "Coin Center", - metadata: { protocol: BigInt(1), pointer: "ipfs://" }, - members: ["0x5bb38AE066987922b0C67aC8d2aF215EFEE8894f"], - }, - { - name: "web3.js", - metadata: { protocol: BigInt(1), pointer: "ipfs://" }, - members: ["0x1C44478A9a1c60B4f555aaAbc9C510eAF3927071"], - }, ]; async function main() { - const publicClient = createPublicClient({ + const walletClient = createWalletClient({ chain: optimism, transport: http(process.env.RPC_URL), }); @@ -74,6 +49,8 @@ async function main() { console.log(name, data); console.log("------------------------------------------------------------"); + + } } diff --git a/src/distribute.ts b/src/distribute.ts index f76abd8..0d0f954 100644 --- a/src/distribute.ts +++ b/src/distribute.ts @@ -6,7 +6,7 @@ import { http, Address, } from "viem"; -import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk"; +import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk/dist"; import { optimism } from "viem/chains"; import { strategyAbi } from "./lib/abi/strategy"; import { @@ -24,7 +24,7 @@ async function main() { chain: optimism.id, rpc: process.env.RPC_URL, address: SQF_STRATEGY_ADDRESS, - poolId: ALLO_POOL_ID, + poolId: BigInt(ALLO_POOL_ID), }); const distributeData = strategy.getDistributeData(amount); diff --git a/src/lib/abi/Allo.ts b/src/lib/abi/Allo.ts new file mode 100644 index 0000000..987405b --- /dev/null +++ b/src/lib/abi/Allo.ts @@ -0,0 +1,777 @@ +export const AlloABI = [ + { inputs: [], name: "ALLOCATION_ACTIVE", type: "error" }, + { inputs: [], name: "ALLOCATION_NOT_ACTIVE", type: "error" }, + { inputs: [], name: "ALLOCATION_NOT_ENDED", type: "error" }, + { inputs: [], name: "ALREADY_INITIALIZED", type: "error" }, + { inputs: [], name: "AMOUNT_MISMATCH", type: "error" }, + { inputs: [], name: "ANCHOR_ERROR", type: "error" }, + { inputs: [], name: "ARRAY_MISMATCH", type: "error" }, + { inputs: [], name: "INVALID", type: "error" }, + { inputs: [], name: "INVALID_ADDRESS", type: "error" }, + { inputs: [], name: "INVALID_FEE", type: "error" }, + { inputs: [], name: "INVALID_METADATA", type: "error" }, + { inputs: [], name: "INVALID_REGISTRATION", type: "error" }, + { inputs: [], name: "IS_APPROVED_STRATEGY", type: "error" }, + { inputs: [], name: "MISMATCH", type: "error" }, + { inputs: [], name: "NONCE_NOT_AVAILABLE", type: "error" }, + { inputs: [], name: "NOT_APPROVED_STRATEGY", type: "error" }, + { inputs: [], name: "NOT_ENOUGH_FUNDS", type: "error" }, + { inputs: [], name: "NOT_INITIALIZED", type: "error" }, + { inputs: [], name: "NOT_PENDING_OWNER", type: "error" }, + { inputs: [], name: "NewOwnerIsZeroAddress", type: "error" }, + { inputs: [], name: "NoHandoverRequest", type: "error" }, + { inputs: [], name: "POOL_ACTIVE", type: "error" }, + { inputs: [], name: "POOL_INACTIVE", type: "error" }, + { inputs: [], name: "RECIPIENT_ALREADY_ACCEPTED", type: "error" }, + { + inputs: [{ internalType: "address", name: "recipientId", type: "address" }], + name: "RECIPIENT_ERROR", + type: "error", + }, + { inputs: [], name: "RECIPIENT_NOT_ACCEPTED", type: "error" }, + { inputs: [], name: "REGISTRATION_NOT_ACTIVE", type: "error" }, + { inputs: [], name: "UNAUTHORIZED", type: "error" }, + { inputs: [], name: "Unauthorized", type: "error" }, + { inputs: [], name: "ZERO_ADDRESS", type: "error" }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BaseFeePaid", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "baseFee", + type: "uint256", + }, + ], + name: "BaseFeeUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: "uint8", name: "version", type: "uint8" }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "OwnershipHandoverCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "OwnershipHandoverRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "percentFee", + type: "uint256", + }, + ], + name: "PercentFeeUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "profileId", + type: "bytes32", + }, + { + indexed: false, + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + indexed: false, + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + ], + name: "PoolCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { indexed: false, internalType: "uint256", name: "fee", type: "uint256" }, + ], + name: "PoolFunded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "poolId", + type: "uint256", + }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + indexed: false, + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + ], + name: "PoolMetadataUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "registry", + type: "address", + }, + ], + name: "RegistryUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "strategy", + type: "address", + }, + ], + name: "StrategyApproved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "strategy", + type: "address", + }, + ], + name: "StrategyRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "treasury", + type: "address", + }, + ], + name: "TreasuryUpdated", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NATIVE", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "address", name: "_manager", type: "address" }, + ], + name: "addPoolManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_strategy", type: "address" }], + name: "addToCloneableStrategies", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "bytes", name: "_data", type: "bytes" }, + ], + name: "allocate", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256[]", name: "_poolIds", type: "uint256[]" }, + { internalType: "bytes[]", name: "_datas", type: "bytes[]" }, + ], + name: "batchAllocate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256[]", name: "_poolIds", type: "uint256[]" }, + { internalType: "bytes[]", name: "_data", type: "bytes[]" }, + ], + name: "batchRegisterRecipient", + outputs: [ + { internalType: "address[]", name: "recipientIds", type: "address[]" }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "cancelOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "pendingOwner", type: "address" }, + ], + name: "completeOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address", name: "_strategy", type: "address" }, + { internalType: "bytes", name: "_initStrategyData", type: "bytes" }, + { internalType: "address", name: "_token", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "_metadata", + type: "tuple", + }, + { internalType: "address[]", name: "_managers", type: "address[]" }, + ], + name: "createPool", + outputs: [{ internalType: "uint256", name: "poolId", type: "uint256" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address", name: "_strategy", type: "address" }, + { internalType: "bytes", name: "_initStrategyData", type: "bytes" }, + { internalType: "address", name: "_token", type: "address" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "_metadata", + type: "tuple", + }, + { internalType: "address[]", name: "_managers", type: "address[]" }, + ], + name: "createPoolWithCustomStrategy", + outputs: [{ internalType: "uint256", name: "poolId", type: "uint256" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "address[]", name: "_recipientIds", type: "address[]" }, + { internalType: "bytes", name: "_data", type: "bytes" }, + ], + name: "distribute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "uint256", name: "_amount", type: "uint256" }, + ], + name: "fundPool", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getBaseFee", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFeeDenominator", + outputs: [ + { internalType: "uint256", name: "FEE_DENOMINATOR", type: "uint256" }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "getPercentFee", + outputs: [{ internalType: "uint256", name: "", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_poolId", type: "uint256" }], + name: "getPool", + outputs: [ + { + components: [ + { internalType: "bytes32", name: "profileId", type: "bytes32" }, + { + internalType: "contract IStrategy", + name: "strategy", + type: "address", + }, + { internalType: "address", name: "token", type: "address" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + { internalType: "bytes32", name: "managerRole", type: "bytes32" }, + { internalType: "bytes32", name: "adminRole", type: "bytes32" }, + ], + internalType: "struct IAllo.Pool", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRegistry", + outputs: [ + { internalType: "contract IRegistry", name: "", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }], + name: "getRoleAdmin", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_poolId", type: "uint256" }], + name: "getStrategy", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTreasury", + outputs: [{ internalType: "address payable", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "hasRole", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_owner", type: "address" }, + { internalType: "address", name: "_registry", type: "address" }, + { internalType: "address payable", name: "_treasury", type: "address" }, + { internalType: "uint256", name: "_percentFee", type: "uint256" }, + { internalType: "uint256", name: "_baseFee", type: "uint256" }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_strategy", type: "address" }], + name: "isCloneableStrategy", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "address", name: "_address", type: "address" }, + ], + name: "isPoolAdmin", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "address", name: "_address", type: "address" }, + ], + name: "isPoolManager", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [{ internalType: "address", name: "result", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "pendingOwner", type: "address" }, + ], + name: "ownershipHandoverExpiresAt", + outputs: [{ internalType: "uint256", name: "result", type: "uint256" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_recipient", type: "address" }, + ], + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "bytes", name: "_data", type: "bytes" }, + ], + name: "registerRecipient", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_strategy", type: "address" }], + name: "removeFromCloneableStrategies", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { internalType: "address", name: "_manager", type: "address" }, + ], + name: "removePoolManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "requestOwnershipHandover", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "revokeRole", + 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: [{ internalType: "address", name: "newOwner", type: "address" }], + name: "transferOwnership", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_baseFee", type: "uint256" }], + name: "updateBaseFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "uint256", name: "_percentFee", type: "uint256" }], + name: "updatePercentFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_poolId", type: "uint256" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "_metadata", + type: "tuple", + }, + ], + name: "updatePoolMetadata", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_registry", type: "address" }], + name: "updateRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address payable", name: "_treasury", type: "address" }, + ], + name: "updateTreasury", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/src/lib/abi/registry.js b/src/lib/abi/registry.js new file mode 100644 index 0000000..d2ef591 --- /dev/null +++ b/src/lib/abi/registry.js @@ -0,0 +1,529 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.registryAbi = void 0; +exports.registryAbi = [ + { inputs: [], name: "ALLOCATION_ACTIVE", type: "error" }, + { inputs: [], name: "ALLOCATION_NOT_ACTIVE", type: "error" }, + { inputs: [], name: "ALLOCATION_NOT_ENDED", type: "error" }, + { inputs: [], name: "ALREADY_INITIALIZED", type: "error" }, + { inputs: [], name: "AMOUNT_MISMATCH", type: "error" }, + { inputs: [], name: "ANCHOR_ERROR", type: "error" }, + { inputs: [], name: "ARRAY_MISMATCH", type: "error" }, + { inputs: [], name: "INVALID", type: "error" }, + { inputs: [], name: "INVALID_ADDRESS", type: "error" }, + { inputs: [], name: "INVALID_FEE", type: "error" }, + { inputs: [], name: "INVALID_METADATA", type: "error" }, + { inputs: [], name: "INVALID_REGISTRATION", type: "error" }, + { inputs: [], name: "IS_APPROVED_STRATEGY", type: "error" }, + { inputs: [], name: "MISMATCH", type: "error" }, + { inputs: [], name: "NONCE_NOT_AVAILABLE", type: "error" }, + { inputs: [], name: "NOT_APPROVED_STRATEGY", type: "error" }, + { inputs: [], name: "NOT_ENOUGH_FUNDS", type: "error" }, + { inputs: [], name: "NOT_INITIALIZED", type: "error" }, + { inputs: [], name: "NOT_PENDING_OWNER", type: "error" }, + { inputs: [], name: "POOL_ACTIVE", type: "error" }, + { inputs: [], name: "POOL_INACTIVE", type: "error" }, + { inputs: [], name: "RECIPIENT_ALREADY_ACCEPTED", type: "error" }, + { + inputs: [{ internalType: "address", name: "recipientId", type: "address" }], + name: "RECIPIENT_ERROR", + type: "error", + }, + { inputs: [], name: "RECIPIENT_NOT_ACCEPTED", type: "error" }, + { inputs: [], name: "REGISTRATION_NOT_ACTIVE", type: "error" }, + { inputs: [], name: "UNAUTHORIZED", type: "error" }, + { inputs: [], name: "ZERO_ADDRESS", type: "error" }, + { + anonymous: false, + inputs: [ + { indexed: false, internalType: "uint8", name: "version", type: "uint8" }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "profileId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { indexed: false, internalType: "string", name: "name", type: "string" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + indexed: false, + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "anchor", + type: "address", + }, + ], + name: "ProfileCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "profileId", + type: "bytes32", + }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + indexed: false, + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + ], + name: "ProfileMetadataUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "profileId", + type: "bytes32", + }, + { indexed: false, internalType: "string", name: "name", type: "string" }, + { + indexed: false, + internalType: "address", + name: "anchor", + type: "address", + }, + ], + name: "ProfileNameUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "profileId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "ProfileOwnerUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "profileId", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "pendingOwner", + type: "address", + }, + ], + name: "ProfilePendingOwnerUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { indexed: true, internalType: "bytes32", name: "role", type: "bytes32" }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + inputs: [], + name: "ALLO_OWNER", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NATIVE", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "_profileId", type: "bytes32" }], + name: "acceptProfileOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address[]", name: "_members", type: "address[]" }, + ], + name: "addMembers", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "", type: "address" }], + name: "anchorToProfileId", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "uint256", name: "_nonce", type: "uint256" }, + { internalType: "string", name: "_name", type: "string" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "_metadata", + type: "tuple", + }, + { internalType: "address", name: "_owner", type: "address" }, + { internalType: "address[]", name: "_members", type: "address[]" }, + ], + name: "createProfile", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_anchor", type: "address" }], + name: "getProfileByAnchor", + outputs: [ + { + components: [ + { internalType: "bytes32", name: "id", type: "bytes32" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "string", name: "name", type: "string" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "anchor", type: "address" }, + ], + internalType: "struct IRegistry.Profile", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "_profileId", type: "bytes32" }], + name: "getProfileById", + outputs: [ + { + components: [ + { internalType: "bytes32", name: "id", type: "bytes32" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "string", name: "name", type: "string" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "anchor", type: "address" }, + ], + internalType: "struct IRegistry.Profile", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }], + name: "getRoleAdmin", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "hasRole", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "address", name: "_owner", type: "address" }], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address", name: "_member", type: "address" }, + ], + name: "isMemberOfProfile", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address", name: "_owner", type: "address" }, + ], + name: "isOwnerOfProfile", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address", name: "_account", type: "address" }, + ], + name: "isOwnerOrMemberOfProfile", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + name: "profileIdToPendingOwner", + outputs: [{ internalType: "address", name: "", type: "address" }], + stateMutability: "view", + type: "function", + }, + { + inputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + name: "profilesById", + outputs: [ + { internalType: "bytes32", name: "id", type: "bytes32" }, + { internalType: "uint256", name: "nonce", type: "uint256" }, + { internalType: "string", name: "name", type: "string" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "metadata", + type: "tuple", + }, + { internalType: "address", name: "owner", type: "address" }, + { internalType: "address", name: "anchor", type: "address" }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", name: "_token", type: "address" }, + { internalType: "address", name: "_recipient", type: "address" }, + ], + name: "recoverFunds", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address[]", name: "_members", type: "address[]" }, + ], + name: "removeMembers", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "role", type: "bytes32" }, + { internalType: "address", name: "account", type: "address" }, + ], + name: "revokeRole", + 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: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { + components: [ + { internalType: "uint256", name: "protocol", type: "uint256" }, + { internalType: "string", name: "pointer", type: "string" }, + ], + internalType: "struct Metadata", + name: "_metadata", + type: "tuple", + }, + ], + name: "updateProfileMetadata", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "string", name: "_name", type: "string" }, + ], + name: "updateProfileName", + outputs: [{ internalType: "address", name: "anchor", type: "address" }], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "bytes32", name: "_profileId", type: "bytes32" }, + { internalType: "address", name: "_pendingOwner", type: "address" }, + ], + name: "updateProfilePendingOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/src/lib/abi/registry.ts b/src/lib/abi/registry.ts index cedf8d5..09daefe 100644 --- a/src/lib/abi/registry.ts +++ b/src/lib/abi/registry.ts @@ -1,4 +1,6 @@ -export const registryAbi = [ +import { ContractAbi } from "../../types"; + +export const registryAbi: ContractAbi = [ { inputs: [], name: "ALLOCATION_ACTIVE", type: "error" }, { inputs: [], name: "ALLOCATION_NOT_ACTIVE", type: "error" }, { inputs: [], name: "ALLOCATION_NOT_ENDED", type: "error" }, diff --git a/src/lib/constants.js b/src/lib/constants.js new file mode 100644 index 0000000..8e02841 --- /dev/null +++ b/src/lib/constants.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ALLO_POOL_ID = exports.SQF_STRATEGY_ADDRESS = exports.RECIPIENT_SUPERAPP_FACTORY = exports.POOL_MANAGER_PROFILE_ID = exports.ALLO_CONTRACT_ADDRESS = exports.ALLO_REGISTRY_ADDRESS = exports.GDA_CONTRACT_ADDRESS = exports.SUPERFLUID_RESOLVER_ADDRESS = exports.SUPERFLUID_HOST_ADDRESS = exports.PASSPORT_DECODER_ADDRESS = exports.ETHX_ADDRESS = exports.DAI_ADDRESS = exports.DAIX_ADDRESS = exports.ZERO_ADDRESS = void 0; +exports.ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; +exports.DAIX_ADDRESS = "0xD6FAF98BeFA647403cc56bDB598690660D5257d2"; +exports.DAI_ADDRESS = "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"; +exports.ETHX_ADDRESS = "0x4ac8bD1bDaE47beeF2D1c6Aa62229509b962Aa0d"; +exports.PASSPORT_DECODER_ADDRESS = "0x5558D441779Eca04A329BcD6b47830D2C6607769"; +exports.SUPERFLUID_HOST_ADDRESS = "0x567c4B141ED61923967cA25Ef4906C8781069a10"; +exports.SUPERFLUID_RESOLVER_ADDRESS = "0x743B5f46BC86caF41bE4956d9275721E0531B186"; +exports.GDA_CONTRACT_ADDRESS = "0xd453d38A001B47271488886532f1CCeAbf0c7eF3"; +exports.ALLO_REGISTRY_ADDRESS = "0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3"; +exports.ALLO_CONTRACT_ADDRESS = "0x1133eA7Af70876e64665ecD07C0A0476d09465a1"; +// This is a new created profile for demo +exports.POOL_MANAGER_PROFILE_ID = "0x57132bcaad3cb1af283f89a53a438ded9329002893a3bb070b9908fb9ed4929d"; +exports.RECIPIENT_SUPERAPP_FACTORY = "0x235d1DeaFd6097066c75Da0147E026daA1bD6166"; +exports.SQF_STRATEGY_ADDRESS = "0x1965974a689af3f8c3b3ef9a20c09dd62b1ee8d8"; +exports.ALLO_POOL_ID = 22; diff --git a/src/lib/constants.ts b/src/lib/constants.ts index c0ad7e9..ed44986 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -1,5 +1,5 @@ export const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000"; -export const DAIX_ADDRESS = "0x7d342726B69C28D942ad8BfE6Ac81b972349d524"; +export const DAIX_ADDRESS = "0xD6FAF98BeFA647403cc56bDB598690660D5257d2"; export const DAI_ADDRESS = "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"; export const ETHX_ADDRESS = "0x4ac8bD1bDaE47beeF2D1c6Aa62229509b962Aa0d"; export const PASSPORT_DECODER_ADDRESS = @@ -9,15 +9,16 @@ export const SUPERFLUID_HOST_ADDRESS = export const SUPERFLUID_RESOLVER_ADDRESS = "0x743B5f46BC86caF41bE4956d9275721E0531B186"; export const GDA_CONTRACT_ADDRESS = - "0x68Ae17fa7a31b86F306c383277552fd4813b0d35"; + "0xd453d38A001B47271488886532f1CCeAbf0c7eF3"; export const ALLO_REGISTRY_ADDRESS = "0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3"; export const ALLO_CONTRACT_ADDRESS = "0x1133eA7Af70876e64665ecD07C0A0476d09465a1"; +// This is a new created profile for demo export const POOL_MANAGER_PROFILE_ID = - "0xCC3509068DFB6604965939F100E57DDE21E9D764D8CE4B34284BBE9364B1F5ED"; + "0x57132bcaad3cb1af283f89a53a438ded9329002893a3bb070b9908fb9ed4929d"; export const RECIPIENT_SUPERAPP_FACTORY = "0x235d1DeaFd6097066c75Da0147E026daA1bD6166"; export const SQF_STRATEGY_ADDRESS = - "0xadd2efb7f87db4003c50d4ae60bcc82b255f9222"; -export const ALLO_POOL_ID = 2; + "0x1965974a689af3f8c3b3ef9a20c09dd62b1ee8d8"; +export const ALLO_POOL_ID = 22; diff --git a/src/lib/ipfs.js b/src/lib/ipfs.js new file mode 100644 index 0000000..08fda52 --- /dev/null +++ b/src/lib/ipfs.js @@ -0,0 +1,178 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getIPFSClient = void 0; +var getIPFSClient = function () { + var jwt = process.env.NEXT_PUBLIC_PINATA_JWT; + var readGateway = process.env.NEXT_PUBLIC_IPFS_READ_GATEWAY; + var writeGateway = process.env.NEXT_PUBLIC_IPFS_WRITE_GATEWAY; + if (!jwt || !readGateway || !writeGateway) { + throw new Error("Missing IPFS configuration"); + } + return new IPFSClient({ + jwt: jwt, + readGateway: readGateway, + writeGateway: writeGateway, + }); +}; +exports.getIPFSClient = getIPFSClient; +var IPFSClient = /** @class */ (function () { + function IPFSClient(config) { + this.jwt = config.jwt; + this.readGateway = config.readGateway; + this.writeGateway = config.writeGateway; + this.pinJSONToIPFSUrl = "".concat(this.writeGateway, "pinning/pinJSONToIPFS"); + this.pinFileToIPFSUrl = "".concat(this.writeGateway, "pinning/pinFileToIPFS"); + } + IPFSClient.prototype.fileUrl = function (cid) { + return "".concat(this.readGateway, "ipfs/").concat(cid); + }; + IPFSClient.prototype.fetchText = function (cid) { + return __awaiter(this, void 0, void 0, function () { + var url, resp; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + url = this.fileUrl(cid); + return [4 /*yield*/, fetch(url)]; + case 1: + resp = _a.sent(); + return [4 /*yield*/, resp.text()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + IPFSClient.prototype.fetchJson = function (cid) { + return __awaiter(this, void 0, void 0, function () { + var url, resp; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + url = this.fileUrl(cid); + return [4 /*yield*/, fetch(url)]; + case 1: + resp = _a.sent(); + return [4 /*yield*/, resp.json()]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + IPFSClient.prototype.baseRequestData = function (name) { + return { + pinataOptions: { + cidVersion: 1, + }, + pinataMetadata: { + name: name, + keyvalues: { + app: "debate-demo", + }, + }, + }; + }; + IPFSClient.prototype.pinJSON = function (object) { + return __awaiter(this, void 0, void 0, function () { + var data, resp; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + data = __assign(__assign({}, this.baseRequestData("debate-demo")), { pinataContent: object }); + return [4 /*yield*/, fetch(this.pinJSONToIPFSUrl, { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: "Bearer ".concat(this.jwt), + }, + body: JSON.stringify(data), + })]; + case 1: + resp = _a.sent(); + if (resp.ok) { + return [2 /*return*/, resp.json()]; + } + return [4 /*yield*/, Promise.reject(resp)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + IPFSClient.prototype.pinFile = function (file) { + return __awaiter(this, void 0, void 0, function () { + var fd, requestData, resp; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + fd = new FormData(); + requestData = this.baseRequestData("project-image"); + fd.append("file", file); + fd.append("pinataOptions", JSON.stringify(requestData.pinataOptions)); + fd.append("pinataMetadata", JSON.stringify(requestData.pinataMetadata)); + return [4 /*yield*/, fetch(this.pinFileToIPFSUrl, { + method: "POST", + headers: { + Authorization: "Bearer ".concat(this.jwt), + }, + body: fd, + })]; + case 1: + resp = _a.sent(); + if (resp.ok) { + return [2 /*return*/, resp.json()]; + } + return [4 /*yield*/, Promise.reject(resp)]; + case 2: return [2 /*return*/, _a.sent()]; + } + }); + }); + }; + return IPFSClient; +}()); +exports.default = IPFSClient; diff --git a/src/lib/ipfs.ts b/src/lib/ipfs.ts new file mode 100644 index 0000000..69c12dd --- /dev/null +++ b/src/lib/ipfs.ts @@ -0,0 +1,114 @@ +export type Config = { + jwt: string; + readGateway: string; + writeGateway: string; +}; + +export const getIPFSClient = (): IPFSClient => { + + const jwt = process.env.NEXT_PUBLIC_PINATA_JWT; + const readGateway = process.env.NEXT_PUBLIC_IPFS_READ_GATEWAY; + const writeGateway = process.env.NEXT_PUBLIC_IPFS_WRITE_GATEWAY; + + if (!jwt || !readGateway || !writeGateway) { + throw new Error("Missing IPFS configuration"); + } + + return new IPFSClient({ + jwt, + readGateway, + writeGateway, + }); +}; + +export default class IPFSClient { + private jwt: string; + + private readGateway: string; + + private writeGateway: string; + + private pinJSONToIPFSUrl: string; + + private pinFileToIPFSUrl: string; + + constructor(config: Config) { + this.jwt = config.jwt; + this.readGateway = config.readGateway; + this.writeGateway = config.writeGateway; + + this.pinJSONToIPFSUrl = `${this.writeGateway}pinning/pinJSONToIPFS`; + this.pinFileToIPFSUrl = `${this.writeGateway}pinning/pinFileToIPFS`; + } + + fileUrl(cid: string) { + return `${this.readGateway}ipfs/${cid}`; + } + + async fetchText(cid: string) { + const url = this.fileUrl(cid); + const resp = await fetch(url); + return await resp.text(); + } + + async fetchJson(cid: string) { + const url = this.fileUrl(cid); + const resp = await fetch(url); + return await resp.json(); + } + + baseRequestData(name: string) { + return { + pinataOptions: { + cidVersion: 1, + }, + pinataMetadata: { + name, + keyvalues: { + app: "debate-demo", + }, + }, + }; + } + + async pinJSON(object: any) { + const data = { + ...this.baseRequestData("debate-demo"), + pinataContent: object, + }; + + const resp = await fetch(this.pinJSONToIPFSUrl, { + method: "POST", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${this.jwt}`, + }, + body: JSON.stringify(data), + }); + if (resp.ok) { + return resp.json(); + } + return await Promise.reject(resp); + } + + async pinFile(file: Blob) { + const fd = new FormData(); + const requestData = this.baseRequestData("project-image"); + + fd.append("file", file); + fd.append("pinataOptions", JSON.stringify(requestData.pinataOptions)); + fd.append("pinataMetadata", JSON.stringify(requestData.pinataMetadata)); + + const resp = await fetch(this.pinFileToIPFSUrl, { + method: "POST", + headers: { + Authorization: `Bearer ${this.jwt}`, + }, + body: fd, + }); + if (resp.ok) { + return resp.json(); + } + return await Promise.reject(resp); + } +} diff --git a/src/lib/utils.js b/src/lib/utils.js new file mode 100644 index 0000000..e3ef3af --- /dev/null +++ b/src/lib/utils.js @@ -0,0 +1,197 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getEventValues = exports.extractLogByEventName = exports.getStrategyTypeFromStrategyName = exports.NATIVE = exports.formatDateDifference = exports.copy = exports.convertAddressToShortString = exports.convertBytesToShortString = exports.pollUntilMetadataIsAvailable = exports.ethereumHashRegExp = exports.ethereumAddressRegExp = exports.prettyTimestamp = exports.isPoolActive = exports.humanReadableAmount = exports.classNames = void 0; +var ipfs_1 = require("./ipfs"); +var viem_1 = require("viem"); +function classNames() { + var classes = []; + for (var _i = 0; _i < arguments.length; _i++) { + classes[_i] = arguments[_i]; + } + return classes.filter(Boolean).join(" "); +} +exports.classNames = classNames; +function humanReadableAmount(amount, decimals) { + var amountInUnits = Number((0, viem_1.formatUnits)(BigInt(amount), decimals || 18)); + for (var i = 5; i <= 15; i++) { + var formattedValue = amountInUnits.toFixed(i); + if (Number(formattedValue) !== 0) { + return formattedValue.replace(/\.?0+$/, ""); // Remove trailing zeros + } + } + return 0; +} +exports.humanReadableAmount = humanReadableAmount; +function isPoolActive(allocationStartTime, allocationEndTime) { + var now = Date.now() / 1000; + return now >= allocationStartTime && now <= allocationEndTime; +} +exports.isPoolActive = isPoolActive; +var prettyTimestamp = function (timestamp) { + var date = new Date(timestamp * 1000); + return "".concat(date.toLocaleDateString()); +}; +exports.prettyTimestamp = prettyTimestamp; +exports.ethereumAddressRegExp = /^(0x)?[0-9a-fA-F]{40}$/; +exports.ethereumHashRegExp = /^(0x)?[0-9a-fA-F]{64}$/; +var pollUntilMetadataIsAvailable = function (pointer) { return __awaiter(void 0, void 0, void 0, function () { + var ipfsClient, counter, fetchMetadata; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + ipfsClient = (0, ipfs_1.getIPFSClient)(); + counter = 0; + fetchMetadata = function () { return __awaiter(void 0, void 0, void 0, function () { + var metadata; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, ipfsClient.fetchJson(pointer)]; + case 1: + metadata = _a.sent(); + console.log("metadata", metadata); + console.log("counter", counter); + if (!metadata) return [3 /*break*/, 2]; + console.log("metadata true"); + return [2 /*return*/, true]; + case 2: + console.log("metadata false"); + counter++; + if (counter > 20) + return [2 /*return*/, false]; + return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 2000); }).then(fetchMetadata)]; + case 3: + // Corrected: Return the result of the recursive call + return [2 /*return*/, _a.sent()]; + } + }); + }); }; + return [4 /*yield*/, fetchMetadata()]; + case 1: return [2 /*return*/, _a.sent()]; + } + }); +}); }; +exports.pollUntilMetadataIsAvailable = pollUntilMetadataIsAvailable; +var convertBytesToShortString = function (address) { + return address.slice(0, 6) + "..." + address.slice(-4); +}; +exports.convertBytesToShortString = convertBytesToShortString; +var convertAddressToShortString = function (address) { + return address.slice(0, 6) + "..." + address.slice(-4); +}; +exports.convertAddressToShortString = convertAddressToShortString; +var copy = function (data) { + navigator.clipboard.writeText(data); +}; +exports.copy = copy; +var formatDateDifference = function (dateString) { + var currentDate = new Date(); + var inputDate = new Date(dateString); + var timeDifference = currentDate.getTime() - inputDate.getTime(); + var secondsDifference = Math.floor(timeDifference / 1000); + var minutesDifference = Math.floor(secondsDifference / 60); + var hoursDifference = Math.floor(minutesDifference / 60); + var daysDifference = Math.floor(hoursDifference / 24); + if (secondsDifference < 60) { + return "now"; + } + else if (minutesDifference < 60) { + return "".concat(minutesDifference, "m ago"); + } + else if (hoursDifference < 24) { + return "".concat(hoursDifference, "h ago"); + } + else { + return "".concat(daysDifference, "d ago"); + } +}; +exports.formatDateDifference = formatDateDifference; +exports.NATIVE = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLowerCase(); +var getStrategyTypeFromStrategyName = function (strategyName) { + if (strategyName === "allov2.MicroGrantsStrategy") + return "Manual"; + if (strategyName === "allov2.MicroGrantsGovStrategy") + return "Governance"; + if (strategyName === "allov2.MicroGrantsHatsStrategy") + return "Hats"; + return "N/A"; +}; +exports.getStrategyTypeFromStrategyName = getStrategyTypeFromStrategyName; +var extractLogByEventName = function (logs, eventName) { + return logs.find(function (log) { return log.eventName === eventName; }); +}; +exports.extractLogByEventName = extractLogByEventName; +var getEventValues = function (receipt, abi, eventName) { + var logs = receipt.logs; + var event = abi.filter(function (item) { return item.type === "event" && item.name === eventName; })[0]; + console.log("event", event); + var eventTopic = getEventTopic(event); + var log = logs.find(function (log) { var _a; return ((_a = log.topics[0]) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === eventTopic.toLowerCase(); }); + var _a = log, topics = _a.topics, data = _a.data; + var d = (0, viem_1.decodeEventLog)({ + abi: [event], + data: data, + topics: topics, + }); + return d; +}; +exports.getEventValues = getEventValues; +function getEventTopic(event) { + var inputTypesString = getInputTypeString(event); + var eventString = "".concat(event.name, "(").concat(inputTypesString, ")"); + var eventTopic = (0, viem_1.keccak256)((0, viem_1.stringToBytes)(eventString)); + return eventTopic; +} +function getInputTypeString(event) { + var inputTypes = event.inputs ? flattenInputTypes(event.inputs) : []; + return inputTypes.join(","); +} +function flattenInputTypes(inputs) { + var result = []; + for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { + var input = inputs_1[_i]; + if (input.components) { + var componentsString = flattenInputTypes(input.components).join(","); + result.push("(".concat(componentsString, ")")); + } + else { + result.push(input.type); + } + } + return result; +} diff --git a/src/lib/utils.ts b/src/lib/utils.ts new file mode 100644 index 0000000..a399a13 --- /dev/null +++ b/src/lib/utils.ts @@ -0,0 +1,186 @@ + + +import { AbiComponent, AbiItem, ContractAbi } from "../types"; +import { getIPFSClient } from "./ipfs"; + +import { + TransactionReceipt, + decodeEventLog, + formatUnits, + keccak256, + stringToBytes +} from "viem"; + + +export function classNames(...classes: string[]) { + return classes.filter(Boolean).join(" "); +} + +export function humanReadableAmount(amount: string, decimals?: number) { + const amountInUnits = Number(formatUnits(BigInt(amount), decimals || 18)); + + for (let i = 5; i <= 15; i++) { + const formattedValue = amountInUnits.toFixed(i); + if (Number(formattedValue) !== 0) { + return formattedValue.replace(/\.?0+$/, ""); // Remove trailing zeros + } + } + return 0; +} + +export function isPoolActive( + allocationStartTime: number, + allocationEndTime: number, +) { + const now = Date.now() / 1000; + return now >= allocationStartTime && now <= allocationEndTime; +} + +export const prettyTimestamp = (timestamp: number) => { + const date = new Date(timestamp * 1000); + + return `${date.toLocaleDateString()}`; +}; + +export const ethereumAddressRegExp = /^(0x)?[0-9a-fA-F]{40}$/; +export const ethereumHashRegExp = /^(0x)?[0-9a-fA-F]{64}$/; + +export const pollUntilMetadataIsAvailable = async ( + pointer: string, +): Promise => { + const ipfsClient = getIPFSClient(); + let counter = 0; + + const fetchMetadata: any = async () => { + const metadata = await ipfsClient.fetchJson(pointer); + + console.log("metadata", metadata); + console.log("counter", counter); + if (metadata) { + console.log("metadata true"); + return true; + } else { + console.log("metadata false"); + counter++; + if (counter > 20) return false; + // Corrected: Return the result of the recursive call + return await new Promise((resolve) => setTimeout(resolve, 2000)).then( + fetchMetadata, + ); + } + }; + return await fetchMetadata(); +}; + +export const convertBytesToShortString = (address: string) => { + return address.slice(0, 6) + "..." + address.slice(-4); +}; + +export const convertAddressToShortString = (address: string) => { + return address.slice(0, 6) + "..." + address.slice(-4); +}; + +export const copy = (data: string) => { + navigator.clipboard.writeText(data); +}; + +export const formatDateDifference = (dateString: string): string => { + const currentDate = new Date(); + const inputDate = new Date(dateString); + const timeDifference = currentDate.getTime() - inputDate.getTime(); + const secondsDifference = Math.floor(timeDifference / 1000); + const minutesDifference = Math.floor(secondsDifference / 60); + const hoursDifference = Math.floor(minutesDifference / 60); + const daysDifference = Math.floor(hoursDifference / 24); + + if (secondsDifference < 60) { + return "now"; + } else if (minutesDifference < 60) { + return `${minutesDifference}m ago`; + } else if (hoursDifference < 24) { + return `${hoursDifference}h ago`; + } else { + return `${daysDifference}d ago`; + } +}; + +export const NATIVE = + "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE".toLowerCase(); + +export const getStrategyTypeFromStrategyName = ( + strategyName: string, +): string => { + if (strategyName === "allov2.MicroGrantsStrategy") return "Manual"; + if (strategyName === "allov2.MicroGrantsGovStrategy") return "Governance"; + if (strategyName === "allov2.MicroGrantsHatsStrategy") return "Hats"; + + return "N/A"; +}; + +export const extractLogByEventName = (logs: any[], eventName: string) => { + return logs.find((log) => log.eventName === eventName); +}; + +// export const getEventValues = ( +// receipt: TransactionReceipt, +// abi: ContractAbi, +// eventName: string, +// ): any => { +// const { logs } = receipt; +// const event = abi.filter( +// (item) => item.type === "event" && item.name === eventName, +// )[0]; + +// console.log("event", event); + +// const eventTopic = getEventTopic(event); + +// const log = logs.find( +// (log) => log.topics[0]?.toLowerCase() === eventTopic.toLowerCase(), +// ); + +// const { topics, data } = log as { topics: string[]; data: string }; + +// const d = decodeEventLog({ +// abi: [event as any], +// data: data as `0x${string}`, +// topics: topics as any, +// }); + +// return d; +// }; + +function getEventTopic(event: AbiItem): string { + const inputTypesString = getInputTypeString(event); + const eventString = `${event.name}(${inputTypesString})`; + const eventTopic = keccak256(stringToBytes(eventString)); + + return eventTopic; +} + +function getInputTypeString(event: AbiItem): string { + const inputTypes = event.inputs ? flattenInputTypes(event.inputs) : []; + return inputTypes.join(","); +} + +function flattenInputTypes( + inputs: Array<{ + name: string; + type: string; + components?: Array; + }>, +): string[] { + const result: string[] = []; + + for (const input of inputs) { + if (input.components) { + const componentsString = flattenInputTypes(input.components).join(","); + + result.push(`(${componentsString})`); + } else { + result.push(input.type); + } + } + + return result; +} diff --git a/src/register-recipients.ts b/src/register-recipients.ts index 20d8c12..c67c5ee 100644 --- a/src/register-recipients.ts +++ b/src/register-recipients.ts @@ -6,7 +6,7 @@ import { http, Address, } from "viem"; -import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk"; +import { SQFSuperFluidStrategy } from "@allo-team/allo-v2-sdk/dist"; import { optimism } from "viem/chains"; import { privateKeyToAccount } from "viem/accounts"; import { registryAbi } from "./lib/abi/registry"; @@ -34,31 +34,6 @@ const recipients = [ recipientAddress: "0xE9222B92790cB72ec31A96Df3eeDf3fE8Da5EB10" as Address, metadata: { protocol: BigInt(1), pointer: metadataPointers[0] }, }, - { - registryAnchor: "0x728CfC897BF7Ad35fc461f5E063e6285B8f40626" as Address, - recipientAddress: "0x3945d766185e2264900c84fac10958b3619c2bd4" as Address, - metadata: { protocol: BigInt(1), pointer: metadataPointers[1] }, - }, - { - registryAnchor: "0x84c898b4ecfdE1E6914c04d0Af8a8bdA5C900F68" as Address, - recipientAddress: "0x5bb38AE066987922b0C67aC8d2aF215EFEE8894f" as Address, - metadata: { protocol: BigInt(1), pointer: metadataPointers[2] }, - }, - { - registryAnchor: "0x16D1590f0cb87c37E752dDbcD8D71917d8A7eEFD" as Address, - recipientAddress: "0x1626Cc835842C480c1689A0A69AA419B9F761a4e" as Address, - metadata: { protocol: BigInt(1), pointer: metadataPointers[3] }, - }, - { - registryAnchor: "0xf1701B621750bde3F586fE8fC8f985FadD0e4477" as Address, - recipientAddress: "0xF04a7dF3CaaAdc7a38696aF934C3a8Ef2b71e207" as Address, - metadata: { protocol: BigInt(1), pointer: metadataPointers[4] }, - }, - { - registryAnchor: "0x362C639D7674FAF65901c5E9126772f965dcF38d" as Address, - recipientAddress: "0x1C44478A9a1c60B4f555aaAbc9C510eAF3927071" as Address, - metadata: { protocol: BigInt(1), pointer: metadataPointers[5] }, - }, ]; async function main() { @@ -66,7 +41,7 @@ async function main() { chain: optimism.id, rpc: process.env.RPC_URL, address: SQF_STRATEGY_ADDRESS, - poolId: ALLO_POOL_ID, + poolId: BigInt(ALLO_POOL_ID), }); for (let i in recipients) { diff --git a/src/types.js b/src/types.js new file mode 100644 index 0000000..a2fafc4 --- /dev/null +++ b/src/types.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EPoolStatus = void 0; +var EPoolStatus; +(function (EPoolStatus) { + EPoolStatus["UPCOMING"] = "Upcoming"; + EPoolStatus["ACTIVE"] = "Active"; + EPoolStatus["ENDED"] = "Ended"; +})(EPoolStatus || (exports.EPoolStatus = EPoolStatus = {})); diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..0bfdc94 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,292 @@ +import { StrategyType } from "@allo-team/allo-v2-sdk/dist/strategies/MicroGrantsStrategy/types"; + +export type TStrategyType = keyof typeof StrategyType; + +type ApplicationStatus = "Accepted" | "Rejected" | "Pending" | "Paid"; + +export type TApplication = { + id: number; + name: string; + description?: string; + status: ApplicationStatus; + base64Image: string; + recipientAddress: `0x${string}`; + amountRequested: string; +}; + +export interface IApplication extends TApplication { + profileOwner: `0x${string}`; + nonce: number; + createdAt: string; + updatedAt?: string; +} + +export type TPool = { + id: number; + name: string; + chainId: number; + dates: { + start: string; + end: string; + }; + strategy: `0x${string}`; // address of the strategy contract + amount: number; + tokenSymbol: string; + active: boolean; +}; + +export type TProfile = { + recipientId: `0x${string}`; + recipientAddress: `0x${string}`; + requestedAmount: string; + metadataPointer: string; + isUsingRegistryAnchor: boolean; + status: string; +}; + +export type TApplicationMetadata = { + name: string; + website: string; + description: string; + email: string; + base64Image: string; +}; + +export type TNewApplication = TApplicationMetadata & { + requestedAmount: bigint; + recipientAddress: `0x${string}`; + profileId?: `0x${string}`; + profileName?: string; +}; + +export type TNewApplicationResponse = { + blockTimestamp: string; + isUsingRegistryAnchor: boolean; + metadataPointer: string; + recipientAddress: `0x${string}`; + recipientId: `0x${string}`; + requestedAmount: string; + status: ApplicationStatus; + metadata?: TApplicationMetadata; + applicationBanner?: string; +}; + +export type TPoolMetadata = { + profileId: `0x${string}`; + name: string; + website: string; + description: string; + base64Image?: string; +}; + +export type TMicroGrantRecipient = { + recipientId: `0x${string}`; + recipientAddress: `0x${string}`; + requestedAmount: string; + metadataPointer: string; + blockTimestamp: string; + isUsingRegistryAnchor: boolean; + status: ApplicationStatus; + metadata?: any; + applicationBanner?: string; +}; + +export type TNewPool = TPoolMetadata & { + // chain info + tokenAddress: `0x${string}`; + fundPoolAmount: string; + maxAmount: string; + managers: `0x${string}`[]; + startDate: string; + endDate: string; + approvalThreshold: number; + useRegistryAnchor: boolean; + profileName?: string; + strategyType: TStrategyType; + // Hat + hatId?: number; + // Gov + gov?: string; + minVotePower?: string; + snapshotReference?: string; +}; + +export type TNewPoolResponse = { + address: `0x${string}`; + poolId: number; +}; + +export type TPoolData = { + poolId: string; + chainId: string; + strategy: string; + allocationStartTime: number; + allocationEndTime: number; + approvalThreshold: number; + maxRequestedAmount: string; + blockTimestamp: string; + useRegistryAnchor: boolean; + pool: { + strategy: string; + strategyName: string; + tokenMetadata: { + name?: string; + symbol?: string; + decimals?: number; + }; + token: `0x${string}`; + amount: string; + metadataPointer: string; + poolBanner: string; + metadata: TPoolMetadata; + profile: { + profileId: `0x${string}`; + name: string; + }; + }; + allocateds: TAllocatedData[]; + distributeds: TDistributedData[]; + microGrantRecipients: TMicroGrantRecipient[]; + strategyType: TStrategyType; + // Hat + hatId?: number; + // Gov + gov?: string; + minVotePower?: string; + snapshotReference?: string; +}; + +export type TApplicationData = { + microGrant: { + chainId: string; + poolId: string; + allocationStartTime: number; + allocationEndTime: number; + maxRequestedAmount: string; + blockTimestamp: string; + pool: { + strategy: string; + tokenMetadata: { + name?: string; + symbol?: string; + decimals?: number; + }; + token: `0x${string}`; + amount: string; + }; + allocateds: TAllocatedData[]; + distributeds: TDistributedData[]; + }; + sender: string; + recipientId: string; + recipientAddress: string; + requestedAmount: string; + metadataPointer: string; + blockTimestamp: string; + isUsingRegistryAnchor: boolean; + status: string; +}; + +export type TAllocatedData = { + recipientId: `0x${string}`; + recipientAddress: `0x${string}`; + sender: `0x${string}`; + contractAddress: `0x${string}`; + contractName: string; + chainId: string; + blockTimestamp: string; + status: string; + transactionHash: string; +}; + +export type TDistributedData = { + recipientId: `0x${string}`; + recipientAddress: `0x${string}`; + sender: `0x${string}`; + contractAddress: `0x${string}`; + contractName: string; + chainId: string; + amount: string; + blockTimestamp: string; + transactionHash: string; +}; + +export enum EPoolStatus { + UPCOMING = "Upcoming", + ACTIVE = "Active", + ENDED = "Ended", +} + +export type TActivity = { + id: number; + status: string; + prefixText?: string; + textBold?: string; + href?: string; + suffixText?: string; + date: string; + dateTime: string; +}; + +export type TFlyoutOptions = { + useFlyout: boolean; + label: string; + startIndex: number; +}; + +export type TProfilesByOwnerResponse = { + profileId: string; + name: string; + owner: string; + createdAt: string; + anchor: string; +}; + +export type TProfileResponse = { + profileId: string; + nonce: number; + name: string; + metadataPointer: string; + owner: string; + anchor: string; + creator: string; + createdAt: string; +}; + +export type AbiComponent = { + name: string; + type: string; + internalType?: string; + components?: Array; +}; + +export type AbiItem = { + type: string; // 'function', 'event', 'constructor', etc. + name?: string; // Function or event name + anonymous?: boolean; // true if the function is anonymous + inputs?: Array<{ + name: string; + type: string; + internalType?: string; + indexed?: boolean; + components?: Array; + }>; // Function or event parameters + outputs?: Array<{ + name: string; + type: string; + internalType?: string; + components?: Array<{ + internalType?: string; + name?: string; + type?: string; + components?: Array<{ + internalType?: string; + name?: string; + type?: string; + }>; + }>; + }>; // Function outputs + stateMutability?: "pure" | "view" | "nonpayable" | "payable"; // Function state mutability +}; + +export type ContractAbi = Array; diff --git a/src/wagmi.js b/src/wagmi.js new file mode 100644 index 0000000..4e2cc7c --- /dev/null +++ b/src/wagmi.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.publicClient = void 0; +var viem_1 = require("viem"); +var chains_1 = require("viem/chains"); +exports.publicClient = (0, viem_1.createPublicClient)({ + chain: chains_1.base, + transport: (0, viem_1.http)() +}); diff --git a/src/wagmi.ts b/src/wagmi.ts new file mode 100644 index 0000000..669f8a7 --- /dev/null +++ b/src/wagmi.ts @@ -0,0 +1,8 @@ +import { createPublicClient, http } from 'viem' +import { base } from 'viem/chains' + +export const publicClient = createPublicClient({ + chain: base, + transport: http() + }) + \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index f99175e..6af9d0e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "target": "es2016", - "module": "commonjs", + "target": "es5", + "module": "CommonJS", "rootDir": "./src", "outDir": "./build", "esModuleInterop": true,