Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | Amount | ||
|---|---|---|---|---|---|---|
| 29069467 | 198 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
FeeTokenRegistry
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;
import {Ownable} from "@openzeppelin-contracts/access/Ownable.sol";
import {IERC20Metadata} from "@openzeppelin-contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {AggregatorV3Interface} from "@chainlink-contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol";
import {IFeeTokenRegistry} from "./interfaces/IFeeTokenRegistry.sol";
/// @title FeeTokenRegistry
/// @author Otim Labs, Inc.
/// @notice a contract for registering ERC20 fee tokens and using price feeds to convert wei amounts to ERC20 token amounts
contract FeeTokenRegistry is IFeeTokenRegistry, Ownable {
/// @notice relates a token address to its price feed and decimal information
mapping(address => FeeTokenData) public feeTokenData;
constructor(address owner) Ownable(owner) {}
/// @inheritdoc IFeeTokenRegistry
function addFeeToken(address token, address priceFeed, uint40 heartbeat) external onlyOwner {
// basic checks to ensure the token, price feed, and heartbeat are valid
if (token == address(0) || priceFeed == address(0) || heartbeat == 0) {
revert InvalidFeeTokenData();
}
// ensure the token is not already registered
if (feeTokenData[token].registered) {
revert FeeTokenAlreadyRegistered();
}
// query the lastest round data from the price feed
// slither-disable-next-line unused-return
(uint80 roundId,,, uint256 updatedAt,) = AggregatorV3Interface(priceFeed).latestRoundData();
// check if the price feed has been initialized
if (roundId == 0 || updatedAt == 0) {
revert PriceFeedNotInitialized();
}
// query the decimals for the token and price feed
uint8 tokenDecimals = IERC20Metadata(token).decimals();
uint8 priceFeedDecimals = AggregatorV3Interface(priceFeed).decimals();
// store this information in the feeTokenData mapping
feeTokenData[token] = FeeTokenData(priceFeed, heartbeat, priceFeedDecimals, tokenDecimals, true);
// emit an event to notify listeners of the new fee token
emit FeeTokenAdded(token, priceFeed, heartbeat, priceFeedDecimals, tokenDecimals);
}
/// @inheritdoc IFeeTokenRegistry
function removeFeeToken(address token) external onlyOwner {
// query the fee token data
FeeTokenData memory data = feeTokenData[token];
// if the token is not registered, revert
if (!data.registered) {
revert FeeTokenNotRegistered();
}
// delete the fee token data from the mapping
delete feeTokenData[token];
// emit an event to notify listeners of the removed fee token
emit FeeTokenRemoved(token, data.priceFeed, data.heartbeat, data.priceFeedDecimals, data.tokenDecimals);
}
/// @inheritdoc IFeeTokenRegistry
function weiToToken(address token, uint256 weiAmount) external view override returns (uint256) {
// query the fee token data
FeeTokenData memory data = feeTokenData[token];
// if the token is not registered, revert
if (!data.registered) {
revert FeeTokenNotRegistered();
}
// query the latest price from the price feed
// slither-disable-next-line unused-return
(, int256 latestPrice,, uint256 updatedAt,) = AggregatorV3Interface(data.priceFeed).latestRoundData();
// if the latest price is zero or negative, revert
if (latestPrice <= 0) {
revert InvalidPrice();
}
// if the price feed is stale, revert
if (block.timestamp - updatedAt > data.heartbeat) {
revert StalePrice();
}
// collect the number of decimals for the token and price feed
uint8 decimals = data.priceFeedDecimals + data.tokenDecimals;
// adjust the tokenAmount based on the number of decimals.
// we must divide by 10 ** 18 at some point since the price is given in ether
// so we adjust the tokenAmount based on the difference in decimals
if (decimals < 18) {
return weiAmount / 10 ** (18 - decimals) / uint256(latestPrice);
} else {
return weiAmount * 10 ** (decimals - 18) / uint256(latestPrice);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity >=0.6.2;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// solhint-disable-next-line interface-starts-with-i
interface AggregatorV3Interface {
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external view returns (uint256);
function getRoundData(
uint80 _roundId
) external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
function latestRoundData()
external
view
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity ^0.8.26;
/// @title FeeTokenRegistry
/// @author Otim Labs, Inc.
/// @notice interface for the FeeTokenRegistry contract
interface IFeeTokenRegistry {
/// @notice fee token data struct
/// @param priceFeed - a price feed of the form <token>/ETH
/// @param heartbeat - the time in seconds between price feed updates
/// @param priceFeedDecimals - the number of decimals for the price feed
/// @param tokenDecimals - the number of decimals for the token
/// @param registered - whether the token is registered
struct FeeTokenData {
address priceFeed;
uint40 heartbeat;
uint8 priceFeedDecimals;
uint8 tokenDecimals;
bool registered;
}
/// @notice emitted when a fee token is added
event FeeTokenAdded(
address indexed token, address indexed priceFeed, uint40 heartbeat, uint8 priceFeedDecimals, uint8 tokenDecimals
);
/// @notice emitted when a fee token is removed
event FeeTokenRemoved(
address indexed token, address indexed priceFeed, uint40 heartbeat, uint8 priceFeedDecimals, uint8 tokenDecimals
);
error InvalidFeeTokenData();
error PriceFeedNotInitialized();
error FeeTokenAlreadyRegistered();
error FeeTokenNotRegistered();
error InvalidPrice();
error StalePrice();
/// @notice adds a fee token to the registry
/// @param token - the ERC20 token address
/// @param priceFeed - the price feed address
/// @param heartbeat - the time in seconds between price feed updates
function addFeeToken(address token, address priceFeed, uint40 heartbeat) external;
/// @notice removes a fee token from the registry
/// @param token - the ERC20 token address
function removeFeeToken(address token) external;
/// @notice converts a wei amount to a token amount
/// @param token - the ERC20 token address to convert to
/// @param weiAmount - the amount of wei to convert
/// @return tokenAmount - converted token amount
function weiToToken(address token, uint256 weiAmount) external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
interface IERC20 {
/**
* @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);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}{
"remappings": [
"@chainlink-contracts/=dependencies/smartcontractkit-chainlink-2.25.0/contracts/",
"@openzeppelin-contracts/=dependencies/@openzeppelin-contracts-5.4.0/",
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.4.0/",
"@uniswap-universal-router/=dependencies/@uniswap-universal-router-2.0.0/",
"@uniswap-v3-core/=dependencies/@uniswap-v3-core-1.0.2-solc-0.8-simulate/",
"@uniswap-v3-periphery/=dependencies/@uniswap-v3-periphery-1.4.4/",
"forge-std/=dependencies/forge-std-1.10.0/",
"@openzeppelin-contracts-5.4.0/=dependencies/@openzeppelin-contracts-5.4.0/",
"@uniswap-universal-router-2.0.0/=dependencies/@uniswap-universal-router-2.0.0/",
"@uniswap-v3-core-1.0.2-solc-0.8-simulate/=dependencies/@uniswap-v3-core-1.0.2-solc-0.8-simulate/contracts/",
"@uniswap-v3-periphery-1.4.4/=dependencies/@uniswap-v3-periphery-1.4.4/contracts/",
"@uniswap/=dependencies/@uniswap-v3-periphery-1.4.4/node_modules/@uniswap/",
"ds-test/=dependencies/@uniswap-universal-router-2.0.0/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=dependencies/@uniswap-universal-router-2.0.0/lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=dependencies/@uniswap-universal-router-2.0.0/lib/permit2/lib/forge-gas-snapshot/src/",
"forge-std-1.10.0/=dependencies/forge-std-1.10.0/src/",
"openzeppelin-contracts/=dependencies/@uniswap-universal-router-2.0.0/lib/permit2/lib/openzeppelin-contracts/",
"permit2/=dependencies/@uniswap-universal-router-2.0.0/lib/permit2/",
"smartcontractkit-chainlink-2.25.0/=dependencies/smartcontractkit-chainlink-2.25.0/",
"solmate/=dependencies/@uniswap-universal-router-2.0.0/lib/solmate/src/",
"v3-periphery/=dependencies/@uniswap-universal-router-2.0.0/lib/v3-periphery/contracts/",
"v4-core/=dependencies/@uniswap-universal-router-2.0.0/lib/v4-periphery/lib/v4-core/src/",
"v4-periphery/=dependencies/@uniswap-universal-router-2.0.0/lib/v4-periphery/"
],
"optimizer": {
"enabled": true,
"runs": 1000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "none",
"appendCBOR": false
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FeeTokenAlreadyRegistered","type":"error"},{"inputs":[],"name":"FeeTokenNotRegistered","type":"error"},{"inputs":[],"name":"InvalidFeeTokenData","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PriceFeedNotInitialized","type":"error"},{"inputs":[],"name":"StalePrice","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"priceFeed","type":"address"},{"indexed":false,"internalType":"uint40","name":"heartbeat","type":"uint40"},{"indexed":false,"internalType":"uint8","name":"priceFeedDecimals","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"tokenDecimals","type":"uint8"}],"name":"FeeTokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"priceFeed","type":"address"},{"indexed":false,"internalType":"uint40","name":"heartbeat","type":"uint40"},{"indexed":false,"internalType":"uint8","name":"priceFeedDecimals","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"tokenDecimals","type":"uint8"}],"name":"FeeTokenRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"priceFeed","type":"address"},{"internalType":"uint40","name":"heartbeat","type":"uint40"}],"name":"addFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeTokenData","outputs":[{"internalType":"address","name":"priceFeed","type":"address"},{"internalType":"uint40","name":"heartbeat","type":"uint40"},{"internalType":"uint8","name":"priceFeedDecimals","type":"uint8"},{"internalType":"uint8","name":"tokenDecimals","type":"uint8"},{"internalType":"bool","name":"registered","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"removeFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"weiAmount","type":"uint256"}],"name":"weiToToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b50604051610d76380380610d7683398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b610c81806100f55f395ff3fe608060405234801561000f575f80fd5b506004361061007a575f3560e01c80638a67c64b116100585780638a67c64b146101385780638da5cb5b1461014b578063d251f7ba14610165578063f2fde38b14610186575f80fd5b806337edaee41461007e57806367923c451461011b578063715018a614610130575b5f80fd5b6100d661008c3660046109e5565b60016020525f90815260409020546001600160a01b0381169064ffffffffff600160a01b8204169060ff600160c81b8204811691600160d01b8104821691600160d81b9091041685565b604080516001600160a01b03909616865264ffffffffff909416602086015260ff928316938501939093521660608301521515608082015260a0015b60405180910390f35b61012e6101293660046109e5565b610199565b005b61012e6102dc565b61012e610146366004610a05565b6102ef565b5f546040516001600160a01b039091168152602001610112565b610178610173366004610a52565b6106be565b604051908152602001610112565b61012e6101943660046109e5565b6108c3565b6101a161091e565b6001600160a01b038082165f90815260016020908152604091829020825160a0810184529054938416815264ffffffffff600160a01b8504169181019190915260ff600160c81b8404811692820192909252600160d01b830482166060820152600160d81b9092041615156080820181905261023057604051634e1d8e5560e01b815260040160405180910390fd5b6001600160a01b038083165f8181526001602090815260409182902080547fffffffff00000000000000000000000000000000000000000000000000000000169055845190850151858301516060870151935192909516947f7eb8bb8f97673d4350a999af01ee88f18420964ab8304a5bc7945f5a51e0b3a0936102d09364ffffffffff93909316835260ff918216602084015216604082015260600190565b60405180910390a35050565b6102e461091e565b6102ed5f610963565b565b6102f761091e565b6001600160a01b038316158061031457506001600160a01b038216155b80610324575064ffffffffff8116155b1561035b576040517f442e3c5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f90815260016020526040902054600160d81b900460ff16156103b4576040517f86ecbe7400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80836001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156103f2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104169190610a93565b509350505091508169ffffffffffffffffffff165f1480610435575080155b1561046c576040517ff21206e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104cd9190610ae1565b90505f856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561050c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105309190610ae1565b90506040518060a00160405280876001600160a01b031681526020018664ffffffffff1681526020018260ff1681526020018360ff1681526020016001151581525060015f896001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151815f0160146101000a81548164ffffffffff021916908364ffffffffff1602179055506040820151815f0160196101000a81548160ff021916908360ff1602179055506060820151815f01601a6101000a81548160ff021916908360ff1602179055506080820151815f01601b6101000a81548160ff021916908315150217905550905050856001600160a01b0316876001600160a01b03167f95edba25393a138f316a14168274109addd4b2a39fd53cfae1fc57c988095f018784866040516106ad9392919064ffffffffff93909316835260ff918216602084015216604082015260600190565b60405180910390a350505050505050565b6001600160a01b038083165f908152600160209081526040808320815160a0810183529054948516815264ffffffffff600160a01b8604169281019290925260ff600160c81b8504811691830191909152600160d01b840481166060830152600160d81b90930490921615156080830181905290919061075157604051634e1d8e5560e01b815260040160405180910390fd5b5f80825f01516001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610792573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b69190610a93565b509350509250505f82136107f5576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602083015164ffffffffff1661080b8242610b15565b1115610843576040517f19abf40e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836060015184604001516108589190610b28565b905060128160ff16101561089c5782610872826012610b41565b61087d90600a610c3d565b6108879088610c4b565b6108919190610c4b565b9450505050506108bd565b826108a8601283610b41565b6108b390600a610c3d565b6108879088610c6a565b92915050565b6108cb61091e565b6001600160a01b038116610912576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b61091b81610963565b50565b5f546001600160a01b031633146102ed576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610909565b5f80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146109e0575f80fd5b919050565b5f602082840312156109f5575f80fd5b6109fe826109ca565b9392505050565b5f805f60608486031215610a17575f80fd5b610a20846109ca565b9250610a2e602085016109ca565b9150604084013564ffffffffff81168114610a47575f80fd5b809150509250925092565b5f8060408385031215610a63575f80fd5b610a6c836109ca565b946020939093013593505050565b805169ffffffffffffffffffff811681146109e0575f80fd5b5f805f805f60a08688031215610aa7575f80fd5b610ab086610a7a565b60208701516040880151606089015192975090955093509150610ad560808701610a7a565b90509295509295909350565b5f60208284031215610af1575f80fd5b815160ff811681146109fe575f80fd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156108bd576108bd610b01565b60ff81811683821601908111156108bd576108bd610b01565b60ff82811682821603908111156108bd576108bd610b01565b6001815b6001841115610b9557808504811115610b7957610b79610b01565b6001841615610b8757908102905b60019390931c928002610b5e565b935093915050565b5f82610bab575060016108bd565b81610bb757505f6108bd565b8160018114610bcd5760028114610bd757610bf3565b60019150506108bd565b60ff841115610be857610be8610b01565b50506001821b6108bd565b5060208310610133831016604e8410600b8410161715610c16575081810a6108bd565b610c225f198484610b5a565b805f1904821115610c3557610c35610b01565b029392505050565b5f6109fe60ff841683610b9d565b5f82610c6557634e487b7160e01b5f52601260045260245ffd5b500490565b80820281158282048414176108bd576108bd610b01560000000000000000000000006233f5cc17b870ed8921095b67e176dee886ae94
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061007a575f3560e01c80638a67c64b116100585780638a67c64b146101385780638da5cb5b1461014b578063d251f7ba14610165578063f2fde38b14610186575f80fd5b806337edaee41461007e57806367923c451461011b578063715018a614610130575b5f80fd5b6100d661008c3660046109e5565b60016020525f90815260409020546001600160a01b0381169064ffffffffff600160a01b8204169060ff600160c81b8204811691600160d01b8104821691600160d81b9091041685565b604080516001600160a01b03909616865264ffffffffff909416602086015260ff928316938501939093521660608301521515608082015260a0015b60405180910390f35b61012e6101293660046109e5565b610199565b005b61012e6102dc565b61012e610146366004610a05565b6102ef565b5f546040516001600160a01b039091168152602001610112565b610178610173366004610a52565b6106be565b604051908152602001610112565b61012e6101943660046109e5565b6108c3565b6101a161091e565b6001600160a01b038082165f90815260016020908152604091829020825160a0810184529054938416815264ffffffffff600160a01b8504169181019190915260ff600160c81b8404811692820192909252600160d01b830482166060820152600160d81b9092041615156080820181905261023057604051634e1d8e5560e01b815260040160405180910390fd5b6001600160a01b038083165f8181526001602090815260409182902080547fffffffff00000000000000000000000000000000000000000000000000000000169055845190850151858301516060870151935192909516947f7eb8bb8f97673d4350a999af01ee88f18420964ab8304a5bc7945f5a51e0b3a0936102d09364ffffffffff93909316835260ff918216602084015216604082015260600190565b60405180910390a35050565b6102e461091e565b6102ed5f610963565b565b6102f761091e565b6001600160a01b038316158061031457506001600160a01b038216155b80610324575064ffffffffff8116155b1561035b576040517f442e3c5c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f90815260016020526040902054600160d81b900460ff16156103b4576040517f86ecbe7400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80836001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156103f2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104169190610a93565b509350505091508169ffffffffffffffffffff165f1480610435575080155b1561046c576040517ff21206e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104cd9190610ae1565b90505f856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561050c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105309190610ae1565b90506040518060a00160405280876001600160a01b031681526020018664ffffffffff1681526020018260ff1681526020018360ff1681526020016001151581525060015f896001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151815f0160146101000a81548164ffffffffff021916908364ffffffffff1602179055506040820151815f0160196101000a81548160ff021916908360ff1602179055506060820151815f01601a6101000a81548160ff021916908360ff1602179055506080820151815f01601b6101000a81548160ff021916908315150217905550905050856001600160a01b0316876001600160a01b03167f95edba25393a138f316a14168274109addd4b2a39fd53cfae1fc57c988095f018784866040516106ad9392919064ffffffffff93909316835260ff918216602084015216604082015260600190565b60405180910390a350505050505050565b6001600160a01b038083165f908152600160209081526040808320815160a0810183529054948516815264ffffffffff600160a01b8604169281019290925260ff600160c81b8504811691830191909152600160d01b840481166060830152600160d81b90930490921615156080830181905290919061075157604051634e1d8e5560e01b815260040160405180910390fd5b5f80825f01516001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610792573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b69190610a93565b509350509250505f82136107f5576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602083015164ffffffffff1661080b8242610b15565b1115610843576040517f19abf40e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f836060015184604001516108589190610b28565b905060128160ff16101561089c5782610872826012610b41565b61087d90600a610c3d565b6108879088610c4b565b6108919190610c4b565b9450505050506108bd565b826108a8601283610b41565b6108b390600a610c3d565b6108879088610c6a565b92915050565b6108cb61091e565b6001600160a01b038116610912576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b61091b81610963565b50565b5f546001600160a01b031633146102ed576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610909565b5f80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146109e0575f80fd5b919050565b5f602082840312156109f5575f80fd5b6109fe826109ca565b9392505050565b5f805f60608486031215610a17575f80fd5b610a20846109ca565b9250610a2e602085016109ca565b9150604084013564ffffffffff81168114610a47575f80fd5b809150509250925092565b5f8060408385031215610a63575f80fd5b610a6c836109ca565b946020939093013593505050565b805169ffffffffffffffffffff811681146109e0575f80fd5b5f805f805f60a08688031215610aa7575f80fd5b610ab086610a7a565b60208701516040880151606089015192975090955093509150610ad560808701610a7a565b90509295509295909350565b5f60208284031215610af1575f80fd5b815160ff811681146109fe575f80fd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156108bd576108bd610b01565b60ff81811683821601908111156108bd576108bd610b01565b60ff82811682821603908111156108bd576108bd610b01565b6001815b6001841115610b9557808504811115610b7957610b79610b01565b6001841615610b8757908102905b60019390931c928002610b5e565b935093915050565b5f82610bab575060016108bd565b81610bb757505f6108bd565b8160018114610bcd5760028114610bd757610bf3565b60019150506108bd565b60ff841115610be857610be8610b01565b50506001821b6108bd565b5060208310610133831016604e8410600b8410161715610c16575081810a6108bd565b610c225f198484610b5a565b805f1904821115610c3557610c35610b01565b029392505050565b5f6109fe60ff841683610b9d565b5f82610c6557634e487b7160e01b5f52601260045260245ffd5b500490565b80820281158282048414176108bd576108bd610b0156
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006233f5cc17b870ed8921095b67e176dee886ae94
-----Decoded View---------------
Arg [0] : owner (address): 0x6233F5cc17B870ed8921095b67e176DEE886aE94
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000006233f5cc17b870ed8921095b67e176dee886ae94
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.