Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 1,554 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Exercise | 21115193 | 6 hrs ago | IN | 0 ETH | 0.00067661 | ||||
Exercise | 21114999 | 6 hrs ago | IN | 0 ETH | 0.00084759 | ||||
Exercise | 21114979 | 7 hrs ago | IN | 0 ETH | 0.00077543 | ||||
Transfer | 21114949 | 7 hrs ago | IN | 0 ETH | 0.0002564 | ||||
Exercise | 21113208 | 12 hrs ago | IN | 0 ETH | 0.00052097 | ||||
Exercise | 21110781 | 21 hrs ago | IN | 0 ETH | 0.00026362 | ||||
Transfer | 21110778 | 21 hrs ago | IN | 0 ETH | 0.00007203 | ||||
Exercise | 21102665 | 2 days ago | IN | 0 ETH | 0.00048078 | ||||
Exercise | 21102480 | 2 days ago | IN | 0 ETH | 0.00045633 | ||||
Exercise | 21097116 | 2 days ago | IN | 0 ETH | 0.00043929 | ||||
Exercise | 21096452 | 2 days ago | IN | 0 ETH | 0.00050002 | ||||
Transfer | 21089745 | 3 days ago | IN | 0 ETH | 0.00052476 | ||||
Exercise | 21089617 | 3 days ago | IN | 0 ETH | 0.00054418 | ||||
Exercise | 21087632 | 4 days ago | IN | 0 ETH | 0.00115725 | ||||
Exercise | 21083248 | 4 days ago | IN | 0 ETH | 0.00076757 | ||||
Exercise | 21074613 | 5 days ago | IN | 0 ETH | 0.00078483 | ||||
Exercise | 21062783 | 7 days ago | IN | 0 ETH | 0.00079096 | ||||
Exercise | 21061724 | 7 days ago | IN | 0 ETH | 0.00056113 | ||||
Exercise | 21058588 | 8 days ago | IN | 0 ETH | 0.00070047 | ||||
Exercise | 21055709 | 8 days ago | IN | 0 ETH | 0.000549 | ||||
Exercise | 21052907 | 8 days ago | IN | 0 ETH | 0.00040489 | ||||
Exercise | 21047396 | 9 days ago | IN | 0 ETH | 0.00057202 | ||||
Exercise | 21046625 | 9 days ago | IN | 0 ETH | 0.00042141 | ||||
Exercise | 21044176 | 10 days ago | IN | 0 ETH | 0.0012145 | ||||
Exercise | 21042863 | 10 days ago | IN | 0 ETH | 0.00079952 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16345202 | 668 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
OptionsToken
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.13; import {Owned} from "solmate/auth/Owned.sol"; import {ERC20} from "solmate/tokens/ERC20.sol"; import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; import {FixedPointMathLib} from "solmate/utils/FixedPointMathLib.sol"; import {IOracle} from "./interfaces/IOracle.sol"; import {IERC20Mintable} from "./interfaces/IERC20Mintable.sol"; /// @title Options Token /// @author zefram.eth /// @notice Options token representing the right to purchase the underlying token /// at an oracle-specified rate. Similar to call options but with a variable strike /// price that's always at a certain discount to the market price. /// @dev Assumes the underlying token and the payment token both use 18 decimals. contract OptionsToken is ERC20, Owned, IERC20Mintable { /// ----------------------------------------------------------------------- /// Library usage /// ----------------------------------------------------------------------- using SafeTransferLib for ERC20; using FixedPointMathLib for uint256; /// ----------------------------------------------------------------------- /// Errors /// ----------------------------------------------------------------------- error OptionsToken__PastDeadline(); error OptionsToken__NotTokenAdmin(); error OptionsToken__SlippageTooHigh(); /// ----------------------------------------------------------------------- /// Events /// ----------------------------------------------------------------------- event Exercise(address indexed sender, address indexed recipient, uint256 amount, uint256 paymentAmount); event SetOracle(IOracle indexed newOracle); event SetTreasury(address indexed newTreasury); /// ----------------------------------------------------------------------- /// Immutable parameters /// ----------------------------------------------------------------------- /// @notice The contract that has the right to mint options tokens address public immutable tokenAdmin; /// @notice The token paid by the options token holder during redemption ERC20 public immutable paymentToken; /// @notice The underlying token purchased during redemption IERC20Mintable public immutable underlyingToken; /// ----------------------------------------------------------------------- /// Storage variables /// ----------------------------------------------------------------------- /// @notice The oracle contract that provides the current price to purchase /// the underlying token while exercising options (the strike price) IOracle public oracle; /// @notice The treasury address which receives tokens paid during redemption address public treasury; /// ----------------------------------------------------------------------- /// Constructor /// ----------------------------------------------------------------------- constructor( string memory name_, string memory symbol_, address owner_, address tokenAdmin_, ERC20 paymentToken_, IERC20Mintable underlyingToken_, IOracle oracle_, address treasury_ ) ERC20(name_, symbol_, 18) Owned(owner_) { tokenAdmin = tokenAdmin_; paymentToken = paymentToken_; underlyingToken = underlyingToken_; oracle = oracle_; treasury = treasury_; emit SetOracle(oracle_); emit SetTreasury(treasury_); } /// ----------------------------------------------------------------------- /// External functions /// ----------------------------------------------------------------------- /// @notice Called by the token admin to mint options tokens /// @param to The address that will receive the minted options tokens /// @param amount The amount of options tokens that will be minted function mint(address to, uint256 amount) external virtual override { /// ----------------------------------------------------------------------- /// Verification /// ----------------------------------------------------------------------- if (msg.sender != tokenAdmin) revert OptionsToken__NotTokenAdmin(); /// ----------------------------------------------------------------------- /// State updates /// ----------------------------------------------------------------------- // skip if amount is zero if (amount == 0) return; // mint options tokens _mint(to, amount); } /// @notice Exercises options tokens to purchase the underlying tokens. /// @dev The options tokens are not burnt but sent to address(0) to avoid messing up the /// inflation schedule. /// The oracle may revert if it cannot give a secure result. /// @param amount The amount of options tokens to exercise /// @param maxPaymentAmount The maximum acceptable amount to pay. Used for slippage protection. /// @param recipient The recipient of the purchased underlying tokens /// @return paymentAmount The amount paid to the treasury to purchase the underlying tokens function exercise(uint256 amount, uint256 maxPaymentAmount, address recipient) external virtual returns (uint256 paymentAmount) { return _exercise(amount, maxPaymentAmount, recipient); } /// @notice Exercises options tokens to purchase the underlying tokens. /// @dev The options tokens are not burnt but sent to address(0) to avoid messing up the /// inflation schedule. /// The oracle may revert if it cannot give a secure result. /// @param amount The amount of options tokens to exercise /// @param maxPaymentAmount The maximum acceptable amount to pay. Used for slippage protection. /// @param recipient The recipient of the purchased underlying tokens /// @param deadline The Unix timestamp (in seconds) after which the call will revert /// @return paymentAmount The amount paid to the treasury to purchase the underlying tokens function exercise(uint256 amount, uint256 maxPaymentAmount, address recipient, uint256 deadline) external virtual returns (uint256 paymentAmount) { if (block.timestamp > deadline) revert OptionsToken__PastDeadline(); return _exercise(amount, maxPaymentAmount, recipient); } /// ----------------------------------------------------------------------- /// Owner functions /// ----------------------------------------------------------------------- /// @notice Sets the oracle contract. Only callable by the owner. /// @param oracle_ The new oracle contract function setOracle(IOracle oracle_) external onlyOwner { oracle = oracle_; emit SetOracle(oracle_); } /// @notice Sets the treasury address. Only callable by the owner. /// @param treasury_ The new treasury address function setTreasury(address treasury_) external onlyOwner { treasury = treasury_; emit SetTreasury(treasury_); } /// ----------------------------------------------------------------------- /// Internal functions /// ----------------------------------------------------------------------- function _exercise(uint256 amount, uint256 maxPaymentAmount, address recipient) internal virtual returns (uint256 paymentAmount) { // skip if amount is zero if (amount == 0) return 0; // transfer options tokens from msg.sender to address(0) // we transfer instead of burn because TokenAdmin cares about totalSupply // which we don't want to change in order to follow the emission schedule transfer(address(0), amount); // transfer payment tokens from msg.sender to the treasury paymentAmount = amount.mulWadUp(oracle.getPrice()); if (paymentAmount > maxPaymentAmount) revert OptionsToken__SlippageTooHigh(); paymentToken.safeTransferFrom(msg.sender, treasury, paymentAmount); // mint underlying tokens to recipient underlyingToken.mint(recipient, amount); emit Exercise(msg.sender, recipient, amount, paymentAmount); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Simple single owner authorization mixin. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol) abstract contract Owned { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event OwnershipTransferred(address indexed user, address indexed newOwner); /*////////////////////////////////////////////////////////////// OWNERSHIP STORAGE //////////////////////////////////////////////////////////////*/ address public owner; modifier onlyOwner() virtual { require(msg.sender == owner, "UNAUTHORIZED"); _; } /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(address _owner) { owner = _owner; emit OwnershipTransferred(address(0), _owner); } /*////////////////////////////////////////////////////////////// OWNERSHIP LOGIC //////////////////////////////////////////////////////////////*/ function transferOwnership(address newOwner) public virtual onlyOwner { owner = newOwner; emit OwnershipTransferred(msg.sender, newOwner); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Arithmetic library with operations for fixed-point numbers. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol) /// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) library FixedPointMathLib { /*////////////////////////////////////////////////////////////// SIMPLIFIED FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ uint256 internal constant MAX_UINT256 = 2**256 - 1; uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. } function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. } function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. } function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. } /*////////////////////////////////////////////////////////////// LOW LEVEL FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ function mulDivDown( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { revert(0, 0) } // Divide x * y by the denominator. z := div(mul(x, y), denominator) } } function mulDivUp( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y)) if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) { revert(0, 0) } // If x * y modulo the denominator is strictly greater than 0, // 1 is added to round up the division of x * y by the denominator. z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator)) } } function rpow( uint256 x, uint256 n, uint256 scalar ) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { switch x case 0 { switch n case 0 { // 0 ** 0 = 1 z := scalar } default { // 0 ** n = 0 z := 0 } } default { switch mod(n, 2) case 0 { // If n is even, store scalar in z for now. z := scalar } default { // If n is odd, store x in z for now. z := x } // Shifting right by 1 is like dividing by 2. let half := shr(1, scalar) for { // Shift n right by 1 before looping to halve it. n := shr(1, n) } n { // Shift n right by 1 each iteration to halve it. n := shr(1, n) } { // Revert immediately if x ** 2 would overflow. // Equivalent to iszero(eq(div(xx, x), x)) here. if shr(128, x) { revert(0, 0) } // Store x squared. let xx := mul(x, x) // Round to the nearest number. let xxRound := add(xx, half) // Revert if xx + half overflowed. if lt(xxRound, xx) { revert(0, 0) } // Set x to scaled xxRound. x := div(xxRound, scalar) // If n is even: if mod(n, 2) { // Compute z * x. let zx := mul(z, x) // If z * x overflowed: if iszero(eq(div(zx, x), z)) { // Revert if x is non-zero. if iszero(iszero(x)) { revert(0, 0) } } // Round to the nearest number. let zxRound := add(zx, half) // Revert if zx + half overflowed. if lt(zxRound, zx) { revert(0, 0) } // Return properly scaled zxRound. z := div(zxRound, scalar) } } } } } /*////////////////////////////////////////////////////////////// GENERAL NUMBER UTILITIES //////////////////////////////////////////////////////////////*/ function sqrt(uint256 x) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { let y := x // We start y at x, which will help us make our initial estimate. z := 181 // The "correct" value is 1, but this saves a multiplication later. // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically. // We check y >= 2^(k + 8) but shift right by k bits // each branch to ensure that if x >= 256, then y >= 256. if iszero(lt(y, 0x10000000000000000000000000000000000)) { y := shr(128, y) z := shl(64, z) } if iszero(lt(y, 0x1000000000000000000)) { y := shr(64, y) z := shl(32, z) } if iszero(lt(y, 0x10000000000)) { y := shr(32, y) z := shl(16, z) } if iszero(lt(y, 0x1000000)) { y := shr(16, y) z := shl(8, z) } // Goal was to get z*z*y within a small factor of x. More iterations could // get y in a tighter range. Currently, we will have y in [256, 256*2^16). // We ensured y >= 256 so that the relative difference between y and y+1 is small. // That's not possible if x < 256 but we can just verify those cases exhaustively. // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256. // Correctness can be checked exhaustively for x < 256, so we assume y >= 256. // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps. // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256. // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18. // There is no overflow risk here since y < 2^136 after the first branch above. z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181. // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough. z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) // If x+1 is a perfect square, the Babylonian method cycles between // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor. // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case. // If you don't care whether the floor or ceil square root is returned, you can remove this statement. z := sub(z, lt(div(x, z), z)) } } function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Mod x by y. Note this will return // 0 instead of reverting if y is zero. z := mod(x, y) } } function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) { /// @solidity memory-safe-assembly assembly { // Divide x by y. Note this will return // 0 instead of reverting if y is zero. r := div(x, y) } } function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { // Add 1 to x * y if x % y > 0. Note this will // return 0 instead of reverting if y is zero. z := add(gt(mod(x, y), 0), div(x, y)) } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "../tokens/ERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; /// @solidity memory-safe-assembly assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument. mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "APPROVE_FAILED"); } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.0 <0.9.0; interface IERC20Mintable { function mint(address to, uint256 amount) external; }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.7.0 <0.9.0; /// @title Interface for an oracle of the options token's strike price /// @author zefram.eth /// @notice An oracle of the options token's strike price interface IOracle { /// @notice Computes the current strike price of the option /// @return price The strike price in terms of the payment token, scaled by 18 decimals. /// For example, if the payment token is $2 and the strike price is $4, the return value /// would be 2e18. function getPrice() external view returns (uint256 price); }
{ "remappings": [ "create3-factory/=lib/create3-factory/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 1000000 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"tokenAdmin_","type":"address"},{"internalType":"contract ERC20","name":"paymentToken_","type":"address"},{"internalType":"contract IERC20Mintable","name":"underlyingToken_","type":"address"},{"internalType":"contract IOracle","name":"oracle_","type":"address"},{"internalType":"address","name":"treasury_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OptionsToken__NotTokenAdmin","type":"error"},{"inputs":[],"name":"OptionsToken__PastDeadline","type":"error"},{"inputs":[],"name":"OptionsToken__SlippageTooHigh","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"name":"Exercise","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IOracle","name":"newOracle","type":"address"}],"name":"SetOracle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newTreasury","type":"address"}],"name":"SetTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxPaymentAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"exercise","outputs":[{"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxPaymentAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"exercise","outputs":[{"internalType":"uint256","name":"paymentAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentToken","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IOracle","name":"oracle_","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury_","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingToken","outputs":[{"internalType":"contract IERC20Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61014060409080825234620005705762001ed8803803809162000023828562000575565b8339810190610100918282820312620005705781516001600160401b0392908381116200057057826200005891830162000599565b602092838301519085821162000570576200007591840162000599565b916200008387820162000610565b96620000926060830162000610565b93608083015160018060a01b03928382168203620005705760a0850151978489168903620005705760c086015195858716809703620005705760e0620000d9910162000610565b938751978b89116200055a5760009880620000f58b5462000625565b92601f9384811162000509575b508590848311600114620004a1578c9262000495575b50508160011b916000199060031b1c19161789555b8151908c82116200048157819060019362000149855462000625565b8281116200042c575b5085918311600114620003c8578b92620003bc575b5050600019600383901b1c191690821b1781555b60126080524660a0528251885491818a620001968562000625565b92838352868301958782821691826000146200039c5750506001146200035c575b50620001c69250038262000575565b519020918051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019a828c10908c111762000348578a905251902060c052600680546001600160a01b03199081169b85169b8c179091559899979896977fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef39690867f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0818da360e05289526101209687528286600754161760075516809460085416176008557fd3b5d1e0ffaeff528910f3663f0adace7694ab8241d58e17a91351ced2e080318287a284a2611875928362000663843960805183610c39015260a0518361122e015260c05183611255015260e0518381816106a4015261141f015251828181610ca80152611618015251818181610d17015261164f0152f35b634e487b7160e01b88526041600452602488fd5b8691508c8052818d20908d915b85831062000383575050620001c6935082010138620001b7565b8054838801850152869450889390920191810162000369565b60ff19168852620001c695151560051b8501019250389150620001b79050565b01519050388062000167565b848c52858c208594509190601f1984168d5b88828210620004155750508411620003fb575b505050811b0181556200017b565b015160001960f88460031b161c19169055388080620003ed565b8385015186558897909501949384019301620003da565b90919250848c52858c208380860160051c82019288871062000477575b91869588929594930160051c01915b8281106200046857505062000152565b8e815586955087910162000458565b9250819262000449565b634e487b7160e01b8a52604160045260248afd5b01519050388062000118565b8c8052868d209250601f1984168d5b88828210620004f2575050908460019594939210620004d8575b505050811b0189556200012d565b015160001960f88460031b161c19169055388080620004ca565b6001859682939686015181550195019301620004b0565b9091508b8052858c208480850160051c82019288861062000550575b9085949392910160051c01905b81811062000541575062000102565b8d815584935060010162000532565b9250819262000525565b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176200055a57604052565b919080601f8401121562000570578251906001600160401b0382116200055a5760405191602091620005d5601f8301601f191684018562000575565b818452828287010111620005705760005b818110620005fc57508260009394955001015290565b8581018301518482018401528201620005e6565b51906001600160a01b03821682036200057057565b90600182811c9216801562000657575b60208310146200064157565b634e487b7160e01b600052602260045260246000fd5b91607f16916200063556fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde0314610f2d57508163095ea7b314610e9257816318160ddd14610e5557816323b872dd14610d3b5781632495a59914610ccc5781633013ce2914610c5d578163313ce56714610c015781633644e51514610bc657816340c10f1914610b7f57816361d027b314610b2c57816370a0823114610aca5781637adbf97314610a135781637dc0d1d0146109c05781637ecebe001461095e5781638da5cb5b1461090b57816395d89b41146107f0578163a1d50c3a14610775578163a9059cbb146106c8578163b7e1917c14610659578163d505accf14610361578163d6379b721461030c578163dd62ed3e1461029457508063f0f44260146101e35763f2fde38b1461012d57600080fd5b346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df577fffffffffffffffffffffffff00000000000000000000000000000000000000009061018661111a565b6006549073ffffffffffffffffffffffffffffffffffffffff906101ad8284163314611188565b1692839116176006555190337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08484a3f35b5080fd5b50346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5761021b61111a565b73ffffffffffffffffffffffffffffffffffffffff9061024082600654163314611188565b1690817fffffffffffffffffffffffff0000000000000000000000000000000000000000600854161760085551907fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef38383a2f35b90503461030857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103085760209282916102d161111a565b6102d9611142565b9173ffffffffffffffffffffffffffffffffffffffff8092168452865283832091168252845220549051908152f35b8280fd5b82843461035e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035e575061035760209261034c611165565b9060243590356114ce565b9051908152f35b80fd5b9050346103085760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103085761039a61111a565b6103a2611142565b604435606435936084359360ff8516809503610655574286106105f857866103c8611229565b9473ffffffffffffffffffffffffffffffffffffffff80931696878b5260209660058852838c20998a549a60018c019055858551948b8b8701977f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98952870152169a8b606086015288608086015260a085015260c084015260c0835260e0830167ffffffffffffffff94848210868311176105cc57818d52845190206101008501927f1901000000000000000000000000000000000000000000000000000000000000845261010286015261012285015260428152610160840194818610908611176105a057848c52519020835261018082015260a4356101a082015260c4356101c0909101528880528490899060809060015afa15610596578751168015158061058d575b156105315787528252848620848752825284862081905584519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a351f35b606482858951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b508481146104ee565b86513d89823e3d90fd5b60248d6041897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60248e60418a7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60648260208951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8780fd5b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101df57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209161070361111a565b8273ffffffffffffffffffffffffffffffffffffffff60243592338552600387528285206107328582546111ed565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b82843461035e5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035e57506107af611165565b60643542116107c9576103579060209360243590356114ce565b50517f94a5fd94000000000000000000000000000000000000000000000000000000008152fd5b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5780519082600180549161083283610ff1565b808652928281169081156108c55750600114610869575b50505061085b82610865940383611044565b51918291826110b4565b0390f35b94508085527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8286106108ad5750505061085b8260206108659582010194610849565b80546020878701810191909152909501948101610890565b61086597508693506020925061085b9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b82010194610849565b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b5050346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df578060209273ffffffffffffffffffffffffffffffffffffffff6109b061111a565b1681526005845220549051908152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209073ffffffffffffffffffffffffffffffffffffffff600754169051908152f35b9050346103085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030857359073ffffffffffffffffffffffffffffffffffffffff808316809303610ac657610a7490600654163314611188565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000600754161760075551907fd3b5d1e0ffaeff528910f3663f0adace7694ab8241d58e17a91351ced2e080318383a2f35b8380fd5b5050346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df578060209273ffffffffffffffffffffffffffffffffffffffff610b1c61111a565b1681526003845220549051908152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209073ffffffffffffffffffffffffffffffffffffffff600854169051908152f35b5050346101df57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df57610bc3610bba61111a565b60243590611406565b51f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df57602090610357611229565b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b82843461035e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035e57610d7461111a565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610d9d611142565b946044358573ffffffffffffffffffffffffffffffffffffffff80951694858752602098848a958652838920338a52865283892054857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e32575b50505086885260038552828820610e138582546111ed565b9055169586815260038452208181540190558551908152a35160018152f35b610e3b916111ed565b90888a528652838920338a528652838920558a8085610dfb565b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020906002549051908152f35b90503461030857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030857602092610ecd61111a565b9183602435928392338252875273ffffffffffffffffffffffffffffffffffffffff8282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b8490843461030857827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030857828054610f6a81610ff1565b808552916001918083169081156108c55750600114610f955750505061085b82610865940383611044565b80809650527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828610610fd95750505061085b8260206108659582010194610849565b80546020878701810191909152909501948101610fbc565b90600182811c9216801561103a575b602083101461100b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611000565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761108557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60208082528251818301819052939260005b858110611106575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8181018301518482016040015282016110c6565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361113d57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361113d57565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361113d57565b1561118f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152fd5b919082039182116111fa57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000467f00000000000000000000000000000000000000000000000000000000000000000361127757507f000000000000000000000000000000000000000000000000000000000000000090565b6040518154829161128782610ff1565b80825281602094858201946001908782821691826000146113ca575050600114611371575b506112b992500382611044565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff831117611344575060405251902090565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8583106113b25750506112b99350820101386112ac565b8054838801850152869450889390920191810161139b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001688526112b995151560051b85010192503891506112ac9050565b73ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000000000000000000000000000000000001633036114a457821561149f576002548381018091116111fa576000927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025516938484526003825260408420818154019055604051908152a3565b505050565b60046040517f7bbe6d0a000000000000000000000000000000000000000000000000000000008152fd5b9291909280156118375760003381526020600381526040908183206114f48582546111ed565b9055828052600381528183208481540190558282518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef833392a38073ffffffffffffffffffffffffffffffffffffffff80600754168451928380927f98d5fdca00000000000000000000000000000000000000000000000000000000825260049586915afa90811561182d578691611800575b50670de0b6b3a764000090807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0488118102158202156117fc5787029080820491061515019889116117d4578285606483600854168751907f23b872dd000000000000000000000000000000000000000000000000000000008252338783015260248201528c6044820152827f00000000000000000000000000000000000000000000000000000000000000005af13d15601f3d1160018851141617161561177857807f00000000000000000000000000000000000000000000000000000000000000001696873b156117745785929160448492875198899384927f40c10f19000000000000000000000000000000000000000000000000000000008452169b8c878401528b60248401525af1801561176a5790899392916116f9575b50507fb1c971764663d561c0ec2baf395a55f33f0a79fabb35bbad580247ba2959523d935082519485528401523392a3565b90919394925067ffffffffffffffff831161173e575050829187917fb1c971764663d561c0ec2baf395a55f33f0a79fabb35bbad580247ba2959523d945238806116c7565b9060416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b84513d84823e3d90fd5b8580fd5b509060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b5082517fd193bd20000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b90508381813d8311611826575b6118178183611044565b8101031261177457513861158a565b503d61180d565b85513d88823e3d90fd5b50600092505056fea2646970667358221220dfd0ddf544f0b1bbc4f2c33b50d63053ae43340fb51f9c5d77776648ebfc379a64736f6c63430008100033000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000009a8fee232dcf73060af348a1b62cdb0a19852d130000000000000000000000004cc39af0d46b0f66fd33778c6629a696bdc310a0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000fd0205066521550d7d7ab19da8f72bb004b4c3410000000000000000000000009d43ccb1ad7e0081cc8a8f1fd54d16e54a637e300000000000000000000000009a8fee232dcf73060af348a1b62cdb0a19852d1300000000000000000000000000000000000000000000000000000000000000154c49542043616c6c204f7074696f6e20546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000046f4c495400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde0314610f2d57508163095ea7b314610e9257816318160ddd14610e5557816323b872dd14610d3b5781632495a59914610ccc5781633013ce2914610c5d578163313ce56714610c015781633644e51514610bc657816340c10f1914610b7f57816361d027b314610b2c57816370a0823114610aca5781637adbf97314610a135781637dc0d1d0146109c05781637ecebe001461095e5781638da5cb5b1461090b57816395d89b41146107f0578163a1d50c3a14610775578163a9059cbb146106c8578163b7e1917c14610659578163d505accf14610361578163d6379b721461030c578163dd62ed3e1461029457508063f0f44260146101e35763f2fde38b1461012d57600080fd5b346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df577fffffffffffffffffffffffff00000000000000000000000000000000000000009061018661111a565b6006549073ffffffffffffffffffffffffffffffffffffffff906101ad8284163314611188565b1692839116176006555190337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08484a3f35b5080fd5b50346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5761021b61111a565b73ffffffffffffffffffffffffffffffffffffffff9061024082600654163314611188565b1690817fffffffffffffffffffffffff0000000000000000000000000000000000000000600854161760085551907fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef38383a2f35b90503461030857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103085760209282916102d161111a565b6102d9611142565b9173ffffffffffffffffffffffffffffffffffffffff8092168452865283832091168252845220549051908152f35b8280fd5b82843461035e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035e575061035760209261034c611165565b9060243590356114ce565b9051908152f35b80fd5b9050346103085760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103085761039a61111a565b6103a2611142565b604435606435936084359360ff8516809503610655574286106105f857866103c8611229565b9473ffffffffffffffffffffffffffffffffffffffff80931696878b5260209660058852838c20998a549a60018c019055858551948b8b8701977f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98952870152169a8b606086015288608086015260a085015260c084015260c0835260e0830167ffffffffffffffff94848210868311176105cc57818d52845190206101008501927f1901000000000000000000000000000000000000000000000000000000000000845261010286015261012285015260428152610160840194818610908611176105a057848c52519020835261018082015260a4356101a082015260c4356101c0909101528880528490899060809060015afa15610596578751168015158061058d575b156105315787528252848620848752825284862081905584519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a351f35b606482858951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b508481146104ee565b86513d89823e3d90fd5b60248d6041897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60248e60418a7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60648260208951917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8780fd5b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000004cc39af0d46b0f66fd33778c6629a696bdc310a0168152f35b5050346101df57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209161070361111a565b8273ffffffffffffffffffffffffffffffffffffffff60243592338552600387528285206107328582546111ed565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b82843461035e5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035e57506107af611165565b60643542116107c9576103579060209360243590356114ce565b50517f94a5fd94000000000000000000000000000000000000000000000000000000008152fd5b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5780519082600180549161083283610ff1565b808652928281169081156108c55750600114610869575b50505061085b82610865940383611044565b51918291826110b4565b0390f35b94508085527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8286106108ad5750505061085b8260206108659582010194610849565b80546020878701810191909152909501948101610890565b61086597508693506020925061085b9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b82010194610849565b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209073ffffffffffffffffffffffffffffffffffffffff600654169051908152f35b5050346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df578060209273ffffffffffffffffffffffffffffffffffffffff6109b061111a565b1681526005845220549051908152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209073ffffffffffffffffffffffffffffffffffffffff600754169051908152f35b9050346103085760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030857359073ffffffffffffffffffffffffffffffffffffffff808316809303610ac657610a7490600654163314611188565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000600754161760075551907fd3b5d1e0ffaeff528910f3663f0adace7694ab8241d58e17a91351ced2e080318383a2f35b8380fd5b5050346101df5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df578060209273ffffffffffffffffffffffffffffffffffffffff610b1c61111a565b1681526003845220549051908152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df5760209073ffffffffffffffffffffffffffffffffffffffff600854169051908152f35b5050346101df57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df57610bc3610bba61111a565b60243590611406565b51f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df57602090610357611229565b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905160ff7f0000000000000000000000000000000000000000000000000000000000000012168152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000fd0205066521550d7d7ab19da8f72bb004b4c341168152f35b82843461035e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261035e57610d7461111a565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610d9d611142565b946044358573ffffffffffffffffffffffffffffffffffffffff80951694858752602098848a958652838920338a52865283892054857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610e32575b50505086885260038552828820610e138582546111ed565b9055169586815260038452208181540190558551908152a35160018152f35b610e3b916111ed565b90888a528652838920338a528652838920558a8085610dfb565b5050346101df57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101df576020906002549051908152f35b90503461030857817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030857602092610ecd61111a565b9183602435928392338252875273ffffffffffffffffffffffffffffffffffffffff8282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b8490843461030857827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261030857828054610f6a81610ff1565b808552916001918083169081156108c55750600114610f955750505061085b82610865940383611044565b80809650527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b828610610fd95750505061085b8260206108659582010194610849565b80546020878701810191909152909501948101610fbc565b90600182811c9216801561103a575b602083101461100b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611000565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761108557604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60208082528251818301819052939260005b858110611106575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8181018301518482016040015282016110c6565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361113d57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361113d57565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361113d57565b1561118f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a454400000000000000000000000000000000000000006044820152fd5b919082039182116111fa57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000467f00000000000000000000000000000000000000000000000000000000000000010361127757507fe2b90f7b9acecfc6dbe05354342abfe0f55b6fcf04979dc2b015772ee9a1bcfc90565b6040518154829161128782610ff1565b80825281602094858201946001908782821691826000146113ca575050600114611371575b506112b992500382611044565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff831117611344575060405251902090565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8583106113b25750506112b99350820101386112ac565b8054838801850152869450889390920191810161139b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001688526112b995151560051b85010192503891506112ac9050565b73ffffffffffffffffffffffffffffffffffffffff90817f0000000000000000000000004cc39af0d46b0f66fd33778c6629a696bdc310a01633036114a457821561149f576002548381018091116111fa576000927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9260209260025516938484526003825260408420818154019055604051908152a3565b505050565b60046040517f7bbe6d0a000000000000000000000000000000000000000000000000000000008152fd5b9291909280156118375760003381526020600381526040908183206114f48582546111ed565b9055828052600381528183208481540190558282518581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef833392a38073ffffffffffffffffffffffffffffffffffffffff80600754168451928380927f98d5fdca00000000000000000000000000000000000000000000000000000000825260049586915afa90811561182d578691611800575b50670de0b6b3a764000090807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0488118102158202156117fc5787029080820491061515019889116117d4578285606483600854168751907f23b872dd000000000000000000000000000000000000000000000000000000008252338783015260248201528c6044820152827f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc25af13d15601f3d1160018851141617161561177857807f000000000000000000000000fd0205066521550d7d7ab19da8f72bb004b4c3411696873b156117745785929160448492875198899384927f40c10f19000000000000000000000000000000000000000000000000000000008452169b8c878401528b60248401525af1801561176a5790899392916116f9575b50507fb1c971764663d561c0ec2baf395a55f33f0a79fabb35bbad580247ba2959523d935082519485528401523392a3565b90919394925067ffffffffffffffff831161173e575050829187917fb1c971764663d561c0ec2baf395a55f33f0a79fabb35bbad580247ba2959523d945238806116c7565b9060416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b84513d84823e3d90fd5b8580fd5b509060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152fd5b5082517fd193bd20000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b90508381813d8311611826575b6118178183611044565b8101031261177457513861158a565b503d61180d565b85513d88823e3d90fd5b50600092505056fea2646970667358221220dfd0ddf544f0b1bbc4f2c33b50d63053ae43340fb51f9c5d77776648ebfc379a64736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000009a8fee232dcf73060af348a1b62cdb0a19852d130000000000000000000000004cc39af0d46b0f66fd33778c6629a696bdc310a0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000fd0205066521550d7d7ab19da8f72bb004b4c3410000000000000000000000009d43ccb1ad7e0081cc8a8f1fd54d16e54a637e300000000000000000000000009a8fee232dcf73060af348a1b62cdb0a19852d1300000000000000000000000000000000000000000000000000000000000000154c49542043616c6c204f7074696f6e20546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000046f4c495400000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): LIT Call Option Token
Arg [1] : symbol_ (string): oLIT
Arg [2] : owner_ (address): 0x9a8FEe232DCF73060Af348a1B62Cdb0a19852d13
Arg [3] : tokenAdmin_ (address): 0x4cc39AF0d46b0F66Fd33778C6629A696bDC310a0
Arg [4] : paymentToken_ (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [5] : underlyingToken_ (address): 0xfd0205066521550D7d7AB19DA8F72bb004b4C341
Arg [6] : oracle_ (address): 0x9d43ccb1aD7E0081cC8A8F1fd54D16E54A637E30
Arg [7] : treasury_ (address): 0x9a8FEe232DCF73060Af348a1B62Cdb0a19852d13
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000009a8fee232dcf73060af348a1b62cdb0a19852d13
Arg [3] : 0000000000000000000000004cc39af0d46b0f66fd33778c6629a696bdc310a0
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [5] : 000000000000000000000000fd0205066521550d7d7ab19da8f72bb004b4c341
Arg [6] : 0000000000000000000000009d43ccb1ad7e0081cc8a8f1fd54d16e54a637e30
Arg [7] : 0000000000000000000000009a8fee232dcf73060af348a1b62cdb0a19852d13
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [9] : 4c49542043616c6c204f7074696f6e20546f6b656e0000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [11] : 6f4c495400000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.