0

I want to create a smart contract that automatically transfers certain amount of ether from my wallet to a receivers wallet every 30 mins. However I fail to understand how will the transaction gas fee be deducted. Do I need to keep some ether in my smart contract address. Will the transaction fee be auto deducted from the ether that is deposited in the Contract address during the transfer?

1 Answer 1

1

Storing ETH in Smart contract won't help you pay gas fees but instead having Private key stored in .env file and signing transaction with it, that way fees will be deducted from the wallet whose private key you're using.

Additionally, there is no way to automate transaction of a smart contract without using external backend like NodeJs where you can use can call transfer function every 30 minutes using web3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.