NEWTON
Asked
3 months ago
12
views
0
How can I write contact memory with Account.execute in starknetjs?
Newton
asked
3 months ago
0
Accepted answer
If you have to invoke a function of a contract that needs proof that you have the private key of the account, you have to invoke this function with account.execute.We will see this case more in detail in ERC20 scripts, but in summary, you use this command with the following parameters :
const executeHash = await account.execute( { contractAddress: myContractAddress, entrypoint: 'transfer', calldata: stark.compileCalldata({ recipient: receiverAddress, amount: ['10'] }) } ); await provider.waitForTransaction(executeHash.transaction_hash);
Newton
answered
3 months ago
How can I write contract memory with starknetjs?
How can I read contract memory with starknetjs?
How do I create account using starknetjs?
How can I connect a StarkNet account using starknetjs?
How can I interact with my contract on Starknet using starknetjs?
How do I get started with starknetjs?
How do I create my own account abstraction using starknetjs?
Do you know if I can use a Braavos account as a multisig wallet?
What is the technical difference of Kakarot compare to Nethermind's Warp?
ApeWorX: Why are the cairo and starknet plugins not installing properly?
Is there a way to search a block for events without using `get_transaction_receipt` for each transaction?
Does Kakarot zkEVM have a token?
Cairo/Nile: Testing the proxy upgrade feature, but my tests fail with the error message TypeError: int() can't convert non-string with explicit base.
How will work an account abstaction wallet with the key?