From 70b596dcb99ac6caeec87678baa113e9c5a0e04f Mon Sep 17 00:00:00 2001 From: srfsh Date: Thu, 21 Sep 2023 15:40:16 +0300 Subject: [PATCH] feat!(ethereum): make it work --- pkg/ethereum/src/lexer.ts | 22 +- pkg/ethereum/src/parser.ts | 60 ++- pkg/ethereum/src/plugins.ts | 35 +- pkg/ethereum/src/tokens.ts | 71 +++- pkg/ethereum/src/visitor.ts | 48 ++- pkg/ethereum/test/plugins.ts | 13 +- pnpm-lock.yaml | 714 ++++++++++++++++++++++++++++++++++- 7 files changed, 892 insertions(+), 71 deletions(-) diff --git a/pkg/ethereum/src/lexer.ts b/pkg/ethereum/src/lexer.ts index d0da4b08..bef4d935 100644 --- a/pkg/ethereum/src/lexer.ts +++ b/pkg/ethereum/src/lexer.ts @@ -1,12 +1,26 @@ -import { vocab } from '@slangroom/ethereum/tokens'; +import { ethereumEndpointVocab, ethereumBalanceVocab } from '@slangroom/ethereum/tokens'; import { Lexer } from '@slangroom/deps/chevrotain'; -const FsLexer = new Lexer(vocab); +const EthereumEndpointLexer = new Lexer(ethereumEndpointVocab); +const EthereumBalanceLexer = new Lexer(ethereumBalanceVocab); /** - * Lexes the given statement for filesystems statements. + * Lexes the given statement for Ethereum endpoint statements: + * + * Given I have a ethereum endpoint named 'x' * * @param statement is the statement ignored by Zenroom. * @returns the tokens of the lexed result. **/ -export const lex = (statement: string) => FsLexer.tokenize(statement); +export const lexEthereumEndpoint = (statement: string) => EthereumEndpointLexer.tokenize(statement); + +/** + * Lexes the given statement for reading the Ethereum balance: + * + * Given I read the ethereum balance for 'x' + * + * @param statement is the statement ignored by Zenroom. + * @returns the tokens of the lexed result. + **/ + +export const lexEthereumBalance = (statement: string) => EthereumBalanceLexer.tokenize(statement); diff --git a/pkg/ethereum/src/parser.ts b/pkg/ethereum/src/parser.ts index f89dfd60..ce1dce0e 100644 --- a/pkg/ethereum/src/parser.ts +++ b/pkg/ethereum/src/parser.ts @@ -1,13 +1,21 @@ -import { EthereumEndpoint, EthereumBalance, vocab } from '@slangroom/ethereum/tokens'; -import { lex } from '@slangroom/ethereum/lexer'; +import { + ethereumEndpointVocab, + ethereumBalanceVocab, + Ethereum, + Endpoint, + Balance, +} from '@slangroom/ethereum/tokens'; +import { lexEthereumEndpoint, lexEthereumBalance } from '@slangroom/ethereum/lexer'; import { CstParser, type IToken } from '@slangroom/deps/chevrotain'; -import { Given, I, Identifier, HaveA, Named, For, The, Read } from '@slangroom/shared/tokens'; +import { Given, I, Identifier, Have, A, Named, For, The, Read } from '@slangroom/shared/tokens'; export type EthereumEndpointStatementCtx = { Given: [IToken]; I: [IToken]; - HaveA: [IToken]; - EthereumEndpoint: [IToken]; + Have: [IToken]; + A: [IToken]; + Ethereum: [IToken]; + Endpoint: [IToken]; Named: [IToken]; endpointName: [IToken]; }; @@ -17,39 +25,53 @@ export type EthereumReadBalanceStatementCtx = { I: [IToken]; Read: [IToken]; The: [IToken]; - EthereumBalance: [IToken]; + Ethereum: [IToken]; + Balance: [IToken]; For: [IToken]; addressName: [IToken]; }; -class Parser extends CstParser { +class EthereumEndpointParser extends CstParser { constructor() { - super(vocab); + super(ethereumEndpointVocab); this.performSelfAnalysis(); } ethereumEndpointStatement = this.RULE('ethereumEndpointStatement', () => { this.CONSUME(Given); this.CONSUME(I); - this.CONSUME(HaveA); - this.CONSUME(EthereumEndpoint); + this.CONSUME(Have); + this.CONSUME(A); + this.CONSUME(Ethereum); + this.CONSUME(Endpoint); this.CONSUME(Named); this.CONSUME(Identifier, { LABEL: 'endpointName' }); }); +} + +class EthereumBalanceParser extends CstParser { + constructor() { + super(ethereumBalanceVocab); + this.performSelfAnalysis(); + } ethereumReadBalanceStatement = this.RULE('ethereumReadBalanceStatement', () => { this.CONSUME(Given); this.CONSUME(I); this.CONSUME(Read); this.CONSUME(The); - this.CONSUME(EthereumBalance); + this.CONSUME(Ethereum); + this.CONSUME(Balance); this.CONSUME(For); this.CONSUME(Identifier, { LABEL: 'addressName' }); }); } -export const EthParser = new Parser(); -export const BaseEthVisitor = EthParser.getBaseCstVisitorConstructor(); +export const ethereumEndpointParser = new EthereumEndpointParser(); +export const BaseEthereumEndpointParser = ethereumEndpointParser.getBaseCstVisitorConstructor(); + +export const ethereumBalanceParser = new EthereumBalanceParser(); +export const BaseEthereumBalanceParser = ethereumBalanceParser.getBaseCstVisitorConstructor(); /** * Parses the given statement for ethereum statements. @@ -58,13 +80,13 @@ export const BaseEthVisitor = EthParser.getBaseCstVisitorConstructor(); * @returns the CST of the lexed statement. **/ export const parseEthereumEndpointStatement = (statement: string) => { - const lexed = lex(statement); - EthParser.input = lexed.tokens; - return EthParser.ethereumEndpointStatement(); + const lexed = lexEthereumEndpoint(statement); + ethereumEndpointParser.input = lexed.tokens; + return ethereumEndpointParser.ethereumEndpointStatement(); }; export const parseEthereumReadBalanceStatement = (statement: string) => { - const lexed = lex(statement); - EthParser.input = lexed.tokens; - return EthParser.ethereumReadBalanceStatement(); + const lexed = lexEthereumBalance(statement); + ethereumBalanceParser.input = lexed.tokens; + return ethereumBalanceParser.ethereumReadBalanceStatement(); }; diff --git a/pkg/ethereum/src/plugins.ts b/pkg/ethereum/src/plugins.ts index cfd1a44d..45446c81 100644 --- a/pkg/ethereum/src/plugins.ts +++ b/pkg/ethereum/src/plugins.ts @@ -1,26 +1,35 @@ -import { visitEthereumEndpointStatement, visitEthereumReadBalanceStatement } from '@slangroom/ethereum/visitor'; +import { + visitEthereumEndpointStatement, + visitEthereumReadBalanceStatement, +} from '@slangroom/ethereum/visitor'; import { BeforePlugin } from '@slangroom/core/plugin'; -import { Web3 } from 'web3' +import { Web3 } from 'web3'; -let web3: Web3 | null = null +let web3: Web3 | null = null; export const GivenIHaveAEthereumEndpointNamed = new BeforePlugin(async ({ statement, params }) => { const endpointName = visitEthereumEndpointStatement(statement); - console.log(endpointName) - // TODO: if `visit()` fails, exit (return) + if (!endpointName) return; - const endpoint = ((params?.data || {})[endpointName] || (params?.keys || {})[endpointName] || endpointName) as string; - web3 = new Web3(endpoint); + const endpoint = ((params?.data || {})[endpointName] || + (params?.keys || {})[endpointName] || + endpointName) as string; + web3 = new Web3(endpoint); }); export const GivenIReadTheEhtereumBalanceFor = new BeforePlugin(async ({ statement, params }) => { const addressName = visitEthereumReadBalanceStatement(statement); - // TODO: if `visit()` fails, exit (return) + if (!addressName) return; - const address = ((params?.data || {})[addressName] || (params?.keys || {})[addressName] || addressName) as string; - if(web3 == null) throw Error("No connection to a client") + const address = ((params?.data || {})[addressName] || + (params?.keys || {})[addressName] || + addressName) as string; + if (!web3) throw Error('No connection to a client'); const balance = await web3.eth.getBalance(address); - return { ethereum_balance: balance.toString() } - + return { ethereum_balance: balance.toString() }; }); -export const allPlugins = new Set([GivenIHaveAEthereumEndpointNamed]); + +export const allPlugins = new Set([ + GivenIHaveAEthereumEndpointNamed, + GivenIReadTheEhtereumBalanceFor, +]); diff --git a/pkg/ethereum/src/tokens.ts b/pkg/ethereum/src/tokens.ts index 0a3be385..d0360722 100644 --- a/pkg/ethereum/src/tokens.ts +++ b/pkg/ethereum/src/tokens.ts @@ -1,19 +1,66 @@ -import { Whitespace, Comment, Identifier, Given, I, Named, HaveA } from '@slangroom/shared'; +import { + Whitespace, + Comment, + Identifier, + Given, + I, + Named, + For, + The, + Have, + Read, + A, +} from '@slangroom/shared'; import { createToken } from '@slangroom/deps/chevrotain'; -/** - * The "save the" statement, used to write files to the filesystems. - */ -export const EthereumEndpoint = createToken({ - name: 'EthereumEndpoint', - pattern: /ethereum endpoint/, +export const Ethereum = createToken({ + name: 'Ethereum', + pattern: /ethereum/i, +}); + +export const Endpoint = createToken({ + name: 'Endpoint', + pattern: /endpoint/i, }); -export const EthereumBalance = createToken({ - name: 'EthereumBalance', - pattern: /ethereum balance/, +export const Balance = createToken({ + name: 'Balance', + pattern: /balance/i, }); + +/** + * The vocabulary for the statements that specifies endpoints for Ethereum: + * + * Given I have a ethereum endpoint named 'x' + */ +export const ethereumEndpointVocab = [ + Whitespace, + Comment, + Given, + I, + Have, + A, + Ethereum, + Endpoint, + Named, + Identifier, +]; + /** - * Vocabulary to perform filesystems actions. + * The vocabulary for statements that reads the balance of a given Ethereum + * address: + * + * Given I read the ethereum balance for 'x' */ -export const vocab = [Whitespace, Comment, Given, I, Identifier, EthereumEndpoint, EthereumBalance, Named, HaveA]; +export const ethereumBalanceVocab = [ + Whitespace, + Comment, + Given, + I, + Read, + The, + Ethereum, + Balance, + For, + Identifier, +]; diff --git a/pkg/ethereum/src/visitor.ts b/pkg/ethereum/src/visitor.ts index 8bb65410..db2d4a39 100644 --- a/pkg/ethereum/src/visitor.ts +++ b/pkg/ethereum/src/visitor.ts @@ -1,41 +1,55 @@ -import { BaseEthVisitor, parseEthereumReadBalanceStatement, parseEthereumEndpointStatement, - type EthereumEndpointStatementCtx, type EthereumReadBalanceStatementCtx } from '@slangroom/ethereum/parser'; +import { + BaseEthereumEndpointParser, + BaseEthereumBalanceParser, + parseEthereumReadBalanceStatement, + parseEthereumEndpointStatement, + type EthereumEndpointStatementCtx, + type EthereumReadBalanceStatementCtx, +} from '@slangroom/ethereum/parser'; import type { CstNode } from '@slangroom/deps/chevrotain'; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -interface Visitor { - visitEthereumEndpointConnect(params: CstNode): string; - visitEthereumReadBalance(params: CstNode): string; +interface EthereumBalanceVisitor { + visit(params: CstNode): string; } -class Visitor extends BaseEthVisitor { +class EthereumEndpointVisitor extends BaseEthereumEndpointParser { constructor() { super(); this.validateVisitor(); } ethereumEndpointStatement(ctx: EthereumEndpointStatementCtx) { - return ctx.endpointName[0].image.slice(1, -1) + return ctx.endpointName[0].image.slice(1, -1); } +} + +export const ethereumEndpointVisitor = new EthereumEndpointVisitor(); + +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +interface EthereumBalanceVisitor { + visit(params: CstNode): string; +} + +class EthereumBalanceVisitor extends BaseEthereumBalanceParser { + constructor() { + super(); + this.validateVisitor(); + } + ethereumReadBalanceStatement(ctx: EthereumReadBalanceStatementCtx) { - return ctx.addressName[0].image.slice(1, -1) + return ctx.addressName[0].image.slice(1, -1); } } -export const EthVisitor = new Visitor(); +export const ethereumBalanceVisitor = new EthereumBalanceVisitor(); -/** - * Visits the given statement for filesystems statements. - * - * @param statement is the statement ignored by Zenroom. - * @returns the AST of the parsed CST. - **/ export const visitEthereumEndpointStatement = (statement: string) => { const cst = parseEthereumEndpointStatement(statement); - return EthVisitor.visitEthereumEndpointConnect(cst); + return ethereumEndpointVisitor.visit(cst); }; export const visitEthereumReadBalanceStatement = (statement: string) => { const cst = parseEthereumReadBalanceStatement(statement); - return EthVisitor.visitEthereumReadBalance(cst); + return ethereumBalanceVisitor.visit(cst); }; diff --git a/pkg/ethereum/test/plugins.ts b/pkg/ethereum/test/plugins.ts index 1f338613..b3ee5304 100644 --- a/pkg/ethereum/test/plugins.ts +++ b/pkg/ethereum/test/plugins.ts @@ -7,17 +7,22 @@ test('Read the balance of an array of addresses', async (t) => { const contract = `Rule unknown ignore Scenario ethereum -Given I have a ethereum endpoint named 'fabchain' -Given I read the ethereum balance for 'my_address' +Given I have a ethereum endpoint named 'endpoint' +Given I read the ethereum balance for 'my_address' Given I have a 'wei value' named 'ethereum balance' Then print the 'ethereum balance' as 'wei value' `; { - const params = { data: { endpoint: 'http://78.47.38.223:9485', my_address: '2D010920b43aFb54f8d5fB51c9354FbC674b28Fc' } }; + const params = { + data: { + endpoint: 'http://78.47.38.223:9485', + my_address: '0x2D010920b43aFb54f8d5fB51c9354FbC674b28Fc', + }, + }; const zout = await slang.execute(contract, params); const ethereumBalance = zout.result['ethereum_balance'] as string; - t.is(ethereumBalance, '1000000000000000000000') + t.is(ethereumBalance, '1000000000000000000000'); } }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 59e24f5e..e9362f48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,6 +66,24 @@ importers: specifier: ^3.10.0 version: 3.10.0 + pkg/ethereum: + dependencies: + '@slangroom/core': + specifier: workspace:* + version: link:../core + '@slangroom/deps': + specifier: workspace:* + version: link:../deps + '@slangroom/ignored': + specifier: workspace:* + version: link:../ignored + '@slangroom/shared': + specifier: workspace:* + version: link:../shared + web3: + specifier: ^4.1.2 + version: 4.1.2 + pkg/fs: dependencies: '@slangroom/core': @@ -98,6 +116,10 @@ importers: packages: + /@adraffy/ens-normalize@1.10.0: + resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + dev: false + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true @@ -367,6 +389,171 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@ethereumjs/rlp@4.0.1: + resolution: {integrity: sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==} + engines: {node: '>=14'} + hasBin: true + dev: false + + /@ethersproject/abi@5.7.0: + resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + + /@ethersproject/abstract-provider@5.7.0: + resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + dev: false + + /@ethersproject/abstract-signer@5.7.0: + resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + dev: false + + /@ethersproject/address@5.7.0: + resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/rlp': 5.7.0 + dev: false + + /@ethersproject/base64@5.7.0: + resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} + dependencies: + '@ethersproject/bytes': 5.7.0 + dev: false + + /@ethersproject/bignumber@5.7.0: + resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + bn.js: 5.2.1 + dev: false + + /@ethersproject/bytes@5.7.0: + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/constants@5.7.0: + resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + dev: false + + /@ethersproject/hash@5.7.0: + resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + + /@ethersproject/keccak256@5.7.0: + resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} + dependencies: + '@ethersproject/bytes': 5.7.0 + js-sha3: 0.8.0 + dev: false + + /@ethersproject/logger@5.7.0: + resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + dev: false + + /@ethersproject/networks@5.7.1: + resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/properties@5.7.0: + resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/rlp@5.7.0: + resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/signing-key@5.7.0: + resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + bn.js: 5.2.1 + elliptic: 6.5.4 + hash.js: 1.1.7 + dev: false + + /@ethersproject/strings@5.7.0: + resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: false + + /@ethersproject/transactions@5.7.0: + resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + dev: false + + /@ethersproject/web@5.7.1: + resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} + dependencies: + '@ethersproject/base64': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: false + /@humanwhocodes/config-array@0.11.10: resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} engines: {node: '>=10.10.0'} @@ -424,6 +611,17 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@noble/curves@1.1.0: + resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==} + dependencies: + '@noble/hashes': 1.3.1 + dev: false + + /@noble/hashes@1.3.1: + resolution: {integrity: sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==} + engines: {node: '>= 16'} + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -445,6 +643,25 @@ packages: fastq: 1.15.0 dev: true + /@scure/base@1.1.3: + resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} + dev: false + + /@scure/bip32@1.3.1: + resolution: {integrity: sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==} + dependencies: + '@noble/curves': 1.1.0 + '@noble/hashes': 1.3.1 + '@scure/base': 1.1.3 + dev: false + + /@scure/bip39@1.2.1: + resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} + dependencies: + '@noble/hashes': 1.3.1 + '@scure/base': 1.1.3 + dev: false + /@tsconfig/node10@1.0.9: resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} dev: true @@ -471,12 +688,17 @@ packages: /@types/node@20.3.1: resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} - dev: true /@types/semver@7.5.0: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true + /@types/ws@8.5.3: + resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} + dependencies: + '@types/node': 20.3.1 + dev: false + /@typescript-eslint/eslint-plugin@5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@4.9.5): resolution: {integrity: sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -768,6 +990,11 @@ packages: - supports-color dev: true + /available-typed-arrays@1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + dev: false + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -781,6 +1008,14 @@ packages: resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} dev: true + /bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: false + + /bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: false + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -801,6 +1036,10 @@ packages: fill-range: 7.0.1 dev: true + /brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: false + /c8@8.0.1: resolution: {integrity: sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==} engines: {node: '>=12'} @@ -820,6 +1059,13 @@ packages: yargs-parser: 21.1.1 dev: true + /call-bind@1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.2.1 + dev: false + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -967,10 +1213,24 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true + /crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} + hasBin: true + dev: false + /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: false + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1033,6 +1293,18 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /elliptic@6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false + /emittery@1.0.1: resolution: {integrity: sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==} engines: {node: '>=14.16'} @@ -1218,6 +1490,15 @@ packages: engines: {node: '>=0.10.0'} dev: true + /ethereum-cryptography@2.1.2: + resolution: {integrity: sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==} + dependencies: + '@noble/curves': 1.1.0 + '@noble/hashes': 1.3.1 + '@scure/bip32': 1.3.1 + '@scure/bip39': 1.2.1 + dev: false + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -1312,6 +1593,12 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: false + /foreground-child@2.0.0: resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} engines: {node: '>=8.0.0'} @@ -1332,11 +1619,24 @@ packages: dev: true optional: true + /function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + dev: false + /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} dev: true + /get-intrinsic@1.2.1: + resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-proto: 1.0.1 + has-symbols: 1.0.3 + dev: false + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1392,6 +1692,12 @@ packages: slash: 4.0.0 dev: true + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.1 + dev: false + /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true @@ -1405,6 +1711,45 @@ packages: engines: {node: '>=8'} dev: true + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: false + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: false + + /has-tostringtag@1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: false + + /has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + dev: false + + /hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + + /hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: false + /html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true @@ -1446,13 +1791,20 @@ packages: /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /irregular-plurals@3.5.0: resolution: {integrity: sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==} engines: {node: '>=8'} dev: true + /is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: false + /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1460,6 +1812,11 @@ packages: binary-extensions: 2.2.0 dev: true + /is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: false + /is-error@2.2.2: resolution: {integrity: sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==} dev: true @@ -1479,6 +1836,13 @@ packages: engines: {node: '>=12'} dev: true + /is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: false + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -1505,6 +1869,13 @@ packages: resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} dev: true + /is-typed-array@1.1.12: + resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} + engines: {node: '>= 0.4'} + dependencies: + which-typed-array: 1.1.11 + dev: false + /is-unicode-supported@1.3.0: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} @@ -1514,6 +1885,14 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-ws@5.0.0(ws@8.14.2): + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + dependencies: + ws: 8.14.2 + dev: false + /istanbul-lib-coverage@3.2.0: resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} engines: {node: '>=8'} @@ -1536,6 +1915,10 @@ packages: istanbul-lib-report: 3.0.1 dev: true + /js-sha3@0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + dev: false + /js-string-escape@1.0.1: resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} engines: {node: '>= 0.8'} @@ -1677,6 +2060,14 @@ packages: engines: {node: '>=12'} dev: true + /minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: false + + /minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: false + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -1706,6 +2097,18 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: false + /nofilter@3.1.0: resolution: {integrity: sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==} engines: {node: '>=12.19'} @@ -1944,6 +2347,10 @@ packages: type-fest: 0.13.1 dev: true + /setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: false + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -2087,6 +2494,10 @@ packages: is-number: 7.0.0 dev: true + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: false + /ts-node@10.9.1(@types/node@20.3.1)(typescript@4.9.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -2179,6 +2590,16 @@ packages: punycode: 2.3.0 dev: true + /util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.12 + which-typed-array: 1.1.11 + dev: false + /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true @@ -2200,11 +2621,283 @@ packages: resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: true + /web3-core@4.2.0: + resolution: {integrity: sha512-pkZJx3HAY3b3CutaFarODFgK3TDvcXC4T0n8cpvwiZjDzakUUFAssVUDwrmFyCFKAo5kmfs6qWFW7BAZLJeBFA==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-errors: 1.1.2 + web3-eth-iban: 4.0.6 + web3-providers-http: 4.0.6 + web3-providers-ws: 4.0.6 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + optionalDependencies: + web3-providers-ipc: 4.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-errors@1.1.2: + resolution: {integrity: sha512-qlyuV5r6MzjLasIalVWBIIfW4Y7hBX2bZv8TRnXvI1EjiZ36zIFKgE9RF+/iRBjXmOsvIUQQ2Z9gMvYGfOwUwQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-types: 1.2.0 + dev: false + + /web3-eth-abi@4.1.2: + resolution: {integrity: sha512-s8gvjUwzb2ZnAef0Jy68pjmeshYIKBoYlVj/1yuuFP9t3io3oQQIEyGlaCx7P4ifsZ186gMa4QjCCeIt7HYm7Q==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + dev: false + + /web3-eth-accounts@4.0.6: + resolution: {integrity: sha512-xkOXXAEZs2CcR2v33CvFwtGJQS05ye7c3dlXcqwre91fhah9e6u4CPztpyR7HIKegWfIG1DRUwrcEqM2EMo4/w==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@ethereumjs/rlp': 4.0.1 + crc-32: 1.2.2 + ethereum-cryptography: 2.1.2 + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + dev: false + + /web3-eth-contract@4.1.0: + resolution: {integrity: sha512-e1eEXSwzNUaC5j0WWDqQ527fPFtIswoJZ/cov8mWvTQi3+dqyI590/6s7IF6A5CGew1RrewAqPMrR9m7WQt7hw==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.2.0 + web3-errors: 1.1.2 + web3-eth: 4.2.0 + web3-eth-abi: 4.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-eth-ens@4.0.6: + resolution: {integrity: sha512-ulEX1XRuTojcpWuSd5pk7+CWkE7Yrgi18TcgiQkz+ltQWOVlSHBjcQ/guA9MJoFPa2d3ADSdCbRQEZDZ8Lu3gw==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@adraffy/ens-normalize': 1.10.0 + web3-core: 4.2.0 + web3-errors: 1.1.2 + web3-eth: 4.2.0 + web3-eth-contract: 4.1.0 + web3-net: 4.0.6 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-eth-iban@4.0.6: + resolution: {integrity: sha512-q47MbmoYWdfoylHlKZkZRHiPYeiFWqRiHou/wTYJEeZa2D3NG0wuPWz3jeQdZ5NzmS85yh+p2hxa54azVT8qmw==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + dev: false + + /web3-eth-personal@4.0.6: + resolution: {integrity: sha512-QBIl5fH5GPzDfYWxOvOLghnPruopVFfgnYsRmxEu85WAFidBb+XCqIOLmKe4qfF5czPG7gA/7PCPdsPqGNlf7Q==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.2.0 + web3-eth: 4.2.0 + web3-rpc-methods: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-eth@4.2.0: + resolution: {integrity: sha512-8YUEp5bq8j6KzlWpf856e0ZTXSNgJEYPg1gzzrmFC2+l0cjbul7vHnLA7DAsQGrIvXvvHvRp8da/8Ogm+G6FYQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + setimmediate: 1.0.5 + web3-core: 4.2.0 + web3-errors: 1.1.2 + web3-eth-abi: 4.1.2 + web3-eth-accounts: 4.0.6 + web3-net: 4.0.6 + web3-providers-ws: 4.0.6 + web3-rpc-methods: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-net@4.0.6: + resolution: {integrity: sha512-Th4AtgpBgMdt76PmYyNBQxwAd2hAR8hIjhU4xjhqk1JATlXpcfgzyhegeAsvnSht4tcLnVQt6SN4ZVccllpd4A==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.2.0 + web3-rpc-methods: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-providers-http@4.0.6: + resolution: {integrity: sha512-FnBw0X25Xu0FejOgY2Ra7WY4p3fSrHxZuQ5a4j0ytDCE+0wxKQN0BaLRC7+uigbVvwEziQwzrhe+tn8bYAQKXQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + cross-fetch: 3.1.8 + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + transitivePeerDependencies: + - encoding + dev: false + + /web3-providers-ipc@4.0.6: + resolution: {integrity: sha512-17Ky978qGgdSWtctc/WKj9kX+QUypk6arZLI/Rfmq4zQpoR5ngH38CGozRkXUonr9hITYNaLW82NB1SPi1pRPQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + requiresBuild: true + dependencies: + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + dev: false + optional: true + + /web3-providers-ws@4.0.6: + resolution: {integrity: sha512-0Q0SuKpr05gK+tUXdzPNmYlDV3exdqxnHx3f8p3cqz+v66J04EOT31bbETS0VcpDiQ9YaVS8FVSjT4PaseuNag==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + '@types/ws': 8.5.3 + isomorphic-ws: 5.0.0(ws@8.14.2) + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + ws: 8.14.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: false + + /web3-rpc-methods@1.1.2: + resolution: {integrity: sha512-fzYp9eJyzq/UBzpP9kOQormelLfvl1kJnX5ucHv4T6kZaQfDuBt5XoYDtCDXSXVaz2MgTowsXwKEVAzN6h7+Ag==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + web3-core: 4.2.0 + web3-types: 1.2.0 + web3-validator: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /web3-types@1.2.0: + resolution: {integrity: sha512-ljx8mrkrOI8fRqvgOdxfpKYoso6n7I8T9LsqXl+Mz2Db0L+2H15an0xgdoWYpKndTPiU2NKRWFiopYifBQzcxQ==} + engines: {node: '>=14', npm: '>=6.12.0'} + dev: false + + /web3-utils@4.0.6: + resolution: {integrity: sha512-nLVtMf9mWTX604XiQQkWZlHLCag9GdHfQtnGJDNaDssTLUx5SpOm1CjhKCHcVcAH/QazEsWcLqUAuyqwKST1kA==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + ethereum-cryptography: 2.1.2 + web3-errors: 1.1.2 + web3-types: 1.2.0 + web3-validator: 2.0.2 + dev: false + + /web3-validator@2.0.2: + resolution: {integrity: sha512-9sQ5owd2UldTsva3o3htj2fTPpbmUwb4TfBXhjIkew8FyT0ss3DPI+j3p6XrfdxIVBEQ5r17YUakElDV99aW+A==} + engines: {node: '>=14', npm: '>=6.12.0'} + dependencies: + ethereum-cryptography: 2.1.2 + util: 0.12.5 + web3-errors: 1.1.2 + web3-types: 1.2.0 + zod: 3.22.2 + dev: false + + /web3@4.1.2: + resolution: {integrity: sha512-BTUCJU7LvL0JDvB1RCRtHe5jFZ0sVYVqHvlNbG4uzebZ6ebtX/CnwiyiJ08UOuvKWzHrZQ+7jPuYuF65BMAXnQ==} + engines: {node: '>=14.0.0', npm: '>=6.12.0'} + dependencies: + web3-core: 4.2.0 + web3-errors: 1.1.2 + web3-eth: 4.2.0 + web3-eth-abi: 4.1.2 + web3-eth-accounts: 4.0.6 + web3-eth-contract: 4.1.0 + web3-eth-ens: 4.0.6 + web3-eth-iban: 4.0.6 + web3-eth-personal: 4.0.6 + web3-net: 4.0.6 + web3-providers-http: 4.0.6 + web3-providers-ws: 4.0.6 + web3-rpc-methods: 1.1.2 + web3-types: 1.2.0 + web3-utils: 4.0.6 + web3-validator: 2.0.2 + transitivePeerDependencies: + - bufferutil + - encoding + - utf-8-validate + dev: false + + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: false + /well-known-symbols@2.0.0: resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} engines: {node: '>=6'} dev: true + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: false + + /which-typed-array@1.1.11: + resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + dev: false + /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2239,6 +2932,19 @@ packages: signal-exit: 4.1.0 dev: true + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: false + /y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -2284,3 +2990,7 @@ packages: /zenroom@3.10.0: resolution: {integrity: sha512-IaULB5zVo7pfC/tT2t5gz/nWK/v+j5rMrcX0lmiu/QMVMgUfmu61mf1vxTi4RJhfizu2R878IoX0Ua0783dpjg==} dev: false + + /zod@3.22.2: + resolution: {integrity: sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==} + dev: false