Skip to content

Instantly share code, notes, and snippets.

@naterush
Created June 4, 2017 18:54
Show Gist options
  • Save naterush/ab172a26946ada6712db2e76c64b11a8 to your computer and use it in GitHub Desktop.
Save naterush/ab172a26946ada6712db2e76c64b11a8 to your computer and use it in GitHub Desktop.
This contract allows users to keep their gas price very low while still effectively paying miners. This would allow users to circumnavigate any imposed gas price maximums.
pragma solidity ^0.4.10;
contract AcceptMyTx {
function forwardTransaction(address destination, bytes data, uint amountToMiner) payable {
block.coinbase.transfer(amountToMiner);
destination.call.value(msg.value - amountToMiner)(data); //even in case of failure, miner is paid
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment