From 99d162c4bc9f1f866ec7267e587b61c02fb46327 Mon Sep 17 00:00:00 2001 From: 0xevolve Date: Sun, 6 Oct 2024 22:15:08 +0100 Subject: [PATCH] feat: pragma devnet deploy --- scripts/bun.lockb | Bin 0 -> 22030 bytes scripts/configs/pragma_devnet.json | 212 +++++++ scripts/contract_config.json | 216 ------- scripts/deploy.ts | 94 ++- .../PRAGMA_DEVNET/deployments.json | 15 + scripts/package-lock.json | 540 ------------------ scripts/package.json | 2 +- 7 files changed, 306 insertions(+), 773 deletions(-) create mode 100755 scripts/bun.lockb create mode 100644 scripts/configs/pragma_devnet.json delete mode 100644 scripts/contract_config.json create mode 100644 scripts/deployments/PRAGMA_DEVNET/deployments.json delete mode 100644 scripts/package-lock.json diff --git a/scripts/bun.lockb b/scripts/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..6fa70a801baf3c7c0f26f9aa79d382d81e8a47d5 GIT binary patch literal 22030 zcmeHvd0b52|Nq30vSf*fNR}4Ov@fDmicp9w<&CCks;Q}|nJE=2WLK7CDM=_)D0_Iz z+b&yF>McuUix%rUOXT-@-I07bZ10wLGWi!b1@yo4fuj)WDWuh@#gU~G7J;*enL<1N>t4s{uq>MC?l zG>S|1d$_jsCGCuHXN@Bwra&Ta!=xUg-FJSJEPTU4cEb>JMf^aCm?4&MM1BE0Nw7%3 z@)hy}Bx067Ka?k$FUMeXXE34yIetRK+<>bigmb~~41OYr)dBpq;46YZu(j0p1-~nV zB_d-}#O;Ht3xo+@JcJP!$CUb2;447bvW=8q5ByFLejtkv3=Rn63O#v&Vgb@I7Q%Dn zTMGA>E{r4c7Q_8~c`09*fq4L?3zCKZ09BxT+hx8z_$m;#0KYx>?vM`ooWWNDpC{&W z1RPHuSHKVE15XHmQNA4TF?}oehk9@ZA9=mREMBNY#3AzfiiH7Kf%y=R>A4({CqIBA z5b->DVLVR;PaG)X`*Rq|kRRehArH*g9em`SEc5-rNBsBCy|A$0JcSZyH`04dw+Bd2 zugAFe^p#cG_Fx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yZefwK0ztneL>zlaR@9LJmJ?|(&r@9 zv{yuK}2pVPlLcX+opl?W2I8aZk~bb;UQ^GXP8XY0wT~ ztK3}9^lctMrTaY!+T2Qnwhsg#ZU?EBZ`QILr83fmMI|?*rk@Fm(^=C{FRT^lY2WUS zn*m8bO9?>f4NH2$-3*Af7Y8J@6Oo>oBQ7|=lh5U|sI6WT?SY;QNa#W77M<#2(zAj8 He*ga;>s-uh literal 0 HcmV?d00001 diff --git a/scripts/configs/pragma_devnet.json b/scripts/configs/pragma_devnet.json new file mode 100644 index 0000000..51594cc --- /dev/null +++ b/scripts/configs/pragma_devnet.json @@ -0,0 +1,212 @@ +{ + "contracts": { + "merkleroot_multisig_ism": { + "name": "merkleroot_multisig_ism", + "constructor": { + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + }, + "validators": { + "type": "Span", + "value": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] + }, + "threshold": { + "type": "u32", + "value": "1" + } + } + }, + "protocol_fee": { + "name": "protocol_fee", + "constructor": { + "max_protocol_fee_low": { + "type": "u128", + "value": "1000000000000000000" + }, + "max_protocol_fee_high": { + "type": "u128", + "value": "0" + }, + "protocol_fee_low": { + "type": "u128", + "value": "10000000000000000" + }, + "protocol_fee_high": { + "type": "u128", + "value": "0" + }, + "beneficiary": { + "type": "ContractAddress", + "value": "$BENEFICIARY_ADDRESS" + }, + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + }, + "token_address": { + "type": "ContractAddress", + "value": "0x049D36570D4e46f48e99674bd3fcc84644DdD6b96F7C741B1562B82f9e004dC7" + } + } + }, + "merkle_tree_hook": { + "name": "merkle_tree_hook", + "constructor": { + "mailbox": { + "type": "ContractAddress", + "value": "$mailbox" + }, + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + } + } + }, + "noop_ism": { + "name": "noop_ism", + "constructor": {} + }, + "hook": { + "name": "hook", + "constructor": {} + }, + "pausable_ism": { + "name": "pausable_ism", + "constructor": { + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + } + } + }, + "trusted_relayer_ism": { + "name": "trusted_relayer_ism", + "constructor": { + "mailbox": { + "type": "ContractAddress", + "value": "$mailbox" + }, + "trusted_relayer": { + "type": "ContractAddress", + "value": "0x0000000000000000000000000000000000000000000000000000000000000001" + } + } + }, + "mailbox": { + "name": "mailbox", + "constructor": { + "local_domain": { + "type": "u32", + "value": "23448591" + }, + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + }, + "default_ism": { + "type": "ContractAddress", + "value": "$noop_ism" + }, + "default_hook": { + "type": "ContractAddress", + "value": "$hook" + }, + "required_hook": { + "type": "ContractAddress", + "value": "$hook" + } + } + }, + "validator_announce": { + "name": "validator_announce", + "constructor": { + "mailbox": { + "type": "ContractAddress", + "value": "$mailbox" + }, + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + } + } + }, + "aggregation": { + "name": "aggregation", + "constructor": { + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + }, + "modules": { + "type": "Span", + "value": [ + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] + }, + "threshold": { + "type": "u32", + "value": "1" + } + } + }, + "messageid_multisig_ism": { + "name": "messageid_multisig_ism", + "constructor": { + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + }, + "validators": { + "type": "Span", + "value": [ + "0x0000000000000000000000000000000000000000000000000000000000000003" + ] + }, + "threshold": { + "type": "u32", + "value": "1" + } + } + }, + "default_fallback_routing_ism": { + "name": "default_fallback_routing_ism", + "constructor": { + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + }, + "mailbox": { + "type": "ContractAddress", + "value": "$mailbox" + } + } + }, + "domain_routing_ism": { + "name": "domain_routing_ism", + "constructor": { + "owner": { + "type": "ContractAddress", + "value": "$OWNER_ADDRESS" + } + } + } + }, + "deploymentOrder": [ + "merkleroot_multisig_ism", + "messageid_multisig_ism", + "domain_routing_ism", + "noop_ism", + "pausable_ism", + "aggregation", + "protocol_fee", + "hook", + "mailbox", + "merkle_tree_hook", + "default_fallback_routing_ism", + "trusted_relayer_ism", + "validator_announce" + ] +} \ No newline at end of file diff --git a/scripts/contract_config.json b/scripts/contract_config.json deleted file mode 100644 index 030311a..0000000 --- a/scripts/contract_config.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "contracts": { - "merkleroot_multisig_ism": { - "name": "merkleroot_multisig_ism", - "constructor": { - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - }, - "validators": { - "type": "Span", - "value": [ - "0x0000000000000000000000000000000000000000000000000000000000000002" - ] - }, - "threshold": { - "type": "u32", - "value": "1" - } - } - }, - "protocol_fee": { - "name": "protocol_fee", - "constructor": { - "max_protocol_fee_low": { - "type": "u128", - "value": "1000000000000000000" - }, - "max_protocol_fee_high": { - "type": "u128", - "value": "0" - }, - "protocol_fee_low": { - "type": "u128", - "value": "10000000000000000" - }, - "protocol_fee_high": { - "type": "u128", - "value": "0" - }, - "beneficiary": { - "type": "ContractAddress", - "value": "$BENEFICIARY_ADDRESS" - }, - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - }, - "token_address": { - "type": "ContractAddress", - "value": "0x049D36570D4e46f48e99674bd3fcc84644DdD6b96F7C741B1562B82f9e004dC7" - } - } - }, - "merkle_tree_hook" : { - "name": "merkle_tree_hook", - "constructor": { - "mailbox": { - "type": "ContractAddress", - "value": "$mailbox" - }, - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - } - } - }, - "noop_ism": { - "name": "noop_ism", - "constructor": { - - } - }, - "hook": { - "name": "hook", - "constructor": { - - } - }, - "pausable_ism": { - "name": "pausable_ism", - "constructor": { - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - } - } - }, - "trusted_relayer_ism": { - "name": "trusted_relayer_ism", - "constructor": { - "mailbox":{ - "type": "ContractAddress", - "value": "$mailbox" - }, - "trusted_relayer": { - "type": "ContractAddress", - "value": "0x0000000000000000000000000000000000000000000000000000000000000001" - } - } - }, - "mailbox": { - "name": "mailbox", - "constructor": { - "local_domain": { - "type": "u32", - "value": "100" - }, - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - }, - "default_ism": { - "type": "ContractAddress", - "value": "$merkleroot_multisig_ism" - }, - "default_hook":{ - "type": "ContractAddress", - "value": "$hook" - }, - "required_hook": { - "type": "ContractAddress", - "value": "$protocol_fee" - } - } - }, - "validator_announce": { - "name": "validator_announce", - "constructor": { - "mailbox": { - "type": "ContractAddress", - "value": "$mailbox" - }, - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - } - } - }, - "aggregation": { - "name": "aggregation", - "constructor": { - "owner":{ - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - }, - "modules": { - "type": "Span", - "value": [ - "0x0000000000000000000000000000000000000000000000000000000000000002" - ] - }, - "threshold": { - "type": "u32", - "value": "1" - } - } - }, - "messageid_multisig_ism": { - "name": "messageid_multisig_ism", - "constructor": { - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - }, - "validators": { - "type": "Span", - "value": [ - "0x0000000000000000000000000000000000000000000000000000000000000003" - ] - }, - "threshold": { - "type": "u32", - "value": "1" - } - } - }, - "default_fallback_routing_ism": { - "name": "default_fallback_routing_ism", - "constructor": { - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - }, - "mailbox": { - "type": "ContractAddress", - "value": "$mailbox" - } - } - }, - "domain_routing_ism": { - "name": "domain_routing_ism", - "constructor": { - "owner": { - "type": "ContractAddress", - "value": "$OWNER_ADDRESS" - } - } - } - }, - "deploymentOrder": [ - "merkleroot_multisig_ism", - "messageid_multisig_ism", - "domain_routing_ism", - "noop_ism", - "pausable_ism", - "aggregation", - "protocol_fee", - "hook", - "mailbox", - "merkle_tree_hook", - "default_fallback_routing_ism", - "trusted_relayer_ism", - "validator_announce" - ] - } \ No newline at end of file diff --git a/scripts/deploy.ts b/scripts/deploy.ts index dc77543..2417ab7 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -5,7 +5,7 @@ import { Provider, CallData, RpcProvider, - ContractFactory, + ContractFactory, ContractFactoryParams } from "starknet"; import fs from "fs"; @@ -14,13 +14,13 @@ import dotenv from "dotenv"; dotenv.config(); -const BUILD_PATH = "../cairo/target/dev/hyperlane_starknet"; +const BUILD_PATH = "../cairo/target/dev/contracts"; +const MOCK_BUILD_PATH = "../cairo/target/dev/mocks"; const ACCOUNT_ADDRESS = process.env.ACCOUNT_ADDRESS; const PRIVATE_KEY = process.env.PRIVATE_KEY; -const CONFIG_FILE = "contract_config.json"; -const NETWORK = process.env.NETWORK -const DEPLOYED_CONTRACTS_FILE = path.join('deployments', `${NETWORK}_deployed_contracts.json`); - +const CONFIGS_DIR = 'configs'; +const DEPLOYMENTS_DIR = 'deployments'; +const NETWORK = process.env.NETWORK; interface DeployedContracts { [key: string]: string; @@ -36,6 +36,54 @@ interface Config { deploymentOrder: string[]; } +function getConfigPath(network: string): string { + if (!network) { + throw new Error('NETWORK environment variable is not set'); + } + + const configFileName = `${network.toLowerCase()}.json`; + const configPath = path.join(CONFIGS_DIR, configFileName); + + if (!fs.existsSync(configPath)) { + throw new Error(`Config file not found for network ${network} at ${configPath}`); + } + + return configPath; +} + +function ensureNetworkDirectory(network: string): string { + if (!network) { + throw new Error('NETWORK environment variable is not set'); + } + + // Create main deployments directory if it doesn't exist + if (!fs.existsSync(DEPLOYMENTS_DIR)) { + fs.mkdirSync(DEPLOYMENTS_DIR); + } + + // Create network-specific subdirectory + const networkDir = path.join(DEPLOYMENTS_DIR, network); + if (!fs.existsSync(networkDir)) { + fs.mkdirSync(networkDir); + } + + return networkDir; +} + +function findContractFile(name: string, suffix: string): string { + const mainPath = `${BUILD_PATH}_${name}${suffix}`; + const mockPath = `${MOCK_BUILD_PATH}_${name}${suffix}`; + + if (fs.existsSync(mainPath)) { + return mainPath; + } else if (fs.existsSync(mockPath)) { + console.log(`Using mock contract for ${name} from ${mockPath}`); + return mockPath; + } + + throw new Error(`Contract file not found for ${name} with suffix ${suffix} in either ${BUILD_PATH} or ${MOCK_BUILD_PATH}`); +} + async function buildAccount(): Promise { const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL }); @@ -50,12 +98,12 @@ async function buildAccount(): Promise { } function getCompiledContract(name: string): any { - const contractPath = `${BUILD_PATH}_${name}.contract_class.json`; + const contractPath = findContractFile(name, '.contract_class.json'); return json.parse(fs.readFileSync(contractPath).toString("ascii")); } function getCompiledContractCasm(name: string): any { - const contractPath = `${BUILD_PATH}_${name}.compiled_contract_class.json`; + const contractPath = findContractFile(name, '.compiled_contract_class.json'); return json.parse(fs.readFileSync(contractPath).toString("ascii")); } @@ -88,7 +136,7 @@ async function deployContract( deployedContracts: DeployedContracts ): Promise { console.log(`Deploying contract ${contractName}...`); - + const compiledContract = getCompiledContract(contractName); const casm = getCompiledContractCasm(contractName); const processedArgs = processConstructorArgs(constructorArgs, deployedContracts); @@ -99,7 +147,8 @@ async function deployContract( casm }; - const contractFactory = new ContractFactory(params); const contract = await contractFactory.deploy(constructorCalldata); + const contractFactory = new ContractFactory(params); + const contract = await contractFactory.deploy(constructorCalldata); console.log(`Contract ${contractName} deployed at address:`, contract.address); @@ -108,15 +157,27 @@ async function deployContract( async function deployContracts(): Promise { try { + if (!NETWORK) { + throw new Error('NETWORK environment variable is not set'); + } + const account = await buildAccount(); - const config: Config = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf-8')); + + // Get network-specific config file + const configPath = getConfigPath(NETWORK); + const config: Config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); + const deployedContracts: DeployedContracts = {}; + // Ensure network directory exists and set up deployment file path + const networkDir = ensureNetworkDirectory(NETWORK); + const deploymentsFile = path.join(networkDir, 'deployments.json'); + for (const contractName of config.deploymentOrder) { const address = await deployContract( - account, - contractName, - config.contracts[contractName].constructor, + account, + contractName, + config.contracts[contractName].constructor, deployedContracts ); deployedContracts[contractName] = address; @@ -125,8 +186,9 @@ async function deployContracts(): Promise { console.log("All contracts deployed successfully:"); console.log(deployedContracts); - fs.writeFileSync(DEPLOYED_CONTRACTS_FILE, JSON.stringify(deployedContracts, null, 2)); - console.log(`Deployed contracts saved to ${DEPLOYED_CONTRACTS_FILE}`); + // Write deployments to network-specific file + fs.writeFileSync(deploymentsFile, JSON.stringify(deployedContracts, null, 2)); + console.log(`Deployed contracts saved to ${deploymentsFile}`); return deployedContracts; } catch (error) { diff --git a/scripts/deployments/PRAGMA_DEVNET/deployments.json b/scripts/deployments/PRAGMA_DEVNET/deployments.json new file mode 100644 index 0000000..476e2a8 --- /dev/null +++ b/scripts/deployments/PRAGMA_DEVNET/deployments.json @@ -0,0 +1,15 @@ +{ + "merkleroot_multisig_ism": "0xecdcfc130ef39d1165338615a875176873d4ef2100c7bbf52de2cd5a2b4081", + "messageid_multisig_ism": "0x54668196b83eeaf476b6623a8c7c8bd4646704cccbf09210f89d47541fe0b92", + "domain_routing_ism": "0x14ea7c5eae72dd0f39ff2263ed29d8a01bb48d64e75603f4ded7cc1b6d8dd20", + "noop_ism": "0x769f77987315e20eac6bc8bd426fb6242095e73039e49bead77c88c8c406b2c", + "pausable_ism": "0x59b29192815b814ccd1397e0868cce6874e2b44f096b30732bc1fca6870c3e6", + "aggregation": "0x45caa0f1bab9b1d34f46eaf280fad1970616d90d7acf27b9630596f8f0d6c15", + "protocol_fee": "0xffa8a03e994b7b35a52db403c389c987e11a6b34eda453ca58c3da314e6d50", + "hook": "0x7809aea51191017f541bb09885ef4c84fe6b11725edbd81c5fd8af6a0943dce", + "mailbox": "0x41c20175af14a0bfebfc9ae2f3bda29230a0bceb551844197d9f46faf76d6da", + "merkle_tree_hook": "0xb9a75496355e223652c40fe50d45b5f39b86d3cc5c4f7aed44be6c7f6a8b4c", + "default_fallback_routing_ism": "0x6b632654d261241234331a29f8b24a7838833035ea5142a26a0c7687a71730f", + "trusted_relayer_ism": "0x77559266dd71d2ed75a82608a3400d4d9da71e1b1029013b47f641c431ed5d3", + "validator_announce": "0x2305250e0adab1bafabe58bc905cf94440a55e0fc7664ff095250fe2f8684b8" +} \ No newline at end of file diff --git a/scripts/package-lock.json b/scripts/package-lock.json deleted file mode 100644 index c96c7fb..0000000 --- a/scripts/package-lock.json +++ /dev/null @@ -1,540 +0,0 @@ -{ - "name": "scripts", - "version": "1.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "scripts", - "version": "1.0.0", - "license": "ISC", - "dependencies": { - "@types/node": "^22.0.2", - "dotenv": "^16.4.5", - "fs": "^0.0.1-security", - "starknet": "^6.11.0" - } - }, - "node_modules/@noble/curves": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", - "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", - "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/base": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.7.tgz", - "integrity": "sha512-PPNYBslrLNNUQ/Yad37MHYsNQtK67EhWb6WtSvNLLPo7SdVZgkUjD6Dg+5On7zNwmskf8OX7I7Nx5oN+MIWE0g==", - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/starknet": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@scure/starknet/-/starknet-1.0.0.tgz", - "integrity": "sha512-o5J57zY0f+2IL/mq8+AYJJ4Xpc1fOtDhr+mFQKbHnYFmm3WQrC+8zj2HEgxak1a+x86mhmBC1Kq305KUpVf0wg==", - "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/starknet/node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", - "dependencies": { - "@noble/hashes": "1.3.3" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@scure/starknet/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@starknet-io/types-js": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.7.tgz", - "integrity": "sha512-WLrpK7LIaIb8Ymxu6KF/6JkGW1sso988DweWu7p5QY/3y7waBIiPvzh27D9bX5KIJNRDyOoOVoHVEKYUYWZ/RQ==" - }, - "node_modules/@types/node": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.2.tgz", - "integrity": "sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ==", - "dependencies": { - "undici-types": "~6.11.1" - } - }, - "node_modules/abi-wan-kanabi": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/abi-wan-kanabi/-/abi-wan-kanabi-2.2.2.tgz", - "integrity": "sha512-sTCv2HyNIj1x2WFUoc9oL8ZT9liosrL+GoqEGZJK1kDND096CfA7lwx06vLxLWMocQ41FQXO3oliwoh/UZHYdQ==", - "dependencies": { - "ansicolors": "^0.3.2", - "cardinal": "^2.1.1", - "fs-extra": "^10.0.0", - "yargs": "^17.7.2" - }, - "bin": { - "generate": "dist/generate.js" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ansicolors": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", - "integrity": "sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==" - }, - "node_modules/cardinal": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", - "integrity": "sha512-JSr5eOgoEymtYHBjNWyjrMqet9Am2miJhlfKNdqLp6zoeAh0KN5dRAcxlecj5mAJrmQomgiOBj35xHLrFjqBpw==", - "dependencies": { - "ansicolors": "~0.3.2", - "redeyed": "~2.1.0" - }, - "bin": { - "cdl": "bin/cdl.js" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", - "engines": { - "node": ">=6" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/fetch-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-3.0.1.tgz", - "integrity": "sha512-ZGXe8Y5Z/1FWqQ9q/CrJhkUD73DyBU9VF0hBQmEO/wPHe4A9PKTjplFDLeFX8aOsYypZUcX5Ji/eByn3VCVO3Q==", - "dependencies": { - "set-cookie-parser": "^2.4.8", - "tough-cookie": "^4.0.0" - } - }, - "node_modules/fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-starknet-core": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/get-starknet-core/-/get-starknet-core-4.0.0.tgz", - "integrity": "sha512-6pLmidQZkC3wZsrHY99grQHoGpuuXqkbSP65F8ov1/JsEI8DDLkhsAuLCKFzNOK56cJp+f1bWWfTJ57e9r5eqQ==", - "dependencies": { - "@starknet-io/types-js": "^0.7.7" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/isomorphic-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", - "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", - "dependencies": { - "node-fetch": "^2.6.1", - "whatwg-fetch": "^3.4.1" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/lossless-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lossless-json/-/lossless-json-4.0.1.tgz", - "integrity": "sha512-l0L+ppmgPDnb+JGxNLndPtJZGNf6+ZmVaQzoxQm3u6TXmhdnsA+YtdVR8DjzZd/em58686CQhOFDPewfJ4l7MA==" - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "node_modules/redeyed": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", - "integrity": "sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==", - "dependencies": { - "esprima": "~4.0.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" - }, - "node_modules/set-cookie-parser": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", - "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==" - }, - "node_modules/starknet": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/starknet/-/starknet-6.11.0.tgz", - "integrity": "sha512-u50KrGDi9fbu1Ogu7ynwF/tSeFlp3mzOg1/Y5x50tYFICImo3OfY4lOz9OtYDk404HK4eUujKkhov9tG7GAKlg==", - "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "^1.4.0", - "@scure/base": "~1.1.3", - "@scure/starknet": "~1.0.0", - "abi-wan-kanabi": "^2.2.2", - "fetch-cookie": "^3.0.0", - "get-starknet-core": "^4.0.0-next.3", - "isomorphic-fetch": "^3.0.0", - "lossless-json": "^4.0.1", - "pako": "^2.0.4", - "starknet-types-07": "npm:@starknet-io/types-js@^0.7.7", - "ts-mixer": "^6.0.3", - "url-join": "^4.0.1" - } - }, - "node_modules/starknet-types-07": { - "name": "@starknet-io/types-js", - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@starknet-io/types-js/-/types-js-0.7.7.tgz", - "integrity": "sha512-WLrpK7LIaIb8Ymxu6KF/6JkGW1sso988DweWu7p5QY/3y7waBIiPvzh27D9bX5KIJNRDyOoOVoHVEKYUYWZ/RQ==" - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.4.tgz", - "integrity": "sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==", - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/ts-mixer": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", - "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==" - }, - "node_modules/undici-types": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", - "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==" - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-fetch": { - "version": "3.6.20", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", - "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "engines": { - "node": ">=12" - } - } - } -} diff --git a/scripts/package.json b/scripts/package.json index 8a5a087..b020ce9 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "deploy": "ts-node deploy.ts" }, "keywords": [], "author": "",