Skip to content

Commit

Permalink
fix: replace hardcode class hash
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyyconsensys committed Nov 21, 2023
1 parent ba81932 commit b87e23d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions packages/starknet-snap/src/createAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export async function createAccount(params: ApiParams, silentMode = false) {
addressIndex: addressIndexInUsed,
derivationPath,
} = await getKeysFromAddressIndex(keyDeriver, network.chainId, state, addressIndex);

const { address: contractAddress, callData: contractCallData } = getAccContractAddressAndCallData(publicKey);

logger.log(
`createAccount:\ncontractAddress = ${contractAddress}\npublicKey = ${publicKey}\naddressIndex = ${addressIndexInUsed}`,
);
Expand Down
4 changes: 2 additions & 2 deletions packages/starknet-snap/src/utils/starknetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const deployAccount = async (
const provider = getProvider(network);
const account = new Account(provider, contractAddress, privateKey, '1');
const deployAccountPayload = {
classHash: '0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003',
classHash: ACCOUNT_CLASS_HASH_V1,
contractAddress: contractAddress,
constructorCalldata: contractCallData,
addressSalt,
Expand All @@ -169,7 +169,7 @@ export const estimateAccountDeployFee = async (
const provider = getProvider(network);
const account = new Account(provider, contractAddress, privateKey, '1');
const deployAccountPayload = {
classHash: '0x1a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003',
classHash: ACCOUNT_CLASS_HASH_V1,
contractAddress: contractAddress,
constructorCalldata: contractCallData,
addressSalt,
Expand Down

0 comments on commit b87e23d

Please sign in to comment.