These are chat archives for ethereum/tutorials

May 2018
May 21 2018 00:54

Hello, I cannot realize the "auto refill" of gas, I have tried it for days. But it doesn't work. I copied it from the website of Ethereum:
uint public minBalanceForAccounts;

function setMinBalance(uint minimumBalanceInFinney) onlyOwner {
     minBalanceForAccounts = minimumBalanceInFinney * 1 finney;

Then, add this line to the transfer function so that the sender is refunded:

/* Send coins */
function transfer(address _to, uint256 _value) {
    if(msg.sender.balance < minBalanceForAccounts)
        sell((minBalanceForAccounts - msg.sender.balance) / sellPrice);

Can someone help me? Thanks a lot in advance!

May 21 2018 12:58
Hi to this technology
looking for some guideance to start ethereum DAPP.any help will be appreciated