Skip to content

Commit

Permalink
fix deployment with bytearray
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcarlos2000 committed Apr 11, 2024
1 parent c23956e commit cce588f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
4 changes: 3 additions & 1 deletion packages/snfoundry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"envfile": "^6.18.0",
"prettier": "^2.8.8",
"starknet": "5.25.0",
"toml": "^3.0.0"
"starknet-dev": "npm:[email protected]",
"toml": "^3.0.0",
"tslib": "^2.6.2"
}
}
44 changes: 25 additions & 19 deletions packages/snfoundry/scripts_js/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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,
Expand All @@ -165,7 +171,8 @@ const deployScript = async () => {

// await deployContract(
// {
// public_key: "0x6e4fd4f9d6442e10cf8e20a799be3533be3756c5ea4d13e16a297d7d2717039",
// public_key:
// "0x6e4fd4f9d6442e10cf8e20a799be3533be3756c5ea4d13e16a297d7d2717039",
// },
// "Challenge3"
// );
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,9 @@ __metadata:
envfile: ^6.18.0
prettier: ^2.8.8
starknet: 5.25.0
starknet-dev: "npm:[email protected]"
toml: ^3.0.0
tslib: ^2.6.2
yargs: ^17.7.2
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cce588f

Please sign in to comment.