NEWTON
Asked
23 days ago
11
views
0
How can I write contact memory with Account.execute in starknetjs?
Newton
asked
23 days 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
23 days 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?
How to check if a contract has been deployed at a certain address in cairo?
Is there a way to cache context + StarkNet state?
Is Kakarot zkEVM a smart contract or a blockchain?
Any NFT marketplace has launched on starknet L2?
How to verify Empiric’s Data Entries Using Events?
How to check for smaller Uints in Cairo?
Is there optimistic parallelism in StarkNet?