ERC-20
Overview
Max Total Supply
21,000,000,000 BAI
Holders
11,006
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
54,111 BAIValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BAI20
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-03-07 */ pragma solidity ^0.4.18; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } /* You should inherit from TokenBase. This implements ONLY the standard functions obeys ERC20, and NOTHING else. If you deploy this, you won't have anything useful. Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20 .*/ contract ERC20 { /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant public returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant public returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract TokenBase is ERC20 { function transfer(address _to, uint256 _value) public returns (bool success) { // Prevent transfer to 0x0 address. require(_to != 0x0); // Check if the sender has enough require(balances[msg.sender] >= _value); // Check for overflows require(balances[_to] + _value > balances[_to]); uint previousBalances = balances[msg.sender] + balances[_to]; balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balances[msg.sender] + balances[_to] == previousBalances); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { /// same as above require(_to != 0x0); require(balances[_from] >= _value); require(balances[_to] + _value > balances[_to]); uint previousBalances = balances[_from] + balances[_to]; balances[_from] -= _value; balances[_to] += _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); assert(balances[_from] + balances[_to] == previousBalances); return true; } function balanceOf(address _owner) constant public returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) public returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping (address => uint256) balances; /// balance amount of tokens for address mapping (address => mapping (address => uint256)) allowed; } contract BAI20 is TokenBase { function () payable public { //if ether is sent to this address, send it back. //throw; require(false); } string public constant name = "BAI2.0"; string public constant symbol = "BAI"; uint256 private constant _INITIAL_SUPPLY = 21000000000; uint8 public decimals = 18; uint256 public totalSupply; string public version = "BAI2.0"; function BAI20( ) public { // init totalSupply = _INITIAL_SUPPLY * 10 ** 18; balances[msg.sender] = totalSupply; } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"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":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"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":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
606060409081526003805460ff191660121790558051908101604052600681527f424149322e30000000000000000000000000000000000000000000000000000060208201526005908051610058929160200190610094565b50341561006457600080fd5b6b43dacaf91c1a84ff080000006004819055600160a060020a03331660009081526001602052604090205561012f565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100d557805160ff1916838001178555610102565b82800160010185558215610102579182015b828111156101025782518255916020019190600101906100e7565b5061010e929150610112565b5090565b61012c91905b8082111561010e5760008155600101610118565b90565b6108358061013e6000396000f3006060604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017357806323b872dd14610198578063313ce567146101c057806354fd4d50146101e957806370a08231146101fc57806395d89b411461021b578063a9059cbb1461022e578063cae9ca5114610250578063dd62ed3e146102b5575b600080fd5b34156100be57600080fd5b6100c66102da565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101025780820151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b61015f600160a060020a0360043516602435610311565b604051901515815260200160405180910390f35b341561017e57600080fd5b61018661037d565b60405190815260200160405180910390f35b34156101a357600080fd5b61015f600160a060020a0360043581169060243516604435610383565b34156101cb57600080fd5b6101d36104aa565b60405160ff909116815260200160405180910390f35b34156101f457600080fd5b6100c66104b3565b341561020757600080fd5b610186600160a060020a0360043516610551565b341561022657600080fd5b6100c661056c565b341561023957600080fd5b61015f600160a060020a03600435166024356105a3565b341561025b57600080fd5b61015f60048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506106b095505050505050565b34156102c057600080fd5b610186600160a060020a03600435811690602435166107de565b60408051908101604052600681527f424149322e300000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60045481565b600080600160a060020a038416151561039b57600080fd5b600160a060020a038516600090815260016020526040902054839010156103c157600080fd5b600160a060020a038416600090815260016020526040902054838101116103e757600080fd5b50600160a060020a03838116600081815260016020908152604080832080548a871680865283862080548b810390915583548b0190935560028552838620339098168652969093529281902080548890039055910192907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600160a060020a0380851660009081526001602052604080822054928816825290205401811461049d57fe5b600191505b509392505050565b60035460ff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105495780601f1061051e57610100808354040283529160200191610549565b820191906000526020600020905b81548152906001019060200180831161052c57829003601f168201915b505050505081565b600160a060020a031660009081526001602052604090205490565b60408051908101604052600381527f4241490000000000000000000000000000000000000000000000000000000000602082015281565b600080600160a060020a03841615156105bb57600080fd5b600160a060020a033316600090815260016020526040902054839010156105e157600080fd5b600160a060020a0384166000908152600160205260409020548381011161060757600080fd5b50600160a060020a038084166000818152600160205260408082208054339095168084528284208054898103909155938590528154880190915591909301927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600160a060020a03808516600090815260016020526040808220543390931682529020540181146106a657fe5b5060019392505050565b6000836106bd8185610311565b156104a25780600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561077357808201518382015260200161075b565b50505050905090810190601f1680156107a05780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15156107c157600080fd5b6102c65a03f115156107d257600080fd5b505050600191506104a2565b600160a060020a039182166000908152600260209081526040808320939094168252919091522054905600a165627a7a7230582052b148a845e779bbb1fca45d1187a06dc5dd2b782bb3f12e06227e50aa1979c10029
Deployed Bytecode
0x6060604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017357806323b872dd14610198578063313ce567146101c057806354fd4d50146101e957806370a08231146101fc57806395d89b411461021b578063a9059cbb1461022e578063cae9ca5114610250578063dd62ed3e146102b5575b600080fd5b34156100be57600080fd5b6100c66102da565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101025780820151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b61015f600160a060020a0360043516602435610311565b604051901515815260200160405180910390f35b341561017e57600080fd5b61018661037d565b60405190815260200160405180910390f35b34156101a357600080fd5b61015f600160a060020a0360043581169060243516604435610383565b34156101cb57600080fd5b6101d36104aa565b60405160ff909116815260200160405180910390f35b34156101f457600080fd5b6100c66104b3565b341561020757600080fd5b610186600160a060020a0360043516610551565b341561022657600080fd5b6100c661056c565b341561023957600080fd5b61015f600160a060020a03600435166024356105a3565b341561025b57600080fd5b61015f60048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506106b095505050505050565b34156102c057600080fd5b610186600160a060020a03600435811690602435166107de565b60408051908101604052600681527f424149322e300000000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60045481565b600080600160a060020a038416151561039b57600080fd5b600160a060020a038516600090815260016020526040902054839010156103c157600080fd5b600160a060020a038416600090815260016020526040902054838101116103e757600080fd5b50600160a060020a03838116600081815260016020908152604080832080548a871680865283862080548b810390915583548b0190935560028552838620339098168652969093529281902080548890039055910192907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600160a060020a0380851660009081526001602052604080822054928816825290205401811461049d57fe5b600191505b509392505050565b60035460ff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105495780601f1061051e57610100808354040283529160200191610549565b820191906000526020600020905b81548152906001019060200180831161052c57829003601f168201915b505050505081565b600160a060020a031660009081526001602052604090205490565b60408051908101604052600381527f4241490000000000000000000000000000000000000000000000000000000000602082015281565b600080600160a060020a03841615156105bb57600080fd5b600160a060020a033316600090815260016020526040902054839010156105e157600080fd5b600160a060020a0384166000908152600160205260409020548381011161060757600080fd5b50600160a060020a038084166000818152600160205260408082208054339095168084528284208054898103909155938590528154880190915591909301927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600160a060020a03808516600090815260016020526040808220543390931682529020540181146106a657fe5b5060019392505050565b6000836106bd8185610311565b156104a25780600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561077357808201518382015260200161075b565b50505050905090810190601f1680156107a05780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15156107c157600080fd5b6102c65a03f115156107d257600080fd5b505050600191506104a2565b600160a060020a039182166000908152600260209081526040808320939094168252919091522054905600a165627a7a7230582052b148a845e779bbb1fca45d1187a06dc5dd2b782bb3f12e06227e50aa1979c10029
Swarm Source
bzzr://52b148a845e779bbb1fca45d1187a06dc5dd2b782bb3f12e06227e50aa1979c1
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.