These are chat archives for ethereum/tutorials

21st
May 2018
Joemartine
@Joemartine
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!

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