Address Contract Partially Verified
Address
0x3618516F45CD3c913F81F9987AF41077932Bc40d
Balance
0 ETH
Nonce
1
Code Size
9004 bytes
Creator
0xB5F6E37e...6425 at tx 0x58b2f358...947119
Indexed Transactions
0
Contract Bytecode
9004 bytes
0x606060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630130371a1461013857806306fdde0314610161578063095ea7b3146101ef57806318160ddd1461024957806323b872dd14610272578063313ce567146102eb578063390551721461031457806342966c6814610329578063661884631461034c57806370a08231146103a657806372f443be146103f3578063796b89b9146104375780638a6281f6146104605780638da5cb5b146104bc57806394e5e8901461051157806395d89b4114610566578063a64e7969146105f4578063a9059cbb14610645578063cae9ca511461069f578063d73dd6231461073c578063dd62ed3e14610796578063f2fde38b14610802578063feddb41c1461083b575b600080fd5b341561014357600080fd5b61014b610890565b6040518082815260200191505060405180910390f35b341561016c57600080fd5b61017461089c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b4578082015181840152602081019050610199565b50505050905090810190601f1680156101e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101fa57600080fd5b61022f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061093a565b604051808215151515815260200191505060405180910390f35b341561025457600080fd5b61025c610a2c565b6040518082815260200191505060405180910390f35b341561027d57600080fd5b6102d1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a32565b604051808215151515815260200191505060405180910390f35b34156102f657600080fd5b6102fe610aa6565b6040518082815260200191505060405180910390f35b341561031f57600080fd5b610327610aac565b005b341561033457600080fd5b61034a6004808035906020019091905050611047565b005b341561035757600080fd5b61038c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506111aa565b604051808215151515815260200191505060405180910390f35b34156103b157600080fd5b6103dd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061143b565b6040518082815260200191505060405180910390f35b34156103fe57600080fd5b610435600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611484565b005b341561044257600080fd5b61044a6115aa565b6040518082815260200191505060405180910390f35b341561046b57600080fd5b6104736115b2565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b34156104c757600080fd5b6104cf6115e9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561051c57600080fd5b61052461160f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561057157600080fd5b610579611635565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105b957808201518184015260208101905061059e565b50505050905090810190601f1680156105e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156105ff57600080fd5b61062b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506116d3565b604051808215151515815260200191505060405180910390f35b341561065057600080fd5b610685600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506116f3565b604051808215151515815260200191505060405180910390f35b34156106aa57600080fd5b610722600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611765565b604051808215151515815260200191505060405180910390f35b341561074757600080fd5b61077c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611a06565b604051808215151515815260200191505060405180910390f35b34156107a157600080fd5b6107ec600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c02565b6040518082815260200191505060405180910390f35b341561080d57600080fd5b610839600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611c89565b005b341561084657600080fd5b61084e611de1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b671bc16d674ec8000081565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109325780601f1061090757610100808354040283529160200191610932565b820191906000526020600020905b81548152906001019060200180831161091557829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b6000801515600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141515610a9257600080fd5b610a9d848484611e07565b90509392505050565b60085481565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610b3d57600080fd5b6102c65a03f11515610b4e57600080fd5b50505060405180519050111515610b6457600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b1515610c5d57600080fd5b6102c65a03f11515610c6e57600080fd5b505050604051805190509050600081111515610c8957600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610d8a57600080fd5b6102c65a03f11515610d9b57600080fd5b5050506040518051905050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1515610e3657600080fd5b6102c65a03f11515610e4757600080fd5b505050610e9c81600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120f390919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f3181600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461210c90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a37fb185a8a49c7844db285400f5c8200fcc0a3720750a9cc236e40563d7bb8f20823382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000808211151561105757600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156110a557600080fd5b3390506110fa82600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120f390919063ffffffff16565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611152826000546120f390919063ffffffff16565b6000819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156112bb576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061134f565b6112ce83826120f390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e057600080fd5b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b600042905090565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691506115e38261143b565b90509091565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116cb5780601f106116a0576101008083540402835291602001916116cb565b820191906000526020600020905b8154815290600101906020018083116116ae57829003601f168201915b505050505081565b60096020528060005260406000206000915054906101000a900460ff1681565b6000801515600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561175357600080fd5b61175d838361212a565b905092915050565b600082600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff1660405180807f72656365697665417070726f76616c28616464726573732c75696e743235362c81526020017f616464726573732c627974657329000000000000000000000000000000000000815250602e01905060405180910390207c01000000000000000000000000000000000000000000000000000000009004338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828051906020019080838360005b838110156119a657808201518184015260208101905061198b565b50505050905090810190601f1680156119d35780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f19250505015156119fb57600080fd5b600190509392505050565b6000611a9782600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461210c90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ce557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611d2157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611e4657600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050611f1783600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120f390919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fac83600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461210c90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061200283826120f390919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b600082821115151561210157fe5b818303905092915050565b600080828401905083811015151561212057fe5b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561216757600080fd5b6121b982600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120f390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061224e82600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461210c90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050929150505600a165627a7a72305820b433bd4259b00750d407515fc74b2b9529335ed2bdf30da0b1cfcce3ce5eb3b20029
Verified Source Code Partial Match
Compiler: v0.4.19+commit.c4cbbb05
Optimization: No
Peculium.sol 424 lines
pragma solidity ^0.4.13;
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
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));
// 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 constant returns (uint256 balance) {
return balances[_owner];
}
}
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant 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 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() {
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));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
library SafeERC20 {
function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
assert(token.transfer(to, value));
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
assert(token.transferFrom(from, to, value));
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
assert(token.approve(spender, value));
}
}
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint256 a, uint256 b) internal constant 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 constant returns (uint256) {
assert(b <= a);
return a - b;
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
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));
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);
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 constant 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);
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);
}
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
}
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);
Burn(burner, _value);
}
}
contract Peculium is BurnableToken,Ownable { // Our token is a standard ERC20 Token with burnable and ownable aptitude
/*Variables about the old token contract */
PeculiumOld public peculOld; // The old Peculium token
address public peculOldAdress = 0x53148Bb4551707edF51a1e8d7A93698d18931225; // The address of the old Peculium contract
using SafeMath for uint256; // We use safemath to do basic math operation (+,-,*,/)
using SafeERC20 for ERC20Basic;
/* Public variables of the token for ERC20 compliance */
string public name = "Peculium"; //token name
string public symbol = "PCL"; // token symbol
uint256 public decimals = 8; // token number of decimal
/* Public variables specific for Peculium */
uint256 public constant MAX_SUPPLY_NBTOKEN = 20000000000*10**8; // The max cap is 20 Billion Peculium
mapping(address => bool) public balancesCannotSell; // The boolean variable, to frost the tokens
/* Event for the freeze of account */
event ChangedTokens(address changedTarget,uint256 amountToChanged);
event FrozenFunds(address address_target, bool bool_canSell);
//Constructor
function Peculium() public {
totalSupply = MAX_SUPPLY_NBTOKEN;
balances[address(this)] = totalSupply; // At the beginning, the contract has all the tokens.
peculOld = PeculiumOld(peculOldAdress);
}
/*** Public Functions of the contract ***/
function transfer(address _to, uint256 _value) public returns (bool)
{ // We overright the transfer function to allow freeze possibility
require(balancesCannotSell[msg.sender]==false);
return BasicToken.transfer(_to,_value);
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool)
{ // We overright the transferFrom function to allow freeze possibility
require(balancesCannotSell[msg.sender]==false);
return StandardToken.transferFrom(_from,_to,_value);
}
/*** Owner Functions of the contract ***/
function ChangeLicense(address target, bool canSell) public onlyOwner
{
balancesCannotSell[target] = canSell;
FrozenFunds(target, canSell);
}
function UpgradeTokens() public
{
// Use this function to swap your old peculium against new ones (the new ones don't need defrost to be transfered)
// Old peculium are burned
require(peculOld.totalSupply()>0);
uint256 amountChanged = peculOld.allowance(msg.sender,address(this));
require(amountChanged>0);
peculOld.transferFrom(msg.sender,address(this),amountChanged);
peculOld.burn(amountChanged);
balances[address(this)] = balances[address(this)].sub(amountChanged);
balances[msg.sender] = balances[msg.sender].add(amountChanged);
Transfer(address(this), msg.sender, amountChanged);
ChangedTokens(msg.sender,amountChanged);
}
/*** Others Functions of the contract ***/
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
require(_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData));
return true;
}
function getBlockTimestamp() public constant returns (uint256)
{
return now;
}
function getOwnerInfos() public constant returns (address ownerAddr, uint256 ownerBalance)
{ // Return info about the public address and balance of the account of the owner of the contract
ownerAddr = owner;
ownerBalance = balanceOf(ownerAddr);
}
}
contract PeculiumOld is BurnableToken,Ownable { // Our token is a standard ERC20 Token with burnable and ownable aptitude
using SafeMath for uint256; // We use safemath to do basic math operation (+,-,*,/)
using SafeERC20 for ERC20Basic;
/* Public variables of the token for ERC20 compliance */
string public name = "Peculium"; //token name
string public symbol = "PCL"; // token symbol
uint256 public decimals = 8; // token number of decimal
/* Public variables specific for Peculium */
uint256 public constant MAX_SUPPLY_NBTOKEN = 20000000000*10**8; // The max cap is 20 Billion Peculium
uint256 public dateStartContract; // The date of the deployment of the token
mapping(address => bool) public balancesCanSell; // The boolean variable, to frost the tokens
uint256 public dateDefrost; // The date when the owners of token can defrost their tokens
/* Event for the freeze of account */
event FrozenFunds(address target, bool frozen);
event Defroze(address msgAdd, bool freeze);
//Constructor
function PeculiumOld() {
totalSupply = MAX_SUPPLY_NBTOKEN;
balances[owner] = totalSupply; // At the beginning, the owner has all the tokens.
balancesCanSell[owner] = true; // The owner need to sell token for the private sale and for the preICO, ICO.
dateStartContract=now;
dateDefrost = dateStartContract + 85 days; // everybody can defrost his own token after the 25 january 2018 (85 days after 1 November)
}
/*** Public Functions of the contract ***/
function defrostToken() public
{ // Function to defrost your own token, after the date of the defrost
require(now>dateDefrost);
balancesCanSell[msg.sender]=true;
Defroze(msg.sender,true);
}
function transfer(address _to, uint256 _value) public returns (bool)
{ // We overright the transfer function to allow freeze possibility
require(balancesCanSell[msg.sender]);
return BasicToken.transfer(_to,_value);
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool)
{ // We overright the transferFrom function to allow freeze possibility (need to allow before)
require(balancesCanSell[msg.sender]);
return StandardToken.transferFrom(_from,_to,_value);
}
/*** Owner Functions of the contract ***/
function freezeAccount(address target, bool canSell) onlyOwner
{
balancesCanSell[target] = canSell;
FrozenFunds(target, canSell);
}
/*** Others Functions of the contract ***/
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData));
return true;
}
function getBlockTimestamp() constant returns (uint256)
{
return now;
}
function getOwnerInfos() constant returns (address ownerAddr, uint256 ownerBalance)
{ // Return info about the public address and balance of the account of the owner of the contract
ownerAddr = owner;
ownerBalance = balanceOf(ownerAddr);
}
}
Read Contract
MAX_SUPPLY_NBTOKEN 0x0130371a → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
balancesCannotSell 0xa64e7969 → bool
decimals 0x313ce567 → uint256
getBlockTimestamp 0x796b89b9 → uint256
getOwnerInfos 0x8a6281f6 → address, uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
peculOld 0xfeddb41c → address
peculOldAdress 0x94e5e890 → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 10 functions
These functions modify contract state and require a wallet transaction to execute.
ChangeLicense 0x72f443be
address target
bool canSell
UpgradeTokens 0x39055172
No parameters
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
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address