Address Contract Partially Verified
Address
0x01fF50f8b7f74E4f00580d9596cd3D0d6d6E326f
Balance
0 ETH
Nonce
1
Code Size
5074 bytes
Creator
0x48599941...5df4 at tx 0xfbae8b5b...8a0077
Last Active
Indexed Transactions
154 (24,215,381 → 24,315,113)
Gas Used (indexed)
580,704
Contract Bytecode
5074 bytes
0x6060604052600436106101505763ffffffff60e060020a60003504166305d2035b811461015557806306fdde031461017c5780630900f01014610206578063095ea7b31461022757806318160ddd1461024957806323b872dd1461026e578063313ce56714610296578063355274ea146102bf5780633f4ba83a146102d257806340c10f19146102e557806342966c68146103075780635353a2d81461031d5780635c975abb1461036e578063661884631461038157806370a08231146103a35780637d64bcb4146103c25780638456cb59146103d55780638da5cb5b146103e857806395d89b41146104175780639c1e03a01461042a578063a3895fff1461043d578063a9059cbb1461048e578063be040fb0146104b0578063c42bd05a146104c3578063d02d08b2146104d6578063d73dd623146104e9578063dd62ed3e1461050b578063f2fde38b14610530575b600080fd5b341561016057600080fd5b61016861054f565b604051901515815260200160405180910390f35b341561018757600080fd5b61018f61055f565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101cb5780820151838201526020016101b3565b50505050905090810190601f1680156101f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561021157600080fd5b610225600160a060020a03600435166105fd565b005b341561023257600080fd5b610168600160a060020a0360043516602435610647565b341561025457600080fd5b61025c61066d565b60405190815260200160405180910390f35b341561027957600080fd5b610168600160a060020a0360043581169060243516604435610673565b34156102a157600080fd5b6102a961069b565b60405160ff909116815260200160405180910390f35b34156102ca57600080fd5b61025c6106a4565b34156102dd57600080fd5b6102256106aa565b34156102f057600080fd5b610168600160a060020a036004351660243561070e565b341561031257600080fd5b610225600435610150565b341561032857600080fd5b61022560046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061076e95505050505050565b341561037957600080fd5b6101686107a0565b341561038c57600080fd5b610168600160a060020a03600435166024356107a9565b34156103ae57600080fd5b61025c600160a060020a03600435166107c8565b34156103cd57600080fd5b6101686107e3565b34156103e057600080fd5b61022561086f565b34156103f357600080fd5b6103fb6108d5565b604051600160a060020a03909116815260200160405180910390f35b341561042257600080fd5b61018f6108e4565b341561043557600080fd5b6103fb61094f565b341561044857600080fd5b61022560046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061096395505050505050565b341561049957600080fd5b610168600160a060020a0360043516602435610991565b34156104bb57600080fd5b6102256109b0565b34156104ce57600080fd5b6103fb610aaa565b34156104e157600080fd5b610168610ab9565b34156104f457600080fd5b610168600160a060020a0360043516602435610b27565b341561051657600080fd5b61025c600160a060020a0360043581169060243516610b46565b341561053b57600080fd5b610225600160a060020a0360043516610b71565b60065460a060020a900460ff1681565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105f55780601f106105ca576101008083540402835291602001916105f5565b820191906000526020600020905b8154815290600101906020018083116105d857829003601f168201915b505050505081565b60065433600160a060020a0390811691161461061857600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000610651610ab9565b151561065c57600080fd5b6106668383610c0c565b9392505050565b60005481565b600061067d610ab9565b151561068857600080fd5b610693848484610c29565b949350505050565b60035460ff1681565b60075481565b60065433600160a060020a039081169116146106c557600080fd5b60085460ff1615156106d657600080fd5b6008805460ff191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60065460009033600160a060020a0390811691161461072c57600080fd5b60065460a060020a900460ff161561074357600080fd5b600754600054610759908463ffffffff610c4716565b111561076457600080fd5b6106668383610c56565b60065433600160a060020a0390811691161461078957600080fd5b600181805161079c92916020019061130e565b5050565b60085460ff1681565b60006107b3610ab9565b15156107be57600080fd5b6106668383610d63565b600160a060020a031660009081526004602052604090205490565b60065460009033600160a060020a0390811691161461080157600080fd5b60065460a060020a900460ff161561081857600080fd5b6006805474ff0000000000000000000000000000000000000000191660a060020a1790557fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a15060015b90565b60065433600160a060020a0390811691161461088a57600080fd5b60085460ff161561089a57600080fd5b6008805460ff191660011790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600654600160a060020a031681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105f55780601f106105ca576101008083540402835291602001916105f5565b6008546101009004600160a060020a031681565b60065433600160a060020a0390811691161461097e57600080fd5b600281805161079c92916020019061130e565b600061099b610ab9565b15156109a657600080fd5b6106668383610d80565b600954600090600160a060020a031615156109ca57600080fd5b6109d3336107c8565b90506109de81610d9d565b600954600160a060020a03166340c10f19338360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a3d57600080fd5b6102c65a03f11515610a4e57600080fd5b505050604051805190501515610a6357600080fd5b7f8d15a2189c94a743df2a17c8f4cdd87250b7caa8560e57efa74a59352fcee9d23382604051600160a060020a03909216825260208201526040908101905180910390a150565b600954600160a060020a031681565b6008546000906101009004600160a060020a031663ecb70fb782604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b1515610b0857600080fd5b6102c65a03f11515610b1957600080fd5b505050604051805191505090565b6000610b31610ab9565b1515610b3c57600080fd5b6106668383610e58565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b60065433600160a060020a03908116911614610b8c57600080fd5b600160a060020a0381161515610ba157600080fd5b600654600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36006805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60085460009060ff1615610c1f57600080fd5b6106668383610e75565b60085460009060ff1615610c3c57600080fd5b610693848484610ee1565b60008282018381101561066657fe5b60065460009033600160a060020a03908116911614610c7457600080fd5b60065460a060020a900460ff1615610c8b57600080fd5b600054610c9e908363ffffffff610c4716565b6000908155600160a060020a038416815260046020526040902054610cc9908363ffffffff610c4716565b600160a060020a0384166000818152600460205260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a03831660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b60085460009060ff1615610d7657600080fd5b6106668383611063565b60085460009060ff1615610d9357600080fd5b610666838361115d565b600160a060020a033316600090815260046020526040812054821115610dc257600080fd5b5033600160a060020a038116600090815260046020526040902054610de79083611258565b600160a060020a03821660009081526004602052604081209190915554610e14908363ffffffff61125816565b600055600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25050565b60085460009060ff1615610e6b57600080fd5b610666838361126a565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b6000600160a060020a0383161515610ef857600080fd5b600160a060020a038416600090815260046020526040902054821115610f1d57600080fd5b600160a060020a0380851660009081526005602090815260408083203390941683529290522054821115610f5057600080fd5b600160a060020a038416600090815260046020526040902054610f79908363ffffffff61125816565b600160a060020a038086166000908152600460205260408082209390935590851681522054610fae908363ffffffff610c4716565b600160a060020a03808516600090815260046020908152604080832094909455878316825260058152838220339093168252919091522054610ff6908363ffffffff61125816565b600160a060020a03808616600081815260056020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054808311156110c057600160a060020a0333811660009081526005602090815260408083209388168352929052908120556110f7565b6110d0818463ffffffff61125816565b600160a060020a033381166000908152600560209081526040808320938916835292905220555b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b6000600160a060020a038316151561117457600080fd5b600160a060020a03331660009081526004602052604090205482111561119957600080fd5b600160a060020a0333166000908152600460205260409020546111c2908363ffffffff61125816565b600160a060020a0333811660009081526004602052604080822093909355908516815220546111f7908363ffffffff610c4716565b600160a060020a0380851660008181526004602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60008282111561126457fe5b50900390565b600160a060020a0333811660009081526005602090815260408083209386168352929052908120546112a2908363ffffffff610c4716565b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061134f57805160ff191683800117855561137c565b8280016001018555821561137c579182015b8281111561137c578251825591602001919060010190611361565b5061138892915061138c565b5090565b61086c91905b8082111561138857600081556001016113925600a165627a7a72305820656060475e112dce48cb3838c4edeab68282c16b24fe745eec1e6996aaf051ab0029
Verified Source Code Partial Match
Compiler: v0.4.18+commit.9cf6e910
Optimization: Yes (200 runs)
BftToken.sol 647 lines
pragma solidity ^0.4.18;
/**
* @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 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);
}
contract DetailedERC20 is ERC20 {
string public name;
string public symbol;
uint8 public decimals;
function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {
name = _name;
symbol = _symbol;
decimals = _decimals;
}
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) 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));
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
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 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));
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
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;
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) {
return allowed[_owner][_spender];
}
/**
* @dev Increase the amount of tokens that an owner allowed to a 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
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
}
/**
* @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.
*/
function Ownable() 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) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(paused);
_;
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
paused = true;
Pause();
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
paused = false;
Unpause();
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
require(!mintingFinished);
_;
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
totalSupply = totalSupply.add(_amount);
balances[_to] = balances[_to].add(_amount);
Mint(_to, _amount);
Transfer(address(0), _to, _amount);
return true;
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner canMint public returns (bool) {
mintingFinished = true;
MintFinished();
return true;
}
}
/**
* @title Capped token
* @dev Mintable token with a token cap.
*/
contract CappedToken is MintableToken {
uint256 public cap;
function CappedToken(uint256 _cap) public {
require(_cap > 0);
cap = _cap;
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
require(totalSupply.add(_amount) <= cap);
return super.mint(_to, _amount);
}
}
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is BasicToken {
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 <= 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);
Burn(burner, _value);
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(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 Crowdsale
* @dev Crowdsale is a base contract for managing a token crowdsale.
* Crowdsales have a start and end timestamps, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate. Funds collected are forwarded to a wallet
* as they arrive.
*/
contract Crowdsale {
using SafeMath for uint256;
// The token being sold
MintableToken public token;
// start and end timestamps where investments are allowed (both inclusive)
uint256 public startTime;
uint256 public endTime;
// address where funds are collected
address public wallet;
// how many token units a buyer gets per wei
uint256 public rate;
// amount of raised money in wei
uint256 public weiRaised;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) public {
require(_startTime >= now);
require(_endTime >= _startTime);
require(_rate > 0);
require(_wallet != address(0));
token = createTokenContract();
startTime = _startTime;
endTime = _endTime;
rate = _rate;
wallet = _wallet;
}
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
return new MintableToken();
}
// fallback function can be used to buy tokens
function () external payable {
buyTokens(msg.sender);
}
// low level token purchase function
function buyTokens(address beneficiary) public payable {
require(beneficiary != address(0));
require(validPurchase());
uint256 weiAmount = msg.value;
// calculate token amount to be created
uint256 tokens = weiAmount.mul(rate);
// update state
weiRaised = weiRaised.add(weiAmount);
token.mint(beneficiary, tokens);
TokenPurchase(msg.sender, beneficiary, weiAmount, tokens);
forwardFunds();
}
// send ether to the fund collection wallet
// override to create custom fund forwarding mechanisms
function forwardFunds() internal {
wallet.transfer(msg.value);
}
// @return true if the transaction can buy tokens
function validPurchase() internal view returns (bool) {
bool withinPeriod = now >= startTime && now <= endTime;
bool nonZeroPurchase = msg.value != 0;
return withinPeriod && nonZeroPurchase;
}
// @return true if crowdsale event has ended
function hasEnded() public view returns (bool) {
return now > endTime;
}
}
/**
* @title CappedCrowdsale
* @dev Extension of Crowdsale with a max amount of funds raised
*/
contract CappedCrowdsale is Crowdsale {
using SafeMath for uint256;
uint256 public cap;
function CappedCrowdsale(uint256 _cap) public {
require(_cap > 0);
cap = _cap;
}
// overriding Crowdsale#validPurchase to add extra cap logic
// @return true if investors can buy at the moment
function validPurchase() internal view returns (bool) {
bool withinCap = weiRaised.add(msg.value) <= cap;
return super.validPurchase() && withinCap;
}
// overriding Crowdsale#hasEnded to add cap logic
// @return true if crowdsale event has ended
function hasEnded() public view returns (bool) {
bool capReached = weiRaised >= cap;
return super.hasEnded() || capReached;
}
}
/**
* @title Pausable token
*
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
return super.transfer(_to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
return super.transferFrom(_from, _to, _value);
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
return super.approve(_spender, _value);
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
return super.increaseApproval(_spender, _addedValue);
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
return super.decreaseApproval(_spender, _subtractedValue);
}
}
contract BftToken is DetailedERC20, CappedToken, BurnableToken, PausableToken {
CappedCrowdsale public crowdsale;
function BftToken(
uint256 _tokenCap,
uint8 _decimals,
CappedCrowdsale _crowdsale
)
DetailedERC20("BF Token", "BFT", _decimals)
CappedToken(_tokenCap) public {
crowdsale = _crowdsale;
}
// ----------------------------------------------------------------------------------------------------------------
// the following is the functionality to upgrade this token smart contract to a new one
MintableToken public newToken = MintableToken(0x0);
event LogRedeem(address beneficiary, uint256 amount);
modifier hasUpgrade() {
require(newToken != MintableToken(0x0));
_;
}
function upgrade(MintableToken _newToken) onlyOwner public {
newToken = _newToken;
}
// overriding BurnableToken#burn to make disable it for public use
function burn(uint256 _value) public {
revert();
_value = _value; // to silence compiler warning
}
function redeem() hasUpgrade public {
var balance = balanceOf(msg.sender);
// burn the tokens in this token smart contract
super.burn(balance);
// mint tokens in the new token smart contract
require(newToken.mint(msg.sender, balance));
LogRedeem(msg.sender, balance);
}
// ----------------------------------------------------------------------------------------------------------------
// we override the token transfer functions to block transfers before startTransfersDate timestamp
modifier canDoTransfers() {
require(hasCrowdsaleFinished());
_;
}
function hasCrowdsaleFinished() view public returns(bool) {
return crowdsale.hasEnded();
}
function transfer(address _to, uint256 _value) public canDoTransfers returns (bool) {
return super.transfer(_to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) public canDoTransfers returns (bool) {
return super.transferFrom(_from, _to, _value);
}
function approve(address _spender, uint256 _value) public canDoTransfers returns (bool) {
return super.approve(_spender, _value);
}
function increaseApproval(address _spender, uint _addedValue) public canDoTransfers returns (bool success) {
return super.increaseApproval(_spender, _addedValue);
}
function decreaseApproval(address _spender, uint _subtractedValue) public canDoTransfers returns (bool success) {
return super.decreaseApproval(_spender, _subtractedValue);
}
// ----------------------------------------------------------------------------------------------------------------
// functionality to change the token ticker - in case of conflict
function changeSymbol(string _symbol) onlyOwner public {
symbol = _symbol;
}
function changeName(string _name) onlyOwner public {
name = _name;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
cap 0x355274ea → uint256
crowdsale 0x9c1e03a0 → address
decimals 0x313ce567 → uint8
hasCrowdsaleFinished 0xd02d08b2 → bool
mintingFinished 0x05d2035b → bool
name 0x06fdde03 → string
newToken 0xc42bd05a → address
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 15 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
burn 0x42966c68
uint256 _value
changeName 0x5353a2d8
string _name
changeSymbol 0xa3895fff
string _symbol
decreaseApproval 0x66188463
address _spender
uint256 _subtractedValue
returns: bool
finishMinting 0x7d64bcb4
No parameters
returns: bool
increaseApproval 0xd73dd623
address _spender
uint256 _addedValue
returns: bool
mint 0x40c10f19
address _to
uint256 _amount
returns: bool
pause 0x8456cb59
No parameters
redeem 0xbe040fb0
No parameters
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unpause 0x3f4ba83a
No parameters
upgrade 0x0900f010
address _newToken
Top Interactions
| Address | Txns | Sent | Received |
|---|---|---|---|
| 0xdd3d72C5...Ceee | 5 | 5 | |
| 0xa12e1462...C8a4 | 3 | 3 | |
| 0x09C8c563...fAf4 | 1 | 1 | |
| 0x6F323854...C322 | 1 | 1 |
Recent Transactions
|
| Hash | Block | Age | From/To | Value | |
|---|---|---|---|---|---|
| 0x0dcf061a...6c5b72 | 24,315,113 | IN | 0x09C8c563...fAf4 | 0 ETH | |
| 0x1869b0ed...849771 | 24,287,970 | IN | 0x6F323854...C322 | 0 ETH | |
| 0x97e904d5...ecbbca | 24,217,794 | IN | 0xa12e1462...C8a4 | 0 ETH | |
| 0xf760aa04...4ef349 | 24,216,609 | IN | 0xdd3d72C5...Ceee | 0 ETH | |
| 0x6ce5fcf7...08ea13 | 24,216,583 | IN | 0xdd3d72C5...Ceee | 0 ETH | |
| 0xe20b7bf6...779ed5 | 24,216,579 | IN | 0xa12e1462...C8a4 | 0 ETH | |
| 0xb1de604d...8124c7 | 24,215,985 | IN | 0xdd3d72C5...Ceee | 0 ETH | |
| 0x4cc18310...55209e | 24,215,944 | IN | 0xdd3d72C5...Ceee | 0 ETH | |
| 0x2ca981e7...588cac | 24,215,941 | IN | 0xa12e1462...C8a4 | 0 ETH | |
| 0x116baaf7...0f0b4f | 24,215,381 | IN | 0xdd3d72C5...Ceee | 0 ETH |