-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Argent Account not working in js #117
Comments
What is the format of the private key? |
Is a hex string , from argent google extension casted to hex |
I'm not sure why it's |
Private key is set |
Was this Argent account deployed using the Hardhat plugin? |
No it wasn’t , it’s an existing argent account . Don’t know if there is an extra workaround to import such wallets . For a wallet deployed from the plug-in , it doesn’t face this problem. |
Artifacts probably don't match, you would need to deploy the exact contract that was deployed previously |
Also having this exact same issue |
When you deploy your Argent Account, also store its guardian key. Then next time when you are loading it with const deployedAccount = await starknet.deployAccount("Argent");
const address = deployedAccount.address;
const privateKey = deployedAccount.privatekey;
const guardianPrivatekey = deployedAccount.guardianPrivateKey;
... doStuffHere() ...
const loadedAccount = (await starknet.getAccountFromAddress(address, privateKey, "Argent")) as ArgentAccount;
await loadedAccount.setGuardian(guardianPrivateKey); Note that deploying ArgentAccounts currently (with Plugin v0.5.5) only works on Devnet because internally this requires invoking the |
What if my Argent Account uses the 0 address as the guardian key? This is the default used by ArgentX. I'm still having this issue |
This will be fixed in the next plugin version. |
deploying an Argent account and invoking a function works well
but when reading an existing account and invoking a function in a contract there this issue :
var msgSignature = keyPair.sign(fixMessage(msgHash));
^
TypeError: Cannot read properties of null (reading 'sign')
using the private key exported from argent google extension
The text was updated successfully, but these errors were encountered: