Hi, I have a function that calls “call” to transfer ETH from the sender. I need to call it from NodeJS. I’m trying to use Alchemy. I can get the contract with
const myContract = new ethers.Contract(CONTRACT_ADDRESS, contract.abi, signer);
What do I need to do after? Do I need to sign it as a transaction and send the signed transaction somehow? I thought of
const tx = await myContract.funcThatTransfersETH(toAddress, amount, otherThingsMaybe);
How does the sender sign and send this transaction after? Does the amount to transfer go in the JS transaction AND within the contract function? Any sample JS/NodeJS code? Thanks

Dec 17, 2021, 4:18 AM
Look at the ethers guides they spell it out there in their documentation
Ya, prettt complicated
Dec 17, 2021, 8:02 AM

© 2024 Draquery.com All rights reserved.