Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 553 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Buy Order | 5954070 | 2430 days ago | IN | 0.0102821 ETH | 0.00005281 | ||||
Withdraw Fees | 5905227 | 2439 days ago | IN | 0 ETH | 0.00142476 | ||||
Withdraw Fees | 5900090 | 2439 days ago | IN | 0 ETH | 0.00071226 | ||||
Create Sell Orde... | 5878142 | 2443 days ago | IN | 0 ETH | 0.00019616 | ||||
Create Sell Orde... | 5878050 | 2443 days ago | IN | 0 ETH | 0.00022153 | ||||
Create Sell Orde... | 5869092 | 2445 days ago | IN | 0 ETH | 0.0004136 | ||||
Create Buy Order | 5869065 | 2445 days ago | IN | 0.00593539 ETH | 0.0013495 | ||||
Create Buy Order | 5867835 | 2445 days ago | IN | 0.32478944 ETH | 0.00039337 | ||||
Create Buy Order | 5866285 | 2445 days ago | IN | 0.32499508 ETH | 0.00005288 | ||||
Create Buy Order | 5838921 | 2450 days ago | IN | 0.29904056 ETH | 0.00414803 | ||||
Create Buy Order | 5837144 | 2450 days ago | IN | 0.40107977 ETH | 0.00019833 | ||||
Create Sell Orde... | 5833657 | 2451 days ago | IN | 0 ETH | 0.00044487 | ||||
Create Buy Order | 5833624 | 2451 days ago | IN | 0.00100885 ETH | 0.0005433 | ||||
Create Buy Order | 5831824 | 2451 days ago | IN | 0.30412208 ETH | 0.00421936 | ||||
Create Buy Order | 5824895 | 2452 days ago | IN | 0.649906 ETH | 0.00066914 | ||||
Create Buy Order | 5823807 | 2453 days ago | IN | 0.0102821 ETH | 0.00030674 | ||||
Create Buy Order | 5801433 | 2456 days ago | IN | 0.00196549 ETH | 0.00006394 | ||||
Create Sell Orde... | 5801336 | 2456 days ago | IN | 0 ETH | 0.00021094 | ||||
Create Sell Orde... | 5796060 | 2457 days ago | IN | 0 ETH | 0.00108192 | ||||
Create Buy Order | 5794167 | 2458 days ago | IN | 0.00582148 ETH | 0.00262922 | ||||
Create Sell Orde... | 5793652 | 2458 days ago | IN | 0 ETH | 0.02150643 | ||||
Create Sell Orde... | 5793650 | 2458 days ago | IN | 0 ETH | 0.01075321 | ||||
Create Buy Order | 5792534 | 2458 days ago | IN | 0.19858222 ETH | 0.00285526 | ||||
Create Buy Order | 5777637 | 2460 days ago | IN | 0.00982848 ETH | 0.00097597 | ||||
Create Buy Order | 5777410 | 2461 days ago | IN | 0.0011033 ETH | 0.00019708 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 5905227 | 2439 days ago | 1.2671128 ETH | ||||
Transfer | 5878142 | 2443 days ago | 0.0030429 ETH | ||||
Transfer | 5878142 | 2443 days ago | 0.0030582 ETH | ||||
Transfer | 5878050 | 2443 days ago | 0.00361028 ETH | ||||
Transfer | 5878050 | 2443 days ago | 0.00362842 ETH | ||||
Transfer | 5869092 | 2445 days ago | 0.00370656 ETH | ||||
Transfer | 5869092 | 2445 days ago | 0.00372519 ETH | ||||
Transfer | 5869065 | 2445 days ago | 0.00590571 ETH | ||||
Transfer | 5867835 | 2445 days ago | 0.32316549 ETH | ||||
Transfer | 5838921 | 2450 days ago | 0.28759113 ETH | ||||
Transfer | 5838921 | 2450 days ago | 0.00833331 ETH | ||||
Transfer | 5838921 | 2450 days ago | 0.00162116 ETH | ||||
Transfer | 5837144 | 2450 days ago | 0.39907437 ETH | ||||
Transfer | 5833657 | 2451 days ago | 0.00100588 ETH | ||||
Transfer | 5833657 | 2451 days ago | 0.00101094 ETH | ||||
Transfer | 5833624 | 2451 days ago | 0.00100381 ETH | ||||
Transfer | 5831824 | 2451 days ago | 0.29414303 ETH | ||||
Transfer | 5831824 | 2451 days ago | 0.00362089 ETH | ||||
Transfer | 5831824 | 2451 days ago | 0.00483774 ETH | ||||
Transfer | 5824895 | 2452 days ago | 0.64665647 ETH | ||||
Transfer | 5823807 | 2453 days ago | 0.00772323 ETH | ||||
Transfer | 5823807 | 2453 days ago | 0.00250752 ETH | ||||
Transfer | 5796060 | 2457 days ago | 3.54287623 ETH | ||||
Transfer | 5796060 | 2457 days ago | 0.42700899 ETH | ||||
Transfer | 5796060 | 2457 days ago | 3.13367063 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
EasyTrade
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-07 */ pragma solidity 0.4.19; /* Copyright 2018 EasyTrade. 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 { /// @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) public returns (bool success) {} /// @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) public 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) public 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) {} } library 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 min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } } contract EtherToken is Token { /// @dev Buys tokens with Ether, exchanging them 1:1. function deposit() public payable {} /// @dev Sells tokens in exchange for Ether, exchanging them 1:1. /// @param amount Number of tokens to sell. function withdraw(uint amount) public {} } contract Exchange { /// @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) {} /* * 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) {} /// @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) {} } contract EtherDelta { address public feeAccount; //the account that will receive fees uint public feeTake; //percentage times (1 ether) function deposit() public payable {} function withdraw(uint amount) public {} function depositToken(address token, uint amount) public {} function withdrawToken(address token, uint amount) public {} function trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount) public {} function availableVolume(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint) {} } library EtherDeltaTrader { address constant public ETHERDELTA_ADDR = 0x8d12a197cb00d4747a1fe03395095ce2a5cc6819; // EtherDelta contract address /// @dev Gets the address of EtherDelta contract /// @return Address of EtherDelta Contract. function getEtherDeltaAddresss() internal returns(address) { return ETHERDELTA_ADDR; } /// @dev Fills a sell order in EtherDelta. /// @param orderAddresses Array of order's maker, makerToken, takerToken. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, expires and nonce. /// @param exchangeFee Fee percentage of the exchange. /// @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. /// @return Total amount of takerToken filled in trade function fillSellOrder( address[5] orderAddresses, uint[6] orderValues, uint exchangeFee, uint fillTakerTokenAmount, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { //Deposit ethers in EtherDelta deposit(fillTakerTokenAmount); uint amountToTrade; uint fee; //Substract EtherDelta fee (amountToTrade, fee) = substractFee(exchangeFee, fillTakerTokenAmount); //Fill EtherDelta Order trade( orderAddresses, orderValues, amountToTrade, v, r, s ); //Withdraw token from EtherDelta withdrawToken(orderAddresses[1], getPartialAmount(orderValues[0], orderValues[1], amountToTrade)); //Returns the amount of token obtained return getPartialAmount(orderValues[0], orderValues[1], amountToTrade); } /// @dev Fills a buy order in EtherDelta. /// @param orderAddresses Array of order's maker, makerToken, takerToken. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, expires and nonce. /// @param exchangeFee Fee percentage of the exchange. /// @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. /// @return Total amount of ethers filled in trade function fillBuyOrder( address[5] orderAddresses, uint[6] orderValues, uint exchangeFee, uint fillTakerTokenAmount, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { //Deposit tokens in EtherDelta depositToken(orderAddresses[2], fillTakerTokenAmount); uint amountToTrade; uint fee; //Substract EtherDelta fee (amountToTrade, fee) = substractFee(exchangeFee, fillTakerTokenAmount); //Fill EtherDelta Order trade( orderAddresses, orderValues, amountToTrade, v, r, s ); //Withdraw ethers obtained from EtherDelta withdraw(getPartialAmount(orderValues[0], orderValues[1], amountToTrade)); //Returns the amount of ethers obtained return getPartialAmount(orderValues[0], orderValues[1], amountToTrade); } /// @dev Trade an EtherDelta order. /// @param orderAddresses Array of order's maker, makerToken, takerToken. /// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, expires and nonce. /// @param amountToTrade 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 trade( address[5] orderAddresses, uint[6] orderValues, uint amountToTrade, uint8 v, bytes32 r, bytes32 s ) internal { //Fill EtherDelta Order EtherDelta(ETHERDELTA_ADDR).trade( orderAddresses[2], orderValues[1], orderAddresses[1], orderValues[0], orderValues[2], orderValues[3], orderAddresses[0], v, r, s, amountToTrade ); } /// @dev Get the available amount of an EtherDelta order. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFee Fee percentage of the exchange. /// @param v Array ECDSA signature v parameters. /// @param r Array of ECDSA signature r parameters. /// @param s Array of ECDSA signature s parameters. /// @return Available amount of the order. function getAvailableAmount( address[5] orderAddresses, uint[6] orderValues, uint exchangeFee, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { //If expired return 0 if(block.number > orderValues[2]) return 0; //Fill EtherDelta Order uint availableVolume = EtherDelta(ETHERDELTA_ADDR).availableVolume( orderAddresses[2], orderValues[1], orderAddresses[1], orderValues[0], orderValues[2], orderValues[3], orderAddresses[0], v, r, s ); //AvailableVolume adds the fee percentage (X - X * fee) return getPartialAmount(availableVolume, SafeMath.safeSub(1 ether, exchangeFee), 1 ether); } /// @dev Substracts the take fee from EtherDelta. /// @param amount Amount to substract EtherDelta fee /// @return Amount minus the EtherDelta fee. function substractFee(uint feePercentage, uint amount) constant internal returns(uint, uint) { uint fee = getPartialAmount(amount, 1 ether, feePercentage); return (SafeMath.safeSub(amount, fee), fee); } /// @dev Deposit ethers to EtherDelta. /// @param amount Amount of ethers to deposit in EtherDelta function deposit(uint amount) internal { EtherDelta(ETHERDELTA_ADDR).deposit.value(amount)(); } /// @dev Deposit tokens to EtherDelta. /// @param token Address of token to deposit in EtherDelta /// @param amount Amount of tokens to deposit in EtherDelta function depositToken(address token, uint amount) internal { Token(token).approve(ETHERDELTA_ADDR, amount); EtherDelta(ETHERDELTA_ADDR).depositToken(token, amount); } /// @dev Withdraw ethers from EtherDelta /// @param amount Amount of ethers to withdraw from EtherDelta function withdraw(uint amount) internal { EtherDelta(ETHERDELTA_ADDR).withdraw(amount); } /// @dev Withdraw tokens from EtherDelta. /// @param token Address of token to withdraw from EtherDelta /// @param amount Amount of tokens to withdraw from EtherDelta function withdrawToken(address token, uint amount) internal { EtherDelta(ETHERDELTA_ADDR).withdrawToken(token, amount); } /// @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 SafeMath.safeDiv(SafeMath.safeMul(numerator, target), denominator); } } library ZrxTrader { uint16 constant public EXTERNAL_QUERY_GAS_LIMIT = 4999; // Changes to state require at least 5000 gas address constant public ZRX_EXCHANGE_ADDR = 0x12459c951127e0c374ff9105dda097662a027093; // 0x Exchange contract address address constant public TOKEN_TRANSFER_PROXY_ADDR = 0x8da0d80f5007ef1e431dd2127178d224e32c2ef4; // TokenTransferProxy contract address address constant public WETH_ADDR = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2; // Wrapped ether address (WETH) address constant public ZRX_TOKEN_ADDR = 0xe41d2489571d322189246dafa5ebde1f4699f498; /// @dev Gets the address of the Wrapped Ether contract /// @return Address of Weth Contract. function getWethAddress() internal returns(address) { return WETH_ADDR; } /// @dev Fills a sell order in 0x. /// @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. /// @return Total amount of takerToken filled in trade. function fillSellOrder( address[5] orderAddresses, uint[6] orderValues, uint fillTakerTokenAmount, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { // Wrap ETH to WETH depositWeth(fillTakerTokenAmount); // Allow 0x Transfer Token Proxy to transfer WETH aproveToken(WETH_ADDR, fillTakerTokenAmount); //Allow ZRX Transfer Token Proxy to transfer the token for fees aproveToken(ZRX_TOKEN_ADDR, getPartialAmount(fillTakerTokenAmount, orderValues[1], orderValues[3])); uint ethersSpent = Exchange(ZRX_EXCHANGE_ADDR).fillOrder( orderAddresses, orderValues, fillTakerTokenAmount, true, v, r, s ); // Fill 0x order return getPartialAmount(orderValues[0], orderValues[1], ethersSpent); } /// @dev Fills a buy order in 0x. /// @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. /// @return Total amount of takerToken filled in trade. function fillBuyOrder( address[5] orderAddresses, uint[6] orderValues, uint fillTakerTokenAmount, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { //Allow 0x Transfer Token Proxy to transfer the token aproveToken(orderAddresses[3], fillTakerTokenAmount); //Allow ZRX Transfer Token Proxy to transfer the token for fees aproveToken(ZRX_TOKEN_ADDR, getPartialAmount(fillTakerTokenAmount, orderValues[1], orderValues[3])); // Fill 0x order uint tokensSold = Exchange(ZRX_EXCHANGE_ADDR).fillOrder( orderAddresses, orderValues, fillTakerTokenAmount, true, v, r, s ); uint ethersObtained = getPartialAmount(orderValues[0], orderValues[1], tokensSold); // Unwrap WETH to ETH withdrawWeth(ethersObtained); return ethersObtained; } /// @dev Get the available amount of a 0x order. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param v Array ECDSA signature v parameters. /// @param r Array of ECDSA signature r parameters. /// @param s Array of ECDSA signature s parameters. /// @return Available amount of a 0x order. function getAvailableAmount( address[5] orderAddresses, uint[6] orderValues, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { //If expired return 0 if(block.timestamp >= orderValues[4]) return 0; bytes32 orderHash = Exchange(ZRX_EXCHANGE_ADDR).getOrderHash(orderAddresses, orderValues); uint unAvailable = Exchange(ZRX_EXCHANGE_ADDR).getUnavailableTakerTokenAmount(orderHash); //Gets the available amount acoording to 0x contract substracting takerTokenAmount with unavailable takerTokenAmount uint availableByContract = SafeMath.safeSub(orderValues[1], unAvailable); //Gets the available amount according of the maker token balance uint availableByBalance = getPartialAmount(getBalance(orderAddresses[2], orderAddresses[0]), orderValues[0], orderValues[1]); //Gets the available amount according how much allowance of the token the maker has uint availableByAllowance = getPartialAmount(getAllowance(orderAddresses[2], orderAddresses[0]), orderValues[0], orderValues[1]); //Get the available amount according to how much ZRX fee the maker can pay uint zrxAmount = getAllowance(ZRX_TOKEN_ADDR, orderAddresses[0]); uint availableByZRX = getPartialAmount(zrxAmount, orderValues[2], orderValues[1]); //Returns the min value of all available results return SafeMath.min256(SafeMath.min256(SafeMath.min256(availableByContract, availableByBalance), availableByAllowance), availableByZRX); } /// @dev Deposit WETH /// @param amount Amount of ether to wrap. function depositWeth(uint amount) internal { EtherToken(WETH_ADDR).deposit.value(amount)(); } /// @dev Approve tokens to be transfered by 0x Token Transfer Proxy /// @param token Address of token to approve. /// @param amount Amount of tokens to approve. function aproveToken(address token, uint amount) internal { Token(token).approve(TOKEN_TRANSFER_PROXY_ADDR, amount); } /// @dev Withdraw WETH /// @param amount Amount of ether to unwrap. function withdrawWeth(uint amount) internal { EtherToken(WETH_ADDR).withdraw(amount); } /// @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) internal constant returns (uint) { return SafeMath.safeDiv(SafeMath.safeMul(numerator, target), denominator); } /// @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 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 returns (uint) { return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_ADDR); // Limit gas to prevent reentrancy } } contract EasyTrade { string constant public VERSION = "1.0.0"; address constant public ZRX_TOKEN_ADDR = 0xe41d2489571d322189246dafa5ebde1f4699f498; address public admin; // Admin address address public feeAccount; // Account that will receive the fee uint public serviceFee; // Percentage times (1 ether) uint public collectedFee = 0; // Total of fees accumulated event FillSellOrder(address account, address token, uint tokens, uint ethers, uint tokensSold, uint ethersObtained, uint tokensRefunded); event FillBuyOrder(address account, address token, uint tokens, uint ethers, uint tokensObtained, uint ethersSpent, uint ethersRefunded); modifier onlyAdmin() { require(msg.sender == admin); _; } modifier onlyFeeAccount() { require(msg.sender == feeAccount); _; } function EasyTrade( address admin_, address feeAccount_, uint serviceFee_) { admin = admin_; feeAccount = feeAccount_; serviceFee = serviceFee_; } /// @dev For exchange contracts that send ethers back. function() public payable { //Only accepts payments from 0x Wrapped Ether or EtherDelta require(msg.sender == ZrxTrader.getWethAddress() || msg.sender == EtherDeltaTrader.getEtherDeltaAddresss()); } /// @dev Set the new admin. Only admin can set the new admin. /// @param admin_ Address of the new admin. function changeAdmin(address admin_) public onlyAdmin { admin = admin_; } /// @dev Set the new fee account. Only admin can set the new fee account. /// @param feeAccount_ Address of the new fee account. function changeFeeAccount(address feeAccount_) public onlyAdmin { feeAccount = feeAccount_; } /// @dev Set the service fee. Only admin can set the new fee. Service fee can only be reduced, never increased /// @param serviceFee_ Percentage times (1 ether). function changeFeePercentage(uint serviceFee_) public onlyAdmin { require(serviceFee_ < serviceFee); serviceFee = serviceFee_; } /// @dev Creates an order to sell a token. /// @notice Needs first to call Token(tokend_address).approve(this, tokens_) so the contract can trade the tokens. /// @param token Address of the token to sell. /// @param tokensTotal Amount of the token to sell. /// @param ethersTotal Amount of ethers to get. /// @param exchanges Exchanges of each order (0: EtherDelta 1: 0x). /// @param ethersTotal Amount of ethers to get. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFees Array of exchange fees 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 createSellOrder( address token, uint tokensTotal, uint ethersTotal, uint8[] exchanges, address[5][] orderAddresses, uint[6][] orderValues, uint[] exchangeFees, uint8[] v, bytes32[] r, bytes32[] s ) public { //Transfer tokens to contract so it can sell them. require(Token(token).transferFrom(msg.sender, this, tokensTotal)); uint ethersObtained; uint tokensSold; uint tokensRefunded = tokensTotal; (ethersObtained, tokensSold) = fillOrdersForSellRequest( tokensTotal, exchanges, orderAddresses, orderValues, exchangeFees, v, r, s ); //We make sure that at least one order had some amount filled require(ethersObtained > 0 && tokensSold >0); //Check that the price of what was sold is not smaller than the min agreed require(SafeMath.safeDiv(ethersTotal, tokensTotal) <= SafeMath.safeDiv(ethersObtained, tokensSold)); //Substracts the tokens sold tokensRefunded = SafeMath.safeSub(tokensTotal, tokensSold); //Return tokens not sold if(tokensRefunded > 0) require(Token(token).transfer(msg.sender, tokensRefunded)); //Send the ethersObtained transfer(msg.sender, ethersObtained); FillSellOrder(msg.sender, token, tokensTotal, ethersTotal, tokensSold, ethersObtained, tokensRefunded); } /// @dev Fills a sell order by synchronously executing exchange buy orders. /// @param tokensTotal Total amount of tokens to sell. /// @param exchanges Exchanges of each order (0: EtherDelta 1: 0x). /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFees Array of exchange fees 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. /// @return Total amount of ethers obtained and total amount of tokens sold. function fillOrdersForSellRequest( uint tokensTotal, uint8[] exchanges, address[5][] orderAddresses, uint[6][] orderValues, uint[] exchangeFees, uint8[] v, bytes32[] r, bytes32[] s ) internal returns(uint, uint) { uint totalEthersObtained = 0; uint tokensRemaining = tokensTotal; for (uint i = 0; i < orderAddresses.length; i++) { (totalEthersObtained, tokensRemaining) = fillOrderForSellRequest( totalEthersObtained, tokensRemaining, exchanges[i], orderAddresses[i], orderValues[i], exchangeFees[i], v[i], r[i], s[i] ); } //Substracts service fee if(totalEthersObtained > 0) { uint fee = SafeMath.safeMul(totalEthersObtained, serviceFee) / (1 ether); totalEthersObtained = collectServiceFee(SafeMath.min256(fee, totalEthersObtained), totalEthersObtained); } //Returns ethers obtained return (totalEthersObtained, SafeMath.safeSub(tokensTotal, tokensRemaining)); } /// @dev Fills a sell order with a buy order. /// @param totalEthersObtained Total amount of ethers obtained so far. /// @param initialTokensRemaining Total amount of tokens remaining to sell. /// @param exchange 0: EtherDelta 1: 0x. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFee Exchange fees to fill the order. /// @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 ethers obtained and total amount of tokens remainint to sell. function fillOrderForSellRequest( uint totalEthersObtained, uint initialTokensRemaining, uint8 exchange, address[5] orderAddresses, uint[6] orderValues, uint exchangeFee, uint8 v, bytes32 r, bytes32 s ) internal returns(uint, uint) { uint ethersObtained = 0; uint tokensRemaining = initialTokensRemaining; //Exchange fees should not be higher than 1% (in Wei) require(exchangeFee < 10000000000000000); //Checks that there is enoughh amount to execute the trade uint fillAmount = getFillAmount( tokensRemaining, exchange, orderAddresses, orderValues, exchangeFee, v, r, s ); if(fillAmount > 0) { //Substracts the amount to execute tokensRemaining = SafeMath.safeSub(tokensRemaining, fillAmount); if(exchange == 0) { //Executes EtherDelta buy order and returns the amount of ethers obtained, fullfill all or returns zero ethersObtained = EtherDeltaTrader.fillBuyOrder( orderAddresses, orderValues, exchangeFee, fillAmount, v, r, s ); } else { //Executes 0x buy order and returns the amount of ethers obtained, fullfill all or returns zero ethersObtained = ZrxTrader.fillBuyOrder( orderAddresses, orderValues, fillAmount, v, r, s ); //If 0x, exchangeFee is collected by the contract to buy externally ZrxTrader uint fee = SafeMath.safeMul(ethersObtained, exchangeFee) / (1 ether); ethersObtained = collectServiceFee(fee, ethersObtained); } } //Adds the amount of ethers obtained and tokens remaining return (SafeMath.safeAdd(totalEthersObtained, ethersObtained), ethersObtained==0? initialTokensRemaining: tokensRemaining); } /// @dev Creates an order to buy a token. /// @param token Address of the token to sell. /// @param tokensTotal Amount of the token to sell. /// @param exchanges Exchanges of each order (0: EtherDelta 1: 0x). /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFees Array of exchange fees 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 createBuyOrder( address token, uint tokensTotal, uint8[] exchanges, address[5][] orderAddresses, uint[6][] orderValues, uint[] exchangeFees, uint8[] v, bytes32[] r, bytes32[] s ) public payable { uint ethersTotal = msg.value; uint tokensObtained; uint ethersSpent; uint ethersRefunded = ethersTotal; require(tokensTotal > 0 && msg.value > 0); (tokensObtained, ethersSpent) = fillOrdersForBuyRequest( ethersTotal, exchanges, orderAddresses, orderValues, exchangeFees, v, r, s ); //We make sure that at least one order had some amount filled require(ethersSpent > 0 && tokensObtained >0); //Check that the price of what was bought is not greater than the max agreed require(SafeMath.safeDiv(ethersTotal, tokensTotal) >= SafeMath.safeDiv(ethersSpent, tokensObtained)); //Substracts the ethers spent ethersRefunded = SafeMath.safeSub(ethersTotal, ethersSpent); //Return ethers not spent if(ethersRefunded > 0) require(msg.sender.call.value(ethersRefunded)()); //Send the tokens transferToken(token, msg.sender, tokensObtained); FillBuyOrder(msg.sender, token, tokensTotal, ethersTotal, tokensObtained, ethersSpent, ethersRefunded); } /// @dev Fills a buy order by synchronously executing exchange sell orders. /// @param ethersTotal Total amount of ethers to spend. /// @param exchanges Exchanges of each order (0: EtherDelta 1: 0x). /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFees Array of exchange fees 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. /// @return Total of tokens obtained. /// @return Total amount of tokens obtained and total amount of ethers spent. function fillOrdersForBuyRequest( uint ethersTotal, uint8[] exchanges, address[5][] orderAddresses, uint[6][] orderValues, uint[] exchangeFees, uint8[] v, bytes32[] r, bytes32[] s ) internal returns(uint, uint) { uint totalTokensObtained = 0; uint ethersRemaining = ethersTotal; for (uint i = 0; i < orderAddresses.length; i++) { if(ethersRemaining > 0) { (totalTokensObtained, ethersRemaining) = fillOrderForBuyRequest( totalTokensObtained, ethersRemaining, exchanges[i], orderAddresses[i], orderValues[i], exchangeFees[i], v[i], r[i], s[i] ); } } //Returns total of tokens obtained return (totalTokensObtained, SafeMath.safeSub(ethersTotal, ethersRemaining)); } /// @dev Fills a buy order wtih a sell order. /// @param totalTokensObtained Total amount of tokens obtained so far. /// @param initialEthersRemaining Total amount of ethers remainint to spend. /// @param exchange 0: EtherDelta 1: 0x. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param exchangeFee Exchange fees to fill the order. /// @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 of tokens obtained. /// @return Total amount of tokens obtained and total amount of ethers remainint to spend. function fillOrderForBuyRequest( uint totalTokensObtained, uint initialEthersRemaining, uint8 exchange, address[5] orderAddresses, uint[6] orderValues, uint exchangeFee, uint8 v, bytes32 r, bytes32 s ) internal returns(uint, uint) { uint tokensObtained = 0; uint ethersRemaining = initialEthersRemaining; //Exchange fees should not be higher than 1% (in Wei) require(exchangeFee < 10000000000000000); //Checks that there is enoughh amount to execute the trade uint fillAmount = getFillAmount( ethersRemaining, exchange, orderAddresses, orderValues, exchangeFee, v, r, s ); if(fillAmount > 0) { //Substracts the amount to execute ethersRemaining = SafeMath.safeSub(ethersRemaining, fillAmount); //Substract service fee (fillAmount, ethersRemaining) = substractFee(serviceFee, fillAmount, ethersRemaining); if(exchange == 0) { //Executes EtherDelta order, fee is paid directly to EtherDelta, fullfill all or returns zero tokensObtained = EtherDeltaTrader.fillSellOrder( orderAddresses, orderValues, exchangeFee, fillAmount, v, r, s ); } else { //If 0x, exchangeFee is collected by the contract to buy externally ZrxTrader, fullfill all or returns zero (fillAmount, ethersRemaining) = substractFee(exchangeFee, fillAmount, ethersRemaining); //Executes 0x order tokensObtained = ZrxTrader.fillSellOrder( orderAddresses, orderValues, fillAmount, v, r, s ); } } //Returns total of tokens obtained and ethers remaining return (SafeMath.safeAdd(totalTokensObtained, tokensObtained), tokensObtained==0? initialEthersRemaining: ethersRemaining); } /// @dev Get the amount to fill in the order. /// @param amount Remaining amount of the order. /// @param exchange 0: EtherDelta 1: 0x. /// @param orderAddresses Array of address arrays containing individual order addresses. /// @param orderValues Array of uint arrays containing individual order values. /// @param v Array ECDSA signature v parameters. /// @param r Array of ECDSA signature r parameters. /// @param s Array of ECDSA signature s parameters. /// @return Min amount between the remaining and the order available. function getFillAmount( uint amount, uint8 exchange, address[5] orderAddresses, uint[6] orderValues, uint exchangeFee, uint8 v, bytes32 r, bytes32 s ) internal returns(uint) { uint availableAmount; if(exchange == 0) { availableAmount = EtherDeltaTrader.getAvailableAmount( orderAddresses, orderValues, exchangeFee, v, r, s ); } else { availableAmount = ZrxTrader.getAvailableAmount( orderAddresses, orderValues, v, r, s ); } return SafeMath.min256(amount, availableAmount); } /// @dev Substracts the service from the remaining amount if enough, if not from the amount to fill the order. /// @param feePercentage Fee Percentage /// @param fillAmount Amount to fill the order /// @param ethersRemaining Remaining amount of ethers for other orders /// @return Amount to fill the order and remaining amount function substractFee( uint feePercentage, uint fillAmount, uint ethersRemaining ) internal returns(uint, uint) { uint fee = SafeMath.safeMul(fillAmount, feePercentage) / (1 ether); //If there is enough remaining to pay fee, it substracts the fee from the remaining if(ethersRemaining >= fee) ethersRemaining = collectServiceFee(fee, ethersRemaining); else { fillAmount = collectServiceFee(fee, SafeMath.safeAdd(fillAmount, ethersRemaining)); ethersRemaining = 0; } return (fillAmount, ethersRemaining); } /// @dev Substracts the service fee in ethers. /// @param fee Service fee in ethers /// @param amount Amount to substract service fee /// @return Amount minus service fee. function collectServiceFee(uint fee, uint amount) internal returns(uint) { collectedFee = SafeMath.safeAdd(collectedFee, fee); return SafeMath.safeSub(amount, fee); } /// @dev Transfer ethers to user account. /// @param account User address where to send ethers. /// @param amount Amount of ethers to send. function transfer(address account, uint amount) internal { require(account.send(amount)); } /// @dev Transfer token to user account. /// @param token Address of token to transfer. /// @param account User address where to transfer tokens. /// @param amount Amount of tokens to transfer. function transferToken(address token, address account, uint amount) internal { require(Token(token).transfer(account, amount)); } /// @dev Withdraw collected service fees. Only by fee account. /// @param amount Amount to withdraw function withdrawFees(uint amount) public onlyFeeAccount { require(collectedFee >= amount); collectedFee = SafeMath.safeSub(collectedFee, amount); require(feeAccount.send(amount)); } /// @dev Withdraw contract ZRX in case new version is deployed. Only by admin. /// @param amount Amount to withdraw function withdrawZRX(uint amount) public onlyAdmin { require(Token(ZRX_TOKEN_ADDR).transfer(admin, amount)); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeAccount","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"feeAccount_","type":"address"}],"name":"changeFeeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"serviceFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"admin_","type":"address"}],"name":"changeAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ZRX_TOKEN_ADDR","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"tokensTotal","type":"uint256"},{"name":"ethersTotal","type":"uint256"},{"name":"exchanges","type":"uint8[]"},{"name":"orderAddresses","type":"address[5][]"},{"name":"orderValues","type":"uint256[6][]"},{"name":"exchangeFees","type":"uint256[]"},{"name":"v","type":"uint8[]"},{"name":"r","type":"bytes32[]"},{"name":"s","type":"bytes32[]"}],"name":"createSellOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"collectedFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdrawZRX","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"tokensTotal","type":"uint256"},{"name":"exchanges","type":"uint8[]"},{"name":"orderAddresses","type":"address[5][]"},{"name":"orderValues","type":"uint256[6][]"},{"name":"exchangeFees","type":"uint256[]"},{"name":"v","type":"uint8[]"},{"name":"r","type":"bytes32[]"},{"name":"s","type":"bytes32[]"}],"name":"createBuyOrder","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"serviceFee_","type":"uint256"}],"name":"changeFeePercentage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"admin_","type":"address"},{"name":"feeAccount_","type":"address"},{"name":"serviceFee_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"},{"indexed":false,"name":"ethers","type":"uint256"},{"indexed":false,"name":"tokensSold","type":"uint256"},{"indexed":false,"name":"ethersObtained","type":"uint256"},{"indexed":false,"name":"tokensRefunded","type":"uint256"}],"name":"FillSellOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"tokens","type":"uint256"},{"indexed":false,"name":"ethers","type":"uint256"},{"indexed":false,"name":"tokensObtained","type":"uint256"},{"indexed":false,"name":"ethersSpent","type":"uint256"},{"indexed":false,"name":"ethersRefunded","type":"uint256"}],"name":"FillBuyOrder","type":"event"}]
Contract Creation Code
60606040526000600355341561001457600080fd5b604051606080612f4783398101604052808051906020019091908051906020019091908051906020019091905050826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600281905550505050612e6b806100dc6000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635e318e071461014557806365e17c9d1461016857806371ffcb16146101bd5780638abdf5aa146101f65780638f2839701461021f578063b2dfa39914610258578063caf71743146102ad578063e811f50a14610530578063ed56de8c14610559578063f7c380521461057c578063f851a440146107eb578063fae1419214610840578063ffa1ad7414610863575b6100cd6108f1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610138575061010961090d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561014357600080fd5b005b341561015057600080fd5b6101666004808035906020019091905050610929565b005b341561017357600080fd5b61017b610a0d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c857600080fd5b6101f4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a33565b005b341561020157600080fd5b610209610ad2565b6040518082815260200191505060405180910390f35b341561022a57600080fd5b610256600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ad8565b005b341561026357600080fd5b61026b610b76565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102b857600080fd5b61052e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156103a457848483905060a00201600580602002604051908101604052809291908260056020028082843782019150505050508152602001906001019061035f565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561042057848483905060c0020160068060200260405190810160405280929190826006602002808284378201915050505050815260200190600101906103db565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610b8e565b005b341561053b57600080fd5b610543610eae565b6040518082815260200191505060405180910390f35b341561056457600080fd5b61057a6004808035906020019091905050610eb4565b005b6107e9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561065f57848483905060a00201600580602002604051908101604052809291908260056020028082843782019150505050508152602001906001019061061a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156106db57848483905060c002016006806020026040519081016040528092919082600660200280828437820191505050505081526020019060010190610696565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611018565b005b34156107f657600080fd5b6107fe6111bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561084b57600080fd5b61086160048080359060200190919050506111e2565b005b341561086e57600080fd5b610876611257565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108b657808201518184015260208101905061089b565b50505050905090810190601f1680156108e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905090565b6000738d12a197cb00d4747a1fe03395095ce2a5cc6819905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561098557600080fd5b806003541015151561099657600080fd5b6109a260035482611290565b600381905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610a0a57600080fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a8e57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b3357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b73e41d2489571d322189246dafa5ebde1f4699f49881565b60008060008c73ffffffffffffffffffffffffffffffffffffffff166323b872dd33308f6000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610c7257600080fd5b6102c65a03f11515610c8357600080fd5b505050604051805190501515610c9857600080fd5b8b9050610cab8c8b8b8b8b8b8b8b6112a9565b8093508194505050600083118015610cc35750600082115b1515610cce57600080fd5b610cd883836113ee565b610ce28c8e6113ee565b11151515610cef57600080fd5b610cf98c83611290565b90506000811115610dd6578c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610daf57600080fd5b6102c65a03f11515610dc057600080fd5b505050604051805190501515610dd557600080fd5b5b610de03384611409565b7fe26e8d84f7ed98fa72d63fa1c1214ede1ac33f01853fc7ecba14153893fc75f5338e8e8e868887604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a150505050505050505050505050565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f0f57600080fd5b73e41d2489571d322189246dafa5ebde1f4699f49873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610fef57600080fd5b6102c65a03f1151561100057600080fd5b50505060405180519050151561101557600080fd5b50565b60008060008034935083905060008c1180156110345750600034115b151561103f57600080fd5b61104f848c8c8c8c8c8c8c61144d565b80935081945050506000821180156110675750600083115b151561107257600080fd5b61107c82846113ee565b611086858e6113ee565b1015151561109357600080fd5b61109d8483611290565b905060008111156110e4573373ffffffffffffffffffffffffffffffffffffffff168160405160006040518083038185876187965a03f19250505015156110e357600080fd5b5b6110ef8d3385611559565b7fa6ddcc9603775cbdbc6af5fc55608e5b392f9c04a446106e0fe78e12813640bd338e8e87878787604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a150505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123d57600080fd5b6002548110151561124d57600080fd5b8060028190555050565b6040805190810160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b600082821115151561129e57fe5b818303905092915050565b600080600080600080600093508d9250600091505b8b5182101561138e5761137984848f858151811015156112da57fe5b906020019060200201518f868151811015156112f257fe5b906020019060200201518f8781518110151561130a57fe5b906020019060200201518f8881518110151561132257fe5b906020019060200201518f8981518110151561133a57fe5b906020019060200201518f8a81518110151561135257fe5b906020019060200201518f8b81518110151561136a57fe5b9060200190602002015161162f565b809450819550505081806001019250506112be565b60008411156113ce57670de0b6b3a76400006113ac8560025461170a565b8115156113b557fe5b0490506113cb6113c5828661173d565b85611756565b93505b836113d98f85611290565b95509550505050509850989650505050505050565b60008082848115156113fc57fe5b0490508091505092915050565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561144957600080fd5b5050565b60008060008060008092508c9150600090505b8a5181101561153a57600082111561152d5761152483838e8481518110151561148557fe5b906020019060200201518e8581518110151561149d57fe5b906020019060200201518e868151811015156114b557fe5b906020019060200201518e878151811015156114cd57fe5b906020019060200201518e888151811015156114e557fe5b906020019060200201518e898151811015156114fd57fe5b906020019060200201518e8a81518110151561151557fe5b9060200190602002015161177c565b80935081945050505b8080600101915050611460565b826115458e84611290565b945094505050509850989650505050505050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561160457600080fd5b6102c65a03f1151561161557600080fd5b50505060405180519050151561162a57600080fd5b505050565b600080600080600080600093508d9250662386f26fc100008a10151561165457600080fd5b611664838e8e8e8e8e8e8e611851565b915060008211156116da576116798383611290565b925060008d60ff16141561169d576116968c8c8c858d8d8d61189e565b93506116d9565b6116ab8c8c848c8c8c611959565b9350670de0b6b3a76400006116c0858c61170a565b8115156116c957fe5b0490506116d68185611756565b93505b5b6116e48f85611b57565b600085146116f257836116f4565b8e5b9550955050505050995099975050505050505050565b6000808284029050600084148061172b575082848281151561172857fe5b04145b151561173357fe5b8091505092915050565b600081831061174c578161174e565b825b905092915050565b600061176460035484611b57565b6003819055506117748284611290565b905092915050565b60008060008060008092508c9150662386f26fc100008910151561179f57600080fd5b6117af828d8d8d8d8d8d8d611851565b90506000811115611822576117c48282611290565b91506117d36002548284611b75565b809350819250505060008c60ff1614156117fd576117f68b8b8b848c8c8c611bdc565b9250611821565b611808898284611b75565b809350819250505061181e8b8b838b8b8b611c97565b92505b5b61182c8e84611b57565b6000841461183a578261183c565b8d5b94509450505050995099975050505050505050565b60008060008960ff1614156118755761186e888888888888611e90565b9050611885565b61188288888787876120f8565b90505b61188f8a8261173d565b91505098975050505050505050565b60008060006118c08a60026005811015156118b557fe5b602002015188612451565b6118ca88886125fa565b80925081935050506118e08a8a8489898961262b565b6119196119148a60006006811015156118f557fe5b60200201518b600160068110151561190957fe5b602002015185612838565b612856565b61194a89600060068110151561192b57fe5b60200201518a600160068110151561193f57fe5b602002015184612838565b92505050979650505050505050565b600080600061197b89600360058110151561197057fe5b6020020151886128ef565b6119c973e41d2489571d322189246dafa5ebde1f4699f4986119c4898b60016006811015156119a657fe5b60200201518c60036006811015156119ba57fe5b60200201516129ce565b6128ef565b7312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff1663bc61394a8a8a8a60018b8b8b6000604051602001526040518863ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018088600560200280838360005b83811015611a60578082015181840152602081019050611a45565b5050505090500187600660200280838360005b83811015611a8e578082015181840152602081019050611a73565b50505050905001868152602001851515151581526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001975050505050505050602060405180830381600087803b1515611aef57600080fd5b6102c65a03f11515611b0057600080fd5b505050604051805190509150611b3d886000600681101515611b1e57fe5b6020020151896001600681101515611b3257fe5b6020020151846129ce565b9050611b48816129ec565b80925050509695505050505050565b6000808284019050838110151515611b6b57fe5b8091505092915050565b6000806000670de0b6b3a7640000611b8d868861170a565b811515611b9657fe5b0490508084101515611bb357611bac8185611756565b9350611bcd565b611bc681611bc18787611b57565b611756565b9450600093505b84849250925050935093915050565b6000806000611bea87612a85565b611bf488886125fa565b8092508193505050611c0a8a8a8489898961262b565b611c578a6001600581101515611c1c57fe5b6020020151611c528b6000600681101515611c3357fe5b60200201518c6001600681101515611c4757fe5b602002015186612838565b612b14565b611c88896000600681101515611c6957fe5b60200201518a6001600681101515611c7d57fe5b602002015184612838565b92505050979650505050505050565b600080611ca386612be2565b611cc173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2876128ef565b611d0f73e41d2489571d322189246dafa5ebde1f4699f498611d0a888a6001600681101515611cec57fe5b60200201518b6003600681101515611d0057fe5b60200201516129ce565b6128ef565b7312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff1663bc61394a89898960018a8a8a6000604051602001526040518863ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018088600560200280838360005b83811015611da6578082015181840152602081019050611d8b565b5050505090500187600660200280838360005b83811015611dd4578082015181840152602081019050611db9565b50505050905001868152602001851515151581526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001975050505050505050602060405180830381600087803b1515611e3557600080fd5b6102c65a03f11515611e4657600080fd5b505050604051805190509050611e83876000600681101515611e6457fe5b6020020151886001600681101515611e7857fe5b6020020151836129ce565b9150509695505050505050565b600080866002600681101515611ea257fe5b6020020151431115611eb757600091506120ed565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff1663fb6e155f896002600581101515611ef657fe5b6020020151896001600681101515611f0a57fe5b60200201518b6001600581101515611f1e57fe5b60200201518b6000600681101515611f3257fe5b60200201518c6002600681101515611f4657fe5b60200201518d6003600681101515611f5a57fe5b60200201518f6000600581101515611f6e57fe5b60200201518d8d8d6000604051602001526040518b63ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019a5050505050505050505050602060405180830381600087803b15156120a957600080fd5b6102c65a03f115156120ba57600080fd5b5050506040518051905090506120ea816120dc670de0b6b3a764000089611290565b670de0b6b3a7640000612838565b91505b509695505050505050565b6000806000806000806000808b600460068110151561211357fe5b6020020151421015156121295760009750612441565b7312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff1663cfc4d0ec8e8e6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600560200280838360005b838110156121ba57808201518184015260208101905061219f565b5050505090500182600660200280838360005b838110156121e85780820151818401526020810190506121cd565b5050505090500192505050602060405180830381600087803b151561220c57600080fd5b6102c65a03f1151561221d57600080fd5b5050506040518051905096507312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff16637e9abb50886000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15156122bc57600080fd5b6102c65a03f115156122cd57600080fd5b5050506040518051905095506122f68c60016006811015156122eb57fe5b602002015187611290565b945061235861232b8e600260058110151561230d57fe5b60200201518f600060058110151561232157fe5b6020020151612c71565b8d600060068110151561233a57fe5b60200201518e600160068110151561234e57fe5b60200201516129ce565b93506123ba61238d8e600260058110151561236f57fe5b60200201518f600060058110151561238357fe5b6020020151612d34565b8d600060068110151561239c57fe5b60200201518e60016006811015156123b057fe5b60200201516129ce565b92506123ed73e41d2489571d322189246dafa5ebde1f4699f4988e60006005811015156123e357fe5b6020020151612d34565b9150612420828d600260068110151561240257fe5b60200201518e600160068110151561241657fe5b60200201516129ce565b905061243e612438612432878761173d565b8561173d565b8261173d565b97505b5050505050505095945050505050565b8173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3738d12a197cb00d4747a1fe03395095ce2a5cc6819836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561251057600080fd5b6102c65a03f1151561252157600080fd5b5050506040518051905050738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff1663338b5dea83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15156125e257600080fd5b6102c65a03f115156125f357600080fd5b5050505050565b600080600061261284670de0b6b3a764000087612838565b905061261e8482611290565b8192509250509250929050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff16630a19b14a87600260058110151561266a57fe5b602002015187600160068110151561267e57fe5b602002015189600160058110151561269257fe5b60200201518960006006811015156126a657fe5b60200201518a60026006811015156126ba57fe5b60200201518b60036006811015156126ce57fe5b60200201518d60006005811015156126e257fe5b60200201518b8b8b8f6040518c63ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1660ff168152602001846000191660001916815260200183600019166000191681526020018281526020019b505050505050505050505050600060405180830381600087803b151561281c57600080fd5b6102c65a03f1151561282d57600080fd5b505050505050505050565b600061284d612847858461170a565b846113ee565b90509392505050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15156128d857600080fd5b6102c65a03f115156128e957600080fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3738da0d80f5007ef1e431dd2127178d224e32c2ef4836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156129ae57600080fd5b6102c65a03f115156129bf57600080fd5b50505060405180519050505050565b60006129e36129dd858461170a565b846113ee565b90509392505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1515612a6e57600080fd5b6102c65a03f11515612a7f57600080fd5b50505050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b1515612afc57600080fd5b6125ee5a03f11515612b0d57600080fd5b5050505050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff16639e281a9883836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1515612bca57600080fd5b6102c65a03f11515612bdb57600080fd5b5050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b1515612c5957600080fd5b6125ee5a03f11515612c6a57600080fd5b5050505050565b60008273ffffffffffffffffffffffffffffffffffffffff166370a0823161138761ffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600088803b1515612d1457600080fd5b87f11515612d2157600080fd5b5050505060405180519050905092915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e61138761ffff1684738da0d80f5007ef1e431dd2127178d224e32c2ef46040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600088803b1515612e1f57600080fd5b87f11515612e2c57600080fd5b50505050604051805190509050929150505600a165627a7a72305820edb53d0cfbd0987e671d7ba31e05adee038dd37c23e2ab5882742386d4f4855d0029000000000000000000000000a065c23f48ae275c376eabc09b9b9b4557e57c14000000000000000000000000a065c23f48ae275c376eabc09b9b9b4557e57c140000000000000000000000000000000000000000000000000011c37937e08000
Deployed Bytecode
0x6060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635e318e071461014557806365e17c9d1461016857806371ffcb16146101bd5780638abdf5aa146101f65780638f2839701461021f578063b2dfa39914610258578063caf71743146102ad578063e811f50a14610530578063ed56de8c14610559578063f7c380521461057c578063f851a440146107eb578063fae1419214610840578063ffa1ad7414610863575b6100cd6108f1565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610138575061010961090d565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561014357600080fd5b005b341561015057600080fd5b6101666004808035906020019091905050610929565b005b341561017357600080fd5b61017b610a0d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101c857600080fd5b6101f4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610a33565b005b341561020157600080fd5b610209610ad2565b6040518082815260200191505060405180910390f35b341561022a57600080fd5b610256600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ad8565b005b341561026357600080fd5b61026b610b76565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102b857600080fd5b61052e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156103a457848483905060a00201600580602002604051908101604052809291908260056020028082843782019150505050508152602001906001019061035f565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561042057848483905060c0020160068060200260405190810160405280929190826006602002808284378201915050505050815260200190600101906103db565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610b8e565b005b341561053b57600080fd5b610543610eae565b6040518082815260200191505060405180910390f35b341561056457600080fd5b61057a6004808035906020019091905050610eb4565b005b6107e9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b8282101561065f57848483905060a00201600580602002604051908101604052809291908260056020028082843782019150505050508152602001906001019061061a565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020016000905b828210156106db57848483905060c002016006806020026040519081016040528092919082600660200280828437820191505050505081526020019060010190610696565b50505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050611018565b005b34156107f657600080fd5b6107fe6111bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561084b57600080fd5b61086160048080359060200190919050506111e2565b005b341561086e57600080fd5b610876611257565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108b657808201518184015260208101905061089b565b50505050905090810190601f1680156108e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2905090565b6000738d12a197cb00d4747a1fe03395095ce2a5cc6819905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561098557600080fd5b806003541015151561099657600080fd5b6109a260035482611290565b600381905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610a0a57600080fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a8e57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b3357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b73e41d2489571d322189246dafa5ebde1f4699f49881565b60008060008c73ffffffffffffffffffffffffffffffffffffffff166323b872dd33308f6000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610c7257600080fd5b6102c65a03f11515610c8357600080fd5b505050604051805190501515610c9857600080fd5b8b9050610cab8c8b8b8b8b8b8b8b6112a9565b8093508194505050600083118015610cc35750600082115b1515610cce57600080fd5b610cd883836113ee565b610ce28c8e6113ee565b11151515610cef57600080fd5b610cf98c83611290565b90506000811115610dd6578c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610daf57600080fd5b6102c65a03f11515610dc057600080fd5b505050604051805190501515610dd557600080fd5b5b610de03384611409565b7fe26e8d84f7ed98fa72d63fa1c1214ede1ac33f01853fc7ecba14153893fc75f5338e8e8e868887604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a150505050505050505050505050565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f0f57600080fd5b73e41d2489571d322189246dafa5ebde1f4699f49873ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610fef57600080fd5b6102c65a03f1151561100057600080fd5b50505060405180519050151561101557600080fd5b50565b60008060008034935083905060008c1180156110345750600034115b151561103f57600080fd5b61104f848c8c8c8c8c8c8c61144d565b80935081945050506000821180156110675750600083115b151561107257600080fd5b61107c82846113ee565b611086858e6113ee565b1015151561109357600080fd5b61109d8483611290565b905060008111156110e4573373ffffffffffffffffffffffffffffffffffffffff168160405160006040518083038185876187965a03f19250505015156110e357600080fd5b5b6110ef8d3385611559565b7fa6ddcc9603775cbdbc6af5fc55608e5b392f9c04a446106e0fe78e12813640bd338e8e87878787604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200186815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a150505050505050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561123d57600080fd5b6002548110151561124d57600080fd5b8060028190555050565b6040805190810160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b600082821115151561129e57fe5b818303905092915050565b600080600080600080600093508d9250600091505b8b5182101561138e5761137984848f858151811015156112da57fe5b906020019060200201518f868151811015156112f257fe5b906020019060200201518f8781518110151561130a57fe5b906020019060200201518f8881518110151561132257fe5b906020019060200201518f8981518110151561133a57fe5b906020019060200201518f8a81518110151561135257fe5b906020019060200201518f8b81518110151561136a57fe5b9060200190602002015161162f565b809450819550505081806001019250506112be565b60008411156113ce57670de0b6b3a76400006113ac8560025461170a565b8115156113b557fe5b0490506113cb6113c5828661173d565b85611756565b93505b836113d98f85611290565b95509550505050509850989650505050505050565b60008082848115156113fc57fe5b0490508091505092915050565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561144957600080fd5b5050565b60008060008060008092508c9150600090505b8a5181101561153a57600082111561152d5761152483838e8481518110151561148557fe5b906020019060200201518e8581518110151561149d57fe5b906020019060200201518e868151811015156114b557fe5b906020019060200201518e878151811015156114cd57fe5b906020019060200201518e888151811015156114e557fe5b906020019060200201518e898151811015156114fd57fe5b906020019060200201518e8a81518110151561151557fe5b9060200190602002015161177c565b80935081945050505b8080600101915050611460565b826115458e84611290565b945094505050509850989650505050505050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561160457600080fd5b6102c65a03f1151561161557600080fd5b50505060405180519050151561162a57600080fd5b505050565b600080600080600080600093508d9250662386f26fc100008a10151561165457600080fd5b611664838e8e8e8e8e8e8e611851565b915060008211156116da576116798383611290565b925060008d60ff16141561169d576116968c8c8c858d8d8d61189e565b93506116d9565b6116ab8c8c848c8c8c611959565b9350670de0b6b3a76400006116c0858c61170a565b8115156116c957fe5b0490506116d68185611756565b93505b5b6116e48f85611b57565b600085146116f257836116f4565b8e5b9550955050505050995099975050505050505050565b6000808284029050600084148061172b575082848281151561172857fe5b04145b151561173357fe5b8091505092915050565b600081831061174c578161174e565b825b905092915050565b600061176460035484611b57565b6003819055506117748284611290565b905092915050565b60008060008060008092508c9150662386f26fc100008910151561179f57600080fd5b6117af828d8d8d8d8d8d8d611851565b90506000811115611822576117c48282611290565b91506117d36002548284611b75565b809350819250505060008c60ff1614156117fd576117f68b8b8b848c8c8c611bdc565b9250611821565b611808898284611b75565b809350819250505061181e8b8b838b8b8b611c97565b92505b5b61182c8e84611b57565b6000841461183a578261183c565b8d5b94509450505050995099975050505050505050565b60008060008960ff1614156118755761186e888888888888611e90565b9050611885565b61188288888787876120f8565b90505b61188f8a8261173d565b91505098975050505050505050565b60008060006118c08a60026005811015156118b557fe5b602002015188612451565b6118ca88886125fa565b80925081935050506118e08a8a8489898961262b565b6119196119148a60006006811015156118f557fe5b60200201518b600160068110151561190957fe5b602002015185612838565b612856565b61194a89600060068110151561192b57fe5b60200201518a600160068110151561193f57fe5b602002015184612838565b92505050979650505050505050565b600080600061197b89600360058110151561197057fe5b6020020151886128ef565b6119c973e41d2489571d322189246dafa5ebde1f4699f4986119c4898b60016006811015156119a657fe5b60200201518c60036006811015156119ba57fe5b60200201516129ce565b6128ef565b7312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff1663bc61394a8a8a8a60018b8b8b6000604051602001526040518863ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018088600560200280838360005b83811015611a60578082015181840152602081019050611a45565b5050505090500187600660200280838360005b83811015611a8e578082015181840152602081019050611a73565b50505050905001868152602001851515151581526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001975050505050505050602060405180830381600087803b1515611aef57600080fd5b6102c65a03f11515611b0057600080fd5b505050604051805190509150611b3d886000600681101515611b1e57fe5b6020020151896001600681101515611b3257fe5b6020020151846129ce565b9050611b48816129ec565b80925050509695505050505050565b6000808284019050838110151515611b6b57fe5b8091505092915050565b6000806000670de0b6b3a7640000611b8d868861170a565b811515611b9657fe5b0490508084101515611bb357611bac8185611756565b9350611bcd565b611bc681611bc18787611b57565b611756565b9450600093505b84849250925050935093915050565b6000806000611bea87612a85565b611bf488886125fa565b8092508193505050611c0a8a8a8489898961262b565b611c578a6001600581101515611c1c57fe5b6020020151611c528b6000600681101515611c3357fe5b60200201518c6001600681101515611c4757fe5b602002015186612838565b612b14565b611c88896000600681101515611c6957fe5b60200201518a6001600681101515611c7d57fe5b602002015184612838565b92505050979650505050505050565b600080611ca386612be2565b611cc173c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2876128ef565b611d0f73e41d2489571d322189246dafa5ebde1f4699f498611d0a888a6001600681101515611cec57fe5b60200201518b6003600681101515611d0057fe5b60200201516129ce565b6128ef565b7312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff1663bc61394a89898960018a8a8a6000604051602001526040518863ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018088600560200280838360005b83811015611da6578082015181840152602081019050611d8b565b5050505090500187600660200280838360005b83811015611dd4578082015181840152602081019050611db9565b50505050905001868152602001851515151581526020018460ff1660ff16815260200183600019166000191681526020018260001916600019168152602001975050505050505050602060405180830381600087803b1515611e3557600080fd5b6102c65a03f11515611e4657600080fd5b505050604051805190509050611e83876000600681101515611e6457fe5b6020020151886001600681101515611e7857fe5b6020020151836129ce565b9150509695505050505050565b600080866002600681101515611ea257fe5b6020020151431115611eb757600091506120ed565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff1663fb6e155f896002600581101515611ef657fe5b6020020151896001600681101515611f0a57fe5b60200201518b6001600581101515611f1e57fe5b60200201518b6000600681101515611f3257fe5b60200201518c6002600681101515611f4657fe5b60200201518d6003600681101515611f5a57fe5b60200201518f6000600581101515611f6e57fe5b60200201518d8d8d6000604051602001526040518b63ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018a81526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018881526020018781526020018681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018460ff1660ff168152602001836000191660001916815260200182600019166000191681526020019a5050505050505050505050602060405180830381600087803b15156120a957600080fd5b6102c65a03f115156120ba57600080fd5b5050506040518051905090506120ea816120dc670de0b6b3a764000089611290565b670de0b6b3a7640000612838565b91505b509695505050505050565b6000806000806000806000808b600460068110151561211357fe5b6020020151421015156121295760009750612441565b7312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff1663cfc4d0ec8e8e6000604051602001526040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600560200280838360005b838110156121ba57808201518184015260208101905061219f565b5050505090500182600660200280838360005b838110156121e85780820151818401526020810190506121cd565b5050505090500192505050602060405180830381600087803b151561220c57600080fd5b6102c65a03f1151561221d57600080fd5b5050506040518051905096507312459c951127e0c374ff9105dda097662a02709373ffffffffffffffffffffffffffffffffffffffff16637e9abb50886000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15156122bc57600080fd5b6102c65a03f115156122cd57600080fd5b5050506040518051905095506122f68c60016006811015156122eb57fe5b602002015187611290565b945061235861232b8e600260058110151561230d57fe5b60200201518f600060058110151561232157fe5b6020020151612c71565b8d600060068110151561233a57fe5b60200201518e600160068110151561234e57fe5b60200201516129ce565b93506123ba61238d8e600260058110151561236f57fe5b60200201518f600060058110151561238357fe5b6020020151612d34565b8d600060068110151561239c57fe5b60200201518e60016006811015156123b057fe5b60200201516129ce565b92506123ed73e41d2489571d322189246dafa5ebde1f4699f4988e60006005811015156123e357fe5b6020020151612d34565b9150612420828d600260068110151561240257fe5b60200201518e600160068110151561241657fe5b60200201516129ce565b905061243e612438612432878761173d565b8561173d565b8261173d565b97505b5050505050505095945050505050565b8173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3738d12a197cb00d4747a1fe03395095ce2a5cc6819836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561251057600080fd5b6102c65a03f1151561252157600080fd5b5050506040518051905050738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff1663338b5dea83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b15156125e257600080fd5b6102c65a03f115156125f357600080fd5b5050505050565b600080600061261284670de0b6b3a764000087612838565b905061261e8482611290565b8192509250509250929050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff16630a19b14a87600260058110151561266a57fe5b602002015187600160068110151561267e57fe5b602002015189600160058110151561269257fe5b60200201518960006006811015156126a657fe5b60200201518a60026006811015156126ba57fe5b60200201518b60036006811015156126ce57fe5b60200201518d60006005811015156126e257fe5b60200201518b8b8b8f6040518c63ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018560ff1660ff168152602001846000191660001916815260200183600019166000191681526020018281526020019b505050505050505050505050600060405180830381600087803b151561281c57600080fd5b6102c65a03f1151561282d57600080fd5b505050505050505050565b600061284d612847858461170a565b846113ee565b90509392505050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15156128d857600080fd5b6102c65a03f115156128e957600080fd5b50505050565b8173ffffffffffffffffffffffffffffffffffffffff1663095ea7b3738da0d80f5007ef1e431dd2127178d224e32c2ef4836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156129ae57600080fd5b6102c65a03f115156129bf57600080fd5b50505060405180519050505050565b60006129e36129dd858461170a565b846113ee565b90509392505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b1515612a6e57600080fd5b6102c65a03f11515612a7f57600080fd5b50505050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b1515612afc57600080fd5b6125ee5a03f11515612b0d57600080fd5b5050505050565b738d12a197cb00d4747a1fe03395095ce2a5cc681973ffffffffffffffffffffffffffffffffffffffff16639e281a9883836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1515612bca57600080fd5b6102c65a03f11515612bdb57600080fd5b5050505050565b73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b1515612c5957600080fd5b6125ee5a03f11515612c6a57600080fd5b5050505050565b60008273ffffffffffffffffffffffffffffffffffffffff166370a0823161138761ffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600088803b1515612d1457600080fd5b87f11515612d2157600080fd5b5050505060405180519050905092915050565b60008273ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e61138761ffff1684738da0d80f5007ef1e431dd2127178d224e32c2ef46040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600088803b1515612e1f57600080fd5b87f11515612e2c57600080fd5b50505050604051805190509050929150505600a165627a7a72305820edb53d0cfbd0987e671d7ba31e05adee038dd37c23e2ab5882742386d4f4855d0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a065c23f48ae275c376eabc09b9b9b4557e57c14000000000000000000000000a065c23f48ae275c376eabc09b9b9b4557e57c140000000000000000000000000000000000000000000000000011c37937e08000
-----Decoded View---------------
Arg [0] : admin_ (address): 0xa065C23F48ae275c376EaBC09b9B9b4557e57C14
Arg [1] : feeAccount_ (address): 0xa065C23F48ae275c376EaBC09b9B9b4557e57C14
Arg [2] : serviceFee_ (uint256): 5000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a065c23f48ae275c376eabc09b9b9b4557e57c14
Arg [1] : 000000000000000000000000a065c23f48ae275c376eabc09b9b9b4557e57c14
Arg [2] : 0000000000000000000000000000000000000000000000000011c37937e08000
Swarm Source
bzzr://edb53d0cfbd0987e671d7ba31e05adee038dd37c23e2ab5882742386d4f4855d
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $2,219.25 | 0.000000000000009105 | <$0.000001 |
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.