ETH Price: $3,400.88 (+3.00%)

Contract

0x66a9f1e53173dE33bec727eF76AfA84956aE1B25
 
Transaction Hash
Method
Block
From
To
Update Goo Burn ...117853022021-02-03 19:57:101419 days ago1612382230IN
0x66a9f1e5...956aE1B25
0 ETH0.00486642171.1
Refund Token Pur...117134422021-01-23 18:29:141430 days ago1611426554IN
0x66a9f1e5...956aE1B25
0 ETH0.0046835881
Deposit Eth98664232020-04-13 21:15:571715 days ago1586812557IN
0x66a9f1e5...956aE1B25
4.1 ETH0.000148975.1
Refund Token Pur...87682002019-10-19 0:59:471893 days ago1571446787IN
0x66a9f1e5...956aE1B25
0 ETH0.000145624.1
Increase Token P...87462572019-10-15 13:55:311896 days ago1571147731IN
0x66a9f1e5...956aE1B25
0 ETH0.000133433.1
Refund Token Pur...87462492019-10-15 13:54:081896 days ago1571147648IN
0x66a9f1e5...956aE1B25
0 ETH0.000109053.1
Increase Token P...87462452019-10-15 13:52:321896 days ago1571147552IN
0x66a9f1e5...956aE1B25
0 ETH0.000086533.1
Increase Token P...87075832019-10-09 12:09:261902 days ago1570622966IN
0x66a9f1e5...956aE1B25
0 ETH0.000176474.1
Refund Token Pur...87075772019-10-09 12:08:261902 days ago1570622906IN
0x66a9f1e5...956aE1B25
0 ETH0.000177214.1
Refund Token Pur...87075642019-10-09 12:04:221902 days ago1570622662IN
0x66a9f1e5...956aE1B25
0 ETH0.000206254.1
Increase Token P...87075562019-10-09 12:00:121902 days ago1570622412IN
0x66a9f1e5...956aE1B25
0 ETH0.000114444.1
Increase Token P...87024172019-10-08 16:38:291903 days ago1570552709IN
0x66a9f1e5...956aE1B25
0 ETH0.000176734.1
Refund Token Pur...87023992019-10-08 16:34:321903 days ago1570552472IN
0x66a9f1e5...956aE1B25
0 ETH0.00014224.1
Increase Token P...87023932019-10-08 16:33:211903 days ago1570552401IN
0x66a9f1e5...956aE1B25
0 ETH0.000114444.1
Increase Token P...86908012019-10-06 20:58:021905 days ago1570395482IN
0x66a9f1e5...956aE1B25
0 ETH0.000176734.1
Refund Token Pur...86907922019-10-06 20:56:341905 days ago1570395394IN
0x66a9f1e5...956aE1B25
0 ETH0.000144234.1
Increase Token P...86907852019-10-06 20:55:161905 days ago1570395316IN
0x66a9f1e5...956aE1B25
0 ETH0.000114444.1
Increase Token P...86728422019-10-04 1:54:071908 days ago1570154047IN
0x66a9f1e5...956aE1B25
0 ETH0.000176734.1
Refund Token Pur...86728322019-10-04 1:52:151908 days ago1570153935IN
0x66a9f1e5...956aE1B25
0 ETH0.000145094.1
Increase Token P...86728162019-10-04 1:49:411908 days ago1570153781IN
0x66a9f1e5...956aE1B25
0 ETH0.000086533.1
Increase Token P...86625192019-10-02 11:16:031909 days ago1570014963IN
0x66a9f1e5...956aE1B25
0 ETH0.000172424
Refund Token Pur...86625052019-10-02 11:13:171909 days ago1570014797IN
0x66a9f1e5...956aE1B25
0 ETH0.000577024.1
Increase Token P...86624912019-10-02 11:09:261909 days ago1570014566IN
0x66a9f1e5...956aE1B25
0 ETH0.000114444.1
Increase Token P...86399922019-09-28 22:31:221913 days ago1569709882IN
0x66a9f1e5...956aE1B25
0 ETH0.00069416.1
Refund Token Pur...86399842019-09-28 22:29:551913 days ago1569709795IN
0x66a9f1e5...956aE1B25
0 ETH0.0005584116.1
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
206083902024-08-25 21:48:23120 days ago1724622503
0x66a9f1e5...956aE1B25
0.0000006 ETH
196526542024-04-14 8:43:11253 days ago1713084191
0x66a9f1e5...956aE1B25
0.0001 ETH
170041562023-04-08 14:05:23625 days ago1680962723
0x66a9f1e5...956aE1B25
0.0001 ETH
138596952021-12-23 5:58:581097 days ago1640239138
0x66a9f1e5...956aE1B25
0.15703701 ETH
130574692021-08-19 18:55:011222 days ago1629399301
0x66a9f1e5...956aE1B25
3.10292281 ETH
130574372021-08-19 18:46:551222 days ago1629398815
0x66a9f1e5...956aE1B25
0.96966355 ETH
130573902021-08-19 18:37:081222 days ago1629398228
0x66a9f1e5...956aE1B25
0.00000096 ETH
130571982021-08-19 17:58:451222 days ago1629395925
0x66a9f1e5...956aE1B25
0 ETH
125549502021-06-02 11:58:181300 days ago1622635098
0x66a9f1e5...956aE1B25
0.0004 ETH
125538172021-06-02 8:04:141300 days ago1622621054
0x66a9f1e5...956aE1B25
0.0002 ETH
125536602021-06-02 7:27:101301 days ago1622618830
0x66a9f1e5...956aE1B25
0.0001 ETH
125531132021-06-02 5:18:531301 days ago1622611133
0x66a9f1e5...956aE1B25
0.00079984 ETH
125267772021-05-29 3:17:011305 days ago1622258221
0x66a9f1e5...956aE1B25
0.0000222 ETH
123191292021-04-27 0:18:511337 days ago1619482731
0x66a9f1e5...956aE1B25
0.1454825 ETH
120852182021-03-21 23:53:321373 days ago1616370812
0x66a9f1e5...956aE1B25
0.32495778 ETH
118568072021-02-14 19:50:371408 days ago1613332237
0x66a9f1e5...956aE1B25
0.53461546 ETH
117923872021-02-04 21:58:381418 days ago1612475918
0x66a9f1e5...956aE1B25
47.790347 ETH
117916452021-02-04 19:17:081418 days ago1612466228
0x66a9f1e5...956aE1B25
8.10634698 ETH
117904752021-02-04 15:04:111418 days ago1612451051
0x66a9f1e5...956aE1B25
3.85855853 ETH
117872042021-02-04 2:59:261419 days ago1612407566
0x66a9f1e5...956aE1B25
72.71826205 ETH
117859092021-02-03 22:14:241419 days ago1612390464
0x66a9f1e5...956aE1B25
41.60474715 ETH
117134422021-01-23 18:29:141430 days ago1611426554
0x66a9f1e5...956aE1B25
1.30737814 ETH
116722272021-01-17 10:38:381436 days ago1610879918
0x66a9f1e5...956aE1B25
0.47214067 ETH
115467672020-12-29 4:31:471456 days ago1609216307
0x66a9f1e5...956aE1B25
0.33460591 ETH
111627952020-10-31 5:34:141515 days ago1604122454
0x66a9f1e5...956aE1B25
0.00152692 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Bankroll

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2019-05-05
*/

pragma solidity ^0.4.25;

/**
 * 
 * World War Goo - Competitive Idle Game
 * 
 * https://ethergoo.io
 * 
 */

contract Bankroll {
    
    uint256 public gooPurchaseAllocation; // Wei destined to pay to burn players' goo
    uint256 public tokenPurchaseAllocation; // Wei destined to purchase tokens for clans
    address public owner;
    
    GooBurnAlgo public gooBurner = GooBurnAlgo(0x0);
    Clans clans = Clans(0x0);
    address constant gooToken = address(0xdf0960778c6e6597f197ed9a25f12f5d971da86c);
    event TokenPurchase(address tokenAddress, uint256 tokensBought, uint256 reimbursementWei);
    
    constructor() public {
        owner = msg.sender;
    }
    
    function() payable external {
        // Accepts donations
    }
    
    function setClans(address clansContract) external {
        require(msg.sender == owner);
        clans = Clans(clansContract);
    }
    
    function depositEth(uint256 gooAllocation, uint256 tokenAllocation) payable external {
        require(gooAllocation <= 100);
        require(tokenAllocation <= 100);
        require(gooAllocation + tokenAllocation <= 100);
        
        gooPurchaseAllocation += (msg.value * gooAllocation) / 100;
        tokenPurchaseAllocation += (msg.value * tokenAllocation) / 100;
    }
    
    function updateGooBurnAlgo(address config) external {
        require(msg.sender == owner);
        gooBurner = GooBurnAlgo(config);
    }
    
    // Not entirely trustless but seems only way
    function refundTokenPurchase(uint256 clanId, uint256 tokensAmount, uint256 reimbursement) external {
        require(msg.sender == owner);
        require(tokensAmount > 0);
        require(clans.exists(clanId));
        
        // Transfer tokens
        address tokenAddress = clans.clanToken(clanId);
        require(ERC20(tokenAddress).transferFrom(owner, address(clans), tokensAmount));
        
        // Reimburse purchaser
        require(reimbursement >= tokenPurchaseAllocation);
        tokenPurchaseAllocation -= reimbursement;
        owner.transfer(reimbursement);
        
        // Auditable log
        emit TokenPurchase(tokenAddress, tokensAmount, reimbursement);
    }
    
    function increaseGooPurchaseAllocation(uint256 newAllocation) external {
        require(msg.sender == owner);
        require(newAllocation < (address(this).balance - tokenPurchaseAllocation));
        gooPurchaseAllocation = newAllocation;
    }
    
    function increaseTokenPurchaseAllocation(uint256 newAllocation) external {
        require(msg.sender == owner);
        require(newAllocation < (address(this).balance - gooPurchaseAllocation));
        tokenPurchaseAllocation = newAllocation;
    }
    
    function receiveApproval(address player, uint256 amount, address, bytes) external {
        require(msg.sender == gooToken);
        
        // Calculate payment
        uint256 payment = gooBurner.priceOf(amount);
        require(payment <= gooPurchaseAllocation);
        
        // Burn Goo
        ERC20(msg.sender).transferFrom(player, address(0), amount);
        
        // Send Eth
        gooPurchaseAllocation -= payment;
        player.transfer(payment);
    }
    
}

contract GooBurnAlgo {
    
    Bankroll constant bankroll = Bankroll(0x66a9f1e53173de33bec727ef76afa84956ae1b25);
    GooToken constant goo = GooToken(0xdf0960778c6e6597f197ed9a25f12f5d971da86c);

    address public owner; // Minor Management

    constructor() public {
        owner = msg.sender;
    }
    
    // Initial naive algorithm, splitting (half) eth between totalSupply
    function priceOf(uint256 amount) external view returns(uint256 payment) {
        payment = (bankroll.gooPurchaseAllocation() * amount) / (goo.totalSupply() * 2);
    }
    
    function price() external view returns(uint256 gooPrice) {
        gooPrice = bankroll.gooPurchaseAllocation() / (goo.totalSupply() * 2);
    }
    
}

contract Clans {
    function exists(uint256 clanId) public view returns (bool);
    mapping(uint256 => address) public clanToken; // i.e. BNB
}

contract GooToken {
    function totalSupply() external view returns(uint256);
}

contract ERC20 {
    function transferFrom(address from, address to, uint tokens) external returns (bool success);
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"config","type":"address"}],"name":"updateGooBurnAlgo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gooBurner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newAllocation","type":"uint256"}],"name":"increaseGooPurchaseAllocation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newAllocation","type":"uint256"}],"name":"increaseTokenPurchaseAllocation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"player","type":"address"},{"name":"amount","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"bytes"}],"name":"receiveApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenPurchaseAllocation","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gooPurchaseAllocation","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"clanId","type":"uint256"},{"name":"tokensAmount","type":"uint256"},{"name":"reimbursement","type":"uint256"}],"name":"refundTokenPurchase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gooAllocation","type":"uint256"},{"name":"tokenAllocation","type":"uint256"}],"name":"depositEth","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"clansContract","type":"address"}],"name":"setClans","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenAddress","type":"address"},{"indexed":false,"name":"tokensBought","type":"uint256"},{"indexed":false,"name":"reimbursementWei","type":"uint256"}],"name":"TokenPurchase","type":"event"}]

608060405260038054600160a060020a031990811690915560048054909116905534801561002c57600080fd5b5060028054600160a060020a031916331790556107e88061004e6000396000f3006080604052600436106100ad5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662fc195e81146100af57806324be33a2146100d057806366c985c914610101578063707504a8146101195780638da5cb5b146101315780638f4ffcb114610146578063a3b287b51461017e578063bb17fa9d146101a5578063d22e5b04146101ba578063ed50aeb9146101d8578063f40b26bd146101e6575b005b3480156100bb57600080fd5b506100ad600160a060020a0360043516610207565b3480156100dc57600080fd5b506100e561024d565b60408051600160a060020a039092168252519081900360200190f35b34801561010d57600080fd5b506100ad60043561025c565b34801561012557600080fd5b506100ad600435610289565b34801561013d57600080fd5b506100e56102b6565b34801561015257600080fd5b506100ad60048035600160a060020a0390811691602480359260443516916064359182019101356102c5565b34801561018a57600080fd5b50610193610471565b60408051918252519081900360200190f35b3480156101b157600080fd5b50610193610477565b3480156101c657600080fd5b506100ad60043560243560443561047d565b6100ad600435602435610729565b3480156101f257600080fd5b506100ad600160a060020a0360043516610776565b600254600160a060020a0316331461021e57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600354600160a060020a031681565b600254600160a060020a0316331461027357600080fd5b600154303103811061028457600080fd5b600055565b600254600160a060020a031633146102a057600080fd5b60005430310381106102b157600080fd5b600155565b600254600160a060020a031681565b60003373df0960778c6e6597f197ed9a25f12f5d971da86c146102e757600080fd5b600354604080517fb9186d7d000000000000000000000000000000000000000000000000000000008152600481018890529051600160a060020a039092169163b9186d7d916024808201926020929091908290030181600087803b15801561034e57600080fd5b505af1158015610362573d6000803e3d6000fd5b505050506040513d602081101561037857600080fd5b505160005490915081111561038c57600080fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a038816600482015260006024820181905260448201889052915133926323b872dd92606480820193602093909283900390910190829087803b1580156103ff57600080fd5b505af1158015610413573d6000803e3d6000fd5b505050506040513d602081101561042957600080fd5b5050600080548290038155604051600160a060020a0388169183156108fc02918491818181858888f19350505050158015610468573d6000803e3d6000fd5b50505050505050565b60015481565b60005481565b600254600090600160a060020a0316331461049757600080fd5b600083116104a457600080fd5b60048054604080517f4f558e7900000000000000000000000000000000000000000000000000000000815292830187905251600160a060020a0390911691634f558e799160248083019260209291908290030181600087803b15801561050957600080fd5b505af115801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051151561054057600080fd5b60048054604080517f1c2d699800000000000000000000000000000000000000000000000000000000815292830187905251600160a060020a0390911691631c2d69989160248083019260209291908290030181600087803b1580156105a557600080fd5b505af11580156105b9573d6000803e3d6000fd5b505050506040513d60208110156105cf57600080fd5b505160025460048054604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039485169381019390935290831660248301526044820187905251929350908316916323b872dd916064808201926020929091908290030181600087803b15801561065057600080fd5b505af1158015610664573d6000803e3d6000fd5b505050506040513d602081101561067a57600080fd5b5051151561068757600080fd5b60015482101561069657600080fd5b600180548390039055600254604051600160a060020a039091169083156108fc029084906000818181858888f193505050501580156106d9573d6000803e3d6000fd5b5060408051600160a060020a03831681526020810185905280820184905290517fcd60aa75dea3072fbc07ae6d7d856b5dc5f4eee88854f5b4abf7b680ef8bc50f9181900360600190a150505050565b606482111561073757600080fd5b606481111561074557600080fd5b6064828201111561075557600080fd5b60008054606434948502819004909101909155600180549290930204019055565b600254600160a060020a0316331461078d57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058202e4df2c15683bc430d362d3fa2b9812ee64b74d8b7c96d1028e098acba20e83e0029

Deployed Bytecode

0x6080604052600436106100ad5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041662fc195e81146100af57806324be33a2146100d057806366c985c914610101578063707504a8146101195780638da5cb5b146101315780638f4ffcb114610146578063a3b287b51461017e578063bb17fa9d146101a5578063d22e5b04146101ba578063ed50aeb9146101d8578063f40b26bd146101e6575b005b3480156100bb57600080fd5b506100ad600160a060020a0360043516610207565b3480156100dc57600080fd5b506100e561024d565b60408051600160a060020a039092168252519081900360200190f35b34801561010d57600080fd5b506100ad60043561025c565b34801561012557600080fd5b506100ad600435610289565b34801561013d57600080fd5b506100e56102b6565b34801561015257600080fd5b506100ad60048035600160a060020a0390811691602480359260443516916064359182019101356102c5565b34801561018a57600080fd5b50610193610471565b60408051918252519081900360200190f35b3480156101b157600080fd5b50610193610477565b3480156101c657600080fd5b506100ad60043560243560443561047d565b6100ad600435602435610729565b3480156101f257600080fd5b506100ad600160a060020a0360043516610776565b600254600160a060020a0316331461021e57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600354600160a060020a031681565b600254600160a060020a0316331461027357600080fd5b600154303103811061028457600080fd5b600055565b600254600160a060020a031633146102a057600080fd5b60005430310381106102b157600080fd5b600155565b600254600160a060020a031681565b60003373df0960778c6e6597f197ed9a25f12f5d971da86c146102e757600080fd5b600354604080517fb9186d7d000000000000000000000000000000000000000000000000000000008152600481018890529051600160a060020a039092169163b9186d7d916024808201926020929091908290030181600087803b15801561034e57600080fd5b505af1158015610362573d6000803e3d6000fd5b505050506040513d602081101561037857600080fd5b505160005490915081111561038c57600080fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a038816600482015260006024820181905260448201889052915133926323b872dd92606480820193602093909283900390910190829087803b1580156103ff57600080fd5b505af1158015610413573d6000803e3d6000fd5b505050506040513d602081101561042957600080fd5b5050600080548290038155604051600160a060020a0388169183156108fc02918491818181858888f19350505050158015610468573d6000803e3d6000fd5b50505050505050565b60015481565b60005481565b600254600090600160a060020a0316331461049757600080fd5b600083116104a457600080fd5b60048054604080517f4f558e7900000000000000000000000000000000000000000000000000000000815292830187905251600160a060020a0390911691634f558e799160248083019260209291908290030181600087803b15801561050957600080fd5b505af115801561051d573d6000803e3d6000fd5b505050506040513d602081101561053357600080fd5b5051151561054057600080fd5b60048054604080517f1c2d699800000000000000000000000000000000000000000000000000000000815292830187905251600160a060020a0390911691631c2d69989160248083019260209291908290030181600087803b1580156105a557600080fd5b505af11580156105b9573d6000803e3d6000fd5b505050506040513d60208110156105cf57600080fd5b505160025460048054604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a039485169381019390935290831660248301526044820187905251929350908316916323b872dd916064808201926020929091908290030181600087803b15801561065057600080fd5b505af1158015610664573d6000803e3d6000fd5b505050506040513d602081101561067a57600080fd5b5051151561068757600080fd5b60015482101561069657600080fd5b600180548390039055600254604051600160a060020a039091169083156108fc029084906000818181858888f193505050501580156106d9573d6000803e3d6000fd5b5060408051600160a060020a03831681526020810185905280820184905290517fcd60aa75dea3072fbc07ae6d7d856b5dc5f4eee88854f5b4abf7b680ef8bc50f9181900360600190a150505050565b606482111561073757600080fd5b606481111561074557600080fd5b6064828201111561075557600080fd5b60008054606434948502819004909101909155600180549290930204019055565b600254600160a060020a0316331461078d57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a723058202e4df2c15683bc430d362d3fa2b9812ee64b74d8b7c96d1028e098acba20e83e0029

Swarm Source

bzzr://2e4df2c15683bc430d362d3fa2b9812ee64b74d8b7c96d1028e098acba20e83e

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.