More Info
Private Name Tags
ContractCreator
Latest 10 from a total of 10 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw Ether | 6980627 | 2146 days ago | IN | 0 ETH | 0.00080335 | ||||
Withdraw Token | 6980613 | 2146 days ago | IN | 0 ETH | 0.00139692 | ||||
Withdraw Token | 6980602 | 2146 days ago | IN | 0 ETH | 0.00139538 | ||||
Withdraw Token | 6980582 | 2146 days ago | IN | 0 ETH | 0.00103538 | ||||
Set Fee Bps | 6921712 | 2156 days ago | IN | 0 ETH | 0.000608 | ||||
Set Fee Bps | 6908455 | 2158 days ago | IN | 0 ETH | 0.00019856 | ||||
Set Kyber Networ... | 6897113 | 2160 days ago | IN | 0 ETH | 0.00042169 | ||||
List Token | 6896976 | 2160 days ago | IN | 0 ETH | 0.00128804 | ||||
List Token | 6896961 | 2160 days ago | IN | 0 ETH | 0.00128804 | ||||
0x60606040 | 6896904 | 2160 days ago | IN | 0 ETH | 0.0241738 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
6980627 | 2146 days ago | 13.01323644 ETH | ||||
6967188 | 2148 days ago | 2.3 ETH | ||||
6967188 | 2148 days ago | 2.3 ETH | ||||
6967185 | 2148 days ago | 20 ETH | ||||
6967185 | 2148 days ago | 20 ETH | ||||
6967180 | 2148 days ago | 1 ETH | ||||
6967180 | 2148 days ago | 1 ETH | ||||
6967173 | 2148 days ago | 20 ETH | ||||
6967173 | 2148 days ago | 20 ETH | ||||
6967168 | 2148 days ago | 20 ETH | ||||
6967168 | 2148 days ago | 20 ETH | ||||
6967161 | 2148 days ago | 1.65185999 ETH | ||||
6967161 | 2148 days ago | 1.65599999 ETH | ||||
6967152 | 2148 days ago | 20 ETH | ||||
6967152 | 2148 days ago | 20 ETH | ||||
6967082 | 2148 days ago | 40 ETH | ||||
6967082 | 2148 days ago | 40 ETH | ||||
6967078 | 2148 days ago | 40 ETH | ||||
6967078 | 2148 days ago | 40 ETH | ||||
6967040 | 2148 days ago | 10.87334842 ETH | ||||
6967040 | 2148 days ago | 10.87334842 ETH | ||||
6967017 | 2148 days ago | 20 ETH | ||||
6967017 | 2148 days ago | 20 ETH | ||||
6967011 | 2148 days ago | 20 ETH | ||||
6967011 | 2148 days ago | 20 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x9E2b650f...b4E61F408 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
KyberOasisReserve
Compiler Version
v0.4.18+commit.9cf6e910
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-10-25 */ pragma solidity 0.4.18; // File: contracts/ERC20Interface.sol // https://github.com/ethereum/EIPs/issues/20 interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } // File: contracts/KyberReserveInterface.sol /// @title Kyber Reserve contract interface KyberReserveInterface { function trade( ERC20 srcToken, uint srcAmount, ERC20 destToken, address destAddress, uint conversionRate, bool validate ) public payable returns(bool); function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) public view returns(uint); } // File: contracts/Utils.sol /// @title Kyber constants contract contract Utils { ERC20 constant internal ETH_TOKEN_ADDRESS = ERC20(0x00eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee); uint constant internal PRECISION = (10**18); uint constant internal MAX_QTY = (10**28); // 10B tokens uint constant internal MAX_RATE = (PRECISION * 10**6); // up to 1M tokens per ETH uint constant internal MAX_DECIMALS = 18; uint constant internal ETH_DECIMALS = 18; mapping(address=>uint) internal decimals; function setDecimals(ERC20 token) internal { if (token == ETH_TOKEN_ADDRESS) decimals[token] = ETH_DECIMALS; else decimals[token] = token.decimals(); } function getDecimals(ERC20 token) internal view returns(uint) { if (token == ETH_TOKEN_ADDRESS) return ETH_DECIMALS; // save storage access uint tokenDecimals = decimals[token]; // technically, there might be token with decimals 0 // moreover, very possible that old tokens have decimals 0 // these tokens will just have higher gas fees. if(tokenDecimals == 0) return token.decimals(); return tokenDecimals; } function calcDstQty(uint srcQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) { require(srcQty <= MAX_QTY); require(rate <= MAX_RATE); if (dstDecimals >= srcDecimals) { require((dstDecimals - srcDecimals) <= MAX_DECIMALS); return (srcQty * rate * (10**(dstDecimals - srcDecimals))) / PRECISION; } else { require((srcDecimals - dstDecimals) <= MAX_DECIMALS); return (srcQty * rate) / (PRECISION * (10**(srcDecimals - dstDecimals))); } } function calcSrcQty(uint dstQty, uint srcDecimals, uint dstDecimals, uint rate) internal pure returns(uint) { require(dstQty <= MAX_QTY); require(rate <= MAX_RATE); //source quantity is rounded up. to avoid dest quantity being too low. uint numerator; uint denominator; if (srcDecimals >= dstDecimals) { require((srcDecimals - dstDecimals) <= MAX_DECIMALS); numerator = (PRECISION * dstQty * (10**(srcDecimals - dstDecimals))); denominator = rate; } else { require((dstDecimals - srcDecimals) <= MAX_DECIMALS); numerator = (PRECISION * dstQty); denominator = (rate * (10**(dstDecimals - srcDecimals))); } return (numerator + denominator - 1) / denominator; //avoid rounding down errors } } // File: contracts/Utils2.sol contract Utils2 is Utils { /// @dev get the balance of a user. /// @param token The token type /// @return The balance function getBalance(ERC20 token, address user) public view returns(uint) { if (token == ETH_TOKEN_ADDRESS) return user.balance; else return token.balanceOf(user); } function getDecimalsSafe(ERC20 token) internal returns(uint) { if (decimals[token] == 0) { setDecimals(token); } return decimals[token]; } function calcDestAmount(ERC20 src, ERC20 dest, uint srcAmount, uint rate) internal view returns(uint) { return calcDstQty(srcAmount, getDecimals(src), getDecimals(dest), rate); } function calcSrcAmount(ERC20 src, ERC20 dest, uint destAmount, uint rate) internal view returns(uint) { return calcSrcQty(destAmount, getDecimals(src), getDecimals(dest), rate); } function calcRateFromQty(uint srcAmount, uint destAmount, uint srcDecimals, uint dstDecimals) internal pure returns(uint) { require(srcAmount <= MAX_QTY); require(destAmount <= MAX_QTY); if (dstDecimals >= srcDecimals) { require((dstDecimals - srcDecimals) <= MAX_DECIMALS); return (destAmount * PRECISION / ((10 ** (dstDecimals - srcDecimals)) * srcAmount)); } else { require((srcDecimals - dstDecimals) <= MAX_DECIMALS); return (destAmount * PRECISION * (10 ** (srcDecimals - dstDecimals)) / srcAmount); } } } // File: contracts/PermissionGroups.sol contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { admin = msg.sender; } modifier onlyAdmin() { require(msg.sender == admin); _; } modifier onlyOperator() { require(operators[msg.sender]); _; } modifier onlyAlerter() { require(alerters[msg.sender]); _; } function getOperators () external view returns(address[]) { return operatorsGroup; } function getAlerters () external view returns(address[]) { return alertersGroup; } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { require(newAdmin != address(0)); TransferAdminPending(pendingAdmin); pendingAdmin = newAdmin; } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { require(newAdmin != address(0)); TransferAdminPending(newAdmin); AdminClaimed(newAdmin, admin); admin = newAdmin; } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { require(pendingAdmin == msg.sender); AdminClaimed(pendingAdmin, admin); admin = pendingAdmin; pendingAdmin = address(0); } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { require(!alerters[newAlerter]); // prevent duplicates. require(alertersGroup.length < MAX_GROUP_SIZE); AlerterAdded(newAlerter, true); alerters[newAlerter] = true; alertersGroup.push(newAlerter); } function removeAlerter (address alerter) public onlyAdmin { require(alerters[alerter]); alerters[alerter] = false; for (uint i = 0; i < alertersGroup.length; ++i) { if (alertersGroup[i] == alerter) { alertersGroup[i] = alertersGroup[alertersGroup.length - 1]; alertersGroup.length--; AlerterAdded(alerter, false); break; } } } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { require(!operators[newOperator]); // prevent duplicates. require(operatorsGroup.length < MAX_GROUP_SIZE); OperatorAdded(newOperator, true); operators[newOperator] = true; operatorsGroup.push(newOperator); } function removeOperator (address operator) public onlyAdmin { require(operators[operator]); operators[operator] = false; for (uint i = 0; i < operatorsGroup.length; ++i) { if (operatorsGroup[i] == operator) { operatorsGroup[i] = operatorsGroup[operatorsGroup.length - 1]; operatorsGroup.length -= 1; OperatorAdded(operator, false); break; } } } } // File: contracts/Withdrawable.sol /** * @title Contracts that should be able to recover tokens or ethers * @author Ilan Doron * @dev This allows to recover any tokens or Ethers received in a contract. * This will prevent any accidental loss of tokens. */ contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { require(token.transfer(sendTo, amount)); TokenWithdraw(token, amount, sendTo); } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { sendTo.transfer(amount); EtherWithdraw(amount, sendTo); } } // File: contracts/oasisContracts/KyberOasisReserve.sol contract OtcInterface { function getOffer(uint id) public constant returns (uint, ERC20, uint, ERC20); function getBestOffer(ERC20 sellGem, ERC20 buyGem) public constant returns(uint); function getWorseOffer(uint id) public constant returns(uint); function take(bytes32 id, uint128 maxTakeAmount) public; } contract WethInterface is ERC20 { function deposit() public payable; function withdraw(uint) public; } contract KyberOasisReserve is KyberReserveInterface, Withdrawable, Utils2 { uint constant internal COMMON_DECIMALS = 18; address public sanityRatesContract = 0; address public kyberNetwork; OtcInterface public otc; WethInterface public wethToken; mapping(address=>bool) public isTokenListed; mapping(address=>uint) public tokenMinSrcAmount; bool public tradeEnabled; uint public feeBps; function KyberOasisReserve( address _kyberNetwork, OtcInterface _otc, WethInterface _wethToken, address _admin, uint _feeBps ) public { require(_admin != address(0)); require(_kyberNetwork != address(0)); require(_otc != address(0)); require(_wethToken != address(0)); require(_feeBps < 10000); require(getDecimals(_wethToken) == COMMON_DECIMALS); kyberNetwork = _kyberNetwork; otc = _otc; wethToken = _wethToken; admin = _admin; feeBps = _feeBps; tradeEnabled = true; require(wethToken.approve(otc, 2**255)); } function() public payable { require(msg.sender == address(wethToken)); } function listToken(ERC20 token, uint minSrcAmount) public onlyAdmin { require(token != address(0)); require(!isTokenListed[token]); require(getDecimals(token) == COMMON_DECIMALS); require(token.approve(otc, 2**255)); isTokenListed[token] = true; tokenMinSrcAmount[token] = minSrcAmount; } function delistToken(ERC20 token) public onlyAdmin { require(isTokenListed[token]); require(token.approve(otc, 0)); delete isTokenListed[token]; delete tokenMinSrcAmount[token]; } event TradeExecute( address indexed sender, address src, uint srcAmount, address destToken, uint destAmount, address destAddress ); function trade( ERC20 srcToken, uint srcAmount, ERC20 destToken, address destAddress, uint conversionRate, bool validate ) public payable returns(bool) { require(tradeEnabled); require(msg.sender == kyberNetwork); require(doTrade(srcToken, srcAmount, destToken, destAddress, conversionRate, validate)); return true; } event TradeEnabled(bool enable); function enableTrade() public onlyAdmin returns(bool) { tradeEnabled = true; TradeEnabled(true); return true; } function disableTrade() public onlyAlerter returns(bool) { tradeEnabled = false; TradeEnabled(false); return true; } event KyberNetworkSet(address kyberNetwork); function setKyberNetwork(address _kyberNetwork) public onlyAdmin { require(_kyberNetwork != address(0)); kyberNetwork = _kyberNetwork; KyberNetworkSet(kyberNetwork); } event FeeBpsSet(uint feeBps); function setFeeBps(uint _feeBps) public onlyAdmin { require(_feeBps < 10000); feeBps = _feeBps; FeeBpsSet(feeBps); } function valueAfterReducingFee(uint val) public view returns(uint) { require(val <= MAX_QTY); return ((10000 - feeBps) * val) / 10000; } function valueBeforeFeesWereReduced(uint val) public view returns(uint) { require(val <= MAX_QTY); return val * 10000 / (10000 - feeBps); } function getConversionRate(ERC20 src, ERC20 dest, uint srcQty, uint blockNumber) public view returns(uint) { uint rate; uint actualSrcQty; ERC20 actualSrc; ERC20 actualDest; uint offerPayAmt; uint offerBuyAmt; blockNumber; if (!tradeEnabled) return 0; if (!validTokens(src, dest)) return 0; if (src == ETH_TOKEN_ADDRESS) { actualSrc = wethToken; actualDest = dest; actualSrcQty = srcQty; } else if (dest == ETH_TOKEN_ADDRESS) { actualSrc = src; actualDest = wethToken; if (srcQty < tokenMinSrcAmount[src]) { /* remove rounding errors and present rate for 0 src amount. */ actualSrcQty = tokenMinSrcAmount[src]; } else { actualSrcQty = srcQty; } } else { return 0; } // otc's terminology is of offer maker, so their sellGem is the taker's dest token. (, offerPayAmt, offerBuyAmt) = getMatchingOffer(actualDest, actualSrc, actualSrcQty); // make sure to take only one level of order book to avoid gas inflation. if (actualSrcQty > offerBuyAmt) return 0; rate = calcRateFromQty(offerBuyAmt, offerPayAmt, COMMON_DECIMALS, COMMON_DECIMALS); return valueAfterReducingFee(rate); } function doTrade( ERC20 srcToken, uint srcAmount, ERC20 destToken, address destAddress, uint conversionRate, bool validate ) internal returns(bool) { uint actualDestAmount; require(validTokens(srcToken, destToken)); // can skip validation if done at kyber network level if (validate) { require(conversionRate > 0); if (srcToken == ETH_TOKEN_ADDRESS) require(msg.value == srcAmount); else require(msg.value == 0); } uint userExpectedDestAmount = calcDstQty(srcAmount, COMMON_DECIMALS, COMMON_DECIMALS, conversionRate); require(userExpectedDestAmount > 0); // sanity check uint destAmountIncludingFees = valueBeforeFeesWereReduced(userExpectedDestAmount); if (srcToken == ETH_TOKEN_ADDRESS) { wethToken.deposit.value(msg.value)(); actualDestAmount = takeMatchingOffer(wethToken, destToken, srcAmount); require(actualDestAmount >= destAmountIncludingFees); // transfer back only requested dest amount. require(destToken.transfer(destAddress, userExpectedDestAmount)); } else { require(srcToken.transferFrom(msg.sender, this, srcAmount)); actualDestAmount = takeMatchingOffer(srcToken, wethToken, srcAmount); require(actualDestAmount >= destAmountIncludingFees); wethToken.withdraw(actualDestAmount); // transfer back only requested dest amount. destAddress.transfer(userExpectedDestAmount); } TradeExecute(msg.sender, srcToken, srcAmount, destToken, userExpectedDestAmount, destAddress); return true; } function takeMatchingOffer( ERC20 srcToken, ERC20 destToken, uint srcAmount ) internal returns(uint actualDestAmount) { uint offerId; uint offerPayAmt; uint offerBuyAmt; // otc's terminology is of offer maker, so their sellGem is our (the taker's) dest token. (offerId, offerPayAmt, offerBuyAmt) = getMatchingOffer(destToken, srcToken, srcAmount); require(srcAmount <= MAX_QTY); require(offerPayAmt <= MAX_QTY); actualDestAmount = srcAmount * offerPayAmt / offerBuyAmt; require(uint128(actualDestAmount) == actualDestAmount); otc.take(bytes32(offerId), uint128(actualDestAmount)); // Take the portion of the offer that we need return; } function getMatchingOffer( ERC20 offerSellGem, ERC20 offerBuyGem, uint payAmount ) internal view returns( uint offerId, uint offerPayAmount, uint offerBuyAmount ) { offerId = otc.getBestOffer(offerSellGem, offerBuyGem); (offerPayAmount, , offerBuyAmount, ) = otc.getOffer(offerId); uint depth = 1; while (payAmount > offerBuyAmount) { offerId = otc.getWorseOffer(offerId); // We look for the next best offer if (offerId == 0 || ++depth > 7) { offerId = 0; offerPayAmount = 0; offerBuyAmount = 0; break; } (offerPayAmount, , offerBuyAmount, ) = otc.getOffer(offerId); } return; } function validTokens(ERC20 src, ERC20 dest) internal view returns (bool valid) { return ((isTokenListed[src] && ETH_TOKEN_ADDRESS == dest) || (isTokenListed[dest] && ETH_TOKEN_ADDRESS == src)); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[],"name":"enableTrade","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"alerter","type":"address"}],"name":"removeAlerter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"minSrcAmount","type":"uint256"}],"name":"listToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeBps","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingAdmin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOperators","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"otc","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"amount","type":"uint256"},{"name":"sendTo","type":"address"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newAlerter","type":"address"}],"name":"addAlerter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"sanityRatesContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"wethToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_kyberNetwork","type":"address"}],"name":"setKyberNetwork","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"val","type":"uint256"}],"name":"valueBeforeFeesWereReduced","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"tokenMinSrcAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"disableTrade","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"srcToken","type":"address"},{"name":"srcAmount","type":"uint256"},{"name":"destToken","type":"address"},{"name":"destAddress","type":"address"},{"name":"conversionRate","type":"uint256"},{"name":"validate","type":"bool"}],"name":"trade","outputs":[{"name":"","type":"bool"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"val","type":"uint256"}],"name":"valueAfterReducingFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_feeBps","type":"uint256"}],"name":"setFeeBps","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"claimAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newAdmin","type":"address"}],"name":"transferAdminQuickly","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getAlerters","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"src","type":"address"},{"name":"dest","type":"address"},{"name":"srcQty","type":"uint256"},{"name":"blockNumber","type":"uint256"}],"name":"getConversionRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOperator","type":"address"}],"name":"addOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"delistToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"operator","type":"address"}],"name":"removeOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"kyberNetwork","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"sendTo","type":"address"}],"name":"withdrawEther","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"},{"name":"user","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tradeEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isTokenListed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_kyberNetwork","type":"address"},{"name":"_otc","type":"address"},{"name":"_wethToken","type":"address"},{"name":"_admin","type":"address"},{"name":"_feeBps","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"sender","type":"address"},{"indexed":false,"name":"src","type":"address"},{"indexed":false,"name":"srcAmount","type":"uint256"},{"indexed":false,"name":"destToken","type":"address"},{"indexed":false,"name":"destAmount","type":"uint256"},{"indexed":false,"name":"destAddress","type":"address"}],"name":"TradeExecute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"enable","type":"bool"}],"name":"TradeEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"kyberNetwork","type":"address"}],"name":"KyberNetworkSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"feeBps","type":"uint256"}],"name":"FeeBpsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"sendTo","type":"address"}],"name":"TokenWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"sendTo","type":"address"}],"name":"EtherWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"pendingAdmin","type":"address"}],"name":"TransferAdminPending","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAdmin","type":"address"},{"indexed":false,"name":"previousAdmin","type":"address"}],"name":"AdminClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAlerter","type":"address"},{"indexed":false,"name":"isAdd","type":"bool"}],"name":"AlerterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOperator","type":"address"},{"indexed":false,"name":"isAdd","type":"bool"}],"name":"OperatorAdded","type":"event"}]
Deployed Bytecode
0x60606040526004361061017b5763ffffffff60e060020a60003504166299d386811461019857806301a12fd3146101bf5780630717d7c3146101de57806324a9d85314610200578063267822471461022557806327a099d81461025457806336b61e3c146102ba5780633ccdbb28146102cd578063408ee7fe146102f657806347e6924f146103155780634b57b0be1461032857806354a325a61461033b5780635b7146901461035a5780635cf4a0da146103705780636940030f1461038f5780636cf69811146103a25780636f3d8043146103ce57806372c27b62146103e457806375829def146103fa57806377f50f97146104195780637acc86781461042c5780637c423f541461044b5780637cd442721461045e5780639870d7fe14610489578063abffc9ac146104a8578063ac8a584a146104c7578063b78b842d146104e6578063ce56c454146104f9578063d4fac45d1461051b578063d621e81314610540578063e69ec65314610553578063f851a44014610572575b600a5433600160a060020a0390811691161461019657600080fd5b005b34156101a357600080fd5b6101ab610585565b604051901515815260200160405180910390f35b34156101ca57600080fd5b610196600160a060020a03600435166105ed565b34156101e957600080fd5b610196600160a060020a036004351660243561075d565b341561020b57600080fd5b6102136108a2565b60405190815260200160405180910390f35b341561023057600080fd5b6102386108a8565b604051600160a060020a03909116815260200160405180910390f35b341561025f57600080fd5b6102676108b7565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156102a657808201518382015260200161028e565b505050509050019250505060405180910390f35b34156102c557600080fd5b61023861091f565b34156102d857600080fd5b610196600160a060020a03600435811690602435906044351661092e565b341561030157600080fd5b610196600160a060020a0360043516610a25565b341561032057600080fd5b610238610b21565b341561033357600080fd5b610238610b30565b341561034657600080fd5b610196600160a060020a0360043516610b3f565b341561036557600080fd5b610213600435610bd1565b341561037b57600080fd5b610213600160a060020a0360043516610c08565b341561039a57600080fd5b6101ab610c1a565b6101ab600160a060020a03600435811690602435906044358116906064351660843560a4351515610c87565b34156103d957600080fd5b610213600435610cdc565b34156103ef57600080fd5b610196600435610d07565b341561040557600080fd5b610196600160a060020a0360043516610d6b565b341561042457600080fd5b610196610e06565b341561043757600080fd5b610196600160a060020a0360043516610ea0565b341561045657600080fd5b610267610f82565b341561046957600080fd5b610213600160a060020a0360043581169060243516604435606435610fe8565b341561049457600080fd5b610196600160a060020a0360043516611136565b34156104b357600080fd5b610196600160a060020a0360043516611206565b34156104d257600080fd5b610196600160a060020a03600435166112fd565b34156104f157600080fd5b610238611469565b341561050457600080fd5b610196600435600160a060020a0360243516611478565b341561052657600080fd5b610213600160a060020a036004358116906024351661150b565b341561054b57600080fd5b6101ab6115bd565b341561055e57600080fd5b6101ab600160a060020a03600435166115c6565b341561057d57600080fd5b6102386115db565b6000805433600160a060020a039081169116146105a157600080fd5b600d805460ff191660019081179091557f7d7f00509dd73ac4449f698ae75ccc797895eff5fa9d446d3df387598a26e73590604051901515815260200160405180910390a15060015b90565b6000805433600160a060020a0390811691161461060957600080fd5b600160a060020a03821660009081526003602052604090205460ff16151561063057600080fd5b50600160a060020a0381166000908152600360205260408120805460ff191690555b6005548110156107595781600160a060020a031660058281548110151561067557fe5b600091825260209091200154600160a060020a03161415610751576005805460001981019081106106a257fe5b60009182526020909120015460058054600160a060020a0390921691839081106106c857fe5b60009182526020909120018054600160a060020a031916600160a060020a03929092169190911790556005805490610704906000198301611f27565b507f5611bf3e417d124f97bf2c788843ea8bb502b66079fbee02158ef30b172cb762826000604051600160a060020a039092168252151560208201526040908101905180910390a1610759565b600101610652565b5050565b60005433600160a060020a0390811691161461077857600080fd5b600160a060020a038216151561078d57600080fd5b600160a060020a0382166000908152600b602052604090205460ff16156107b357600080fd5b60126107be836115ea565b146107c857600080fd5b600954600160a060020a038084169163095ea7b391167f800000000000000000000000000000000000000000000000000000000000000060006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561084b57600080fd5b6102c65a03f1151561085c57600080fd5b50505060405180519050151561087157600080fd5b600160a060020a039091166000908152600b60209081526040808320805460ff19166001179055600c909152902055565b600e5481565b600154600160a060020a031681565b6108bf611f50565b600480548060200260200160405190810160405280929190818152602001828054801561091557602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116108f7575b5050505050905090565b600954600160a060020a031681565b60005433600160a060020a0390811691161461094957600080fd5b82600160a060020a031663a9059cbb828460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156109a657600080fd5b6102c65a03f115156109b757600080fd5b5050506040518051905015156109cc57600080fd5b7f72cb8a894ddb372ceec3d2a7648d86f17d5a15caae0e986c53109b8a9a9385e6838383604051600160a060020a03938416815260208101929092529091166040808301919091526060909101905180910390a1505050565b60005433600160a060020a03908116911614610a4057600080fd5b600160a060020a03811660009081526003602052604090205460ff1615610a6657600080fd5b60055460329010610a7657600080fd5b7f5611bf3e417d124f97bf2c788843ea8bb502b66079fbee02158ef30b172cb762816001604051600160a060020a039092168252151560208201526040908101905180910390a1600160a060020a0381166000908152600360205260409020805460ff191660019081179091556005805490918101610af58382611f27565b5060009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055565b600754600160a060020a031681565b600a54600160a060020a031681565b60005433600160a060020a03908116911614610b5a57600080fd5b600160a060020a0381161515610b6f57600080fd5b60088054600160a060020a031916600160a060020a0383811691909117918290557f38622430bb6defd4452b087e8d0b4a6d1c4d35c179c2d7d875d4abb272b9d88b9116604051600160a060020a03909116815260200160405180910390a150565b60006b204fce5e3e25026110000000821115610bec57600080fd5b600e54612710038261271002811515610c0157fe5b0492915050565b600c6020526000908152604090205481565b600160a060020a03331660009081526003602052604081205460ff161515610c4157600080fd5b600d805460ff191690557f7d7f00509dd73ac4449f698ae75ccc797895eff5fa9d446d3df387598a26e7356000604051901515815260200160405180910390a150600190565b600d5460009060ff161515610c9b57600080fd5b60085433600160a060020a03908116911614610cb657600080fd5b610cc48787878787876116ae565b1515610ccf57600080fd5b5060019695505050505050565b60006b204fce5e3e25026110000000821115610cf757600080fd5b600e546127109081038302610c01565b60005433600160a060020a03908116911614610d2257600080fd5b6127108110610d3057600080fd5b600e8190557f4f78c4ceb393a616bbd264a4584a9ad15d722042ce1e135e6a8380217f5cb42b8160405190815260200160405180910390a150565b60005433600160a060020a03908116911614610d8657600080fd5b600160a060020a0381161515610d9b57600080fd5b6001547f3b81caf78fa51ecbc8acb482fd7012a277b428d9b80f9d156e8a54107496cc4090600160a060020a0316604051600160a060020a03909116815260200160405180910390a160018054600160a060020a031916600160a060020a0392909216919091179055565b60015433600160a060020a03908116911614610e2157600080fd5b6001546000547f65da1cfc2c2e81576ad96afb24a581f8e109b7a403b35cbd3243a1c99efdb9ed91600160a060020a039081169116604051600160a060020a039283168152911660208201526040908101905180910390a16001805460008054600160a060020a0319908116600160a060020a03841617909155169055565b60005433600160a060020a03908116911614610ebb57600080fd5b600160a060020a0381161515610ed057600080fd5b7f3b81caf78fa51ecbc8acb482fd7012a277b428d9b80f9d156e8a54107496cc4081604051600160a060020a03909116815260200160405180910390a16000547f65da1cfc2c2e81576ad96afb24a581f8e109b7a403b35cbd3243a1c99efdb9ed908290600160a060020a0316604051600160a060020a039283168152911660208201526040908101905180910390a160008054600160a060020a031916600160a060020a0392909216919091179055565b610f8a611f50565b600580548060200260200160405190810160405280929190818152602001828054801561091557602002820191906000526020600020908154600160a060020a031681526001909101906020018083116108f7575050505050905090565b6000806000806000806000600d60009054906101000a900460ff1615156110125760009650611128565b61101c8b8b611a2d565b151561102b5760009650611128565b600160a060020a038b1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561106957600a54899550600160a060020a031693508992506110eb565b600160a060020a038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156110e257600a54600160a060020a03808d166000908152600c60205260409020548d9650911693508910156110d957600160a060020a038b166000908152600c602052604090205494506110dd565b8894505b6110eb565b60009650611128565b6110f6838587611ac2565b9093509150508085111561110d5760009650611128565b61111a8183601280611d01565b955061112586610cdc565b96505b505050505050949350505050565b60005433600160a060020a0390811691161461115157600080fd5b600160a060020a03811660009081526002602052604090205460ff161561117757600080fd5b6004546032901061118757600080fd5b7f091a7a4b85135fdd7e8dbc18b12fabe5cc191ea867aa3c2e1a24a102af61d58b816001604051600160a060020a039092168252151560208201526040908101905180910390a1600160a060020a0381166000908152600260205260409020805460ff191660019081179091556004805490918101610af58382611f27565b60005433600160a060020a0390811691161461122157600080fd5b600160a060020a0381166000908152600b602052604090205460ff16151561124857600080fd5b600954600160a060020a038083169163095ea7b391166000806040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156112ab57600080fd5b6102c65a03f115156112bc57600080fd5b5050506040518051905015156112d157600080fd5b600160a060020a03166000908152600b60209081526040808320805460ff19169055600c909152812055565b6000805433600160a060020a0390811691161461131957600080fd5b600160a060020a03821660009081526002602052604090205460ff16151561134057600080fd5b50600160a060020a0381166000908152600260205260408120805460ff191690555b6004548110156107595781600160a060020a031660048281548110151561138557fe5b600091825260209091200154600160a060020a03161415611461576004805460001981019081106113b257fe5b60009182526020909120015460048054600160a060020a0390921691839081106113d857fe5b60009182526020909120018054600160a060020a031916600160a060020a03929092169190911790556004805460001901906114149082611f27565b507f091a7a4b85135fdd7e8dbc18b12fabe5cc191ea867aa3c2e1a24a102af61d58b826000604051600160a060020a039092168252151560208201526040908101905180910390a1610759565b600101611362565b600854600160a060020a031681565b60005433600160a060020a0390811691161461149357600080fd5b600160a060020a03811682156108fc0283604051600060405180830381858888f1935050505015156114c457600080fd5b7fec47e7ed86c86774d1a72c19f35c639911393fe7c1a34031fdbd260890da90de8282604051918252600160a060020a031660208201526040908101905180910390a15050565b6000600160a060020a03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156115435750600160a060020a038116316115b7565b82600160a060020a03166370a082318360006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561159a57600080fd5b6102c65a03f115156115ab57600080fd5b50505060405180519150505b92915050565b600d5460ff1681565b600b6020526000908152604090205460ff1681565b600054600160a060020a031681565b600080600160a060020a03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561161b57601291506116a8565b50600160a060020a0382166000908152600660205260409020548015156116a45782600160a060020a031663313ce5676000604051602001526040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561168257600080fd5b6102c65a03f1151561169357600080fd5b5050506040518051905091506116a8565b8091505b50919050565b6000806000806116be8a89611a2d565b15156116c957600080fd5b841561171d57600086116116dc57600080fd5b600160a060020a038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156117125734891461170d57600080fd5b61171d565b341561171d57600080fd5b61172a8960128089611da4565b91506000821161173957600080fd5b61174282610bd1565b9050600160a060020a038a1673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561186c57600a54600160a060020a031663d0e30db0346040518263ffffffff1660e060020a0281526004016000604051808303818588803b15156117a857600080fd5b6125ee5a03f115156117b957600080fd5b5050600a546117d59250600160a060020a03169050898b611e31565b9250808310156117e457600080fd5b87600160a060020a031663a9059cbb888460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561184157600080fd5b6102c65a03f1151561185257600080fd5b50505060405180519050151561186757600080fd5b6119b0565b89600160a060020a03166323b872dd33308c60006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b15156118d657600080fd5b6102c65a03f115156118e757600080fd5b5050506040518051905015156118fc57600080fd5b600a54611914908b90600160a060020a03168b611e31565b92508083101561192357600080fd5b600a54600160a060020a0316632e1a7d4d8460405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b151561196b57600080fd5b6102c65a03f1151561197c57600080fd5b505050600160a060020a0387166108fc83150283604051600060405180830381858888f1935050505015156119b057600080fd5b33600160a060020a03167fea9415385bae08fe9f6dc457b02577166790cde83bb18cc340aac6cb81b824de8b8b8b868c604051600160a060020a039586168152602081019490945291841660408085019190915260608401919091529216608082015260a001905180910390a25060019998505050505050505050565b600160a060020a0382166000908152600b602052604081205460ff168015611a71575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600160a060020a038316145b80611abb5750600160a060020a0382166000908152600b602052604090205460ff168015611abb575073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee600160a060020a038416145b9392505050565b600954600090819081908190600160a060020a0316630374fc6f8888846040516020015260405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515611b2b57600080fd5b6102c65a03f11515611b3c57600080fd5b5050506040518051600954909550600160a060020a03169050634579268a8560006040516080015260405160e060020a63ffffffff84160281526004810191909152602401608060405180830381600087803b1515611b9a57600080fd5b6102c65a03f11515611bab57600080fd5b50505060405180519060200180519060200180519060200180515092955093506001925050505b81851115611cf757600954600160a060020a031663943911bc8560006040516020015260405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515611c2b57600080fd5b6102c65a03f11515611c3c57600080fd5b5050506040518051945050831580611c575750600101600781115b15611c6d57600093506000925060009150611cf7565b600954600160a060020a0316634579268a8560006040516080015260405160e060020a63ffffffff84160281526004810191909152602401608060405180830381600087803b1515611cbe57600080fd5b6102c65a03f11515611ccf57600080fd5b5050506040518051906020018051906020018051906020018051509295509350611bd2915050565b5093509350939050565b60006b204fce5e3e25026110000000851115611d1c57600080fd5b6b204fce5e3e25026110000000841115611d3557600080fd5b828210611d705760128383031115611d4c57600080fd5b84838303600a0a02670de0b6b3a76400008502811515611d6857fe5b049050611d9c565b60128284031115611d8057600080fd5b84828403600a0a670de0b6b3a7640000860202811515611d6857fe5b949350505050565b60006b204fce5e3e25026110000000851115611dbf57600080fd5b69d3c21bcecceda1000000821115611dd657600080fd5b838310611e055760128484031115611ded57600080fd5b670de0b6b3a7640000858302858503600a0a02611d68565b60128385031115611e1557600080fd5b828403600a0a670de0b6b3a764000002828602811515611d6857fe5b600080600080611e42868887611ac2565b919450925090506b204fce5e3e25026110000000851115611e6257600080fd5b6b204fce5e3e25026110000000821115611e7b57600080fd5b80828602811515611e8857fe5b0493506fffffffffffffffffffffffffffffffff84168414611ea957600080fd5b600954600160a060020a03166349606455848660405160e060020a63ffffffff851602815260048101929092526fffffffffffffffffffffffffffffffff166024820152604401600060405180830381600087803b1515611f0957600080fd5b6102c65a03f11515611f1a57600080fd5b5050505050509392505050565b815481835581811511611f4b57600083815260209020611f4b918101908301611f62565b505050565b60206040519081016040526000815290565b6105ea91905b80821115611f7c5760008155600101611f68565b50905600a165627a7a723058208cf29d258c4ff905aea862aac927406ab4148681be18430e5feffa5afd339dd70029
Swarm Source
bzzr://8cf29d258c4ff905aea862aac927406ab4148681be18430e5feffa5afd339dd7
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.