More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 21,667 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 11218897 | 1390 days ago | IN | 0 ETH | 0.00114105 | ||||
Transfer | 11218289 | 1390 days ago | IN | 0 ETH | 0.00042161 | ||||
Transfer | 6968071 | 2071 days ago | IN | 0.08449366 ETH | 0.00021877 | ||||
Transfer | 6776048 | 2103 days ago | IN | 6.67722 ETH | 0.00067818 | ||||
Transfer | 6776046 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776046 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776044 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776042 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776042 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776039 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776037 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Transfer | 6776035 | 2103 days ago | IN | 6.67722 ETH | 0.00065631 | ||||
Fill Order With ... | 6552946 | 2140 days ago | IN | 0.001 ETH | 0.00006723 | ||||
Transfer | 5622509 | 2297 days ago | IN | 0.00294185 ETH | 0.00048129 | ||||
0x414d4c54 | 4725520 | 2451 days ago | IN | 0 ETH | 0.0002522 | ||||
0x414d4c54 | 4725466 | 2451 days ago | IN | 0 ETH | 0.0002522 | ||||
Transfer | 4284429 | 2538 days ago | IN | 0.00247 ETH | 0.00525 | ||||
Transfer | 4264216 | 2543 days ago | IN | 13.3 ETH | 0.0272115 | ||||
Transfer | 4227300 | 2554 days ago | IN | 0.003 ETH | 0.0055 | ||||
Transfer | 4226369 | 2554 days ago | IN | 13.35 ETH | 0.0105 | ||||
Transfer | 4220668 | 2556 days ago | IN | 4.99 ETH | 0.00449484 | ||||
Transfer | 4194097 | 2563 days ago | IN | 0.000001 ETH | 0.0005 | ||||
Transfer | 4176524 | 2567 days ago | IN | 0.033 ETH | 0.00525 | ||||
Transfer | 4176523 | 2567 days ago | IN | 0.036 ETH | 0.00525 | ||||
Transfer | 4173422 | 2568 days ago | IN | 0.079 ETH | 0.00525 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
4165451 | 2570 days ago | 1.93364081 ETH | ||||
4165451 | 2570 days ago | 11.06635918 ETH | ||||
4165451 | 2570 days ago | 13 ETH | ||||
4165451 | 2570 days ago | 6.67631 ETH | ||||
4165451 | 2570 days ago | 13.35469 ETH | ||||
4165451 | 2570 days ago | 13.35444 ETH | ||||
4165451 | 2570 days ago | 13.35444 ETH | ||||
4165451 | 2570 days ago | 13.35444 ETH | ||||
4165451 | 2570 days ago | 6.67721 ETH | ||||
4165451 | 2570 days ago | 6 ETH | ||||
4165450 | 2570 days ago | 13.35444 ETH | ||||
4165450 | 2570 days ago | 9.5 ETH | ||||
4165450 | 2570 days ago | 13.35444 ETH | ||||
4165450 | 2570 days ago | 4 ETH | ||||
4165450 | 2570 days ago | 13 ETH | ||||
4165450 | 2570 days ago | 10 ETH | ||||
4165450 | 2570 days ago | 13.3 ETH | ||||
4165450 | 2570 days ago | 13.25 ETH | ||||
4165450 | 2570 days ago | 13.3598328 ETH | ||||
4165450 | 2570 days ago | 13 ETH | ||||
4165450 | 2570 days ago | 13 ETH | ||||
4165450 | 2570 days ago | 13.35444 ETH | ||||
4165450 | 2570 days ago | 1 ETH | ||||
4165450 | 2570 days ago | 13.35444 ETH | ||||
4165450 | 2570 days ago | 4.15 ETH |
Loading...
Loading
Contract Name:
TokenSale
Compiler Version
v0.4.14+commit.c2215d46
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-08-14 */ pragma solidity 0.4.14; /* Copyright 2017 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint _value) returns (bool success) {} /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint _value) returns (bool success) {} /// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint remaining) {} event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } /* * Ownable * * Base contract with an owner. * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. */ contract Ownable { address public owner; function Ownable() { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner { if (newOwner != address(0)) { owner = newOwner; } } } contract SafeMath { function safeMul(uint a, uint b) internal constant returns (uint256) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint a, uint b) internal constant returns (uint256) { uint c = a / b; return c; } function safeSub(uint a, uint b) internal constant returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) internal constant returns (uint256) { uint c = a + b; assert(c >= a); return c; } function max64(uint64 a, uint64 b) internal constant returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal constant returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal constant returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } } /// @title TokenTransferProxy - Transfers tokens on behalf of contracts that have been approved via decentralized governance. /// @author Amir Bandeali - <[email protected]>, Will Warren - <[email protected]> contract TokenTransferProxy is Ownable { /// @dev Only authorized addresses can invoke functions with this modifier. modifier onlyAuthorized { require(authorized[msg.sender]); _; } modifier targetAuthorized(address target) { require(authorized[target]); _; } modifier targetNotAuthorized(address target) { require(!authorized[target]); _; } mapping (address => bool) public authorized; address[] public authorities; event LogAuthorizedAddressAdded(address indexed target, address indexed caller); event LogAuthorizedAddressRemoved(address indexed target, address indexed caller); /* * Public functions */ /// @dev Authorizes an address. /// @param target Address to authorize. function addAuthorizedAddress(address target) public onlyOwner targetNotAuthorized(target) { authorized[target] = true; authorities.push(target); LogAuthorizedAddressAdded(target, msg.sender); } /// @dev Removes authorizion of an address. /// @param target Address to remove authorization from. function removeAuthorizedAddress(address target) public onlyOwner targetAuthorized(target) { delete authorized[target]; for (uint i = 0; i < authorities.length; i++) { if (authorities[i] == target) { authorities[i] = authorities[authorities.length - 1]; authorities.length -= 1; break; } } LogAuthorizedAddressRemoved(target, msg.sender); } /// @dev Calls into ERC20 Token contract, invoking transferFrom. /// @param token Address of token to transfer. /// @param from Address to transfer token from. /// @param to Address to transfer token to. /// @param value Amount of token to transfer. /// @return Success of transfer. function transferFrom( address token, address from, address to, uint value) public onlyAuthorized returns (bool) { return Token(token).transferFrom(from, to, value); } /* * Public constant functions */ /// @dev Gets all authorized addresses. /// @return Array of authorized addresses. function getAuthorizedAddresses() public constant returns (address[]) { return authorities; } } /// @title Exchange - Facilitates exchange of ERC20 tokens. /// @author Amir Bandeali - <[email protected]>, Will Warren - <[email protected]> contract Exchange is SafeMath { // Error Codes enum Errors { ORDER_EXPIRED, // Order has already expired ORDER_FULLY_FILLED_OR_CANCELLED, // Order has already been fully filled or cancelled ROUNDING_ERROR_TOO_LARGE, // Rounding error too large INSUFFICIENT_BALANCE_OR_ALLOWANCE // Insufficient balance or allowance for token transfer } string constant public VERSION = "1.0.0"; uint16 constant public EXTERNAL_QUERY_GAS_LIMIT = 4999; // Changes to state require at least 5000 gas address public ZRX_TOKEN_CONTRACT; address public TOKEN_TRANSFER_PROXY_CONTRACT; // Mappings of orderHash => amounts of takerTokenAmount filled or cancelled. mapping (bytes32 => uint) public filled; mapping (bytes32 => uint) public cancelled; event LogFill( address indexed maker, address taker, address indexed feeRecipient, address makerToken, address takerToken, uint filledMakerTokenAmount, uint filledTakerTokenAmount, uint paidMakerFee, uint paidTakerFee, bytes32 indexed tokens, // keccak256(makerToken, takerToken), allows subscribing to a token pair bytes32 orderHash ); event LogCancel( address indexed maker, address indexed feeRecipient, address makerToken, address takerToken, uint cancelledMakerTokenAmount, uint cancelledTakerTokenAmount, bytes32 indexed tokens, bytes32 orderHash ); event LogError(uint8 indexed errorId, bytes32 indexed orderHash); struct Order { address maker; address taker; address makerToken; address takerToken; address feeRecipient; uint makerTokenAmount; uint takerTokenAmount; uint makerFee; uint takerFee; uint expirationTimestampInSec; bytes32 orderHash; } function Exchange(address _zrxToken, address _tokenTransferProxy) { ZRX_TOKEN_CONTRACT = _zrxToken; TOKEN_TRANSFER_PROXY_CONTRACT = _tokenTransferProxy; } /* * Core exchange functions */ /// @dev Fills the input order. /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. /// @param fillTakerTokenAmount Desired amount of takerToken to fill. /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfer will fail before attempting. /// @param v ECDSA signature parameter v. /// @param r ECDSA signature parameters r. /// @param s ECDSA signature parameters s. /// @return Total amount of takerToken filled in trade. function fillOrder( address[5] orderAddresses, uint[6] orderValues, uint fillTakerTokenAmount, bool shouldThrowOnInsufficientBalanceOrAllowance, uint8 v, bytes32 r, bytes32 s) public returns (uint filledTakerTokenAmount) { Order memory order = Order({ maker: orderAddresses[0], taker: orderAddresses[1], makerToken: orderAddresses[2], takerToken: orderAddresses[3], feeRecipient: orderAddresses[4], makerTokenAmount: orderValues[0], takerTokenAmount: orderValues[1], makerFee: orderValues[2], takerFee: orderValues[3], expirationTimestampInSec: orderValues[4], orderHash: getOrderHash(orderAddresses, orderValues) }); require(order.taker == address(0) || order.taker == msg.sender); require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && fillTakerTokenAmount > 0); require(isValidSignature( order.maker, order.orderHash, v, r, s )); if (block.timestamp >= order.expirationTimestampInSec) { LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash); return 0; } uint remainingTakerTokenAmount = safeSub(order.takerTokenAmount, getUnavailableTakerTokenAmount(order.orderHash)); filledTakerTokenAmount = min256(fillTakerTokenAmount, remainingTakerTokenAmount); if (filledTakerTokenAmount == 0) { LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), order.orderHash); return 0; } if (isRoundingError(filledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount)) { LogError(uint8(Errors.ROUNDING_ERROR_TOO_LARGE), order.orderHash); return 0; } if (!shouldThrowOnInsufficientBalanceOrAllowance && !isTransferable(order, filledTakerTokenAmount)) { LogError(uint8(Errors.INSUFFICIENT_BALANCE_OR_ALLOWANCE), order.orderHash); return 0; } uint filledMakerTokenAmount = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount); uint paidMakerFee; uint paidTakerFee; filled[order.orderHash] = safeAdd(filled[order.orderHash], filledTakerTokenAmount); require(transferViaTokenTransferProxy( order.makerToken, order.maker, msg.sender, filledMakerTokenAmount )); require(transferViaTokenTransferProxy( order.takerToken, msg.sender, order.maker, filledTakerTokenAmount )); if (order.feeRecipient != address(0)) { if (order.makerFee > 0) { paidMakerFee = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.makerFee); require(transferViaTokenTransferProxy( ZRX_TOKEN_CONTRACT, order.maker, order.feeRecipient, paidMakerFee )); } if (order.takerFee > 0) { paidTakerFee = getPartialAmount(filledTakerTokenAmount, order.takerTokenAmount, order.takerFee); require(transferViaTokenTransferProxy( ZRX_TOKEN_CONTRACT, msg.sender, order.feeRecipient, paidTakerFee )); } } LogFill( order.maker, msg.sender, order.feeRecipient, order.makerToken, order.takerToken, filledMakerTokenAmount, filledTakerTokenAmount, paidMakerFee, paidTakerFee, keccak256(order.makerToken, order.takerToken), order.orderHash ); return filledTakerTokenAmount; } /// @dev Cancels the input order. /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. /// @param cancelTakerTokenAmount Desired amount of takerToken to cancel in order. /// @return Amount of takerToken cancelled. function cancelOrder( address[5] orderAddresses, uint[6] orderValues, uint cancelTakerTokenAmount) public returns (uint) { Order memory order = Order({ maker: orderAddresses[0], taker: orderAddresses[1], makerToken: orderAddresses[2], takerToken: orderAddresses[3], feeRecipient: orderAddresses[4], makerTokenAmount: orderValues[0], takerTokenAmount: orderValues[1], makerFee: orderValues[2], takerFee: orderValues[3], expirationTimestampInSec: orderValues[4], orderHash: getOrderHash(orderAddresses, orderValues) }); require(order.maker == msg.sender); require(order.makerTokenAmount > 0 && order.takerTokenAmount > 0 && cancelTakerTokenAmount > 0); if (block.timestamp >= order.expirationTimestampInSec) { LogError(uint8(Errors.ORDER_EXPIRED), order.orderHash); return 0; } uint remainingTakerTokenAmount = safeSub(order.takerTokenAmount, getUnavailableTakerTokenAmount(order.orderHash)); uint cancelledTakerTokenAmount = min256(cancelTakerTokenAmount, remainingTakerTokenAmount); if (cancelledTakerTokenAmount == 0) { LogError(uint8(Errors.ORDER_FULLY_FILLED_OR_CANCELLED), order.orderHash); return 0; } cancelled[order.orderHash] = safeAdd(cancelled[order.orderHash], cancelledTakerTokenAmount); LogCancel( order.maker, order.feeRecipient, order.makerToken, order.takerToken, getPartialAmount(cancelledTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount), cancelledTakerTokenAmount, keccak256(order.makerToken, order.takerToken), order.orderHash ); return cancelledTakerTokenAmount; } /* * Wrapper functions */ /// @dev Fills an order with specified parameters and ECDSA signature, throws if specified amount not filled entirely. /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. /// @param fillTakerTokenAmount Desired amount of takerToken to fill. /// @param v ECDSA signature parameter v. /// @param r ECDSA signature parameters r. /// @param s ECDSA signature parameters s. function fillOrKillOrder( address[5] orderAddresses, uint[6] orderValues, uint fillTakerTokenAmount, uint8 v, bytes32 r, bytes32 s) public { require(fillOrder( orderAddresses, orderValues, fillTakerTokenAmount, false, v, r, s ) == fillTakerTokenAmount); } /// @dev Synchronously executes multiple fill orders in a single transaction. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param fillTakerTokenAmounts Array of desired amounts of takerToken to fill in orders. /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfers will fail before attempting. /// @param v Array ECDSA signature v parameters. /// @param r Array of ECDSA signature r parameters. /// @param s Array of ECDSA signature s parameters. function batchFillOrders( address[5][] orderAddresses, uint[6][] orderValues, uint[] fillTakerTokenAmounts, bool shouldThrowOnInsufficientBalanceOrAllowance, uint8[] v, bytes32[] r, bytes32[] s) public { for (uint i = 0; i < orderAddresses.length; i++) { fillOrder( orderAddresses[i], orderValues[i], fillTakerTokenAmounts[i], shouldThrowOnInsufficientBalanceOrAllowance, v[i], r[i], s[i] ); } } /// @dev Synchronously executes multiple fillOrKill orders in a single transaction. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param fillTakerTokenAmounts Array of desired amounts of takerToken to fill in orders. /// @param v Array ECDSA signature v parameters. /// @param r Array of ECDSA signature r parameters. /// @param s Array of ECDSA signature s parameters. function batchFillOrKillOrders( address[5][] orderAddresses, uint[6][] orderValues, uint[] fillTakerTokenAmounts, uint8[] v, bytes32[] r, bytes32[] s) public { for (uint i = 0; i < orderAddresses.length; i++) { fillOrKillOrder( orderAddresses[i], orderValues[i], fillTakerTokenAmounts[i], v[i], r[i], s[i] ); } } /// @dev Synchronously executes multiple fill orders in a single transaction until total fillTakerTokenAmount filled. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param fillTakerTokenAmount Desired total amount of takerToken to fill in orders. /// @param shouldThrowOnInsufficientBalanceOrAllowance Test if transfers will fail before attempting. /// @param v Array ECDSA signature v parameters. /// @param r Array of ECDSA signature r parameters. /// @param s Array of ECDSA signature s parameters. /// @return Total amount of fillTakerTokenAmount filled in orders. function fillOrdersUpTo( address[5][] orderAddresses, uint[6][] orderValues, uint fillTakerTokenAmount, bool shouldThrowOnInsufficientBalanceOrAllowance, uint8[] v, bytes32[] r, bytes32[] s) public returns (uint) { uint filledTakerTokenAmount = 0; for (uint i = 0; i < orderAddresses.length; i++) { require(orderAddresses[i][3] == orderAddresses[0][3]); // takerToken must be the same for each order filledTakerTokenAmount = safeAdd(filledTakerTokenAmount, fillOrder( orderAddresses[i], orderValues[i], safeSub(fillTakerTokenAmount, filledTakerTokenAmount), shouldThrowOnInsufficientBalanceOrAllowance, v[i], r[i], s[i] )); if (filledTakerTokenAmount == fillTakerTokenAmount) break; } return filledTakerTokenAmount; } /// @dev Synchronously cancels multiple orders in a single transaction. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param cancelTakerTokenAmounts Array of desired amounts of takerToken to cancel in orders. function batchCancelOrders( address[5][] orderAddresses, uint[6][] orderValues, uint[] cancelTakerTokenAmounts) public { for (uint i = 0; i < orderAddresses.length; i++) { cancelOrder( orderAddresses[i], orderValues[i], cancelTakerTokenAmounts[i] ); } } /* * Constant public functions */ /// @dev Calculates Keccak-256 hash of order with specified parameters. /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. /// @return Keccak-256 hash of order. function getOrderHash(address[5] orderAddresses, uint[6] orderValues) public constant returns (bytes32) { return keccak256( address(this), orderAddresses[0], // maker orderAddresses[1], // taker orderAddresses[2], // makerToken orderAddresses[3], // takerToken orderAddresses[4], // feeRecipient orderValues[0], // makerTokenAmount orderValues[1], // takerTokenAmount orderValues[2], // makerFee orderValues[3], // takerFee orderValues[4], // expirationTimestampInSec orderValues[5] // salt ); } /// @dev Verifies that an order signature is valid. /// @param signer address of signer. /// @param hash Signed Keccak-256 hash. /// @param v ECDSA signature parameter v. /// @param r ECDSA signature parameters r. /// @param s ECDSA signature parameters s. /// @return Validity of order signature. function isValidSignature( address signer, bytes32 hash, uint8 v, bytes32 r, bytes32 s) public constant returns (bool) { return signer == ecrecover( keccak256("\x19Ethereum Signed Message:\n32", hash), v, r, s ); } /// @dev Checks if rounding error > 0.1%. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to multiply with numerator/denominator. /// @return Rounding error is present. function isRoundingError(uint numerator, uint denominator, uint target) public constant returns (bool) { uint remainder = mulmod(target, numerator, denominator); if (remainder == 0) return false; // No rounding error. uint errPercentageTimes1000000 = safeDiv( safeMul(remainder, 1000000), safeMul(numerator, target) ); return errPercentageTimes1000000 > 1000; } /// @dev Calculates partial value given a numerator and denominator. /// @param numerator Numerator. /// @param denominator Denominator. /// @param target Value to calculate partial of. /// @return Partial value of target. function getPartialAmount(uint numerator, uint denominator, uint target) public constant returns (uint) { return safeDiv(safeMul(numerator, target), denominator); } /// @dev Calculates the sum of values already filled and cancelled for a given order. /// @param orderHash The Keccak-256 hash of the given order. /// @return Sum of values already filled and cancelled. function getUnavailableTakerTokenAmount(bytes32 orderHash) public constant returns (uint) { return safeAdd(filled[orderHash], cancelled[orderHash]); } /* * Internal functions */ /// @dev Transfers a token using TokenTransferProxy transferFrom function. /// @param token Address of token to transferFrom. /// @param from Address transfering token. /// @param to Address receiving token. /// @param value Amount of token to transfer. /// @return Success of token transfer. function transferViaTokenTransferProxy( address token, address from, address to, uint value) internal returns (bool) { return TokenTransferProxy(TOKEN_TRANSFER_PROXY_CONTRACT).transferFrom(token, from, to, value); } /// @dev Checks if any order transfers will fail. /// @param order Order struct of params that will be checked. /// @param fillTakerTokenAmount Desired amount of takerToken to fill. /// @return Predicted result of transfers. function isTransferable(Order order, uint fillTakerTokenAmount) internal constant // The called token contracts may attempt to change state, but will not be able to due to gas limits on getBalance and getAllowance. returns (bool) { address taker = msg.sender; uint fillMakerTokenAmount = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.makerTokenAmount); if (order.feeRecipient != address(0)) { bool isMakerTokenZRX = order.makerToken == ZRX_TOKEN_CONTRACT; bool isTakerTokenZRX = order.takerToken == ZRX_TOKEN_CONTRACT; uint paidMakerFee = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.makerFee); uint paidTakerFee = getPartialAmount(fillTakerTokenAmount, order.takerTokenAmount, order.takerFee); uint requiredMakerZRX = isMakerTokenZRX ? safeAdd(fillMakerTokenAmount, paidMakerFee) : paidMakerFee; uint requiredTakerZRX = isTakerTokenZRX ? safeAdd(fillTakerTokenAmount, paidTakerFee) : paidTakerFee; if ( getBalance(ZRX_TOKEN_CONTRACT, order.maker) < requiredMakerZRX || getAllowance(ZRX_TOKEN_CONTRACT, order.maker) < requiredMakerZRX || getBalance(ZRX_TOKEN_CONTRACT, taker) < requiredTakerZRX || getAllowance(ZRX_TOKEN_CONTRACT, taker) < requiredTakerZRX ) return false; if (!isMakerTokenZRX && ( getBalance(order.makerToken, order.maker) < fillMakerTokenAmount // Don't double check makerToken if ZRX || getAllowance(order.makerToken, order.maker) < fillMakerTokenAmount) ) return false; if (!isTakerTokenZRX && ( getBalance(order.takerToken, taker) < fillTakerTokenAmount // Don't double check takerToken if ZRX || getAllowance(order.takerToken, taker) < fillTakerTokenAmount) ) return false; } else if ( getBalance(order.makerToken, order.maker) < fillMakerTokenAmount || getAllowance(order.makerToken, order.maker) < fillMakerTokenAmount || getBalance(order.takerToken, taker) < fillTakerTokenAmount || getAllowance(order.takerToken, taker) < fillTakerTokenAmount ) return false; return true; } /// @dev Get token balance of an address. /// @param token Address of token. /// @param owner Address of owner. /// @return Token balance of owner. function getBalance(address token, address owner) internal constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit. returns (uint) { return Token(token).balanceOf.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner); // Limit gas to prevent reentrancy } /// @dev Get allowance of token given to TokenTransferProxy by an address. /// @param token Address of token. /// @param owner Address of owner. /// @return Allowance of token given to TokenTransferProxy by owner. function getAllowance(address token, address owner) internal constant // The called token contract may attempt to change state, but will not be able to due to an added gas limit. returns (uint) { return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy } } /// @title Standard token contract with overflow protection - Used for tokens with dynamic supply. contract StandardTokenWithOverflowProtection is Token, SafeMath { /* * Data structures */ mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalSupply; /* * Public functions */ /// @dev Transfers sender's tokens to a given address. Returns success. /// @param _to Address of token receiver. /// @param _value Number of tokens to transfer. /// @return Returns success of function call. function transfer(address _to, uint256 _value) public returns (bool) { balances[msg.sender] = safeSub(balances[msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); Transfer(msg.sender, _to, _value); return true; } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. /// @return Returns success of function call. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { balances[_from] = safeSub(balances[_from], _value); allowed[_from][msg.sender] = safeSub(allowed[_from][msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); Transfer(_from, _to, _value); return true; } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. /// @return Returns success of function call. function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /* * Read functions */ /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. /// @return Returns remaining allowance for spender. function allowance(address _owner, address _spender) constant public returns (uint256) { return allowed[_owner][_spender]; } /// @dev Returns number of tokens owned by given address. /// @param _owner Address of token owner. /// @return Returns balance of owner. function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } } /// @title Token contract - Token exchanging Ether 1:1. /// @author Stefan George - <[email protected]> /// @author Modified by Amir Bandeali - <[email protected]> contract EtherToken is StandardTokenWithOverflowProtection { /* * Constants */ // Token meta data string constant public name = "Ether Token"; string constant public symbol = "WETH"; uint8 constant public decimals = 18; /* * Read and write functions */ /// @dev Fallback to calling deposit when ether is sent directly to contract. function() public payable { deposit(); } /// @dev Buys tokens with Ether, exchanging them 1:1. function deposit() public payable { balances[msg.sender] = safeAdd(balances[msg.sender], msg.value); totalSupply = safeAdd(totalSupply, msg.value); } /// @dev Sells tokens in exchange for Ether, exchanging them 1:1. /// @param amount Number of tokens to sell. function withdraw(uint amount) public { balances[msg.sender] = safeSub(balances[msg.sender], amount); totalSupply = safeSub(totalSupply, amount); require(msg.sender.send(amount)); } } contract TokenSale is Ownable, SafeMath { event SaleInitialized(uint startTimeInSec); event SaleFinished(uint endTimeInSec); uint public constant TIME_PERIOD_IN_SEC = 1 days; Exchange exchange; Token protocolToken; EtherToken ethToken; mapping (address => bool) public registered; mapping (address => uint) public contributed; bool public isSaleInitialized; bool public isSaleFinished; uint public baseEthCapPerAddress; uint public startTimeInSec; Order order; struct Order { address maker; address taker; address makerToken; address takerToken; address feeRecipient; uint makerTokenAmount; uint takerTokenAmount; uint makerFee; uint takerFee; uint expirationTimestampInSec; uint salt; uint8 v; bytes32 r; bytes32 s; bytes32 orderHash; } modifier saleNotInitialized() { require(!isSaleInitialized); _; } modifier saleStarted() { require(isSaleInitialized && block.timestamp >= startTimeInSec); _; } modifier saleNotFinished() { require(!isSaleFinished); _; } modifier onlyRegistered() { require(registered[msg.sender]); _; } modifier validStartTime(uint _startTimeInSec) { require(_startTimeInSec >= block.timestamp); _; } modifier validBaseEthCapPerAddress(uint _ethCapPerAddress) { require(_ethCapPerAddress != 0); _; } function TokenSale( address _exchange, address _protocolToken, address _ethToken) { exchange = Exchange(_exchange); protocolToken = Token(_protocolToken); ethToken = EtherToken(_ethToken); } /// @dev Allows users to fill stored order by sending ETH to contract. function() payable { fillOrderWithEth(); } /// @dev Stores order and initializes sale parameters. /// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt. /// @param v ECDSA signature parameter v. /// @param r ECDSA signature parameters r. /// @param s ECDSA signature parameters s. /// @param _startTimeInSec Time that token sale begins in seconds since epoch. /// @param _baseEthCapPerAddress The ETH cap per address for the first time period. function initializeSale( address[5] orderAddresses, uint[6] orderValues, uint8 v, bytes32 r, bytes32 s, uint _startTimeInSec, uint _baseEthCapPerAddress) public saleNotInitialized onlyOwner validStartTime(_startTimeInSec) validBaseEthCapPerAddress(_baseEthCapPerAddress) { order = Order({ maker: orderAddresses[0], taker: orderAddresses[1], makerToken: orderAddresses[2], takerToken: orderAddresses[3], feeRecipient: orderAddresses[4], makerTokenAmount: orderValues[0], takerTokenAmount: orderValues[1], makerFee: orderValues[2], takerFee: orderValues[3], expirationTimestampInSec: orderValues[4], salt: orderValues[5], v: v, r: r, s: s, orderHash: exchange.getOrderHash(orderAddresses, orderValues) }); require(order.taker == address(this)); require(order.makerToken == address(protocolToken)); require(order.takerToken == address(ethToken)); require(order.feeRecipient == address(0)); require(isValidSignature( order.maker, order.orderHash, v, r, s )); require(ethToken.approve(exchange.TOKEN_TRANSFER_PROXY_CONTRACT(), order.takerTokenAmount)); isSaleInitialized = true; startTimeInSec = _startTimeInSec; baseEthCapPerAddress = _baseEthCapPerAddress; SaleInitialized(_startTimeInSec); } /// @dev Fills order using msg.value. Should not be called by contracts unless able to access the protocol token after execution. function fillOrderWithEth() public payable saleStarted saleNotFinished onlyRegistered { uint remainingEth = safeSub(order.takerTokenAmount, exchange.getUnavailableTakerTokenAmount(order.orderHash)); uint ethCapPerAddress = getEthCapPerAddress(); uint allowedEth = safeSub(ethCapPerAddress, contributed[msg.sender]); uint ethToFill = min256(min256(msg.value, remainingEth), allowedEth); ethToken.deposit.value(ethToFill)(); contributed[msg.sender] = safeAdd(contributed[msg.sender], ethToFill); exchange.fillOrKillOrder( [order.maker, order.taker, order.makerToken, order.takerToken, order.feeRecipient], [order.makerTokenAmount, order.takerTokenAmount, order.makerFee, order.takerFee, order.expirationTimestampInSec, order.salt], ethToFill, order.v, order.r, order.s ); uint filledProtocolToken = safeDiv(safeMul(order.makerTokenAmount, ethToFill), order.takerTokenAmount); require(protocolToken.transfer(msg.sender, filledProtocolToken)); if (ethToFill < msg.value) { require(msg.sender.send(safeSub(msg.value, ethToFill))); } if (remainingEth == ethToFill) { isSaleFinished = true; SaleFinished(block.timestamp); return; } } /// @dev Changes registration status of an address for participation. /// @param target Address that will be registered/deregistered. /// @param isRegistered New registration status of address. function changeRegistrationStatus(address target, bool isRegistered) public onlyOwner saleNotInitialized { registered[target] = isRegistered; } /// @dev Changes registration statuses of addresses for participation. /// @param targets Addresses that will be registered/deregistered. /// @param isRegistered New registration status of addresss. function changeRegistrationStatuses(address[] targets, bool isRegistered) public onlyOwner saleNotInitialized { for (uint i = 0; i < targets.length; i++) { changeRegistrationStatus(targets[i], isRegistered); } } /// @dev Calculates the ETH cap per address. The cap increases by double the previous increase at each next period. E.g 1, 3, 7, 15 /// @return The current ETH cap per address. function getEthCapPerAddress() public constant returns (uint) { if (block.timestamp < startTimeInSec || startTimeInSec == 0) return 0; uint timeSinceStartInSec = safeSub(block.timestamp, startTimeInSec); uint currentPeriod = safeAdd( // currentPeriod begins at 1 safeDiv(timeSinceStartInSec, TIME_PERIOD_IN_SEC), // rounds down 1 ); uint ethCapPerAddress = safeMul( baseEthCapPerAddress, safeSub( 2 ** currentPeriod, 1 ) ); return ethCapPerAddress; } /// @dev Verifies that an order signature is valid. /// @param pubKey Public address of signer. /// @param hash Signed Keccak-256 hash. /// @param v ECDSA signature parameter v. /// @param r ECDSA signature parameters r. /// @param s ECDSA signature parameters s. /// @return Validity of order signature. function isValidSignature( address pubKey, bytes32 hash, uint8 v, bytes32 r, bytes32 s) public constant returns (bool) { return pubKey == ecrecover( keccak256("\x19Ethereum Signed Message:\n32", hash), v, r, s ); } /// @dev Getter function for initialized order's orderHash. /// @return orderHash of initialized order or null. function getOrderHash() public constant returns (bytes32) { return order.orderHash; } /// @dev Getter function for initialized order's makerTokenAmount. /// @return makerTokenAmount of initialized order or 0. function getOrderMakerTokenAmount() public constant returns (uint) { return order.makerTokenAmount; } /// @dev Getter function for initialized order's takerTokenAmount. /// @return takerTokenAmount of initialized order or 0. function getOrderTakerTokenAmount() public constant returns (uint) { return order.takerTokenAmount; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"orderAddresses","type":"address[5]"},{"name":"orderValues","type":"uint256[6]"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"_startTimeInSec","type":"uint256"},{"name":"_baseEthCapPerAddress","type":"uint256"}],"name":"initializeSale","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOrderTakerTokenAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isSaleFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"targets","type":"address[]"},{"name":"isRegistered","type":"bool"}],"name":"changeRegistrationStatuses","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getEthCapPerAddress","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"pubKey","type":"address"},{"name":"hash","type":"bytes32"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"isValidSignature","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOrderHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"contributed","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startTimeInSec","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"fillOrderWithEth","outputs":[],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"registered","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"baseEthCapPerAddress","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getOrderMakerTokenAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"TIME_PERIOD_IN_SEC","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"target","type":"address"},{"name":"isRegistered","type":"bool"}],"name":"changeRegistrationStatus","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isSaleInitialized","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"_exchange","type":"address"},{"name":"_protocolToken","type":"address"},{"name":"_ethToken","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"startTimeInSec","type":"uint256"}],"name":"SaleInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"endTimeInSec","type":"uint256"}],"name":"SaleFinished","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b604051606080611def833981016040528080519060200190919080519060200190919080519060200190919050505b5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5050505b611c98806101576000396000f300606060405236156100fa576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633eccd456146101065780636029f53f146101b05780636d6f385c146101d95780637b9358a0146102065780637e4d44951461026b5780638163681e146102945780638da5cb5b146103185780639124f1cf1461036d578063995c5e9d1461039e57806399879bb9146103eb578063a76769a514610414578063b2dd5c071461041e578063de8a6fa21461046f578063eec65c5814610498578063f1ce9595146104c1578063f24d2532146104ea578063f2fde38b1461052e578063f42355a414610567575b5b610103610594565b5b005b341561011157600080fd5b6101ae6004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c00190600680602002604051908101604052809291908260066020028082843782019150505050509190803560ff169060200190919080356000191690602001909190803560001916906020019091908035906020019091908035906020019091905050610dbe565b005b34156101bb57600080fd5b6101c3611725565b6040518082815260200191505060405180910390f35b34156101e457600080fd5b6101ec611733565b604051808215151515815260200191505060405180910390f35b341561021157600080fd5b6102696004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080351515906020019091905050611746565b005b341561027657600080fd5b61027e611804565b6040518082815260200191505060405180910390f35b341561029f57600080fd5b6102fe600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff169060200190919080356000191690602001909190803560001916906020019091905050611876565b604051808215151515815260200191505060405180910390f35b341561032357600080fd5b61032b61197e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561037857600080fd5b6103806119a3565b60405180826000191660001916815260200191505060405180910390f35b34156103a957600080fd5b6103d5600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506119b1565b6040518082815260200191505060405180910390f35b34156103f657600080fd5b6103fe6119c9565b6040518082815260200191505060405180910390f35b61041c610594565b005b341561042957600080fd5b610455600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506119cf565b604051808215151515815260200191505060405180910390f35b341561047a57600080fd5b6104826119ef565b6040518082815260200191505060405180910390f35b34156104a357600080fd5b6104ab6119f5565b6040518082815260200191505060405180910390f35b34156104cc57600080fd5b6104d4611a03565b6040518082815260200191505060405180910390f35b34156104f557600080fd5b61052c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611a0a565b005b341561053957600080fd5b610565600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611adf565b005b341561057257600080fd5b61057a611bb6565b604051808215151515815260200191505060405180910390f35b6000806000806000600660009054906101000a900460ff1680156105ba57506008544210155b15156105c557600080fd5b600660019054906101000a900460ff161515156105e157600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561063957600080fd5b610708600960060154600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e9abb506009600e01546000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15156106e857600080fd5b6102c65a03f115156106f957600080fd5b50505060405180519050611bc9565b9450610712611804565b935061075d84600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bc9565b925061077261076c3487611be3565b84611be3565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15156107f957600080fd5b6125ee5a03f1151561080a57600080fd5b50505050610857600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611bfd565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663741bcc9360a060405190810160405280600960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525060c0604051908101604052806009600501548152602001600960060154815260200160096007015481526020016009600801548152602001600980015481526020016009600a0154815250856009600b0160009054906101000a900460ff166009600c01546009600d01546040518763ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018087600560200280838360005b83811015610b575780820151818401525b602081019050610b3b565b5050505090500186600660200280838360005b83811015610b865780820151818401525b602081019050610b6a565b505050509050018581526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019650505050505050600060405180830381600087803b1515610bdc57600080fd5b6102c65a03f11515610bed57600080fd5b505050610c0d610c0260096005015484611c1c565b600960060154611c50565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610cdc57600080fd5b6102c65a03f11515610ced57600080fd5b505050604051805190501515610d0257600080fd5b34821015610d54573373ffffffffffffffffffffffffffffffffffffffff166108fc610d2e3485611bc9565b9081150290604051600060405180830381858888f193505050501515610d5357600080fd5b5b81851415610db3576001600660016101000a81548160ff0219169083151502179055507fb068776b457cefe34568f0e1ffb0cc2480cf799e77410c955f6e7502d654655d426040518082815260200191505060405180910390a1610db4565b5b5b5b5b5050505050565b600660009054906101000a900460ff16151515610dda57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e3557600080fd5b81428110151515610e4557600080fd5b8160008114151515610e5657600080fd5b6101e0604051908101604052808a6000600581101515610e7257fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6001600581101515610ea157fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6002600581101515610ed057fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6003600581101515610eff57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6004600581101515610f2e57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff168152602001896000600681101515610f5d57fe5b60200201518152602001896001600681101515610f7657fe5b60200201518152602001896002600681101515610f8f57fe5b60200201518152602001896003600681101515610fa857fe5b60200201518152602001896004600681101515610fc157fe5b60200201518152602001896005600681101515610fda57fe5b602002015181526020018860ff1681526020018760001916815260200186600019168152602001600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfc4d0ec8c8c6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600560200280838360005b838110156110a15780820151818401525b602081019050611085565b5050505090500182600660200280838360005b838110156110d05780820151818401525b6020810190506110b4565b5050505090500192505050602060405180830381600087803b15156110f457600080fd5b6102c65a03f1151561110557600080fd5b5050506040518051905060001916815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff021916908360ff16021790555061018082015181600c01906000191690556101a082015181600d01906000191690556101c082015181600e01906000191690559050503073ffffffffffffffffffffffffffffffffffffffff16600960010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561137157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113f257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561147357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156114d357600080fd5b61150a600960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166009600e0154898989611876565b151561151557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663add1cbc56000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156115e157600080fd5b6102c65a03f115156115f257600080fd5b505050604051805190506009600601546000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561168f57600080fd5b6102c65a03f115156116a057600080fd5b5050506040518051905015156116b557600080fd5b6001600660006101000a81548160ff02191690831515021790555083600881905550826007819055507ff4da425546dea8b9f96dc3e8d5884bf20b04876f8c2a6cd11bfdb240cdab35ce846040518082815260200191505060405180910390a15b5b505b505b5b50505050505050565b600060096006015490505b90565b600660019054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117a357600080fd5b600660009054906101000a900460ff161515156117bf57600080fd5b600090505b82518110156117fc576117ee83828151811015156117de57fe5b9060200190602002015183611a0a565b5b80806001019150506117c4565b5b5b5b505050565b60008060008060085442108061181c57506000600854145b1561182a5760009350611870565b61183642600854611bc9565b925061184f6118488462015180611c50565b6001611bfd565b915061186a6007546118658460020a6001611bc9565b611c1c565b90508093505b50505090565b600060018560405180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040518091039020858585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f1151561193b57600080fd5b50506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161490505b95945050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006009600e015490505b90565b60056020528060005260406000206000915090505481565b60085481565b60046020528060005260406000206000915054906101000a900460ff1681565b60075481565b600060096005015490505b90565b6201518081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a6557600080fd5b600660009054906101000a900460ff16151515611a8157600080fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b3a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611bb157806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b600660009054906101000a900460ff1681565b6000828211151515611bd757fe5b81830390505b92915050565b6000818310611bf25781611bf4565b825b90505b92915050565b6000808284019050838110151515611c1157fe5b8091505b5092915050565b60008082840290506000841480611c3d5750828482811515611c3a57fe5b04145b1515611c4557fe5b8091505b5092915050565b6000808284811515611c5e57fe5b0490508091505b50929150505600a165627a7a7230582042b85e65491acb98d6592e3ab2d3b0de1c9e56365316884ee46587525c230147002900000000000000000000000012459c951127e0c374ff9105dda097662a027093000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f4980000000000000000000000002956356cd2a2bf3202f771f50d3d14a367b48070
Deployed Bytecode
0x606060405236156100fa576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633eccd456146101065780636029f53f146101b05780636d6f385c146101d95780637b9358a0146102065780637e4d44951461026b5780638163681e146102945780638da5cb5b146103185780639124f1cf1461036d578063995c5e9d1461039e57806399879bb9146103eb578063a76769a514610414578063b2dd5c071461041e578063de8a6fa21461046f578063eec65c5814610498578063f1ce9595146104c1578063f24d2532146104ea578063f2fde38b1461052e578063f42355a414610567575b5b610103610594565b5b005b341561011157600080fd5b6101ae6004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091908060c00190600680602002604051908101604052809291908260066020028082843782019150505050509190803560ff169060200190919080356000191690602001909190803560001916906020019091908035906020019091908035906020019091905050610dbe565b005b34156101bb57600080fd5b6101c3611725565b6040518082815260200191505060405180910390f35b34156101e457600080fd5b6101ec611733565b604051808215151515815260200191505060405180910390f35b341561021157600080fd5b6102696004808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080351515906020019091905050611746565b005b341561027657600080fd5b61027e611804565b6040518082815260200191505060405180910390f35b341561029f57600080fd5b6102fe600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff169060200190919080356000191690602001909190803560001916906020019091905050611876565b604051808215151515815260200191505060405180910390f35b341561032357600080fd5b61032b61197e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561037857600080fd5b6103806119a3565b60405180826000191660001916815260200191505060405180910390f35b34156103a957600080fd5b6103d5600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506119b1565b6040518082815260200191505060405180910390f35b34156103f657600080fd5b6103fe6119c9565b6040518082815260200191505060405180910390f35b61041c610594565b005b341561042957600080fd5b610455600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506119cf565b604051808215151515815260200191505060405180910390f35b341561047a57600080fd5b6104826119ef565b6040518082815260200191505060405180910390f35b34156104a357600080fd5b6104ab6119f5565b6040518082815260200191505060405180910390f35b34156104cc57600080fd5b6104d4611a03565b6040518082815260200191505060405180910390f35b34156104f557600080fd5b61052c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611a0a565b005b341561053957600080fd5b610565600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611adf565b005b341561057257600080fd5b61057a611bb6565b604051808215151515815260200191505060405180910390f35b6000806000806000600660009054906101000a900460ff1680156105ba57506008544210155b15156105c557600080fd5b600660019054906101000a900460ff161515156105e157600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561063957600080fd5b610708600960060154600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637e9abb506009600e01546000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15156106e857600080fd5b6102c65a03f115156106f957600080fd5b50505060405180519050611bc9565b9450610712611804565b935061075d84600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bc9565b925061077261076c3487611be3565b84611be3565b9150600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0836040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15156107f957600080fd5b6125ee5a03f1151561080a57600080fd5b50505050610857600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611bfd565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663741bcc9360a060405190810160405280600960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600960040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681525060c0604051908101604052806009600501548152602001600960060154815260200160096007015481526020016009600801548152602001600980015481526020016009600a0154815250856009600b0160009054906101000a900460ff166009600c01546009600d01546040518763ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018087600560200280838360005b83811015610b575780820151818401525b602081019050610b3b565b5050505090500186600660200280838360005b83811015610b865780820151818401525b602081019050610b6a565b505050509050018581526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019650505050505050600060405180830381600087803b1515610bdc57600080fd5b6102c65a03f11515610bed57600080fd5b505050610c0d610c0260096005015484611c1c565b600960060154611c50565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610cdc57600080fd5b6102c65a03f11515610ced57600080fd5b505050604051805190501515610d0257600080fd5b34821015610d54573373ffffffffffffffffffffffffffffffffffffffff166108fc610d2e3485611bc9565b9081150290604051600060405180830381858888f193505050501515610d5357600080fd5b5b81851415610db3576001600660016101000a81548160ff0219169083151502179055507fb068776b457cefe34568f0e1ffb0cc2480cf799e77410c955f6e7502d654655d426040518082815260200191505060405180910390a1610db4565b5b5b5b5b5050505050565b600660009054906101000a900460ff16151515610dda57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e3557600080fd5b81428110151515610e4557600080fd5b8160008114151515610e5657600080fd5b6101e0604051908101604052808a6000600581101515610e7257fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6001600581101515610ea157fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6002600581101515610ed057fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6003600581101515610eff57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff1681526020018a6004600581101515610f2e57fe5b602002015173ffffffffffffffffffffffffffffffffffffffff168152602001896000600681101515610f5d57fe5b60200201518152602001896001600681101515610f7657fe5b60200201518152602001896002600681101515610f8f57fe5b60200201518152602001896003600681101515610fa857fe5b60200201518152602001896004600681101515610fc157fe5b60200201518152602001896005600681101515610fda57fe5b602002015181526020018860ff1681526020018760001916815260200186600019168152602001600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cfc4d0ec8c8c6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600560200280838360005b838110156110a15780820151818401525b602081019050611085565b5050505090500182600660200280838360005b838110156110d05780820151818401525b6020810190506110b4565b5050505090500192505050602060405180830381600087803b15156110f457600080fd5b6102c65a03f1151561110557600080fd5b5050506040518051905060001916815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a0820151816005015560c0820151816006015560e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff021916908360ff16021790555061018082015181600c01906000191690556101a082015181600d01906000191690556101c082015181600e01906000191690559050503073ffffffffffffffffffffffffffffffffffffffff16600960010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561137157600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156113f257600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561147357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600960040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156114d357600080fd5b61150a600960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166009600e0154898989611876565b151561151557600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663add1cbc56000604051602001526040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15156115e157600080fd5b6102c65a03f115156115f257600080fd5b505050604051805190506009600601546000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561168f57600080fd5b6102c65a03f115156116a057600080fd5b5050506040518051905015156116b557600080fd5b6001600660006101000a81548160ff02191690831515021790555083600881905550826007819055507ff4da425546dea8b9f96dc3e8d5884bf20b04876f8c2a6cd11bfdb240cdab35ce846040518082815260200191505060405180910390a15b5b505b505b5b50505050505050565b600060096006015490505b90565b600660019054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117a357600080fd5b600660009054906101000a900460ff161515156117bf57600080fd5b600090505b82518110156117fc576117ee83828151811015156117de57fe5b9060200190602002015183611a0a565b5b80806001019150506117c4565b5b5b5b505050565b60008060008060085442108061181c57506000600854145b1561182a5760009350611870565b61183642600854611bc9565b925061184f6118488462015180611c50565b6001611bfd565b915061186a6007546118658460020a6001611bc9565b611c1c565b90508093505b50505090565b600060018560405180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040518091039020858585604051600081526020016040526000604051602001526040518085600019166000191681526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001945050505050602060405160208103908084039060008661646e5a03f1151561193b57600080fd5b50506020604051035173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161490505b95945050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006009600e015490505b90565b60056020528060005260406000206000915090505481565b60085481565b60046020528060005260406000206000915054906101000a900460ff1681565b60075481565b600060096005015490505b90565b6201518081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a6557600080fd5b600660009054906101000a900460ff16151515611a8157600080fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b3a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611bb157806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b600660009054906101000a900460ff1681565b6000828211151515611bd757fe5b81830390505b92915050565b6000818310611bf25781611bf4565b825b90505b92915050565b6000808284019050838110151515611c1157fe5b8091505b5092915050565b60008082840290506000841480611c3d5750828482811515611c3a57fe5b04145b1515611c4557fe5b8091505b5092915050565b6000808284811515611c5e57fe5b0490508091505b50929150505600a165627a7a7230582042b85e65491acb98d6592e3ab2d3b0de1c9e56365316884ee46587525c2301470029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000012459c951127e0c374ff9105dda097662a027093000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f4980000000000000000000000002956356cd2a2bf3202f771f50d3d14a367b48070
-----Decoded View---------------
Arg [0] : _exchange (address): 0x12459C951127e0c374FF9105DdA097662A027093
Arg [1] : _protocolToken (address): 0xE41d2489571d322189246DaFA5ebDe1F4699F498
Arg [2] : _ethToken (address): 0x2956356cD2a2bf3202F771F50D3D14A367b48070
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000012459c951127e0c374ff9105dda097662a027093
Arg [1] : 000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498
Arg [2] : 0000000000000000000000002956356cd2a2bf3202f771f50d3d14a367b48070
Swarm Source
bzzr://42b85e65491acb98d6592e3ab2d3b0de1c9e56365316884ee46587525c230147
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.