Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TransitSwapFees
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libraries/Ownable.sol"; import "./libraries/SafeMath.sol"; import "./interfaces/IERC20.sol"; import "./libraries/TransferHelper.sol"; contract TransitSwapFees is Ownable { using SafeMath for uint256; bool private _support_discount; mapping(uint8 => mapping(string => uint256)) private _fees; address[] private _support_tokens; //gradient uint256[] private _gradient_threshold; uint256[] private _gradient_discount; event SupportDiscount(bool newSupport); event SetupTokens(address[] tokens); event SetupFees(uint8[] swapType, uint256[] feeRate, string[] channel); event SetupGradient(uint256[] threshold, uint256[] discount); event Withdraw(address indexed token, address indexed executor, address indexed recipient, uint amount); constructor(address executor) Ownable (executor) { _support_discount = true; } function supportDiscount() public view returns (bool) { return _support_discount; } /** * @dev Returns the channel of the fees. */ function fees(uint8 swapType, string memory channel) public view returns (uint256) { return _fees[swapType][channel]; } function changeSupportDiscount() public onlyExecutor { emit SupportDiscount(_support_discount); _support_discount = !_support_discount; } function setupTokens(address[] memory tokens) public onlyExecutor { _support_tokens = tokens; emit SetupTokens(tokens); } function setupFees(uint8[] memory swapType, uint256[] memory feeRate, string[] memory channel) public onlyExecutor { require(swapType.length == feeRate.length, "TransitSwap: invalid data"); require(swapType.length == channel.length, "TransitSwap: invalid data"); for(uint256 index; index < swapType.length; index++) { _fees[swapType[index]][channel[index]] = feeRate[index]; } emit SetupFees(swapType, feeRate, channel); } function setupGradient(uint256[] memory gradientThreshold, uint256[] memory gradientDiscount) public onlyExecutor { _gradient_threshold = gradientThreshold; _gradient_discount = gradientDiscount; emit SetupGradient(gradientThreshold, gradientDiscount); } /** * @dev Returns the swap of the current fees. */ function getFeeRate(address trader, uint256 tradeAmount, uint8 swapType, string memory channel) public view returns (uint payFees) { uint256 feeRate = _fees[swapType][channel]; if (feeRate == 0) { feeRate = _fees[swapType]["default"]; require(feeRate > 0, "TransitSwap: invalid swapType"); } if(feeRate == 1) { payFees = 0; } else { uint256 normalPayFees = tradeAmount.mul(feeRate).div(10000); payFees = normalPayFees; if (_support_discount) { uint256 sumTokenBalance; for (uint256 index; index < _support_tokens.length; index++) { if (_support_tokens[index] != address(0)) { sumTokenBalance = sumTokenBalance.add(IERC20(_support_tokens[index]).balanceOf(trader)); } } for (uint256 index; index < _gradient_threshold.length; index++) { if (sumTokenBalance < _gradient_threshold[index]) { payFees = normalPayFees.mul(_gradient_discount[index]).div(10000); break; } } } } } function withdrawTokens(address[] memory tokens, address recipient) external onlyExecutor { for(uint index; index < tokens.length; index++) { uint amount; if(TransferHelper.isETH(tokens[index])) { amount = address(this).balance; TransferHelper.safeTransferETH(recipient, amount); } else { amount = IERC20(tokens[index]).balanceOf(address(this)); TransferHelper.safeTransferWithoutRequire(tokens[index], recipient, amount); } emit Withdraw(tokens[index], msg.sender, recipient, amount); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; library TransferHelper { address private constant _ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); address private constant _ZERO_ADDRESS = address(0); function isETH(address token) internal pure returns (bool) { return (token == _ZERO_ADDRESS || token == _ETH_ADDRESS); } function safeApprove(address token, address to, uint value) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED'); } function safeTransfer(address token, address to, uint value) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_TOKEN_FAILED'); } function safeTransferWithoutRequire(address token, address to, uint256 value) internal returns (bool) { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); return (success && (data.length == 0 || abi.decode(data, (bool)))); } function safeTransferFrom(address token, address from, address to, uint value) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED'); } function safeTransferETH(address to, uint value) internal { // solium-disable-next-line (bool success,) = to.call{value:value}(new bytes(0)); require(success, 'TransferHelper: TRANSFER_FAILED'); } function safeDeposit(address wrapped, uint value) internal { // bytes4(keccak256(bytes('deposit()'))); (bool success, bytes memory data) = wrapped.call{value:value}(abi.encodeWithSelector(0xd0e30db0)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: DEPOSIT_FAILED'); } function safeWithdraw(address wrapped, uint value) internal { // bytes4(keccak256(bytes('withdraw(uint256 wad)'))); (bool success, bytes memory data) = wrapped.call{value:0}(abi.encodeWithSelector(0x2e1a7d4d, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: WITHDRAW_FAILED'); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.9; interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; library SafeMath { function add(uint x, uint y) internal pure returns (uint z) { require((z = x + y) >= x, 'ds-math-add-overflow'); } function sub(uint x, uint y) internal pure returns (uint z) { require((z = x - y) <= x, 'ds-math-sub-underflow'); } function mul(uint x, uint y) internal pure returns (uint z) { require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow'); } function div(uint x, uint y) internal pure returns (uint z) { require(y != 0 , 'ds-math-div-zero'); z = x / y; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) // Add executor extension pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable { address private _owner; address private _pendingOwner; address private _executor; address private _pendingExecutor; bool internal _initialized; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event ExecutorshipTransferStarted(address indexed previousExecutor, address indexed newExecutor); event ExecutorshipTransferred(address indexed previousExecutor, address indexed newExecutor); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor(address newExecutor) { require(!_initialized, "Ownable: initialized"); _transferOwnership(msg.sender); _transferExecutorship(newExecutor); _initialized = true; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Throws if called by any account other than the executor. */ modifier onlyExecutor() { _checkExecutor(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Returns the address of the current executor. */ function executor() public view virtual returns (address) { return _executor; } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Returns the address of the pending executor. */ function pendingExecutor() public view virtual returns (address) { return _pendingExecutor; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == msg.sender, "Ownable: caller is not the owner"); } /** * @dev Throws if the sender is not the executor. */ function _checkExecutor() internal view virtual { require(executor() == msg.sender, "Ownable: caller is not the executor"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers executorship of the contract to a new account (`newExecutor`). * Can only be called by the current executor. */ function transferExecutorship(address newExecutor) public virtual onlyExecutor { _pendingExecutor = newExecutor; emit ExecutorshipTransferStarted(executor(), newExecutor); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { delete _pendingOwner; address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } function _transferExecutorship(address newExecutor) internal virtual { delete _pendingExecutor; address oldExecutor = _executor; _executor = newExecutor; emit ExecutorshipTransferred(oldExecutor, newExecutor); } function acceptOwnership() external { address sender = msg.sender; require(pendingOwner() == sender, "Ownable: caller is not the new owner"); _transferOwnership(sender); } function acceptExecutorship() external { address sender = msg.sender; require(pendingExecutor() == sender, "Ownable: caller is not the new executor"); _transferExecutorship(sender); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"executor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousExecutor","type":"address"},{"indexed":true,"internalType":"address","name":"newExecutor","type":"address"}],"name":"ExecutorshipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousExecutor","type":"address"},{"indexed":true,"internalType":"address","name":"newExecutor","type":"address"}],"name":"ExecutorshipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8[]","name":"swapType","type":"uint8[]"},{"indexed":false,"internalType":"uint256[]","name":"feeRate","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"channel","type":"string[]"}],"name":"SetupFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"threshold","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"discount","type":"uint256[]"}],"name":"SetupGradient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"SetupTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"newSupport","type":"bool"}],"name":"SupportDiscount","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"executor","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"acceptExecutorship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"changeSupportDiscount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"swapType","type":"uint8"},{"internalType":"string","name":"channel","type":"string"}],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"trader","type":"address"},{"internalType":"uint256","name":"tradeAmount","type":"uint256"},{"internalType":"uint8","name":"swapType","type":"uint8"},{"internalType":"string","name":"channel","type":"string"}],"name":"getFeeRate","outputs":[{"internalType":"uint256","name":"payFees","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingExecutor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"swapType","type":"uint8[]"},{"internalType":"uint256[]","name":"feeRate","type":"uint256[]"},{"internalType":"string[]","name":"channel","type":"string[]"}],"name":"setupFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"gradientThreshold","type":"uint256[]"},{"internalType":"uint256[]","name":"gradientDiscount","type":"uint256[]"}],"name":"setupGradient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"setupTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supportDiscount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newExecutor","type":"address"}],"name":"transferExecutorship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001a4d38038062001a4d83398101604081905262000034916200017f565b6003548190600160a01b900460ff1615620000955760405162461bcd60e51b815260206004820152601460248201527f4f776e61626c653a20696e697469616c697a6564000000000000000000000000604482015260640160405180910390fd5b620000a033620000c8565b620000ab8162000122565b50506003805461ffff60a01b191661010160a01b179055620001b1565b600180546001600160a01b0319908116909155600080546001600160a01b03848116938216841783556040519116929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600380546001600160a01b0319908116909155600280546001600160a01b0384811693821684179092556040519116919082907f88436636ea40d5bb1bcc55ff9cd54788af71da886f4147a87f199adcca733d4d90600090a35050565b6000602082840312156200019257600080fd5b81516001600160a01b0381168114620001aa57600080fd5b9392505050565b61188c80620001c16000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063afed2d0e116100a2578063cb0f266711610071578063cb0f266714610202578063d63234e014610215578063e30c397814610226578063ee60a04b14610237578063f2fde38b1461023f57600080fd5b8063afed2d0e146101b8578063b1830a1f146101cb578063beb66f6f146101de578063c34c08e5146101f157600080fd5b8063715018a6116100de578063715018a61461017b57806379ba5097146101835780638da5cb5b1461018b57806394d3d793146101b057600080fd5b80630e8cc7051461011057806319fa763a146101255780633473272d1461014b5780634fbb32c61461015e575b600080fd5b61012361011e366004611364565b610252565b005b6101386101333660046112bf565b6103e5565b6040519081526020015b60405180910390f35b61013861015936600461153c565b61067e565b600354600160a81b900460ff166040519015158152602001610142565b6101236106b6565b6101236106ca565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610142565b61012361074c565b6101236101c63660046112a4565b6107cf565b6101236101d93660046113b2565b610840565b6101236101ec366004611327565b6108ad565b6002546001600160a01b0316610198565b610123610210366004611416565b610903565b6003546001600160a01b0316610198565b6001546001600160a01b0316610198565b610123610a87565b61012361024d3660046112a4565b610af2565b61025a610b63565b60005b82518110156103e057600061028a84838151811061027d5761027d61182a565b6020026020010151610bd8565b156102a057504761029b8382610c11565b61035d565b8382815181106102b2576102b261182a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156102fd57600080fd5b505afa158015610311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103359190611523565b905061035b84838151811061034c5761034c61182a565b60200260200101518483610cce565b505b826001600160a01b0316336001600160a01b03168584815181106103835761038361182a565b60200260200101516001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f7846040516103c591815260200190565b60405180910390a450806103d8816117f9565b91505061025d565b505050565b60ff821660009081526004602052604080822090518291906104089085906115bb565b908152602001604051809103902054905080600014156104ae5760ff841660009081526004602052604090819020905166191959985d5b1d60ca1b81526007019081526020016040518091039020549050600081116104ae5760405162461bcd60e51b815260206004820152601d60248201527f5472616e736974537761703a20696e76616c696420737761705479706500000060448201526064015b60405180910390fd5b80600114156104c05760009150610675565b60006104d86127106104d28885610db8565b90610e1f565b600354909350839150600160a81b900460ff1615610673576000805b6005548110156105ee5760006001600160a01b03166005828154811061051c5761051c61182a565b6000918252602090912001546001600160a01b0316146105dc576105d96005828154811061054c5761054c61182a565b6000918252602090912001546040516370a0823160e01b81526001600160a01b038c81166004830152909116906370a082319060240160206040518083038186803b15801561059a57600080fd5b505afa1580156105ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d29190611523565b8390610e72565b91505b806105e6816117f9565b9150506104f4565b5060005b600654811015610670576006818154811061060f5761060f61182a565b906000526020600020015482101561065e576106576127106104d26007848154811061063d5761063d61182a565b906000526020600020015486610db890919063ffffffff16565b9450610670565b80610668816117f9565b9150506105f2565b50505b505b50949350505050565b60ff8216600090815260046020526040808220905161069e9084906115bb565b90815260200160405180910390205490505b92915050565b6106be610ec7565b6106c86000610f30565b565b33806106de6001546001600160a01b031690565b6001600160a01b0316146107405760405162461bcd60e51b8152602060048201526024808201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206e6577206f6044820152633bb732b960e11b60648201526084016104a5565b61074981610f30565b50565b33806107606003546001600160a01b031690565b6001600160a01b0316146107c65760405162461bcd60e51b815260206004820152602760248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206e657720656044820152663c32b1baba37b960c91b60648201526084016104a5565b61074981610f8a565b6107d7610b63565b600380546001600160a01b0383166001600160a01b031990911681179091556108086002546001600160a01b031690565b6001600160a01b03167fdd01547fc40682edc3cd8d164d53f5a1ae6b46138a83f045658ed760823ddba860405160405180910390a350565b610848610b63565b815161085b906006906020850190610fe7565b50805161086f906007906020840190610fe7565b507fa5b9ea7ff76f86ffcd644c0d27a1252bf31368f877ee9da1be50c663a354c7bf82826040516108a1929190611624565b60405180910390a15050565b6108b5610b63565b80516108c8906005906020840190611032565b507ff18cea05db3f5cf531ff855eb71eb2e1b165fd30e83d8f64f822aad2768f1c39816040516108f891906115d7565b60405180910390a150565b61090b610b63565b81518351146109585760405162461bcd60e51b81526020600482015260196024820152785472616e736974537761703a20696e76616c6964206461746160381b60448201526064016104a5565b80518351146109a55760405162461bcd60e51b81526020600482015260196024820152785472616e736974537761703a20696e76616c6964206461746160381b60448201526064016104a5565b60005b8351811015610a46578281815181106109c3576109c361182a565b6020026020010151600460008684815181106109e1576109e161182a565b602002602001015160ff1660ff168152602001908152602001600020838381518110610a0f57610a0f61182a565b6020026020010151604051610a2491906115bb565b9081526040519081900360200190205580610a3e816117f9565b9150506109a8565b507f240c316843778a02a2759cf8148c7c631e58b839b92641d136857a37943d634a838383604051610a7a93929190611652565b60405180910390a1505050565b610a8f610b63565b600354604051600160a81b90910460ff16151581527fb4cfce6bd978cae3276558e26fd9fa01000674da6061b8ae07f77a1133b3488e9060200160405180910390a16003805460ff60a81b198116600160a81b9182900460ff1615909102179055565b610afa610ec7565b600180546001600160a01b0383166001600160a01b03199091168117909155610b2b6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b33610b766002546001600160a01b031690565b6001600160a01b0316146106c85760405162461bcd60e51b815260206004820152602360248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652065786563756044820152623a37b960e91b60648201526084016104a5565b60006001600160a01b03821615806106b057506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1492915050565b604080516000808252602082019092526001600160a01b038416908390604051610c3b91906115bb565b60006040518083038185875af1925050503d8060008114610c78576040519150601f19603f3d011682016040523d82523d6000602084013e610c7d565b606091505b50509050806103e05760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016104a5565b6000806000856001600160a01b031663a9059cbb8686604051602401610d099291906001600160a01b03929092168252602082015260400190565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610d4291906115bb565b6000604051808303816000865af19150503d8060008114610d7f576040519150601f19603f3d011682016040523d82523d6000602084013e610d84565b606091505b5091509150818015610dae575080511580610dae575080806020019051810190610dae9190611501565b9695505050505050565b6000811580610ddc57508282610dce81836117aa565b9250610dda9083611788565b145b6106b05760405162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b60448201526064016104a5565b600081610e615760405162461bcd60e51b815260206004820152601060248201526f64732d6d6174682d6469762d7a65726f60801b60448201526064016104a5565b610e6b8284611788565b9392505050565b600082610e7f8382611770565b91508110156106b05760405162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b60448201526064016104a5565b33610eda6000546001600160a01b031690565b6001600160a01b0316146106c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a5565b600180546001600160a01b0319908116909155600080546001600160a01b03848116938216841783556040519116929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600380546001600160a01b0319908116909155600280546001600160a01b0384811693821684179092556040519116919082907f88436636ea40d5bb1bcc55ff9cd54788af71da886f4147a87f199adcca733d4d90600090a35050565b828054828255906000526020600020908101928215611022579160200282015b82811115611022578251825591602001919060010190611007565b5061102e929150611087565b5090565b828054828255906000526020600020908101928215611022579160200282015b8281111561102257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611052565b5b8082111561102e5760008155600101611088565b80356001600160a01b03811681146110b357600080fd5b919050565b600082601f8301126110c957600080fd5b813560206110de6110d98361174c565b61171b565b80838252828201915082860187848660051b89010111156110fe57600080fd5b60005b85811015611124576111128261109c565b84529284019290840190600101611101565b5090979650505050505050565b600082601f83011261114257600080fd5b813560206111526110d98361174c565b80838252828201915082860187848660051b890101111561117257600080fd5b6000805b868110156111b557823567ffffffffffffffff811115611194578283fd5b6111a28b88838d0101611223565b8652509385019391850191600101611176565b509198975050505050505050565b600082601f8301126111d457600080fd5b813560206111e46110d98361174c565b80838252828201915082860187848660051b890101111561120457600080fd5b60005b8581101561112457813584529284019290840190600101611207565b600082601f83011261123457600080fd5b813567ffffffffffffffff81111561124e5761124e611840565b611261601f8201601f191660200161171b565b81815284602083860101111561127657600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146110b357600080fd5b6000602082840312156112b657600080fd5b610e6b8261109c565b600080600080608085870312156112d557600080fd5b6112de8561109c565b9350602085013592506112f360408601611293565b9150606085013567ffffffffffffffff81111561130f57600080fd5b61131b87828801611223565b91505092959194509250565b60006020828403121561133957600080fd5b813567ffffffffffffffff81111561135057600080fd5b61135c848285016110b8565b949350505050565b6000806040838503121561137757600080fd5b823567ffffffffffffffff81111561138e57600080fd5b61139a858286016110b8565b9250506113a96020840161109c565b90509250929050565b600080604083850312156113c557600080fd5b823567ffffffffffffffff808211156113dd57600080fd5b6113e9868387016111c3565b935060208501359150808211156113ff57600080fd5b5061140c858286016111c3565b9150509250929050565b60008060006060848603121561142b57600080fd5b833567ffffffffffffffff8082111561144357600080fd5b818601915086601f83011261145757600080fd5b813560206114676110d98361174c565b8083825282820191508286018b848660051b890101111561148757600080fd5b600096505b848710156114b15761149d81611293565b83526001969096019591830191830161148c565b50975050870135925050808211156114c857600080fd5b6114d4878388016111c3565b935060408601359150808211156114ea57600080fd5b506114f786828701611131565b9150509250925092565b60006020828403121561151357600080fd5b81518015158114610e6b57600080fd5b60006020828403121561153557600080fd5b5051919050565b6000806040838503121561154f57600080fd5b61155883611293565b9150602083013567ffffffffffffffff81111561157457600080fd5b61140c85828601611223565b600081518084526020808501945080840160005b838110156115b057815187529582019590820190600101611594565b509495945050505050565b600082516115cd8184602087016117c9565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156116185783516001600160a01b0316835292840192918401916001016115f3565b50909695505050505050565b6040815260006116376040830185611580565b82810360208401526116498185611580565b95945050505050565b606080825284519082018190526000906020906080840190828801845b8281101561168e57815160ff168452928401929084019060010161166f565b505050838103828501526116a28187611580565b905083810360408501528085518083528383019150838160051b84010184880160005b8381101561170b57601f1980878503018652825180518086526116ed818b88018c85016117c9565b96890196601f019091169390930187019250908601906001016116c5565b50909a9950505050505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561174457611744611840565b604052919050565b600067ffffffffffffffff82111561176657611766611840565b5060051b60200190565b6000821982111561178357611783611814565b500190565b6000826117a557634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156117c4576117c4611814565b500290565b60005b838110156117e45781810151838201526020016117cc565b838111156117f3576000848401525b50505050565b600060001982141561180d5761180d611814565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212200cc282cbb3d07251f59855d11413de7e99e701d0c0aada6de59139423084941c64736f6c63430008070033000000000000000000000000490494393fb90599365c1303e486afe52bbab866
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c8063afed2d0e116100a2578063cb0f266711610071578063cb0f266714610202578063d63234e014610215578063e30c397814610226578063ee60a04b14610237578063f2fde38b1461023f57600080fd5b8063afed2d0e146101b8578063b1830a1f146101cb578063beb66f6f146101de578063c34c08e5146101f157600080fd5b8063715018a6116100de578063715018a61461017b57806379ba5097146101835780638da5cb5b1461018b57806394d3d793146101b057600080fd5b80630e8cc7051461011057806319fa763a146101255780633473272d1461014b5780634fbb32c61461015e575b600080fd5b61012361011e366004611364565b610252565b005b6101386101333660046112bf565b6103e5565b6040519081526020015b60405180910390f35b61013861015936600461153c565b61067e565b600354600160a81b900460ff166040519015158152602001610142565b6101236106b6565b6101236106ca565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610142565b61012361074c565b6101236101c63660046112a4565b6107cf565b6101236101d93660046113b2565b610840565b6101236101ec366004611327565b6108ad565b6002546001600160a01b0316610198565b610123610210366004611416565b610903565b6003546001600160a01b0316610198565b6001546001600160a01b0316610198565b610123610a87565b61012361024d3660046112a4565b610af2565b61025a610b63565b60005b82518110156103e057600061028a84838151811061027d5761027d61182a565b6020026020010151610bd8565b156102a057504761029b8382610c11565b61035d565b8382815181106102b2576102b261182a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b1580156102fd57600080fd5b505afa158015610311573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103359190611523565b905061035b84838151811061034c5761034c61182a565b60200260200101518483610cce565b505b826001600160a01b0316336001600160a01b03168584815181106103835761038361182a565b60200260200101516001600160a01b03167f3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f7846040516103c591815260200190565b60405180910390a450806103d8816117f9565b91505061025d565b505050565b60ff821660009081526004602052604080822090518291906104089085906115bb565b908152602001604051809103902054905080600014156104ae5760ff841660009081526004602052604090819020905166191959985d5b1d60ca1b81526007019081526020016040518091039020549050600081116104ae5760405162461bcd60e51b815260206004820152601d60248201527f5472616e736974537761703a20696e76616c696420737761705479706500000060448201526064015b60405180910390fd5b80600114156104c05760009150610675565b60006104d86127106104d28885610db8565b90610e1f565b600354909350839150600160a81b900460ff1615610673576000805b6005548110156105ee5760006001600160a01b03166005828154811061051c5761051c61182a565b6000918252602090912001546001600160a01b0316146105dc576105d96005828154811061054c5761054c61182a565b6000918252602090912001546040516370a0823160e01b81526001600160a01b038c81166004830152909116906370a082319060240160206040518083038186803b15801561059a57600080fd5b505afa1580156105ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d29190611523565b8390610e72565b91505b806105e6816117f9565b9150506104f4565b5060005b600654811015610670576006818154811061060f5761060f61182a565b906000526020600020015482101561065e576106576127106104d26007848154811061063d5761063d61182a565b906000526020600020015486610db890919063ffffffff16565b9450610670565b80610668816117f9565b9150506105f2565b50505b505b50949350505050565b60ff8216600090815260046020526040808220905161069e9084906115bb565b90815260200160405180910390205490505b92915050565b6106be610ec7565b6106c86000610f30565b565b33806106de6001546001600160a01b031690565b6001600160a01b0316146107405760405162461bcd60e51b8152602060048201526024808201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206e6577206f6044820152633bb732b960e11b60648201526084016104a5565b61074981610f30565b50565b33806107606003546001600160a01b031690565b6001600160a01b0316146107c65760405162461bcd60e51b815260206004820152602760248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206e657720656044820152663c32b1baba37b960c91b60648201526084016104a5565b61074981610f8a565b6107d7610b63565b600380546001600160a01b0383166001600160a01b031990911681179091556108086002546001600160a01b031690565b6001600160a01b03167fdd01547fc40682edc3cd8d164d53f5a1ae6b46138a83f045658ed760823ddba860405160405180910390a350565b610848610b63565b815161085b906006906020850190610fe7565b50805161086f906007906020840190610fe7565b507fa5b9ea7ff76f86ffcd644c0d27a1252bf31368f877ee9da1be50c663a354c7bf82826040516108a1929190611624565b60405180910390a15050565b6108b5610b63565b80516108c8906005906020840190611032565b507ff18cea05db3f5cf531ff855eb71eb2e1b165fd30e83d8f64f822aad2768f1c39816040516108f891906115d7565b60405180910390a150565b61090b610b63565b81518351146109585760405162461bcd60e51b81526020600482015260196024820152785472616e736974537761703a20696e76616c6964206461746160381b60448201526064016104a5565b80518351146109a55760405162461bcd60e51b81526020600482015260196024820152785472616e736974537761703a20696e76616c6964206461746160381b60448201526064016104a5565b60005b8351811015610a46578281815181106109c3576109c361182a565b6020026020010151600460008684815181106109e1576109e161182a565b602002602001015160ff1660ff168152602001908152602001600020838381518110610a0f57610a0f61182a565b6020026020010151604051610a2491906115bb565b9081526040519081900360200190205580610a3e816117f9565b9150506109a8565b507f240c316843778a02a2759cf8148c7c631e58b839b92641d136857a37943d634a838383604051610a7a93929190611652565b60405180910390a1505050565b610a8f610b63565b600354604051600160a81b90910460ff16151581527fb4cfce6bd978cae3276558e26fd9fa01000674da6061b8ae07f77a1133b3488e9060200160405180910390a16003805460ff60a81b198116600160a81b9182900460ff1615909102179055565b610afa610ec7565b600180546001600160a01b0383166001600160a01b03199091168117909155610b2b6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b33610b766002546001600160a01b031690565b6001600160a01b0316146106c85760405162461bcd60e51b815260206004820152602360248201527f4f776e61626c653a2063616c6c6572206973206e6f74207468652065786563756044820152623a37b960e91b60648201526084016104a5565b60006001600160a01b03821615806106b057506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1492915050565b604080516000808252602082019092526001600160a01b038416908390604051610c3b91906115bb565b60006040518083038185875af1925050503d8060008114610c78576040519150601f19603f3d011682016040523d82523d6000602084013e610c7d565b606091505b50509050806103e05760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016104a5565b6000806000856001600160a01b031663a9059cbb8686604051602401610d099291906001600160a01b03929092168252602082015260400190565b6040516020818303038152906040529060e01b6020820180516001600160e01b038381831617835250505050604051610d4291906115bb565b6000604051808303816000865af19150503d8060008114610d7f576040519150601f19603f3d011682016040523d82523d6000602084013e610d84565b606091505b5091509150818015610dae575080511580610dae575080806020019051810190610dae9190611501565b9695505050505050565b6000811580610ddc57508282610dce81836117aa565b9250610dda9083611788565b145b6106b05760405162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b60448201526064016104a5565b600081610e615760405162461bcd60e51b815260206004820152601060248201526f64732d6d6174682d6469762d7a65726f60801b60448201526064016104a5565b610e6b8284611788565b9392505050565b600082610e7f8382611770565b91508110156106b05760405162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b60448201526064016104a5565b33610eda6000546001600160a01b031690565b6001600160a01b0316146106c85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a5565b600180546001600160a01b0319908116909155600080546001600160a01b03848116938216841783556040519116929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600380546001600160a01b0319908116909155600280546001600160a01b0384811693821684179092556040519116919082907f88436636ea40d5bb1bcc55ff9cd54788af71da886f4147a87f199adcca733d4d90600090a35050565b828054828255906000526020600020908101928215611022579160200282015b82811115611022578251825591602001919060010190611007565b5061102e929150611087565b5090565b828054828255906000526020600020908101928215611022579160200282015b8281111561102257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611052565b5b8082111561102e5760008155600101611088565b80356001600160a01b03811681146110b357600080fd5b919050565b600082601f8301126110c957600080fd5b813560206110de6110d98361174c565b61171b565b80838252828201915082860187848660051b89010111156110fe57600080fd5b60005b85811015611124576111128261109c565b84529284019290840190600101611101565b5090979650505050505050565b600082601f83011261114257600080fd5b813560206111526110d98361174c565b80838252828201915082860187848660051b890101111561117257600080fd5b6000805b868110156111b557823567ffffffffffffffff811115611194578283fd5b6111a28b88838d0101611223565b8652509385019391850191600101611176565b509198975050505050505050565b600082601f8301126111d457600080fd5b813560206111e46110d98361174c565b80838252828201915082860187848660051b890101111561120457600080fd5b60005b8581101561112457813584529284019290840190600101611207565b600082601f83011261123457600080fd5b813567ffffffffffffffff81111561124e5761124e611840565b611261601f8201601f191660200161171b565b81815284602083860101111561127657600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146110b357600080fd5b6000602082840312156112b657600080fd5b610e6b8261109c565b600080600080608085870312156112d557600080fd5b6112de8561109c565b9350602085013592506112f360408601611293565b9150606085013567ffffffffffffffff81111561130f57600080fd5b61131b87828801611223565b91505092959194509250565b60006020828403121561133957600080fd5b813567ffffffffffffffff81111561135057600080fd5b61135c848285016110b8565b949350505050565b6000806040838503121561137757600080fd5b823567ffffffffffffffff81111561138e57600080fd5b61139a858286016110b8565b9250506113a96020840161109c565b90509250929050565b600080604083850312156113c557600080fd5b823567ffffffffffffffff808211156113dd57600080fd5b6113e9868387016111c3565b935060208501359150808211156113ff57600080fd5b5061140c858286016111c3565b9150509250929050565b60008060006060848603121561142b57600080fd5b833567ffffffffffffffff8082111561144357600080fd5b818601915086601f83011261145757600080fd5b813560206114676110d98361174c565b8083825282820191508286018b848660051b890101111561148757600080fd5b600096505b848710156114b15761149d81611293565b83526001969096019591830191830161148c565b50975050870135925050808211156114c857600080fd5b6114d4878388016111c3565b935060408601359150808211156114ea57600080fd5b506114f786828701611131565b9150509250925092565b60006020828403121561151357600080fd5b81518015158114610e6b57600080fd5b60006020828403121561153557600080fd5b5051919050565b6000806040838503121561154f57600080fd5b61155883611293565b9150602083013567ffffffffffffffff81111561157457600080fd5b61140c85828601611223565b600081518084526020808501945080840160005b838110156115b057815187529582019590820190600101611594565b509495945050505050565b600082516115cd8184602087016117c9565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b818110156116185783516001600160a01b0316835292840192918401916001016115f3565b50909695505050505050565b6040815260006116376040830185611580565b82810360208401526116498185611580565b95945050505050565b606080825284519082018190526000906020906080840190828801845b8281101561168e57815160ff168452928401929084019060010161166f565b505050838103828501526116a28187611580565b905083810360408501528085518083528383019150838160051b84010184880160005b8381101561170b57601f1980878503018652825180518086526116ed818b88018c85016117c9565b96890196601f019091169390930187019250908601906001016116c5565b50909a9950505050505050505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561174457611744611840565b604052919050565b600067ffffffffffffffff82111561176657611766611840565b5060051b60200190565b6000821982111561178357611783611814565b500190565b6000826117a557634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156117c4576117c4611814565b500290565b60005b838110156117e45781810151838201526020016117cc565b838111156117f3576000848401525b50505050565b600060001982141561180d5761180d611814565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212200cc282cbb3d07251f59855d11413de7e99e701d0c0aada6de59139423084941c64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000490494393fb90599365c1303e486afe52bbab866
-----Decoded View---------------
Arg [0] : executor (address): 0x490494393fb90599365c1303E486AfE52BBab866
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000490494393fb90599365c1303e486afe52bbab866
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.