More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,079 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Finalize Token S... | 5166014 | 2461 days ago | IN | 0 ETH | 0.00109554 | ||||
Unpause | 5166010 | 2461 days ago | IN | 0 ETH | 0.00084501 | ||||
Allocate Tokens | 5120438 | 2468 days ago | IN | 0 ETH | 0.00130138 | ||||
Allocate Tokens | 5120435 | 2468 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119160 | 2469 days ago | IN | 0 ETH | 0.00120616 | ||||
Allocate Tokens | 5119155 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119152 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119147 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119143 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119141 | 2469 days ago | IN | 0 ETH | 0.00130036 | ||||
Allocate Tokens | 5119137 | 2469 days ago | IN | 0 ETH | 0.00120616 | ||||
Allocate Tokens | 5119133 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119131 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119128 | 2469 days ago | IN | 0 ETH | 0.00120616 | ||||
Allocate Tokens | 5119124 | 2469 days ago | IN | 0 ETH | 0.00130138 | ||||
Allocate Tokens | 5119120 | 2469 days ago | IN | 0 ETH | 0.00130036 | ||||
Allocate Tokens | 5119117 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119115 | 2469 days ago | IN | 0 ETH | 0.00120564 | ||||
Allocate Tokens | 5119112 | 2469 days ago | IN | 0 ETH | 0.00120616 | ||||
Allocate Tokens | 5119108 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119106 | 2469 days ago | IN | 0 ETH | 0.00130138 | ||||
Allocate Tokens | 5119100 | 2469 days ago | IN | 0 ETH | 0.00130138 | ||||
Allocate Tokens | 5119094 | 2469 days ago | IN | 0 ETH | 0.00130087 | ||||
Allocate Tokens | 5119091 | 2469 days ago | IN | 0 ETH | 0.00120564 | ||||
Allocate Tokens | 5119089 | 2469 days ago | IN | 0 ETH | 0.00120564 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
5087916 | 2474 days ago | 0.4 ETH | ||||
5087903 | 2474 days ago | 10 ETH | ||||
5087900 | 2474 days ago | 1 ETH | ||||
5087898 | 2474 days ago | 0.1 ETH | ||||
5087897 | 2474 days ago | 0.45 ETH | ||||
5087892 | 2474 days ago | 1 ETH | ||||
5087889 | 2474 days ago | 1 ETH | ||||
5087882 | 2474 days ago | 0.43 ETH | ||||
5087879 | 2474 days ago | 1 ETH | ||||
5087877 | 2474 days ago | 0.4 ETH | ||||
5087871 | 2474 days ago | 1 ETH | ||||
5087858 | 2474 days ago | 1 ETH | ||||
5087847 | 2474 days ago | 0.5 ETH | ||||
5087842 | 2474 days ago | 4 ETH | ||||
5087841 | 2474 days ago | 0.01 ETH | ||||
5087827 | 2474 days ago | 5 ETH | ||||
5087827 | 2474 days ago | 0.99 ETH | ||||
5087818 | 2474 days ago | 1 ETH | ||||
5087811 | 2474 days ago | 0.5 ETH | ||||
5087806 | 2474 days ago | 0.7 ETH | ||||
5087798 | 2474 days ago | 2.03314 ETH | ||||
5087785 | 2474 days ago | 0.17 ETH | ||||
5087783 | 2474 days ago | 1.5 ETH | ||||
5087782 | 2474 days ago | 1 ETH | ||||
5087770 | 2474 days ago | 1 ETH |
Loading...
Loading
Contract Name:
FundRequestTokenGeneration
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-02-08 */ pragma solidity ^0.4.18; // FundRequest Token Sale // // @authors: // Davy Van Roy <[email protected]> // Quinten De Swaef <[email protected]> // // By sending ETH to this contract, you agree to the terms and conditions for participating in the FundRequest Token Sale: // https://sale.fundrequest.io/assets/Terms-Conditions.pdf // // Security audit performed by LeastAuthority: // https://github.com/FundRequest/audit-reports/raw/master/2018-02-06 - Least Authority - ICO Contracts Audit Report.pdf contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 _amount, address _token, bytes _data) public; } /// @dev `Owned` is a base level contract that assigns an `owner` that can be /// later changed contract Owned { /// @dev `owner` is the only address that can call a function with this /// modifier modifier onlyOwner { require (msg.sender == owner); _; } address public owner; /// @notice The Constructor assigns the message sender to be `owner` function Owned() public { owner = msg.sender;} /// @notice `owner` can step down and assign some other address to this role /// @param _newOwner The address of the new owner. 0x0 can be used to create /// an unowned neutral vault, however that cannot be undone function changeOwner(address _newOwner) public onlyOwner { owner = _newOwner; } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused); _; } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; Unpause(); } } contract Controlled { /// @notice The address of the controller is the only address that can call /// a function with this modifier modifier onlyController { require(msg.sender == controller); _; } address public controller; function Controlled() public { controller = msg.sender;} /// @notice Changes the controller of the contract /// @param _newController The new controller of the contract function changeController(address _newController) public onlyController { controller = _newController; } } /// @dev This contract is used to generate clone contracts from a contract. /// In solidity this is the way to create a contract from a contract of the /// same class contract MiniMeTokenFactory { /// @notice Update the DApp by creating a new token with new functionalities /// the msg.sender becomes the controller of this clone token /// @param _parentToken Address of the token being cloned /// @param _snapshotBlock Block of the parent token that will /// determine the initial distribution of the clone token /// @param _tokenName Name of the new token /// @param _decimalUnits Number of decimals of the new token /// @param _tokenSymbol Token Symbol for the new token /// @param _transfersEnabled If true, tokens will be able to be transferred /// @return The address of the new token contract function createCloneToken( address _parentToken, uint _snapshotBlock, string _tokenName, uint8 _decimalUnits, string _tokenSymbol, bool _transfersEnabled ) public returns (MiniMeToken) { MiniMeToken newToken = new MiniMeToken( this, _parentToken, _snapshotBlock, _tokenName, _decimalUnits, _tokenSymbol, _transfersEnabled ); newToken.changeController(msg.sender); return newToken; } } /* Copyright 2016, Jordi Baylina This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ /// @title MiniMeToken Contract /// @author Jordi Baylina /// @dev This token contract's goal is to make it easy for anyone to clone this /// token using the token distribution at a given block, this will allow DAO's /// and DApps to upgrade their features in a decentralized manner without /// affecting the original token /// @dev It is ERC20 compliant, but still needs to under go further testing. /// @dev The actual token contract, the default controller is the msg.sender /// that deploys the contract, so usually this token will be deployed by a /// token controller contract, which Giveth will call a "Campaign" contract MiniMeToken is Controlled { string public name; //The Token's name: e.g. DigixDAO Tokens uint8 public decimals; //Number of decimals of the smallest unit string public symbol; //An identifier: e.g. REP string public version = "1.0.0"; /// @dev `Checkpoint` is the structure that attaches a block number to a /// given value, the block number attached is the one that last changed the /// value struct Checkpoint { // `fromBlock` is the block number that the value was generated from uint128 fromBlock; // `value` is the amount of tokens at a specific block number uint128 value; } // `parentToken` is the Token address that was cloned to produce this token; // it will be 0x0 for a token that was not cloned MiniMeToken public parentToken; // `parentSnapShotBlock` is the block number from the Parent Token that was // used to determine the initial distribution of the Clone Token uint public parentSnapShotBlock; // `creationBlock` is the block number that the Clone Token was created uint public creationBlock; // `balances` is the map that tracks the balance of each address, in this // contract when the balance changes the block number that the change // occurred is also included in the map mapping (address => Checkpoint[]) balances; // `allowed` tracks any extra transfer rights as in all ERC20 tokens mapping (address => mapping (address => uint256)) allowed; // Tracks the history of the `totalSupply` of the token Checkpoint[] totalSupplyHistory; // Flag that determines if the token is transferable or not. bool public transfersEnabled; // The factory used to create new clone tokens MiniMeTokenFactory public tokenFactory; //////////////// // Constructor //////////////// /// @notice Constructor to create a MiniMeToken /// @param _tokenFactory The address of the MiniMeTokenFactory contract that /// will create the Clone token contracts, the token factory needs to be /// deployed first /// @param _parentToken Address of the parent token, set to 0x0 if it is a /// new token /// @param _parentSnapShotBlock Block of the parent token that will /// determine the initial distribution of the clone token, set to 0 if it /// is a new token /// @param _tokenName Name of the new token /// @param _decimalUnits Number of decimals of the new token /// @param _tokenSymbol Token Symbol for the new token /// @param _transfersEnabled If true, tokens will be able to be transferred function MiniMeToken( address _tokenFactory, address _parentToken, uint _parentSnapShotBlock, string _tokenName, uint8 _decimalUnits, string _tokenSymbol, bool _transfersEnabled ) public { tokenFactory = MiniMeTokenFactory(_tokenFactory); name = _tokenName; // Set the name decimals = _decimalUnits; // Set the decimals symbol = _tokenSymbol; // Set the symbol parentToken = MiniMeToken(_parentToken); parentSnapShotBlock = _parentSnapShotBlock; transfersEnabled = _transfersEnabled; creationBlock = block.number; } /////////////////// // ERC20 Methods /////////////////// /// @notice Send `_amount` tokens to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _amount The amount of tokens to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _amount) public returns (bool success) { require(transfersEnabled); return doTransfer(msg.sender, _to, _amount); } /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it /// is approved by `_from` /// @param _from The address holding the tokens being transferred /// @param _to The address of the recipient /// @param _amount The amount of tokens to be transferred /// @return True if the transfer was successful function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) { // The controller of this contract can move tokens around at will, // this is important to recognize! Confirm that you trust the // controller of this contract, which in most situations should be // another open source smart contract or 0x0 if (msg.sender != controller) { require(transfersEnabled); // The standard ERC 20 transferFrom functionality if (allowed[_from][msg.sender] < _amount) { return false; } allowed[_from][msg.sender] -= _amount; } return doTransfer(_from, _to, _amount); } /// @dev This is the actual transfer function in the token contract, it can /// only be called by other functions in this contract. /// @param _from The address holding the tokens being transferred /// @param _to The address of the recipient /// @param _amount The amount of tokens to be transferred /// @return True if the transfer was successful function doTransfer(address _from, address _to, uint _amount ) internal returns(bool) { if (_amount == 0) { return true; } require(parentSnapShotBlock < block.number); // Do not allow transfer to 0x0 or the token contract itself require((_to != 0) && (_to != address(this))); // If the amount being transfered is more than the balance of the // account the transfer returns false var previousBalanceFrom = balanceOfAt(_from, block.number); if (previousBalanceFrom < _amount) { return false; } // Alerts the token controller of the transfer if (isContract(controller)) { require(TokenController(controller).onTransfer(_from, _to, _amount)); } // First update the balance array with the new value for the address // sending the tokens updateValueAtNow(balances[_from], previousBalanceFrom - _amount); // Then update the balance array with the new value for the address // receiving the tokens var previousBalanceTo = balanceOfAt(_to, block.number); require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow updateValueAtNow(balances[_to], previousBalanceTo + _amount); // An event to make the transfer easy to find on the blockchain Transfer(_from, _to, _amount); return true; } /// @param _owner The address that's balance is being requested /// @return The balance of `_owner` at the current block function balanceOf(address _owner) public constant returns (uint256 balance) { return balanceOfAt(_owner, block.number); } /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on /// its behalf. This is a modified version of the ERC20 approve function /// to be a little bit safer /// @param _spender The address of the account able to transfer the tokens /// @param _amount The amount of tokens to be approved for transfer /// @return True if the approval was successful function approve(address _spender, uint256 _amount) public returns (bool success) { require(transfersEnabled); // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender,0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_amount == 0) || (allowed[msg.sender][_spender] == 0)); return doApprove(_spender, _amount); } function doApprove(address _spender, uint256 _amount) internal returns (bool success) { require(transfersEnabled); if (isContract(controller)) { require(TokenController(controller).onApprove(msg.sender, _spender, _amount)); } allowed[msg.sender][_spender] = _amount; Approval(msg.sender, _spender, _amount); return true; } /// @dev This function makes it easy to read the `allowed[]` map /// @param _owner The address of the account that owns the token /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens of _owner that _spender is allowed /// to spend function allowance(address _owner, address _spender ) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /// @notice `msg.sender` approves `_spender` to send `_amount` tokens on /// its behalf, and then a function is triggered in the contract that is /// being approved, `_spender`. This allows users to use their tokens to /// interact with contracts in one function call instead of two /// @param _spender The address of the contract able to transfer the tokens /// @param _amount The amount of tokens to be approved for transfer /// @return True if the function call was successful function approveAndCall(address _spender, uint256 _amount, bytes _extraData ) public returns (bool success) { require(approve(_spender, _amount)); ApproveAndCallFallBack(_spender).receiveApproval( msg.sender, _amount, this, _extraData ); return true; } /// @dev This function makes it easy to get the total number of tokens /// @return The total number of tokens function totalSupply() public constant returns (uint) { return totalSupplyAt(block.number); } //////////////// // Query balance and totalSupply in History //////////////// /// @dev Queries the balance of `_owner` at a specific `_blockNumber` /// @param _owner The address from which the balance will be retrieved /// @param _blockNumber The block number when the balance is queried /// @return The balance at `_blockNumber` function balanceOfAt(address _owner, uint _blockNumber) public constant returns (uint) { // These next few lines are used when the balance of the token is // requested before a check point was ever created for this token, it // requires that the `parentToken.balanceOfAt` be queried at the // genesis block for that token as this contains initial balance of // this token if ((balances[_owner].length == 0) || (balances[_owner][0].fromBlock > _blockNumber)) { if (address(parentToken) != 0) { return parentToken.balanceOfAt(_owner, min(_blockNumber, parentSnapShotBlock)); } else { // Has no parent return 0; } // This will return the expected balance during normal situations } else { return getValueAt(balances[_owner], _blockNumber); } } /// @notice Total amount of tokens at a specific `_blockNumber`. /// @param _blockNumber The block number when the totalSupply is queried /// @return The total amount of tokens at `_blockNumber` function totalSupplyAt(uint _blockNumber) public constant returns(uint) { // These next few lines are used when the totalSupply of the token is // requested before a check point was ever created for this token, it // requires that the `parentToken.totalSupplyAt` be queried at the // genesis block for this token as that contains totalSupply of this // token at this block number. if ((totalSupplyHistory.length == 0) || (totalSupplyHistory[0].fromBlock > _blockNumber)) { if (address(parentToken) != 0) { return parentToken.totalSupplyAt(min(_blockNumber, parentSnapShotBlock)); } else { return 0; } // This will return the expected totalSupply during normal situations } else { return getValueAt(totalSupplyHistory, _blockNumber); } } //////////////// // Clone Token Method //////////////// /// @notice Creates a new clone token with the initial distribution being /// this token at `_snapshotBlock` /// @param _cloneTokenName Name of the clone token /// @param _cloneDecimalUnits Number of decimals of the smallest unit /// @param _cloneTokenSymbol Symbol of the clone token /// @param _snapshotBlock Block when the distribution of the parent token is /// copied to set the initial distribution of the new clone token; /// if the block is zero than the actual block, the current block is used /// @param _transfersEnabled True if transfers are allowed in the clone /// @return The address of the new MiniMeToken Contract function createCloneToken( string _cloneTokenName, uint8 _cloneDecimalUnits, string _cloneTokenSymbol, uint _snapshotBlock, bool _transfersEnabled ) public returns(address) { if (_snapshotBlock == 0) { _snapshotBlock = block.number; } MiniMeToken cloneToken = tokenFactory.createCloneToken( this, _snapshotBlock, _cloneTokenName, _cloneDecimalUnits, _cloneTokenSymbol, _transfersEnabled ); cloneToken.changeController(msg.sender); // An event to make the token easy to find on the blockchain NewCloneToken(address(cloneToken), _snapshotBlock); return address(cloneToken); } //////////////// // Generate and destroy tokens //////////////// /// @notice Generates `_amount` tokens that are assigned to `_owner` /// @param _owner The address that will be assigned the new tokens /// @param _amount The quantity of tokens generated /// @return True if the tokens are generated correctly function generateTokens(address _owner, uint _amount) public onlyController returns (bool) { uint curTotalSupply = totalSupply(); require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow uint previousBalanceTo = balanceOf(_owner); require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow updateValueAtNow(totalSupplyHistory, curTotalSupply + _amount); updateValueAtNow(balances[_owner], previousBalanceTo + _amount); Transfer(0, _owner, _amount); return true; } /// @notice Burns `_amount` tokens from `_owner` /// @param _owner The address that will lose the tokens /// @param _amount The quantity of tokens to burn /// @return True if the tokens are burned correctly function destroyTokens(address _owner, uint _amount ) onlyController public returns (bool) { uint curTotalSupply = totalSupply(); require(curTotalSupply >= _amount); uint previousBalanceFrom = balanceOf(_owner); require(previousBalanceFrom >= _amount); updateValueAtNow(totalSupplyHistory, curTotalSupply - _amount); updateValueAtNow(balances[_owner], previousBalanceFrom - _amount); Transfer(_owner, 0, _amount); return true; } //////////////// // Enable tokens transfers //////////////// /// @notice Enables token holders to transfer their tokens freely if true /// @param _transfersEnabled True if transfers are allowed in the clone function enableTransfers(bool _transfersEnabled) public onlyController { transfersEnabled = _transfersEnabled; } //////////////// // Internal helper functions to query and set a value in a snapshot array //////////////// /// @dev `getValueAt` retrieves the number of tokens at a given block number /// @param checkpoints The history of values being queried /// @param _block The block number to retrieve the value at /// @return The number of tokens being queried function getValueAt(Checkpoint[] storage checkpoints, uint _block) constant internal returns (uint) { if (checkpoints.length == 0) { return 0; } // Shortcut for the actual value if (_block >= checkpoints[checkpoints.length-1].fromBlock) { return checkpoints[checkpoints.length-1].value; } if (_block < checkpoints[0].fromBlock) { return 0; } // Binary search of the value in the array uint min = 0; uint max = checkpoints.length - 1; while (max > min) { uint mid = (max + min + 1) / 2; if (checkpoints[mid].fromBlock<=_block) { min = mid; } else { max = mid-1; } } return checkpoints[min].value; } /// @dev `updateValueAtNow` used to update the `balances` map and the /// `totalSupplyHistory` /// @param checkpoints The history of data being updated /// @param _value The new number of tokens function updateValueAtNow(Checkpoint[] storage checkpoints, uint _value ) internal { if ((checkpoints.length == 0) || (checkpoints[checkpoints.length-1].fromBlock < block.number)) { Checkpoint storage newCheckPoint = checkpoints[checkpoints.length++]; newCheckPoint.fromBlock = uint128(block.number); newCheckPoint.value = uint128(_value); } else { Checkpoint storage oldCheckPoint = checkpoints[checkpoints.length-1]; oldCheckPoint.value = uint128(_value); } } /// @dev Internal function to determine if an address is a contract /// @param _addr The address being queried /// @return True if `_addr` is a contract function isContract(address _addr) constant internal returns(bool) { uint size; if (_addr == 0) { return false; } assembly { size := extcodesize(_addr) } return size>0; } /// @dev Helper function to return a min betwen the two uints function min(uint a, uint b) pure internal returns (uint) { return a < b ? a : b; } /// @notice The fallback function: If the contract's controller has not been /// set to 0, then the `proxyPayment` method is called which relays the /// ether and creates tokens as described in the token controller contract function () public payable { require(isContract(controller)); require(TokenController(controller).proxyPayment.value(msg.value)(msg.sender)); } ////////// // Safety Methods ////////// /// @notice This method can be used by the controller to extract mistakenly /// sent tokens to this contract. /// @param _token The address of the token contract that you want to recover /// set to 0 in case you want to extract ether. function claimTokens(address _token) public onlyController { if (_token == 0x0) { controller.transfer(this.balance); return; } MiniMeToken token = MiniMeToken(_token); uint balance = token.balanceOf(this); token.transfer(controller, balance); ClaimedTokens(_token, controller, balance); } //////////////// // Events //////////////// event ClaimedTokens(address indexed _token, address indexed _controller, uint _amount); event Transfer(address indexed _from, address indexed _to, uint256 _amount); event NewCloneToken(address indexed _cloneToken, uint _snapshotBlock); event Approval( address indexed _owner, address indexed _spender, uint256 _amount ); } /// @dev The token controller contract must implement these functions contract TokenController { /// @notice Called when `_owner` sends ether to the MiniMe Token contract /// @param _owner The address that sent the ether to create tokens /// @return True if the ether is accepted, false if it throws function proxyPayment(address _owner) public payable returns(bool); /// @notice Notifies the controller about a token transfer allowing the /// controller to react if desired /// @param _from The origin of the transfer /// @param _to The destination of the transfer /// @param _amount The amount of the transfer /// @return False if the controller does not authorize the transfer function onTransfer(address _from, address _to, uint _amount) public returns(bool); /// @notice Notifies the controller about an approval allowing the /// controller to react if desired /// @param _owner The address that calls `approve()` /// @param _spender The spender in the `approve()` call /// @param _amount The amount in the `approve()` call /// @return False if the controller does not authorize the approval function onApprove(address _owner, address _spender, uint _amount) public returns(bool); } contract FundRequestTokenGeneration is Pausable, TokenController { using SafeMath for uint256; MiniMeToken public tokenContract; address public tokensaleWallet; address public founderWallet; uint public rate; mapping (address => uint) public deposits; mapping (address => Countries) public allowed; uint public maxCap; // In wei uint256 public totalCollected; // In wei // personal caps and activations bool public personalCapActive = true; uint256 public personalCap; //country whitelisting enum Countries {NOT_WHITELISTED, CHINA, KOREA, USA, OTHER} mapping (uint => bool) public allowedCountries; //events event Paid(address indexed _beneficiary, uint256 _weiAmount, uint256 _tokenAmount, bool _personalCapActive); function FundRequestTokenGeneration( address _tokenAddress, address _founderWallet, address _tokensaleWallet, uint _rate, uint _maxCap, uint256 _personalCap) public { tokenContract = MiniMeToken(_tokenAddress); tokensaleWallet = _tokensaleWallet; founderWallet = _founderWallet; rate = _rate; maxCap = _maxCap; personalCap = _personalCap; allowedCountries[uint(Countries.CHINA)] = true; allowedCountries[uint(Countries.KOREA)] = true; allowedCountries[uint(Countries.USA)] = true; allowedCountries[uint(Countries.OTHER)] = true; } function() public payable whenNotPaused { doPayment(msg.sender); } /// @notice `proxyPayment()` allows the caller to send ether to the Campaign and /// have the tokens created in an address of their choosing /// @param _owner The address that will hold the newly created tokens function proxyPayment(address _owner) public payable whenNotPaused returns (bool) { doPayment(_owner); return true; } function doPayment(address beneficiary) whenNotPaused internal { require(validPurchase(beneficiary)); require(maxCapNotReached()); require(personalCapNotReached(beneficiary)); uint256 weiAmount = msg.value; uint256 updatedWeiRaised = totalCollected.add(weiAmount); uint256 tokensInWei = weiAmount.mul(rate); totalCollected = updatedWeiRaised; deposits[beneficiary] = deposits[beneficiary].add(msg.value); distributeTokens(beneficiary, tokensInWei); Paid(beneficiary, weiAmount, tokensInWei, personalCapActive); forwardFunds(); return; } function allocateTokens(address beneficiary, uint256 tokensSold) public onlyOwner { distributeTokens(beneficiary, tokensSold); } function finalizeTokenSale() public onlyOwner { pause(); tokenContract.changeController(owner); } function distributeTokens(address beneficiary, uint256 tokensSold) internal { uint256 totalTokensInWei = tokensSold.mul(100).div(40); require(tokenContract.generateTokens(beneficiary, tokensSold)); require(generateExtraTokens(totalTokensInWei, tokensaleWallet, 60)); } function validPurchase(address beneficiary) internal view returns (bool) { require(tokenContract.controller() != 0); require(msg.value >= 0.01 ether); Countries beneficiaryCountry = allowed[beneficiary]; /* the country needs to > 0 (whitelisted) */ require(uint(beneficiaryCountry) > uint(Countries.NOT_WHITELISTED)); /* country needs to be allowed */ require(allowedCountries[uint(beneficiaryCountry)] == true); return true; } function generateExtraTokens(uint256 _total, address _owner, uint _pct) internal returns (bool) { uint256 tokensInWei = _total.div(100).mul(_pct); require(tokenContract.generateTokens(_owner, tokensInWei)); return true; } function allow(address beneficiary, Countries _country) public onlyOwner { allowed[beneficiary] = _country; } function allowMultiple(address[] _beneficiaries, Countries _country) public onlyOwner { for (uint b = 0; b < _beneficiaries.length; b++) { allow(_beneficiaries[b], _country); } } function allowCountry(Countries _country, bool _allowed) public onlyOwner { require(uint(_country) > 0); allowedCountries[uint(_country)] = _allowed; } function maxCapNotReached() internal view returns (bool) { return totalCollected.add(msg.value) <= maxCap; } function personalCapNotReached(address _beneficiary) internal view returns (bool) { if (personalCapActive) { return deposits[_beneficiary].add(msg.value) <= personalCap; } else { return true; } } function setMaxCap(uint _maxCap) public onlyOwner { maxCap = _maxCap; } /* setters for wallets */ function setTokensaleWallet(address _tokensaleWallet) public onlyOwner { tokensaleWallet = _tokensaleWallet; } function setFounderWallet(address _founderWallet) public onlyOwner { founderWallet = _founderWallet; } function setPersonalCap(uint256 _capInWei) public onlyOwner { personalCap = _capInWei; } function setPersonalCapActive(bool _active) public onlyOwner { personalCapActive = _active; } function forwardFunds() internal { founderWallet.transfer(msg.value); } /* fix for accidental token sending */ function withdrawToken(address _token, uint256 _amount) public onlyOwner { require(MiniMeToken(_token).transfer(owner, _amount)); } //incase something does a suicide and funds end up here, we need to be able to withdraw them function withdraw(address _to) public onlyOwner { _to.transfer(this.balance); } function onTransfer(address _from, address _to, uint _amount) public returns (bool) { return true; } function onApprove(address _owner, address _spender, uint _amount) public returns (bool) { return true; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"_country","type":"uint8"}],"name":"allow","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokensaleWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"allowedCountries","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"onTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_maxCap","type":"uint256"}],"name":"setMaxCap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"finalizeTokenSale","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"beneficiary","type":"address"},{"name":"tokensSold","type":"uint256"}],"name":"allocateTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_active","type":"bool"}],"name":"setPersonalCapActive","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"personalCapActive","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"founderWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_country","type":"uint8"},{"name":"_allowed","type":"bool"}],"name":"allowCountry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokensaleWallet","type":"address"}],"name":"setTokensaleWallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"personalCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_founderWallet","type":"address"}],"name":"setFounderWallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiaries","type":"address[]"},{"name":"_country","type":"uint8"}],"name":"allowMultiple","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"onApprove","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"proxyPayment","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_capInWei","type":"uint256"}],"name":"setPersonalCap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"deposits","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_tokenAddress","type":"address"},{"name":"_founderWallet","type":"address"},{"name":"_tokensaleWallet","type":"address"},{"name":"_rate","type":"uint256"},{"name":"_maxCap","type":"uint256"},{"name":"_personalCap","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_weiAmount","type":"uint256"},{"indexed":false,"name":"_tokenAmount","type":"uint256"},{"indexed":false,"name":"_personalCapActive","type":"bool"}],"name":"Paid","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]
Contract Creation Code
606060405260008060146101000a81548160ff0219169083151502179055506001600960006101000a81548160ff021916908315150217905550341561004457600080fd5b60405160c080611eff83398101604052808051906020019091908051906020019091908051906020019091908051906020019091908051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826004819055508160078190555080600a819055506001600b6000600160048111156101b857fe5b815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600b6000600260048111156101f057fe5b815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600b60006003600481111561022857fe5b815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600b600060048081111561025f57fe5b815260200190815260200160002060006101000a81548160ff021916908315150217905550505050505050611c66806102996000396000f30060606040526004361061018b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806304b57191146101b257806323548b8b146101f75780632c4e722e1461022057806331bf0667146102495780633f4ba83a1461029e57806342181b8e146102b35780634a393149146102ee57806351cff8d91461036757806355a373d6146103a05780635c975abb146103f5578063763265de146104225780637693488b146104455780638456cb591461045a57806386ce02851461046f57806386d6eaa2146104b15780638a34396a146104d65780638da5cb5b146105035780639e281a9814610558578063a23d3c351461059a578063a6f9dae1146105ef578063b206979614610628578063c16ae1e014610659578063c7c2aee314610692578063cee36053146106bb578063d63a8e11146106f4578063d80b771b1461074f578063da682aeb146107b5578063e29eb8361461082e578063f48c305414610857578063f760f2281461089d578063fc7e286d146108c0575b600060149054906101000a900460ff161515156101a757600080fd5b6101b03361090d565b005b34156101bd57600080fd5b6101f5600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803560ff16906020019091905050610abe565b005b341561020257600080fd5b61020a610b7d565b6040518082815260200191505060405180910390f35b341561022b57600080fd5b610233610b83565b6040518082815260200191505060405180910390f35b341561025457600080fd5b61025c610b89565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102a957600080fd5b6102b1610baf565b005b34156102be57600080fd5b6102d46004808035906020019091905050610c6d565b604051808215151515815260200191505060405180910390f35b34156102f957600080fd5b61034d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c8d565b604051808215151515815260200191505060405180910390f35b341561037257600080fd5b61039e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c9a565b005b34156103ab57600080fd5b6103b3610d4f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561040057600080fd5b610408610d75565b604051808215151515815260200191505060405180910390f35b341561042d57600080fd5b6104436004808035906020019091905050610d88565b005b341561045057600080fd5b610458610ded565b005b341561046557600080fd5b61046d610f43565b005b341561047a57600080fd5b6104af600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611003565b005b34156104bc57600080fd5b6104d46004808035151590602001909190505061106c565b005b34156104e157600080fd5b6104e96110e4565b604051808215151515815260200191505060405180910390f35b341561050e57600080fd5b6105166110f7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561056357600080fd5b610598600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061111c565b005b34156105a557600080fd5b6105ad61126d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105fa57600080fd5b610626600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611293565b005b341561063357600080fd5b610657600480803560ff169060200190919080351515906020019091905050611331565b005b341561066457600080fd5b610690600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113e0565b005b341561069d57600080fd5b6106a561147f565b6040518082815260200191505060405180910390f35b34156106c657600080fd5b6106f2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611485565b005b34156106ff57600080fd5b61072b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611524565b6040518082600481111561073b57fe5b60ff16815260200191505060405180910390f35b341561075a57600080fd5b6107b360048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803560ff16906020019091905050611544565b005b34156107c057600080fd5b610814600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115e2565b604051808215151515815260200191505060405180910390f35b341561083957600080fd5b6108416115ef565b6040518082815260200191505060405180910390f35b610883600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115f5565b604051808215151515815260200191505060405180910390f35b34156108a857600080fd5b6108be6004808035906020019091905050611624565b005b34156108cb57600080fd5b6108f7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611689565b6040518082815260200191505060405180910390f35b60008060008060149054906101000a900460ff1615151561092d57600080fd5b610936846116a1565b151561094157600080fd5b610949611844565b151561095457600080fd5b61095d84611865565b151561096857600080fd5b349250610980836008546118e490919063ffffffff16565b91506109976004548461190290919063ffffffff16565b9050816008819055506109f234600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e490919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a3f8482611935565b8373ffffffffffffffffffffffffffffffffffffffff167f470999142a1945479a5791432af86a6f5733ae37426ce58e11168aa9474263cd8483600960009054906101000a900460ff166040518084815260200183815260200182151515158152602001935050505060405180910390a2610ab8611a91565b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b1957600080fd5b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690836004811115610b7457fe5b02179055505050565b60075481565b60045481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c0a57600080fd5b600060149054906101000a900460ff161515610c2557600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600b6020528060005260406000206000915054906101000a900460ff1681565b6000600190509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cf557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610d4c57600080fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610de357600080fd5b8060078190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e4857600080fd5b610e50610f43565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633cebb8236000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1515610f2d57600080fd5b6102c65a03f11515610f3e57600080fd5b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f9e57600080fd5b600060149054906101000a900460ff16151515610fba57600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561105e57600080fd5b6110688282611935565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110c757600080fd5b80600960006101000a81548160ff02191690831515021790555050565b600960009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561117757600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561124357600080fd5b6102c65a03f1151561125457600080fd5b50505060405180519050151561126957600080fd5b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112ee57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138c57600080fd5b600082600481111561139a57fe5b1115156113a657600080fd5b80600b60008460048111156113b757fe5b815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143b57600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e057600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60066020528060005260406000206000915054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115a157600080fd5b600090505b82518110156115dd576115d083828151811015156115c057fe5b9060200190602002015183610abe565b80806001019150506115a6565b505050565b6000600190509392505050565b60085481565b60008060149054906101000a900460ff1615151561161257600080fd5b61161b8261090d565b60019050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167f57600080fd5b80600a8190555050565b60056020528060005260406000206000915090505481565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f77c47916000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561173457600080fd5b6102c65a03f1151561174557600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff161415151561177257600080fd5b662386f26fc10000341015151561178857600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050600060048111156117e457fe5b8160048111156117f057fe5b1115156117fc57600080fd5b60011515600b600083600481111561181057fe5b815260200190815260200160002060009054906101000a900460ff16151514151561183a57600080fd5b6001915050919050565b600060075461185e346008546118e490919063ffffffff16565b1115905090565b6000600960009054906101000a900460ff16156118da57600a546118d134600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e490919063ffffffff16565b111590506118df565b600190505b919050565b60008082840190508381101515156118f857fe5b8091505092915050565b60008082840290506000841480611923575082848281151561192057fe5b04145b151561192b57fe5b8091505092915050565b600061195e602861195060648561190290919063ffffffff16565b611af590919063ffffffff16565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663827f32c084846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611a2d57600080fd5b6102c65a03f11515611a3e57600080fd5b505050604051805190501515611a5357600080fd5b611a8181600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16603c611b10565b1515611a8c57600080fd5b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515611af357600080fd5b565b6000808284811515611b0357fe5b0490508091505092915050565b600080611b3983611b2b606488611af590919063ffffffff16565b61190290919063ffffffff16565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663827f32c085836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611c0857600080fd5b6102c65a03f11515611c1957600080fd5b505050604051805190501515611c2e57600080fd5b600191505093925050505600a165627a7a723058207bf98ba55a12bdc9619190324e0b4859262aa4059db2524725693c76727186ab00290000000000000000000000004df47b4969b2911c966506e3592c41389493953b0000000000000000000000000020d8f4052358ee01ef8d4164e5c97c957442350000000000000000000000000020d8f4052358ee01ef8d4164e5c97c95744235000000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000014542ba12a337c000000000000000000000000000000000000000000000000000000de0b6b3a7640000
Deployed Bytecode
0x60606040526004361061018b576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806304b57191146101b257806323548b8b146101f75780632c4e722e1461022057806331bf0667146102495780633f4ba83a1461029e57806342181b8e146102b35780634a393149146102ee57806351cff8d91461036757806355a373d6146103a05780635c975abb146103f5578063763265de146104225780637693488b146104455780638456cb591461045a57806386ce02851461046f57806386d6eaa2146104b15780638a34396a146104d65780638da5cb5b146105035780639e281a9814610558578063a23d3c351461059a578063a6f9dae1146105ef578063b206979614610628578063c16ae1e014610659578063c7c2aee314610692578063cee36053146106bb578063d63a8e11146106f4578063d80b771b1461074f578063da682aeb146107b5578063e29eb8361461082e578063f48c305414610857578063f760f2281461089d578063fc7e286d146108c0575b600060149054906101000a900460ff161515156101a757600080fd5b6101b03361090d565b005b34156101bd57600080fd5b6101f5600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803560ff16906020019091905050610abe565b005b341561020257600080fd5b61020a610b7d565b6040518082815260200191505060405180910390f35b341561022b57600080fd5b610233610b83565b6040518082815260200191505060405180910390f35b341561025457600080fd5b61025c610b89565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102a957600080fd5b6102b1610baf565b005b34156102be57600080fd5b6102d46004808035906020019091905050610c6d565b604051808215151515815260200191505060405180910390f35b34156102f957600080fd5b61034d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c8d565b604051808215151515815260200191505060405180910390f35b341561037257600080fd5b61039e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c9a565b005b34156103ab57600080fd5b6103b3610d4f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561040057600080fd5b610408610d75565b604051808215151515815260200191505060405180910390f35b341561042d57600080fd5b6104436004808035906020019091905050610d88565b005b341561045057600080fd5b610458610ded565b005b341561046557600080fd5b61046d610f43565b005b341561047a57600080fd5b6104af600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611003565b005b34156104bc57600080fd5b6104d46004808035151590602001909190505061106c565b005b34156104e157600080fd5b6104e96110e4565b604051808215151515815260200191505060405180910390f35b341561050e57600080fd5b6105166110f7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561056357600080fd5b610598600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061111c565b005b34156105a557600080fd5b6105ad61126d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105fa57600080fd5b610626600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611293565b005b341561063357600080fd5b610657600480803560ff169060200190919080351515906020019091905050611331565b005b341561066457600080fd5b610690600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113e0565b005b341561069d57600080fd5b6106a561147f565b6040518082815260200191505060405180910390f35b34156106c657600080fd5b6106f2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611485565b005b34156106ff57600080fd5b61072b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611524565b6040518082600481111561073b57fe5b60ff16815260200191505060405180910390f35b341561075a57600080fd5b6107b360048080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803560ff16906020019091905050611544565b005b34156107c057600080fd5b610814600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115e2565b604051808215151515815260200191505060405180910390f35b341561083957600080fd5b6108416115ef565b6040518082815260200191505060405180910390f35b610883600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115f5565b604051808215151515815260200191505060405180910390f35b34156108a857600080fd5b6108be6004808035906020019091905050611624565b005b34156108cb57600080fd5b6108f7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611689565b6040518082815260200191505060405180910390f35b60008060008060149054906101000a900460ff1615151561092d57600080fd5b610936846116a1565b151561094157600080fd5b610949611844565b151561095457600080fd5b61095d84611865565b151561096857600080fd5b349250610980836008546118e490919063ffffffff16565b91506109976004548461190290919063ffffffff16565b9050816008819055506109f234600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e490919063ffffffff16565b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a3f8482611935565b8373ffffffffffffffffffffffffffffffffffffffff167f470999142a1945479a5791432af86a6f5733ae37426ce58e11168aa9474263cd8483600960009054906101000a900460ff166040518084815260200183815260200182151515158152602001935050505060405180910390a2610ab8611a91565b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b1957600080fd5b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690836004811115610b7457fe5b02179055505050565b60075481565b60045481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c0a57600080fd5b600060149054906101000a900460ff161515610c2557600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600b6020528060005260406000206000915054906101000a900460ff1681565b6000600190509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cf557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515610d4c57600080fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610de357600080fd5b8060078190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e4857600080fd5b610e50610f43565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633cebb8236000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1515610f2d57600080fd5b6102c65a03f11515610f3e57600080fd5b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f9e57600080fd5b600060149054906101000a900460ff16151515610fba57600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561105e57600080fd5b6110688282611935565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110c757600080fd5b80600960006101000a81548160ff02191690831515021790555050565b600960009054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561117757600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561124357600080fd5b6102c65a03f1151561125457600080fd5b50505060405180519050151561126957600080fd5b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112ee57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561138c57600080fd5b600082600481111561139a57fe5b1115156113a657600080fd5b80600b60008460048111156113b757fe5b815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561143b57600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156114e057600080fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60066020528060005260406000206000915054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115a157600080fd5b600090505b82518110156115dd576115d083828151811015156115c057fe5b9060200190602002015183610abe565b80806001019150506115a6565b505050565b6000600190509392505050565b60085481565b60008060149054906101000a900460ff1615151561161257600080fd5b61161b8261090d565b60019050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167f57600080fd5b80600a8190555050565b60056020528060005260406000206000915090505481565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f77c47916000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561173457600080fd5b6102c65a03f1151561174557600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff161415151561177257600080fd5b662386f26fc10000341015151561178857600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050600060048111156117e457fe5b8160048111156117f057fe5b1115156117fc57600080fd5b60011515600b600083600481111561181057fe5b815260200190815260200160002060009054906101000a900460ff16151514151561183a57600080fd5b6001915050919050565b600060075461185e346008546118e490919063ffffffff16565b1115905090565b6000600960009054906101000a900460ff16156118da57600a546118d134600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118e490919063ffffffff16565b111590506118df565b600190505b919050565b60008082840190508381101515156118f857fe5b8091505092915050565b60008082840290506000841480611923575082848281151561192057fe5b04145b151561192b57fe5b8091505092915050565b600061195e602861195060648561190290919063ffffffff16565b611af590919063ffffffff16565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663827f32c084846000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611a2d57600080fd5b6102c65a03f11515611a3e57600080fd5b505050604051805190501515611a5357600080fd5b611a8181600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16603c611b10565b1515611a8c57600080fd5b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515611af357600080fd5b565b6000808284811515611b0357fe5b0490508091505092915050565b600080611b3983611b2b606488611af590919063ffffffff16565b61190290919063ffffffff16565b9050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663827f32c085836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515611c0857600080fd5b6102c65a03f11515611c1957600080fd5b505050604051805190501515611c2e57600080fd5b600191505093925050505600a165627a7a723058207bf98ba55a12bdc9619190324e0b4859262aa4059db2524725693c76727186ab0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004df47b4969b2911c966506e3592c41389493953b0000000000000000000000000020d8f4052358ee01ef8d4164e5c97c957442350000000000000000000000000020d8f4052358ee01ef8d4164e5c97c95744235000000000000000000000000000000000000000000000000000000000000070800000000000000000000000000000000000000000000014542ba12a337c000000000000000000000000000000000000000000000000000000de0b6b3a7640000
-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x4DF47B4969B2911C966506E3592c41389493953b
Arg [1] : _founderWallet (address): 0x0020d8F4052358Ee01ef8d4164e5C97C95744235
Arg [2] : _tokensaleWallet (address): 0x0020d8F4052358Ee01ef8d4164e5C97C95744235
Arg [3] : _rate (uint256): 1800
Arg [4] : _maxCap (uint256): 6000000000000000000000
Arg [5] : _personalCap (uint256): 1000000000000000000
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000004df47b4969b2911c966506e3592c41389493953b
Arg [1] : 0000000000000000000000000020d8f4052358ee01ef8d4164e5c97c95744235
Arg [2] : 0000000000000000000000000020d8f4052358ee01ef8d4164e5c97c95744235
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000708
Arg [4] : 00000000000000000000000000000000000000000000014542ba12a337c00000
Arg [5] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Swarm Source
bzzr://7bf98ba55a12bdc9619190324e0b4859262aa4059db2524725693c76727186ab
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.