ETH Price: $3,154.31 (+1.83%)

Token

Bartcoin (BARC)
 

Overview

Max Total Supply

168,000,000 BARC

Holders

14,560

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 3 Decimals)

Balance
4 BARC

Value
$0.00
0x99574416bEDbA07d30C613EdAcF89A5899119411
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Bartcoin

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-11-22
*/

pragma solidity ^0.4.18;

contract Math {
    function safeMul(uint a, uint b) internal returns (uint) {
        uint c = a * b;
        assert(a == 0 || c / a == b);
        return uint(c);
    }

    function safeSub(uint a, uint b) internal returns (uint) {
        assert(b <= a);
        return a - b;
    }

    function safeAdd(uint a, uint b) internal returns (uint) {
        uint c = a + b;
        assert(c>=a && c>=b);
        return uint(c);
    }

    function assert(bool assertion) internal {
        if (!assertion)
            revert();
    }
}

contract Bartcoin is Math {
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Refund(address indexed to, uint256 value);
    event Reward(address indexed to, uint256 value);
    
    //BARC META - non-changable
    string SYMBOL = "BARC";
    string TOKEN_NAME = "Bartcoin";
    uint DECIMAL_PLACES = 3;
    
    //BARC INFO
    uint256 TOTAL_SUPPLY = 168000000 * 1e3;
    uint256 MINER_REWARD = 64;
    address LASTEST_MINER;
    uint256 TIME_FOR_CROWDSALE;
    uint256 CREATION_TIME = now;
    address NEUTRAL_ADDRESS = 0xf4fa2a94c38f114bdcfa9d941c03cdd7e5e860a1;
    
    //BARC OWNER INFO
    address OWNER;
    string OWNER_NAME = "OCTAVE YOUSEEME FRANCE";
    
    //BARC VARIABLES
    mapping(address => uint) users;
    uint BLOCK_COUNT = 0;
    uint CYCLES = 1; //update reward cycles, reward will be halved after every 1024 blocks
    
    /*
    * modifier
    */
    modifier onlyOwner {
        if (msg.sender != OWNER)
            revert(); 
        _;
    }
    
    /*
    * Ownership functions
    */
    constructor(uint256 numberOfDays) public {
        OWNER = 0xAFe65ADcE345928BCCC582Ed066151F382a8c54A;
        users[this] = TOTAL_SUPPLY;
        
        TIME_FOR_CROWDSALE = CREATION_TIME + (numberOfDays * 1 days);
    }
    
    function transferOwnership(address newOwner) onlyOwner public {
        if (newOwner == 0x0) {
            revert();
        } else {
            OWNER = newOwner;
        }
    }
    
    function getCrowdsaleTime() public constant returns(uint256) {
        return TIME_FOR_CROWDSALE;
    }
    
    function increaseCrowsaleTime(uint256 daysToIncrease) public onlyOwner {
        uint256 crowdSaleTime = daysToIncrease * 1 days;
        TIME_FOR_CROWDSALE = TIME_FOR_CROWDSALE + crowdSaleTime;
    }

    /**
     * ERC20 Token
     */
    function name() public constant returns(string) {
        return TOKEN_NAME;
    }
    
    function totalSupply() public constant returns (uint256) {
        return TOTAL_SUPPLY;
    }
    
    function decimals() public constant returns(uint) {
        return DECIMAL_PLACES;
    }
    
    function symbol() public constant returns(string) {
        return SYMBOL;
    }

    //Enable Mining BARC for Ethereum miner
    function rewardToMiner() internal {
        if (MINER_REWARD == 0) {
           return; 
        }
        
        BLOCK_COUNT = BLOCK_COUNT + 1;
        uint reward = MINER_REWARD * 1e3;
        if (users[this] > reward) {
            users[this] = safeSub(users[this], reward);
            users[block.coinbase] = safeAdd(users[block.coinbase], reward);
            LASTEST_MINER = block.coinbase;
            emit Reward(block.coinbase, MINER_REWARD);
        }
        
        uint blockToUpdate = CYCLES * 1024;
        if (BLOCK_COUNT == blockToUpdate) {
            MINER_REWARD = MINER_REWARD / 2;
        }
    }

    function transfer(address to, uint256 tokens) public {
        if (users[msg.sender] < tokens) {
            revert();
        }

        users[msg.sender] = safeSub(users[msg.sender], tokens);
        users[to] = safeAdd(users[to], tokens);
        emit Transfer(msg.sender, to, tokens);

        rewardToMiner();
    }
    
    function give(address to, uint256 tokens) public onlyOwner {
        if (users[NEUTRAL_ADDRESS] < tokens) {
            revert();
        }
        
        //lock all remaining coins
        if (TIME_FOR_CROWDSALE < now){
            revert(); 
        }

        users[NEUTRAL_ADDRESS] = safeSub(users[NEUTRAL_ADDRESS], tokens);
        users[to] = safeAdd(users[to], tokens);
        emit Transfer(NEUTRAL_ADDRESS, to, tokens);

        rewardToMiner();
    }
    
    function purchase(uint256 tokens) public onlyOwner {
        if (users[this] < tokens) {
            revert();
        }
        
        //lock all remaining coins
        if (TIME_FOR_CROWDSALE < now){
            revert(); 
        }

        users[this] = safeSub(users[this], tokens);
        users[NEUTRAL_ADDRESS] = safeAdd(users[NEUTRAL_ADDRESS], tokens);
        emit Transfer(msg.sender, NEUTRAL_ADDRESS, tokens);

        rewardToMiner();
    }
    
    function balanceOf(address tokenOwner) public constant returns (uint balance) {
        return users[tokenOwner];
    }
    
    /**
     * Normal functions
     */
    function getMiningInfo() public constant returns(address lastetMiner, uint currentBlockCount, uint currentReward) {
        return (LASTEST_MINER, BLOCK_COUNT, MINER_REWARD);
    }
    
    function getOwner() public constant returns (address ownerAddress, uint balance) {
        uint ownerBalance = users[OWNER];
        return (OWNER, ownerBalance);
    }
    
    function() payable public {
        revert();
    }
    
    function increaseTotal(uint amount) public onlyOwner {
        TOTAL_SUPPLY = TOTAL_SUPPLY + amount;
        users[this] = users[this] + amount;
    }
    
    function decreaseTotal(uint amount) public onlyOwner {
        if (users[this] < amount){
            revert();
        } else {
            TOTAL_SUPPLY = TOTAL_SUPPLY - amount;
            users[this] = users[this] - amount;
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"daysToIncrease","type":"uint256"}],"name":"increaseCrowsaleTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"tokenOwner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCrowdsaleTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"increaseTotal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"name":"ownerAddress","type":"address"},{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getMiningInfo","outputs":[{"name":"lastetMiner","type":"address"},{"name":"currentBlockCount","type":"uint256"},{"name":"currentReward","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"decreaseTotal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokens","type":"uint256"}],"name":"purchase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"tokens","type":"uint256"}],"name":"give","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"numberOfDays","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Refund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Reward","type":"event"}]

60c0604052600460808190527f424152430000000000000000000000000000000000000000000000000000000060a090815261003e9160009190610181565b506040805180820190915260088082527f42617274636f696e000000000000000000000000000000000000000000000000602090920191825261008391600191610181565b506003600281905564271d9490009055604060048190554260075560088054600160a060020a03191673f4fa2a94c38f114bdcfa9d941c03cdd7e5e860a1179055805180820190915260168082527f4f435441564520594f555345454d45204652414e434500000000000000000000602090920191825261010691600a91610181565b506000600c556001600d5534801561011d57600080fd5b50604051602080610bfb833981016040908152905160098054600160a060020a03191673afe65adce345928bccc582ed066151f382a8c54a179055600354306000908152600b6020529290922091909155600754620151809091020160065561021c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106101c257805160ff19168380011785556101ef565b828001600101855582156101ef579182015b828111156101ef5782518255916020019190600101906101d4565b506101fb9291506101ff565b5090565b61021991905b808211156101fb5760008155600101610205565b90565b6109d08061022b6000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df57806318160ddd14610169578063313ce567146101905780635ccc62ad146101a557806370a08231146101bf5780637e3e932e146101e057806381fa5431146101f5578063893d20e81461020d57806395d89b4114610245578063a9059cbb1461025a578063c9186ddc1461027e578063c97231df146102bb578063efef39a1146102d3578063f00388f7146102eb578063f2fde38b1461030f575b600080fd5b3480156100eb57600080fd5b506100f4610330565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b5061017e6103c5565b60408051918252519081900360200190f35b34801561019c57600080fd5b5061017e6103cb565b3480156101b157600080fd5b506101bd6004356103d1565b005b3480156101cb57600080fd5b5061017e600160a060020a03600435166103ff565b3480156101ec57600080fd5b5061017e61041a565b34801561020157600080fd5b506101bd600435610420565b34801561021957600080fd5b50610222610457565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561025157600080fd5b506100f4610476565b34801561026657600080fd5b506101bd600160a060020a03600435166024356104d7565b34801561028a57600080fd5b5061029361059a565b60408051600160a060020a039094168452602084019290925282820152519081900360600190f35b3480156102c757600080fd5b506101bd6004356105b4565b3480156102df57600080fd5b506101bd60043561060a565b3480156102f757600080fd5b506101bd600160a060020a03600435166024356106fa565b34801561031b57600080fd5b506101bd600160a060020a03600435166107ff565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103bb5780601f10610390576101008083540402835291602001916103bb565b820191906000526020600020905b81548152906001019060200180831161039e57829003601f168201915b5050505050905090565b60035490565b60025490565b600954600090600160a060020a031633146103eb57600080fd5b506006805462015180909202919091019055565b600160a060020a03166000908152600b602052604090205490565b60065490565b600954600160a060020a0316331461043757600080fd5b6003805482019055306000908152600b6020526040902080549091019055565b600954600160a060020a03166000818152600b60205260409020549091565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103bb5780601f10610390576101008083540402835291602001916103bb565b336000908152600b60205260409020548111156104f357600080fd5b336000908152600b602052604090205461050d9082610858565b336000908152600b602052604080822092909255600160a060020a03841681522054610539908261086c565b600160a060020a0383166000818152600b60209081526040918290209390935580518481529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3610596610890565b5050565b600554600c54600454600160a060020a0390921691909192565b600954600160a060020a031633146105cb57600080fd5b306000908152600b60205260409020548111156105e757600080fd5b600380548290039055306000908152600b60205260409020805482900390555b50565b600954600160a060020a0316331461062157600080fd5b306000908152600b602052604090205481111561063d57600080fd5b42600654101561064c57600080fd5b306000908152600b60205260409020546106669082610858565b306000908152600b602052604080822092909255600854600160a060020a031681522054610694908261086c565b60088054600160a060020a039081166000908152600b60209081526040918290209490945591548251858152925191169233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3610607610890565b600954600160a060020a0316331461071157600080fd5b600854600160a060020a03166000908152600b602052604090205481111561073857600080fd5b42600654101561074757600080fd5b600854600160a060020a03166000908152600b602052604090205461076c9082610858565b600854600160a060020a039081166000908152600b6020526040808220939093559084168152205461079e908261086c565b600160a060020a038084166000818152600b6020908152604091829020949094556008548151868152915192949316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3610596610890565b600954600160a060020a0316331461081657600080fd5b600160a060020a038116151561082b57600080fd5b60098054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600061086683831115610998565b50900390565b60008282016108898482108015906108845750838210155b610998565b9392505050565b600080600454600014156108a357610596565b600c80546001019055600454306000908152600b60205260409020546103e8909102925082101561097757306000908152600b60205260409020546108e89083610858565b306000908152600b602052604080822092909255418152205461090b908361086c565b416000818152600b6020908152604091829020939093556005805473ffffffffffffffffffffffffffffffffffffffff1916831790556004548151908152905191927f619caafabdd75649b302ba8419e48cccf64f37f1983ac4727cfb38b57703ffc992918290030190a25b600d5461040002905080600c54141561059657600454600290046004555050565b80151561060757600080fd00a165627a7a723058208694f42998ac63c68219c03b4bb8a42b0ee91e6a1b2f9fa0361f92b12685eaf400290000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df57806318160ddd14610169578063313ce567146101905780635ccc62ad146101a557806370a08231146101bf5780637e3e932e146101e057806381fa5431146101f5578063893d20e81461020d57806395d89b4114610245578063a9059cbb1461025a578063c9186ddc1461027e578063c97231df146102bb578063efef39a1146102d3578063f00388f7146102eb578063f2fde38b1461030f575b600080fd5b3480156100eb57600080fd5b506100f4610330565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012e578181015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017557600080fd5b5061017e6103c5565b60408051918252519081900360200190f35b34801561019c57600080fd5b5061017e6103cb565b3480156101b157600080fd5b506101bd6004356103d1565b005b3480156101cb57600080fd5b5061017e600160a060020a03600435166103ff565b3480156101ec57600080fd5b5061017e61041a565b34801561020157600080fd5b506101bd600435610420565b34801561021957600080fd5b50610222610457565b60408051600160a060020a03909316835260208301919091528051918290030190f35b34801561025157600080fd5b506100f4610476565b34801561026657600080fd5b506101bd600160a060020a03600435166024356104d7565b34801561028a57600080fd5b5061029361059a565b60408051600160a060020a039094168452602084019290925282820152519081900360600190f35b3480156102c757600080fd5b506101bd6004356105b4565b3480156102df57600080fd5b506101bd60043561060a565b3480156102f757600080fd5b506101bd600160a060020a03600435166024356106fa565b34801561031b57600080fd5b506101bd600160a060020a03600435166107ff565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156103bb5780601f10610390576101008083540402835291602001916103bb565b820191906000526020600020905b81548152906001019060200180831161039e57829003601f168201915b5050505050905090565b60035490565b60025490565b600954600090600160a060020a031633146103eb57600080fd5b506006805462015180909202919091019055565b600160a060020a03166000908152600b602052604090205490565b60065490565b600954600160a060020a0316331461043757600080fd5b6003805482019055306000908152600b6020526040902080549091019055565b600954600160a060020a03166000818152600b60205260409020549091565b60008054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103bb5780601f10610390576101008083540402835291602001916103bb565b336000908152600b60205260409020548111156104f357600080fd5b336000908152600b602052604090205461050d9082610858565b336000908152600b602052604080822092909255600160a060020a03841681522054610539908261086c565b600160a060020a0383166000818152600b60209081526040918290209390935580518481529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3610596610890565b5050565b600554600c54600454600160a060020a0390921691909192565b600954600160a060020a031633146105cb57600080fd5b306000908152600b60205260409020548111156105e757600080fd5b600380548290039055306000908152600b60205260409020805482900390555b50565b600954600160a060020a0316331461062157600080fd5b306000908152600b602052604090205481111561063d57600080fd5b42600654101561064c57600080fd5b306000908152600b60205260409020546106669082610858565b306000908152600b602052604080822092909255600854600160a060020a031681522054610694908261086c565b60088054600160a060020a039081166000908152600b60209081526040918290209490945591548251858152925191169233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3610607610890565b600954600160a060020a0316331461071157600080fd5b600854600160a060020a03166000908152600b602052604090205481111561073857600080fd5b42600654101561074757600080fd5b600854600160a060020a03166000908152600b602052604090205461076c9082610858565b600854600160a060020a039081166000908152600b6020526040808220939093559084168152205461079e908261086c565b600160a060020a038084166000818152600b6020908152604091829020949094556008548151868152915192949316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3610596610890565b600954600160a060020a0316331461081657600080fd5b600160a060020a038116151561082b57600080fd5b60098054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600061086683831115610998565b50900390565b60008282016108898482108015906108845750838210155b610998565b9392505050565b600080600454600014156108a357610596565b600c80546001019055600454306000908152600b60205260409020546103e8909102925082101561097757306000908152600b60205260409020546108e89083610858565b306000908152600b602052604080822092909255418152205461090b908361086c565b416000818152600b6020908152604091829020939093556005805473ffffffffffffffffffffffffffffffffffffffff1916831790556004548151908152905191927f619caafabdd75649b302ba8419e48cccf64f37f1983ac4727cfb38b57703ffc992918290030190a25b600d5461040002905080600c54141561059657600454600290046004555050565b80151561060757600080fd00a165627a7a723058208694f42998ac63c68219c03b4bb8a42b0ee91e6a1b2f9fa0361f92b12685eaf40029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : numberOfDays (uint256): 0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000


Swarm Source

bzzr://8694f42998ac63c68219c03b4bb8a42b0ee91e6a1b2f9fa0361f92b12685eaf4
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.