More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 5,705 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy | 7842536 | 1878 days ago | IN | 0.00100801 ETH | 0.0026315 | ||||
Buy | 7841118 | 1878 days ago | IN | 0.01512022 ETH | 0.00254294 | ||||
Buy | 7833628 | 1879 days ago | IN | 0.00151202 ETH | 0.00284294 | ||||
Buy | 7812703 | 1883 days ago | IN | 0.00100519 ETH | 0.00255651 | ||||
Buy | 7812637 | 1883 days ago | IN | 0.00100519 ETH | 0.00270651 | ||||
Sell | 7777647 | 1888 days ago | IN | 0 ETH | 0.00357339 | ||||
Sell | 7772900 | 1889 days ago | IN | 0 ETH | 0.00399265 | ||||
Sell | 7770970 | 1889 days ago | IN | 0 ETH | 0.00099483 | ||||
Buy | 7760714 | 1891 days ago | IN | 0.0604809 ETH | 0.00248534 | ||||
Sell | 7759732 | 1891 days ago | IN | 0 ETH | 0.00346658 | ||||
Buy | 7759200 | 1891 days ago | IN | 0.001007 ETH | 0.0027681 | ||||
Sell | 7752471 | 1892 days ago | IN | 0 ETH | 0.00305028 | ||||
Buy | 7734788 | 1895 days ago | IN | 0.1008015 ETH | 0.00230208 | ||||
Sell | 7734770 | 1895 days ago | IN | 0 ETH | 0.00327837 | ||||
Buy | 7731240 | 1895 days ago | IN | 1.28521912 ETH | 0.00247646 | ||||
Sell | 7730137 | 1896 days ago | IN | 0 ETH | 0.00308505 | ||||
Sell | 7725107 | 1896 days ago | IN | 0 ETH | 0.00296599 | ||||
Sell | 7725088 | 1896 days ago | IN | 0 ETH | 0.0028446 | ||||
Sell | 7725078 | 1896 days ago | IN | 0 ETH | 0.0028446 | ||||
Sell | 7716092 | 1898 days ago | IN | 0 ETH | 0.00322602 | ||||
Buy | 7713607 | 1898 days ago | IN | 0.00100801 ETH | 0.00279319 | ||||
Buy | 7713533 | 1898 days ago | IN | 0.01201553 ETH | 0.0039816 | ||||
Buy | 7713492 | 1898 days ago | IN | 0.00201603 ETH | 0.00286024 | ||||
Buy | 7713378 | 1898 days ago | IN | 0.00252568 ETH | 0.00263375 | ||||
Sell | 7711459 | 1898 days ago | IN | 0 ETH | 0.00296236 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
7842536 | 1878 days ago | 2 wei | ||||
7842536 | 1878 days ago | 0.001003 ETH | ||||
7842536 | 1878 days ago | 0.00000501 ETH | ||||
7841118 | 1878 days ago | 2 wei | ||||
7841118 | 1878 days ago | 0.015045 ETH | ||||
7841118 | 1878 days ago | 0.00007522 ETH | ||||
7833628 | 1879 days ago | 2 wei | ||||
7833628 | 1879 days ago | 0.0015045 ETH | ||||
7833628 | 1879 days ago | 0.00000752 ETH | ||||
7812703 | 1883 days ago | 2 wei | ||||
7812703 | 1883 days ago | 0.00100019 ETH | ||||
7812703 | 1883 days ago | 0.000005 ETH | ||||
7812637 | 1883 days ago | 2 wei | ||||
7812637 | 1883 days ago | 0.00100019 ETH | ||||
7812637 | 1883 days ago | 0.000005 ETH | ||||
7772900 | 1889 days ago | 0.00000451 ETH | ||||
7772900 | 1889 days ago | 0.00000002 ETH | ||||
7772900 | 1889 days ago | 0.00000453 ETH | ||||
7760714 | 1891 days ago | 2 wei | ||||
7760714 | 1891 days ago | 0.06018 ETH | ||||
7760714 | 1891 days ago | 0.0003009 ETH | ||||
7759732 | 1891 days ago | 0.01431484 ETH | ||||
7759732 | 1891 days ago | 0.00007193 ETH | ||||
7759732 | 1891 days ago | 0.01438677 ETH | ||||
7759200 | 1891 days ago | 2 wei |
Loading...
Loading
Contract Name:
DexdexERC20
Compiler Version
v0.4.21+commit.dfe3193c
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-07-02 */ /* Copyright 2018 Dexdex. 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. */ pragma solidity ^0.4.21; /* * Ownable * * Base contract with an owner. * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. */ contract Ownable { address public owner; function Ownable() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } function transferOwnership(address newOwner) public onlyOwner { if (newOwner != address(0)) { owner = newOwner; } } } library SafeMath { function safeMul(uint a, uint b) internal pure returns (uint256) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint a, uint b) internal pure returns (uint256) { uint c = a / b; return c; } function safeSub(uint a, uint b) internal pure returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) internal pure returns (uint256) { uint c = a + b; assert(c >= a); return c; } function max64(uint64 a, uint64 b) internal pure returns (uint256) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal pure returns (uint256) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } } /** * @title BytesToTypes * @dev The BytesToTypes contract converts the memory byte arrays to the standard solidity types * @author [email protected] */ contract BytesToTypes { function bytesToAddress(uint _offst, bytes memory _input) internal pure returns (address _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToBool(uint _offst, bytes memory _input) internal pure returns (bool _output) { uint8 x; assembly { x := mload(add(_input, _offst)) } x==0 ? _output = false : _output = true; } function getStringSize(uint _offst, bytes memory _input) internal pure returns(uint size){ assembly{ size := mload(add(_input,_offst)) let chunk_count := add(div(size,32),1) // chunk_count = size/32 + 1 if gt(mod(size,32),0) {// if size%32 > 0 chunk_count := add(chunk_count,1) } size := mul(chunk_count,32)// first 32 bytes reseves for size in strings } } function bytesToString(uint _offst, bytes memory _input, bytes memory _output) internal { uint size = 32; assembly { let loop_index:= 0 let chunk_count size := mload(add(_input,_offst)) chunk_count := add(div(size,32),1) // chunk_count = size/32 + 1 if gt(mod(size,32),0) { chunk_count := add(chunk_count,1) // chunk_count++ } loop: mstore(add(_output,mul(loop_index,32)),mload(add(_input,_offst))) _offst := sub(_offst,32) // _offst -= 32 loop_index := add(loop_index,1) jumpi(loop , lt(loop_index , chunk_count)) } } function slice(bytes _bytes, uint _start, uint _length) internal pure returns (bytes) { require(_bytes.length >= (_start + _length)); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function bytesToBytes32(uint _offst, bytes memory _input) internal pure returns (bytes32 _output) { assembly { _output := mload(add(_input, _offst)) } } /*function bytesToBytes32(uint _offst, bytes memory _input, bytes32 _output) internal pure { assembly { mstore(_output , add(_input, _offst)) mstore(add(_output,32) , add(add(_input, _offst),32)) } }*/ function bytesToInt8(uint _offst, bytes memory _input) internal pure returns (int8 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt16(uint _offst, bytes memory _input) internal pure returns (int16 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt24(uint _offst, bytes memory _input) internal pure returns (int24 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt32(uint _offst, bytes memory _input) internal pure returns (int32 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt40(uint _offst, bytes memory _input) internal pure returns (int40 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt48(uint _offst, bytes memory _input) internal pure returns (int48 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt56(uint _offst, bytes memory _input) internal pure returns (int56 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt64(uint _offst, bytes memory _input) internal pure returns (int64 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt72(uint _offst, bytes memory _input) internal pure returns (int72 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt80(uint _offst, bytes memory _input) internal pure returns (int80 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt88(uint _offst, bytes memory _input) internal pure returns (int88 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt96(uint _offst, bytes memory _input) internal pure returns (int96 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt104(uint _offst, bytes memory _input) internal pure returns (int104 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt112(uint _offst, bytes memory _input) internal pure returns (int112 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt120(uint _offst, bytes memory _input) internal pure returns (int120 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt128(uint _offst, bytes memory _input) internal pure returns (int128 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt136(uint _offst, bytes memory _input) internal pure returns (int136 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt144(uint _offst, bytes memory _input) internal pure returns (int144 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt152(uint _offst, bytes memory _input) internal pure returns (int152 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt160(uint _offst, bytes memory _input) internal pure returns (int160 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt168(uint _offst, bytes memory _input) internal pure returns (int168 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt176(uint _offst, bytes memory _input) internal pure returns (int176 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt184(uint _offst, bytes memory _input) internal pure returns (int184 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt192(uint _offst, bytes memory _input) internal pure returns (int192 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt200(uint _offst, bytes memory _input) internal pure returns (int200 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt208(uint _offst, bytes memory _input) internal pure returns (int208 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt216(uint _offst, bytes memory _input) internal pure returns (int216 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt224(uint _offst, bytes memory _input) internal pure returns (int224 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt232(uint _offst, bytes memory _input) internal pure returns (int232 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt240(uint _offst, bytes memory _input) internal pure returns (int240 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt248(uint _offst, bytes memory _input) internal pure returns (int248 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToInt256(uint _offst, bytes memory _input) internal pure returns (int256 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint8(uint _offst, bytes memory _input) internal pure returns (uint8 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint16(uint _offst, bytes memory _input) internal pure returns (uint16 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint24(uint _offst, bytes memory _input) internal pure returns (uint24 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint32(uint _offst, bytes memory _input) internal pure returns (uint32 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint40(uint _offst, bytes memory _input) internal pure returns (uint40 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint48(uint _offst, bytes memory _input) internal pure returns (uint48 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint56(uint _offst, bytes memory _input) internal pure returns (uint56 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint64(uint _offst, bytes memory _input) internal pure returns (uint64 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint72(uint _offst, bytes memory _input) internal pure returns (uint72 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint80(uint _offst, bytes memory _input) internal pure returns (uint80 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint88(uint _offst, bytes memory _input) internal pure returns (uint88 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint96(uint _offst, bytes memory _input) internal pure returns (uint96 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint104(uint _offst, bytes memory _input) internal pure returns (uint104 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint112(uint _offst, bytes memory _input) internal pure returns (uint112 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint120(uint _offst, bytes memory _input) internal pure returns (uint120 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint128(uint _offst, bytes memory _input) internal pure returns (uint128 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint136(uint _offst, bytes memory _input) internal pure returns (uint136 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint144(uint _offst, bytes memory _input) internal pure returns (uint144 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint152(uint _offst, bytes memory _input) internal pure returns (uint152 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint160(uint _offst, bytes memory _input) internal pure returns (uint160 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint168(uint _offst, bytes memory _input) internal pure returns (uint168 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint176(uint _offst, bytes memory _input) internal pure returns (uint176 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint184(uint _offst, bytes memory _input) internal pure returns (uint184 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint192(uint _offst, bytes memory _input) internal pure returns (uint192 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint200(uint _offst, bytes memory _input) internal pure returns (uint200 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint208(uint _offst, bytes memory _input) internal pure returns (uint208 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint216(uint _offst, bytes memory _input) internal pure returns (uint216 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint224(uint _offst, bytes memory _input) internal pure returns (uint224 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint232(uint _offst, bytes memory _input) internal pure returns (uint232 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint240(uint _offst, bytes memory _input) internal pure returns (uint240 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint248(uint _offst, bytes memory _input) internal pure returns (uint248 _output) { assembly { _output := mload(add(_input, _offst)) } } function bytesToUint256(uint _offst, bytes memory _input) internal pure returns (uint256 _output) { assembly { _output := mload(add(_input, _offst)) } } } interface ITradeable { /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) external view 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) external 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) external 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) external 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) external view returns (uint remaining); } contract ITrader { function getDataLength( ) public pure returns (uint256); function getProtocol( ) public pure returns (uint8); function getAvailableVolume( bytes orderData ) public view returns(uint); function isExpired( bytes orderData ) public view returns (bool); function trade( bool isSell, bytes orderData, uint volume, uint volumeEth ) public; function getFillVolumes( bool isSell, bytes orderData, uint volume, uint volumeEth ) public view returns(uint, uint); } contract ITraders { /// @dev Add a valid trader address. Only owner. function addTrader(uint8 id, ITrader trader) public; /// @dev Remove a trader address. Only owner. function removeTrader(uint8 id) public; /// @dev Get trader by id. function getTrader(uint8 id) public view returns(ITrader); /// @dev Check if an address is a valid trader. function isValidTraderAddress(address addr) public view returns(bool); } contract Members is Ownable { mapping(address => bool) public members; // Mappings of addresses of allowed addresses modifier onlyMembers() { require(isValidMember(msg.sender)); _; } /// @dev Check if an address is a valid member. function isValidMember(address _member) public view returns(bool) { return members[_member]; } /// @dev Add a valid member address. Only owner. function addMember(address _member) public onlyOwner { members[_member] = true; } /// @dev Remove a member address. Only owner. function removeMember(address _member) public onlyOwner { delete members[_member]; } } contract IFeeWallet { function getFee( uint amount) public view returns(uint); function collect( address _affiliate) public payable; } contract FeeWallet is IFeeWallet, Ownable, Members { address public serviceAccount; // Address of service account uint public servicePercentage; // Percentage times (1 ether) uint public affiliatePercentage; // Percentage times (1 ether) mapping (address => uint) public pendingWithdrawals; // Balances function FeeWallet( address _serviceAccount, uint _servicePercentage, uint _affiliatePercentage) public { serviceAccount = _serviceAccount; servicePercentage = _servicePercentage; affiliatePercentage = _affiliatePercentage; } /// @dev Set the new service account. Only owner. function changeServiceAccount(address _serviceAccount) public onlyOwner { serviceAccount = _serviceAccount; } /// @dev Set the service percentage. Only owner. function changeServicePercentage(uint _servicePercentage) public onlyOwner { servicePercentage = _servicePercentage; } /// @dev Set the affiliate percentage. Only owner. function changeAffiliatePercentage(uint _affiliatePercentage) public onlyOwner { affiliatePercentage = _affiliatePercentage; } /// @dev Calculates the service fee for a specific amount. Only owner. function getFee(uint amount) public view returns(uint) { return SafeMath.safeMul(amount, servicePercentage) / (1 ether); } /// @dev Calculates the affiliate amount for a specific amount. Only owner. function getAffiliateAmount(uint amount) public view returns(uint) { return SafeMath.safeMul(amount, affiliatePercentage) / (1 ether); } /// @dev Collects fees according to last payment receivedi. Only valid smart contracts. function collect( address _affiliate) public payable onlyMembers { if(_affiliate == address(0)) pendingWithdrawals[serviceAccount] += msg.value; else { uint affiliateAmount = getAffiliateAmount(msg.value); pendingWithdrawals[_affiliate] += affiliateAmount; pendingWithdrawals[serviceAccount] += SafeMath.safeSub(msg.value, affiliateAmount); } } /// @dev Withdraw. function withdraw() public { uint amount = pendingWithdrawals[msg.sender]; pendingWithdrawals[msg.sender] = 0; msg.sender.transfer(amount); } } contract DexdexERC20 is Ownable, BytesToTypes { string constant public VERSION = '2.0.0'; ITraders public traders; // Smart contract that hold the list of valid traders IFeeWallet public feeWallet; // Smart contract that hold the fees collected bool public tradingEnabled; // Switch to enable or disable the contract event Sell( address account, address destinationAddr, address traedeable, uint volume, uint volumeEth, uint volumeEffective, uint volumeEthEffective ); event Buy( address account, address destinationAddr, address traedeable, uint volume, uint volumeEth, uint volumeEffective, uint volumeEthEffective ); function DexdexERC20(ITraders _traders, IFeeWallet _feeWallet) public { traders = _traders; feeWallet = _feeWallet; tradingEnabled = true; } /// @dev Only accepts payment from smart contract traders. function() public payable { // require(traders.isValidTraderAddress(msg.sender)); } /// @dev Setter for feeWallet smart contract (Only owner) function changeFeeWallet(IFeeWallet _feeWallet) public onlyOwner { feeWallet = _feeWallet; } /// @dev Setter for traders smart contract (Only owner) function changeTraders(ITraders _traders) public onlyOwner { traders = _traders; } /// @dev Enable/Disable trading with smart contract (Only owner) function changeTradingEnabled(bool enabled) public onlyOwner { tradingEnabled = enabled; } /// @dev Buy a token. function buy( ITradeable tradeable, uint volume, bytes ordersData, address destinationAddr, address affiliate ) external payable { require(tradingEnabled); // Execute the trade (at most fullfilling volume) trade( false, tradeable, volume, ordersData, affiliate ); // Since our balance before trade was 0. What we bought is our current balance. uint volumeEffective = tradeable.balanceOf(this); // We make sure that something was traded require(volumeEffective > 0); // Used ethers are: balance_before - balance_after. // And since before call balance=0; then balance_before = msg.value uint volumeEthEffective = SafeMath.safeSub(msg.value, address(this).balance); // IMPORTANT: Check that: effective_price <= agreed_price (guarantee a good deal for the buyer) require( SafeMath.safeDiv(volumeEthEffective, volumeEffective) <= SafeMath.safeDiv(msg.value, volume) ); // Return remaining ethers if(address(this).balance > 0) { destinationAddr.transfer(address(this).balance); } // Send the tokens transferTradeable(tradeable, destinationAddr, volumeEffective); emit Buy(msg.sender, destinationAddr, tradeable, volume, msg.value, volumeEffective, volumeEthEffective); } /// @dev sell a token. function sell( ITradeable tradeable, uint volume, uint volumeEth, bytes ordersData, address destinationAddr, address affiliate ) external { require(tradingEnabled); // We transfer to ouselves the user's trading volume, to operate on it // note: Our balance is 0 before this require(tradeable.transferFrom(msg.sender, this, volume)); // Execute the trade (at most fullfilling volume) trade( true, tradeable, volume, ordersData, affiliate ); // Check how much we traded. Our balance = volume - tradedVolume // then: tradedVolume = volume - balance uint volumeEffective = SafeMath.safeSub(volume, tradeable.balanceOf(this)); // We make sure that something was traded require(volumeEffective > 0); // Collects service fee uint volumeEthEffective = collectSellFee(affiliate); // IMPORTANT: Check that: effective_price >= agreed_price (guarantee a good deal for the seller) require( SafeMath.safeDiv(volumeEthEffective, volumeEffective) >= SafeMath.safeDiv(volumeEth, volume) ); // Return remaining volume if (volumeEffective < volume) { transferTradeable(tradeable, destinationAddr, SafeMath.safeSub(volume, volumeEffective)); } // Send ethers obtained destinationAddr.transfer(volumeEthEffective); emit Sell(msg.sender, destinationAddr, tradeable, volume, volumeEth, volumeEffective, volumeEthEffective); } /// @dev Trade buy or sell orders. function trade( bool isSell, ITradeable tradeable, uint volume, bytes ordersData, address affiliate ) internal { uint remainingVolume = volume; uint offset = ordersData.length; while(offset > 0 && remainingVolume > 0) { //Get the trader uint8 protocolId = bytesToUint8(offset, ordersData); ITrader trader = traders.getTrader(protocolId); require(trader != address(0)); //Get the order data uint dataLength = trader.getDataLength(); offset = SafeMath.safeSub(offset, dataLength); bytes memory orderData = slice(ordersData, offset, dataLength); //Fill order remainingVolume = fillOrder( isSell, tradeable, trader, remainingVolume, orderData, affiliate ); } } /// @dev Fills a buy order. function fillOrder( bool isSell, ITradeable tradeable, ITrader trader, uint remaining, bytes memory orderData, address affiliate ) internal returns(uint) { //Checks that there is enoughh amount to execute the trade uint volume; uint volumeEth; (volume, volumeEth) = trader.getFillVolumes( isSell, orderData, remaining, address(this).balance ); if(volume > 0) { if(isSell) { //Approve available amount of token to trader require(tradeable.approve(trader, volume)); } else { //Collects service fee //TODO: transfer fees after all iteration volumeEth = collectBuyFee(volumeEth, affiliate); address(trader).transfer(volumeEth); } //Call trader to trade orders trader.trade( isSell, orderData, volume, volumeEth ); } return SafeMath.safeSub(remaining, volume); } /// @dev Transfer tradeables to user account. function transferTradeable(ITradeable tradeable, address account, uint amount) internal { require(tradeable.transfer(account, amount)); } // @dev Collect service/affiliate fee for a buy function collectBuyFee(uint ethers, address affiliate) internal returns(uint) { uint remaining; uint fee = feeWallet.getFee(ethers); //If there is enough remaining to pay fee, it substract from the balance if(SafeMath.safeSub(address(this).balance, ethers) >= fee) remaining = ethers; else remaining = SafeMath.safeSub(SafeMath.safeSub(ethers, address(this).balance), fee); feeWallet.collect.value(fee)(affiliate); return remaining; } // @dev Collect service/affiliate fee for a sell function collectSellFee(address affiliate) internal returns(uint) { uint fee = feeWallet.getFee(address(this).balance); feeWallet.collect.value(fee)(affiliate); return address(this).balance; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[{"name":"enabled","type":"bool"}],"name":"changeTradingEnabled","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"tradeable","type":"address"},{"name":"volume","type":"uint256"},{"name":"ordersData","type":"bytes"},{"name":"destinationAddr","type":"address"},{"name":"affiliate","type":"address"}],"name":"buy","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_feeWallet","type":"address"}],"name":"changeFeeWallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tradingEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tradeable","type":"address"},{"name":"volume","type":"uint256"},{"name":"volumeEth","type":"uint256"},{"name":"ordersData","type":"bytes"},{"name":"destinationAddr","type":"address"},{"name":"affiliate","type":"address"}],"name":"sell","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"traders","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_traders","type":"address"}],"name":"changeTraders","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeWallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"VERSION","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_traders","type":"address"},{"name":"_feeWallet","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"destinationAddr","type":"address"},{"indexed":false,"name":"traedeable","type":"address"},{"indexed":false,"name":"volume","type":"uint256"},{"indexed":false,"name":"volumeEth","type":"uint256"},{"indexed":false,"name":"volumeEffective","type":"uint256"},{"indexed":false,"name":"volumeEthEffective","type":"uint256"}],"name":"Sell","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"},{"indexed":false,"name":"destinationAddr","type":"address"},{"indexed":false,"name":"traedeable","type":"address"},{"indexed":false,"name":"volume","type":"uint256"},{"indexed":false,"name":"volumeEth","type":"uint256"},{"indexed":false,"name":"volumeEffective","type":"uint256"},{"indexed":false,"name":"volumeEthEffective","type":"uint256"}],"name":"Buy","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b604051604080611a0783398101604052808051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600260146101000a81548160ff02191690831515021790555050506118e5806101226000396000f3006060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806316925ee2146100b1578063321a9ab9146100d65780633e4d03101461015f5780634ada218b146101985780638da5cb5b146101c5578063ce6873611461021a578063ddbdf242146102b7578063eeca2d171461030c578063f25f4b5614610345578063f2fde38b1461039a578063ffa1ad74146103d3575b005b34156100bc57600080fd5b6100d460048080351515906020019091905050610461565b005b61015d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019082018035906020019190919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506104d9565b005b341561016a57600080fd5b610196600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506107b5565b005b34156101a357600080fd5b6101ab610854565b604051808215151515815260200191505060405180910390f35b34156101d057600080fd5b6101d8610867565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561022557600080fd5b6102b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091908035906020019082018035906020019190919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061088c565b005b34156102c257600080fd5b6102ca610c2c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561031757600080fd5b610343600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c52565b005b341561035057600080fd5b610358610cf1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103a557600080fd5b6103d1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d17565b005b34156103de57600080fd5b6103e6610dec565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104bc57600080fd5b80600260146101000a81548160ff02191690831515021790555050565b600080600260149054906101000a900460ff1615156104f757600080fd5b6105376000898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505087610e25565b8773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156105d157600080fd5b5af115156105de57600080fd5b5050506040518051905091506000821115156105f957600080fd5b61061a343073ffffffffffffffffffffffffffffffffffffffff1631611000565b90506106263488611019565b6106308284611019565b1115151561063d57600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff163111156106b5578373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156106b457600080fd5b5b6106c0888584611034565b7f4c5de51a00fa52b3d883d5627b5d614583a2f5eec10c63c6efe8a6f1f68b11e333858a8a348787604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a15050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081057600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260149054906101000a900460ff1615156108aa57600080fd5b8873ffffffffffffffffffffffffffffffffffffffff166323b872dd33308b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561098057600080fd5b5af1151561098d57600080fd5b5050506040518051905015156109a257600080fd5b6109e260018a8a89898080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505087610e25565b610a9c888a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610a8057600080fd5b5af11515610a8d57600080fd5b50505060405180519050611000565b9150600082111515610aad57600080fd5b610ab6836110fd565b9050610ac28789611019565b610acc8284611019565b10151515610ad957600080fd5b87821015610af657610af58985610af08b86611000565b611034565b5b8373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610b3657600080fd5b7f2182e4add8250752f872eda9b48eab6b84aa81f99ee69c557acfbf103828083c33858b8b8b8787604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a1505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cad57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d7257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610de957806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6040805190810160405280600581526020017f322e302e3000000000000000000000000000000000000000000000000000000081525081565b6000806000806000610e356118a5565b889550875194505b600085118015610e4d5750600086115b15610ff357610e5c85896112ad565b9350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cb56e40b856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff1660ff168152602001915050602060405180830381600087803b1515610ef457600080fd5b5af11515610f0157600080fd5b505050604051805190509250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610f4957600080fd5b8273ffffffffffffffffffffffffffffffffffffffff16633da767886040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610fac57600080fd5b5af11515610fb957600080fd5b505050604051805190509150610fcf8583611000565b9450610fdc8886846112bb565b9050610fec8b8b8589858c611355565b9550610e3d565b5050505050505050505050565b600082821115151561100e57fe5b818303905092915050565b600080828481151561102757fe5b0490508091505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156110d657600080fd5b5af115156110e357600080fd5b5050506040518051905015156110f857600080fd5b505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcee45f43073ffffffffffffffffffffffffffffffffffffffff16316040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156111a757600080fd5b5af115156111b457600080fd5b505050604051805190509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ec16f882856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b151561127c57600080fd5b5af1151561128957600080fd5b505050503073ffffffffffffffffffffffffffffffffffffffff1631915050919050565b600082820151905092915050565b6112c36118a5565b6112cb6118a5565b8284018551101515156112dd57600080fd5b8215600081146112f857604051915060208201604052611349565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156113365780518352602083019250602081019050611319565b50868552601f19601f8301166040525050505b50809150509392505050565b60008060008673ffffffffffffffffffffffffffffffffffffffff1663c228bcc68a87893073ffffffffffffffffffffffffffffffffffffffff16316040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808515151515815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156114125780820151818401526020810190506113f7565b50505050905090810190601f16801561143f5780820380516001836020036101000a031916815260200191505b50955050505050506040805180830381600087803b151561145f57600080fd5b5af1151561146c57600080fd5b50505060405180519060200180519050809250819350505060008211156116a957881561155c578773ffffffffffffffffffffffffffffffffffffffff1663095ea7b388846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561153557600080fd5b5af1151561154257600080fd5b50505060405180519050151561155757600080fd5b6115a9565b61156681856116c1565b90508673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156115a857600080fd5b5b8673ffffffffffffffffffffffffffffffffffffffff1663e244054a8a8785856040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808515151515815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561164a57808201518184015260208101905061162f565b50505050905090810190601f1680156116775780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561169857600080fd5b5af115156116a557600080fd5b5050505b6116b38683611000565b925050509695505050505050565b6000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcee45f4866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561175657600080fd5b5af1151561176357600080fd5b505050604051805190509050806117913073ffffffffffffffffffffffffffffffffffffffff163187611000565b1015156117a0578491506117cd565b6117ca6117c4863073ffffffffffffffffffffffffffffffffffffffff1631611000565b82611000565b91505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ec16f882866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b151561188957600080fd5b5af1151561189657600080fd5b50505050819250505092915050565b6020604051908101604052806000815250905600a165627a7a7230582006fdb64a7ef9bff45d1a4ad03b5da8249d3c0c2c9c59a7414cc4c45366e4b87c00290000000000000000000000004cf723f59f86e0837d33de40dca910dc38996d9e00000000000000000000000083ba853b8196bb51c148dd762a827c703b156450
Deployed Bytecode
0x6060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806316925ee2146100b1578063321a9ab9146100d65780633e4d03101461015f5780634ada218b146101985780638da5cb5b146101c5578063ce6873611461021a578063ddbdf242146102b7578063eeca2d171461030c578063f25f4b5614610345578063f2fde38b1461039a578063ffa1ad74146103d3575b005b34156100bc57600080fd5b6100d460048080351515906020019091905050610461565b005b61015d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019082018035906020019190919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506104d9565b005b341561016a57600080fd5b610196600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506107b5565b005b34156101a357600080fd5b6101ab610854565b604051808215151515815260200191505060405180910390f35b34156101d057600080fd5b6101d8610867565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561022557600080fd5b6102b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091908035906020019082018035906020019190919290803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061088c565b005b34156102c257600080fd5b6102ca610c2c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561031757600080fd5b610343600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c52565b005b341561035057600080fd5b610358610cf1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103a557600080fd5b6103d1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d17565b005b34156103de57600080fd5b6103e6610dec565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042657808201518184015260208101905061040b565b50505050905090810190601f1680156104535780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104bc57600080fd5b80600260146101000a81548160ff02191690831515021790555050565b600080600260149054906101000a900460ff1615156104f757600080fd5b6105376000898989898080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505087610e25565b8773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156105d157600080fd5b5af115156105de57600080fd5b5050506040518051905091506000821115156105f957600080fd5b61061a343073ffffffffffffffffffffffffffffffffffffffff1631611000565b90506106263488611019565b6106308284611019565b1115151561063d57600080fd5b60003073ffffffffffffffffffffffffffffffffffffffff163111156106b5578373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f1935050505015156106b457600080fd5b5b6106c0888584611034565b7f4c5de51a00fa52b3d883d5627b5d614583a2f5eec10c63c6efe8a6f1f68b11e333858a8a348787604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a15050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561081057600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260149054906101000a900460ff1615156108aa57600080fd5b8873ffffffffffffffffffffffffffffffffffffffff166323b872dd33308b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561098057600080fd5b5af1151561098d57600080fd5b5050506040518051905015156109a257600080fd5b6109e260018a8a89898080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505087610e25565b610a9c888a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610a8057600080fd5b5af11515610a8d57600080fd5b50505060405180519050611000565b9150600082111515610aad57600080fd5b610ab6836110fd565b9050610ac28789611019565b610acc8284611019565b10151515610ad957600080fd5b87821015610af657610af58985610af08b86611000565b611034565b5b8373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610b3657600080fd5b7f2182e4add8250752f872eda9b48eab6b84aa81f99ee69c557acfbf103828083c33858b8b8b8787604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200183815260200182815260200197505050505050505060405180910390a1505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cad57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d7257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610de957806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b6040805190810160405280600581526020017f322e302e3000000000000000000000000000000000000000000000000000000081525081565b6000806000806000610e356118a5565b889550875194505b600085118015610e4d5750600086115b15610ff357610e5c85896112ad565b9350600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cb56e40b856040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260ff1660ff168152602001915050602060405180830381600087803b1515610ef457600080fd5b5af11515610f0157600080fd5b505050604051805190509250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610f4957600080fd5b8273ffffffffffffffffffffffffffffffffffffffff16633da767886040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610fac57600080fd5b5af11515610fb957600080fd5b505050604051805190509150610fcf8583611000565b9450610fdc8886846112bb565b9050610fec8b8b8589858c611355565b9550610e3d565b5050505050505050505050565b600082821115151561100e57fe5b818303905092915050565b600080828481151561102757fe5b0490508091505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15156110d657600080fd5b5af115156110e357600080fd5b5050506040518051905015156110f857600080fd5b505050565b600080600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcee45f43073ffffffffffffffffffffffffffffffffffffffff16316040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b15156111a757600080fd5b5af115156111b457600080fd5b505050604051805190509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ec16f882856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b151561127c57600080fd5b5af1151561128957600080fd5b505050503073ffffffffffffffffffffffffffffffffffffffff1631915050919050565b600082820151905092915050565b6112c36118a5565b6112cb6118a5565b8284018551101515156112dd57600080fd5b8215600081146112f857604051915060208201604052611349565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156113365780518352602083019250602081019050611319565b50868552601f19601f8301166040525050505b50809150509392505050565b60008060008673ffffffffffffffffffffffffffffffffffffffff1663c228bcc68a87893073ffffffffffffffffffffffffffffffffffffffff16316040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808515151515815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b838110156114125780820151818401526020810190506113f7565b50505050905090810190601f16801561143f5780820380516001836020036101000a031916815260200191505b50955050505050506040805180830381600087803b151561145f57600080fd5b5af1151561146c57600080fd5b50505060405180519060200180519050809250819350505060008211156116a957881561155c578773ffffffffffffffffffffffffffffffffffffffff1663095ea7b388846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b151561153557600080fd5b5af1151561154257600080fd5b50505060405180519050151561155757600080fd5b6115a9565b61156681856116c1565b90508673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156115a857600080fd5b5b8673ffffffffffffffffffffffffffffffffffffffff1663e244054a8a8785856040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808515151515815260200180602001848152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561164a57808201518184015260208101905061162f565b50505050905090810190601f1680156116775780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561169857600080fd5b5af115156116a557600080fd5b5050505b6116b38683611000565b925050509695505050505050565b6000806000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fcee45f4866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561175657600080fd5b5af1151561176357600080fd5b505050604051805190509050806117913073ffffffffffffffffffffffffffffffffffffffff163187611000565b1015156117a0578491506117cd565b6117ca6117c4863073ffffffffffffffffffffffffffffffffffffffff1631611000565b82611000565b91505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ec16f882866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019150506000604051808303818588803b151561188957600080fd5b5af1151561189657600080fd5b50505050819250505092915050565b6020604051908101604052806000815250905600a165627a7a7230582006fdb64a7ef9bff45d1a4ad03b5da8249d3c0c2c9c59a7414cc4c45366e4b87c0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004cf723f59f86e0837d33de40dca910dc38996d9e00000000000000000000000083ba853b8196bb51c148dd762a827c703b156450
-----Decoded View---------------
Arg [0] : _traders (address): 0x4cF723F59F86e0837D33DE40DCA910DC38996D9e
Arg [1] : _feeWallet (address): 0x83BA853B8196BB51c148Dd762A827c703B156450
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004cf723f59f86e0837d33de40dca910dc38996d9e
Arg [1] : 00000000000000000000000083ba853b8196bb51c148dd762a827c703b156450
Swarm Source
bzzr://06fdb64a7ef9bff45d1a4ad03b5da8249d3c0c2c9c59a7414cc4c45366e4b87c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.