More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
OneInchWrapper
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-03-14 */ // SPDX-License-Identifier: MIT pragma solidity =0.8.10; contract MainnetAuthAddresses { address internal constant ADMIN_VAULT_ADDR = 0xCCf3d848e08b94478Ed8f46fFead3008faF581fD; address internal constant DSGUARD_FACTORY_ADDRESS = 0x5a15566417e6C1c9546523066500bDDBc53F88C7; address internal constant ADMIN_ADDR = 0x25eFA336886C74eA8E282ac466BdCd0199f85BB9; // USED IN ADMIN VAULT CONSTRUCTOR address internal constant PROXY_AUTH_ADDRESS = 0x149667b6FAe2c63D1B4317C716b0D0e4d3E2bD70; address internal constant MODULE_AUTH_ADDRESS = 0x7407974DDBF539e552F1d051e44573090912CC3D; } contract AuthHelper is MainnetAuthAddresses { } contract AdminVault is AuthHelper { address public owner; address public admin; error SenderNotAdmin(); constructor() { owner = msg.sender; admin = ADMIN_ADDR; } /// @notice Admin is able to change owner /// @param _owner Address of new owner function changeOwner(address _owner) public { if (admin != msg.sender){ revert SenderNotAdmin(); } owner = _owner; } /// @notice Admin is able to set new admin /// @param _admin Address of multisig that becomes new admin function changeAdmin(address _admin) public { if (admin != msg.sender){ revert SenderNotAdmin(); } admin = _admin; } } interface IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint256 digits); function totalSupply() external view returns (uint256 supply); function balanceOf(address _owner) external view returns (uint256 balance); function transfer(address _to, uint256 _value) external returns (bool success); function transferFrom( address _from, address _to, uint256 _value ) external returns (bool success); function approve(address _spender, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint256 remaining); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } library Address { //insufficient balance error InsufficientBalance(uint256 available, uint256 required); //unable to send value, recipient may have reverted error SendingValueFail(); //insufficient balance for call error InsufficientBalanceForCall(uint256 available, uint256 required); //call to non-contract error NonContractCall(); function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { uint256 balance = address(this).balance; if (balance < amount){ revert InsufficientBalance(balance, amount); } // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); if (!(success)){ revert SendingValueFail(); } } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { uint256 balance = address(this).balance; if (balance < value){ revert InsufficientBalanceForCall(balance, value); } return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { if (!(isContract(target))){ revert NonContractCall(); } // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: weiValue}(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to * 0 before setting it to a non-zero value. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } } contract AdminAuth is AuthHelper { using SafeERC20 for IERC20; AdminVault public constant adminVault = AdminVault(ADMIN_VAULT_ADDR); error SenderNotOwner(); error SenderNotAdmin(); modifier onlyOwner() { if (adminVault.owner() != msg.sender){ revert SenderNotOwner(); } _; } modifier onlyAdmin() { if (adminVault.admin() != msg.sender){ revert SenderNotAdmin(); } _; } /// @notice withdraw stuck funds function withdrawStuckFunds(address _token, address _receiver, uint256 _amount) public onlyOwner { if (_token == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) { payable(_receiver).transfer(_amount); } else { IERC20(_token).safeTransfer(_receiver, _amount); } } /// @notice Destroy the contract /// @dev Deprecated method, selfdestruct will soon just send eth function kill() public onlyAdmin { selfdestruct(payable(msg.sender)); } } contract Discount is AdminAuth{ mapping(address => bool) public serviceFeesDisabled; function reenableServiceFee(address _wallet) public onlyOwner{ serviceFeesDisabled[_wallet] = false; } function disableServiceFee(address _wallet) public onlyOwner{ serviceFeesDisabled[_wallet] = true; } } abstract contract IWETH { function allowance(address, address) public virtual view returns (uint256); function balanceOf(address) public virtual view returns (uint256); function approve(address, uint256) public virtual; function transfer(address, uint256) public virtual returns (bool); function transferFrom( address, address, uint256 ) public virtual returns (bool); function deposit() public payable virtual; function withdraw(uint256) public virtual; } library TokenUtils { using SafeERC20 for IERC20; address public constant WETH_ADDR = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant ETH_ADDR = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev Only approves the amount if allowance is lower than amount, does not decrease allowance function approveToken( address _tokenAddr, address _to, uint256 _amount ) internal { if (_tokenAddr == ETH_ADDR) return; if (IERC20(_tokenAddr).allowance(address(this), _to) < _amount) { IERC20(_tokenAddr).safeApprove(_to, _amount); } } function pullTokensIfNeeded( address _token, address _from, uint256 _amount ) internal returns (uint256) { // handle max uint amount if (_amount == type(uint256).max) { _amount = getBalance(_token, _from); } if (_from != address(0) && _from != address(this) && _token != ETH_ADDR && _amount != 0) { IERC20(_token).safeTransferFrom(_from, address(this), _amount); } return _amount; } function withdrawTokens( address _token, address _to, uint256 _amount ) internal returns (uint256) { if (_amount == type(uint256).max) { _amount = getBalance(_token, address(this)); } if (_to != address(0) && _to != address(this) && _amount != 0) { if (_token != ETH_ADDR) { IERC20(_token).safeTransfer(_to, _amount); } else { (bool success, ) = _to.call{value: _amount}(""); require(success, "Eth send fail"); } } return _amount; } function depositWeth(uint256 _amount) internal { IWETH(WETH_ADDR).deposit{value: _amount}(); } function withdrawWeth(uint256 _amount) internal { IWETH(WETH_ADDR).withdraw(_amount); } function getBalance(address _tokenAddr, address _acc) internal view returns (uint256) { if (_tokenAddr == ETH_ADDR) { return _acc.balance; } else { return IERC20(_tokenAddr).balanceOf(_acc); } } function getTokenDecimals(address _token) internal view returns (uint256) { if (_token == ETH_ADDR) return 18; return IERC20(_token).decimals(); } } contract DFSExchangeHelper { using TokenUtils for address; error InvalidOffchainData(); error OutOfRangeSlicingError(); //Order success but amount 0 error ZeroTokensSwapped(); using SafeERC20 for IERC20; function sendLeftover( address _srcAddr, address _destAddr, address payable _to ) internal { // clean out any eth leftover TokenUtils.ETH_ADDR.withdrawTokens(_to, type(uint256).max); _srcAddr.withdrawTokens(_to, type(uint256).max); _destAddr.withdrawTokens(_to, type(uint256).max); } function sliceUint(bytes memory bs, uint256 start) internal pure returns (uint256) { if (bs.length < start + 32){ revert OutOfRangeSlicingError(); } uint256 x; assembly { x := mload(add(bs, add(0x20, start))) } return x; } function writeUint256( bytes memory _b, uint256 _index, uint256 _input ) internal pure { if (_b.length < _index + 32) { revert InvalidOffchainData(); } bytes32 input = bytes32(_input); _index += 32; // Read the bytes32 from array memory assembly { mstore(add(_b, _index), input) } } } contract DFSExchangeData { struct OffchainData { address wrapper; // dfs wrapper address for the aggregator (must be in WrapperExchangeRegistry) address exchangeAddr; // exchange address we are calling to execute the order (must be in ExchangeAggregatorRegistry) address allowanceTarget; // exchange aggregator contract we give allowance to uint256 price; // expected price that the aggregator sent us uint256 protocolFee; // deprecated (used as a separate fee amount for 0x v1) bytes callData; // 0ff-chain calldata the aggregator gives to perform the swap } struct ExchangeData { address srcAddr; // source token address (which we're selling) address destAddr; // destination token address (which we're buying) uint256 srcAmount; // amount of source token in token decimals uint256 destAmount; // amount of bought token in token decimals uint256 minPrice; // minPrice we are expecting (checked in DFSExchangeCore) uint256 dfsFeeDivider; // service fee divider address user; // currently deprecated (used to check custom fees for the user) address wrapper; // on-chain wrapper address (must be in WrapperExchangeRegistry) bytes wrapperData; // on-chain additional data for on-chain (uniswap route for example) OffchainData offchainData; // offchain aggregator order } } abstract contract IOffchainWrapper is DFSExchangeData { function takeOrder( ExchangeData memory _exData ) virtual public payable returns (bool success, uint256); } contract OneInchWrapper is IOffchainWrapper, DFSExchangeHelper, AdminAuth { using TokenUtils for address; using SafeERC20 for IERC20; /// @notice offchainData.callData should be this struct encoded struct OneInchCalldata{ bytes realCalldata; uint256[] offsets; } /// @notice Takes order from 1inch and returns bool indicating if it is successful /// @param _exData Exchange data function takeOrder( ExchangeData memory _exData ) override public payable returns (bool success, uint256) { OneInchCalldata memory oneInchCalldata = abi.decode(_exData.offchainData.callData, (OneInchCalldata)); // write in the exact amount we are selling/buying in an order for (uint256 i; i < oneInchCalldata.offsets.length; i++){ writeUint256(oneInchCalldata.realCalldata, oneInchCalldata.offsets[i], _exData.srcAmount); } IERC20(_exData.srcAddr).safeApprove(_exData.offchainData.allowanceTarget, _exData.srcAmount); uint256 tokensBefore = _exData.destAddr.getBalance(address(this)); /// @dev the amount of tokens received is checked in DFSExchangeCore /// @dev Exchange wrapper contracts should not be used on their own (success, ) = _exData.offchainData.exchangeAddr.call(oneInchCalldata.realCalldata); uint256 tokensSwapped = 0; if (success) { // get the current balance of the swapped tokens tokensSwapped = _exData.destAddr.getBalance(address(this)) - tokensBefore; if (tokensSwapped == 0){ revert ZeroTokensSwapped(); } } // returns all funds from src addr, dest addr sendLeftover(_exData.srcAddr, _exData.destAddr, payable(msg.sender)); return (success, tokensSwapped); } // solhint-disable-next-line no-empty-blocks receive() external virtual payable {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"InvalidOffchainData","type":"error"},{"inputs":[],"name":"NonContractCall","type":"error"},{"inputs":[],"name":"OutOfRangeSlicingError","type":"error"},{"inputs":[],"name":"SenderNotAdmin","type":"error"},{"inputs":[],"name":"SenderNotOwner","type":"error"},{"inputs":[],"name":"ZeroTokensSwapped","type":"error"},{"inputs":[],"name":"adminVault","outputs":[{"internalType":"contract AdminVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"srcAddr","type":"address"},{"internalType":"address","name":"destAddr","type":"address"},{"internalType":"uint256","name":"srcAmount","type":"uint256"},{"internalType":"uint256","name":"destAmount","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"},{"internalType":"uint256","name":"dfsFeeDivider","type":"uint256"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"wrapper","type":"address"},{"internalType":"bytes","name":"wrapperData","type":"bytes"},{"components":[{"internalType":"address","name":"wrapper","type":"address"},{"internalType":"address","name":"exchangeAddr","type":"address"},{"internalType":"address","name":"allowanceTarget","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"protocolFee","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct DFSExchangeData.OffchainData","name":"offchainData","type":"tuple"}],"internalType":"struct DFSExchangeData.ExchangeData","name":"_exData","type":"tuple"}],"name":"takeOrder","outputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawStuckFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b5061115f806100206000396000f3fe6080604052600436106100435760003560e01c806316d2a88c1461004f57806341c0e1b51461007e5780638cedca7114610095578063c579d490146100d557600080fd5b3661004a57005b600080fd5b61006261005d366004610d4a565b6100f5565b6040805192151583526020830191909152015b60405180910390f35b34801561008a57600080fd5b506100936102a7565b005b3480156100a157600080fd5b506100bd73ccf3d848e08b94478ed8f46ffead3008faf581fd81565b6040516001600160a01b039091168152602001610075565b3480156100e157600080fd5b506100936100f0366004610e4e565b61036a565b600080600083610120015160a001518060200190518101906101179190610f3b565b905060005b81602001515181101561016b5761015982600001518360200151838151811061014757610147611005565b602002602001015187604001516104a4565b8061016381611031565b91505061011c565b5061019b84610120015160400151856040015186600001516001600160a01b03166105019092919063ffffffff16565b60208401516000906101b6906001600160a01b031630610605565b9050846101200151602001516001600160a01b031682600001516040516101dd919061104c565b6000604051808303816000865af19150503d806000811461021a576040519150601f19603f3d011682016040523d82523d6000602084013e61021f565b606091505b5050809450506000841561028a5760208601518290610247906001600160a01b031630610605565b6102519190611068565b90508061028a576040517f6a756fbe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61029d86600001518760200151336106c9565b9395939450505050565b336001600160a01b031673ccf3d848e08b94478ed8f46ffead3008faf581fd6001600160a01b031663f851a4406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610303573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610327919061107f565b6001600160a01b031614610367576040517fa6c827a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33ff5b336001600160a01b031673ccf3d848e08b94478ed8f46ffead3008faf581fd6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ea919061107f565b6001600160a01b03161461042a576040517f19494c8a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b038416141561048b576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610485573d6000803e3d6000fd5b50505050565b61049f6001600160a01b0384168383610718565b505050565b6104af8260206110a3565b835110156104e9576040517ff340347200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806104f56020846110a3565b93909301929092525050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b1790526105678482610761565b610485576040516001600160a01b0384166024820152600060448201526105fb90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610809565b6104858482610809565b60006001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561063d57506001600160a01b038116316106c3565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa15801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c091906110bb565b90505b92915050565b6106ea73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee826000196108f6565b506107016001600160a01b038416826000196108f6565b506104856001600160a01b038316826000196108f6565b6040516001600160a01b03831660248201526044810182905261049f9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610597565b6000806000846001600160a01b03168460405161077e919061104c565b6000604051808303816000865af19150503d80600081146107bb576040519150601f19603f3d011682016040523d82523d6000602084013e6107c0565b606091505b50915091508180156107ea5750805115806107ea5750808060200190518101906107ea91906110d4565b801561080057506000856001600160a01b03163b115b95945050505050565b600061085e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a299092919063ffffffff16565b905080516000148061087f57508080602001905181019061087f91906110d4565b61049f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600060001982141561090f5761090c8430610605565b91505b6001600160a01b0383161580159061093057506001600160a01b0383163014155b801561093b57508115155b15610a22576001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461097d576109786001600160a01b0385168484610718565b610a22565b6000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146109ca576040519150601f19603f3d011682016040523d82523d6000602084013e6109cf565b606091505b5050905080610a205760405162461bcd60e51b815260206004820152600d60248201527f4574682073656e64206661696c0000000000000000000000000000000000000060448201526064016108ed565b505b5092915050565b6060610a388484600085610a40565b949350505050565b6060610a4b85610b1d565b610a81576040517f304619b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080866001600160a01b03168587604051610a9d919061104c565b60006040518083038185875af1925050503d8060008114610ada576040519150601f19603f3d011682016040523d82523d6000602084013e610adf565b606091505b50915091508115610af3579150610a389050565b805115610b035780518082602001fd5b8360405162461bcd60e51b81526004016108ed91906110f6565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610a38575050151592915050565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715610b9057610b90610b56565b60405290565b6040805190810167ffffffffffffffff81118282101715610b9057610b90610b56565b604051601f8201601f1916810167ffffffffffffffff81118282101715610be257610be2610b56565b604052919050565b6001600160a01b0381168114610bff57600080fd5b50565b8035610c0d81610bea565b919050565b600067ffffffffffffffff821115610c2c57610c2c610b56565b50601f01601f191660200190565b600082601f830112610c4b57600080fd5b8135610c5e610c5982610c12565b610bb9565b818152846020838601011115610c7357600080fd5b816020850160208301376000918101602001919091529392505050565b600060c08284031215610ca257600080fd5b60405160c0810167ffffffffffffffff8282108183111715610cc657610cc6610b56565b8160405282935084359150610cda82610bea565b908252602084013590610cec82610bea565b81602084015260408501359150610d0282610bea565b816040840152606085013560608401526080850135608084015260a0850135915080821115610d3057600080fd5b50610d3d85828601610c3a565b60a0830152505092915050565b600060208284031215610d5c57600080fd5b813567ffffffffffffffff80821115610d7457600080fd5b908301906101408286031215610d8957600080fd5b610d91610b6c565b610d9a83610c02565b8152610da860208401610c02565b602082015260408301356040820152606083013560608201526080830135608082015260a083013560a0820152610de160c08401610c02565b60c0820152610df260e08401610c02565b60e08201526101008084013583811115610e0b57600080fd5b610e1788828701610c3a565b8284015250506101208084013583811115610e3157600080fd5b610e3d88828701610c90565b918301919091525095945050505050565b600080600060608486031215610e6357600080fd5b8335610e6e81610bea565b92506020840135610e7e81610bea565b929592945050506040919091013590565b60005b83811015610eaa578181015183820152602001610e92565b838111156104855750506000910152565b600082601f830112610ecc57600080fd5b8151602067ffffffffffffffff821115610ee857610ee8610b56565b8160051b610ef7828201610bb9565b9283528481018201928281019087851115610f1157600080fd5b83870192505b84831015610f3057825182529183019190830190610f17565b979650505050505050565b60006020808385031215610f4e57600080fd5b825167ffffffffffffffff80821115610f6657600080fd5b9084019060408287031215610f7a57600080fd5b610f82610b96565b825182811115610f9157600080fd5b8301601f81018813610fa257600080fd5b8051610fb0610c5982610c12565b8181528987838501011115610fc457600080fd5b610fd382888301898601610e8f565b835250508284015182811115610fe857600080fd5b610ff488828601610ebb565b948201949094529695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156110455761104561101b565b5060010190565b6000825161105e818460208701610e8f565b9190910192915050565b60008282101561107a5761107a61101b565b500390565b60006020828403121561109157600080fd5b815161109c81610bea565b9392505050565b600082198211156110b6576110b661101b565b500190565b6000602082840312156110cd57600080fd5b5051919050565b6000602082840312156110e657600080fd5b8151801515811461109c57600080fd5b6020815260008251806020840152611115816040850160208701610e8f565b601f01601f1916919091016040019291505056fea264697066735822122039c69fa95be65cedad8a4b4dbe9c64eec31b83f163b7213ee16f64c0992e498764736f6c634300080a0033
Deployed Bytecode
0x6080604052600436106100435760003560e01c806316d2a88c1461004f57806341c0e1b51461007e5780638cedca7114610095578063c579d490146100d557600080fd5b3661004a57005b600080fd5b61006261005d366004610d4a565b6100f5565b6040805192151583526020830191909152015b60405180910390f35b34801561008a57600080fd5b506100936102a7565b005b3480156100a157600080fd5b506100bd73ccf3d848e08b94478ed8f46ffead3008faf581fd81565b6040516001600160a01b039091168152602001610075565b3480156100e157600080fd5b506100936100f0366004610e4e565b61036a565b600080600083610120015160a001518060200190518101906101179190610f3b565b905060005b81602001515181101561016b5761015982600001518360200151838151811061014757610147611005565b602002602001015187604001516104a4565b8061016381611031565b91505061011c565b5061019b84610120015160400151856040015186600001516001600160a01b03166105019092919063ffffffff16565b60208401516000906101b6906001600160a01b031630610605565b9050846101200151602001516001600160a01b031682600001516040516101dd919061104c565b6000604051808303816000865af19150503d806000811461021a576040519150601f19603f3d011682016040523d82523d6000602084013e61021f565b606091505b5050809450506000841561028a5760208601518290610247906001600160a01b031630610605565b6102519190611068565b90508061028a576040517f6a756fbe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61029d86600001518760200151336106c9565b9395939450505050565b336001600160a01b031673ccf3d848e08b94478ed8f46ffead3008faf581fd6001600160a01b031663f851a4406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610303573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610327919061107f565b6001600160a01b031614610367576040517fa6c827a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33ff5b336001600160a01b031673ccf3d848e08b94478ed8f46ffead3008faf581fd6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ea919061107f565b6001600160a01b03161461042a576040517f19494c8a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b038416141561048b576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610485573d6000803e3d6000fd5b50505050565b61049f6001600160a01b0384168383610718565b505050565b6104af8260206110a3565b835110156104e9576040517ff340347200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806104f56020846110a3565b93909301929092525050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663095ea7b360e01b1790526105678482610761565b610485576040516001600160a01b0384166024820152600060448201526105fb90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610809565b6104858482610809565b60006001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561063d57506001600160a01b038116316106c3565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa15801561069c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c091906110bb565b90505b92915050565b6106ea73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee826000196108f6565b506107016001600160a01b038416826000196108f6565b506104856001600160a01b038316826000196108f6565b6040516001600160a01b03831660248201526044810182905261049f9084907fa9059cbb0000000000000000000000000000000000000000000000000000000090606401610597565b6000806000846001600160a01b03168460405161077e919061104c565b6000604051808303816000865af19150503d80600081146107bb576040519150601f19603f3d011682016040523d82523d6000602084013e6107c0565b606091505b50915091508180156107ea5750805115806107ea5750808060200190518101906107ea91906110d4565b801561080057506000856001600160a01b03163b115b95945050505050565b600061085e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a299092919063ffffffff16565b905080516000148061087f57508080602001905181019061087f91906110d4565b61049f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600060001982141561090f5761090c8430610605565b91505b6001600160a01b0383161580159061093057506001600160a01b0383163014155b801561093b57508115155b15610a22576001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1461097d576109786001600160a01b0385168484610718565b610a22565b6000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146109ca576040519150601f19603f3d011682016040523d82523d6000602084013e6109cf565b606091505b5050905080610a205760405162461bcd60e51b815260206004820152600d60248201527f4574682073656e64206661696c0000000000000000000000000000000000000060448201526064016108ed565b505b5092915050565b6060610a388484600085610a40565b949350505050565b6060610a4b85610b1d565b610a81576040517f304619b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080866001600160a01b03168587604051610a9d919061104c565b60006040518083038185875af1925050503d8060008114610ada576040519150601f19603f3d011682016040523d82523d6000602084013e610adf565b606091505b50915091508115610af3579150610a389050565b805115610b035780518082602001fd5b8360405162461bcd60e51b81526004016108ed91906110f6565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610a38575050151592915050565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715610b9057610b90610b56565b60405290565b6040805190810167ffffffffffffffff81118282101715610b9057610b90610b56565b604051601f8201601f1916810167ffffffffffffffff81118282101715610be257610be2610b56565b604052919050565b6001600160a01b0381168114610bff57600080fd5b50565b8035610c0d81610bea565b919050565b600067ffffffffffffffff821115610c2c57610c2c610b56565b50601f01601f191660200190565b600082601f830112610c4b57600080fd5b8135610c5e610c5982610c12565b610bb9565b818152846020838601011115610c7357600080fd5b816020850160208301376000918101602001919091529392505050565b600060c08284031215610ca257600080fd5b60405160c0810167ffffffffffffffff8282108183111715610cc657610cc6610b56565b8160405282935084359150610cda82610bea565b908252602084013590610cec82610bea565b81602084015260408501359150610d0282610bea565b816040840152606085013560608401526080850135608084015260a0850135915080821115610d3057600080fd5b50610d3d85828601610c3a565b60a0830152505092915050565b600060208284031215610d5c57600080fd5b813567ffffffffffffffff80821115610d7457600080fd5b908301906101408286031215610d8957600080fd5b610d91610b6c565b610d9a83610c02565b8152610da860208401610c02565b602082015260408301356040820152606083013560608201526080830135608082015260a083013560a0820152610de160c08401610c02565b60c0820152610df260e08401610c02565b60e08201526101008084013583811115610e0b57600080fd5b610e1788828701610c3a565b8284015250506101208084013583811115610e3157600080fd5b610e3d88828701610c90565b918301919091525095945050505050565b600080600060608486031215610e6357600080fd5b8335610e6e81610bea565b92506020840135610e7e81610bea565b929592945050506040919091013590565b60005b83811015610eaa578181015183820152602001610e92565b838111156104855750506000910152565b600082601f830112610ecc57600080fd5b8151602067ffffffffffffffff821115610ee857610ee8610b56565b8160051b610ef7828201610bb9565b9283528481018201928281019087851115610f1157600080fd5b83870192505b84831015610f3057825182529183019190830190610f17565b979650505050505050565b60006020808385031215610f4e57600080fd5b825167ffffffffffffffff80821115610f6657600080fd5b9084019060408287031215610f7a57600080fd5b610f82610b96565b825182811115610f9157600080fd5b8301601f81018813610fa257600080fd5b8051610fb0610c5982610c12565b8181528987838501011115610fc457600080fd5b610fd382888301898601610e8f565b835250508284015182811115610fe857600080fd5b610ff488828601610ebb565b948201949094529695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156110455761104561101b565b5060010190565b6000825161105e818460208701610e8f565b9190910192915050565b60008282101561107a5761107a61101b565b500390565b60006020828403121561109157600080fd5b815161109c81610bea565b9392505050565b600082198211156110b6576110b661101b565b500190565b6000602082840312156110cd57600080fd5b5051919050565b6000602082840312156110e657600080fd5b8151801515811461109c57600080fd5b6020815260008251806020840152611115816040850160208701610e8f565b601f01601f1916919091016040019291505056fea264697066735822122039c69fa95be65cedad8a4b4dbe9c64eec31b83f163b7213ee16f64c0992e498764736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.