Skip to content

Commit

Permalink
remove fee estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
starknetdev committed Sep 21, 2023
1 parent cab8042 commit b97c44b
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions ui/src/app/lib/burner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,25 +146,15 @@ export const useBurner = () => {
// deploy burner
const burner = new Account(provider, address, privateKey, "1");

const { suggestedMaxFee: estimatedFee1 } =
await burner.estimateAccountDeployFee({
classHash: process.env.NEXT_PUBLIC_ACCOUNT_CLASS_HASH!,
addressSalt: publicKey,
constructorCalldata: constructorAACalldata,
});

const {
transaction_hash: deployTx,
contract_address: accountAAFinalAdress,
} = await burner.deployAccount(
{
classHash: process.env.NEXT_PUBLIC_ACCOUNT_CLASS_HASH!,
constructorCalldata: constructorAACalldata,
contractAddress: address,
addressSalt: publicKey,
},
{ maxFee: estimatedFee1 * (BigInt(11) / BigInt(10)) }
);
} = await burner.deployAccount({
classHash: process.env.NEXT_PUBLIC_ACCOUNT_CLASS_HASH!,
constructorCalldata: constructorAACalldata,
contractAddress: address,
addressSalt: publicKey,
});

await provider.waitForTransaction(deployTx);

Expand Down

0 comments on commit b97c44b

Please sign in to comment.