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?
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