diff --git a/packages/snfoundry/package.json b/packages/snfoundry/package.json index 181fdd0b..65a54847 100644 --- a/packages/snfoundry/package.json +++ b/packages/snfoundry/package.json @@ -16,6 +16,8 @@ "envfile": "^6.18.0", "prettier": "^2.8.8", "starknet": "5.25.0", - "toml": "^3.0.0" + "starknet-dev": "npm:starknet@6.7.0", + "toml": "^3.0.0", + "tslib": "^2.6.2" } } diff --git a/packages/snfoundry/scripts_js/deploy.js b/packages/snfoundry/scripts_js/deploy.js index eadb2bcb..2cee6253 100644 --- a/packages/snfoundry/scripts_js/deploy.js +++ b/packages/snfoundry/scripts_js/deploy.js @@ -3,15 +3,11 @@ const path = require("path"); const networks = require("./helpers/networks"); const argv = require("yargs/yargs")(process.argv.slice(2)).argv; -const { - ContractAddress, - getChecksumAddress, - CallData, - TransactionStatus, - addAddressPadding, -} = require("starknet"); +const { TransactionStatus } = require("starknet"); const { hash } = require("starknet"); +const { CallData } = require("starknet-dev"); + const networkName = argv.network; const { provider, deployer } = networks[networkName]; @@ -129,18 +125,28 @@ const deployContract = async ( }; const deployScript = async () => { - // const { - // classHash: helloStarknetClassHash, - // abi: helloStarknetAbi, - // address: ContractAddress, - // } = await deployContract(null, "HelloStarknet"); // can pass another argument for the exported contract name + const { + classHash: helloStarknetClassHash, + abi: helloStarknetAbi, + address: ContractAddress, + } = await deployContract(null, "HelloStarknet"); // can pass another argument for the exported contract name + await deployContract( + { + name: 1, + }, + "SimpleStorage" + ); + // await deployContract( // { - // name: 1, + // name: "MARQUIS", + // symbol: "MARQ", + // recipient: deployer.address, + // fixed_supply: 100, // }, - // "SimpleStorage" + // "Challenge1" // ); - await deployContract(null, "Challenge0"); + // await deployContract( // { // name: 1, @@ -165,7 +171,8 @@ const deployScript = async () => { // await deployContract( // { - // public_key: "0x6e4fd4f9d6442e10cf8e20a799be3533be3756c5ea4d13e16a297d7d2717039", + // public_key: + // "0x6e4fd4f9d6442e10cf8e20a799be3533be3756c5ea4d13e16a297d7d2717039", // }, // "Challenge3" // ); @@ -183,9 +190,8 @@ const deployScript = async () => { // ); // await deployContract( // { - // initial_owner: addAddressPadding( - // "0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691" - // ), + // initial_owner: + // "0x64b48806902a367c8598f4f95c305e8c1a1acba5f082d294a43793113115691", // }, // "Ownable" // ); // simple storage receives an argument in the constructor diff --git a/yarn.lock b/yarn.lock index 8f2fbbcf..d0cdaec7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1628,7 +1628,9 @@ __metadata: envfile: ^6.18.0 prettier: ^2.8.8 starknet: 5.25.0 + starknet-dev: "npm:starknet@6.7.0" toml: ^3.0.0 + tslib: ^2.6.2 yargs: ^17.7.2 languageName: unknown linkType: soft @@ -7313,7 +7315,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.4.0": +"tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad