More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Buyback
Compiler Version
v0.5.11+commit.22be8592
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-03-25 */ /* * Origin Protocol * https://originprotocol.com * * Released under the MIT license * https://github.com/OriginProtocol/origin-dollar * * Copyright 2020 Origin Protocol, Inc * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ // File: contracts/governance/Governable.sol pragma solidity 0.5.11; /** * @title OUSD Governable Contract * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change * from owner to governor and renounce methods removed. Does not use * Context.sol like Ownable.sol does for simplification. * @author Origin Protocol Inc */ contract Governable { // Storage position of the owner and pendingOwner of the contract // keccak256("OUSD.governor"); bytes32 private constant governorPosition = 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a; // keccak256("OUSD.pending.governor"); bytes32 private constant pendingGovernorPosition = 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db; // keccak256("OUSD.reentry.status"); bytes32 private constant reentryStatusPosition = 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535; // See OpenZeppelin ReentrancyGuard implementation uint256 constant _NOT_ENTERED = 1; uint256 constant _ENTERED = 2; event PendingGovernorshipTransfer( address indexed previousGovernor, address indexed newGovernor ); event GovernorshipTransferred( address indexed previousGovernor, address indexed newGovernor ); /** * @dev Initializes the contract setting the deployer as the initial Governor. */ constructor() internal { _setGovernor(msg.sender); emit GovernorshipTransferred(address(0), _governor()); } /** * @dev Returns the address of the current Governor. */ function governor() public view returns (address) { return _governor(); } /** * @dev Returns the address of the current Governor. */ function _governor() internal view returns (address governorOut) { bytes32 position = governorPosition; assembly { governorOut := sload(position) } } /** * @dev Returns the address of the pending Governor. */ function _pendingGovernor() internal view returns (address pendingGovernor) { bytes32 position = pendingGovernorPosition; assembly { pendingGovernor := sload(position) } } /** * @dev Throws if called by any account other than the Governor. */ modifier onlyGovernor() { require(isGovernor(), "Caller is not the Governor"); _; } /** * @dev Returns true if the caller is the current Governor. */ function isGovernor() public view returns (bool) { return msg.sender == _governor(); } function _setGovernor(address newGovernor) internal { bytes32 position = governorPosition; assembly { sstore(position, newGovernor) } } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { bytes32 position = reentryStatusPosition; uint256 _reentry_status; assembly { _reentry_status := sload(position) } // On the first call to nonReentrant, _notEntered will be true require(_reentry_status != _ENTERED, "Reentrant call"); // Any calls to nonReentrant after this point will fail assembly { sstore(position, _ENTERED) } _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) assembly { sstore(position, _NOT_ENTERED) } } function _setPendingGovernor(address newGovernor) internal { bytes32 position = pendingGovernorPosition; assembly { sstore(position, newGovernor) } } /** * @dev Transfers Governance of the contract to a new account (`newGovernor`). * Can only be called by the current Governor. Must be claimed for this to complete * @param _newGovernor Address of the new Governor */ function transferGovernance(address _newGovernor) external onlyGovernor { _setPendingGovernor(_newGovernor); emit PendingGovernorshipTransfer(_governor(), _newGovernor); } /** * @dev Claim Governance of the contract to a new account (`newGovernor`). * Can only be called by the new Governor. */ function claimGovernance() external { require( msg.sender == _pendingGovernor(), "Only the pending Governor can complete the claim" ); _changeGovernor(msg.sender); } /** * @dev Change Governance of the contract to a new account (`newGovernor`). * @param _newGovernor Address of the new Governor */ function _changeGovernor(address _newGovernor) internal { require(_newGovernor != address(0), "New Governor is address(0)"); emit GovernorshipTransferred(_governor(), _newGovernor); _setGovernor(_newGovernor); } } // File: contracts/interfaces/uniswap/IUniswapV2Router02.sol pragma solidity 0.5.11; interface IUniswapV2Router { function WETH() external pure returns (address); function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol pragma solidity ^0.5.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see {ERC20Detailed}. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/math/SafeMath.sol pragma solidity ^0.5.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/utils/Address.sol pragma solidity ^0.5.5; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ 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); } /** * @dev Converts an `address` into `address payable`. Note that this is * simply a type cast: the actual underlying value is not changed. * * _Available since v2.4.0._ */ function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. * * _Available since v2.4.0._ */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } // File: @openzeppelin/contracts/token/ERC20/SafeERC20.sol pragma solidity ^0.5.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @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. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: contracts/buyback/Buyback.sol pragma solidity 0.5.11; contract Buyback is Governable { using SafeERC20 for IERC20; event UniswapUpdated(address _address); // Address of Uniswap address public uniswapAddr = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Address of OUSD Vault address constant public vaultAddr = 0xE75D77B1865Ae93c7eaa3040B038D7aA7BC02F70; // Swap from OUSD IERC20 constant ousd = IERC20(0x2A8e1E676Ec238d8A992307B495b45B3fEAa5e86); // Swap to OGN IERC20 constant ogn = IERC20(0x8207c1FfC5B6804F6024322CcF34F29c3541Ae26); // USDT for Uniswap path IERC20 constant usdt = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7); /** * @dev Verifies that the caller is the OUSD Vault. */ modifier onlyVault() { require(vaultAddr == msg.sender, "Caller is not the Vault"); _; } /** * @dev Set address of Uniswap for performing liquidation of strategy reward * tokens. Setting to 0x0 will pause swaps. * @param _address Address of Uniswap */ function setUniswapAddr(address _address) external onlyGovernor { uniswapAddr = _address; // Give Uniswap unlimited OUSD allowance ousd.safeApprove(uniswapAddr, 0); ousd.safeApprove(uniswapAddr, uint256(-1)); emit UniswapUpdated(_address); } /** * @dev Execute a swap of OGN for OUSD via Uniswap or Uniswap compatible * protocol (e.g. Sushiswap) **/ function swap() external onlyVault { if (uniswapAddr == address(0)) return; uint256 sourceAmount = ousd.balanceOf(address(this)); if (sourceAmount < 1000 * 1e18) return; // Uniswap redemption path address[] memory path = new address[](4); path[0] = address(ousd); path[1] = address(usdt); path[2] = IUniswapV2Router(uniswapAddr).WETH(); path[3] = address(ogn); IUniswapV2Router(uniswapAddr).swapExactTokensForTokens( sourceAmount, uint256(0), path, address(this), now ); } /** * @notice Owner function to withdraw a specific amount of a token */ function transferToken(address token, uint256 amount) external onlyGovernor nonReentrant { IERC20(token).safeTransfer(_governor(), amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"governor","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"uniswapAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setUniswapAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isGovernor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"vaultAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newGovernor","type":"address"}],"name":"transferGovernance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"UniswapUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"PendingGovernorshipTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"GovernorshipTransferred","type":"event"}]
Contract Creation Code
6080604052600080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d17905561003c336001600160e01b0361009216565b61004d6001600160e01b036100a416565b6001600160a01b031660006001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a36100b7565b600080516020610efc83398151915255565b600080516020610efc8339815191525490565b610e36806100c66000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638119c065116100665780638119c065146100fa578063aea173d514610102578063c7af335214610128578063d27567f214610144578063d38bfff41461014c57610093565b80630c340a24146100985780631072cbea146100bc578063128a8b05146100ea5780635d36b190146100f2575b600080fd5b6100a0610172565b604080516001600160a01b039092168252519081900360200190f35b6100e8600480360360408110156100d257600080fd5b506001600160a01b038135169060200135610181565b005b6100a0610270565b6100e861027f565b6100e86102e1565b6100e86004803603602081101561011857600080fd5b50356001600160a01b03166106dc565b6101306107e9565b604080519115158252519081900360200190f35b6100a061080c565b6100e86004803603602081101561016257600080fd5b50356001600160a01b0316610824565b600061017c6108cd565b905090565b6101896107e9565b6101d7576040805162461bcd60e51b815260206004820152601a60248201527921b0b63632b91034b9903737ba103a34329023b7bb32b93737b960311b604482015290519081900360640190fd5b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546002811415610241576040805162461bcd60e51b815260206004820152600e60248201526d1499595b9d1c985b9d0818d85b1b60921b604482015290519081900360640190fd5b600282556102676102506108cd565b6001600160a01b038616908563ffffffff6108f216565b50600190555050565b6000546001600160a01b031681565b610287610949565b6001600160a01b0316336001600160a01b0316146102d65760405162461bcd60e51b8152600401808060200182810382526030815260200180610dd26030913960400191505060405180910390fd5b6102df3361096e565b565b73e75d77b1865ae93c7eaa3040b038d7aa7bc02f703314610349576040805162461bcd60e51b815260206004820152601760248201527f43616c6c6572206973206e6f7420746865205661756c74000000000000000000604482015290519081900360640190fd5b6000546001600160a01b031661035e576102df565b604080516370a0823160e01b81523060048201529051600091732a8e1e676ec238d8a992307b495b45b3feaa5e86916370a0823191602480820192602092909190829003018186803b1580156103b357600080fd5b505afa1580156103c7573d6000803e3d6000fd5b505050506040513d60208110156103dd57600080fd5b50519050683635c9adc5dea000008110156103f857506102df565b60408051600480825260a0820190925260609160208201608080388339019050509050732a8e1e676ec238d8a992307b495b45b3feaa5e868160008151811061043d57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073dac17f958d2ee523a2206206994597c13d831ec78160018151811061047f57fe5b6001600160a01b03928316602091820292909201810191909152600054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156104d357600080fd5b505afa1580156104e7573d6000803e3d6000fd5b505050506040513d60208110156104fd57600080fd5b505181518290600290811061050e57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050738207c1ffc5b6804f6024322ccf34f29c3541ae268160038151811061055057fe5b6001600160a01b03928316602091820292909201810191909152600080546040516338ed173960e01b815260048101878152602482018490523060648301819052426084840181905260a060448501908152895160a4860152895195909816976338ed1739978b97968b969495939460c4019187810191028083838b5b838110156105e55781810151838201526020016105cd565b505050509050019650505050505050600060405180830381600087803b15801561060e57600080fd5b505af1158015610622573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561064b57600080fd5b810190808051604051939291908464010000000082111561066b57600080fd5b90830190602082018581111561068057600080fd5b825186602082028301116401000000008211171561069d57600080fd5b82525081516020918201928201910280838360005b838110156106ca5781810151838201526020016106b2565b50505050905001604052505050505050565b6106e46107e9565b610732576040805162461bcd60e51b815260206004820152601a60248201527921b0b63632b91034b9903737ba103a34329023b7bb32b93737b960311b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038381169190911780835561077692732a8e1e676ec238d8a992307b495b45b3feaa5e86929190911690610a1c565b6000546107aa90732a8e1e676ec238d8a992307b495b45b3feaa5e86906001600160a01b031660001963ffffffff610a1c16565b604080516001600160a01b038316815290517fca20db57f4368388dd6766259da48cd22a485cba21ee6ec8c519007cb66dfd039181900360200190a150565b60006107f36108cd565b6001600160a01b0316336001600160a01b031614905090565b73e75d77b1865ae93c7eaa3040b038d7aa7bc02f7081565b61082c6107e9565b61087a576040805162461bcd60e51b815260206004820152601a60248201527921b0b63632b91034b9903737ba103a34329023b7bb32b93737b960311b604482015290519081900360640190fd5b61088381610b2f565b806001600160a01b03166108956108cd565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b7f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a5490565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610944908490610b53565b505050565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db5490565b6001600160a01b0381166109c9576040805162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f722069732061646472657373283029000000000000604482015290519081900360640190fd5b806001600160a01b03166109db6108cd565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3610a1981610d11565b50565b801580610aa2575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610a7457600080fd5b505afa158015610a88573d6000803e3d6000fd5b505050506040513d6020811015610a9e57600080fd5b5051155b610add5760405162461bcd60e51b8152600401808060200182810382526036815260200180610d9c6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610944908490610b53565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b610b65826001600160a01b0316610d35565b610bb6576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610bf45780518252601f199092019160209182019101610bd5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610c56576040519150601f19603f3d011682016040523d82523d6000602084013e610c5b565b606091505b509150915081610cb2576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610d0b57808060200190516020811015610cce57600080fd5b5051610d0b5760405162461bcd60e51b815260040180806020018281038252602a815260200180610d72602a913960400191505060405180910390fd5b50505050565b7f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610d6957508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e63654f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f6d706c6574652074686520636c61696da265627a7a7231582061d39987b8ceb84ad65ba3fbab46e239c29473a490e71cd6afb189eb9d46dbda64736f6c634300050b00327bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638119c065116100665780638119c065146100fa578063aea173d514610102578063c7af335214610128578063d27567f214610144578063d38bfff41461014c57610093565b80630c340a24146100985780631072cbea146100bc578063128a8b05146100ea5780635d36b190146100f2575b600080fd5b6100a0610172565b604080516001600160a01b039092168252519081900360200190f35b6100e8600480360360408110156100d257600080fd5b506001600160a01b038135169060200135610181565b005b6100a0610270565b6100e861027f565b6100e86102e1565b6100e86004803603602081101561011857600080fd5b50356001600160a01b03166106dc565b6101306107e9565b604080519115158252519081900360200190f35b6100a061080c565b6100e86004803603602081101561016257600080fd5b50356001600160a01b0316610824565b600061017c6108cd565b905090565b6101896107e9565b6101d7576040805162461bcd60e51b815260206004820152601a60248201527921b0b63632b91034b9903737ba103a34329023b7bb32b93737b960311b604482015290519081900360640190fd5b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546002811415610241576040805162461bcd60e51b815260206004820152600e60248201526d1499595b9d1c985b9d0818d85b1b60921b604482015290519081900360640190fd5b600282556102676102506108cd565b6001600160a01b038616908563ffffffff6108f216565b50600190555050565b6000546001600160a01b031681565b610287610949565b6001600160a01b0316336001600160a01b0316146102d65760405162461bcd60e51b8152600401808060200182810382526030815260200180610dd26030913960400191505060405180910390fd5b6102df3361096e565b565b73e75d77b1865ae93c7eaa3040b038d7aa7bc02f703314610349576040805162461bcd60e51b815260206004820152601760248201527f43616c6c6572206973206e6f7420746865205661756c74000000000000000000604482015290519081900360640190fd5b6000546001600160a01b031661035e576102df565b604080516370a0823160e01b81523060048201529051600091732a8e1e676ec238d8a992307b495b45b3feaa5e86916370a0823191602480820192602092909190829003018186803b1580156103b357600080fd5b505afa1580156103c7573d6000803e3d6000fd5b505050506040513d60208110156103dd57600080fd5b50519050683635c9adc5dea000008110156103f857506102df565b60408051600480825260a0820190925260609160208201608080388339019050509050732a8e1e676ec238d8a992307b495b45b3feaa5e868160008151811061043d57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505073dac17f958d2ee523a2206206994597c13d831ec78160018151811061047f57fe5b6001600160a01b03928316602091820292909201810191909152600054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156104d357600080fd5b505afa1580156104e7573d6000803e3d6000fd5b505050506040513d60208110156104fd57600080fd5b505181518290600290811061050e57fe5b60200260200101906001600160a01b031690816001600160a01b031681525050738207c1ffc5b6804f6024322ccf34f29c3541ae268160038151811061055057fe5b6001600160a01b03928316602091820292909201810191909152600080546040516338ed173960e01b815260048101878152602482018490523060648301819052426084840181905260a060448501908152895160a4860152895195909816976338ed1739978b97968b969495939460c4019187810191028083838b5b838110156105e55781810151838201526020016105cd565b505050509050019650505050505050600060405180830381600087803b15801561060e57600080fd5b505af1158015610622573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561064b57600080fd5b810190808051604051939291908464010000000082111561066b57600080fd5b90830190602082018581111561068057600080fd5b825186602082028301116401000000008211171561069d57600080fd5b82525081516020918201928201910280838360005b838110156106ca5781810151838201526020016106b2565b50505050905001604052505050505050565b6106e46107e9565b610732576040805162461bcd60e51b815260206004820152601a60248201527921b0b63632b91034b9903737ba103a34329023b7bb32b93737b960311b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038381169190911780835561077692732a8e1e676ec238d8a992307b495b45b3feaa5e86929190911690610a1c565b6000546107aa90732a8e1e676ec238d8a992307b495b45b3feaa5e86906001600160a01b031660001963ffffffff610a1c16565b604080516001600160a01b038316815290517fca20db57f4368388dd6766259da48cd22a485cba21ee6ec8c519007cb66dfd039181900360200190a150565b60006107f36108cd565b6001600160a01b0316336001600160a01b031614905090565b73e75d77b1865ae93c7eaa3040b038d7aa7bc02f7081565b61082c6107e9565b61087a576040805162461bcd60e51b815260206004820152601a60248201527921b0b63632b91034b9903737ba103a34329023b7bb32b93737b960311b604482015290519081900360640190fd5b61088381610b2f565b806001600160a01b03166108956108cd565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b7f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a5490565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610944908490610b53565b505050565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db5490565b6001600160a01b0381166109c9576040805162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f722069732061646472657373283029000000000000604482015290519081900360640190fd5b806001600160a01b03166109db6108cd565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3610a1981610d11565b50565b801580610aa2575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015610a7457600080fd5b505afa158015610a88573d6000803e3d6000fd5b505050506040513d6020811015610a9e57600080fd5b5051155b610add5760405162461bcd60e51b8152600401808060200182810382526036815260200180610d9c6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610944908490610b53565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b610b65826001600160a01b0316610d35565b610bb6576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310610bf45780518252601f199092019160209182019101610bd5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610c56576040519150601f19603f3d011682016040523d82523d6000602084013e610c5b565b606091505b509150915081610cb2576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610d0b57808060200190516020811015610cce57600080fd5b5051610d0b5760405162461bcd60e51b815260040180806020018281038252602a815260200180610d72602a913960400191505060405180910390fd5b50505050565b7f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610d6957508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e63654f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f6d706c6574652074686520636c61696da265627a7a7231582061d39987b8ceb84ad65ba3fbab46e239c29473a490e71cd6afb189eb9d46dbda64736f6c634300050b0032
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.