Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
NativeRebalancer
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.27; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IRestakingPool} from "./interfaces/IRestakingPool.sol"; import {IInceptionToken} from "./interfaces/IInceptionToken.sol"; import {IInceptionRatioFeed} from "./interfaces/IInceptionRatioFeed.sol"; import {ICrossChainBridgeL1} from "./interfaces/ICrossChainBridgeL1.sol"; import {INativeRebalancer} from "./interfaces/INativeRebalancer.sol"; /** * @author The InceptionLRT team * @title NativeRebalancer * @dev This contract handles staking, manages treasury data and facilitates cross-chain ETH transfers. */ contract NativeRebalancer is Initializable, Ownable2StepUpgradeable, INativeRebalancer { address public inceptionToken; address public lockboxAddress; address payable public liqPool; address public ratioFeed; address public operator; uint256 public constant MULTIPLIER = 1e18; mapping(uint256 => Transaction) public txs; mapping(uint256 => address payable) adapters; address payable public defaultAdapter; uint256[] public chainIds; uint256 public syncedSupply; bool public updateable; modifier onlyOperator() { require( msg.sender == operator || msg.sender == owner(), OnlyOperator() ); _; } modifier onlyAdapter(uint256 _chainId) { require(msg.sender == _getAdapter(_chainId), OnlyAdapter()); _; } /** * @notice Initializes the contract with essential addresses and parameters. * @param _inceptionToken The address of the InceptionToken token. * @param _lockbox The address of the lockbox. * @param _liqPool The address of the liquidity pool. * @param _defaultAdapter The address of the CrossChainBridgeL1. * @param _ratioFeed The address of the ratio feed contract. * @param _operator The address of the operator who will manage this contract. */ function initialize( address _inceptionToken, address _lockbox, address payable _liqPool, address payable _defaultAdapter, address _ratioFeed, address _operator ) public initializer { __Ownable_init(msg.sender); require(_inceptionToken != address(0), SettingZeroAddress()); require(_lockbox != address(0), SettingZeroAddress()); require(_liqPool != address(0), SettingZeroAddress()); require(_defaultAdapter != address(0), SettingZeroAddress()); require(_ratioFeed != address(0), SettingZeroAddress()); require(_operator != address(0), SettingZeroAddress()); inceptionToken = _inceptionToken; lockboxAddress = _lockbox; liqPool = _liqPool; defaultAdapter = _defaultAdapter; ratioFeed = _ratioFeed; operator = _operator; } /** * @notice Updates the InceptionToken address. * @param _inceptionToken The new InceptionToken address. */ function setInceptionToken(address _inceptionToken) external onlyOwner { require(_inceptionToken != address(0), SettingZeroAddress()); emit InceptionTokenChanged(inceptionToken, _inceptionToken); inceptionToken = _inceptionToken; } /** * @notice Updates the Lockbox address. * @param _lockboxAddress The new Lockbox address. */ function setLockboxAddress(address _lockboxAddress) external onlyOwner { require(_lockboxAddress != address(0), SettingZeroAddress()); emit LockboxChanged(lockboxAddress, _lockboxAddress); lockboxAddress = _lockboxAddress; } /** * @notice Updates the liquidity pool address. * @param _liqPool The new liquidity pool address. */ function setLiqPool(address payable _liqPool) external onlyOwner { require(_liqPool != address(0), SettingZeroAddress()); emit LiqPoolChanged(liqPool, _liqPool); liqPool = _liqPool; } /** * @notice Updates the operator address. * @param _operator The new operator address. */ function setOperator(address _operator) external onlyOwner { require(_operator != address(0), SettingZeroAddress()); emit OperatorChanged(operator, _operator); operator = _operator; } /** * @notice Updates the treasury data by comparing the total L2 inETH balance and adjusting the treasury accordingly. */ function updateTreasuryData() public { require(updateable, TreasuryUpdatesPaused()); uint256 totalL2InETH = 0; uint256[] memory allChainIds = chainIds; for (uint i = 0; i < allChainIds.length; i++) { uint256 chainId = allChainIds[i]; Transaction memory txData = getTransactionData(chainId); require( txData.timestamp != 0, MissingOneOrMoreL2Transactions(chainId) ); totalL2InETH += txData.inceptionTokenBalance; } if (syncedSupply < totalL2InETH) { uint256 amountToMint = totalL2InETH - syncedSupply; _mintInceptionToken(amountToMint); syncedSupply += amountToMint; } else if (syncedSupply > totalL2InETH) { uint256 amountToBurn = syncedSupply - totalL2InETH; _burnInceptionToken(amountToBurn); syncedSupply -= amountToBurn; } else { revert NoRebalancingRequired(); } uint256 inETHBalance = IERC20(inceptionToken).balanceOf(address(this)); if (inETHBalance > 0) { require( IERC20(inceptionToken).transfer(lockboxAddress, inETHBalance), TransferToLockboxFailed() ); emit InceptionTokenDepositedToLockbox(inETHBalance); } } function _mintInceptionToken(uint256 _amountToMint) internal { require(inceptionToken != address(0), InceptionTokenAddressNotSet()); IInceptionToken cToken = IInceptionToken(inceptionToken); cToken.mint(lockboxAddress, _amountToMint); emit TreasuryUpdateMint(_amountToMint); } function _burnInceptionToken(uint256 _amountToBurn) internal { require(inceptionToken != address(0), InceptionTokenAddressNotSet()); IInceptionToken cToken = IInceptionToken(inceptionToken); cToken.burn(lockboxAddress, _amountToBurn); emit TreasuryUpdateBurn(_amountToBurn); } /** * @dev Triggered by a cron job. * @notice Stakes a specified amount of ETH into the Liquidity Pool. * @param _amount The amount of ETH to stake. */ function stake(uint256 _amount) external onlyOperator { require(liqPool != address(0), LiquidityPoolNotSet()); require( _amount <= address(this).balance, StakeAmountExceedsEthBalance(_amount, address(this).balance) ); require( _amount <= IRestakingPool(liqPool).availableToStake(), StakeAmountExceedsMaxTVL() ); IRestakingPool(liqPool).stake{value: _amount}(); uint256 inceptionTokenBalance = IERC20(inceptionToken).balanceOf( address(this) ); require( IERC20(inceptionToken).transfer( lockboxAddress, inceptionTokenBalance ), TransferToLockboxFailed() ); emit InceptionTokenDepositedToLockbox(inceptionTokenBalance); } /** * @dev msg.value is used to pay for cross-chain fees (calculated externally) * @notice Sends ETH to an L2 chain through a cross-chain defaultAdapter. * @param _chainId The ID of the destination L2 chain. * @param _callValue The amount of ETH to send to L2. */ function sendEthToL2( uint256 _chainId, uint256 _callValue, bytes memory _options ) external payable onlyOperator { address payable adapter = payable(_getAdapter(_chainId)); require(adapter != address(0), CrosschainBridgeNotSet()); require( _callValue + msg.value <= address(this).balance, SendAmountExceedsEthBalance(_callValue) ); ICrossChainBridgeL1(adapter).sendEthCrossChain{ value: _callValue + msg.value }(_chainId, _options); } /** * @notice Calculates fees to send ETH to other chain. The `SEND_VALUE` encoded in options is not included in the return * @param _chainId chain ID of the network to simulate sending ETH to * @param _options encoded params for cross-chain message. Includes `SEND_VALUE` which is substracted from the end result * @return fee required to pay for cross-chain transaction, without the value to be sent itself */ function quoteSendEthToL2( uint256 _chainId, bytes calldata _options ) external view returns (uint256 fee) { address payable adapter = payable(_getAdapter(_chainId)); require(adapter != address(0), CrosschainBridgeNotSet()); return ICrossChainBridgeL1(adapter).quoteSendEth(_chainId, _options) - ICrossChainBridgeL1(adapter).getValueFromOpts(_options); } /** * @notice Handles Layer 2 information and updates the transaction data for a specific Chain ID. * @dev Verifies that the caller is the correct defaultAdapter and that the timestamp is valid. * @param _chainId The Chain ID of the transaction. * @param _timestamp The timestamp when the transaction occurred. * @param _balance The ETH balance involved in the transaction. * @param _totalSupply The total inETH supply for the transaction. */ function handleL2Info( uint256 _chainId, uint256 _timestamp, uint256 _balance, uint256 _totalSupply ) external onlyAdapter(_chainId) { require( _timestamp <= block.timestamp, TimeCannotBeInFuture(_timestamp) ); Transaction memory lastUpdate = txs[_chainId]; if (lastUpdate.timestamp != 0) { require( _timestamp > lastUpdate.timestamp, TimeBeforePrevRecord(_timestamp) ); } Transaction memory newUpdate = Transaction({ timestamp: _timestamp, ethBalance: _balance, inceptionTokenBalance: _totalSupply }); txs[_chainId] = newUpdate; emit L2InfoReceived(_chainId, _timestamp, _balance, _totalSupply); } /** * @notice Retrieves the transaction for a specific Chain ID. NB! Only one (last) transaction is stored. * @param _chainId The Chain ID for which to retrieve the last transaction data. * @return The transaction data (timestamp, ETH balance, inETH balance). */ function getTransactionData( uint256 _chainId ) public view returns (Transaction memory) { return txs[_chainId]; } /** * @dev Replaces the crosschain bridges * @param _newAdapter The address of the defaultAdapter. */ function addAdapter( uint256 _chainId, address payable _newAdapter ) external onlyOwner { require(_newAdapter != address(0), SettingZeroAddress()); adapters[_chainId] = _newAdapter; _addChainId(_chainId); emit AdapterAdded(_chainId, _newAdapter); } /** * @notice set the so-called defaultAdapter - the adapter to be used for every chain unless a specific adapter for specific chainId is set * @param _newDefaultAdapter Address of the default cross-chain adapter **/ function setDefaultAdapter( address payable _newDefaultAdapter ) external override onlyOwner { require(_newDefaultAdapter != address(0), SettingZeroAddress()); emit DefaultBridgeChanged(defaultAdapter, _newDefaultAdapter); defaultAdapter = _newDefaultAdapter; } function addChainId(uint256 _newChainId) external onlyOwner { _addChainId(_newChainId); } /** * @notice Removes a specific `chainId` from the `chainIds` array. * @param _chainId The Chain ID to delete. */ function deleteChainId(uint256 _chainId) public onlyOwner { uint256 index; bool found = false; // Find the _chainId in the array for (uint256 i = 0; i < chainIds.length; i++) { if (chainIds[i] == _chainId) { index = i; found = true; break; } } require(found, ChainIdNotFound(_chainId)); // Move the last element into the place of the one to delete chainIds[index] = chainIds[chainIds.length - 1]; chainIds.pop(); emit ChainIdDeleted(_chainId, index); } /** * @notice Updates the supply share of the total supply * @param _syncedSupply the new synced supply share of the total supply */ function setSyncedSupply(uint256 _syncedSupply) external onlyOwner { emit SyncedSupplyChanged(syncedSupply, _syncedSupply); syncedSupply = _syncedSupply; } /** * @notice sets updateable value allowing to turn on/off updateTreasuryData * @param _updateable the flag which determines if updateTreasuryData is calleable */ function setUpdateable(bool _updateable) external onlyOwner { emit UpdateableChanged(updateable, _updateable); updateable = _updateable; } /** * @notice Fetches the adapter assigned to a specific chain ID * @param _chainId The Chain ID * @return adapter address of the adapter for the specified chainId. Returns 0 if non set * @return isDefault whether the returned adapter is default or not (from the mapping) */ function getAdapter( uint256 _chainId ) external view returns (address payable adapter, bool isDefault) { adapter = _getAdapter(_chainId); if (adapter == defaultAdapter) { isDefault = true; } } function _getAdapter( uint256 _chainId ) internal view returns (address payable adapter) { adapter = adapters[_chainId]; if (adapter == address(0)) { adapter = defaultAdapter; } require(adapter != address(0), NoAdapterAvailable(_chainId)); } /** * @notice Adds a new Chain ID to the storage. * @dev Ensures that the Chain ID does not already exist in the list. * @param _newChainId The Chain ID to add. */ function _addChainId(uint256 _newChainId) internal { for (uint i = 0; i < chainIds.length; i++) { if (chainIds[i] == _newChainId) { return; } } chainIds.push(_newChainId); emit ChainIdAdded(_newChainId); } /** * @notice Receives ETH sent to this contract, just in case. */ receive() external payable { emit ETHReceived(msg.sender, msg.value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {OwnableUpgradeable} from "./OwnableUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step struct Ownable2StepStorage { address _pendingOwner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00; function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) { assembly { $.slot := Ownable2StepStorageLocation } } event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); function __Ownable2Step_init() internal onlyInitializing { } function __Ownable2Step_init_unchained() internal onlyInitializing { } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); return $._pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); $._pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); delete $._pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @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. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { 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) { OwnableStorage storage $ = _getOwnableStorage(); 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 { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ 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); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.27; interface ICrossChainBridge { event TargetReceiverChanged( address prevTargetReceiver, address newTargetReceiver ); event RecoverFundsInitiated(uint256 amount); event ReceiveTriggered(address caller, uint256 amount); event CrossChainEthDeposit(uint256 chainId, uint256 amount); event ChainIdAdded(uint256 _chainId); event CrossChainMessageReceived( uint256 indexed chainId, uint256 value, bytes data ); event CrossChainMessageSent( uint256 indexed chainId, uint256 value, bytes data, uint256 fee ); error TargetReceiverNotSet(); error TransferToTargetReceiverFailed(); error SettingZeroAddress(); error NotTargetReceiver(address caller); error ChainIdNotFound(uint256 chainId); function setTargetReceiver(address _newTargetReceiver) external; function recoverFunds() external; function quoteSendEth( uint256 _chainId, bytes memory _options ) external view returns (uint256); function sendEthCrossChain( uint256 _chainId, bytes memory _options ) external payable; function getValueFromOpts( bytes calldata _options ) external view returns (uint256); receive() external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.27; import {ICrossChainBridge} from "./ICrossChainBridge.sol"; interface ICrossChainBridgeL1 is ICrossChainBridge { event CrossChainInfoReceived( uint256 indexed chainId, uint256 timestamp, uint256 balance, uint256 totalSupply ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IInceptionRatioFeedErrors { error OperatorUnauthorizedAccount(address account); error InconsistentInputData(); error NullParams(); error RatioThresholdNotSet(); error NewRatioThresholdInvalid(); error IncorrectDay(uint256 day); error IncorrectToken(address token); } interface IInceptionRatioFeed { event OperatorUpdated(address prevValue, address newValue); event RatioUpdated( address indexed tokenAddress, uint256 prevValue, uint256 newValue ); event RatioNotUpdated( address indexed tokenAddress, uint256 failedRatio, string reason ); event RatioThresholdChanged(uint256 prevValue, uint256 newValue); function updateRatioBatch( address[] calldata addresses, uint256[] calldata ratios ) external; function getRatioFor(address) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; interface IInceptionToken { function mint(address account, uint256 shares) external; function burn(address account, uint256 shares) external; function convertToAmount(uint256 shares) external pure returns (uint256); function convertToShares(uint256 amount) external pure returns (uint256); function changeName(string memory newName) external; function changeSymbol(string memory newSymbol) external; function name() external view returns (string memory); function symbol() external view returns (string memory); function balanceOf(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.27; interface INativeRebalancer { struct Transaction { uint256 timestamp; uint256 ethBalance; uint256 inceptionTokenBalance; } // Events event L2InfoReceived( uint256 indexed networkId, uint256 timestamp, uint256 ethBalance, uint256 inceptionTokenBalance ); event ETHReceived(address sender, uint256 amount); event ETHDepositedToLiquidPool(address liquidPool, uint256 amountETH); event InceptionTokenDepositedToLockbox(uint256 mintAmount); event TreasuryUpdateMint(uint256 mintAmount); event TreasuryUpdateBurn(uint256 mintAmount); event LockboxChanged(address prevLockbox, address newLockbox); event InceptionTokenChanged( address prevInceptionToken, address newInceptionToken ); event LiqPoolChanged(address prevLiqPool, address newLiqPool); event OperatorChanged(address prevOperator, address newOperator); event AdapterAdded(uint256 indexed chainId, address newAdapter); event DefaultBridgeChanged( address indexed prevDefaultAdapter, address indexed newDefaultAdapter ); event SyncedSupplyChanged( uint256 prevSyncedSupply, uint256 nextSyncedSupply ); event UpdateableChanged(bool prevUpdateable, bool nextUpdateable); event ChainIdAdded(uint256 chainId); event ChainIdDeleted(uint256 chainId, uint256 index); error MsgNotFromBridge(address caller); error ChainIdAlreadyExists(uint256 chainId); error ChainIdNotFound(uint256 chainId); error BridgeAlreadyExists(uint256 chainId); error NoBridgeForThisChainId(uint256 chainId); error TimeCannotBeInFuture(uint256 timestamp); error TimeBeforePrevRecord(uint256 timestamp); error SettingZeroAddress(); error TransferToLockboxFailed(); error InceptionTokenAddressNotSet(); error LiquidityPoolNotSet(); error CrosschainBridgeNotSet(); error MissingOneOrMoreL2Transactions(uint256 chainId); error StakeAmountExceedsEthBalance(uint256 staked, uint256 availableEth); error SendAmountExceedsEthBalance(uint256 amountToSend); error StakeAmountExceedsMaxTVL(); error OnlyOperator(); error OnlyAdapter(); error NoRebalancingRequired(); error IndexOutOfBounds(uint256 index, uint256 length); error NoAdapterAvailable(uint256 _chainId); error TreasuryUpdatesPaused(); function handleL2Info( uint256 _chainId, uint256 _timestamp, uint256 _balance, uint256 _totalSupply ) external; function getTransactionData( uint256 _chainId ) external view returns (Transaction memory); function setDefaultAdapter(address payable _newDefaultAdapter) external; function setInceptionToken(address _inceptionTokenAddress) external; function setLockboxAddress(address _lockboxAddress) external; function updateTreasuryData() external; function inceptionToken() external view returns (address); function lockboxAddress() external view returns (address); function liqPool() external view returns (address payable); function ratioFeed() external view returns (address); function operator() external view returns (address); function defaultAdapter() external view returns (address payable); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.26; interface IRestakingPool { /* structs */ struct Unstake { address recipient; uint256 amount; } /* errors */ error PoolZeroAmount(); error PoolZeroAddress(); error PoolRestakerExists(); error PoolRestakerNotExists(); error PoolInsufficientBalance(); error PoolWrongInputLength(); error AmbiguousFee(uint256 claimed, uint256 fee); error InsufficientCapacity(uint256 capacity); error TargetCapacityNotSet(); error TimelineNotOver(); error InconsistentData(); /** * @dev A call to an address target failed. The target may have reverted. */ error PoolFailedInnerCall(); error PoolDistributeGasLimitNotInRange(uint64 max); error PoolStakeAmLessThanMin(); error PoolStakeAmGreaterThanAvailable(); error PoolUnstakeAmLessThanMin(); error ParameterExceedsLimits(uint256 param); /* events */ event Received(address indexed sender, uint256 amount); event Staked(address indexed staker, uint256 amount, uint256 shares); event Unstaked( address indexed from, address indexed to, uint256 amount, uint256 shares ); event Deposited(string indexed provider, bytes[] pubkeys); event DistributeGasLimitChanged(uint32 prevValue, uint32 newValue); event MinStakeChanged(uint256 prevValue, uint256 newValue); event MinUnstakeChanged(uint256 prevValue, uint256 newValue); event MaxTVLChanged(uint256 prevValue, uint256 newValue); event PendingUnstake( address indexed ownerAddress, address indexed receiverAddress, uint256 amount, uint256 shares ); /** * * @dev Deprecated. */ event UnstakesDistributed(Unstake[] unstakes); event ClaimExpected(address indexed claimer, uint256 value); event UnstakeClaimed( address indexed claimer, address indexed caller, uint256 value ); event FlashUnstaked( address indexed sender, address indexed receiver, address indexed owner, uint256 amount, uint256 shares, uint256 fee ); event FeeClaimed( address indexed restaker, address indexed treasury, uint256 fee, uint256 totalClaimed ); event RestakerAdded(string indexed provider, address restaker); event ReferralStake(bytes32 indexed code); event StakeBonus(uint256 amount); event StakeBonusParamsChanged( uint256 newMaxBonusRate, uint256 newOptimalBonusRate, uint256 newDepositUtilizationKink ); event UnstakeFeeParamsChanged( uint256 newMaxFlashFeeRate, uint256 newOptimalWithdrawalRate, uint256 newWithdrawUtilizationKink ); event ProtocolFeeChanged(uint256 prevValue, uint256 newValue); event TargetCapacityChanged(uint256 prevValue, uint256 newValue); event RewardsAdded(uint256 amount, uint256 startTimeline); event RewardsTimelineChanged( uint256 rewardsTimeline, uint256 newTimelineInSeconds ); /* functions */ function getMinStake() external view returns (uint256); function getMinUnstake() external view returns (uint256); function startWithdrawalCheckpoint( string memory provider, bool revertIfNoBalance ) external; function stake() external payable; function availableToStake() external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"BridgeAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"ChainIdAlreadyExists","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"ChainIdNotFound","type":"error"},{"inputs":[],"name":"CrosschainBridgeNotSet","type":"error"},{"inputs":[],"name":"InceptionTokenAddressNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"IndexOutOfBounds","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"LiquidityPoolNotSet","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"MissingOneOrMoreL2Transactions","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"MsgNotFromBridge","type":"error"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"NoAdapterAvailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"NoBridgeForThisChainId","type":"error"},{"inputs":[],"name":"NoRebalancingRequired","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"OnlyAdapter","type":"error"},{"inputs":[],"name":"OnlyOperator","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":[{"internalType":"uint256","name":"amountToSend","type":"uint256"}],"name":"SendAmountExceedsEthBalance","type":"error"},{"inputs":[],"name":"SettingZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"staked","type":"uint256"},{"internalType":"uint256","name":"availableEth","type":"uint256"}],"name":"StakeAmountExceedsEthBalance","type":"error"},{"inputs":[],"name":"StakeAmountExceedsMaxTVL","type":"error"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TimeBeforePrevRecord","type":"error"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"TimeCannotBeInFuture","type":"error"},{"inputs":[],"name":"TransferToLockboxFailed","type":"error"},{"inputs":[],"name":"TreasuryUpdatesPaused","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"address","name":"newAdapter","type":"address"}],"name":"AdapterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"ChainIdAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"}],"name":"ChainIdDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevDefaultAdapter","type":"address"},{"indexed":true,"internalType":"address","name":"newDefaultAdapter","type":"address"}],"name":"DefaultBridgeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"liquidPool","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"}],"name":"ETHDepositedToLiquidPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevInceptionToken","type":"address"},{"indexed":false,"internalType":"address","name":"newInceptionToken","type":"address"}],"name":"InceptionTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"InceptionTokenDepositedToLockbox","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"networkId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"inceptionTokenBalance","type":"uint256"}],"name":"L2InfoReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevLiqPool","type":"address"},{"indexed":false,"internalType":"address","name":"newLiqPool","type":"address"}],"name":"LiqPoolChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevLockbox","type":"address"},{"indexed":false,"internalType":"address","name":"newLockbox","type":"address"}],"name":"LockboxChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevOperator","type":"address"},{"indexed":false,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevSyncedSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextSyncedSupply","type":"uint256"}],"name":"SyncedSupplyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"TreasuryUpdateBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"TreasuryUpdateMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"prevUpdateable","type":"bool"},{"indexed":false,"internalType":"bool","name":"nextUpdateable","type":"bool"}],"name":"UpdateableChanged","type":"event"},{"inputs":[],"name":"MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"address payable","name":"_newAdapter","type":"address"}],"name":"addAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newChainId","type":"uint256"}],"name":"addChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultAdapter","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"deleteChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"getAdapter","outputs":[{"internalType":"address payable","name":"adapter","type":"address"},{"internalType":"bool","name":"isDefault","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"getTransactionData","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ethBalance","type":"uint256"},{"internalType":"uint256","name":"inceptionTokenBalance","type":"uint256"}],"internalType":"struct INativeRebalancer.Transaction","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"uint256","name":"_balance","type":"uint256"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"}],"name":"handleL2Info","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inceptionToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_inceptionToken","type":"address"},{"internalType":"address","name":"_lockbox","type":"address"},{"internalType":"address payable","name":"_liqPool","type":"address"},{"internalType":"address payable","name":"_defaultAdapter","type":"address"},{"internalType":"address","name":"_ratioFeed","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liqPool","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockboxAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"quoteSendEthToL2","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratioFeed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_chainId","type":"uint256"},{"internalType":"uint256","name":"_callValue","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"sendEthToL2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newDefaultAdapter","type":"address"}],"name":"setDefaultAdapter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_inceptionToken","type":"address"}],"name":"setInceptionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_liqPool","type":"address"}],"name":"setLiqPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lockboxAddress","type":"address"}],"name":"setLockboxAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_syncedSupply","type":"uint256"}],"name":"setSyncedSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_updateable","type":"bool"}],"name":"setUpdateable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"syncedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"txs","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ethBalance","type":"uint256"},{"internalType":"uint256","name":"inceptionTokenBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateTreasuryData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052348015600f57600080fd5b5061221a8061001f6000396000f3fe6080604052600436106101fc5760003560e01c8063715018a61161010d578063a694fc3a116100a0578063cc2a9a5b1161006f578063cc2a9a5b146105f2578063ddeadbb614610612578063e30c397814610651578063f2fde38b14610666578063f5715d561461068657600080fd5b8063a694fc3a14610572578063b3ab15fb14610592578063bfab2bb6146105b2578063c235fb14146105d257600080fd5b806382257e3f116100dc57806382257e3f146104f35780638da5cb5b146105135780638e29ebb514610528578063983586d91461054857600080fd5b8063715018a614610489578063734e6cad1461049e578063740b91f4146104be57806379ba5097146104de57600080fd5b80633b24b5471161019057806357039e911161015f57806357039e9114610400578063570ca73514610413578063582f1da21461043357806358951c68146104535780637129bbac1461047357600080fd5b80633b24b5471461035e578063405a2c1c146103a057806350d7be5f146103c057806351eafd87146103e057600080fd5b80631b449f06116101cc5780631b449f06146102de57806321d93090146102fe57806328ed3db61461031e5780633924c33c1461033e57600080fd5b80625c54fc14610240578063029c9ae914610257578063059f8b16146102945780630f3b647e146102be57600080fd5b3661023b57604080513381523460208201527fbfe611b001dfcd411432f7bf0d79b82b4b2ee81511edac123a3403c357fb972a910160405180910390a1005b600080fd5b34801561024c57600080fd5b506102556106dd565b005b34801561026357600080fd5b50600154610277906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102a057600080fd5b506102b0670de0b6b3a764000081565b60405190815260200161028b565b3480156102ca57600080fd5b506102556102d9366004611de0565b6109b0565b3480156102ea57600080fd5b506102556102f9366004611e10565b610a51565b34801561030a57600080fd5b506102b0610319366004611e34565b610ae9565b34801561032a57600080fd5b50610255610339366004611e34565b610b0a565b34801561034a57600080fd5b50610255610359366004611e10565b610c28565b34801561036a57600080fd5b5061037e610379366004611e34565b610cc0565b604080518251815260208084015190820152918101519082015260600161028b565b3480156103ac57600080fd5b506102556103bb366004611e34565b610d1d565b3480156103cc57600080fd5b506102b06103db366004611e4d565b610d66565b3480156103ec57600080fd5b506102556103fb366004611ecb565b610e8e565b61025561040e366004611f13565b610fd7565b34801561041f57600080fd5b50600454610277906001600160a01b031681565b34801561043f57600080fd5b5061025561044e366004611e34565b6110f9565b34801561045f57600080fd5b5061025561046e366004611fed565b61110d565b34801561047f57600080fd5b506102b060095481565b34801561049557600080fd5b5061025561116b565b3480156104aa57600080fd5b50600754610277906001600160a01b031681565b3480156104ca57600080fd5b50600254610277906001600160a01b031681565b3480156104ea57600080fd5b5061025561117f565b3480156104ff57600080fd5b5061025561050e366004611e10565b6111c4565b34801561051f57600080fd5b5061027761124f565b34801561053457600080fd5b50600354610277906001600160a01b031681565b34801561055457600080fd5b50600a546105629060ff1681565b604051901515815260200161028b565b34801561057e57600080fd5b5061025561058d366004611e34565b611284565b34801561059e57600080fd5b506102556105ad366004611e10565b611566565b3480156105be57600080fd5b506102556105cd366004611e10565b6115fe565b3480156105de57600080fd5b50600054610277906001600160a01b031681565b3480156105fe57600080fd5b5061025561060d36600461200a565b611696565b34801561061e57600080fd5b5061063261062d366004611e34565b6118f7565b604080516001600160a01b03909316835290151560208301520161028b565b34801561065d57600080fd5b50610277611925565b34801561067257600080fd5b50610255610681366004611e10565b61194e565b34801561069257600080fd5b506106c26106a1366004611e34565b60056020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161028b565b600a5460ff1661070057604051630cfb2abb60e41b815260040160405180910390fd5b600080600880548060200260200160405190810160405280929190818152602001828054801561074f57602002820191906000526020600020905b81548152602001906001019080831161073b575b5050505050905060005b81518110156107d75760008282815181106107765761077661208c565b60200260200101519050600061078b82610cc0565b805190915082906107bb576040516335a6861360e11b81526004016107b291815260200190565b60405180910390fd5b5060408101516107cb90866120b8565b94505050600101610759565b5081600954101561081b576000600954836107f291906120d1565b90506107fd816119d3565b806009600082825461080f91906120b8565b9091555061086b915050565b8160095411156108525760008260095461083591906120d1565b905061084081611a97565b806009600082825461080f91906120d1565b604051637bb44c2160e11b815260040160405180910390fd5b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156108b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d891906120e4565b905080156109ab5760005460015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015610935573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095991906120fd565b61097657604051638205342760e01b815260040160405180910390fd5b6040518181527f4ae5bd787f4cd94b85a88836b5cefe362f37828a82ecd6172ae39aa907f3dec9906020015b60405180910390a15b505050565b6109b8611b5b565b6001600160a01b0381166109df5760405163ef945a6560e01b815260040160405180910390fd5b600082815260066020526040902080546001600160a01b0319166001600160a01b038316179055610a0f82611b8d565b6040516001600160a01b038216815282907f36faf335eb63af51ba93e9dd185ae816d74a9bac978bc399b49b11137ecd48189060200160405180910390a25050565b610a59611b5b565b6001600160a01b038116610a805760405163ef945a6560e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527ffc944a5f86de9fcfac9dd7587ad1fbfb44e832bfeddec35cad2884cab5d7da65910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b60088181548110610af957600080fd5b600091825260209091200154905081565b610b12611b5b565b600080805b600854811015610b59578360088281548110610b3557610b3561208c565b906000526020600020015403610b515780925060019150610b59565b600101610b17565b508281610b7c576040516354a5785b60e11b81526004016107b291815260200190565b5060088054610b8d906001906120d1565b81548110610b9d57610b9d61208c565b906000526020600020015460088381548110610bbb57610bbb61208c565b6000918252602090912001556008805480610bd857610bd861211a565b600190038181906000526020600020016000905590557f6065156fce04c2111fb2766a72318ef9845d87e0e4eebcf9c3400d1b0d22f42283836040516109a2929190918252602082015260400190565b610c30611b5b565b6001600160a01b038116610c575760405163ef945a6560e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fe8282554581f4f6dcc4a6fbb857f7e89cad72736bcb699bf4205e3665b8e7066910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ce460405180606001604052806000815260200160008152602001600081525090565b50600090815260056020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915290565b610d25611b5b565b60095460408051918252602082018390527f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08910160405180910390a1600955565b600080610d7285611c36565b90506001600160a01b038116610d9b57604051636389838560e11b815260040160405180910390fd5b604051638d02167d60e01b81526001600160a01b03821690638d02167d90610dc99087908790600401612159565b602060405180830381865afa158015610de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0a91906120e4565b604051632296888760e11b81526001600160a01b0383169063452d110e90610e3a90899089908990600401612175565b602060405180830381865afa158015610e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7b91906120e4565b610e8591906120d1565b95945050505050565b83610e9881611c36565b6001600160a01b0316336001600160a01b031614610ec9576040516308ce245d60e31b815260040160405180910390fd5b8342811115610eee576040516336ce2d0f60e11b81526004016107b291815260200190565b50600085815260056020908152604091829020825160608101845281548082526001830154938201939093526002909101549281019290925215610f5457805185908111610f5257604051636e6f496160e01b81526004016107b291815260200190565b505b6040805160608082018352878252602080830188815283850188815260008c8152600584528690208551815591516001830155516002909101558351898152908101889052928301869052909188917f32d49425af41fa76a45e8ef674babb83acc4d8312d2dffe76903c97b7089249a910160405180910390a250505050505050565b6004546001600160a01b03163314806110085750610ff361124f565b6001600160a01b0316336001600160a01b0316145b611025576040516327e1f1e560e01b815260040160405180910390fd5b600061103084611c36565b90506001600160a01b03811661105957604051636389838560e11b815260040160405180910390fd5b4761106434856120b8565b1115839061108857604051636e5b995960e11b81526004016107b291815260200190565b506001600160a01b0381166335d439496110a234866120b8565b86856040518463ffffffff1660e01b81526004016110c192919061218f565b6000604051808303818588803b1580156110da57600080fd5b505af11580156110ee573d6000803e3d6000fd5b505050505050505050565b611101611b5b565b61110a81611b8d565b50565b611115611b5b565b600a546040805160ff9092161515825282151560208301527fd5c31b9c0e8a01c501ba52c814e2ad86843d0b06abcc9d5f19ea1b2a3f482c29910160405180910390a1600a805460ff1916911515919091179055565b611173611b5b565b61117d6000611c92565b565b3380611189611925565b6001600160a01b0316146111bb5760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b2565b61110a81611c92565b6111cc611b5b565b6001600160a01b0381166111f35760405163ef945a6560e01b815260040160405180910390fd5b6007546040516001600160a01b038084169216907f45d051af501a72e3e9cb0c59c70e94521b42cf1ba723cd0956bf5b8321616c4590600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6004546001600160a01b03163314806112b557506112a061124f565b6001600160a01b0316336001600160a01b0316145b6112d2576040516327e1f1e560e01b815260040160405180910390fd5b6002546001600160a01b03166112fb5760405163d667ca4560e01b815260040160405180910390fd5b804747821115611327576040516306836a2960e21b8152600481019290925260248201526044016107b2565b5050600260009054906101000a90046001600160a01b03166001600160a01b0316633f9085516040518163ffffffff1660e01b8152600401602060405180830381865afa15801561137c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a091906120e4565b8111156113c0576040516357337ea960e01b815260040160405180910390fd5b600260009054906101000a90046001600160a01b03166001600160a01b0316633a4b66f1826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561141057600080fd5b505af1158015611424573d6000803e3d6000fd5b5050600080546040516370a0823160e01b81523060048201529194506001600160a01b031692506370a082319150602401602060405180830381865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149691906120e4565b60005460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af11580156114ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151191906120fd565b61152e57604051638205342760e01b815260040160405180910390fd5b6040518181527f4ae5bd787f4cd94b85a88836b5cefe362f37828a82ecd6172ae39aa907f3dec9906020015b60405180910390a15050565b61156e611b5b565b6001600160a01b0381166115955760405163ef945a6560e01b815260040160405180910390fd5b600454604080516001600160a01b03928316815291831660208301527fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c910160405180910390a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b611606611b5b565b6001600160a01b03811661162d5760405163ef945a6560e01b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f224a554a3f3aadb47d65ed2efd7c15f31f83deeee4b3717ed7ade9dec75c61f6910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156116dc5750825b905060008267ffffffffffffffff1660011480156116f95750303b155b905081158015611707575080155b156117255760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561174f57845460ff60401b1916600160401b1785555b61175833611cce565b6001600160a01b038b1661177f5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b038a166117a65760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0389166117cd5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0388166117f45760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b03871661181b5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0386166118425760405163ef945a6560e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b038e8116919091179092556001805482168d84161790556002805482168c84161790556007805482168b84161790556003805482168a84161790556004805490911691881691909117905583156118ea57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b60008061190383611c36565b6007549092506001600160a01b0390811690831603611920575060015b915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00611274565b611956611b5b565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b038316908117825561199a61124f565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6000546001600160a01b03166119fc57604051635ce3a26360e01b815260040160405180910390fd5b6000546001546040516340c10f1960e01b81526001600160a01b0391821660048201526024810184905291169081906340c10f1990604401600060405180830381600087803b158015611a4e57600080fd5b505af1158015611a62573d6000803e3d6000fd5b505050507f61f887a2f5c9e7b476f4c3dab1560bc4f01d991be63db8ab9dd0d826044ae1158260405161155a91815260200190565b6000546001600160a01b0316611ac057604051635ce3a26360e01b815260040160405180910390fd5b600054600154604051632770a7eb60e21b81526001600160a01b039182166004820152602481018490529116908190639dc29fac90604401600060405180830381600087803b158015611b1257600080fd5b505af1158015611b26573d6000803e3d6000fd5b505050507f4addf2dd216e30ceae7fd7eea5312852e3471df45182db976a324001db87c0b08260405161155a91815260200190565b33611b6461124f565b6001600160a01b03161461117d5760405163118cdaa760e01b81523360048201526024016107b2565b60005b600854811015611bca578160088281548110611bae57611bae61208c565b906000526020600020015403611bc2575050565b600101611b90565b50600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018190556040518181527f81b76ca0f2f5caf9af258fb0d9955478a105e304a99322dd21ee8f35dcb494a69060200160405180910390a150565b6000818152600660205260409020546001600160a01b031680611c6157506007546001600160a01b03165b816001600160a01b038216611c8c57604051636efcc08960e01b81526004016107b291815260200190565b50919050565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155611cca82611cdf565b5050565b611cd6611d50565b61110a81611d99565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661117d57604051631afcd79f60e31b815260040160405180910390fd5b611da1611d50565b6001600160a01b0381166111bb57604051631e4fbdf760e01b8152600060048201526024016107b2565b6001600160a01b038116811461110a57600080fd5b60008060408385031215611df357600080fd5b823591506020830135611e0581611dcb565b809150509250929050565b600060208284031215611e2257600080fd5b8135611e2d81611dcb565b9392505050565b600060208284031215611e4657600080fd5b5035919050565b600080600060408486031215611e6257600080fd5b83359250602084013567ffffffffffffffff811115611e8057600080fd5b8401601f81018613611e9157600080fd5b803567ffffffffffffffff811115611ea857600080fd5b866020828401011115611eba57600080fd5b939660209190910195509293505050565b60008060008060808587031215611ee157600080fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215611f2857600080fd5b8335925060208401359150604084013567ffffffffffffffff811115611f4d57600080fd5b8401601f81018613611f5e57600080fd5b803567ffffffffffffffff811115611f7857611f78611efd565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611fa757611fa7611efd565b604052818152828201602001881015611fbf57600080fd5b816020840160208301376000602083830101528093505050509250925092565b801515811461110a57600080fd5b600060208284031215611fff57600080fd5b8135611e2d81611fdf565b60008060008060008060c0878903121561202357600080fd5b863561202e81611dcb565b9550602087013561203e81611dcb565b9450604087013561204e81611dcb565b9350606087013561205e81611dcb565b9250608087013561206e81611dcb565b915060a087013561207e81611dcb565b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156120cb576120cb6120a2565b92915050565b818103818111156120cb576120cb6120a2565b6000602082840312156120f657600080fd5b5051919050565b60006020828403121561210f57600080fd5b8151611e2d81611fdf565b634e487b7160e01b600052603160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600061216d602083018486612130565b949350505050565b838152604060208201526000610e85604083018486612130565b828152604060208201526000825180604084015260005b818110156121c357602081860181015160608684010152016121a6565b506000606082850101526060601f19601f830116840101915050939250505056fea2646970667358221220890fd5cc835b7aef4fa3530c26835d7213ccab49da6f0ff07f5c782eb50d8e0864736f6c634300081b0033
Deployed Bytecode
0x6080604052600436106101fc5760003560e01c8063715018a61161010d578063a694fc3a116100a0578063cc2a9a5b1161006f578063cc2a9a5b146105f2578063ddeadbb614610612578063e30c397814610651578063f2fde38b14610666578063f5715d561461068657600080fd5b8063a694fc3a14610572578063b3ab15fb14610592578063bfab2bb6146105b2578063c235fb14146105d257600080fd5b806382257e3f116100dc57806382257e3f146104f35780638da5cb5b146105135780638e29ebb514610528578063983586d91461054857600080fd5b8063715018a614610489578063734e6cad1461049e578063740b91f4146104be57806379ba5097146104de57600080fd5b80633b24b5471161019057806357039e911161015f57806357039e9114610400578063570ca73514610413578063582f1da21461043357806358951c68146104535780637129bbac1461047357600080fd5b80633b24b5471461035e578063405a2c1c146103a057806350d7be5f146103c057806351eafd87146103e057600080fd5b80631b449f06116101cc5780631b449f06146102de57806321d93090146102fe57806328ed3db61461031e5780633924c33c1461033e57600080fd5b80625c54fc14610240578063029c9ae914610257578063059f8b16146102945780630f3b647e146102be57600080fd5b3661023b57604080513381523460208201527fbfe611b001dfcd411432f7bf0d79b82b4b2ee81511edac123a3403c357fb972a910160405180910390a1005b600080fd5b34801561024c57600080fd5b506102556106dd565b005b34801561026357600080fd5b50600154610277906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102a057600080fd5b506102b0670de0b6b3a764000081565b60405190815260200161028b565b3480156102ca57600080fd5b506102556102d9366004611de0565b6109b0565b3480156102ea57600080fd5b506102556102f9366004611e10565b610a51565b34801561030a57600080fd5b506102b0610319366004611e34565b610ae9565b34801561032a57600080fd5b50610255610339366004611e34565b610b0a565b34801561034a57600080fd5b50610255610359366004611e10565b610c28565b34801561036a57600080fd5b5061037e610379366004611e34565b610cc0565b604080518251815260208084015190820152918101519082015260600161028b565b3480156103ac57600080fd5b506102556103bb366004611e34565b610d1d565b3480156103cc57600080fd5b506102b06103db366004611e4d565b610d66565b3480156103ec57600080fd5b506102556103fb366004611ecb565b610e8e565b61025561040e366004611f13565b610fd7565b34801561041f57600080fd5b50600454610277906001600160a01b031681565b34801561043f57600080fd5b5061025561044e366004611e34565b6110f9565b34801561045f57600080fd5b5061025561046e366004611fed565b61110d565b34801561047f57600080fd5b506102b060095481565b34801561049557600080fd5b5061025561116b565b3480156104aa57600080fd5b50600754610277906001600160a01b031681565b3480156104ca57600080fd5b50600254610277906001600160a01b031681565b3480156104ea57600080fd5b5061025561117f565b3480156104ff57600080fd5b5061025561050e366004611e10565b6111c4565b34801561051f57600080fd5b5061027761124f565b34801561053457600080fd5b50600354610277906001600160a01b031681565b34801561055457600080fd5b50600a546105629060ff1681565b604051901515815260200161028b565b34801561057e57600080fd5b5061025561058d366004611e34565b611284565b34801561059e57600080fd5b506102556105ad366004611e10565b611566565b3480156105be57600080fd5b506102556105cd366004611e10565b6115fe565b3480156105de57600080fd5b50600054610277906001600160a01b031681565b3480156105fe57600080fd5b5061025561060d36600461200a565b611696565b34801561061e57600080fd5b5061063261062d366004611e34565b6118f7565b604080516001600160a01b03909316835290151560208301520161028b565b34801561065d57600080fd5b50610277611925565b34801561067257600080fd5b50610255610681366004611e10565b61194e565b34801561069257600080fd5b506106c26106a1366004611e34565b60056020526000908152604090208054600182015460029092015490919083565b6040805193845260208401929092529082015260600161028b565b600a5460ff1661070057604051630cfb2abb60e41b815260040160405180910390fd5b600080600880548060200260200160405190810160405280929190818152602001828054801561074f57602002820191906000526020600020905b81548152602001906001019080831161073b575b5050505050905060005b81518110156107d75760008282815181106107765761077661208c565b60200260200101519050600061078b82610cc0565b805190915082906107bb576040516335a6861360e11b81526004016107b291815260200190565b60405180910390fd5b5060408101516107cb90866120b8565b94505050600101610759565b5081600954101561081b576000600954836107f291906120d1565b90506107fd816119d3565b806009600082825461080f91906120b8565b9091555061086b915050565b8160095411156108525760008260095461083591906120d1565b905061084081611a97565b806009600082825461080f91906120d1565b604051637bb44c2160e11b815260040160405180910390fd5b600080546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156108b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d891906120e4565b905080156109ab5760005460015460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015610935573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095991906120fd565b61097657604051638205342760e01b815260040160405180910390fd5b6040518181527f4ae5bd787f4cd94b85a88836b5cefe362f37828a82ecd6172ae39aa907f3dec9906020015b60405180910390a15b505050565b6109b8611b5b565b6001600160a01b0381166109df5760405163ef945a6560e01b815260040160405180910390fd5b600082815260066020526040902080546001600160a01b0319166001600160a01b038316179055610a0f82611b8d565b6040516001600160a01b038216815282907f36faf335eb63af51ba93e9dd185ae816d74a9bac978bc399b49b11137ecd48189060200160405180910390a25050565b610a59611b5b565b6001600160a01b038116610a805760405163ef945a6560e01b815260040160405180910390fd5b600254604080516001600160a01b03928316815291831660208301527ffc944a5f86de9fcfac9dd7587ad1fbfb44e832bfeddec35cad2884cab5d7da65910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b60088181548110610af957600080fd5b600091825260209091200154905081565b610b12611b5b565b600080805b600854811015610b59578360088281548110610b3557610b3561208c565b906000526020600020015403610b515780925060019150610b59565b600101610b17565b508281610b7c576040516354a5785b60e11b81526004016107b291815260200190565b5060088054610b8d906001906120d1565b81548110610b9d57610b9d61208c565b906000526020600020015460088381548110610bbb57610bbb61208c565b6000918252602090912001556008805480610bd857610bd861211a565b600190038181906000526020600020016000905590557f6065156fce04c2111fb2766a72318ef9845d87e0e4eebcf9c3400d1b0d22f42283836040516109a2929190918252602082015260400190565b610c30611b5b565b6001600160a01b038116610c575760405163ef945a6560e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fe8282554581f4f6dcc4a6fbb857f7e89cad72736bcb699bf4205e3665b8e7066910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ce460405180606001604052806000815260200160008152602001600081525090565b50600090815260056020908152604091829020825160608101845281548152600182015492810192909252600201549181019190915290565b610d25611b5b565b60095460408051918252602082018390527f4ebdc55b116c8f3b6be61532cd8931e2cdc8990f5c56087cbadb83c96a314c08910160405180910390a1600955565b600080610d7285611c36565b90506001600160a01b038116610d9b57604051636389838560e11b815260040160405180910390fd5b604051638d02167d60e01b81526001600160a01b03821690638d02167d90610dc99087908790600401612159565b602060405180830381865afa158015610de6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0a91906120e4565b604051632296888760e11b81526001600160a01b0383169063452d110e90610e3a90899089908990600401612175565b602060405180830381865afa158015610e57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7b91906120e4565b610e8591906120d1565b95945050505050565b83610e9881611c36565b6001600160a01b0316336001600160a01b031614610ec9576040516308ce245d60e31b815260040160405180910390fd5b8342811115610eee576040516336ce2d0f60e11b81526004016107b291815260200190565b50600085815260056020908152604091829020825160608101845281548082526001830154938201939093526002909101549281019290925215610f5457805185908111610f5257604051636e6f496160e01b81526004016107b291815260200190565b505b6040805160608082018352878252602080830188815283850188815260008c8152600584528690208551815591516001830155516002909101558351898152908101889052928301869052909188917f32d49425af41fa76a45e8ef674babb83acc4d8312d2dffe76903c97b7089249a910160405180910390a250505050505050565b6004546001600160a01b03163314806110085750610ff361124f565b6001600160a01b0316336001600160a01b0316145b611025576040516327e1f1e560e01b815260040160405180910390fd5b600061103084611c36565b90506001600160a01b03811661105957604051636389838560e11b815260040160405180910390fd5b4761106434856120b8565b1115839061108857604051636e5b995960e11b81526004016107b291815260200190565b506001600160a01b0381166335d439496110a234866120b8565b86856040518463ffffffff1660e01b81526004016110c192919061218f565b6000604051808303818588803b1580156110da57600080fd5b505af11580156110ee573d6000803e3d6000fd5b505050505050505050565b611101611b5b565b61110a81611b8d565b50565b611115611b5b565b600a546040805160ff9092161515825282151560208301527fd5c31b9c0e8a01c501ba52c814e2ad86843d0b06abcc9d5f19ea1b2a3f482c29910160405180910390a1600a805460ff1916911515919091179055565b611173611b5b565b61117d6000611c92565b565b3380611189611925565b6001600160a01b0316146111bb5760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b2565b61110a81611c92565b6111cc611b5b565b6001600160a01b0381166111f35760405163ef945a6560e01b815260040160405180910390fd5b6007546040516001600160a01b038084169216907f45d051af501a72e3e9cb0c59c70e94521b42cf1ba723cd0956bf5b8321616c4590600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6004546001600160a01b03163314806112b557506112a061124f565b6001600160a01b0316336001600160a01b0316145b6112d2576040516327e1f1e560e01b815260040160405180910390fd5b6002546001600160a01b03166112fb5760405163d667ca4560e01b815260040160405180910390fd5b804747821115611327576040516306836a2960e21b8152600481019290925260248201526044016107b2565b5050600260009054906101000a90046001600160a01b03166001600160a01b0316633f9085516040518163ffffffff1660e01b8152600401602060405180830381865afa15801561137c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a091906120e4565b8111156113c0576040516357337ea960e01b815260040160405180910390fd5b600260009054906101000a90046001600160a01b03166001600160a01b0316633a4b66f1826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561141057600080fd5b505af1158015611424573d6000803e3d6000fd5b5050600080546040516370a0823160e01b81523060048201529194506001600160a01b031692506370a082319150602401602060405180830381865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149691906120e4565b60005460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af11580156114ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151191906120fd565b61152e57604051638205342760e01b815260040160405180910390fd5b6040518181527f4ae5bd787f4cd94b85a88836b5cefe362f37828a82ecd6172ae39aa907f3dec9906020015b60405180910390a15050565b61156e611b5b565b6001600160a01b0381166115955760405163ef945a6560e01b815260040160405180910390fd5b600454604080516001600160a01b03928316815291831660208301527fd58299b712891143e76310d5e664c4203c940a67db37cf856bdaa3c5c76a802c910160405180910390a1600480546001600160a01b0319166001600160a01b0392909216919091179055565b611606611b5b565b6001600160a01b03811661162d5760405163ef945a6560e01b815260040160405180910390fd5b600154604080516001600160a01b03928316815291831660208301527f224a554a3f3aadb47d65ed2efd7c15f31f83deeee4b3717ed7ade9dec75c61f6910160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156116dc5750825b905060008267ffffffffffffffff1660011480156116f95750303b155b905081158015611707575080155b156117255760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561174f57845460ff60401b1916600160401b1785555b61175833611cce565b6001600160a01b038b1661177f5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b038a166117a65760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0389166117cd5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0388166117f45760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b03871661181b5760405163ef945a6560e01b815260040160405180910390fd5b6001600160a01b0386166118425760405163ef945a6560e01b815260040160405180910390fd5b600080546001600160a01b03199081166001600160a01b038e8116919091179092556001805482168d84161790556002805482168c84161790556007805482168b84161790556003805482168a84161790556004805490911691881691909117905583156118ea57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050505050565b60008061190383611c36565b6007549092506001600160a01b0390811690831603611920575060015b915091565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00611274565b611956611b5b565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b038316908117825561199a61124f565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6000546001600160a01b03166119fc57604051635ce3a26360e01b815260040160405180910390fd5b6000546001546040516340c10f1960e01b81526001600160a01b0391821660048201526024810184905291169081906340c10f1990604401600060405180830381600087803b158015611a4e57600080fd5b505af1158015611a62573d6000803e3d6000fd5b505050507f61f887a2f5c9e7b476f4c3dab1560bc4f01d991be63db8ab9dd0d826044ae1158260405161155a91815260200190565b6000546001600160a01b0316611ac057604051635ce3a26360e01b815260040160405180910390fd5b600054600154604051632770a7eb60e21b81526001600160a01b039182166004820152602481018490529116908190639dc29fac90604401600060405180830381600087803b158015611b1257600080fd5b505af1158015611b26573d6000803e3d6000fd5b505050507f4addf2dd216e30ceae7fd7eea5312852e3471df45182db976a324001db87c0b08260405161155a91815260200190565b33611b6461124f565b6001600160a01b03161461117d5760405163118cdaa760e01b81523360048201526024016107b2565b60005b600854811015611bca578160088281548110611bae57611bae61208c565b906000526020600020015403611bc2575050565b600101611b90565b50600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3018190556040518181527f81b76ca0f2f5caf9af258fb0d9955478a105e304a99322dd21ee8f35dcb494a69060200160405180910390a150565b6000818152600660205260409020546001600160a01b031680611c6157506007546001600160a01b03165b816001600160a01b038216611c8c57604051636efcc08960e01b81526004016107b291815260200190565b50919050565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155611cca82611cdf565b5050565b611cd6611d50565b61110a81611d99565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661117d57604051631afcd79f60e31b815260040160405180910390fd5b611da1611d50565b6001600160a01b0381166111bb57604051631e4fbdf760e01b8152600060048201526024016107b2565b6001600160a01b038116811461110a57600080fd5b60008060408385031215611df357600080fd5b823591506020830135611e0581611dcb565b809150509250929050565b600060208284031215611e2257600080fd5b8135611e2d81611dcb565b9392505050565b600060208284031215611e4657600080fd5b5035919050565b600080600060408486031215611e6257600080fd5b83359250602084013567ffffffffffffffff811115611e8057600080fd5b8401601f81018613611e9157600080fd5b803567ffffffffffffffff811115611ea857600080fd5b866020828401011115611eba57600080fd5b939660209190910195509293505050565b60008060008060808587031215611ee157600080fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215611f2857600080fd5b8335925060208401359150604084013567ffffffffffffffff811115611f4d57600080fd5b8401601f81018613611f5e57600080fd5b803567ffffffffffffffff811115611f7857611f78611efd565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611fa757611fa7611efd565b604052818152828201602001881015611fbf57600080fd5b816020840160208301376000602083830101528093505050509250925092565b801515811461110a57600080fd5b600060208284031215611fff57600080fd5b8135611e2d81611fdf565b60008060008060008060c0878903121561202357600080fd5b863561202e81611dcb565b9550602087013561203e81611dcb565b9450604087013561204e81611dcb565b9350606087013561205e81611dcb565b9250608087013561206e81611dcb565b915060a087013561207e81611dcb565b809150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156120cb576120cb6120a2565b92915050565b818103818111156120cb576120cb6120a2565b6000602082840312156120f657600080fd5b5051919050565b60006020828403121561210f57600080fd5b8151611e2d81611fdf565b634e487b7160e01b600052603160045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600061216d602083018486612130565b949350505050565b838152604060208201526000610e85604083018486612130565b828152604060208201526000825180604084015260005b818110156121c357602081860181015160608684010152016121a6565b506000606082850101526060601f19601f830116840101915050939250505056fea2646970667358221220890fd5cc835b7aef4fa3530c26835d7213ccab49da6f0ff07f5c782eb50d8e0864736f6c634300081b0033
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.