Skip to content

Commit

Permalink
add success states
Browse files Browse the repository at this point in the history
  • Loading branch information
0xquantum3labs committed Apr 7, 2024
1 parent 59d6c38 commit b0eaa50
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/snfoundry/scripts_js/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const {
ContractAddress,
getChecksumAddress,
CallData,
validateChecksumAddress,
TransactionStatus,
addAddressPadding,
} = require("starknet");
const { hash } = require("starknet");
Expand Down Expand Up @@ -83,7 +83,10 @@ const deployContract = async (
constructorCalldata,
});
await provider.waitForTransaction(
tryDeclareAndDeploy.deploy.transaction_hash
tryDeclareAndDeploy.deploy.transaction_hash,
{
successStates: [TransactionStatus.ACCEPTED_ON_L2],
}
);
classHash = tryDeclareAndDeploy.declare.class_hash;
existingClass = await provider.getClassByHash(classHash);
Expand Down

0 comments on commit b0eaa50

Please sign in to comment.