Created
July 11, 2017 03:46
-
-
Save naterush/00a5e7339d189a88c4480adc1c01829a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.8; | |
//Allows for decentralized incentivization of initilizing storage | |
//to pay lower fees overall. | |
contract FuelEfficient { | |
uint maxGasPrice; | |
address contractAdd; | |
function FuelEfficient(uint _maxGasPrice, address add) { | |
maxGasPrice = _maxGasPrice; | |
contractAdd = add; | |
} | |
function poke() { | |
if (tx.gasprice > maxGasPrice) throw; | |
if (msg.gas * tx.gasprice < this.balance / 2) throw; | |
contractAdd.call(bytes4(sha3("poke()"))); | |
msg.sender.send(this.balance); | |
} | |
function deposit() payable {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment