From 849d0ea40057770e54646c81aca76eb9aa90c507 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 8 Aug 2023 15:56:11 +0200 Subject: [PATCH 01/18] Drafting deployment scripts for Solana These changes include bash scripts and typescripts that are used to build and deploy programs on Solana. We also need to initalize these programs. More init work to come.. --- cross-chain/solana/.gitignore | 3 +- cross-chain/solana/.prettierrc.js | 3 + cross-chain/solana/Anchor.toml | 1 + cross-chain/solana/migrations/deploy.ts | 84 +- cross-chain/solana/package-lock.json | 3395 +++++++++++++++-- cross-chain/solana/package.json | 16 +- cross-chain/solana/scripts/deploy.sh | 31 + .../solana/scripts/transfer_authority.sh | 12 + cross-chain/solana/solana.env.template | 3 + .../solana/typescript/transfer_authority.ts | 46 + 10 files changed, 3253 insertions(+), 341 deletions(-) create mode 100644 cross-chain/solana/.prettierrc.js create mode 100755 cross-chain/solana/scripts/deploy.sh create mode 100755 cross-chain/solana/scripts/transfer_authority.sh create mode 100644 cross-chain/solana/solana.env.template create mode 100644 cross-chain/solana/typescript/transfer_authority.ts diff --git a/cross-chain/solana/.gitignore b/cross-chain/solana/.gitignore index 0f1813a21..29be122a2 100644 --- a/cross-chain/solana/.gitignore +++ b/cross-chain/solana/.gitignore @@ -7,4 +7,5 @@ target node_modules test-ledger artifacts-mainnet -artifacts-testnet \ No newline at end of file +artifacts-testnet +solana.env \ No newline at end of file diff --git a/cross-chain/solana/.prettierrc.js b/cross-chain/solana/.prettierrc.js new file mode 100644 index 000000000..c22abd03a --- /dev/null +++ b/cross-chain/solana/.prettierrc.js @@ -0,0 +1,3 @@ +module.exports = { + ...require("@thesis-co/prettier-config"), +} diff --git a/cross-chain/solana/Anchor.toml b/cross-chain/solana/Anchor.toml index 052529539..46ce2c333 100644 --- a/cross-chain/solana/Anchor.toml +++ b/cross-chain/solana/Anchor.toml @@ -22,6 +22,7 @@ wallet = "~/.config/solana/id.json" [scripts] test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" +authority = "ts-node --files ./typescript/transfer_authority.ts" [test] startup_wait = 10000 diff --git a/cross-chain/solana/migrations/deploy.ts b/cross-chain/solana/migrations/deploy.ts index 82fb175fa..8c5ae8ac9 100644 --- a/cross-chain/solana/migrations/deploy.ts +++ b/cross-chain/solana/migrations/deploy.ts @@ -1,12 +1,78 @@ -// Migrations are an early feature. Currently, they're nothing more than this -// single deploy script that's invoked from the CLI, injecting a provider -// configured from the workspace's Anchor.toml. - -const anchor = require("@coral-xyz/anchor"); +import * as anchor from "@coral-xyz/anchor" +import fs from "fs" +import { PublicKey, Keypair } from "@solana/web3.js" +import dotenv from "dotenv" +import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; module.exports = async function (provider) { - // Configure client to use the provider. - anchor.setProvider(provider); + dotenv.config({ path: "../solana.env" }) + + anchor.setProvider(provider) + + const tbtcProgram = anchor.workspace.Tbtc + // This wallet deployed the program and is also an authority + const authority = loadKey(process.env.AUTHORITY) + const newAuthority = process.env.THRESHOLD_COUNCIL_MULTISIG + + const mint = PublicKey.findProgramAddressSync( + [Buffer.from("tbtc-mint")], + tbtcProgram.programId + )[0]; + + const config = PublicKey.findProgramAddressSync( + [Buffer.from("config")], + tbtcProgram.programId + )[0]; + + const guardians = PublicKey.findProgramAddressSync( + [Buffer.from("guardians")], + tbtcProgram.programId + )[0]; + + const minters = PublicKey.findProgramAddressSync( + [Buffer.from("minters")], + tbtcProgram.programId + )[0]; + + const tbtcMetadata = PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + METADATA_PROGRAM_ID.toBuffer(), + mint.toBuffer(), + ], + METADATA_PROGRAM_ID + )[0]; + + const mplTokenMetadataProgram = METADATA_PROGRAM_ID; + + // Initalize tbtc program + await tbtcProgram.methods + .initialize() + .accounts({ + mint, + config, + guardians, + minters, + authority, + tbtcMetadata, + mplTokenMetadataProgram + }) + .instruction() + + // add minter + + // add guardian? + + // update mappings (self, base, arbitrum, optimism, polygon) +} + +function loadKey(filename: string): Keypair { + try { + const contents = fs.readFileSync(filename).toString() + const bs = Uint8Array.from(JSON.parse(contents)) - // Add your deploy script here. -}; + return Keypair.fromSecretKey(bs) + } catch { + console.log("Unable to read keypair...", filename) + } +} \ No newline at end of file diff --git a/cross-chain/solana/package-lock.json b/cross-chain/solana/package-lock.json index caf320a81..4415d5564 100644 --- a/cross-chain/solana/package-lock.json +++ b/cross-chain/solana/package-lock.json @@ -1,9 +1,13 @@ { - "name": "solana", + "name": "@keep-network/tbtc-v2-solana", + "version": "1.0.0-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { + "name": "@keep-network/tbtc-v2-solana", + "version": "1.0.0-dev", + "license": "GPL-3.0-only", "dependencies": { "@coral-xyz/anchor": "^0.28.0" }, @@ -12,16 +16,30 @@ "@metaplex-foundation/mpl-token-metadata": "^2.13.0", "@solana/spl-token": "^0.3.8", "@solana/web3.js": "^1.77.3", + "@thesis-co/eslint-config": "github:thesis/eslint-config", "@types/bn.js": "^5.1.0", "@types/chai": "^4.3.0", "@types/mocha": "^9.0.0", + "@types/node": "^18.11.18", "chai": "^4.3.4", + "dotenv": "^16.3.1", "mocha": "^9.0.3", "prettier": "^2.6.2", "ts-mocha": "^10.0.0", + "ts-node": "^10.1.0", "typescript": "^4.3.5" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@apollo/client": { "version": "3.7.17", "dev": true, @@ -163,11 +181,6 @@ "@types/node": "^18.0.3" } }, - "node_modules/@certusone/wormhole-sdk-wasm/node_modules/@types/node": { - "version": "18.17.1", - "dev": true, - "license": "MIT" - }, "node_modules/@certusone/wormhole-sdk/node_modules/@injectivelabs/networks": { "version": "1.10.12", "dev": true, @@ -470,6 +483,76 @@ "license": "Apache-2.0", "optional": true }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", + "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", + "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@ethereumjs/common": { "version": "2.6.5", "dev": true, @@ -1222,6 +1305,42 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "dev": true, + "peer": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true, + "peer": true + }, "node_modules/@improbable-eng/grpc-web": { "version": "0.14.1", "dev": true, @@ -1557,6 +1676,31 @@ "node_modules/@injectivelabs/utils/dist": { "extraneous": true }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@metamask/eth-sig-util": { "version": "4.0.1", "dev": true, @@ -1777,6 +1921,41 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@project-serum/anchor": { "version": "0.25.0", "dev": true, @@ -2055,6 +2234,66 @@ "protobufjs": "~6.11.2" } }, + "node_modules/@thesis-co/eslint-config": { + "version": "0.6.0-pre", + "resolved": "git+ssh://git@github.com/thesis/eslint-config.git#6f0be99fd2efc446a74b5967db27aa2e4d4beaeb", + "dev": true, + "license": "MIT", + "dependencies": { + "@thesis-co/prettier-config": "github:thesis/prettier-config", + "@typescript-eslint/eslint-plugin": ">4.32.0", + "@typescript-eslint/parser": ">4.32.0", + "eslint-config-airbnb": "^19.0.0", + "eslint-config-airbnb-typescript": "^17.0.0", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-jsx-a11y": "^6.6.1", + "eslint-plugin-no-only-tests": "^3.1.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-react": "^7.31.11", + "eslint-plugin-react-hooks": "^4.3.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "eslint": ">=6.8.0" + } + }, + "node_modules/@thesis-co/prettier-config": { + "name": "@thesis/prettier-config", + "version": "0.0.1", + "resolved": "git+ssh://git@github.com/thesis/prettier-config.git#a057ca0bab89fee9ee81ac580c446618c722d75d", + "dev": true, + "license": "MIT", + "peerDependencies": { + "prettier": "^2.3.0" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@types/bn.js": { "version": "5.1.1", "dev": true, @@ -2075,11 +2314,16 @@ "@types/node": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/@types/lodash": { "version": "4.14.196", @@ -2107,8 +2351,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.4.5", - "license": "MIT" + "version": "18.17.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.3.tgz", + "integrity": "sha512-2x8HWtFk0S99zqVQABU9wTpr8wPoaDHZUcAkoTKH+nL7kPv3WUI9cRi/Kk5Mz4xdqXSqTkKP7IWNoQQYCnDsTA==" }, "node_modules/@types/pbkdf2": { "version": "3.1.0", @@ -2126,6 +2371,12 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, "node_modules/@types/ws": { "version": "7.4.7", "license": "MIT", @@ -2133,119 +2384,92 @@ "@types/node": "*" } }, - "node_modules/@ungap/promise-all-settled": { - "version": "1.1.2", - "dev": true, - "license": "ISC" - }, - "node_modules/@wry/context": { - "version": "0.7.3", + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.3.0.tgz", + "integrity": "sha512-IZYjYZ0ifGSLZbwMqIip/nOamFiWJ9AH+T/GYNZBWkVcyNQOFGtSMoWV7RvY4poYCMZ/4lHzNl796WOSNxmk8A==", "dev": true, - "license": "MIT", - "optional": true, "dependencies": { - "tslib": "^2.3.0" + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.3.0", + "@typescript-eslint/type-utils": "6.3.0", + "@typescript-eslint/utils": "6.3.0", + "@typescript-eslint/visitor-keys": "6.3.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/equality": { - "version": "0.5.6", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" + "node": "^16.0.0 || >=18.0.0" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@wry/trie": { - "version": "0.4.3", - "dev": true, - "license": "MIT", - "optional": true, - "dependencies": { - "tslib": "^2.3.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@xpla/xpla.js": { - "version": "0.2.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@ethersproject/bytes": "^5.6.1", - "@ethersproject/keccak256": "^5.6.1", - "@ethersproject/signing-key": "^5.6.2", - "@terra-money/legacy.proto": "npm:@terra-money/terra.proto@^0.1.7", - "@terra-money/terra.proto": "^2.1.0", - "axios": "^0.26.1", - "bech32": "^2.0.0", - "bip32": "^2.0.6", - "bip39": "^3.0.3", - "bufferutil": "^4.0.3", - "crypto-addr-codec": "^0.1.7", - "decimal.js": "^10.2.1", - "elliptic": "^6.5.4", - "ethereumjs-util": "^7.1.5", - "jscrypto": "^1.0.1", - "readable-stream": "^3.6.0", - "secp256k1": "^4.0.2", - "tmp": "^0.2.1", - "utf-8-validate": "^5.0.5", - "ws": "^7.5.8" + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, - "engines": { - "node": ">=14" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@xpla/xpla.js/node_modules/axios": { - "version": "0.26.1", + "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "license": "MIT", "dependencies": { - "follow-redirects": "^1.14.8" - } - }, - "node_modules/acorn": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", - "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", - "dev": true, - "optional": true, - "bin": { - "acorn": "bin/acorn" + "ms": "2.1.2" }, "engines": { - "node": ">=0.4.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/aes-js": { - "version": "3.0.0", + "node_modules/@typescript-eslint/parser": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.3.0.tgz", + "integrity": "sha512-ibP+y2Gr6p0qsUkhs7InMdXrwldjxZw66wpcQq9/PzAroM45wdwyu81T+7RibNCh8oc0AgrsyCwJByncY0Ongg==", "dev": true, - "license": "MIT", - "optional": true - }, - "node_modules/agentkeepalive": { - "version": "4.3.0", - "license": "MIT", "dependencies": { - "debug": "^4.1.0", - "depd": "^2.0.0", - "humanize-ms": "^1.2.1" + "@typescript-eslint/scope-manager": "6.3.0", + "@typescript-eslint/types": "6.3.0", + "@typescript-eslint/typescript-estree": "6.3.0", + "@typescript-eslint/visitor-keys": "6.3.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 8.0.0" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/agentkeepalive/node_modules/debug": { + "node_modules/@typescript-eslint/parser/node_modules/debug": { "version": "4.3.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -2258,12 +2482,332 @@ } } }, - "node_modules/algo-msgpack-with-bigint": { - "version": "2.1.1", + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.3.0.tgz", + "integrity": "sha512-WlNFgBEuGu74ahrXzgefiz/QlVb+qg8KDTpknKwR7hMH+lQygWyx0CQFoUmMn1zDkQjTBBIn75IxtWss77iBIQ==", "dev": true, - "license": "ISC", + "dependencies": { + "@typescript-eslint/types": "6.3.0", + "@typescript-eslint/visitor-keys": "6.3.0" + }, "engines": { - "node": ">= 10" + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.3.0.tgz", + "integrity": "sha512-7Oj+1ox1T2Yc8PKpBvOKWhoI/4rWFd1j7FA/rPE0lbBPXTKjdbtC+7Ev0SeBjEKkIhKWVeZSP+mR7y1Db1CdfQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.3.0", + "@typescript-eslint/utils": "6.3.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.3.0.tgz", + "integrity": "sha512-K6TZOvfVyc7MO9j60MkRNWyFSf86IbOatTKGrpTQnzarDZPYPVy0oe3myTMq7VjhfsUAbNUW8I5s+2lZvtx1gg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.3.0.tgz", + "integrity": "sha512-Xh4NVDaC4eYKY4O3QGPuQNp5NxBAlEvNQYOqJquR2MePNxO11E5K3t5x4M4Mx53IZvtpW+mBxIT0s274fLUocg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.3.0", + "@typescript-eslint/visitor-keys": "6.3.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.3.0.tgz", + "integrity": "sha512-hLLg3BZE07XHnpzglNBG8P/IXq/ZVXraEbgY7FM0Cnc1ehM8RMdn9mat3LubJ3KBeYXXPxV1nugWbQPjGeJk6Q==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.3.0", + "@typescript-eslint/types": "6.3.0", + "@typescript-eslint/typescript-estree": "6.3.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.3.0.tgz", + "integrity": "sha512-kEhRRj7HnvaSjux1J9+7dBen15CdWmDnwrpyiHsFX6Qx2iW5LOBUgNefOFeh2PjWPlNwN8TOn6+4eBU3J/gupw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.3.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/promise-all-settled": { + "version": "1.1.2", + "dev": true, + "license": "ISC" + }, + "node_modules/@wry/context": { + "version": "0.7.3", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/equality": { + "version": "0.5.6", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wry/trie": { + "version": "0.4.3", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@xpla/xpla.js": { + "version": "0.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/keccak256": "^5.6.1", + "@ethersproject/signing-key": "^5.6.2", + "@terra-money/legacy.proto": "npm:@terra-money/terra.proto@^0.1.7", + "@terra-money/terra.proto": "^2.1.0", + "axios": "^0.26.1", + "bech32": "^2.0.0", + "bip32": "^2.0.6", + "bip39": "^3.0.3", + "bufferutil": "^4.0.3", + "crypto-addr-codec": "^0.1.7", + "decimal.js": "^10.2.1", + "elliptic": "^6.5.4", + "ethereumjs-util": "^7.1.5", + "jscrypto": "^1.0.1", + "readable-stream": "^3.6.0", + "secp256k1": "^4.0.2", + "tmp": "^0.2.1", + "utf-8-validate": "^5.0.5", + "ws": "^7.5.8" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@xpla/xpla.js/node_modules/axios": { + "version": "0.26.1", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.8" + } + }, + "node_modules/acorn": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz", + "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "optional": true + }, + "node_modules/agentkeepalive": { + "version": "4.3.0", + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "depd": "^2.0.0", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/agentkeepalive/node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/algo-msgpack-with-bigint": { + "version": "2.1.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10" } }, "node_modules/algosdk": { @@ -2369,32 +2913,204 @@ "form-data": "^4.0.0" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, "node_modules/argparse": { "version": "2.0.1", "dev": true, "license": "Python-2.0" }, - "node_modules/arrify": { - "version": "1.0.1", + "node_modules/aria-query": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", + "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "dependencies": { + "dequal": "^2.0.3" } }, - "node_modules/assertion-error": { - "version": "1.1.0", + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.2.tgz", + "integrity": "sha512-tb5thFFlUcp7NdNF6/MpDk/1r/4awWG1FIz3YqDf+/zJSTezBb+/5WViH41obXULHVpDzoiCLpJ/ZO9YbJMsdw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.tosorted": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.1.tgz", + "integrity": "sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.1.3" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "dev": true + }, "node_modules/asynckit": { "version": "0.4.0", "dev": true, "license": "MIT" }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axe-core": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", + "integrity": "sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/axios": { "version": "0.21.4", "dev": true, @@ -2404,6 +3120,15 @@ "follow-redirects": "^1.14.0" } }, + "node_modules/axobject-query": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", + "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "dev": true, + "dependencies": { + "dequal": "^2.0.3" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "dev": true, @@ -2636,8 +3361,9 @@ }, "node_modules/buffer-from": { "version": "1.1.2", - "dev": true, - "license": "MIT" + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true }, "node_modules/buffer-layout": { "version": "1.2.2", @@ -2663,6 +3389,29 @@ "node": ">=6.14.2" } }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "6.3.0", "license": "MIT", @@ -2855,6 +3604,12 @@ "dev": true, "license": "MIT" }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "node_modules/copyfiles": { "version": "2.4.1", "dev": true, @@ -2939,6 +3694,12 @@ "sha.js": "^2.4.8" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-fetch": { "version": "3.1.8", "license": "MIT", @@ -2946,6 +3707,21 @@ "node-fetch": "^2.6.12" } }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/crypto-addr-codec": { "version": "0.1.7", "dev": true, @@ -2964,241 +3740,966 @@ "version": "1.3.0", "license": "MIT", "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true + }, + "node_modules/debug": { + "version": "4.3.3", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decimal.js": { + "version": "10.4.3", + "dev": true, + "license": "MIT" + }, + "node_modules/deep-eql": { + "version": "4.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true + }, + "node_modules/define-properties": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delay": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dequal": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", + "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff": { + "version": "5.0.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", + "dev": true, + "optional": true, + "dependencies": { + "browserify-aes": "^1.0.6", + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/eccrypto": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", + "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "acorn": "7.1.1", + "elliptic": "6.5.4", + "es6-promise": "4.2.8", + "nan": "2.14.0" + }, + "optionalDependencies": { + "secp256k1": "3.7.1" + } + }, + "node_modules/eccrypto/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true, + "optional": true + }, + "node_modules/eccrypto/node_modules/nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, + "node_modules/eccrypto/node_modules/secp256k1": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", + "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "dependencies": { + "bindings": "^1.5.0", + "bip66": "^1.1.5", + "bn.js": "^4.11.8", + "create-hash": "^1.2.0", + "drbg.js": "^1.0.1", + "elliptic": "^6.4.1", + "nan": "^2.14.0", + "safe-buffer": "^5.1.2" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/elliptic": { + "version": "6.5.4", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/error-polyfill": { + "version": "0.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "capability": "^0.2.5", + "o3": "^1.0.3", + "u3": "^0.1.1" + } + }, + "node_modules/es-abstract": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "license": "MIT" + }, + "node_modules/es6-promisify": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "es6-promise": "^4.0.3" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", + "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", + "dev": true, + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.1", + "@eslint/js": "^8.46.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.2", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb": { + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", + "dev": true, + "dependencies": { + "eslint-config-airbnb-base": "^15.0.0", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5" + }, + "engines": { + "node": "^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-config-airbnb-base/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-config-airbnb-typescript": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.1.0.tgz", + "integrity": "sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==", + "dev": true, + "dependencies": { + "eslint-config-airbnb-base": "^15.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.13.0 || ^6.0.0", + "@typescript-eslint/parser": "^5.0.0 || ^6.0.0", + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.0.tgz", + "integrity": "sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.12.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.groupby": "^1.0.0", + "object.values": "^1.1.6", + "resolve": "^1.22.3", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-jsx-a11y": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", + "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.20.7", + "aria-query": "^5.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.6.2", + "axobject-query": "^3.1.1", + "damerau-levenshtein": "^1.0.8", + "emoji-regex": "^9.2.2", + "has": "^1.0.3", + "jsx-ast-utils": "^3.3.3", + "language-tags": "=1.0.5", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=4.0" + }, + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + } + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/eslint-plugin-jsx-a11y/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-no-only-tests": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-3.1.0.tgz", + "integrity": "sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==", + "dev": true, + "engines": { + "node": ">=5.0.0" } }, - "node_modules/debug": { - "version": "4.3.3", + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", "dev": true, - "license": "MIT", "dependencies": { - "ms": "2.1.2" + "prettier-linter-helpers": "^1.0.0" }, "engines": { - "node": ">=6.0" + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" }, "peerDependenciesMeta": { - "supports-color": { + "eslint-config-prettier": { "optional": true } } }, - "node_modules/decamelize": { - "version": "4.0.0", + "node_modules/eslint-plugin-react": { + "version": "7.33.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.33.1.tgz", + "integrity": "sha512-L093k0WAMvr6VhNwReB8VgOq5s2LesZmrpPdKz/kZElQDzqS7G7+DnKoqT+w4JwuiGeAhAvHO0fvy0Eyk4ejDA==", "dev": true, - "license": "MIT", + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", + "array.prototype.tosorted": "^1.1.1", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", + "object.hasown": "^1.1.2", + "object.values": "^1.1.6", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.4", + "semver": "^6.3.1", + "string.prototype.matchall": "^4.0.8" + }, "engines": { - "node": ">=10" + "node": ">=4" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, - "node_modules/decimal.js": { - "version": "10.4.3", + "node_modules/eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", "dev": true, - "license": "MIT" + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } }, - "node_modules/deep-eql": { - "version": "4.1.3", + "node_modules/eslint-plugin-react/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, - "license": "MIT", "dependencies": { - "type-detect": "^4.0.0" + "esutils": "^2.0.2" }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/define-properties": { - "version": "1.2.0", + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", + "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", "dev": true, - "license": "MIT", - "optional": true, "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" }, - "engines": { - "node": ">= 0.4" + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delay": { - "version": "5.0.0", - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", + "node_modules/eslint-plugin-react/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/depd": { - "version": "2.0.0", - "license": "MIT", + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, "engines": { - "node": ">= 0.8" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/diff": { - "version": "5.0.0", + "node_modules/eslint-visitor-keys": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", + "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", "dev": true, - "license": "BSD-3-Clause", "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "license": "MIT", - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/drbg.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", - "integrity": "sha512-F4wZ06PvqxYLFEZKkFxTDcns9oFNk34hvmJSEwdzsxVQ8YI5YaxtACgQatkYgv2VI2CFkUd2Y+xosPQnHv809g==", + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "optional": true, + "peer": true, "dependencies": { - "browserify-aes": "^1.0.6", - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=0.10" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eccrypto": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.1.6.tgz", - "integrity": "sha512-d78ivVEzu7Tn0ZphUUaL43+jVPKTMPFGtmgtz1D0LrFn7cY3K8CdrvibuLz2AAkHBLKZtR8DMbB2ukRYFk987A==", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "hasInstallScript": true, - "optional": true, + "peer": true, "dependencies": { - "acorn": "7.1.1", - "elliptic": "6.5.4", - "es6-promise": "4.2.8", - "nan": "2.14.0" + "is-glob": "^4.0.3" }, - "optionalDependencies": { - "secp256k1": "3.7.1" + "engines": { + "node": ">=10.13.0" } }, - "node_modules/eccrypto/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true, - "optional": true - }, - "node_modules/eccrypto/node_modules/nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true - }, - "node_modules/eccrypto/node_modules/secp256k1": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz", - "integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==", + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "hasInstallScript": true, - "optional": true, + "peer": true, "dependencies": { - "bindings": "^1.5.0", - "bip66": "^1.1.5", - "bn.js": "^4.11.8", - "create-hash": "^1.2.0", - "drbg.js": "^1.0.1", - "elliptic": "^6.4.1", - "nan": "^2.14.0", - "safe-buffer": "^5.1.2" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4.0.0" + "node": ">=8" } }, - "node_modules/elliptic": { - "version": "6.5.4", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "dev": true, - "license": "MIT" - }, - "node_modules/emoji-regex": { - "version": "8.0.0", + "node_modules/espree/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, - "license": "MIT" + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } }, - "node_modules/error-polyfill": { - "version": "0.1.3", + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, - "license": "MIT", + "peer": true, "dependencies": { - "capability": "^0.2.5", - "o3": "^1.0.3", - "u3": "^0.1.1" + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" } }, - "node_modules/es6-promise": { - "version": "4.2.8", - "license": "MIT" - }, - "node_modules/es6-promisify": { - "version": "5.0.0", - "license": "MIT", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, "dependencies": { - "es6-promise": "^4.0.3" + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" } }, - "node_modules/escalade": { - "version": "3.1.1", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "MIT", "engines": { - "node": ">=6" + "node": ">=4.0" } }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "license": "MIT", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, "node_modules/eth-crypto": { @@ -3407,13 +4908,78 @@ "node_modules/eyes": { "version": "0.1.8", "engines": { - "node": "> 0.1.90" + "node": "> 0.1.90" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "peer": true + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "peer": true + }, + "node_modules/fast-stable-stringify": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "peer": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/fast-stable-stringify": { - "version": "1.0.0", - "license": "MIT" - }, "node_modules/file-uri-to-path": { "version": "1.0.0", "license": "MIT" @@ -3452,6 +5018,27 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "peer": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true, + "peer": true + }, "node_modules/follow-redirects": { "version": "1.15.2", "dev": true, @@ -3471,6 +5058,15 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/form-data": { "version": "4.0.0", "dev": true, @@ -3492,8 +5088,34 @@ "node_modules/function-bind": { "version": "1.1.1", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-caller-file": { "version": "2.0.5", @@ -3515,7 +5137,6 @@ "version": "1.2.1", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -3526,6 +5147,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.2.3", "dev": true, @@ -3556,11 +5193,39 @@ "node": ">= 6" } }, + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.3", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "define-properties": "^1.1.3" }, @@ -3571,11 +5236,49 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/google-protobuf": { "version": "3.21.2", "dev": true, "license": "(BSD-3-Clause AND Apache-2.0)" }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/graphql": { "version": "16.7.1", "dev": true, @@ -3612,7 +5315,6 @@ "version": "1.0.3", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -3620,6 +5322,15 @@ "node": ">= 0.4.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -3632,7 +5343,6 @@ "version": "1.0.0", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "get-intrinsic": "^1.1.1" }, @@ -3644,7 +5354,6 @@ "version": "1.0.1", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">= 0.4" }, @@ -3656,7 +5365,21 @@ "version": "1.0.3", "dev": true, "license": "MIT", - "optional": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, "engines": { "node": ">= 0.4" }, @@ -3776,6 +5499,42 @@ ], "license": "BSD-3-Clause" }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflight": { "version": "1.0.6", "dev": true, @@ -3790,6 +5549,20 @@ "dev": true, "license": "ISC" }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/interpret": { "version": "1.4.0", "dev": true, @@ -3799,6 +5572,32 @@ "node": ">= 0.10" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "dev": true, @@ -3810,11 +5609,39 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-core-module": { - "version": "2.12.1", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, - "license": "MIT", - "optional": true, "dependencies": { "has": "^1.0.3" }, @@ -3822,6 +5649,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "dev": true, @@ -3849,30 +5691,140 @@ "node": ">=0.10.0" } }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, - "license": "MIT", - "optional": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { - "node": ">=6.5.0", - "npm": ">=3" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-number": { - "version": "7.0.0", + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, - "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.2" + }, "engines": { - "node": ">=0.12.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-plain-obj": { - "version": "2.1.0", + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, - "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.11" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-unicode-supported": { @@ -3886,6 +5838,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isarray": { "version": "0.0.1", "dev": true, @@ -3954,8 +5918,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -3984,6 +5947,20 @@ "bignumber.js": "^9.0.0" } }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "peer": true + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "license": "ISC" @@ -3992,7 +5969,6 @@ "version": "1.0.2", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "minimist": "^1.2.0" }, @@ -4030,6 +6006,21 @@ "node": "*" } }, + "node_modules/jsx-ast-utils": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/keccak": { "version": "3.0.3", "dev": true, @@ -4055,6 +6046,35 @@ "keccak": "^3.0.2" } }, + "node_modules/language-subtag-registry": { + "version": "0.3.22", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", + "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "dev": true + }, + "node_modules/language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "dev": true, + "dependencies": { + "language-subtag-registry": "~0.3.2" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/libsodium": { "version": "0.7.11", "dev": true, @@ -4105,6 +6125,13 @@ "license": "MIT", "optional": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "peer": true + }, "node_modules/lodash.values": { "version": "4.3.0", "dev": true, @@ -4161,7 +6188,6 @@ "version": "1.4.0", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -4184,6 +6210,18 @@ "tslib": "^2.0.3" } }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "dev": true, @@ -4211,6 +6249,28 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime-db": { "version": "1.52.0", "dev": true, @@ -4261,8 +6321,9 @@ }, "node_modules/mkdirp": { "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, - "license": "MIT", "dependencies": { "minimist": "^1.2.6" }, @@ -4386,6 +6447,18 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/near-api-js": { "version": "1.1.0", "dev": true, @@ -4493,20 +6566,118 @@ "version": "4.1.1", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">= 0.4" } }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.entries": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.fromentries": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.6.tgz", + "integrity": "sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.0.tgz", + "integrity": "sha512-70MWG6NfRH9GnbZOikuhPPYzpUpof9iW2J9E4dW7FXTqPNb6rllE6u39SKwwiNh8lCwX3DDb5OgcKGiEBrTTyw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.21.2", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/object.hasown": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.2.tgz", + "integrity": "sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.values": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "dev": true, @@ -4537,6 +6708,24 @@ "node": ">=8" } }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "peer": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "dev": true, @@ -4569,6 +6758,19 @@ "version": "2.1.0", "license": "(MIT AND Zlib)" }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/path-exists": { "version": "4.0.0", "dev": true, @@ -4585,11 +6787,29 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/pathval": { "version": "1.1.1", @@ -4625,6 +6845,16 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/prettier": { "version": "2.8.8", "dev": true, @@ -4639,6 +6869,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "dev": true, @@ -4649,7 +6891,6 @@ "version": "15.8.1", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -4681,6 +6922,36 @@ "pbts": "bin/pbts" } }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/randombytes": { "version": "2.1.0", "dev": true, @@ -4692,8 +6963,7 @@ "node_modules/react-is": { "version": "16.13.1", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/readable-stream": { "version": "3.6.2", @@ -4740,6 +7010,23 @@ "version": "0.13.11", "license": "MIT" }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -4765,6 +7052,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, "node_modules/response-iterator": { "version": "0.2.6", "dev": true, @@ -4774,6 +7071,16 @@ "node": ">=0.8" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "dev": true, @@ -4852,6 +7159,29 @@ } } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rxjs": { "version": "7.8.1", "dev": true, @@ -4860,6 +7190,30 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "funding": [ @@ -4878,6 +7232,20 @@ ], "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/scrypt-js": { "version": "3.0.1", "dev": true, @@ -4897,6 +7265,21 @@ "node": ">=10.0.0" } }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/serialize-javascript": { "version": "6.0.0", "dev": true, @@ -4935,6 +7318,29 @@ "buffer": "6.0.3" } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, "node_modules/shelljs": { "version": "0.8.5", "dev": true, @@ -4968,6 +7374,29 @@ "node": ">=6" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/snake-case": { "version": "3.0.4", "license": "MIT", @@ -4992,16 +7421,18 @@ }, "node_modules/source-map": { "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } }, "node_modules/source-map-support": { "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "license": "MIT", "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -5042,6 +7473,70 @@ "node": ">=8" } }, + "node_modules/string.prototype.matchall": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz", + "integrity": "sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "dev": true, @@ -5057,7 +7552,6 @@ "version": "3.0.0", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">=4" } @@ -5108,7 +7602,6 @@ "version": "1.0.0", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">= 0.4" }, @@ -5128,6 +7621,13 @@ "node_modules/text-encoding-utf-8": { "version": "1.0.2" }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "peer": true + }, "node_modules/through": { "version": "2.3.8", "license": "MIT" @@ -5237,6 +7737,18 @@ "version": "0.0.3", "license": "MIT" }, + "node_modules/ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-invariant": { "version": "0.10.3", "dev": true, @@ -5269,10 +7781,20 @@ "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X" } }, - "node_modules/ts-node": { + "node_modules/ts-mocha/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/ts-mocha/node_modules/ts-node": { "version": "7.0.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", "dev": true, - "license": "MIT", "dependencies": { "arrify": "^1.0.0", "buffer-from": "^1.1.0", @@ -5290,10 +7812,75 @@ "node": ">=4.2.0" } }, + "node_modules/ts-mocha/node_modules/yn": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", + "integrity": "sha512-uTv8J/wiWTgUTg+9vLTi//leUl5vDQS6uii/emeTb2ssY7vl6QWf2fFbIIGjnhjvbdKlU0ed7QPgY1htTC86jQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ts-node/node_modules/diff": { - "version": "3.5.0", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } @@ -5302,7 +7889,6 @@ "version": "3.14.2", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "@types/json5": "^0.0.29", "json5": "^1.0.2", @@ -5325,6 +7911,19 @@ "license": "Unlicense", "optional": true }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-detect": { "version": "4.0.8", "dev": true, @@ -5345,6 +7944,71 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typeforce": { "version": "1.18.0", "dev": true, @@ -5367,6 +8031,21 @@ "dev": true, "license": "MIT" }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/untildify": { "version": "4.0.0", "dev": true, @@ -5376,6 +8055,16 @@ "node": ">=8" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/utf-8-validate": { "version": "5.0.10", "devOptional": true, @@ -5400,6 +8089,12 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/vlq": { "version": "2.0.4", "dev": true, @@ -5431,6 +8126,41 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/wif": { "version": "2.0.6", "dev": true, @@ -5520,6 +8250,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "dev": true, @@ -5568,11 +8304,12 @@ } }, "node_modules/yn": { - "version": "2.0.0", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "license": "MIT", "engines": { - "node": ">=4" + "node": ">=6" } }, "node_modules/yocto-queue": { diff --git a/cross-chain/solana/package.json b/cross-chain/solana/package.json index ea15b6a98..7e59b5895 100644 --- a/cross-chain/solana/package.json +++ b/cross-chain/solana/package.json @@ -1,7 +1,15 @@ { + "name": "@keep-network/tbtc-v2-solana", + "version": "1.0.0-dev", + "description": "tBTC v2 on Solana", + "license": "GPL-3.0-only", "scripts": { + "build": "anchor build", + "format": "npm run lint", + "format:fix": "npm run lint:fix", "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", - "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", + "test": "anchor test" }, "dependencies": { "@coral-xyz/anchor": "^0.28.0" @@ -18,6 +26,10 @@ "mocha": "^9.0.3", "prettier": "^2.6.2", "ts-mocha": "^10.0.0", - "typescript": "^4.3.5" + "typescript": "^4.3.5", + "@types/node": "^18.11.18", + "@thesis-co/eslint-config": "github:thesis/eslint-config", + "dotenv": "^16.3.1", + "ts-node": "^10.1.0" } } diff --git a/cross-chain/solana/scripts/deploy.sh b/cross-chain/solana/scripts/deploy.sh new file mode 100755 index 000000000..a0619f171 --- /dev/null +++ b/cross-chain/solana/scripts/deploy.sh @@ -0,0 +1,31 @@ +#!/bin/bash +set -eo pipefail + +# Setting env variables in the current bash shell +source solana.env + +[ -z "$CLUSTER" ] && { + echo "'--cluster' option not provided" >&2 + help + exit 1 +} + +[ -z "$AUTHORITY" ] && { + echo "'AUTHORITY' env var is not set" >&2 + exit 1 +} + +echo "Building workspace for cluster: $CLUSTER ..." +anchor build --provider.cluster $CLUSTER + +echo "Syncing the program's id ..." +anchor keys sync + +echo "Building workspace again to include new program ID in the binary ..." +anchor build --provider.cluster $CLUSTER + +echo "Deploying program(s) for cluster: $CLUSTER ..." +anchor deploy --provider.cluster $CLUSTER --provider.wallet $AUTHORITY + +echo "Migrating..." +anchor migrate --provider.cluster $CLUSTER --provider.wallet $AUTHORITY \ No newline at end of file diff --git a/cross-chain/solana/scripts/transfer_authority.sh b/cross-chain/solana/scripts/transfer_authority.sh new file mode 100755 index 000000000..88edc0d55 --- /dev/null +++ b/cross-chain/solana/scripts/transfer_authority.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eo pipefail + +# Setting env variables in the current bash shell +source solana.env + +# TODO: transfer upgrade authority to Threshold Council Multisig +# solana program set-upgrade-authority -k --new-upgrade-authority + +# Transfer authority to the Threshold Council Multisig +# TODO: verify if the authority was actually transferred. +anchor run authority --provider.cluster $CLUSTER \ No newline at end of file diff --git a/cross-chain/solana/solana.env.template b/cross-chain/solana/solana.env.template new file mode 100644 index 000000000..17955b8fe --- /dev/null +++ b/cross-chain/solana/solana.env.template @@ -0,0 +1,3 @@ +AUTHORITY= +THRESHOLD_COUNCIL_MULTISIG= +CLUSTER= \ No newline at end of file diff --git a/cross-chain/solana/typescript/transfer_authority.ts b/cross-chain/solana/typescript/transfer_authority.ts new file mode 100644 index 000000000..8146d0e83 --- /dev/null +++ b/cross-chain/solana/typescript/transfer_authority.ts @@ -0,0 +1,46 @@ +import * as anchor from "@coral-xyz/anchor" +import fs from "fs" +import { PublicKey, Keypair } from "@solana/web3.js" +import dotenv from "dotenv" + +async function run(): Promise { + dotenv.config({ path: "solana.env" }) + + const authority = loadKey(process.env.AUTHORITY) + const newAuthority = process.env.THRESHOLD_COUNCIL_MULTISIG + + const tbtcProgram = anchor.workspace.Tbtc + + const config = PublicKey.findProgramAddressSync( + [Buffer.from("config")], + tbtcProgram.programId + )[0]; + + await tbtcProgram.methods + .changeAuthority() + .accounts({ + config, + authority, + newAuthority, + }) + .instruction(); +} + +;(async () => { + try { + await run() + } catch (e) { + console.log("Exception called:", e) + } +})() + +function loadKey(filename: string): Keypair { + try { + const contents = fs.readFileSync(filename).toString() + const bs = Uint8Array.from(JSON.parse(contents)) + + return Keypair.fromSecretKey(bs) + } catch { + console.log("Unable to read keypair...", filename) + } +} \ No newline at end of file From 3882cc4e49a9240d7420f4d825bc4005a18dd4df Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 8 Aug 2023 22:44:58 +0200 Subject: [PATCH 02/18] Adjusting deployment scripts to utilize Makefile - Moved init TS scripts to /deploy dir - Building programs with make build - Deploying programs with solana cli instead of anchor --- cross-chain/solana/.env.template | 6 ++ cross-chain/solana/.gitignore | 2 +- cross-chain/solana/Anchor.toml | 1 - cross-chain/solana/Makefile | 8 +- cross-chain/solana/deploy/deploy.ts | 89 +++++++++++++++++++ .../transfer_authority.ts | 0 cross-chain/solana/migrations/deploy.ts | 85 ++---------------- cross-chain/solana/scripts/deploy.sh | 31 +++---- cross-chain/solana/solana.env.template | 3 - 9 files changed, 128 insertions(+), 97 deletions(-) create mode 100644 cross-chain/solana/.env.template create mode 100644 cross-chain/solana/deploy/deploy.ts rename cross-chain/solana/{typescript => deploy}/transfer_authority.ts (100%) delete mode 100644 cross-chain/solana/solana.env.template diff --git a/cross-chain/solana/.env.template b/cross-chain/solana/.env.template new file mode 100644 index 000000000..564120216 --- /dev/null +++ b/cross-chain/solana/.env.template @@ -0,0 +1,6 @@ +export AUTHORITY= +export THRESHOLD_COUNCIL_MULTISIG= +export NETWORK= +export CLUSTER= +export ANCHOR_PROVIDER_URL= +export ANCHOR_WALLET= \ No newline at end of file diff --git a/cross-chain/solana/.gitignore b/cross-chain/solana/.gitignore index 29be122a2..05e8d8768 100644 --- a/cross-chain/solana/.gitignore +++ b/cross-chain/solana/.gitignore @@ -8,4 +8,4 @@ node_modules test-ledger artifacts-mainnet artifacts-testnet -solana.env \ No newline at end of file +.env \ No newline at end of file diff --git a/cross-chain/solana/Anchor.toml b/cross-chain/solana/Anchor.toml index 46ce2c333..052529539 100644 --- a/cross-chain/solana/Anchor.toml +++ b/cross-chain/solana/Anchor.toml @@ -22,7 +22,6 @@ wallet = "~/.config/solana/id.json" [scripts] test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" -authority = "ts-node --files ./typescript/transfer_authority.ts" [test] startup_wait = 10000 diff --git a/cross-chain/solana/Makefile b/cross-chain/solana/Makefile index 60201a688..8440d187c 100644 --- a/cross-chain/solana/Makefile +++ b/cross-chain/solana/Makefile @@ -28,4 +28,10 @@ lint: cargo fmt --check cargo check --features "mainnet" --no-default-features cargo check --features "solana-devnet" --no-default-features - cargo clippy --no-deps --all-targets -- -D warnings \ No newline at end of file + cargo clippy --no-deps --all-targets -- -D warnings + +init_programs: + ts-node --files ./deploy/deploy.ts + +transfer_authority: + ts-node --files deploy/transfer_authority.ts \ No newline at end of file diff --git a/cross-chain/solana/deploy/deploy.ts b/cross-chain/solana/deploy/deploy.ts new file mode 100644 index 000000000..6335d4d9f --- /dev/null +++ b/cross-chain/solana/deploy/deploy.ts @@ -0,0 +1,89 @@ +import * as anchor from "@coral-xyz/anchor" +import fs from "fs" +import { PublicKey, Keypair } from "@solana/web3.js" +import dotenv from "dotenv" +import { Program } from "@coral-xyz/anchor"; +import { Tbtc } from "../target/types/tbtc"; +import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; + +async function run(): Promise { + dotenv.config({ path: "../solana.env" }) + + anchor.setProvider(anchor.AnchorProvider.env()); + + const tbtcProgram = anchor.workspace.Tbtc as Program; + + // This wallet deployed the program and is also an authority + const authority = (loadKey(process.env.AUTHORITY)).publicKey + + const mint = PublicKey.findProgramAddressSync( + [Buffer.from("tbtc-mint")], + tbtcProgram.programId + )[0]; + + const config = PublicKey.findProgramAddressSync( + [Buffer.from("config")], + tbtcProgram.programId + )[0]; + + const guardians = PublicKey.findProgramAddressSync( + [Buffer.from("guardians")], + tbtcProgram.programId + )[0]; + + const minters = PublicKey.findProgramAddressSync( + [Buffer.from("minters")], + tbtcProgram.programId + )[0]; + + const tbtcMetadata = PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + METADATA_PROGRAM_ID.toBuffer(), + mint.toBuffer(), + ], + METADATA_PROGRAM_ID + )[0]; + + const mplTokenMetadataProgram = METADATA_PROGRAM_ID; + + // Initalize tbtc program + await tbtcProgram.methods + .initialize() + .accounts({ + mint, + config, + guardians, + minters, + authority, + tbtcMetadata, + mplTokenMetadataProgram + }) + .instruction() + + + // add minter + + // add guardian? + + // update mappings (self, base, arbitrum, optimism, polygon) +} + +;(async () => { + try { + await run() + } catch (e) { + console.log("Exception called:", e) + } +})() + +function loadKey(filename: string): Keypair { + try { + const contents = fs.readFileSync(filename).toString() + const bs = Uint8Array.from(JSON.parse(contents)) + + return Keypair.fromSecretKey(bs) + } catch { + console.log("Unable to read keypair...", filename) + } +} \ No newline at end of file diff --git a/cross-chain/solana/typescript/transfer_authority.ts b/cross-chain/solana/deploy/transfer_authority.ts similarity index 100% rename from cross-chain/solana/typescript/transfer_authority.ts rename to cross-chain/solana/deploy/transfer_authority.ts diff --git a/cross-chain/solana/migrations/deploy.ts b/cross-chain/solana/migrations/deploy.ts index 8c5ae8ac9..448a1b3f2 100644 --- a/cross-chain/solana/migrations/deploy.ts +++ b/cross-chain/solana/migrations/deploy.ts @@ -1,78 +1,11 @@ -import * as anchor from "@coral-xyz/anchor" -import fs from "fs" -import { PublicKey, Keypair } from "@solana/web3.js" -import dotenv from "dotenv" -import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +// Migrations are an early feature. Currently, they're nothing more than this +// single deploy script that's invoked from the CLI, injecting a provider +// configured from the workspace's Anchor.toml. -module.exports = async function (provider) { - dotenv.config({ path: "../solana.env" }) - - anchor.setProvider(provider) - - const tbtcProgram = anchor.workspace.Tbtc - // This wallet deployed the program and is also an authority - const authority = loadKey(process.env.AUTHORITY) - const newAuthority = process.env.THRESHOLD_COUNCIL_MULTISIG - - const mint = PublicKey.findProgramAddressSync( - [Buffer.from("tbtc-mint")], - tbtcProgram.programId - )[0]; - - const config = PublicKey.findProgramAddressSync( - [Buffer.from("config")], - tbtcProgram.programId - )[0]; - - const guardians = PublicKey.findProgramAddressSync( - [Buffer.from("guardians")], - tbtcProgram.programId - )[0]; - - const minters = PublicKey.findProgramAddressSync( - [Buffer.from("minters")], - tbtcProgram.programId - )[0]; - - const tbtcMetadata = PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - METADATA_PROGRAM_ID.toBuffer(), - mint.toBuffer(), - ], - METADATA_PROGRAM_ID - )[0]; +const anchor = require("@coral-xyz/anchor"); - const mplTokenMetadataProgram = METADATA_PROGRAM_ID; - - // Initalize tbtc program - await tbtcProgram.methods - .initialize() - .accounts({ - mint, - config, - guardians, - minters, - authority, - tbtcMetadata, - mplTokenMetadataProgram - }) - .instruction() - - // add minter - - // add guardian? - - // update mappings (self, base, arbitrum, optimism, polygon) -} - -function loadKey(filename: string): Keypair { - try { - const contents = fs.readFileSync(filename).toString() - const bs = Uint8Array.from(JSON.parse(contents)) - - return Keypair.fromSecretKey(bs) - } catch { - console.log("Unable to read keypair...", filename) - } -} \ No newline at end of file +module.exports = async function (provider) { + // Configure client to use the provider. + anchor.setProvider(provider); + // Add your deploy script here. +}; \ No newline at end of file diff --git a/cross-chain/solana/scripts/deploy.sh b/cross-chain/solana/scripts/deploy.sh index a0619f171..19d2dcd55 100755 --- a/cross-chain/solana/scripts/deploy.sh +++ b/cross-chain/solana/scripts/deploy.sh @@ -2,11 +2,13 @@ set -eo pipefail # Setting env variables in the current bash shell -source solana.env +source .env -[ -z "$CLUSTER" ] && { - echo "'--cluster' option not provided" >&2 - help +# Deploy to devnet by default +ARTIFACTS_PATH=artifacts-testnet + +[ -z "$NETWORK" ] && { + echo "'NETWORK' env var is not set" >&2 exit 1 } @@ -15,17 +17,16 @@ source solana.env exit 1 } -echo "Building workspace for cluster: $CLUSTER ..." -anchor build --provider.cluster $CLUSTER - -echo "Syncing the program's id ..." -anchor keys sync +if [[ $CLUSTER = mainnet-beta ]] +then + ARTIFACTS_PATH=artifacts-mainnet +fi -echo "Building workspace again to include new program ID in the binary ..." -anchor build --provider.cluster $CLUSTER +echo "Building workspace for cluster: $NETWORK ..." +make build -echo "Deploying program(s) for cluster: $CLUSTER ..." -anchor deploy --provider.cluster $CLUSTER --provider.wallet $AUTHORITY +echo "Deploying TBTC program for cluster: $CLUSTER ..." +solana program deploy --url $CLUSTER --keypair $AUTHORITY ./$ARTIFACTS_PATH/tbtc.so -echo "Migrating..." -anchor migrate --provider.cluster $CLUSTER --provider.wallet $AUTHORITY \ No newline at end of file +echo "Deploying WORMHOLE_GATEWAY program for cluster: $CLUSTER ..." +solana program deploy --url $CLUSTER --keypair $AUTHORITY ./$ARTIFACTS_PATH/wormhole_gateway.so diff --git a/cross-chain/solana/solana.env.template b/cross-chain/solana/solana.env.template deleted file mode 100644 index 17955b8fe..000000000 --- a/cross-chain/solana/solana.env.template +++ /dev/null @@ -1,3 +0,0 @@ -AUTHORITY= -THRESHOLD_COUNCIL_MULTISIG= -CLUSTER= \ No newline at end of file From 89618465479c09b003bd58473bf87c971f61669d Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 02:30:13 +0200 Subject: [PATCH 03/18] Progressing with programs init --- cross-chain/solana/Makefile | 4 +- cross-chain/solana/deploy/deploy.ts | 89 --------------- cross-chain/solana/deploy/init.ts | 166 ++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+), 91 deletions(-) delete mode 100644 cross-chain/solana/deploy/deploy.ts create mode 100644 cross-chain/solana/deploy/init.ts diff --git a/cross-chain/solana/Makefile b/cross-chain/solana/Makefile index 8440d187c..daf14b139 100644 --- a/cross-chain/solana/Makefile +++ b/cross-chain/solana/Makefile @@ -31,7 +31,7 @@ lint: cargo clippy --no-deps --all-targets -- -D warnings init_programs: - ts-node --files ./deploy/deploy.ts + ts-node --files ./deploy/init.ts transfer_authority: - ts-node --files deploy/transfer_authority.ts \ No newline at end of file + ts-node --files ./deploy/transfer_authority.ts \ No newline at end of file diff --git a/cross-chain/solana/deploy/deploy.ts b/cross-chain/solana/deploy/deploy.ts deleted file mode 100644 index 6335d4d9f..000000000 --- a/cross-chain/solana/deploy/deploy.ts +++ /dev/null @@ -1,89 +0,0 @@ -import * as anchor from "@coral-xyz/anchor" -import fs from "fs" -import { PublicKey, Keypair } from "@solana/web3.js" -import dotenv from "dotenv" -import { Program } from "@coral-xyz/anchor"; -import { Tbtc } from "../target/types/tbtc"; -import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; - -async function run(): Promise { - dotenv.config({ path: "../solana.env" }) - - anchor.setProvider(anchor.AnchorProvider.env()); - - const tbtcProgram = anchor.workspace.Tbtc as Program; - - // This wallet deployed the program and is also an authority - const authority = (loadKey(process.env.AUTHORITY)).publicKey - - const mint = PublicKey.findProgramAddressSync( - [Buffer.from("tbtc-mint")], - tbtcProgram.programId - )[0]; - - const config = PublicKey.findProgramAddressSync( - [Buffer.from("config")], - tbtcProgram.programId - )[0]; - - const guardians = PublicKey.findProgramAddressSync( - [Buffer.from("guardians")], - tbtcProgram.programId - )[0]; - - const minters = PublicKey.findProgramAddressSync( - [Buffer.from("minters")], - tbtcProgram.programId - )[0]; - - const tbtcMetadata = PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - METADATA_PROGRAM_ID.toBuffer(), - mint.toBuffer(), - ], - METADATA_PROGRAM_ID - )[0]; - - const mplTokenMetadataProgram = METADATA_PROGRAM_ID; - - // Initalize tbtc program - await tbtcProgram.methods - .initialize() - .accounts({ - mint, - config, - guardians, - minters, - authority, - tbtcMetadata, - mplTokenMetadataProgram - }) - .instruction() - - - // add minter - - // add guardian? - - // update mappings (self, base, arbitrum, optimism, polygon) -} - -;(async () => { - try { - await run() - } catch (e) { - console.log("Exception called:", e) - } -})() - -function loadKey(filename: string): Keypair { - try { - const contents = fs.readFileSync(filename).toString() - const bs = Uint8Array.from(JSON.parse(contents)) - - return Keypair.fromSecretKey(bs) - } catch { - console.log("Unable to read keypair...", filename) - } -} \ No newline at end of file diff --git a/cross-chain/solana/deploy/init.ts b/cross-chain/solana/deploy/init.ts new file mode 100644 index 000000000..70e1c8a1d --- /dev/null +++ b/cross-chain/solana/deploy/init.ts @@ -0,0 +1,166 @@ +import * as anchor from "@coral-xyz/anchor" +import fs from "fs" +import { PublicKey, Keypair } from "@solana/web3.js" +import dotenv from "dotenv" +import { Program } from "@coral-xyz/anchor"; +import { Tbtc } from "../target/types/tbtc"; +import { WormholeGateway } from "../target/types/wormhole_gateway"; +import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; + +async function run(): Promise { + dotenv.config({ path: "../solana.env" }) + + anchor.setProvider(anchor.AnchorProvider.env()); + + const tbtcProgram = anchor.workspace.Tbtc as Program; + const wormholeGatewayProgram = anchor.workspace.WormholeGateway as Program; + + console.log("tbtcProgram.programId", tbtcProgram.programId) + console.log("wormholeGatewayProgram.programId", wormholeGatewayProgram.programId) + + // This wallet deployed the program and is also an authority + const authority = (loadKey(process.env.AUTHORITY)).publicKey + + const mint = PublicKey.findProgramAddressSync( + [Buffer.from("tbtc-mint")], + tbtcProgram.programId + )[0]; + + const config = PublicKey.findProgramAddressSync( + [Buffer.from("config")], + tbtcProgram.programId + )[0]; + + const guardians = PublicKey.findProgramAddressSync( + [Buffer.from("guardians")], + tbtcProgram.programId + )[0]; + + const minters = PublicKey.findProgramAddressSync( + [Buffer.from("minters")], + tbtcProgram.programId + )[0]; + + const tbtcMetadata = PublicKey.findProgramAddressSync( + [ + Buffer.from("metadata"), + METADATA_PROGRAM_ID.toBuffer(), + mint.toBuffer(), + ], + METADATA_PROGRAM_ID + )[0]; + + const mplTokenMetadataProgram = METADATA_PROGRAM_ID; + + // Initalize tbtc program + await tbtcProgram.methods + .initialize() + .accounts({ + mint, + config, + guardians, + minters, + authority, + tbtcMetadata, + mplTokenMetadataProgram + }) + .instruction() + + const minter = PublicKey.findProgramAddressSync( + [Buffer.from("redeemer")], + wormholeGatewayProgram.programId + )[0] + + const mintingLimit = 10000 // Arbitrary big number of TBTC + // TODO: verify with WH team if the address is correct + const WRAPPED_TBTC_MINT = new PublicKey( + "25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG" + ); + + const gatewayWrappedTbtcToken = PublicKey.findProgramAddressSync( + [Buffer.from("wrapped-token")], + wormholeGatewayProgram.programId + )[0] + + const tokenBridgeSender = PublicKey.findProgramAddressSync( + [Buffer.from("sender")], + wormholeGatewayProgram.programId + )[0] + + await wormholeGatewayProgram.methods + .initialize(new anchor.BN(mintingLimit)) + .accounts({ + authority, + custodian: minter, + tbtcMint: mint, + wrappedTbtcMint: WRAPPED_TBTC_MINT, + wrappedTbtcToken: gatewayWrappedTbtcToken, + tokenBridgeSender, + }) + .rpc(); + + const minterInfo = PublicKey.findProgramAddressSync( + [Buffer.from("minter-info"), minter.toBuffer()], + tbtcProgram.programId + )[0] + + // // Adding a minter (wormholeGateway) + // await tbtcProgram.methods + // .addMinter() + // .accounts({ + // config, + // authority, + // minters, + // minterInfo, + // minter, + // }) + // .instruction(); + + // // update mappings (self?, arbitrum, optimism, polygon, base) + + // // arbitrum chain ID: 23 + // // ETH Goerli address: 0x00000000000000000000000031a15e213b59e230b45e8c5c99dafac3d1236ee2 + // // ETH Mainnet address: 0x0000000000000000000000001293a54e160d1cd7075487898d65266081a15458 + // const arbitrumChain = 23 + // const arbiArgs = { + // chain: arbitrumChain, + // address: Array.from(Buffer.alloc(32, "00000000000000000000000031a15e213b59e230b45e8c5c99dafac3d1236ee2", "hex")) + // } + + // const encodedChain = Buffer.alloc(2); + // encodedChain.writeUInt16LE(arbitrumChain); + // const gatewayInfo = PublicKey.findProgramAddressSync( + // [Buffer.from("gateway-info"), encodedChain], + // wormholeGatewayProgram.programId + // )[0] + + // wormholeGatewayProgram.methods + // .updateGatewayAddress(arbiArgs) + // .accounts({ + // custodian: minter, + // gatewayInfo, + // authority, + // }) + // .instruction(); + + console.log("success") +} + +;(async () => { + try { + await run() + } catch (e) { + console.log("Exception called:", e) + } +})() + +function loadKey(filename: string): Keypair { + try { + const contents = fs.readFileSync(filename).toString() + const bs = Uint8Array.from(JSON.parse(contents)) + + return Keypair.fromSecretKey(bs) + } catch { + console.log("Unable to read keypair...", filename) + } +} \ No newline at end of file From 03a6256e687cba61c1cafe1f2a6a0a021316516f Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 11:06:34 +0200 Subject: [PATCH 04/18] Adding IDL dir --- cross-chain/solana/target/idl/tbtc.json | 561 ++++++++++ .../solana/target/idl/wormhole_gateway.json | 992 ++++++++++++++++++ 2 files changed, 1553 insertions(+) create mode 100644 cross-chain/solana/target/idl/tbtc.json create mode 100644 cross-chain/solana/target/idl/wormhole_gateway.json diff --git a/cross-chain/solana/target/idl/tbtc.json b/cross-chain/solana/target/idl/tbtc.json new file mode 100644 index 000000000..a56a15669 --- /dev/null +++ b/cross-chain/solana/target/idl/tbtc.json @@ -0,0 +1,561 @@ +{ + "version": "0.1.0", + "name": "tbtc", + "constants": [ + { + "name": "SEED_PREFIX_TBTC_MINT", + "type": "bytes", + "value": "[116, 98, 116, 99, 45, 109, 105, 110, 116]" + } + ], + "instructions": [ + { + "name": "initialize", + "accounts": [ + { + "name": "mint", + "isMut": true, + "isSigner": false + }, + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "guardians", + "isMut": true, + "isSigner": false + }, + { + "name": "minters", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "tbtcMetadata", + "isMut": true, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "changeAuthority", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cancelAuthorityChange", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "takeAuthority", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "pendingAuthority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "addMinter", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "minters", + "isMut": true, + "isSigner": false + }, + { + "name": "minterInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "minter", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "removeMinter", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "minters", + "isMut": true, + "isSigner": false + }, + { + "name": "minterInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "minter", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "addGuardian", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "guardians", + "isMut": true, + "isSigner": false + }, + { + "name": "guardianInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "guardian", + "isMut": false, + "isSigner": false, + "docs": [ + "`Guardians`." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "removeGuardian", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "guardians", + "isMut": true, + "isSigner": false + }, + { + "name": "guardianInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "guardian", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "pause", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "guardianInfo", + "isMut": false, + "isSigner": false + }, + { + "name": "guardian", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "unpause", + "accounts": [ + { + "name": "config", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "mint", + "accounts": [ + { + "name": "mint", + "isMut": true, + "isSigner": false + }, + { + "name": "config", + "isMut": false, + "isSigner": false + }, + { + "name": "minterInfo", + "isMut": false, + "isSigner": false + }, + { + "name": "minter", + "isMut": false, + "isSigner": true + }, + { + "name": "recipientToken", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "amount", + "type": "u64" + } + ] + } + ], + "accounts": [ + { + "name": "Config", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "authority", + "docs": [ + "The authority over this program." + ], + "type": "publicKey" + }, + { + "name": "pendingAuthority", + "type": { + "option": "publicKey" + } + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "mintBump", + "type": "u8" + }, + { + "name": "numMinters", + "type": "u32" + }, + { + "name": "numGuardians", + "type": "u32" + }, + { + "name": "paused", + "type": "bool" + } + ] + } + }, + { + "name": "GuardianInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "guardian", + "type": "publicKey" + } + ] + } + }, + { + "name": "Guardians", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "keys", + "type": { + "vec": "publicKey" + } + } + ] + } + }, + { + "name": "MinterInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "minter", + "type": "publicKey" + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "Minters", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "keys", + "type": { + "vec": "publicKey" + } + } + ] + } + } + ], + "events": [ + { + "name": "MinterAdded", + "fields": [ + { + "name": "minter", + "type": "publicKey", + "index": false + } + ] + }, + { + "name": "MinterRemoved", + "fields": [ + { + "name": "minter", + "type": "publicKey", + "index": false + } + ] + }, + { + "name": "GuardianAdded", + "fields": [ + { + "name": "guardian", + "type": "publicKey", + "index": false + } + ] + }, + { + "name": "GuardianRemoved", + "fields": [ + { + "name": "guardian", + "type": "publicKey", + "index": false + } + ] + } + ], + "errors": [ + { + "code": 6032, + "name": "IsNotAuthority", + "msg": "Not valid authority to perform this action" + }, + { + "code": 6034, + "name": "IsNotPendingAuthority", + "msg": "Not valid pending authority to take authority" + }, + { + "code": 6036, + "name": "NoPendingAuthorityChange", + "msg": "No pending authority" + }, + { + "code": 6048, + "name": "GuardianAlreadyExists", + "msg": "This address is already a guardian" + }, + { + "code": 6050, + "name": "GuardianNonexistent", + "msg": "This address is not a guardian" + }, + { + "code": 6052, + "name": "SignerNotGuardian", + "msg": "Caller is not a guardian" + }, + { + "code": 6064, + "name": "MinterAlreadyExists", + "msg": "This address is already a minter" + }, + { + "code": 6066, + "name": "MinterNonexistent", + "msg": "This address is not a minter" + }, + { + "code": 6068, + "name": "SignerNotMinter", + "msg": "Caller is not a minter" + }, + { + "code": 6080, + "name": "IsPaused", + "msg": "Program is paused" + }, + { + "code": 6082, + "name": "IsNotPaused", + "msg": "Program is not paused" + } + ] +} \ No newline at end of file diff --git a/cross-chain/solana/target/idl/wormhole_gateway.json b/cross-chain/solana/target/idl/wormhole_gateway.json new file mode 100644 index 000000000..b7f578215 --- /dev/null +++ b/cross-chain/solana/target/idl/wormhole_gateway.json @@ -0,0 +1,992 @@ +{ + "version": "0.1.0", + "name": "wormhole_gateway", + "instructions": [ + { + "name": "initialize", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "tbtcMint", + "isMut": false, + "isSigner": false, + "docs": [ + "TBTC Program's mint PDA address bump is saved in this program's config. Ordinarily, we would", + "not have to deserialize this account. But we do in this case to make sure the TBTC program", + "has been initialized before this program." + ] + }, + { + "name": "wrappedTbtcMint", + "isMut": false, + "isSigner": false + }, + { + "name": "wrappedTbtcToken", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenBridgeSender", + "isMut": false, + "isSigner": false, + "docs": [ + "sign for transferring via Token Bridge program with a message." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "mintingLimit", + "type": "u64" + } + ] + }, + { + "name": "changeAuthority", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cancelAuthorityChange", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "takeAuthority", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "pendingAuthority", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "updateGatewayAddress", + "accounts": [ + { + "name": "custodian", + "isMut": false, + "isSigner": false + }, + { + "name": "gatewayInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "UpdateGatewayAddressArgs" + } + } + ] + }, + { + "name": "updateMintingLimit", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "newLimit", + "type": "u64" + } + ] + }, + { + "name": "receiveTbtc", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "postedVaa", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeClaim", + "isMut": true, + "isSigner": false, + "docs": [ + "transfer. By checking whether this account exists is a short-circuit way of bailing out", + "early if this transfer has already been redeemed (as opposed to letting the Token Bridge", + "instruction fail)." + ] + }, + { + "name": "wrappedTbtcToken", + "isMut": true, + "isSigner": false, + "docs": [ + "Custody account." + ] + }, + { + "name": "wrappedTbtcMint", + "isMut": true, + "isSigner": false, + "docs": [ + "This mint is owned by the Wormhole Token Bridge program. This PDA address is stored in the", + "custodian account." + ] + }, + { + "name": "tbtcMint", + "isMut": true, + "isSigner": false + }, + { + "name": "recipientToken", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account for minted tBTC.", + "", + "NOTE: Because the recipient is encoded in the transfer message payload, we can check the", + "authority from the deserialized VAA. But we should still check whether the authority is the", + "zero address in access control." + ] + }, + { + "name": "recipient", + "isMut": false, + "isSigner": false, + "docs": [ + "be created for him." + ] + }, + { + "name": "recipientWrappedToken", + "isMut": true, + "isSigner": false, + "docs": [ + "The gateway will create an associated token account for the recipient if it doesn't exist.", + "", + "NOTE: When the minting limit increases, the recipient can use this token account to mint", + "tBTC using the deposit_wormhole_tbtc instruction." + ] + }, + { + "name": "tbtcConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "tbtcMinterInfo", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeRegisteredEmitter", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeWrappedAsset", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeMintAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + }, + { + "name": "tbtcProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "coreBridgeProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "messageHash", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + }, + { + "name": "sendTbtcGateway", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "gatewayInfo", + "isMut": false, + "isSigner": false + }, + { + "name": "wrappedTbtcToken", + "isMut": true, + "isSigner": false, + "docs": [ + "Custody account." + ] + }, + { + "name": "wrappedTbtcMint", + "isMut": true, + "isSigner": false + }, + { + "name": "tbtcMint", + "isMut": true, + "isSigner": false + }, + { + "name": "senderToken", + "isMut": true, + "isSigner": false + }, + { + "name": "sender", + "isMut": true, + "isSigner": true + }, + { + "name": "tokenBridgeConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeWrappedAsset", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeTransferAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "coreBridgeData", + "isMut": true, + "isSigner": false + }, + { + "name": "coreMessage", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenBridgeCoreEmitter", + "isMut": false, + "isSigner": false + }, + { + "name": "coreEmitterSequence", + "isMut": true, + "isSigner": false + }, + { + "name": "coreFeeCollector", + "isMut": true, + "isSigner": false + }, + { + "name": "clock", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeSender", + "isMut": false, + "isSigner": false, + "docs": [ + "sign for transferring via Token Bridge program with a message." + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "coreBridgeProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "SendTbtcGatewayArgs" + } + } + ] + }, + { + "name": "sendTbtcWrapped", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false + }, + { + "name": "wrappedTbtcToken", + "isMut": true, + "isSigner": false, + "docs": [ + "Custody account." + ] + }, + { + "name": "wrappedTbtcMint", + "isMut": true, + "isSigner": false + }, + { + "name": "tbtcMint", + "isMut": true, + "isSigner": false + }, + { + "name": "senderToken", + "isMut": true, + "isSigner": false + }, + { + "name": "sender", + "isMut": true, + "isSigner": true + }, + { + "name": "tokenBridgeConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeWrappedAsset", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeTransferAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "coreBridgeData", + "isMut": true, + "isSigner": false + }, + { + "name": "coreMessage", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenBridgeCoreEmitter", + "isMut": false, + "isSigner": false + }, + { + "name": "coreEmitterSequence", + "isMut": true, + "isSigner": false + }, + { + "name": "coreFeeCollector", + "isMut": true, + "isSigner": false + }, + { + "name": "clock", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenBridgeProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "coreBridgeProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "SendTbtcWrappedArgs" + } + } + ] + }, + { + "name": "depositWormholeTbtc", + "accounts": [ + { + "name": "custodian", + "isMut": true, + "isSigner": false, + "docs": [ + "NOTE: This account also acts as a minter for the TBTC program." + ] + }, + { + "name": "wrappedTbtcToken", + "isMut": true, + "isSigner": false, + "docs": [ + "This token account is owned by this program, whose mint is the wrapped TBTC mint. This PDA", + "address is stored in the custodian account." + ] + }, + { + "name": "wrappedTbtcMint", + "isMut": false, + "isSigner": false, + "docs": [ + "This mint is owned by the Wormhole Token Bridge program. This PDA address is stored in the", + "custodian account." + ] + }, + { + "name": "tbtcMint", + "isMut": true, + "isSigner": false, + "docs": [ + "This mint is owned by the TBTC program. This PDA address is stored in the custodian account." + ] + }, + { + "name": "recipientWrappedToken", + "isMut": true, + "isSigner": false + }, + { + "name": "recipientToken", + "isMut": true, + "isSigner": false + }, + { + "name": "recipient", + "isMut": false, + "isSigner": true, + "docs": [ + "This program requires that the owner of the TBTC token account sign for TBTC being minted", + "into his account." + ] + }, + { + "name": "tbtcConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "tbtcMinterInfo", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tbtcProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "amount", + "type": "u64" + } + ] + } + ], + "accounts": [ + { + "name": "Custodian", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "authority", + "type": "publicKey" + }, + { + "name": "pendingAuthority", + "type": { + "option": "publicKey" + } + }, + { + "name": "tbtcMint", + "type": "publicKey" + }, + { + "name": "wrappedTbtcMint", + "type": "publicKey" + }, + { + "name": "wrappedTbtcToken", + "type": "publicKey" + }, + { + "name": "tokenBridgeSender", + "type": "publicKey" + }, + { + "name": "tokenBridgeSenderBump", + "type": "u8" + }, + { + "name": "mintingLimit", + "type": "u64" + }, + { + "name": "mintedAmount", + "type": "u64" + } + ] + } + }, + { + "name": "GatewayInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "address", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + } + ], + "types": [ + { + "name": "UpdateGatewayAddressArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "chain", + "type": "u16" + }, + { + "name": "address", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + }, + { + "name": "SendTbtcGatewayArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "recipientChain", + "type": "u16" + }, + { + "name": "recipient", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "nonce", + "type": "u32" + } + ] + } + }, + { + "name": "SendTbtcWrappedArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "recipientChain", + "type": "u16" + }, + { + "name": "recipient", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "arbiterFee", + "type": "u64" + }, + { + "name": "nonce", + "type": "u32" + } + ] + } + } + ], + "events": [ + { + "name": "WormholeTbtcReceived", + "fields": [ + { + "name": "receiver", + "type": "publicKey", + "index": false + }, + { + "name": "amount", + "type": "u64", + "index": false + } + ] + }, + { + "name": "WormholeTbtcSent", + "fields": [ + { + "name": "amount", + "type": "u64", + "index": false + }, + { + "name": "recipientChain", + "type": "u16", + "index": false + }, + { + "name": "gateway", + "type": { + "array": [ + "u8", + 32 + ] + }, + "index": false + }, + { + "name": "recipient", + "type": { + "array": [ + "u8", + 32 + ] + }, + "index": false + }, + { + "name": "arbiterFee", + "type": "u64", + "index": false + }, + { + "name": "nonce", + "type": "u32", + "index": false + } + ] + }, + { + "name": "WormholeTbtcDeposited", + "fields": [ + { + "name": "depositor", + "type": "publicKey", + "index": false + }, + { + "name": "amount", + "type": "u64", + "index": false + } + ] + }, + { + "name": "GatewayAddressUpdated", + "fields": [ + { + "name": "chain", + "type": "u16", + "index": false + }, + { + "name": "gateway", + "type": { + "array": [ + "u8", + 32 + ] + }, + "index": false + } + ] + }, + { + "name": "MintingLimitUpdated", + "fields": [ + { + "name": "mintingLimit", + "type": "u64", + "index": false + } + ] + } + ], + "errors": [ + { + "code": 6016, + "name": "MintingLimitExceeded", + "msg": "Cannot mint more than the minting limit" + }, + { + "code": 6032, + "name": "IsNotAuthority", + "msg": "Only custodian authority is permitted for this action" + }, + { + "code": 6034, + "name": "IsNotPendingAuthority", + "msg": "Not valid pending authority to take authority" + }, + { + "code": 6036, + "name": "NoPendingAuthorityChange", + "msg": "No pending authority" + }, + { + "code": 6048, + "name": "ZeroRecipient", + "msg": "0x0 recipient not allowed" + }, + { + "code": 6064, + "name": "NotEnoughWrappedTbtc", + "msg": "Not enough wormhole tBTC in the gateway to bridge" + }, + { + "code": 6080, + "name": "ZeroAmount", + "msg": "Amount must not be 0" + }, + { + "code": 6112, + "name": "TransferAlreadyRedeemed", + "msg": "Token Bridge transfer already redeemed" + }, + { + "code": 6128, + "name": "InvalidEthereumTbtc", + "msg": "Token chain and address do not match Ethereum's tBTC" + }, + { + "code": 6144, + "name": "NoTbtcTransferred", + "msg": "No tBTC transferred" + }, + { + "code": 6160, + "name": "RecipientZeroAddress", + "msg": "0x0 receiver not allowed" + }, + { + "code": 6176, + "name": "MintedAmountUnderflow", + "msg": "Not enough minted by the gateway to satisfy sending tBTC" + }, + { + "code": 6178, + "name": "MintedAmountOverflow", + "msg": "Minted amount after deposit exceeds u64" + } + ] +} \ No newline at end of file From c8067b714cf2eb7796721a87996d05123d4b9835 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 11:06:54 +0200 Subject: [PATCH 05/18] Unignoring IDL dir --- cross-chain/solana/.gitignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cross-chain/solana/.gitignore b/cross-chain/solana/.gitignore index 05e8d8768..626d5686f 100644 --- a/cross-chain/solana/.gitignore +++ b/cross-chain/solana/.gitignore @@ -2,10 +2,12 @@ .anchor .prettierrc.json .DS_Store -target +/target/* **/*.rs.bk node_modules test-ledger artifacts-mainnet artifacts-testnet -.env \ No newline at end of file +.env +!/target/idl/ +!/target/idl/* \ No newline at end of file From 3fd417c1bb8be12db4f713c13f1c2e3f7c569fd4 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 16:20:11 +0200 Subject: [PATCH 06/18] Chains mapping Mapped Arbitrum, Optimism, Polygon and Base for testnet and mainnet. Added addresses to consts file. Added addresses of TBTC wrapped token. --- cross-chain/solana/deploy/helpers/consts.ts | 38 ++++ cross-chain/solana/deploy/init.ts | 215 +++++++++++++------- 2 files changed, 185 insertions(+), 68 deletions(-) create mode 100644 cross-chain/solana/deploy/helpers/consts.ts diff --git a/cross-chain/solana/deploy/helpers/consts.ts b/cross-chain/solana/deploy/helpers/consts.ts new file mode 100644 index 000000000..1a6fceed5 --- /dev/null +++ b/cross-chain/solana/deploy/helpers/consts.ts @@ -0,0 +1,38 @@ +import { WRAPPED_TBTC_MINT } from "./../../tests/helpers/consts" +export const WH_ARBITRUM_CHAIN_ID = 23 + +export const WH_OPTIMISM_CHAIN_ID = 24 + +export const WH_POLYGON_CHAIN_ID = 5 + +export const WH_BASE_CHAIN_ID = 30 + +// EVM addresses converted to 32 bytes. 0x is trimmed intentionally as the input +// param requires it without leading 0x. + +export const ARBITRUM_GATEWAY_ADDRESS_TESTNET = + "00000000000000000000000031a15e213b59e230b45e8c5c99dafac3d1236ee2" +export const ARBITRUM_GATEWAY_ADDRESS_MAINNET = + "0000000000000000000000001293a54e160d1cd7075487898d65266081a15458" + +export const OPTIMISM_GATEWAY_ADDRESS_TESTNET = + "0000000000000000000000006449F4381f3d63bDfb36B3bDc375724aD3cD4621" +export const OPTIMISM_GATEWAY_ADDRESS_MAINNET = + "0000000000000000000000001293a54e160D1cd7075487898d65266081A15458" + +export const POLYGON_GATEWAY_ADDRESS_TESTNET = + "00000000000000000000000091Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818" // testnet +export const POLYGON_GATEWAY_ADDRESS_MAINNET = + "00000000000000000000000009959798B95d00a3183d20FaC298E4594E599eab" + +export const BASE_GATEWAY_ADDRESS_TESTNET = + "000000000000000000000000e3e0511EEbD87F08FbaE4486419cb5dFB06e1343" +export const BASE_GATEWAY_ADDRESS_MAINNET = + "00000000000000000000000009959798B95d00a3183d20FaC298E4594E599eab" + +// deriveWrappedMintKey("DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe", 2, "0x679874fbe6d4e7cc54a59e315ff1eb266686a937") +export const WRAPPED_TBTC_MINT_TESTNET = + "FMYvcyMJJ22whB9m3T5g1oPKwM6jpLnFBXnrY6eXmCrp" +// deriveWrappedMintKey("wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb", 2, "0x18084fbA666a33d37592fA2633fD49a74DD93a88") +export const WRAPPED_TBTC_MINT_MAINNET = + "25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG" diff --git a/cross-chain/solana/deploy/init.ts b/cross-chain/solana/deploy/init.ts index 70e1c8a1d..3bf42a760 100644 --- a/cross-chain/solana/deploy/init.ts +++ b/cross-chain/solana/deploy/init.ts @@ -2,55 +2,56 @@ import * as anchor from "@coral-xyz/anchor" import fs from "fs" import { PublicKey, Keypair } from "@solana/web3.js" import dotenv from "dotenv" -import { Program } from "@coral-xyz/anchor"; -import { Tbtc } from "../target/types/tbtc"; -import { WormholeGateway } from "../target/types/wormhole_gateway"; -import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata"; +import { Program } from "@coral-xyz/anchor" +import { Tbtc } from "../target/types/tbtc" +import { WormholeGateway } from "../target/types/wormhole_gateway" +import { PROGRAM_ID as METADATA_PROGRAM_ID } from "@metaplex-foundation/mpl-token-metadata" +import * as consts from "./helpers/consts" async function run(): Promise { dotenv.config({ path: "../solana.env" }) - anchor.setProvider(anchor.AnchorProvider.env()); + anchor.setProvider(anchor.AnchorProvider.env()) - const tbtcProgram = anchor.workspace.Tbtc as Program; - const wormholeGatewayProgram = anchor.workspace.WormholeGateway as Program; + const tbtcProgram = anchor.workspace.Tbtc as Program + const wormholeGatewayProgram = anchor.workspace + .WormholeGateway as Program console.log("tbtcProgram.programId", tbtcProgram.programId) - console.log("wormholeGatewayProgram.programId", wormholeGatewayProgram.programId) + console.log( + "wormholeGatewayProgram.programId", + wormholeGatewayProgram.programId + ) // This wallet deployed the program and is also an authority - const authority = (loadKey(process.env.AUTHORITY)).publicKey + const authority = loadKey(process.env.AUTHORITY).publicKey const mint = PublicKey.findProgramAddressSync( [Buffer.from("tbtc-mint")], tbtcProgram.programId - )[0]; + )[0] const config = PublicKey.findProgramAddressSync( [Buffer.from("config")], tbtcProgram.programId - )[0]; + )[0] const guardians = PublicKey.findProgramAddressSync( [Buffer.from("guardians")], tbtcProgram.programId - )[0]; + )[0] const minters = PublicKey.findProgramAddressSync( [Buffer.from("minters")], tbtcProgram.programId - )[0]; + )[0] const tbtcMetadata = PublicKey.findProgramAddressSync( - [ - Buffer.from("metadata"), - METADATA_PROGRAM_ID.toBuffer(), - mint.toBuffer(), - ], + [Buffer.from("metadata"), METADATA_PROGRAM_ID.toBuffer(), mint.toBuffer()], METADATA_PROGRAM_ID - )[0]; + )[0] - const mplTokenMetadataProgram = METADATA_PROGRAM_ID; + const mplTokenMetadataProgram = METADATA_PROGRAM_ID // Initalize tbtc program await tbtcProgram.methods @@ -62,9 +63,9 @@ async function run(): Promise { minters, authority, tbtcMetadata, - mplTokenMetadataProgram + mplTokenMetadataProgram, }) - .instruction() + .rpc() const minter = PublicKey.findProgramAddressSync( [Buffer.from("redeemer")], @@ -72,10 +73,11 @@ async function run(): Promise { )[0] const mintingLimit = 10000 // Arbitrary big number of TBTC - // TODO: verify with WH team if the address is correct - const WRAPPED_TBTC_MINT = new PublicKey( - "25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG" - ); + let WRAPPED_TBTC = consts.WRAPPED_TBTC_MINT_TESTNET + if (process.env.CLUSTER === "mainnet-beta") { + WRAPPED_TBTC = consts.WRAPPED_TBTC_MINT_MAINNET + } + const WRAPPED_TBTC_MINT = new PublicKey(WRAPPED_TBTC) const gatewayWrappedTbtcToken = PublicKey.findProgramAddressSync( [Buffer.from("wrapped-token")], @@ -87,6 +89,7 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] + // Initialize wormhole gateway await wormholeGatewayProgram.methods .initialize(new anchor.BN(mintingLimit)) .accounts({ @@ -97,53 +100,129 @@ async function run(): Promise { wrappedTbtcToken: gatewayWrappedTbtcToken, tokenBridgeSender, }) - .rpc(); + .rpc() const minterInfo = PublicKey.findProgramAddressSync( [Buffer.from("minter-info"), minter.toBuffer()], tbtcProgram.programId )[0] - // // Adding a minter (wormholeGateway) - // await tbtcProgram.methods - // .addMinter() - // .accounts({ - // config, - // authority, - // minters, - // minterInfo, - // minter, - // }) - // .instruction(); - - // // update mappings (self?, arbitrum, optimism, polygon, base) - - // // arbitrum chain ID: 23 - // // ETH Goerli address: 0x00000000000000000000000031a15e213b59e230b45e8c5c99dafac3d1236ee2 - // // ETH Mainnet address: 0x0000000000000000000000001293a54e160d1cd7075487898d65266081a15458 - // const arbitrumChain = 23 - // const arbiArgs = { - // chain: arbitrumChain, - // address: Array.from(Buffer.alloc(32, "00000000000000000000000031a15e213b59e230b45e8c5c99dafac3d1236ee2", "hex")) - // } - - // const encodedChain = Buffer.alloc(2); - // encodedChain.writeUInt16LE(arbitrumChain); - // const gatewayInfo = PublicKey.findProgramAddressSync( - // [Buffer.from("gateway-info"), encodedChain], - // wormholeGatewayProgram.programId - // )[0] - - // wormholeGatewayProgram.methods - // .updateGatewayAddress(arbiArgs) - // .accounts({ - // custodian: minter, - // gatewayInfo, - // authority, - // }) - // .instruction(); - - console.log("success") + // Adding a minter (wormholeGateway) + await tbtcProgram.methods + .addMinter() + .accounts({ + config, + authority, + minters, + minterInfo, + minter, + }) + .rpc() + + // Point to devnet addresses by default + let ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET + let OPTIMISM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET + let POLYGON_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET + let BASE_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET + if (process.env.CLUSTER === "mainnet-beta") { + ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_MAINNET + OPTIMISM_GATEWAY = consts.OPTIMISM_GATEWAY_ADDRESS_MAINNET + POLYGON_GATEWAY = consts.POLYGON_GATEWAY_ADDRESS_MAINNET + BASE_GATEWAY = consts.BASE_GATEWAY_ADDRESS_MAINNET + } + + // Updating with Arbitrum + const arbiArgs = { + chain: consts.WH_ARBITRUM_CHAIN_ID, + address: Array.from(Buffer.alloc(32, ARBITRUM_GATEWAY, "hex")), + } + + const encodedArbiChain = Buffer.alloc(2) + encodedArbiChain.writeUInt16LE(consts.WH_ARBITRUM_CHAIN_ID) + const gatewayArbiInfo = PublicKey.findProgramAddressSync( + [Buffer.from("gateway-info"), encodedArbiChain], + wormholeGatewayProgram.programId + )[0] + + wormholeGatewayProgram.methods + .updateGatewayAddress(arbiArgs) + .accounts({ + custodian: minter, + gatewayInfo: gatewayArbiInfo, + authority, + }) + .rpc() + + // Updating with Optimism + const optiArgs = { + chain: consts.WH_OPTIMISM_CHAIN_ID, + address: Array.from(Buffer.alloc(32, OPTIMISM_GATEWAY, "hex")), + } + + const encodedOptiChain = Buffer.alloc(2) + encodedOptiChain.writeUInt16LE(consts.WH_OPTIMISM_CHAIN_ID) + const gatewayOptiInfo = PublicKey.findProgramAddressSync( + [Buffer.from("gateway-info"), encodedOptiChain], + wormholeGatewayProgram.programId + )[0] + + wormholeGatewayProgram.methods + .updateGatewayAddress(optiArgs) + .accounts({ + custodian: minter, + gatewayInfo: gatewayOptiInfo, + authority, + }) + .rpc() + + // Updating with Polygon + const polyArgs = { + chain: consts.WH_POLYGON_CHAIN_ID, + address: Array.from(Buffer.alloc(32, POLYGON_GATEWAY, "hex")), + } + + const encodedPolyChain = Buffer.alloc(2) + encodedPolyChain.writeUInt16LE(consts.WH_POLYGON_CHAIN_ID) + const gatewayPolyInfo = PublicKey.findProgramAddressSync( + [Buffer.from("gateway-info"), encodedPolyChain], + wormholeGatewayProgram.programId + )[0] + + wormholeGatewayProgram.methods + .updateGatewayAddress(polyArgs) + .accounts({ + custodian: minter, + gatewayInfo: gatewayPolyInfo, + authority, + }) + .rpc() + + // Updating with BASE + const baseArgs = { + chain: consts.WH_BASE_CHAIN_ID, + address: Array.from(Buffer.alloc(32, BASE_GATEWAY, "hex")), + } + + const encodedBaseChain = Buffer.alloc(2) + encodedBaseChain.writeUInt16LE(consts.WH_BASE_CHAIN_ID) + const gatewayBaseInfo = PublicKey.findProgramAddressSync( + [Buffer.from("gateway-info"), encodedBaseChain], + wormholeGatewayProgram.programId + )[0] + + wormholeGatewayProgram.methods + .updateGatewayAddress(baseArgs) + .accounts({ + custodian: minter, + gatewayInfo: gatewayBaseInfo, + authority, + }) + .rpc() + + // TODO: confirm with the WH team if Solana gateway should be self updated just + // like we do on EVMs, i.e updateGatewayAddress(solanaArgs) + + console.log("Done initializing programs!") } ;(async () => { @@ -163,4 +242,4 @@ function loadKey(filename: string): Keypair { } catch { console.log("Unable to read keypair...", filename) } -} \ No newline at end of file +} From 9b678f898288785559f53a7b8ff5dadeb2f2261e Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 20:12:50 +0200 Subject: [PATCH 07/18] Updating with Solana gateway --- cross-chain/solana/deploy/helpers/consts.ts | 9 +++++- cross-chain/solana/deploy/init.ts | 33 +++++++++++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/cross-chain/solana/deploy/helpers/consts.ts b/cross-chain/solana/deploy/helpers/consts.ts index 1a6fceed5..71c42e176 100644 --- a/cross-chain/solana/deploy/helpers/consts.ts +++ b/cross-chain/solana/deploy/helpers/consts.ts @@ -7,11 +7,14 @@ export const WH_POLYGON_CHAIN_ID = 5 export const WH_BASE_CHAIN_ID = 30 +export const WH_SOLANA_CHAIN_ID = 1 + // EVM addresses converted to 32 bytes. 0x is trimmed intentionally as the input // param requires it without leading 0x. export const ARBITRUM_GATEWAY_ADDRESS_TESTNET = "00000000000000000000000031a15e213b59e230b45e8c5c99dafac3d1236ee2" + export const ARBITRUM_GATEWAY_ADDRESS_MAINNET = "0000000000000000000000001293a54e160d1cd7075487898d65266081a15458" @@ -21,7 +24,7 @@ export const OPTIMISM_GATEWAY_ADDRESS_MAINNET = "0000000000000000000000001293a54e160D1cd7075487898d65266081A15458" export const POLYGON_GATEWAY_ADDRESS_TESTNET = - "00000000000000000000000091Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818" // testnet + "00000000000000000000000091Fe7128f74dBd4F031ea3D90FC5Ea4DCfD81818" export const POLYGON_GATEWAY_ADDRESS_MAINNET = "00000000000000000000000009959798B95d00a3183d20FaC298E4594E599eab" @@ -36,3 +39,7 @@ export const WRAPPED_TBTC_MINT_TESTNET = // deriveWrappedMintKey("wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb", 2, "0x18084fbA666a33d37592fA2633fD49a74DD93a88") export const WRAPPED_TBTC_MINT_MAINNET = "25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG" + +export const SOLANA_GATEWAY_ADDRESS_TESTNET = + "Gj93RRt6QB7FjmyokAD5rcMAku7pq3Fk2Aa8y6nNbwsV" +// export const SOLANA_GATEWAY_ADDRESS_MAINNET = "tbd" diff --git a/cross-chain/solana/deploy/init.ts b/cross-chain/solana/deploy/init.ts index 3bf42a760..78dcb4d1c 100644 --- a/cross-chain/solana/deploy/init.ts +++ b/cross-chain/solana/deploy/init.ts @@ -124,11 +124,13 @@ async function run(): Promise { let OPTIMISM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET let POLYGON_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET let BASE_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET + let SOLANA_GATEWAY = consts.SOLANA_GATEWAY_ADDRESS_TESTNET if (process.env.CLUSTER === "mainnet-beta") { ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_MAINNET OPTIMISM_GATEWAY = consts.OPTIMISM_GATEWAY_ADDRESS_MAINNET POLYGON_GATEWAY = consts.POLYGON_GATEWAY_ADDRESS_MAINNET BASE_GATEWAY = consts.BASE_GATEWAY_ADDRESS_MAINNET + // TODO: add SOLANA_GATEWAY_ADDRESS_MAINNET once it's deployed } // Updating with Arbitrum @@ -144,7 +146,7 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] - wormholeGatewayProgram.methods + await wormholeGatewayProgram.methods .updateGatewayAddress(arbiArgs) .accounts({ custodian: minter, @@ -166,7 +168,7 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] - wormholeGatewayProgram.methods + await wormholeGatewayProgram.methods .updateGatewayAddress(optiArgs) .accounts({ custodian: minter, @@ -188,7 +190,7 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] - wormholeGatewayProgram.methods + await wormholeGatewayProgram.methods .updateGatewayAddress(polyArgs) .accounts({ custodian: minter, @@ -210,7 +212,7 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] - wormholeGatewayProgram.methods + await wormholeGatewayProgram.methods .updateGatewayAddress(baseArgs) .accounts({ custodian: minter, @@ -219,8 +221,27 @@ async function run(): Promise { }) .rpc() - // TODO: confirm with the WH team if Solana gateway should be self updated just - // like we do on EVMs, i.e updateGatewayAddress(solanaArgs) + // Updating with self (SOLANA) + const solanaArgs = { + chain: consts.WH_SOLANA_CHAIN_ID, + address: Array.from(new PublicKey(SOLANA_GATEWAY).toBuffer()), + } + + const encodedSolanaChain = Buffer.alloc(2) + encodedSolanaChain.writeUInt16LE(consts.WH_SOLANA_CHAIN_ID) + const gatewaySolanaInfo = PublicKey.findProgramAddressSync( + [Buffer.from("gateway-info"), encodedSolanaChain], + wormholeGatewayProgram.programId + )[0] + + await wormholeGatewayProgram.methods + .updateGatewayAddress(solanaArgs) + .accounts({ + custodian: minter, + gatewayInfo: gatewaySolanaInfo, + authority, + }) + .rpc() console.log("Done initializing programs!") } From 125653e4e986328e426160841cbb15700df91601 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 20:14:05 +0200 Subject: [PATCH 08/18] Linting only --- cross-chain/solana/migrations/deploy.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cross-chain/solana/migrations/deploy.ts b/cross-chain/solana/migrations/deploy.ts index 448a1b3f2..ba714d66e 100644 --- a/cross-chain/solana/migrations/deploy.ts +++ b/cross-chain/solana/migrations/deploy.ts @@ -2,10 +2,10 @@ // single deploy script that's invoked from the CLI, injecting a provider // configured from the workspace's Anchor.toml. -const anchor = require("@coral-xyz/anchor"); +const anchor = require("@coral-xyz/anchor") module.exports = async function (provider) { // Configure client to use the provider. - anchor.setProvider(provider); + anchor.setProvider(provider) // Add your deploy script here. -}; \ No newline at end of file +} From 0e46206cb577de27d5928bd4165cdfdd7f2139f3 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 20:16:46 +0200 Subject: [PATCH 09/18] Replacing IDLs with program addresses --- cross-chain/solana/target/idl/tbtc.json | 5 ++++- cross-chain/solana/target/idl/wormhole_gateway.json | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cross-chain/solana/target/idl/tbtc.json b/cross-chain/solana/target/idl/tbtc.json index a56a15669..64859138c 100644 --- a/cross-chain/solana/target/idl/tbtc.json +++ b/cross-chain/solana/target/idl/tbtc.json @@ -557,5 +557,8 @@ "name": "IsNotPaused", "msg": "Program is not paused" } - ] + ], + "metadata": { + "address": "Gj93RRt6QB7FjmyokAD5rcMAku7pq3Fk2Aa8y6nNbwsV" + } } \ No newline at end of file diff --git a/cross-chain/solana/target/idl/wormhole_gateway.json b/cross-chain/solana/target/idl/wormhole_gateway.json index b7f578215..2ace740b4 100644 --- a/cross-chain/solana/target/idl/wormhole_gateway.json +++ b/cross-chain/solana/target/idl/wormhole_gateway.json @@ -988,5 +988,8 @@ "name": "MintedAmountOverflow", "msg": "Minted amount after deposit exceeds u64" } - ] + ], + "metadata": { + "address": "87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t" + } } \ No newline at end of file From 29c1025ed34f3001b0528cfb932334873d48adc0 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 9 Aug 2023 20:40:12 +0200 Subject: [PATCH 10/18] Updating deploy.sh script with deployment descriptions --- cross-chain/solana/scripts/deploy.sh | 33 +++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/cross-chain/solana/scripts/deploy.sh b/cross-chain/solana/scripts/deploy.sh index 19d2dcd55..92ff61c06 100755 --- a/cross-chain/solana/scripts/deploy.sh +++ b/cross-chain/solana/scripts/deploy.sh @@ -22,11 +22,32 @@ then ARTIFACTS_PATH=artifacts-mainnet fi -echo "Building workspace for cluster: $NETWORK ..." -make build +# Build and deploy process should be split in a couple of steps. Here is a +# checklist: -echo "Deploying TBTC program for cluster: $CLUSTER ..." -solana program deploy --url $CLUSTER --keypair $AUTHORITY ./$ARTIFACTS_PATH/tbtc.so +## First run the following 'make build' +# echo "Building workspace for cluster: $NETWORK ..." +# make build -echo "Deploying WORMHOLE_GATEWAY program for cluster: $CLUSTER ..." -solana program deploy --url $CLUSTER --keypair $AUTHORITY ./$ARTIFACTS_PATH/wormhole_gateway.so +## Now check the program IDs by running +## `solana-keygen pubkey target/deploy/tbtc-keypair.json` +## `solana-keygen pubkey target/deploy/wormhole_gateway-keypair.json` +## Copy and paste these addresses in both programs 'lib.rs' and in Anchor.toml +## In Anchor toml make sure that cluster and program point to the right network: +## e.g. devnet, mainnet-beta + +## Now run the build again to. his step is to include the new program id in the binary. +# anchor build --arch sbf -- --features "" -- --no-default-features +## where NETWORK can be one of the following: solana-devnet OR mainnet + +## Deploy programs +# echo "Deploying program(s) for cluster: $CLUSTER ..." +# anchor deploy --provider.cluster $CLUSTER --provider.wallet $AUTHORITY + +## And now it's time to initialize tbtc and wormhole_gatewa programs +# make init_programs + +## The last step is to transfer authority to the Threshold Council. (for mainnet only) +# make transfer_authority + +## Also run transfer_authority.sh script to transfer upgrade authority. (for mainnet only) \ No newline at end of file From a749e9401eb3b9f4e1bbb5beb5c0a7f8c0634856 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 10 Aug 2023 14:27:18 +0200 Subject: [PATCH 11/18] Fixing Gateway var names for devnet --- cross-chain/solana/deploy/init.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cross-chain/solana/deploy/init.ts b/cross-chain/solana/deploy/init.ts index 78dcb4d1c..bf5d3bc71 100644 --- a/cross-chain/solana/deploy/init.ts +++ b/cross-chain/solana/deploy/init.ts @@ -17,12 +17,6 @@ async function run(): Promise { const wormholeGatewayProgram = anchor.workspace .WormholeGateway as Program - console.log("tbtcProgram.programId", tbtcProgram.programId) - console.log( - "wormholeGatewayProgram.programId", - wormholeGatewayProgram.programId - ) - // This wallet deployed the program and is also an authority const authority = loadKey(process.env.AUTHORITY).publicKey @@ -121,9 +115,9 @@ async function run(): Promise { // Point to devnet addresses by default let ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET - let OPTIMISM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET - let POLYGON_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET - let BASE_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET + let OPTIMISM_GATEWAY = consts.OPTIMISM_GATEWAY_ADDRESS_TESTNET + let POLYGON_GATEWAY = consts.POLYGON_GATEWAY_ADDRESS_TESTNET + let BASE_GATEWAY = consts.BASE_GATEWAY_ADDRESS_TESTNET let SOLANA_GATEWAY = consts.SOLANA_GATEWAY_ADDRESS_TESTNET if (process.env.CLUSTER === "mainnet-beta") { ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_MAINNET From 73bedec1a860a971867ee92bf825ed8c81dbbde6 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 10 Aug 2023 14:38:23 +0200 Subject: [PATCH 12/18] Adding anchor command for publishing IDL to Solana ecosystem --- cross-chain/solana/scripts/deploy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cross-chain/solana/scripts/deploy.sh b/cross-chain/solana/scripts/deploy.sh index 92ff61c06..0b48b6177 100755 --- a/cross-chain/solana/scripts/deploy.sh +++ b/cross-chain/solana/scripts/deploy.sh @@ -50,4 +50,7 @@ fi ## The last step is to transfer authority to the Threshold Council. (for mainnet only) # make transfer_authority -## Also run transfer_authority.sh script to transfer upgrade authority. (for mainnet only) \ No newline at end of file +## Also run transfer_authority.sh script to transfer upgrade authority. (for mainnet only) + +## Publishing IDL so that Solana ecosystem can detect and display data nicely (nice to have) +# anchor idl init --provider.cluster $CLUSTER --provider.wallet $AUTHORITY -f target/idl/.json \ No newline at end of file From 89af22bfcd37b24391fec5c46f4f6362b5f6647e Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 10 Aug 2023 23:11:08 +0200 Subject: [PATCH 13/18] Adding ownership transfer scripts --- .../solana/deploy/transfer_authority.ts | 24 ++++++++++++++++--- cross-chain/solana/scripts/deploy.sh | 5 ---- .../solana/scripts/transfer_authority.sh | 12 ++++++---- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/cross-chain/solana/deploy/transfer_authority.ts b/cross-chain/solana/deploy/transfer_authority.ts index 8146d0e83..b2ff6be6f 100644 --- a/cross-chain/solana/deploy/transfer_authority.ts +++ b/cross-chain/solana/deploy/transfer_authority.ts @@ -1,3 +1,4 @@ +import { WormholeGateway } from "./../target/types/wormhole_gateway" import * as anchor from "@coral-xyz/anchor" import fs from "fs" import { PublicKey, Keypair } from "@solana/web3.js" @@ -6,15 +7,23 @@ import dotenv from "dotenv" async function run(): Promise { dotenv.config({ path: "solana.env" }) + anchor.setProvider(anchor.AnchorProvider.env()) + const authority = loadKey(process.env.AUTHORITY) const newAuthority = process.env.THRESHOLD_COUNCIL_MULTISIG const tbtcProgram = anchor.workspace.Tbtc + const wormholeGatewayProgram = anchor.workspace.WormholeGateway const config = PublicKey.findProgramAddressSync( [Buffer.from("config")], tbtcProgram.programId - )[0]; + )[0] + + const custodian = PublicKey.findProgramAddressSync( + [Buffer.from("redeemer")], + wormholeGatewayProgram.programId + )[0] await tbtcProgram.methods .changeAuthority() @@ -23,7 +32,16 @@ async function run(): Promise { authority, newAuthority, }) - .instruction(); + .rpc() + + await wormholeGatewayProgram.methods + .changeAuthority() + .accounts({ + custodian, + authority, + newAuthority, + }) + .rpc() } ;(async () => { @@ -43,4 +61,4 @@ function loadKey(filename: string): Keypair { } catch { console.log("Unable to read keypair...", filename) } -} \ No newline at end of file +} diff --git a/cross-chain/solana/scripts/deploy.sh b/cross-chain/solana/scripts/deploy.sh index 0b48b6177..a6118ee7f 100755 --- a/cross-chain/solana/scripts/deploy.sh +++ b/cross-chain/solana/scripts/deploy.sh @@ -47,10 +47,5 @@ fi ## And now it's time to initialize tbtc and wormhole_gatewa programs # make init_programs -## The last step is to transfer authority to the Threshold Council. (for mainnet only) -# make transfer_authority - -## Also run transfer_authority.sh script to transfer upgrade authority. (for mainnet only) - ## Publishing IDL so that Solana ecosystem can detect and display data nicely (nice to have) # anchor idl init --provider.cluster $CLUSTER --provider.wallet $AUTHORITY -f target/idl/.json \ No newline at end of file diff --git a/cross-chain/solana/scripts/transfer_authority.sh b/cross-chain/solana/scripts/transfer_authority.sh index 88edc0d55..703638816 100755 --- a/cross-chain/solana/scripts/transfer_authority.sh +++ b/cross-chain/solana/scripts/transfer_authority.sh @@ -1,12 +1,16 @@ #!/bin/bash set -eo pipefail +## FOR MAINNET ONLY + # Setting env variables in the current bash shell source solana.env -# TODO: transfer upgrade authority to Threshold Council Multisig +## Transfer authority to the Threshold Council Multisig. (for mainnet only) +# make transfer_authority + +## Transfer upgrade authority to Threshold Council Multisig # solana program set-upgrade-authority -k --new-upgrade-authority -# Transfer authority to the Threshold Council Multisig -# TODO: verify if the authority was actually transferred. -anchor run authority --provider.cluster $CLUSTER \ No newline at end of file +## Threshold Council Multisig has to accept the ownership by executing +## `takeAuthority` instruction \ No newline at end of file From 9e2b7a790d7f15c40d6db4dcb01f87f46f851202 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 11 Aug 2023 11:08:51 +0200 Subject: [PATCH 14/18] Fixing gateway address. It pointed to tbtc, not gateway. --- cross-chain/solana/deploy/helpers/consts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross-chain/solana/deploy/helpers/consts.ts b/cross-chain/solana/deploy/helpers/consts.ts index 71c42e176..a9a4f17d2 100644 --- a/cross-chain/solana/deploy/helpers/consts.ts +++ b/cross-chain/solana/deploy/helpers/consts.ts @@ -41,5 +41,5 @@ export const WRAPPED_TBTC_MINT_MAINNET = "25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG" export const SOLANA_GATEWAY_ADDRESS_TESTNET = - "Gj93RRt6QB7FjmyokAD5rcMAku7pq3Fk2Aa8y6nNbwsV" + "87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t" // export const SOLANA_GATEWAY_ADDRESS_MAINNET = "tbd" From 3c567812483c21bcb18882dc5b8451bebf003e28 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 11 Aug 2023 11:38:45 +0200 Subject: [PATCH 15/18] Smaller description improvements on authority transfer --- cross-chain/solana/scripts/transfer_authority.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cross-chain/solana/scripts/transfer_authority.sh b/cross-chain/solana/scripts/transfer_authority.sh index 703638816..df45a5605 100755 --- a/cross-chain/solana/scripts/transfer_authority.sh +++ b/cross-chain/solana/scripts/transfer_authority.sh @@ -9,8 +9,11 @@ source solana.env ## Transfer authority to the Threshold Council Multisig. (for mainnet only) # make transfer_authority -## Transfer upgrade authority to Threshold Council Multisig +## Transfer upgrade authority to Threshold Council Multisig for tbtc +# solana program set-upgrade-authority -k --new-upgrade-authority + +## Transfer upgrade authority to Threshold Council Multisig for wormhole_gateway # solana program set-upgrade-authority -k --new-upgrade-authority ## Threshold Council Multisig has to accept the ownership by executing -## `takeAuthority` instruction \ No newline at end of file +## `takeAuthority` instruction (most likely in Squads) \ No newline at end of file From c77c1ba24050cfe588b8db7b9d7bcc0239decb0f Mon Sep 17 00:00:00 2001 From: Dmitry Date: Fri, 11 Aug 2023 17:45:13 +0200 Subject: [PATCH 16/18] Updating a minting limit to max unsigned int 64 --- cross-chain/solana/deploy/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cross-chain/solana/deploy/init.ts b/cross-chain/solana/deploy/init.ts index bf5d3bc71..97ba91bca 100644 --- a/cross-chain/solana/deploy/init.ts +++ b/cross-chain/solana/deploy/init.ts @@ -66,7 +66,7 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] - const mintingLimit = 10000 // Arbitrary big number of TBTC + const mintingLimit = "18446744073709551615" // Max u64 let WRAPPED_TBTC = consts.WRAPPED_TBTC_MINT_TESTNET if (process.env.CLUSTER === "mainnet-beta") { WRAPPED_TBTC = consts.WRAPPED_TBTC_MINT_MAINNET From c2bdc924cd2b3583405aedda10377c18bc07fc04 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 12 Aug 2023 11:53:28 +0200 Subject: [PATCH 17/18] Minor updates in logs and description --- cross-chain/solana/.env.template | 2 +- cross-chain/solana/deploy/helpers/consts.ts | 9 ++--- cross-chain/solana/deploy/init.ts | 40 +++++++++++++++++++-- 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/cross-chain/solana/.env.template b/cross-chain/solana/.env.template index 564120216..c39ee6ef5 100644 --- a/cross-chain/solana/.env.template +++ b/cross-chain/solana/.env.template @@ -1,6 +1,6 @@ export AUTHORITY= export THRESHOLD_COUNCIL_MULTISIG= export NETWORK= -export CLUSTER= +export CLUSTER= export ANCHOR_PROVIDER_URL= export ANCHOR_WALLET= \ No newline at end of file diff --git a/cross-chain/solana/deploy/helpers/consts.ts b/cross-chain/solana/deploy/helpers/consts.ts index a9a4f17d2..6a36dafe8 100644 --- a/cross-chain/solana/deploy/helpers/consts.ts +++ b/cross-chain/solana/deploy/helpers/consts.ts @@ -33,13 +33,14 @@ export const BASE_GATEWAY_ADDRESS_TESTNET = export const BASE_GATEWAY_ADDRESS_MAINNET = "00000000000000000000000009959798B95d00a3183d20FaC298E4594E599eab" +export const SOLANA_GATEWAY_ADDRESS_TESTNET = + "87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t" +export const SOLANA_GATEWAY_ADDRESS_MAINNET = + "87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t" + // deriveWrappedMintKey("DZnkkTmCiFWfYTfT41X3Rd1kDgozqzxWaHqsw6W4x2oe", 2, "0x679874fbe6d4e7cc54a59e315ff1eb266686a937") export const WRAPPED_TBTC_MINT_TESTNET = "FMYvcyMJJ22whB9m3T5g1oPKwM6jpLnFBXnrY6eXmCrp" // deriveWrappedMintKey("wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb", 2, "0x18084fbA666a33d37592fA2633fD49a74DD93a88") export const WRAPPED_TBTC_MINT_MAINNET = "25rXTx9zDZcHyTav5sRqM6YBvTGu9pPH9yv83uAEqbgG" - -export const SOLANA_GATEWAY_ADDRESS_TESTNET = - "87MEvHZCXE3ML5rrmh5uX1FbShHmRXXS32xJDGbQ7h5t" -// export const SOLANA_GATEWAY_ADDRESS_MAINNET = "tbd" diff --git a/cross-chain/solana/deploy/init.ts b/cross-chain/solana/deploy/init.ts index 97ba91bca..3a9d674eb 100644 --- a/cross-chain/solana/deploy/init.ts +++ b/cross-chain/solana/deploy/init.ts @@ -68,7 +68,7 @@ async function run(): Promise { const mintingLimit = "18446744073709551615" // Max u64 let WRAPPED_TBTC = consts.WRAPPED_TBTC_MINT_TESTNET - if (process.env.CLUSTER === "mainnet-beta") { + if (process.env.CLUSTER === "mainnet") { WRAPPED_TBTC = consts.WRAPPED_TBTC_MINT_MAINNET } const WRAPPED_TBTC_MINT = new PublicKey(WRAPPED_TBTC) @@ -83,6 +83,11 @@ async function run(): Promise { wormholeGatewayProgram.programId )[0] + // NOTE: It might happen on mainnet that tbtc won't be initialized if running this + // script in one shot. + // The simplest solution is just to wait a bit and then proceed with wormhole_gateway + // initializtion. + // Initialize wormhole gateway await wormholeGatewayProgram.methods .initialize(new anchor.BN(mintingLimit)) @@ -96,6 +101,8 @@ async function run(): Promise { }) .rpc() + console.log("Initialized wormhole gateway program..") + const minterInfo = PublicKey.findProgramAddressSync( [Buffer.from("minter-info"), minter.toBuffer()], tbtcProgram.programId @@ -113,18 +120,20 @@ async function run(): Promise { }) .rpc() + console.log("Added a minter..") + // Point to devnet addresses by default let ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_TESTNET let OPTIMISM_GATEWAY = consts.OPTIMISM_GATEWAY_ADDRESS_TESTNET let POLYGON_GATEWAY = consts.POLYGON_GATEWAY_ADDRESS_TESTNET let BASE_GATEWAY = consts.BASE_GATEWAY_ADDRESS_TESTNET let SOLANA_GATEWAY = consts.SOLANA_GATEWAY_ADDRESS_TESTNET - if (process.env.CLUSTER === "mainnet-beta") { + if (process.env.CLUSTER === "mainnet") { ARBITRUM_GATEWAY = consts.ARBITRUM_GATEWAY_ADDRESS_MAINNET OPTIMISM_GATEWAY = consts.OPTIMISM_GATEWAY_ADDRESS_MAINNET POLYGON_GATEWAY = consts.POLYGON_GATEWAY_ADDRESS_MAINNET BASE_GATEWAY = consts.BASE_GATEWAY_ADDRESS_MAINNET - // TODO: add SOLANA_GATEWAY_ADDRESS_MAINNET once it's deployed + SOLANA_GATEWAY = consts.SOLANA_GATEWAY_ADDRESS_MAINNET } // Updating with Arbitrum @@ -149,6 +158,11 @@ async function run(): Promise { }) .rpc() + console.log( + "Updated Solana gateway with Arbitrum..", + Array.from(new PublicKey(ARBITRUM_GATEWAY).toBuffer()) + ) + // Updating with Optimism const optiArgs = { chain: consts.WH_OPTIMISM_CHAIN_ID, @@ -171,6 +185,11 @@ async function run(): Promise { }) .rpc() + console.log( + "Updated Solana gateway with Optimism..", + Array.from(new PublicKey(OPTIMISM_GATEWAY).toBuffer()) + ) + // Updating with Polygon const polyArgs = { chain: consts.WH_POLYGON_CHAIN_ID, @@ -193,6 +212,11 @@ async function run(): Promise { }) .rpc() + console.log( + "Updated Solana gateway with Polygon..", + Array.from(new PublicKey(POLYGON_GATEWAY).toBuffer()) + ) + // Updating with BASE const baseArgs = { chain: consts.WH_BASE_CHAIN_ID, @@ -215,6 +239,11 @@ async function run(): Promise { }) .rpc() + console.log( + "Updated Solana gateway with Base..", + Array.from(Buffer.alloc(32, BASE_GATEWAY, "hex")) + ) + // Updating with self (SOLANA) const solanaArgs = { chain: consts.WH_SOLANA_CHAIN_ID, @@ -237,6 +266,11 @@ async function run(): Promise { }) .rpc() + console.log( + "Updated Solana gateway with self (Solana)..", + Array.from(new PublicKey(SOLANA_GATEWAY).toBuffer()) + ) + console.log("Done initializing programs!") } From feb345b5cf7bd4affe636bd3fe691a7f066511f6 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Mon, 14 Aug 2023 16:08:01 +0200 Subject: [PATCH 18/18] Removing build and npm scripts because Makefile already covers these scripts --- cross-chain/solana/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cross-chain/solana/package.json b/cross-chain/solana/package.json index 7e59b5895..af041dfc5 100644 --- a/cross-chain/solana/package.json +++ b/cross-chain/solana/package.json @@ -4,12 +4,10 @@ "description": "tBTC v2 on Solana", "license": "GPL-3.0-only", "scripts": { - "build": "anchor build", "format": "npm run lint", "format:fix": "npm run lint:fix", "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", - "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", - "test": "anchor test" + "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check" }, "dependencies": { "@coral-xyz/anchor": "^0.28.0"