ERC-20
Reputation
Overview
Max Total Supply
150,000,000 TALAO
Holders
4,522 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
316.260363439551899404 TALAOValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TalaoToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-06-01 */ pragma solidity ^0.4.23; /** * @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) { uint256 c = a / b; 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. */ 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 TalaoMarketplace * @dev This contract is allowing users to buy or sell Talao tokens at a price set by the owner * @author Blockchain Partner */ contract TalaoMarketplace is Ownable { using SafeMath for uint256; TalaoToken public token; struct MarketplaceData { uint buyPrice; uint sellPrice; uint unitPrice; } MarketplaceData public marketplace; event SellingPrice(uint sellingPrice); event TalaoBought(address buyer, uint amount, uint price, uint unitPrice); event TalaoSold(address seller, uint amount, uint price, uint unitPrice); /** * @dev Constructor of the marketplace pointing to the TALAO token address * @param talao the talao token address **/ constructor(address talao) public { token = TalaoToken(talao); } /** * @dev Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth * @param newSellPrice price the users can sell to the contract * @param newBuyPrice price users can buy from the contract * @param newUnitPrice to manage decimal issue 0,35 = 35 /100 (100 is unit) */ function setPrices(uint256 newSellPrice, uint256 newBuyPrice, uint256 newUnitPrice) public onlyOwner { require (newSellPrice > 0 && newBuyPrice > 0 && newUnitPrice > 0, "wrong inputs"); marketplace.sellPrice = newSellPrice; marketplace.buyPrice = newBuyPrice; marketplace.unitPrice = newUnitPrice; } /** * @dev Allow anyone to buy tokens against ether, depending on the buyPrice set by the contract owner. * @return amount the amount of tokens bought **/ function buy() public payable returns (uint amount) { amount = msg.value.mul(marketplace.unitPrice).div(marketplace.buyPrice); token.transfer(msg.sender, amount); emit TalaoBought(msg.sender, amount, marketplace.buyPrice, marketplace.unitPrice); return amount; } /** * @dev Allow anyone to sell tokens for ether, depending on the sellPrice set by the contract owner. * @param amount the number of tokens to be sold * @return revenue ethers sent in return **/ function sell(uint amount) public returns (uint revenue) { require(token.balanceOf(msg.sender) >= amount, "sender has not enough tokens"); token.transferFrom(msg.sender, this, amount); revenue = amount.mul(marketplace.sellPrice).div(marketplace.unitPrice); msg.sender.transfer(revenue); emit TalaoSold(msg.sender, amount, marketplace.sellPrice, marketplace.unitPrice); return revenue; } /** * @dev Allows the owner to withdraw ethers from the contract. * @param ethers quantity of ethers to be withdrawn * @return true if withdrawal successful ; false otherwise */ function withdrawEther(uint256 ethers) public onlyOwner { if (this.balance >= ethers) { msg.sender.transfer(ethers); } } /** * @dev Allow the owner to withdraw tokens from the contract. * @param tokens quantity of tokens to be withdrawn */ function withdrawTalao(uint256 tokens) public onlyOwner { token.transfer(msg.sender, tokens); } /** * @dev Fallback function ; only owner can send ether. **/ function () public payable onlyOwner { } } /** * @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); } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ 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)); } } /** * @title TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */ contract TokenTimelock { using SafeERC20 for ERC20Basic; // ERC20 basic token contract being held ERC20Basic public token; // beneficiary of tokens after they are released address public beneficiary; // timestamp when token release is enabled uint256 public releaseTime; function TokenTimelock(ERC20Basic _token, address _beneficiary, uint256 _releaseTime) public { require(_releaseTime > now); token = _token; beneficiary = _beneficiary; releaseTime = _releaseTime; } /** * @notice Transfers tokens held by timelock to beneficiary. * @dev Removed original require that amount released was > 0 ; releasing 0 is fine */ function release() public { require(now >= releaseTime); uint256 amount = token.balanceOf(this); token.safeTransfer(beneficiary, amount); } } /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * owner. * @notice Talao token transfer function cannot fail thus there's no need for revocation. */ contract TokenVesting is Ownable { using SafeMath for uint256; using SafeERC20 for ERC20Basic; event Released(uint256 amount); event Revoked(); // beneficiary of tokens after they are released address public beneficiary; uint256 public cliff; uint256 public start; uint256 public duration; bool public revocable; mapping (address => uint256) public released; mapping (address => bool) public revoked; /** * @dev Creates a vesting contract that vests its balance of any ERC20 token to the * _beneficiary, gradually in a linear fashion until _start + _duration. By then all * of the balance will have vested. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _revocable whether the vesting is revocable or not */ function TokenVesting(address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, bool _revocable) public { require(_beneficiary != address(0)); require(_cliff <= _duration); beneficiary = _beneficiary; revocable = _revocable; duration = _duration; cliff = _start.add(_cliff); start = _start; } /** * @notice Transfers vested tokens to beneficiary. * @dev Removed original require that amount released was > 0 ; releasing 0 is fine * @param token ERC20 token which is being vested */ function release(ERC20Basic token) public { uint256 unreleased = releasableAmount(token); released[token] = released[token].add(unreleased); token.safeTransfer(beneficiary, unreleased); Released(unreleased); } /** * @notice Allows the owner to revoke the vesting. Tokens already vested * remain in the contract, the rest are returned to the owner. * @param token ERC20 token which is being vested */ function revoke(ERC20Basic token) public onlyOwner { require(revocable); require(!revoked[token]); uint256 balance = token.balanceOf(this); uint256 unreleased = releasableAmount(token); uint256 refund = balance.sub(unreleased); revoked[token] = true; token.safeTransfer(owner, refund); Revoked(); } /** * @dev Calculates the amount that has already vested but hasn't been released yet. * @param token ERC20 token which is being vested */ function releasableAmount(ERC20Basic token) public view returns (uint256) { return vestedAmount(token).sub(released[token]); } /** * @dev Calculates the amount that has already vested. * @param token ERC20 token which is being vested */ function vestedAmount(ERC20Basic token) public view returns (uint256) { uint256 currentBalance = token.balanceOf(this); uint256 totalBalance = currentBalance.add(released[token]); if (now < cliff) { return 0; } else if (now >= start.add(duration) || revoked[token]) { return totalBalance; } else { return totalBalance.mul(now.sub(start)).div(duration); } } } /** * @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 _rate, uint256 _startTime, uint256 _endTime, address _wallet) public { require(_rate > 0); require(_startTime >= now); require(_endTime >= _startTime); require(_wallet != address(0)); token = createTokenContract(); startTime = _startTime; endTime = _endTime; 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 // removed view to be overriden function validPurchase() internal 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 FinalizableCrowdsale * @dev Extension of Crowdsale where an owner can do extra work * after finishing. */ contract FinalizableCrowdsale is Crowdsale, Ownable { using SafeMath for uint256; bool public isFinalized = false; event Finalized(); /** * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. */ function finalize() public { require(!isFinalized); require(hasEnded()); finalization(); Finalized(); isFinalized = true; } /** * @dev Can be overridden to add finalization logic. The overriding function * should call super.finalization() to ensure the chain of finalization is * executed entirely. */ function finalization() internal { } } /** * @title RefundVault * @dev This contract is used for storing funds while a crowdsale * is in progress. Supports refunding the money if crowdsale fails, * and forwarding it if crowdsale is successful. */ contract RefundVault is Ownable { using SafeMath for uint256; enum State { Active, Refunding, Closed } mapping (address => uint256) public deposited; address public wallet; State public state; event Closed(); event RefundsEnabled(); event Refunded(address indexed beneficiary, uint256 weiAmount); function RefundVault(address _wallet) public { require(_wallet != address(0)); wallet = _wallet; state = State.Active; } function deposit(address investor) onlyOwner public payable { require(state == State.Active); deposited[investor] = deposited[investor].add(msg.value); } function close() onlyOwner public { require(state == State.Active); state = State.Closed; Closed(); wallet.transfer(this.balance); } function enableRefunds() onlyOwner public { require(state == State.Active); state = State.Refunding; RefundsEnabled(); } function refund(address investor) public { require(state == State.Refunding); uint256 depositedValue = deposited[investor]; deposited[investor] = 0; investor.transfer(depositedValue); Refunded(investor, depositedValue); } } /** * @title RefundableCrowdsale * @dev Extension of Crowdsale contract that adds a funding goal, and * the possibility of users getting a refund if goal is not met. * Uses a RefundVault as the crowdsale's vault. */ contract RefundableCrowdsale is FinalizableCrowdsale { using SafeMath for uint256; // minimum amount of funds to be raised in weis uint256 public goal; // refund vault used to hold funds while crowdsale is running RefundVault public vault; function RefundableCrowdsale(uint256 _goal) public { require(_goal > 0); vault = new RefundVault(wallet); goal = _goal; } // We're overriding the fund forwarding from Crowdsale. // In addition to sending the funds, we want to call // the RefundVault deposit function function forwardFunds() internal { vault.deposit.value(msg.value)(msg.sender); } // if crowdsale is unsuccessful, investors can claim refunds here function claimRefund() public { require(isFinalized); require(!goalReached()); vault.refund(msg.sender); } // vault finalization task, called when owner calls finalize() function finalization() internal { if (goalReached()) { vault.close(); } else { vault.enableRefunds(); } super.finalization(); } function goalReached() public view returns (bool) { return weiRaised >= goal; } } /** * @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 // removed view to be overriden function validPurchase() internal 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 ProgressiveIndividualCappedCrowdsale * @dev Extension of Crowdsale with a progressive individual cap * @dev This contract is not made for crowdsale superior to 256 * TIME_PERIOD_IN_SEC * @author Request.network ; some modifications by Blockchain Partner */ contract ProgressiveIndividualCappedCrowdsale is RefundableCrowdsale, CappedCrowdsale { uint public startGeneralSale; uint public constant TIME_PERIOD_IN_SEC = 1 days; uint public constant minimumParticipation = 10 finney; uint public constant GAS_LIMIT_IN_WEI = 5E10 wei; // limit gas price -50 Gwei wales stopper uint256 public baseEthCapPerAddress; mapping(address=>uint) public participated; function ProgressiveIndividualCappedCrowdsale(uint _baseEthCapPerAddress, uint _startGeneralSale) public { baseEthCapPerAddress = _baseEthCapPerAddress; startGeneralSale = _startGeneralSale; } /** * @dev setting cap before the general sale starts * @param _newBaseCap the new cap */ function setBaseCap(uint _newBaseCap) public onlyOwner { require(now < startGeneralSale); baseEthCapPerAddress = _newBaseCap; } /** * @dev overriding CappedCrowdsale#validPurchase to add an individual cap * @return true if investors can buy at the moment */ function validPurchase() internal returns(bool) { bool gasCheck = tx.gasprice <= GAS_LIMIT_IN_WEI; uint ethCapPerAddress = getCurrentEthCapPerAddress(); participated[msg.sender] = participated[msg.sender].add(msg.value); bool enough = participated[msg.sender] >= minimumParticipation; return participated[msg.sender] <= ethCapPerAddress && enough && gasCheck; } /** * @dev Get the current individual cap. * @dev This amount increase everyday in an exponential way. Day 1: base cap, Day 2: 2 * base cap, Day 3: 4 * base cap ... * @return individual cap in wei */ function getCurrentEthCapPerAddress() public constant returns(uint) { if (block.timestamp < startGeneralSale) return 0; uint timeSinceStartInSec = block.timestamp.sub(startGeneralSale); uint currentPeriod = timeSinceStartInSec.div(TIME_PERIOD_IN_SEC).add(1); // for currentPeriod > 256 will always return 0 return (2 ** currentPeriod.sub(1)).mul(baseEthCapPerAddress); } } /** * @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 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; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } /** * @title TalaoToken * @dev This contract details the TALAO token and allows freelancers to create/revoke vault access, appoint agents. * @author Blockchain Partner */ contract TalaoToken is MintableToken { using SafeMath for uint256; // token details string public constant name = "Talao"; string public constant symbol = "TALAO"; uint8 public constant decimals = 18; // the talao marketplace address address public marketplace; // talao tokens needed to create a vault uint256 public vaultDeposit; // sum of all talao tokens desposited uint256 public totalDeposit; struct FreelanceData { // access price to the talent vault uint256 accessPrice; // address of appointed talent agent address appointedAgent; // how much the talent is sharing with its agent uint sharingPlan; // how much is the talent deposit uint256 userDeposit; } // structure that defines a client access to a vault struct ClientAccess { // is he allowed to access the vault bool clientAgreement; // the block number when access was granted uint clientDate; } // Vault allowance client x freelancer mapping (address => mapping (address => ClientAccess)) public accessAllowance; // Freelance data is public mapping (address=>FreelanceData) public data; enum VaultStatus {Closed, Created, PriceTooHigh, NotEnoughTokensDeposited, AgentRemoved, NewAgent, NewAccess, WrongAccessPrice} // Those event notifies UI about vaults action with vault status // Closed Vault access closed // Created Vault access created // PriceTooHigh Vault access price too high // NotEnoughTokensDeposited not enough tokens to pay deposit // AgentRemoved agent removed // NewAgent new agent appointed // NewAccess vault access granted to client // WrongAccessPrice client not enough token to pay vault access event Vault(address indexed client, address indexed freelance, VaultStatus status); modifier onlyMintingFinished() { require(mintingFinished == true, "minting has not finished"); _; } /** * @dev Let the owner set the marketplace address once minting is over * Possible to do it more than once to ensure maintainability * @param theMarketplace the marketplace address **/ function setMarketplace(address theMarketplace) public onlyMintingFinished onlyOwner { marketplace = theMarketplace; } /** * @dev Same ERC20 behavior, but require the token to be unlocked * @param _spender address The address that will spend the funds. * @param _value uint256 The amount of tokens to be spent. **/ function approve(address _spender, uint256 _value) public onlyMintingFinished returns (bool) { return super.approve(_spender, _value); } /** * @dev Same ERC20 behavior, but require the token to be unlocked and sells some tokens to refill ether balance up to minBalanceForAccounts * @param _to address The address to transfer to. * @param _value uint256 The amount to be transferred. **/ function transfer(address _to, uint256 _value) public onlyMintingFinished returns (bool result) { return super.transfer(_to, _value); } /** * @dev Same ERC20 behavior, but require the token to be unlocked * @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 onlyMintingFinished returns (bool) { return super.transferFrom(_from, _to, _value); } /** * @dev Set allowance for other address and notify * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public onlyMintingFinished returns (bool) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /** * @dev Allows the owner to withdraw ethers from the contract. * @param ethers quantity in weis of ethers to be withdrawn * @return true if withdrawal successful ; false otherwise */ function withdrawEther(uint256 ethers) public onlyOwner { msg.sender.transfer(ethers); } /** * @dev Allow the owner to withdraw tokens from the contract without taking tokens from deposits. * @param tokens quantity of tokens to be withdrawn */ function withdrawTalao(uint256 tokens) public onlyOwner { require(balanceOf(this).sub(totalDeposit) >= tokens, "too much tokens asked"); _transfer(this, msg.sender, tokens); } /******************************************/ /* vault functions start here */ /******************************************/ /** * @dev Allows anyone to create a vault access. * Vault deposit is transferred to token contract and sum is stored in totalDeposit * Price must be lower than Vault deposit * @param price to pay to access certificate vault */ function createVaultAccess (uint256 price) public onlyMintingFinished { require(accessAllowance[msg.sender][msg.sender].clientAgreement==false, "vault already created"); require(price<=vaultDeposit, "price asked is too high"); require(balanceOf(msg.sender)>vaultDeposit, "user has not enough tokens to send deposit"); data[msg.sender].accessPrice=price; super.transfer(this, vaultDeposit); totalDeposit = totalDeposit.add(vaultDeposit); data[msg.sender].userDeposit=vaultDeposit; data[msg.sender].sharingPlan=100; accessAllowance[msg.sender][msg.sender].clientAgreement=true; emit Vault(msg.sender, msg.sender, VaultStatus.Created); } /** * @dev Closes a vault access, deposit is sent back to freelance wallet * Total deposit in token contract is reduced by user deposit */ function closeVaultAccess() public onlyMintingFinished { require(accessAllowance[msg.sender][msg.sender].clientAgreement==true, "vault has not been created"); require(_transfer(this, msg.sender, data[msg.sender].userDeposit), "token deposit transfer failed"); accessAllowance[msg.sender][msg.sender].clientAgreement=false; totalDeposit=totalDeposit.sub(data[msg.sender].userDeposit); data[msg.sender].sharingPlan=0; emit Vault(msg.sender, msg.sender, VaultStatus.Closed); } /** * @dev Internal transfer function used to transfer tokens from an address to another without prior authorization. * Only used in these situations: * * Send tokens from the contract to a token buyer (buy() function) * * Send tokens from the contract to the owner in order to withdraw tokens (withdrawTalao(tokens) function) * * Send tokens from the contract to a user closing its vault thus claiming its deposit back (closeVaultAccess() function) * @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. * @return true if transfer is successful ; should throw otherwise */ function _transfer(address _from, address _to, uint _value) internal returns (bool) { require(_to != 0x0, "destination cannot be 0x0"); require(balances[_from] >= _value, "not enough tokens in sender wallet"); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Appoint an agent or a new agent * Former agent is replaced by new agent * Agent will receive token on behalf of the freelance talent * @param newagent agent to appoint * @param newplan sharing plan is %, 100 means 100% for freelance */ function agentApproval (address newagent, uint newplan) public onlyMintingFinished { require(newplan>=0&&newplan<=100, "plan must be between 0 and 100"); require(accessAllowance[msg.sender][msg.sender].clientAgreement==true, "vault has not been created"); emit Vault(data[msg.sender].appointedAgent, msg.sender, VaultStatus.AgentRemoved); data[msg.sender].appointedAgent=newagent; data[msg.sender].sharingPlan=newplan; emit Vault(newagent, msg.sender, VaultStatus.NewAgent); } /** * @dev Set the quantity of tokens necessary for vault access creation * @param newdeposit deposit (in tokens) for vault access creation */ function setVaultDeposit (uint newdeposit) public onlyOwner { vaultDeposit = newdeposit; } /** * @dev Buy unlimited access to a freelancer vault * Vault access price is transfered from client to agent or freelance depending on the sharing plan * Allowance is given to client and one stores block.number for future use * @param freelance the address of the talent * @return true if access is granted ; false if not */ function getVaultAccess (address freelance) public onlyMintingFinished returns (bool) { require(accessAllowance[freelance][freelance].clientAgreement==true, "vault does not exist"); require(accessAllowance[msg.sender][freelance].clientAgreement!=true, "access was already granted"); require(balanceOf(msg.sender)>data[freelance].accessPrice, "user has not enough tokens to get access to vault"); uint256 freelance_share = data[freelance].accessPrice.mul(data[freelance].sharingPlan).div(100); uint256 agent_share = data[freelance].accessPrice.sub(freelance_share); if(freelance_share>0) super.transfer(freelance, freelance_share); if(agent_share>0) super.transfer(data[freelance].appointedAgent, agent_share); accessAllowance[msg.sender][freelance].clientAgreement=true; accessAllowance[msg.sender][freelance].clientDate=block.number; emit Vault(msg.sender, freelance, VaultStatus.NewAccess); return true; } /** * @dev Simple getter to retrieve talent agent * @param freelance talent address * @return address of the agent **/ function getFreelanceAgent(address freelance) public view returns (address) { return data[freelance].appointedAgent; } /** * @dev Simple getter to check if user has access to a freelance vault * @param freelance talent address * @param user user address * @return true if access granted or false if not **/ function hasVaultAccess(address freelance, address user) public view returns (bool) { return ((accessAllowance[user][freelance].clientAgreement) || (data[freelance].appointedAgent == user)); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"freelance","type":"address"},{"name":"user","type":"address"}],"name":"hasVaultAccess","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mintingFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newagent","type":"address"},{"name":"newplan","type":"uint256"}],"name":"agentApproval","outputs":[],"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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newdeposit","type":"uint256"}],"name":"setVaultDeposit","outputs":[],"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":"freelance","type":"address"}],"name":"getFreelanceAgent","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"accessAllowance","outputs":[{"name":"clientAgreement","type":"bool"},{"name":"clientDate","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"ethers","type":"uint256"}],"name":"withdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"mint","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"closeVaultAccess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tokens","type":"uint256"}],"name":"withdrawTalao","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"theMarketplace","type":"address"}],"name":"setMarketplace","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"createVaultAccess","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finishMinting","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"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":"result","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"marketplace","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"data","outputs":[{"name":"accessPrice","type":"uint256"},{"name":"appointedAgent","type":"address"},{"name":"sharingPlan","type":"uint256"},{"name":"userDeposit","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"freelance","type":"address"}],"name":"getVaultAccess","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"client","type":"address"},{"indexed":true,"name":"freelance","type":"address"},{"indexed":false,"name":"status","type":"uint8"}],"name":"Vault","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintFinished","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"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"}]
Contract Creation Code
608060405260038054600160a860020a03191633179055611e5a806100256000396000f3006080604052600436106101945763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416626d96e0811461019957806305d2035b146101d457806306fdde03146101e9578063095ea7b3146102735780630b8414331461029757806318160ddd146102bd57806323b872dd146102e45780632529b9071461030e578063313ce567146103265780633411cb0814610351578063379dbdeb1461038e5780633bed33ce146103d057806340c10f19146103e85780636448b6cb1461040c57806364e8687f14610421578063661884631461043957806370a082311461045d57806373ad6c2d1461047e5780637aca84a11461049f5780637d64bcb4146104b75780638da5cb5b146104cc57806395d89b41146104e1578063a9059cbb146104f6578063abc8c7af1461051a578063b90d3d0c1461052f578063be65d27a1461057e578063cae9ca5114610593578063d73dd623146105fc578063dd62ed3e14610620578063f2fde38b14610647578063f6153ccd14610668578063fcf4b5761461067d575b600080fd5b3480156101a557600080fd5b506101c0600160a060020a036004358116906024351661069e565b604080519115158252519081900360200190f35b3480156101e057600080fd5b506101c06106fa565b3480156101f557600080fd5b506101fe61070a565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610238578181015183820152602001610220565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b506101c0600160a060020a0360043516602435610741565b3480156102a357600080fd5b506102bb600160a060020a03600435166024356107a2565b005b3480156102c957600080fd5b506102d2610981565b60408051918252519081900360200190f35b3480156102f057600080fd5b506101c0600160a060020a0360043581169060243516604435610987565b34801561031a57600080fd5b506102bb6004356109f1565b34801561033257600080fd5b5061033b610a0d565b6040805160ff9092168252519081900360200190f35b34801561035d57600080fd5b50610372600160a060020a0360043516610a12565b60408051600160a060020a039092168252519081900360200190f35b34801561039a57600080fd5b506103b5600160a060020a0360043581169060243516610a33565b60408051921515835260208301919091528051918290030190f35b3480156103dc57600080fd5b506102bb600435610a5d565b3480156103f457600080fd5b506101c0600160a060020a0360043516602435610aa5565b34801561041857600080fd5b506102bb610b9e565b34801561042d57600080fd5b506102bb600435610d52565b34801561044557600080fd5b506101c0600160a060020a0360043516602435610de6565b34801561046957600080fd5b506102d2600160a060020a0360043516610ed8565b34801561048a57600080fd5b506102bb600160a060020a0360043516610ef3565b3480156104ab57600080fd5b506102bb600435610f8d565b3480156104c357600080fd5b506101c06111d5565b3480156104d857600080fd5b50610372611259565b3480156104ed57600080fd5b506101fe611268565b34801561050257600080fd5b506101c0600160a060020a036004351660243561129f565b34801561052657600080fd5b50610372611300565b34801561053b57600080fd5b50610550600160a060020a036004351661130f565b60408051948552600160a060020a039093166020850152838301919091526060830152519081900360800190f35b34801561058a57600080fd5b506102d2611340565b34801561059f57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c0948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113469650505050505050565b34801561060857600080fd5b506101c0600160a060020a03600435166024356114b7565b34801561062c57600080fd5b506102d2600160a060020a0360043581169060243516611550565b34801561065357600080fd5b506102bb600160a060020a036004351661157b565b34801561067457600080fd5b506102d2611610565b34801561068957600080fd5b506101c0600160a060020a0360043516611616565b600160a060020a03808216600090815260076020908152604080832093861683529290529081205460ff16806106f35750600160a060020a038381166000908152600860205260409020600101548116908316145b9392505050565b60035460a060020a900460ff1681565b60408051808201909152600581527f54616c616f000000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff161515600114610798576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b6106f38383611928565b60035460a060020a900460ff1615156001146107f6576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b60008110158015610808575060648111155b151561085e576040805160e560020a62461bcd02815260206004820152601e60248201527f706c616e206d757374206265206265747765656e203020616e64203130300000604482015290519081900360640190fd5b33600090815260076020908152604080832090915290205460ff1615156001146108d2576040805160e560020a62461bcd02815260206004820152601a60248201527f7661756c7420686173206e6f74206265656e2063726561746564000000000000604482015290519081900360640190fd5b33600081815260086020908152604091829020600101548251600481529251600160a060020a0390911692600080516020611def83398151915292908290030190a33360008181526008602090815260409182902060018101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816908117909155600290910185905582516005815292519092600080516020611def83398151915292908290030190a35050565b60005481565b60035460009060a060020a900460ff1615156001146109de576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b6109e984848461198e565b949350505050565b600354600160a060020a03163314610a0857600080fd5b600555565b601281565b600160a060020a039081166000908152600860205260409020600101541690565b60076020908152600092835260408084209091529082529020805460019091015460ff9091169082565b600354600160a060020a03163314610a7457600080fd5b604051339082156108fc029083906000818181858888f19350505050158015610aa1573d6000803e3d6000fd5b5050565b600354600090600160a060020a03163314610abf57600080fd5b60035460a060020a900460ff1615610ad657600080fd5b600054610ae9908363ffffffff611af516565b6000908155600160a060020a038416815260016020526040902054610b14908363ffffffff611af516565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a03851691600091600080516020611e0f8339815191529181900360200190a350600192915050565b60035460a060020a900460ff161515600114610bf2576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b33600090815260076020908152604080832090915290205460ff161515600114610c66576040805160e560020a62461bcd02815260206004820152601a60248201527f7661756c7420686173206e6f74206265656e2063726561746564000000000000604482015290519081900360640190fd5b33600081815260086020526040902060030154610c84913091611b04565b1515610cda576040805160e560020a62461bcd02815260206004820152601d60248201527f746f6b656e206465706f736974207472616e73666572206661696c6564000000604482015290519081900360640190fd5b3360009081526007602090815260408083208252808320805460ff191690556008909152902060030154600654610d169163ffffffff611ca916565b6006553360008181526008602090815260408083206002018390558051928352518392600080516020611def83398151915292908290030190a3565b600354600160a060020a03163314610d6957600080fd5b80610d85600654610d7930610ed8565b9063ffffffff611ca916565b1015610ddb576040805160e560020a62461bcd02815260206004820152601560248201527f746f6f206d75636820746f6b656e732061736b65640000000000000000000000604482015290519081900360640190fd5b610aa1303383611b04565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610e3b57336000908152600260209081526040808320600160a060020a0388168452909152812055610e70565b610e4b818463ffffffff611ca916565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3600191505b5092915050565b600160a060020a031660009081526001602052604090205490565b60035460a060020a900460ff161515600114610f47576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b600354600160a060020a03163314610f5e57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60035460a060020a900460ff161515600114610fe1576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b33600090815260076020908152604080832090915290205460ff1615611051576040805160e560020a62461bcd02815260206004820152601560248201527f7661756c7420616c726561647920637265617465640000000000000000000000604482015290519081900360640190fd5b6005548111156110ab576040805160e560020a62461bcd02815260206004820152601760248201527f70726963652061736b656420697320746f6f2068696768000000000000000000604482015290519081900360640190fd5b6005546110b733610ed8565b11611132576040805160e560020a62461bcd02815260206004820152602a60248201527f7573657220686173206e6f7420656e6f75676820746f6b656e7320746f20736560448201527f6e64206465706f73697400000000000000000000000000000000000000000000606482015290519081900360840190fd5b336000908152600860205260409020819055600554611152903090611cbb565b506005546006546111689163ffffffff611af516565b6006556005543360008181526008602090815260408083206003810195909555606460029095019490945560078152838220815290839020805460ff191660019081179091558351908152925191928392600080516020611def833981519152929181900390910190a350565b600354600090600160a060020a031633146111ef57600080fd5b60035460a060020a900460ff161561120657600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b60408051808201909152600581527f54414c414f000000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff1615156001146112f6576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b6106f38383611cbb565b600454600160a060020a031681565b60086020526000908152604090208054600182015460028301546003909301549192600160a060020a039091169184565b60055481565b600354600090819060a060020a900460ff16151560011461139f576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b50836113ab8185610741565b156114af576040517f8f4ffcb10000000000000000000000000000000000000000000000000000000081523360048201818152602483018790523060448401819052608060648501908152875160848601528751600160a060020a03871695638f4ffcb195948b94938b939192909160a490910190602085019080838360005b8381101561144357818101518382015260200161142b565b50505050905090810190601f1680156114705780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561149257600080fd5b505af11580156114a6573d6000803e3d6000fd5b50505050600191505b509392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120546114eb908363ffffffff611af516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461159257600080fd5b600160a060020a03811615156115a757600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60065481565b6003546000908190819060a060020a900460ff161515600114611671576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b600160a060020a038416600090815260076020908152604080832090915290205460ff1615156001146116ee576040805160e560020a62461bcd02815260206004820152601460248201527f7661756c7420646f6573206e6f74206578697374000000000000000000000000604482015290519081900360640190fd5b336000908152600760209081526040808320600160a060020a038816845290915290205460ff1615156001141561176f576040805160e560020a62461bcd02815260206004820152601a60248201527f6163636573732077617320616c7265616479206772616e746564000000000000604482015290519081900360640190fd5b600160a060020a03841660009081526008602052604090205461179133610ed8565b1161180c576040805160e560020a62461bcd02815260206004820152603160248201527f7573657220686173206e6f7420656e6f75676820746f6b656e7320746f20676560448201527f742061636365737320746f207661756c74000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03841660009081526008602052604090206002810154905461184d916064916118419163ffffffff611d8c16565b9063ffffffff611db716565b600160a060020a038516600090815260086020526040902054909250611879908363ffffffff611ca916565b905060008211156118905761188e8483611cbb565b505b60008111156118c357600160a060020a038085166000908152600860205260409020600101546118c1911682611cbb565b505b336000818152600760209081526040808320600160a060020a03891680855290835292819020805460ff191660019081178255439101558051600681529051929392600080516020611def833981519152929181900390910190a35060019392505050565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03831615156119a557600080fd5b600160a060020a0384166000908152600160205260409020548211156119ca57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156119fa57600080fd5b600160a060020a038416600090815260016020526040902054611a23908363ffffffff611ca916565b600160a060020a038086166000908152600160205260408082209390935590851681522054611a58908363ffffffff611af516565b600160a060020a038085166000908152600160209081526040808320949094559187168152600282528281203382529091522054611a9c908363ffffffff611ca916565b600160a060020a0380861660008181526002602090815260408083203384528252918290209490945580518681529051928716939192600080516020611e0f833981519152929181900390910190a35060019392505050565b6000828201838110156106f357fe5b6000600160a060020a0383161515611b66576040805160e560020a62461bcd02815260206004820152601960248201527f64657374696e6174696f6e2063616e6e6f742062652030783000000000000000604482015290519081900360640190fd5b600160a060020a038416600090815260016020526040902054821115611bfc576040805160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f75676820746f6b656e7320696e2073656e6465722077616c6c60448201527f6574000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038416600090815260016020526040902054611c25908363ffffffff611ca916565b600160a060020a038086166000908152600160205260408082209390935590851681522054611c5a908363ffffffff611af516565b600160a060020a038085166000818152600160209081526040918290209490945580518681529051919392881692600080516020611e0f83398151915292918290030190a35060019392505050565b600082821115611cb557fe5b50900390565b6000600160a060020a0383161515611cd257600080fd5b33600090815260016020526040902054821115611cee57600080fd5b33600090815260016020526040902054611d0e908363ffffffff611ca916565b3360009081526001602052604080822092909255600160a060020a03851681522054611d40908363ffffffff611af516565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191923392600080516020611e0f8339815191529281900390910190a350600192915050565b600080831515611d9f5760009150610ed1565b50828202828482811515611daf57fe5b04146106f357fe5b6000808284811515611dc557fe5b0494935050505056006d696e74696e6720686173206e6f742066696e697368656400000000000000005eedfceb7cfa7af0c27e67695a9b85d49205af1ab214b4c0684d25a40ffa50b2ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058209448024299166d12649a4d0f17679009a964170f9a90891646f20fda93abbf2f0029
Deployed Bytecode
0x6080604052600436106101945763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416626d96e0811461019957806305d2035b146101d457806306fdde03146101e9578063095ea7b3146102735780630b8414331461029757806318160ddd146102bd57806323b872dd146102e45780632529b9071461030e578063313ce567146103265780633411cb0814610351578063379dbdeb1461038e5780633bed33ce146103d057806340c10f19146103e85780636448b6cb1461040c57806364e8687f14610421578063661884631461043957806370a082311461045d57806373ad6c2d1461047e5780637aca84a11461049f5780637d64bcb4146104b75780638da5cb5b146104cc57806395d89b41146104e1578063a9059cbb146104f6578063abc8c7af1461051a578063b90d3d0c1461052f578063be65d27a1461057e578063cae9ca5114610593578063d73dd623146105fc578063dd62ed3e14610620578063f2fde38b14610647578063f6153ccd14610668578063fcf4b5761461067d575b600080fd5b3480156101a557600080fd5b506101c0600160a060020a036004358116906024351661069e565b604080519115158252519081900360200190f35b3480156101e057600080fd5b506101c06106fa565b3480156101f557600080fd5b506101fe61070a565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610238578181015183820152602001610220565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b506101c0600160a060020a0360043516602435610741565b3480156102a357600080fd5b506102bb600160a060020a03600435166024356107a2565b005b3480156102c957600080fd5b506102d2610981565b60408051918252519081900360200190f35b3480156102f057600080fd5b506101c0600160a060020a0360043581169060243516604435610987565b34801561031a57600080fd5b506102bb6004356109f1565b34801561033257600080fd5b5061033b610a0d565b6040805160ff9092168252519081900360200190f35b34801561035d57600080fd5b50610372600160a060020a0360043516610a12565b60408051600160a060020a039092168252519081900360200190f35b34801561039a57600080fd5b506103b5600160a060020a0360043581169060243516610a33565b60408051921515835260208301919091528051918290030190f35b3480156103dc57600080fd5b506102bb600435610a5d565b3480156103f457600080fd5b506101c0600160a060020a0360043516602435610aa5565b34801561041857600080fd5b506102bb610b9e565b34801561042d57600080fd5b506102bb600435610d52565b34801561044557600080fd5b506101c0600160a060020a0360043516602435610de6565b34801561046957600080fd5b506102d2600160a060020a0360043516610ed8565b34801561048a57600080fd5b506102bb600160a060020a0360043516610ef3565b3480156104ab57600080fd5b506102bb600435610f8d565b3480156104c357600080fd5b506101c06111d5565b3480156104d857600080fd5b50610372611259565b3480156104ed57600080fd5b506101fe611268565b34801561050257600080fd5b506101c0600160a060020a036004351660243561129f565b34801561052657600080fd5b50610372611300565b34801561053b57600080fd5b50610550600160a060020a036004351661130f565b60408051948552600160a060020a039093166020850152838301919091526060830152519081900360800190f35b34801561058a57600080fd5b506102d2611340565b34801561059f57600080fd5b50604080516020600460443581810135601f81018490048402850184019095528484526101c0948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506113469650505050505050565b34801561060857600080fd5b506101c0600160a060020a03600435166024356114b7565b34801561062c57600080fd5b506102d2600160a060020a0360043581169060243516611550565b34801561065357600080fd5b506102bb600160a060020a036004351661157b565b34801561067457600080fd5b506102d2611610565b34801561068957600080fd5b506101c0600160a060020a0360043516611616565b600160a060020a03808216600090815260076020908152604080832093861683529290529081205460ff16806106f35750600160a060020a038381166000908152600860205260409020600101548116908316145b9392505050565b60035460a060020a900460ff1681565b60408051808201909152600581527f54616c616f000000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff161515600114610798576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b6106f38383611928565b60035460a060020a900460ff1615156001146107f6576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b60008110158015610808575060648111155b151561085e576040805160e560020a62461bcd02815260206004820152601e60248201527f706c616e206d757374206265206265747765656e203020616e64203130300000604482015290519081900360640190fd5b33600090815260076020908152604080832090915290205460ff1615156001146108d2576040805160e560020a62461bcd02815260206004820152601a60248201527f7661756c7420686173206e6f74206265656e2063726561746564000000000000604482015290519081900360640190fd5b33600081815260086020908152604091829020600101548251600481529251600160a060020a0390911692600080516020611def83398151915292908290030190a33360008181526008602090815260409182902060018101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038816908117909155600290910185905582516005815292519092600080516020611def83398151915292908290030190a35050565b60005481565b60035460009060a060020a900460ff1615156001146109de576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b6109e984848461198e565b949350505050565b600354600160a060020a03163314610a0857600080fd5b600555565b601281565b600160a060020a039081166000908152600860205260409020600101541690565b60076020908152600092835260408084209091529082529020805460019091015460ff9091169082565b600354600160a060020a03163314610a7457600080fd5b604051339082156108fc029083906000818181858888f19350505050158015610aa1573d6000803e3d6000fd5b5050565b600354600090600160a060020a03163314610abf57600080fd5b60035460a060020a900460ff1615610ad657600080fd5b600054610ae9908363ffffffff611af516565b6000908155600160a060020a038416815260016020526040902054610b14908363ffffffff611af516565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a03851691600091600080516020611e0f8339815191529181900360200190a350600192915050565b60035460a060020a900460ff161515600114610bf2576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b33600090815260076020908152604080832090915290205460ff161515600114610c66576040805160e560020a62461bcd02815260206004820152601a60248201527f7661756c7420686173206e6f74206265656e2063726561746564000000000000604482015290519081900360640190fd5b33600081815260086020526040902060030154610c84913091611b04565b1515610cda576040805160e560020a62461bcd02815260206004820152601d60248201527f746f6b656e206465706f736974207472616e73666572206661696c6564000000604482015290519081900360640190fd5b3360009081526007602090815260408083208252808320805460ff191690556008909152902060030154600654610d169163ffffffff611ca916565b6006553360008181526008602090815260408083206002018390558051928352518392600080516020611def83398151915292908290030190a3565b600354600160a060020a03163314610d6957600080fd5b80610d85600654610d7930610ed8565b9063ffffffff611ca916565b1015610ddb576040805160e560020a62461bcd02815260206004820152601560248201527f746f6f206d75636820746f6b656e732061736b65640000000000000000000000604482015290519081900360640190fd5b610aa1303383611b04565b336000908152600260209081526040808320600160a060020a038616845290915281205480831115610e3b57336000908152600260209081526040808320600160a060020a0388168452909152812055610e70565b610e4b818463ffffffff611ca916565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a3600191505b5092915050565b600160a060020a031660009081526001602052604090205490565b60035460a060020a900460ff161515600114610f47576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b600354600160a060020a03163314610f5e57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60035460a060020a900460ff161515600114610fe1576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b33600090815260076020908152604080832090915290205460ff1615611051576040805160e560020a62461bcd02815260206004820152601560248201527f7661756c7420616c726561647920637265617465640000000000000000000000604482015290519081900360640190fd5b6005548111156110ab576040805160e560020a62461bcd02815260206004820152601760248201527f70726963652061736b656420697320746f6f2068696768000000000000000000604482015290519081900360640190fd5b6005546110b733610ed8565b11611132576040805160e560020a62461bcd02815260206004820152602a60248201527f7573657220686173206e6f7420656e6f75676820746f6b656e7320746f20736560448201527f6e64206465706f73697400000000000000000000000000000000000000000000606482015290519081900360840190fd5b336000908152600860205260409020819055600554611152903090611cbb565b506005546006546111689163ffffffff611af516565b6006556005543360008181526008602090815260408083206003810195909555606460029095019490945560078152838220815290839020805460ff191660019081179091558351908152925191928392600080516020611def833981519152929181900390910190a350565b600354600090600160a060020a031633146111ef57600080fd5b60035460a060020a900460ff161561120657600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b60408051808201909152600581527f54414c414f000000000000000000000000000000000000000000000000000000602082015281565b60035460009060a060020a900460ff1615156001146112f6576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b6106f38383611cbb565b600454600160a060020a031681565b60086020526000908152604090208054600182015460028301546003909301549192600160a060020a039091169184565b60055481565b600354600090819060a060020a900460ff16151560011461139f576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b50836113ab8185610741565b156114af576040517f8f4ffcb10000000000000000000000000000000000000000000000000000000081523360048201818152602483018790523060448401819052608060648501908152875160848601528751600160a060020a03871695638f4ffcb195948b94938b939192909160a490910190602085019080838360005b8381101561144357818101518382015260200161142b565b50505050905090810190601f1680156114705780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561149257600080fd5b505af11580156114a6573d6000803e3d6000fd5b50505050600191505b509392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120546114eb908363ffffffff611af516565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461159257600080fd5b600160a060020a03811615156115a757600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60065481565b6003546000908190819060a060020a900460ff161515600114611671576040805160e560020a62461bcd0281526020600482015260186024820152600080516020611dcf833981519152604482015290519081900360640190fd5b600160a060020a038416600090815260076020908152604080832090915290205460ff1615156001146116ee576040805160e560020a62461bcd02815260206004820152601460248201527f7661756c7420646f6573206e6f74206578697374000000000000000000000000604482015290519081900360640190fd5b336000908152600760209081526040808320600160a060020a038816845290915290205460ff1615156001141561176f576040805160e560020a62461bcd02815260206004820152601a60248201527f6163636573732077617320616c7265616479206772616e746564000000000000604482015290519081900360640190fd5b600160a060020a03841660009081526008602052604090205461179133610ed8565b1161180c576040805160e560020a62461bcd02815260206004820152603160248201527f7573657220686173206e6f7420656e6f75676820746f6b656e7320746f20676560448201527f742061636365737320746f207661756c74000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a03841660009081526008602052604090206002810154905461184d916064916118419163ffffffff611d8c16565b9063ffffffff611db716565b600160a060020a038516600090815260086020526040902054909250611879908363ffffffff611ca916565b905060008211156118905761188e8483611cbb565b505b60008111156118c357600160a060020a038085166000908152600860205260409020600101546118c1911682611cbb565b505b336000818152600760209081526040808320600160a060020a03891680855290835292819020805460ff191660019081178255439101558051600681529051929392600080516020611def833981519152929181900390910190a35060019392505050565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03831615156119a557600080fd5b600160a060020a0384166000908152600160205260409020548211156119ca57600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156119fa57600080fd5b600160a060020a038416600090815260016020526040902054611a23908363ffffffff611ca916565b600160a060020a038086166000908152600160205260408082209390935590851681522054611a58908363ffffffff611af516565b600160a060020a038085166000908152600160209081526040808320949094559187168152600282528281203382529091522054611a9c908363ffffffff611ca916565b600160a060020a0380861660008181526002602090815260408083203384528252918290209490945580518681529051928716939192600080516020611e0f833981519152929181900390910190a35060019392505050565b6000828201838110156106f357fe5b6000600160a060020a0383161515611b66576040805160e560020a62461bcd02815260206004820152601960248201527f64657374696e6174696f6e2063616e6e6f742062652030783000000000000000604482015290519081900360640190fd5b600160a060020a038416600090815260016020526040902054821115611bfc576040805160e560020a62461bcd02815260206004820152602260248201527f6e6f7420656e6f75676820746f6b656e7320696e2073656e6465722077616c6c60448201527f6574000000000000000000000000000000000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a038416600090815260016020526040902054611c25908363ffffffff611ca916565b600160a060020a038086166000908152600160205260408082209390935590851681522054611c5a908363ffffffff611af516565b600160a060020a038085166000818152600160209081526040918290209490945580518681529051919392881692600080516020611e0f83398151915292918290030190a35060019392505050565b600082821115611cb557fe5b50900390565b6000600160a060020a0383161515611cd257600080fd5b33600090815260016020526040902054821115611cee57600080fd5b33600090815260016020526040902054611d0e908363ffffffff611ca916565b3360009081526001602052604080822092909255600160a060020a03851681522054611d40908363ffffffff611af516565b600160a060020a038416600081815260016020908152604091829020939093558051858152905191923392600080516020611e0f8339815191529281900390910190a350600192915050565b600080831515611d9f5760009150610ed1565b50828202828482811515611daf57fe5b04146106f357fe5b6000808284811515611dc557fe5b0494935050505056006d696e74696e6720686173206e6f742066696e697368656400000000000000005eedfceb7cfa7af0c27e67695a9b85d49205af1ab214b4c0684d25a40ffa50b2ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058209448024299166d12649a4d0f17679009a964170f9a90891646f20fda93abbf2f0029
Swarm Source
bzzr://9448024299166d12649a4d0f17679009a964170f9a90891646f20fda93abbf2f
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.