I know using this for send Ether (web3):
web3.eth.sendTransaction({
from: 'Address A',
to: 'Address B',
value: '1000000000000000'
})
.then(function(receipt){
...
});
I'm trying to send ether from address A to address B, then the gas fee is paid by address C for the transaction. Does anyone know about that?
Unlike Bitcoin's raw transaction you create payload with listunspent
, you can't do this for ether in Ethereum.
However you can do this for tokens. Ex: ERC20 Token, you can have address A to approve
address C to spend his/her ERC20 on their behalf. Once the approve
transaction has completed, address C can bear the gas for transferring ERC20 token from address A to address B.
yes it's true I've used a smart contract for something like this (before). But is there any live web3? I'm still learning some of these things