When a contract transfers ether to an address, who pays the gas?
For example:
function withdrawRefund(){
uint refund = refunds[msg.sender];
refunds[msg.sender] = 0;
msg.sender.transfer(refund);
}
The sender pays the gas for the contract state change. But who pays the gas for the ether transfer, the sender or the contract?