diff --git a/omnibuses/_example_omnibus.ts b/omnibuses/_example_omnibus.ts index 573e199..be78488 100644 --- a/omnibuses/_example_omnibus.ts +++ b/omnibuses/_example_omnibus.ts @@ -1,8 +1,14 @@ import omnibuses from "../src/omnibuses/omnibuses"; import { call, event } from "../src/votes"; +const description = ` +1. **Expanding the Simple DVT Module:** Incre a s e the Simple DVT module's staking share limit from 0.5% to 4%, as decided in the [Snapshot vote](https://snapshot.org/#/lido-snapshot.eth/proposal/0xaca2da3c932542e030db8bf5b6e4420bf4aa98bd57bd62b9b8008a4b7398abb2). +2. **Lido Contributors Group Funding:** Trans fer 180,000 LDO within the [EGG st2024 v2 Grant Funding](https://snapshot.org/#/lido-snapshot.eth/proposal/0x2baf3275d15a8494ff94fef58d93bedd2fc28bfea8519f7e86474fc72dc25076) to the [PML multisig](https://app.safe.global/settings/setup?safe=eth:0x17F6b2C738a63a8D3A113a228cfd0b373244633D). +`; + export default omnibuses.create({ network: "mainnet", + description: "", // launchedOn: 12345678, // Launch block number should be set only if omnibus was successfully launched. // voteId: 000, // Vote ID should be set only if omnibus is already started. // executedOn: 12345678, // Execution block number should be set only if vote is passed and omnibus was successfully executed. diff --git a/package.d.ts b/package.d.ts new file mode 100644 index 0000000..0212f03 --- /dev/null +++ b/package.d.ts @@ -0,0 +1,3 @@ +declare module "ipfs-only-hash" { + function of(text: string, params: { cidVersion: 1 | 0; rawLeaves: true }): Promise; +} diff --git a/package.json b/package.json index 2a2060a..7655b5a 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "omnibus": "ts-node --files ./scripts/omnibs.ts", "omnibus:run": "hardhat omnibus:run", "omnibus:test": "hardhat omnibus:test", + "omnibus:simulate": "hardhat omnibus:simulate", + "omnibus:debug": "hardhat omnibus:simulate _example_omnibus", "ks:add": "hardhat keystore:add", "ks:ls": "hardhat keystore:list", "ks:del": "hardhat keystore:delete", @@ -43,9 +45,11 @@ "commander": "^11.1.0", "dotenv": "^16.3.1", "hardhat": "2.22.9", + "ipfs-only-hash": "^4.0.0", "lodash": "^4.17.21", "mocha": "^10.2.0", "node-fetch": "^2.7.0", + "pinata-web3": "^0.5.2", "prompts": "^2.4.2", "tree-kill": "^1.2.2", "web3-eth-accounts": "^4.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index deababf..6512bdb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,6 +29,9 @@ importers: hardhat: specifier: 2.22.9 version: 2.22.9(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@20.14.5)(typescript@5.4.5))(typescript@5.4.5)(utf-8-validate@5.0.7) + ipfs-only-hash: + specifier: ^4.0.0 + version: 4.0.0 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -38,6 +41,9 @@ importers: node-fetch: specifier: ^2.7.0 version: 2.7.0 + pinata-web3: + specifier: ^0.5.2 + version: 0.5.2 prompts: specifier: ^2.4.2 version: 2.4.2 @@ -118,6 +124,9 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@assemblyscript/loader@0.9.4': + resolution: {integrity: sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==} + '@babel/code-frame@7.24.7': resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} @@ -205,6 +214,12 @@ packages: resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} engines: {node: '>=6.9.0'} + '@chainsafe/is-ip@2.0.2': + resolution: {integrity: sha512-ndGqEMG1W5WkGagaqOZHpPU172AGdxr+LD15sv3WIUvT5oCFUrG1Y0CW/v2Egwj4JXEvSibaIIIqImsm98y1nA==} + + '@chainsafe/netmask@2.0.0': + resolution: {integrity: sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg==} + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -301,10 +316,25 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@leichtgewicht/ip-codec@2.0.5': + resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} + '@metamask/eth-sig-util@4.0.1': resolution: {integrity: sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==} engines: {node: '>=12.0.0'} + '@multiformats/base-x@4.0.1': + resolution: {integrity: sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==} + + '@multiformats/dns@1.0.6': + resolution: {integrity: sha512-nt/5UqjMPtyvkG9BQYdJ4GfLK3nMqGpFZOzf4hAmIa0sJh2LlS9YKXZ4FgwBDsaHvzZqR/rUFIywIc7pkHNNuw==} + + '@multiformats/mafmt@12.1.6': + resolution: {integrity: sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==} + + '@multiformats/multiaddr@12.3.1': + resolution: {integrity: sha512-yoGODQY4nIj41ENJClucS8FtBoe8w682bzbKldEQr9lSlfdHqAsRC+vpJAOBpiMwPps1tHua4kxrDmvprdhoDQ==} + '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -424,6 +454,36 @@ packages: '@openzeppelin/contracts@5.0.2': resolution: {integrity: sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==} + '@protobufjs/aspromise@1.1.2': + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + + '@protobufjs/base64@1.1.2': + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + + '@protobufjs/codegen@2.0.4': + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + + '@protobufjs/eventemitter@1.1.0': + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + + '@protobufjs/fetch@1.1.0': + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + + '@protobufjs/float@1.0.2': + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + + '@protobufjs/inquire@1.1.0': + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + + '@protobufjs/path@1.1.2': + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + + '@protobufjs/pool@1.1.0': + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + + '@protobufjs/utf8@1.1.0': + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + '@scure/base@1.1.7': resolution: {integrity: sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==} @@ -524,12 +584,21 @@ packages: '@types/clarinet@0.12.3': resolution: {integrity: sha512-7Fwiv6RNH6JW86U7Vvae7sFHrNmNWxMIx9iAH49F+5d9Kizew5GMYz6rixupn3PK4t+oqP7GZMqOQR77QbcrAQ==} + '@types/dns-packet@5.6.5': + resolution: {integrity: sha512-qXOC7XLOEe43ehtWJCMnQXvgcIpv6rPmQ1jXT98Ad8A3TB1Ue50jsCbSSSyuazScEuZ/Q026vHbrOTVkmwA+7Q==} + '@types/lodash@4.17.5': resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==} + '@types/long@4.0.2': + resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + '@types/lru-cache@5.1.1': resolution: {integrity: sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==} + '@types/minimist@1.2.5': + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + '@types/mocha@10.0.6': resolution: {integrity: sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==} @@ -542,6 +611,9 @@ packages: '@types/node@20.14.5': resolution: {integrity: sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA==} + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/pbkdf2@3.1.2': resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} @@ -639,6 +711,10 @@ packages: resolution: {integrity: sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==} engines: {node: '>=8'} + arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + assertion-error@1.1.0: resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} @@ -653,16 +729,25 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axios@1.7.7: + resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} base-x@3.0.9: resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + binary-extensions@2.3.0: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + bl@5.1.0: + resolution: {integrity: sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==} + blakejs@1.2.1: resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} @@ -712,6 +797,9 @@ packages: buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + bufferutil@4.0.7: resolution: {integrity: sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==} engines: {node: '>=6.14.2'} @@ -728,6 +816,10 @@ packages: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} + camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + camelcase@5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} @@ -770,6 +862,11 @@ packages: ci-info@2.0.0: resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} + cids@1.1.9: + resolution: {integrity: sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==} + engines: {node: '>=4.0.0', npm: '>=3.0.0'} + deprecated: This module has been superseded by the multiformats module + cipher-base@1.0.4: resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} @@ -861,6 +958,10 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -879,6 +980,10 @@ packages: supports-color: optional: true + decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} @@ -923,6 +1028,10 @@ packages: resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} + dns-packet@5.6.1: + resolution: {integrity: sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==} + engines: {node: '>=6'} + dotenv@16.4.5: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} @@ -947,6 +1056,12 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + err-code@3.0.1: + resolution: {integrity: sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==} + + error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-define-property@1.0.0: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} @@ -1004,6 +1119,10 @@ packages: evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -1052,6 +1171,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + fp-ts@1.19.3: resolution: {integrity: sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==} @@ -1127,6 +1250,14 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + hamt-sharding@2.0.1: + resolution: {integrity: sha512-vnjrmdXG9dDs1m/H4iJ6z0JFI2NtgsW5keRkTcM85NGak69Mkf5PHUqBz+Xs0T4sg0ppvj9O5EGAJo40FTxmmA==} + engines: {node: '>=10.0.0', npm: '>=6.0.0'} + + hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + hardhat@2.22.9: resolution: {integrity: sha512-sWiuI/yRdFUPfndIvL+2H18Vs2Gav0XacCFYY5msT5dHOWkhLxESJySIk9j83mXL31aXL8+UMA9OgViFLexklg==} hasBin: true @@ -1173,6 +1304,9 @@ packages: resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} engines: {node: '>=8'} + hashlru@2.3.0: + resolution: {integrity: sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A==} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -1184,6 +1318,13 @@ packages: hmac-drbg@1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + + hosted-git-info@4.1.0: + resolution: {integrity: sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==} + engines: {node: '>=10'} + html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} @@ -1199,6 +1340,9 @@ packages: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + immutable@4.3.6: resolution: {integrity: sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==} @@ -1217,13 +1361,37 @@ packages: inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + interface-ipld-format@1.0.1: + resolution: {integrity: sha512-WV/ar+KQJVoQpqRDYdo7YPGYIUHJxCuOEhdvsRpzLqoOIVCqPKdMMYmsLL1nCRsF3yYNio+PAJbCKiv6drrEAg==} + deprecated: This module has been superseded by the multiformats module + io-ts@1.10.4: resolution: {integrity: sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==} + ipfs-only-hash@4.0.0: + resolution: {integrity: sha512-TE1DZCvfw8i3gcsTq3P4TFx3cKFJ3sluu/J3XINkJhIN9OwJgNMqKA+WnKx6ByCb1IoPXsTp1KM7tupElb6SyA==} + hasBin: true + + ipfs-unixfs-importer@7.0.3: + resolution: {integrity: sha512-qeFOlD3AQtGzr90sr5Tq1Bi8pT5Nr2tSI8z310m7R4JDYgZc6J1PEZO3XZQ8l1kuGoqlAppBZuOYmPEqaHcVQQ==} + engines: {node: '>=14.0.0', npm: '>=7.0.0'} + + ipfs-unixfs@4.0.3: + resolution: {integrity: sha512-hzJ3X4vlKT8FQ3Xc4M1szaFVjsc1ZydN+E4VQ91aXxfpjFn9G2wsMo1EFdAXNq/BUnN5dgqIOMP5zRYr3DTsAw==} + engines: {node: '>=14.0.0', npm: '>=7.0.0'} + + ipld-dag-pb@0.22.3: + resolution: {integrity: sha512-dfG5C5OVAR4FEP7Al2CrHWvAyIM7UhAQrjnOYOIxXGQz5NlEj6wGX0XQf6Ru6or1na6upvV3NQfstapQG8X2rg==} + engines: {node: '>=6.0.0', npm: '>=3.0.0'} + deprecated: This module has been superseded by @ipld/dag-pb and multiformats + is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} + is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1232,6 +1400,10 @@ packages: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -1252,10 +1424,18 @@ packages: resolution: {integrity: sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==} engines: {node: '>=6.5.0', npm: '>=3'} + is-ipfs@8.0.4: + resolution: {integrity: sha512-upkO6a8WgBSZMMmuPzmF2NQLWXtiJtHxdEfEiMWrOzCKoZ+XEiM0XlK4fFMfo/PyiRmPMJ4PsNrXyvJeqMrJXA==} + engines: {node: '>=16.0.0', npm: '>=7.0.0'} + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} @@ -1282,6 +1462,10 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + iso-url@1.2.1: + resolution: {integrity: sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==} + engines: {node: '>=12'} + istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -1310,6 +1494,18 @@ packages: resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} engines: {node: '>=8'} + it-all@1.0.6: + resolution: {integrity: sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==} + + it-batch@1.0.9: + resolution: {integrity: sha512-7Q7HXewMhNFltTsAMdSz6luNhyhkhEtGGbYek/8Xb/GiqYMtwUmopE1ocPSiJKKp3rM4Dt045sNFoUu+KZGNyA==} + + it-first@1.0.7: + resolution: {integrity: sha512-nvJKZoBpZD/6Rtde6FXqwDqDZGF1sCADmr2Zoc0hZsIvnE449gRFnGctxDf09Bzc/FWnHXAdaHVIetY6lrE0/g==} + + it-parallel-batch@1.0.11: + resolution: {integrity: sha512-UWsWHv/kqBpMRmyZJzlmZeoAMA0F3SZr08FBdbhtbe+MtoEBgr/ZUAKrnenhXCBrsopy76QjRH2K/V8kNdupbQ==} + js-sha3@0.8.0: resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} @@ -1329,6 +1525,9 @@ packages: engines: {node: '>=4'} hasBin: true + json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} @@ -1350,10 +1549,17 @@ packages: resolution: {integrity: sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==} engines: {node: '>=10.0.0'} + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + locate-path@2.0.0: resolution: {integrity: sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==} engines: {node: '>=4'} @@ -1385,12 +1591,19 @@ packages: resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} engines: {node: '>=10'} + long@4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + lru_map@0.3.3: resolution: {integrity: sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==} @@ -1405,6 +1618,14 @@ packages: make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + + map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + md5.js@1.3.5: resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} @@ -1412,6 +1633,14 @@ packages: resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} engines: {node: '>= 0.10.0'} + meow@9.0.0: + resolution: {integrity: sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==} + engines: {node: '>=10'} + + merge-options@3.0.4: + resolution: {integrity: sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==} + engines: {node: '>=10'} + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -1420,6 +1649,10 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -1433,6 +1666,13 @@ packages: resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} engines: {node: '>=10'} + minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -1452,6 +1692,33 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + multibase@4.0.6: + resolution: {integrity: sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==} + engines: {node: '>=12.0.0', npm: '>=6.0.0'} + deprecated: This module has been superseded by the multiformats module + + multicodec@3.2.1: + resolution: {integrity: sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==} + deprecated: This module has been superseded by the multiformats module + + multiformats@13.3.1: + resolution: {integrity: sha512-QxowxTNwJ3r5RMctoGA5p13w5RbRT2QDkoM+yFlqfLiioBp78nhDjnRLvmSBI9+KAqN4VdgOVWM9c0CHd86m3g==} + + multiformats@9.9.0: + resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==} + + multihashes@4.0.3: + resolution: {integrity: sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==} + engines: {node: '>=12.0.0', npm: '>=6.0.0'} + + multihashing-async@2.1.4: + resolution: {integrity: sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==} + engines: {node: '>=12.0.0', npm: '>=6.0.0'} + + murmurhash3js-revisited@3.0.0: + resolution: {integrity: sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==} + engines: {node: '>=8.0.0'} + nise@5.1.9: resolution: {integrity: sha512-qOnoujW4SV6e40dYxJOb3uvuoPHtmLzIk4TFo+j0jPJoC+5Z9xja5qH5JZobEPsa8+YYphMrOSwnrshEhG2qww==} @@ -1462,6 +1729,10 @@ packages: node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -1471,6 +1742,10 @@ packages: encoding: optional: true + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-gyp-build@4.8.1: resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} hasBin: true @@ -1482,6 +1757,13 @@ packages: node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + + normalize-package-data@3.0.3: + resolution: {integrity: sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==} + engines: {node: '>=10'} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -1533,6 +1815,14 @@ packages: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} + p-queue@8.0.1: + resolution: {integrity: sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==} + engines: {node: '>=18'} + + p-timeout@6.1.3: + resolution: {integrity: sha512-UJUyfKbwvr/uZSV6btANfb+0t/mOhKV/KXcCUTp8FcQI+v/0d+wXqH4htrW0E4rR6WiEO/EPvUFiV9D5OI4vlw==} + engines: {node: '>=14.16'} + p-try@1.0.0: resolution: {integrity: sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==} engines: {node: '>=4'} @@ -1545,6 +1835,10 @@ packages: resolution: {integrity: sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==} engines: {node: '>=8'} + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + path-exists@3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} @@ -1581,6 +1875,9 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + pinata-web3@0.5.2: + resolution: {integrity: sha512-MywymvEvm03EltT3lsUkjUfcVf9NKKHQ8uT+SzIPeEGxs1TwUoGwpOZ/DKgdzo7660UtWe9IIsyItkyIH39mKg==} + pkg-dir@4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -1603,6 +1900,9 @@ packages: resolution: {integrity: sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==} engines: {node: '>=8'} + progress-events@1.0.1: + resolution: {integrity: sha512-MOzLIwhpt64KIVN64h1MwdKWiyKFNc/S6BoYKPIVUHFg0/eIEyBulhWCgn678v/4c0ri3FdGuzXymNCv02MUIw==} + prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -1611,6 +1911,21 @@ packages: resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} engines: {node: '>= 8'} + protobufjs@6.11.4: + resolution: {integrity: sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==} + hasBin: true + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + + rabin-wasm@0.1.5: + resolution: {integrity: sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==} + hasBin: true + randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -1618,6 +1933,14 @@ packages: resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} engines: {node: '>= 0.8'} + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -1626,6 +1949,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + reduce-flatten@2.0.0: resolution: {integrity: sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==} engines: {node: '>=6'} @@ -1736,13 +2063,32 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + sparse-array@1.3.2: + resolution: {integrity: sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==} + spawn-wrap@2.0.0: resolution: {integrity: sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==} engines: {node: '>=8'} + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} + sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stable@0.1.8: + resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} + deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' + stacktrace-parser@0.1.10: resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} engines: {node: '>=6'} @@ -1773,6 +2119,10 @@ packages: resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} engines: {node: '>=6.5.0', npm: '>=3'} + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -1820,6 +2170,10 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true + trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + ts-command-line-args@2.5.1: resolution: {integrity: sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==} hasBin: true @@ -1862,6 +2216,10 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} + type-fest@0.18.1: + resolution: {integrity: sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==} + engines: {node: '>=10'} + type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -1870,6 +2228,10 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} @@ -1900,6 +2262,21 @@ packages: resolution: {integrity: sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==} engines: {node: '>=8'} + uint8-varint@2.0.4: + resolution: {integrity: sha512-FwpTa7ZGA/f/EssWAb5/YV6pHgVF1fViKdW8cWaEarjB8t7NyofSWBdOTyFPaGuUG4gx3v1O3PQ8etsiOs3lcw==} + + uint8arraylist@2.4.8: + resolution: {integrity: sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==} + + uint8arrays@2.1.10: + resolution: {integrity: sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==} + + uint8arrays@3.1.1: + resolution: {integrity: sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==} + + uint8arrays@5.1.0: + resolution: {integrity: sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==} + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -1942,6 +2319,19 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + varint@5.0.2: + resolution: {integrity: sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==} + + varint@6.0.0: + resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} + + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + web3-errors@1.2.0: resolution: {integrity: sha512-58Kczou5zyjcm9LuSs5Hrm6VrG8t9p2J8X0yGArZrhKNPZL66gMGkOUpPx+EopE944Sk4yE+Q25hKv4H5BH+kA==} engines: {node: '>=14', npm: '>=6.12.0'} @@ -2039,6 +2429,9 @@ packages: yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yargs-parser@18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} @@ -2079,6 +2472,8 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@assemblyscript/loader@0.9.4': {} + '@babel/code-frame@7.24.7': dependencies: '@babel/highlight': 7.24.7 @@ -2212,6 +2607,12 @@ snapshots: '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 + '@chainsafe/is-ip@2.0.2': {} + + '@chainsafe/netmask@2.0.0': + dependencies: + '@chainsafe/is-ip': 2.0.2 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -2375,6 +2776,8 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + '@leichtgewicht/ip-codec@2.0.5': {} + '@metamask/eth-sig-util@4.0.1': dependencies: ethereumjs-abi: 0.6.8 @@ -2383,6 +2786,31 @@ snapshots: tweetnacl: 1.0.3 tweetnacl-util: 0.15.1 + '@multiformats/base-x@4.0.1': {} + + '@multiformats/dns@1.0.6': + dependencies: + '@types/dns-packet': 5.6.5 + buffer: 6.0.3 + dns-packet: 5.6.1 + hashlru: 2.3.0 + p-queue: 8.0.1 + progress-events: 1.0.1 + uint8arrays: 5.1.0 + + '@multiformats/mafmt@12.1.6': + dependencies: + '@multiformats/multiaddr': 12.3.1 + + '@multiformats/multiaddr@12.3.1': + dependencies: + '@chainsafe/is-ip': 2.0.2 + '@chainsafe/netmask': 2.0.0 + '@multiformats/dns': 1.0.6 + multiformats: 13.3.1 + uint8-varint: 2.0.4 + uint8arrays: 5.1.0 + '@noble/curves@1.2.0': dependencies: '@noble/hashes': 1.3.2 @@ -2485,6 +2913,29 @@ snapshots: '@openzeppelin/contracts@5.0.2': {} + '@protobufjs/aspromise@1.1.2': {} + + '@protobufjs/base64@1.1.2': {} + + '@protobufjs/codegen@2.0.4': {} + + '@protobufjs/eventemitter@1.1.0': {} + + '@protobufjs/fetch@1.1.0': + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/inquire': 1.1.0 + + '@protobufjs/float@1.0.2': {} + + '@protobufjs/inquire@1.1.0': {} + + '@protobufjs/path@1.1.2': {} + + '@protobufjs/pool@1.1.0': {} + + '@protobufjs/utf8@1.1.0': {} + '@scure/base@1.1.7': {} '@scure/bip32@1.1.5': @@ -2620,10 +3071,18 @@ snapshots: dependencies: '@types/node': 20.14.5 + '@types/dns-packet@5.6.5': + dependencies: + '@types/node': 20.14.5 + '@types/lodash@4.17.5': {} + '@types/long@4.0.2': {} + '@types/lru-cache@5.1.1': {} + '@types/minimist@1.2.5': {} + '@types/mocha@10.0.6': {} '@types/node-fetch@2.6.11': @@ -2637,6 +3096,8 @@ snapshots: dependencies: undici-types: 5.26.5 + '@types/normalize-package-data@2.4.4': {} + '@types/pbkdf2@3.1.2': dependencies: '@types/node': 20.14.5 @@ -2724,6 +3185,8 @@ snapshots: array-back@4.0.2: {} + arrify@1.0.1: {} + assertion-error@1.1.0: {} asynckit@0.4.0: {} @@ -2734,14 +3197,30 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 + axios@1.7.7: + dependencies: + follow-redirects: 1.15.6(debug@4.3.5) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + balanced-match@1.0.2: {} base-x@3.0.9: dependencies: safe-buffer: 5.2.1 + base64-js@1.5.1: {} + binary-extensions@2.3.0: {} + bl@5.1.0: + dependencies: + buffer: 6.0.3 + inherits: 2.0.4 + readable-stream: 3.6.2 + blakejs@1.2.1: {} bn.js@4.12.0: {} @@ -2806,6 +3285,11 @@ snapshots: buffer-xor@1.0.3: {} + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + bufferutil@4.0.7: dependencies: node-gyp-build: 4.8.1 @@ -2828,6 +3312,12 @@ snapshots: get-intrinsic: 1.2.4 set-function-length: 1.2.2 + camelcase-keys@6.2.2: + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + camelcase@5.3.1: {} camelcase@6.3.0: {} @@ -2890,6 +3380,13 @@ snapshots: ci-info@2.0.0: {} + cids@1.1.9: + dependencies: + multibase: 4.0.6 + multicodec: 3.2.1 + multihashes: 4.0.3 + uint8arrays: 3.1.1 + cipher-base@1.0.4: dependencies: inherits: 2.0.4 @@ -2986,6 +3483,8 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + data-uri-to-buffer@4.0.1: {} + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 @@ -2996,6 +3495,11 @@ snapshots: dependencies: ms: 2.1.2 + decamelize-keys@1.1.1: + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + decamelize@1.2.0: {} decamelize@4.0.0: {} @@ -3026,6 +3530,10 @@ snapshots: diff@5.2.0: {} + dns-packet@5.6.1: + dependencies: + '@leichtgewicht/ip-codec': 2.0.5 + dotenv@16.4.5: {} electron-to-chromium@1.4.806: {} @@ -3059,6 +3567,12 @@ snapshots: env-paths@2.2.1: {} + err-code@3.0.1: {} + + error-ex@1.3.2: + dependencies: + is-arrayish: 0.2.1 + es-define-property@1.0.0: dependencies: get-intrinsic: 1.2.4 @@ -3147,6 +3661,11 @@ snapshots: md5.js: 1.3.5 safe-buffer: 5.2.1 + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -3196,6 +3715,10 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + fp-ts@1.19.3: {} fromentries@1.3.2: {} @@ -3283,6 +3806,13 @@ snapshots: graceful-fs@4.2.11: {} + hamt-sharding@2.0.1: + dependencies: + sparse-array: 1.3.2 + uint8arrays: 3.1.1 + + hard-rejection@2.1.0: {} + hardhat@2.22.9(bufferutil@4.0.7)(ts-node@10.9.2(@types/node@20.14.5)(typescript@5.4.5))(typescript@5.4.5)(utf-8-validate@5.0.7): dependencies: '@ethersproject/abi': 5.7.0 @@ -3369,6 +3899,8 @@ snapshots: is-stream: 2.0.1 type-fest: 0.8.1 + hashlru@2.3.0: {} + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -3381,6 +3913,12 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + hosted-git-info@2.8.9: {} + + hosted-git-info@4.1.0: + dependencies: + lru-cache: 6.0.0 + html-escaper@2.0.2: {} http-errors@2.0.0: @@ -3402,6 +3940,8 @@ snapshots: dependencies: safer-buffer: 2.1.2 + ieee754@1.2.1: {} + immutable@4.3.6: {} imurmurhash@0.1.4: {} @@ -3415,21 +3955,76 @@ snapshots: inherits@2.0.4: {} + interface-ipld-format@1.0.1: + dependencies: + cids: 1.1.9 + multicodec: 3.2.1 + multihashes: 4.0.3 + io-ts@1.10.4: dependencies: fp-ts: 1.19.3 + ipfs-only-hash@4.0.0: + dependencies: + ipfs-unixfs-importer: 7.0.3 + meow: 9.0.0 + transitivePeerDependencies: + - encoding + - supports-color + + ipfs-unixfs-importer@7.0.3: + dependencies: + bl: 5.1.0 + cids: 1.1.9 + err-code: 3.0.1 + hamt-sharding: 2.0.1 + ipfs-unixfs: 4.0.3 + ipld-dag-pb: 0.22.3 + it-all: 1.0.6 + it-batch: 1.0.9 + it-first: 1.0.7 + it-parallel-batch: 1.0.11 + merge-options: 3.0.4 + multihashing-async: 2.1.4 + rabin-wasm: 0.1.5 + uint8arrays: 2.1.10 + transitivePeerDependencies: + - encoding + - supports-color + + ipfs-unixfs@4.0.3: + dependencies: + err-code: 3.0.1 + protobufjs: 6.11.4 + + ipld-dag-pb@0.22.3: + dependencies: + cids: 1.1.9 + interface-ipld-format: 1.0.1 + multicodec: 3.2.1 + multihashing-async: 2.1.4 + protobufjs: 6.11.4 + stable: 0.1.8 + uint8arrays: 2.1.10 + is-arguments@1.1.1: dependencies: call-bind: 1.0.7 has-tostringtag: 1.0.2 + is-arrayish@0.2.1: {} + is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 is-callable@1.2.7: {} + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -3444,8 +4039,18 @@ snapshots: is-hex-prefixed@1.0.0: {} + is-ipfs@8.0.4: + dependencies: + '@multiformats/mafmt': 12.1.6 + '@multiformats/multiaddr': 12.3.1 + iso-url: 1.2.1 + multiformats: 13.3.1 + uint8arrays: 5.1.0 + is-number@7.0.0: {} + is-plain-obj@1.1.0: {} + is-plain-obj@2.1.0: {} is-stream@2.0.1: {} @@ -3462,6 +4067,8 @@ snapshots: isexe@2.0.0: {} + iso-url@1.2.1: {} + istanbul-lib-coverage@3.2.2: {} istanbul-lib-hook@3.0.0: @@ -3505,6 +4112,16 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + it-all@1.0.6: {} + + it-batch@1.0.9: {} + + it-first@1.0.7: {} + + it-parallel-batch@1.0.11: + dependencies: + it-batch: 1.0.9 + js-sha3@0.8.0: {} js-tokens@4.0.0: {} @@ -3520,6 +4137,8 @@ snapshots: jsesc@2.5.2: {} + json-parse-even-better-errors@2.3.1: {} + json-stringify-safe@5.0.1: {} json5@2.2.3: {} @@ -3542,8 +4161,12 @@ snapshots: node-gyp-build: 4.8.1 readable-stream: 3.6.2 + kind-of@6.0.3: {} + kleur@3.0.3: {} + lines-and-columns@1.2.4: {} + locate-path@2.0.0: dependencies: p-locate: 2.0.0 @@ -3572,6 +4195,8 @@ snapshots: chalk: 4.1.2 is-unicode-supported: 0.1.0 + long@4.0.0: {} + loupe@2.3.7: dependencies: get-func-name: 2.0.2 @@ -3580,6 +4205,10 @@ snapshots: dependencies: yallist: 3.1.1 + lru-cache@6.0.0: + dependencies: + yallist: 4.0.0 + lru_map@0.3.3: {} make-dir@3.1.0: @@ -3592,6 +4221,10 @@ snapshots: make-error@1.3.6: {} + map-obj@1.0.1: {} + + map-obj@4.3.0: {} + md5.js@1.3.5: dependencies: hash-base: 3.1.0 @@ -3600,12 +4233,33 @@ snapshots: memorystream@0.3.1: {} + meow@9.0.0: + dependencies: + '@types/minimist': 1.2.5 + camelcase-keys: 6.2.2 + decamelize: 1.2.0 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 3.0.3 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.18.1 + yargs-parser: 20.2.4 + + merge-options@3.0.4: + dependencies: + is-plain-obj: 2.1.0 + mime-db@1.52.0: {} mime-types@2.1.35: dependencies: mime-db: 1.52.0 + min-indent@1.0.1: {} + minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -3618,6 +4272,14 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimist-options@4.1.0: + dependencies: + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 + + minimist@1.2.8: {} + mkdirp@1.0.4: {} mnemonist@0.38.5: @@ -3651,6 +4313,36 @@ snapshots: ms@2.1.3: {} + multibase@4.0.6: + dependencies: + '@multiformats/base-x': 4.0.1 + + multicodec@3.2.1: + dependencies: + uint8arrays: 3.1.1 + varint: 6.0.0 + + multiformats@13.3.1: {} + + multiformats@9.9.0: {} + + multihashes@4.0.3: + dependencies: + multibase: 4.0.6 + uint8arrays: 3.1.1 + varint: 5.0.2 + + multihashing-async@2.1.4: + dependencies: + blakejs: 1.2.1 + err-code: 3.0.1 + js-sha3: 0.8.0 + multihashes: 4.0.3 + murmurhash3js-revisited: 3.0.0 + uint8arrays: 3.1.1 + + murmurhash3js-revisited@3.0.0: {} + nise@5.1.9: dependencies: '@sinonjs/commons': 3.0.1 @@ -3669,10 +4361,18 @@ snapshots: node-addon-api@2.0.2: {} + node-domexception@1.0.0: {} + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + node-gyp-build@4.8.1: {} node-preload@0.2.1: @@ -3681,6 +4381,20 @@ snapshots: node-releases@2.0.14: {} + normalize-package-data@2.5.0: + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.17.0 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + + normalize-package-data@3.0.3: + dependencies: + hosted-git-info: 4.1.0 + is-core-module: 2.15.1 + semver: 7.6.2 + validate-npm-package-license: 3.0.4 + normalize-path@3.0.0: {} nyc@15.1.0: @@ -3755,6 +4469,13 @@ snapshots: dependencies: aggregate-error: 3.1.0 + p-queue@8.0.1: + dependencies: + eventemitter3: 5.0.1 + p-timeout: 6.1.3 + + p-timeout@6.1.3: {} + p-try@1.0.0: {} p-try@2.2.0: {} @@ -3766,6 +4487,13 @@ snapshots: lodash.flattendeep: 4.4.0 release-zalgo: 1.0.0 + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.24.7 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + path-exists@3.0.0: {} path-exists@4.0.0: {} @@ -3792,6 +4520,15 @@ snapshots: picomatch@2.3.1: {} + pinata-web3@0.5.2: + dependencies: + axios: 1.7.7 + form-data: 4.0.0 + is-ipfs: 8.0.4 + node-fetch: 3.3.2 + transitivePeerDependencies: + - debug + pkg-dir@4.2.0: dependencies: find-up: 4.1.0 @@ -3806,6 +4543,8 @@ snapshots: dependencies: fromentries: 1.3.2 + progress-events@1.0.1: {} + prompts@2.4.2: dependencies: kleur: 3.0.3 @@ -3813,6 +4552,38 @@ snapshots: propagate@2.0.1: {} + protobufjs@6.11.4: + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/long': 4.0.2 + '@types/node': 20.14.5 + long: 4.0.0 + + proxy-from-env@1.1.0: {} + + quick-lru@4.0.1: {} + + rabin-wasm@0.1.5: + dependencies: + '@assemblyscript/loader': 0.9.4 + bl: 5.1.0 + debug: 4.3.5 + minimist: 1.2.8 + node-fetch: 2.7.0 + readable-stream: 3.6.2 + transitivePeerDependencies: + - encoding + - supports-color + randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -3824,6 +4595,19 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + read-pkg-up@7.0.1: + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + + read-pkg@5.2.0: + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -3834,6 +4618,11 @@ snapshots: dependencies: picomatch: 2.3.1 + redent@3.0.0: + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + reduce-flatten@2.0.0: {} release-zalgo@1.0.0: @@ -3943,6 +4732,8 @@ snapshots: source-map@0.6.1: {} + sparse-array@1.3.2: {} + spawn-wrap@2.0.0: dependencies: foreground-child: 2.0.0 @@ -3952,8 +4743,24 @@ snapshots: signal-exit: 3.0.7 which: 2.0.2 + spdx-correct@3.2.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.20 + + spdx-exceptions@2.5.0: {} + + spdx-expression-parse@3.0.1: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.20 + + spdx-license-ids@3.0.20: {} + sprintf-js@1.0.3: {} + stable@0.1.8: {} + stacktrace-parser@0.1.10: dependencies: type-fest: 0.7.1 @@ -3982,6 +4789,10 @@ snapshots: dependencies: is-hex-prefixed: 1.0.0 + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@3.1.1: {} supports-color@5.5.0: @@ -4025,6 +4836,8 @@ snapshots: tree-kill@1.2.2: {} + trim-newlines@3.0.1: {} + ts-command-line-args@2.5.1: dependencies: chalk: 4.1.2 @@ -4066,10 +4879,14 @@ snapshots: type-detect@4.0.8: {} + type-fest@0.18.1: {} + type-fest@0.20.2: {} type-fest@0.21.3: {} + type-fest@0.6.0: {} + type-fest@0.7.1: {} type-fest@0.8.1: {} @@ -4100,6 +4917,27 @@ snapshots: typical@5.2.0: {} + uint8-varint@2.0.4: + dependencies: + uint8arraylist: 2.4.8 + uint8arrays: 5.1.0 + + uint8arraylist@2.4.8: + dependencies: + uint8arrays: 5.1.0 + + uint8arrays@2.1.10: + dependencies: + multiformats: 9.9.0 + + uint8arrays@3.1.1: + dependencies: + multiformats: 9.9.0 + + uint8arrays@5.1.0: + dependencies: + multiformats: 13.3.1 + undici-types@5.26.5: {} undici@5.28.4: @@ -4137,6 +4975,17 @@ snapshots: v8-compile-cache-lib@3.0.1: {} + validate-npm-package-license@3.0.4: + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + + varint@5.0.2: {} + + varint@6.0.0: {} + + web-streams-polyfill@3.3.3: {} + web3-errors@1.2.0: dependencies: web3-types: 1.7.0 @@ -4238,6 +5087,8 @@ snapshots: yallist@3.1.1: {} + yallist@4.0.0: {} + yargs-parser@18.1.3: dependencies: camelcase: 5.3.1 diff --git a/src/common/env.ts b/src/common/env.ts index 3dc3a6d..5069546 100644 --- a/src/common/env.ts +++ b/src/common/env.ts @@ -34,6 +34,10 @@ function ETHERSCAN_TOKEN() { return process.env.ETHERSCAN_TOKEN; } +function PINATA_JWT() { + return process.env.PINATA_JWT; +} + function ETHERSCAN_CACHE_ENABLED() { switch (process.env.ETHERSCAN_CACHE_ENABLED) { case "true": @@ -65,4 +69,5 @@ export default { ETHERSCAN_TOKEN, ETHERSCAN_CACHE_ENABLED, checkEnvVars, + PINATA_JWT, }; diff --git a/src/common/prompt.ts b/src/common/prompt.ts index b31542f..c03cabf 100644 --- a/src/common/prompt.ts +++ b/src/common/prompt.ts @@ -31,6 +31,19 @@ const DEFAULT_PROMPTS_OPTIONS = { }, }; +async function confirmOrAbort(message?: string) { + const { isConfirmed } = await prompts({ + type: "toggle", + name: "isConfirmed", + message: message ?? "Confirm?", + active: "yes", + inactive: "no", + }); + if (!isConfirmed) { + throw new OperationAbortedError(); + } +} + async function confirm(message?: string) { const { isConfirmed } = await prompts({ type: "toggle", @@ -101,6 +114,7 @@ export default { secret, select, confirm, + confirmOrAbort, password, sigint, }; diff --git a/src/ipfs/ipfs-provider.ts b/src/ipfs/ipfs-provider.ts new file mode 100644 index 0000000..ade9f34 --- /dev/null +++ b/src/ipfs/ipfs-provider.ts @@ -0,0 +1,12 @@ +import env from "../common/env"; +import pinata from "./pinata"; + +export const getIpfsProvider = async () => { + if (env.PINATA_JWT()) { + return pinata.getProvider(); + } + return null; +}; + +export const instruction = + "you need to add env variable PINATA_JWT, you could get JWT it at https://pinata.cloud site for free"; diff --git a/src/ipfs/pinata.ts b/src/ipfs/pinata.ts new file mode 100644 index 0000000..d3948d6 --- /dev/null +++ b/src/ipfs/pinata.ts @@ -0,0 +1,28 @@ +import { PinataSDK } from "pinata-web3"; +import env from "../common/env"; + +const getProvider = () => { + const pinata = new PinataSDK({ + pinataJwt: env.PINATA_JWT(), + }); + + const uploadStringToIpfs = async (string: string, name?: string) => { + try { + const file = new File([string], `${name}.md`, { type: "text/markdown" }); + + const { IpfsHash } = await pinata.upload.file(file, { cidVersion: 1 }); + return IpfsHash; + } catch (err) { + console.error(err); + return ""; + } + }; + + return { + uploadStringToIpfs, + }; +}; + +export default { + getProvider, +}; diff --git a/src/ipfs/utils.ts b/src/ipfs/utils.ts new file mode 100644 index 0000000..62014ca --- /dev/null +++ b/src/ipfs/utils.ts @@ -0,0 +1,18 @@ +import Hash from "ipfs-only-hash"; + +export function getUrlByCidV1(cid: string) { + return `https://${cid}.ipfs.dweb.link`; +} + +export async function calculateCid(string: string) { + return await Hash.of(string, { cidVersion: 1, rawLeaves: true }); +} + +export const isCidUploaded = async (cid: string) => { + try { + const resp = await fetch(getUrlByCidV1(cid), { signal: AbortSignal.timeout(8000) }); + return resp.status < 300; + } catch (e) { + return false; + } +}; diff --git a/src/omnibuses/checks/tokens.ts b/src/omnibuses/checks/tokens.ts index afbff71..84139f6 100644 --- a/src/omnibuses/checks/tokens.ts +++ b/src/omnibuses/checks/tokens.ts @@ -1,11 +1,11 @@ -import { BigNumberish } from "ethers"; +import { BigNumberish, formatEther } from "ethers"; import { assert } from "../../common/assert"; import { CheckContext } from "./checks"; const checkLDOBalance = async ({ contracts }: CheckContext, address: string, balance: BigNumberish) => { const ldoBalance = await contracts.ldo.balanceOf(address); - - assert.equal(ldoBalance, balance); + const ldoExpected = BigInt(balance); + assert.equal(ldoBalance, ldoExpected, `The values differ is ${formatEther(ldoBalance - ldoExpected)} LDO`); }; export default { diff --git a/src/omnibuses/omnibuses.ts b/src/omnibuses/omnibuses.ts index 6072656..e1919c9 100644 --- a/src/omnibuses/omnibuses.ts +++ b/src/omnibuses/omnibuses.ts @@ -25,6 +25,10 @@ export interface OmnibusPlan { Network where the omnibus must be launched. Supported networks: "mainnet", "holesky". */ network: N; + /** + Description will be uploaded to IPFS and CID (IPFS address) will be added to vote metadata + */ + description: string; /** * When the omnibus was launched, contains the id of the vote. */ @@ -45,6 +49,7 @@ export interface OmnibusPlan { export interface Omnibus { network: NetworkName; + description: string; summary: string; calls: FormattedEvmCall[]; script: string; @@ -70,6 +75,7 @@ function create(plan: OmnibusPlan): Omnibus { return { voteId: plan.voteId, network: plan.network, + description: plan.description, isLaunched: plan.voteId !== undefined, isExecuted: plan.executedOn !== undefined, items: items, diff --git a/src/omnibuses/tools/simulate.ts b/src/omnibuses/tools/simulate.ts index 7709b2d..8ee0011 100644 --- a/src/omnibuses/tools/simulate.ts +++ b/src/omnibuses/tools/simulate.ts @@ -4,6 +4,7 @@ import votes, { FormattedEvmCall } from "../../votes"; import bytes from "../../common/bytes"; import { TxTrace } from "../../traces/tx-traces"; import { Omnibus } from "../omnibuses"; +import chalk from "chalk"; export interface SimulationGroup { call: FormattedEvmCall; @@ -15,6 +16,8 @@ export const simulateOmnibus = async ( omnibus: Omnibus, provider: RpcProvider, ): Promise<[gasUsed: bigint, SimulationGroup[]]> => { + console.log(`Simulating the omnibus using "hardhat" node...`); + const snapshotRestorer = await providers.cheats(provider).snapshot(); const { enactReceipt } = await votes.adopt(provider, omnibus.script, omnibus.summary, { @@ -50,6 +53,18 @@ export const simulateOmnibus = async ( }); } await snapshotRestorer.restore(); - + printOmnibusSimulationResults(enactReceipt.gasUsed, res); return [enactReceipt.gasUsed, res]; }; + +export const printOmnibusSimulationResults = (gasUsed: bigint, groups: SimulationGroup[]) => { + console.log(`Enactment gas costs: ${gasUsed}`); + groups.forEach((group, index) => { + console.log(chalk.green(`${index + 1}. ${group.title}`)); + console.log(" EVM call:"); + console.log(group.call.format(4)); + console.log(" Call Trace:"); + console.log(group.trace.format(2)); + console.log(); + }); +}; diff --git a/src/rpcs.ts b/src/rpcs.ts index dbf8332..512f57f 100644 --- a/src/rpcs.ts +++ b/src/rpcs.ts @@ -149,6 +149,7 @@ async function spawnNode(name: RpcNodeName, options: RpcNodeOptions = {}): Promi } process.on("exit", () => { + console.error(`Stop spawn node "${name}", kill main process`); treeKill(nodePid); }); @@ -161,11 +162,13 @@ async function spawnNode(name: RpcNodeName, options: RpcNodeOptions = {}): Promi const absoluteLogPath = path.resolve(config.logsDir, `${name}_${port}.log`); const logStream = createWriteStream(absoluteLogPath, { encoding: "utf-8" }); const errorListener = (chunk: any) => { + console.error(`An error occurred during the process to spawn "${name}: ${chunk.toString()}" `); logStream.write(chunk.toString()); }; const stop = () => { return new Promise((resolve) => { + console.error(`Stop spawn node "${name}", kill main process`); node.on("exit", () => resolve()); treeKill(nodePid); }); diff --git a/src/votes/lifecycle.ts b/src/votes/lifecycle.ts index 494a85c..b18a718 100644 --- a/src/votes/lifecycle.ts +++ b/src/votes/lifecycle.ts @@ -11,15 +11,19 @@ export async function start( castVote: boolean = false, overrides?: NonPayableOverrides, ) { + console.log(`Sending the tx to start the vote...`); const { voting, tokenManager } = lido.chainId(await providers.chainId(creator), creator); const startVoteScript = evm( call(voting["newVote(bytes,string,bool,bool)"], [evmScript, description, castVote, false]), ); - return tokenManager.connect(creator).forward(startVoteScript, overrides ?? {}); + const tx = await tokenManager.connect(creator).forward(startVoteScript, overrides ?? {}); + console.log("Transaction successfully sent:", tx.hash); + return tx; } export async function wait(tx: ContractTransactionResponse) { + console.log("Waiting transaction will be confirmed..."); const receipt = await tx.wait(); if (!receipt) { throw new Error("Invalid confirmations value"); diff --git a/tasks/omnibuses.ts b/tasks/omnibuses.ts index 52a3bdb..b1db85d 100644 --- a/tasks/omnibuses.ts +++ b/tasks/omnibuses.ts @@ -1,21 +1,22 @@ import chalk from "chalk"; import { task } from "hardhat/config"; -import { BigNumberish, ContractTransactionReceipt, JsonRpcProvider, Wallet } from "ethers"; import * as types from "hardhat/internal/core/params/argumentTypes"; import votes from "../src/votes"; -import rpcs, { RpcNodeName } from "../src/rpcs"; +import { RpcNodeName } from "../src/rpcs"; import traces from "../src/traces"; -import networks, { NetworkName } from "../src/networks"; -import bytes from "../src/common/bytes"; -import format from "../src/common/format"; import prompt from "../src/common/prompt"; import env from "../src/common/env"; -import { simulateOmnibus, SimulationGroup } from "../src/omnibuses/tools/simulate"; +import { simulateOmnibus } from "../src/omnibuses/tools/simulate"; import { isKnownError } from "../src/common/errors"; import Mocha from "mocha"; import fs from "node:fs/promises"; import { Omnibus } from "../src/omnibuses/omnibuses"; +import { uploadDescription } from "./sub-tasks/upload-description"; +import { printVoteDeployInfo } from "./sub-tasks/print-vote-info"; +import { getPilot } from "./sub-tasks/getPilot"; +import { prepareProviderAndNode } from "./sub-tasks/prepare-provider-and-node"; +import type { Signer } from "ethers"; traces.hardhat.enableTracing(); @@ -57,19 +58,25 @@ task("omnibus:test", "Runs tests for the given omnibus") console.log(`The omnibus "${omnibus.voteId}" already executed. Aborting...`); return; } - + console.log(`Omnibus items:\n${omnibus.summary}\n`); const omnibusTestFile = `omnibuses/${name}.spec.ts`; try { await fs.stat(omnibusTestFile); await runTestFile(omnibusTestFile); return; - } catch (e) { - console.error(e); + } catch (err) { + console.error(err); console.warn(chalk.bold.yellow(`Test file "${omnibusTestFile}" not found. Write tests first!`)); return; } }); +type OmnibusRunParams = { + name: string; + testAccount: boolean; + rpc: RpcNodeName | "local" | "remote"; +}; + task("omnibus:run", "Runs the omnibus with given name") .addPositionalParam("name", "Name of the omnibus to run") .addOptionalParam("testAccount", "Is the omnibus run using the test account", true, types.boolean) @@ -79,144 +86,74 @@ task("omnibus:run", "Runs the omnibus with given name") "hardhat", types.string, ) - .setAction(async ({ name, testAccount, rpc }, hre) => { + .setAction(async ({ name, testAccount, rpc }: OmnibusRunParams, hre) => { const omnibus: Omnibus = require(`../omnibuses/${name}.ts`).default; - if (omnibus.isExecuted) { - console.log(`Omnibus already was executed. Aborting...`); + console.log(`The omnibus "${omnibus?.voteId}" already executed. Aborting...`); return; } - // Check environment variables env.checkEnvVars(); - console.log(`Running the omnibus ${name} on "${omnibus.network}" network\n`); - console.log(`Omnibus items:\n`); - console.log(omnibus.summary); - console.log("\n"); - - const [provider, node] = await prepareExecEnv(omnibus.network, rpc); + console.log(`Omnibus items:\n${omnibus.summary}\n`); + const { provider, spawnedNode } = await prepareProviderAndNode(omnibus.network, rpc); try { - // Prepare execution environment - const network = await provider.getNetwork(); - console.log(`Network:`); - console.log(` - rpc: ${rpc}`); - console.log(` - name: ${network.name}`); - console.log(` - chainId: ${network.chainId}\n`); - - const pilot = testAccount - ? await votes.creator(provider) - : await hre.keystores.unlock().then((privateKey) => new Wallet(privateKey)); - - console.log(`Deployer ${format.address(bytes.normalize(await pilot.getAddress()))}`); - console.log(` - nonce: ${await pilot.getNonce()}`); - console.log(` - balance: ${hre.ethers.formatEther(await provider.getBalance(pilot))} ETH\n`); - - // Simulate omnibus and ask for confirmation - console.log(`Simulating the omnibus using "hardhat" node...`); - printOmnibusSimulation(await simulateOmnibus(omnibus, provider)); - const isConfirmed = await prompt.confirm("Does it look good?"); - - if (!isConfirmed) { - console.log("The omnibus launch was canceled"); - return; - } - - // Launch the omnibus - console.log(`Sending the tx to start the vote...`); - const tx = await votes.start(pilot, omnibus.script, omnibus.summary); + const omnibusDescription = await uploadDescription(name, omnibus); - console.log("Transaction successfully sent:", tx.hash); + const pilot: Signer = await getPilot(provider, hre, testAccount); - console.log("Waiting transaction will be confirmed..."); + // Launch the omnibus + const tx = await votes.start(pilot, omnibus.script, omnibusDescription); const { voteId, receipt } = await votes.wait(tx); - - await printVoteInfo(voteId, receipt); + await printVoteDeployInfo(voteId, receipt); await prompt.sigint(); - } catch (e) { - if (isKnownError(e)) { - console.error(e.message); - return; + } catch (err) { + if (!isKnownError(err)) { + throw err; } - throw e; + console.error(err.message); } finally { - await node?.stop(); + await spawnedNode?.stop(); } }); -function printOmnibusSimulation([gasUsed, groups]: [bigint, SimulationGroup[]]) { - console.log(`Enactment gas costs: ${gasUsed}`); - for (let i = 0; i < groups.length; ++i) { - const group = groups[i]; - console.log(chalk.green(`${i + 1}. ${group.title}`)); - console.log(" EVM call:"); - console.log(group.call.format(4)); - console.log(" Call Trace:"); - console.log(group.trace.format(2)); - console.log(); - } -} +task("omnibus:simulate", "Simulate the omnibus with given name") + .addPositionalParam("name", "Name of the omnibus to run") + .addOptionalParam("testAccount", "Is the omnibus run using the test account", true, types.boolean) + .addOptionalParam( + "rpc", + 'The RPC node used to launch omnibus. Possible values: hardhat, anvil, local, remote. When "remote" is passed - run using origin RPC url, without forked dev node', + "hardhat", + types.string, + ) + .setAction(async ({ name, rpc }: OmnibusRunParams) => { + const omnibus: Omnibus = require(`../omnibuses/${name}.ts`).default; + if (omnibus.isExecuted) { + console.log(`The omnibus "${omnibus.voteId}" already executed. Aborting...`); + return; + } -async function printVoteInfo(voteId: BigNumberish, receipt: ContractTransactionReceipt) { - const launchBlock = await receipt.getBlock(); - const launchDate = new Intl.DateTimeFormat("en-GB", { day: "2-digit", month: "short", year: "numeric" }).format( - new Date(launchBlock.timestamp * 1000), - ); - console.log(` -Omnibus successfully launched 🎉! -Details: - Vote ID: ${voteId} - Block number: ${receipt.blockNumber} - Launch date: ${launchDate} -`); -} + env.checkEnvVars(); + console.log(`Simulate the omnibus ${name} on "${omnibus.network}" network\n`); + const { provider, spawnedNode } = await prepareProviderAndNode(omnibus.network, rpc); -async function prepareExecEnv(network: NetworkName, rpc: RpcNodeName | "local" | "remote", blockNumber?: number) { - if (rpc === "remote") { - console.log(`Running on the remote RPC node on network "${network}"`); - return [new JsonRpcProvider(networks.rpcUrl("eth", network))] as const; - } else if (rpc === "local") { - const url = networks.localRpcUrl("eth"); - console.log( - `Running on the local RPC node on url ${url}. Expected network ${network}, expected blockNumber ${ - blockNumber ?? '"any"' - }`, - ); - const provider = new JsonRpcProvider(url); - const currentBlockNumber = await provider.getBlockNumber(); - if (blockNumber !== undefined && currentBlockNumber !== blockNumber) { - throw new Error( - `Local RPC node set on the wrong block number. Expected ${blockNumber}, actual: ${currentBlockNumber}`, - ); - } - return [provider] as const; - } else { - console.log(`Spawning "${rpc}" RPC node for "${network}" network, on block number ${blockNumber ?? '"latest"'}...`); - const node = await spawnRpcNode(network, rpc, blockNumber); - console.log(`RPC node was successfully spawned on ${node.url}`); - return [node.provider, node] as const; - } -} + try { + console.log(`Omnibus items:\n${omnibus.summary}\n`); + await simulateOmnibus(omnibus, provider); -async function spawnRpcNode(network: NetworkName, nodeType: RpcNodeName, blockNumber?: number) { - try { - if (nodeType === "hardhat") - return rpcs.spawn("hardhat", { - fork: networks.rpcUrl("eth", network), - forkBlockNumber: blockNumber, - }); - else if (nodeType === "anvil") - return rpcs.spawn("anvil", { - forkUrl: networks.rpcUrl("eth", network), - forkBlockNumber: blockNumber, - }); - } catch (e) { - throw new Error(`Failed to spawn "${nodeType}" node: ${e}`); - } - throw new Error(`Unsupported node type "${nodeType}"`); -} + await prompt.sigint(); + } catch (err) { + console.error(err); + if (!isKnownError(err)) { + throw err; + } + console.error(err.message); + } finally { + await spawnedNode?.stop(); + } + }); async function runTestFile(testFile: string) { const mocha = new Mocha({ timeout: 10 * 60 * 1000, bail: true }); diff --git a/tasks/sub-tasks/getPilot.ts b/tasks/sub-tasks/getPilot.ts new file mode 100644 index 0000000..e907f71 --- /dev/null +++ b/tasks/sub-tasks/getPilot.ts @@ -0,0 +1,18 @@ +import { Wallet } from "ethers"; +import type { JsonRpcProvider } from "ethers"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import votes from "../../src/votes"; +import format from "../../src/common/format"; +import bytes from "../../src/common/bytes"; + +export const getPilot = async (provider: JsonRpcProvider, hre: HardhatRuntimeEnvironment, testAccount?: boolean) => { + const pilot = testAccount + ? await votes.creator(provider) + : await hre.keystores.unlock().then((privateKey) => new Wallet(privateKey)); + + console.log(`Deployer ${format.address(bytes.normalize(await pilot.getAddress()))}`); + console.log(` - nonce: ${await pilot.getNonce()}`); + console.log(` - balance: ${hre.ethers.formatEther(await provider.getBalance(pilot))} ETH\n`); + + return pilot; +}; diff --git a/tasks/sub-tasks/prepare-provider-and-node.ts b/tasks/sub-tasks/prepare-provider-and-node.ts new file mode 100644 index 0000000..beb0b80 --- /dev/null +++ b/tasks/sub-tasks/prepare-provider-and-node.ts @@ -0,0 +1,67 @@ +import { JsonRpcProvider } from "ethers"; +import networks, { NetworkName } from "../../src/networks"; +import rpcs, { RpcNodeName } from "../../src/rpcs"; + +export async function prepareProviderAndNode( + networkName: NetworkName, + rpc?: RpcNodeName | "local" | "remote", + blockNumber?: number, +) { + const { provider, spawnedNode } = await prepareProvider(networkName, rpc, blockNumber); + await printNetworkInfo(provider, rpc); + return { provider, spawnedNode }; +} + +async function prepareProvider(network: NetworkName, rpc?: RpcNodeName | "local" | "remote", blockNumber?: number) { + if (rpc === "remote") { + console.log(`Running on the remote RPC node on network "${network}"`); + return { provider: new JsonRpcProvider(networks.rpcUrl("eth", network)) } as const; + } else if (rpc === "local") { + const url = networks.localRpcUrl("eth"); + console.log( + `Running on the local RPC node on url ${url}. Expected network ${network}, expected blockNumber ${ + blockNumber ?? '"any"' + }`, + ); + const provider = new JsonRpcProvider(url); + const currentBlockNumber = await provider.getBlockNumber(); + if (blockNumber !== undefined && currentBlockNumber !== blockNumber) { + throw new Error( + `Local RPC node set on the wrong block number. Expected ${blockNumber}, actual: ${currentBlockNumber}`, + ); + } + return { provider } as const; + } else { + console.log(`Spawning "${rpc}" RPC node for "${network}" network, on block number ${blockNumber ?? '"latest"'}...`); + const node = await spawnRpcNode(network, rpc, blockNumber); + console.log(`RPC node was successfully spawned on ${node.url}`); + return { provider: node.provider, spawnedNode: node } as const; + } +} + +async function spawnRpcNode(network: NetworkName, nodeType?: RpcNodeName, blockNumber?: number) { + console.log(nodeType); + try { + if (nodeType === "hardhat") + return rpcs.spawn("hardhat", { + fork: networks.rpcUrl("eth", network), + forkBlockNumber: blockNumber, + }); + else if (nodeType === "anvil") + return rpcs.spawn("anvil", { + forkUrl: networks.rpcUrl("eth", network), + forkBlockNumber: blockNumber, + }); + } catch (err) { + throw new Error(`Failed to spawn "${nodeType}" node: ${err}`); + } + throw new Error(`Unsupported node type "${nodeType}"`); +} + +async function printNetworkInfo(provider: JsonRpcProvider, rpc?: RpcNodeName | "local" | "remote") { + const network = await provider.getNetwork(); + console.log(`Network:`); + console.log(` - rpc: ${rpc}`); + console.log(` - name: ${network.name}`); + console.log(` - chainId: ${network.chainId}\n`); +} diff --git a/tasks/sub-tasks/print-vote-info.ts b/tasks/sub-tasks/print-vote-info.ts new file mode 100644 index 0000000..40c21eb --- /dev/null +++ b/tasks/sub-tasks/print-vote-info.ts @@ -0,0 +1,15 @@ +import { BigNumberish, ContractTransactionReceipt } from "ethers"; + +export const printVoteDeployInfo = async (voteId: BigNumberish, receipt: ContractTransactionReceipt) => { + const launchBlock = await receipt.getBlock(); + const launchDate = new Intl.DateTimeFormat("en-GB", { day: "2-digit", month: "short", year: "numeric" }).format( + new Date(launchBlock.timestamp * 1000), + ); + console.log(` +Omnibus successfully launched 🎉! +Details: + Vote ID: ${voteId} + Block number: ${receipt.blockNumber} + Launch date: ${launchDate} +`); +}; diff --git a/tasks/sub-tasks/upload-description.ts b/tasks/sub-tasks/upload-description.ts new file mode 100644 index 0000000..317dab8 --- /dev/null +++ b/tasks/sub-tasks/upload-description.ts @@ -0,0 +1,57 @@ +import { Omnibus } from "../../src/omnibuses/omnibuses"; +import prompt from "../../src/common/prompt"; +import { calculateCid, getUrlByCidV1, isCidUploaded } from "../../src/ipfs/utils"; +import { getIpfsProvider, instruction } from "../../src/ipfs/ipfs-provider"; + +const VOTE_CID_PREFIX = "lidovoteipfs://"; //just template for parsing, not a real protocol + +export const uploadDescription = async (omnibusName: string, omnibus: Omnibus): Promise => { + const description = omnibus.description.trim(); + if (!description) { + await prompt.confirmOrAbort( + `You have not filled the omnibus description field, it means that users only have a basic description of the items. Do you want to continue?`, + ); + return omnibus.summary; // continue without description + } + + const calculatedCid = await calculateCid(description); + const omnibusDescription = `${omnibus.summary}\n${VOTE_CID_PREFIX}${calculatedCid}`; + + console.log(`Fetching description from IPFS...`); + const isUploaded = await isCidUploaded(calculatedCid); + const ipfsProvider = await getIpfsProvider(); + + if (isUploaded) { + console.log(`The description is already available ${getUrlByCidV1(calculatedCid)} .`); + return omnibusDescription; // continue with prev uploaded + } + + console.log(`Description is not uploaded to IPFS`); + console.log(`Uploading the description to IPFS...`); + + if (!ipfsProvider) { + console.log( + `You have filled vote's description. In order for it work correctly you need to upload description to IPFS. This can be done in two ways. The first way is automatic - ${instruction}. The second way is manual - upload description to IPFS yourself, CID should be ${calculatedCid}`, + ); + await prompt.confirmOrAbort(`You could upload description later. Do you want to continue without uploading? `); + return omnibusDescription; // continue without uploading + } + + const cid = await ipfsProvider.uploadStringToIpfs(description, omnibusName); + if (!cid) { + await prompt.confirmOrAbort( + `Vote description not uploaded. You could upload description later. Do you want to continue without upload?`, + ); + return omnibusDescription; // continue after failed uploading + } + + if (cid !== calculatedCid) { + await prompt.confirmOrAbort( + `Vote description uploaded with error, cid doesn't match. You could upload description later. Do you want to continue without upload?`, + ); + return omnibusDescription; // continue after failed uploading + } + + console.log(`Description uploaded to IPFS ${getUrlByCidV1(cid)} !`); + return omnibusDescription; // continue after success uploading +};