Address Contract Partially Verified
Address
0xd8E1C43a29dC0311dcaDBacCc8C3b677CD462a1b
Balance
0 ETH
Nonce
1
Code Size
3121 bytes
Creator
0x262eC763...9537 at tx 0x716f0ec9...93bb88
Indexed Transactions
0 (1 on-chain, <1% indexed)
Contract Bytecode
3121 bytes
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a2578063cae9ca5111610071578063cae9ca51146102f6578063d493b9ac1461037b578063d73dd623146103b1578063dd62ed3e146103dd578063f2fde38b1461040b5761010b565b806370a08231146102785780638da5cb5b1461029e57806395d89b41146102c2578063a9059cbb146102ca5761010b565b8063313ce567116100de578063313ce5671461021d578063378dc3dc1461022557806342966c681461022d578063661884631461024c5761010b565b806306fdde0314610110578063095ea7b31461018d57806318160ddd146101cd57806323b872dd146101e7575b600080fd5b610118610431565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015257818101518382015260200161013a565b50505050905090810190601f16801561017f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101b9600480360360408110156101a357600080fd5b506001600160a01b038135169060200135610456565b604080519115158252519081900360200190f35b6101d56104bc565b60408051918252519081900360200190f35b6101b9600480360360608110156101fd57600080fd5b506001600160a01b038135811691602081013590911690604001356104c2565b6101d56105f7565b6101d56105fc565b61024a6004803603602081101561024357600080fd5b503561060b565b005b6101b96004803603604081101561026257600080fd5b506001600160a01b038135169060200135610708565b6101d56004803603602081101561028e57600080fd5b50356001600160a01b03166107f8565b6102a6610813565b604080516001600160a01b039092168252519081900360200190f35b610118610822565b6101b9600480360360408110156102e057600080fd5b506001600160a01b038135169060200135610841565b6101b96004803603606081101561030c57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561033c57600080fd5b82018360208201111561034e57600080fd5b8035906020019184600183028401116401000000008311171561037057600080fd5b50909250905061091d565b61024a6004803603606081101561039157600080fd5b506001600160a01b038135811691602081013590911690604001356109e2565b6101b9600480360360408110156103c757600080fd5b506001600160a01b038135169060200135610a8a565b6101d5600480360360408110156103f357600080fd5b506001600160a01b0381358116916020013516610b23565b61024a6004803603602081101561042157600080fd5b50356001600160a01b0316610b4e565b604051806040016040528060098152602001682120a6102a37b5b2b760b91b81525081565b3360008181526002602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60005481565b60006001600160a01b038316158015906104e557506001600160a01b0383163014155b6104ee57600080fd5b6001600160a01b0384166000818152600260209081526040808320338452825280832054938352600190915290205461052d908463ffffffff610bd416565b6001600160a01b038087166000908152600160205260408082209390935590861681522054610562908463ffffffff610be616565b6001600160a01b03851660009081526001602052604090205561058b818463ffffffff610bd416565b6001600160a01b03808716600081815260026020908152604080832033845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b601281565b6a2d7eb3f96e070d9700000081565b6000811161061857600080fd5b3360009081526001602052604090205481111561063457600080fd5b33600081815260016020526040902054610654908363ffffffff610bd416565b6001600160a01b03821660009081526001602052604081209190915554610681908363ffffffff610bd416565b6000556040805183815290516001600160a01b038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a26040805183815290516000916001600160a01b038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b3360009081526002602090815260408083206001600160a01b03861684529091528120548083111561075d573360009081526002602090815260408083206001600160a01b0388168452909152812055610792565b61076d818463ffffffff610bd416565b3360009081526002602090815260408083206001600160a01b03891684529091529020555b3360008181526002602090815260408083206001600160a01b0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6001600160a01b031660009081526001602052604090205490565b6003546001600160a01b031681565b6040518060400160405280600381526020016210905360ea1b81525081565b60006001600160a01b0383161580159061086457506001600160a01b0383163014155b61086d57600080fd5b3360009081526001602052604090205461088d908363ffffffff610bd416565b33600090815260016020526040808220929092556001600160a01b038516815220546108bf908363ffffffff610be616565b6001600160a01b0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60008461092a8186610456565b156109d85760405163a2d5785360e01b8152336004820181815260248301889052606060448401908152606484018790526001600160a01b0385169363a2d5785393928a928a928a929190608401848480828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156109b657600080fd5b505af11580156109ca573d6000803e3d6000fd5b5050505060019150506109da565b505b949350505050565b6003546001600160a01b031633146109f957600080fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015610a5957600080fd5b505af1158015610a6d573d6000803e3d6000fd5b505050506040513d6020811015610a8357600080fd5b5050505050565b3360009081526002602090815260408083206001600160a01b0386168452909152812054610abe908363ffffffff610be616565b3360008181526002602090815260408083206001600160a01b0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6003546001600160a01b03163314610b6557600080fd5b6001600160a01b038116610b7857600080fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b600082821115610be057fe5b50900390565b600082820183811015610bf557fe5b939250505056fea265627a7a72315820809c9cb4b34a5c0df6c6e64f66c76f8fd91fb348a27a383a49bebe83538ed1d664736f6c634300050b0032
Verified Source Code Partial Match
Compiler: v0.5.11+commit.c082d0b4
EVM: petersburg
Optimization: Yes (200 runs)
BALToken.sol 279 lines
pragma solidity 0.5.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) internal balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0) && _to != address(this));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0) && _to != address(this));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
emit Transfer(_from, _to, _value);
return true;
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
return allowed[_owner][_spender];
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public
returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
function decreaseApproval (address _spender, uint _subtractedValue) public
returns (bool success) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is StandardToken {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint256 _value) public {
require(_value > 0);
require(_value <= balances[msg.sender]);
// no need to require value <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = balances[burner].sub(_value);
totalSupply = totalSupply.sub(_value);
emit Burn(burner, _value);
emit Transfer(burner, address(0), _value);
}
}
interface tokenRecipient {
function receiveApproval(address _from, uint256 _value, bytes calldata _extraData) external;
}
contract BALToken is BurnableToken, Ownable {
string public constant name = "BAL Token";
string public constant symbol = "BAL";
uint public constant decimals = 18;
// there is no problem in using * here instead of .mul()
uint256 public constant initialSupply = 55000000 * (10 ** uint256(decimals));
// Constructors
constructor () public {
totalSupply = initialSupply;
balances[msg.sender] = initialSupply; // Send all tokens to owner
emit Transfer(address(0), msg.sender, initialSupply);
}
function approveAndCall(address _spender, uint256 _value, bytes calldata _extraData)
external
returns (bool success)
{
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, _extraData);
return true;
}
}
function transferAnyERC20Token(address _tokenAddress, address _to, uint _amount) public onlyOwner {
ERC20(_tokenAddress).transfer(_to, _amount);
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint256
initialSupply 0x378dc3dc → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 9 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
approveAndCall 0xcae9ca51
address _spender
uint256 _value
bytes _extraData
returns: bool
burn 0x42966c68
uint256 _value
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferAnyERC20Token 0xd493b9ac
address _tokenAddress
address _to
uint256 _amount
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only <1% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →