a few specs : running on goerli alpha, starknet js 0.4.9
I am trying to deploy a prefunded 0.5.0 openzeppelin account.
I found the class hash to be : ACC_CLASS_HASH=0x750cd490a7cd1572411169eaa8be292325990d33c5d4733655fe6b926985062
I have then pre-calculated the address, using this function
export function calcAddress(mnemonic?: string): string {
const wallet = ethers.Wallet.createRandom();
let currentMnemonic = mnemonic ? mnemonic : wallet.mnemonic.phrase;
console.log(`calculating address for seed : ${currentMnemonic}`);
const starkKeyPair = getStarkPair(currentMnemonic, 0);
let starkKeyPub = ec.getStarkKey(starkKeyPair);
return hash.calculateContractAddressFromHash(starkKeyPub, ACC_CLASS_HASH, [starkKeyPub], 0);
}
and then I deploy it with
export async function deployAcc(mnemonic: string, address: string) {
console.log(`generating keypair from mnemonic`);
const starkKeyPair = getStarkPair(mnemonic, 0);
console.log(`generation succesful`);
const starkKeyPub = ec.getStarkKey(starkKeyPair);
let futureAcc = new Account(provider, address, starkKeyPair);
const accountResponse = await futureAcc?.deployAccount({
classHash: ACC_CLASS_HASH,
constructorCalldata: [starkKeyPub],
addressSalt: starkKeyPub,
contractAddress: address
});
console.log(`tx hash : ${accountResponse?.transaction_hash}`);
await provider.waitForTransaction(accountResponse?.transaction_hash);
}
when I try to deploy the account I'd keep getting
Entry point 0x36fcbf06cd96843058359e1a75928beacfac10727dab22a3972f0af8aa92895 not found in contract with class hash 0x750cd490a7cd1572411169eaa8be292325990d33c5d4733655fe6b926985062.
further googling for entry point 0x36fcbf06cd96843058359e1a75928beacfac10727dab22a3972f0af8aa92895 led me to assume that the entry point is for validate invocation?
as indicated here https://starknet.io/docs/hello_starknet/cli.html
thanks in advance for the help