Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
2229594 | 38 days ago | Contract Creation | 0 S |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
FeeModel
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 20000 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import {Operation, Request} from "./Common.sol"; import {BaseOwnableUpgradeable} from "./base/BaseOwnableUpgradeable.sol"; contract FeeModel is BaseOwnableUpgradeable { uint32 public constant FEE_RATE_BASE = 1_000_000; struct FeeTier { uint224 amountTier; // Amount tier. uint32 feeRate; // Fee rate. } struct FeeConfig { uint256 maxFee; // Maximum fee. uint256 minFee; // Minimum fee. FeeTier[] tiers; // Order by amount asc. } mapping(Operation op => FeeConfig cfg) defaultFeeConfig; mapping(bytes32 dstChain => FeeConfig cfg) crosschainFeeConfig; mapping(address user => FeeConfig cfg) userBurnFeeConfig; event DefaultFeeConfigSet(Operation indexed _op, FeeConfig _config); event CrosschainFeeConfigSet(bytes32 indexed _chain, FeeConfig _config); event UserBurnFeeConfigSet(address indexed _user, FeeConfig _config); constructor(address _owner) { initialize(_owner); } function initialize(address _owner) public initializer { __BaseOwnableUpgradeable_init(_owner); } function _validateOp(Operation op) internal pure { require( op == Operation.Mint || op == Operation.Burn || op == Operation.CrosschainRequest, "Invalid op" ); } function _getFee( uint256 _amount, FeeConfig storage _config ) internal view returns (uint256 _fee) { uint256 minFee = _config.minFee; require(minFee < _amount, "amount lower than minimal fee"); uint256 length = _config.tiers.length; require(length > 0, "Empty fee config"); for (uint i = 0; i < length; i++) { FeeTier storage tier = _config.tiers[i]; if (i == length - 1 || _amount < uint256(tier.amountTier)) { // Note: Use `<` instead of `<=`, the border is not included. _fee = (uint256(tier.feeRate) * _amount) / FEE_RATE_BASE; break; } } // Cap the fee. if (_fee < minFee) { _fee = minFee; } uint256 maxFee = _config.maxFee; if (_fee > maxFee) { _fee = maxFee; } } function _validateConfig(FeeConfig calldata _config) internal pure { uint224 prevAmount = 0; require( _config.minFee <= 0.03 * 1e8, "Minimium fee should not exceed 0.03 FBTC" ); require( _config.minFee <= _config.maxFee, "Minimium fee should not exceed maximum fee" ); require(_config.tiers.length > 0, "Empty fee config"); for (uint i = 0; i < _config.tiers.length; i++) { FeeTier calldata tier = _config.tiers[i]; uint224 amount = tier.amountTier; require(amount >= prevAmount, "Tiers not in order"); prevAmount = amount; require( tier.feeRate <= FEE_RATE_BASE / 100, "Fee rate too high, > 1%" ); if (i == _config.tiers.length - 1) { require( amount == type(uint224).max, "The last tier should be uint224.max" ); } } } function setDefaultFeeConfig( Operation _op, FeeConfig calldata _config ) external onlyOwner { _validateOp(_op); _validateConfig(_config); defaultFeeConfig[_op] = _config; emit DefaultFeeConfigSet(_op, _config); } function setCrosschainFeeConfig( bytes32 _dstChain, FeeConfig calldata _config ) external onlyOwner { _validateConfig(_config); crosschainFeeConfig[_dstChain] = _config; emit CrosschainFeeConfigSet(_dstChain, _config); } function setUserBurnFeeConfig( address _user, FeeConfig calldata _config ) external onlyOwner { _validateConfig(_config); userBurnFeeConfig[_user] = _config; emit UserBurnFeeConfigSet(_user, _config); } // View functions. function getFee(Request calldata r) external view returns (uint256 _fee) { _validateOp(r.op); FeeConfig storage _config; if (r.op == Operation.CrosschainRequest) { _config = crosschainFeeConfig[r.dstChain]; if (_config.tiers.length > 0) return _getFee(r.amount, _config); } else if (r.op == Operation.Burn) { address _user = abi.decode(r.srcAddress, (address)); _config = userBurnFeeConfig[_user]; if (_config.tiers.length > 0) return _getFee(r.amount, _config); } _config = defaultFeeConfig[r.op]; if (_config.tiers.length > 0) return _getFee(r.amount, _config); revert("Fee config not set"); } function getDefaultFeeConfig( Operation _op ) external view returns (FeeConfig memory _config) { _config = defaultFeeConfig[_op]; require(_config.tiers.length > 0, "Fee config not set"); } function getCrosschainFeeConfig( bytes32 _dstChain ) external view returns (FeeConfig memory _config) { _config = crosschainFeeConfig[_dstChain]; require(_config.tiers.length > 0, "Fee config not set"); } function getUserBurnFeeConfig( address _user ) external view returns (FeeConfig memory _config) { _config = userBurnFeeConfig[_user]; require(_config.tiers.length > 0, "Fee config not set"); } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; enum Operation { Nop, // starts from 1. Mint, Burn, CrosschainRequest, CrosschainConfirm } enum Status { Unused, Pending, Confirmed, Rejected } struct Request { Operation op; Status status; uint128 nonce; // Those can be packed into one slot in evm storage. bytes32 srcChain; bytes srcAddress; bytes32 dstChain; bytes dstAddress; uint256 amount; // Transfer value without fee. uint256 fee; bytes extra; } struct UserInfo { bool locked; string depositAddress; string withdrawalAddress; } library ChainCode { // For EVM chains, the chain code is chain id in bytes32 format. bytes32 constant ETH = 0x0000000000000000000000000000000000000000000000000000000000000001; bytes32 constant MANTLE = 0x0000000000000000000000000000000000000000000000000000000000001388; // Other chains. bytes32 constant BTC = 0x0100000000000000000000000000000000000000000000000000000000000000; bytes32 constant SOLANA = 0x0200000000000000000000000000000000000000000000000000000000000000; // For test. bytes32 constant XTN = 0x0110000000000000000000000000000000000000000000000000000000000000; function getSelfChainCode() internal view returns (bytes32) { return bytes32(block.chainid); } } library RequestLib { /// @dev This request hash should be unique across all chains. /// op nonce srcChain dstChain /// (1) Mint: 1 nonce BTC chainid ... /// (2) Burn: 2 nonce chainid BTC ... /// (3) Cross: 3 nonce chainid dst ... /// (4) Cross confirm: 4 nonce src chainid ... /// On the same chain: /// The `nonce` differs /// On different chains: /// The `chain.id` differs or the `op` differs function getRequestHash( Request memory r ) internal pure returns (bytes32 _hash) { _hash = keccak256( abi.encode( r.op, r.nonce, r.srcChain, r.srcAddress, r.dstChain, r.dstAddress, r.amount, r.fee, r.extra // For Burn, this should be none. ) ); } function getCrossSourceRequestHash( Request memory src ) internal pure returns (bytes32 _hash) { // Save. bytes memory extra = src.extra; // Set temperary data to calculate hash. src.op = Operation.CrosschainRequest; src.extra = ""; // clear _hash = getRequestHash(src); // Restore. src.op = Operation.CrosschainConfirm; src.extra = extra; } }
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.20; import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {Ownable2StepUpgradeable} from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import {PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; abstract contract BaseOwnableUpgradeable is Ownable2StepUpgradeable, UUPSUpgradeable { using SafeERC20 for IERC20; function __BaseOwnableUpgradeable_init( address initialOwner ) internal onlyInitializing { __Ownable_init(initialOwner); __Ownable2Step_init(); __UUPSUpgradeable_init(); } function renounceOwnership() public override { revert("Unable to renounce ownership"); } function _authorizeUpgrade( address newImplementation ) internal override onlyOwner {} /// @notice Rescue and transfer assets locked in this contract. function rescue(address token, address to) external onlyOwner { if (token == address(0)) { (bool success, ) = payable(to).call{value: address(this).balance}( "" ); require(success, "ETH transfer failed"); } else { IERC20(token).safeTransfer( to, IERC20(token).balanceOf(address(this)) ); } } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// 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) (utils/Pausable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Pausable struct PausableStorage { bool _paused; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300; function _getPausableStorage() private pure returns (PausableStorage storage $) { assembly { $.slot := PausableStorageLocation } } /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { PausableStorage storage $ = _getPausableStorage(); $._paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { PausableStorage storage $ = _getPausableStorage(); return $._paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { PausableStorage storage $ = _getPausableStorage(); $._paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.20; import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol"; import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol"; import {Initializable} from "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. */ abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable __self = address(this); /** * @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)` * and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called, * while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string. * If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must * be the empty byte string if no function should be called, making it impossible to invoke the `receive` function * during an upgrade. */ string public constant UPGRADE_INTERFACE_VERSION = "5.0.0"; /** * @dev The call is from an unauthorized context. */ error UUPSUnauthorizedCallContext(); /** * @dev The storage `slot` is unsupported as a UUID. */ error UUPSUnsupportedProxiableUUID(bytes32 slot); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { _checkProxy(); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { _checkNotDelegated(); _; } function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual notDelegated returns (bytes32) { return ERC1967Utils.IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data); } /** * @dev Reverts if the execution is not performed via delegatecall or the execution * context is not of a proxy with an ERC1967-compliant implementation pointing to self. * See {_onlyProxy}. */ function _checkProxy() internal view virtual { if ( address(this) == __self || // Must be called through delegatecall ERC1967Utils.getImplementation() != __self // Must be called through an active proxy ) { revert UUPSUnauthorizedCallContext(); } } /** * @dev Reverts if the execution is performed via delegatecall. * See {notDelegated}. */ function _checkNotDelegated() internal view virtual { if (address(this) != __self) { // Must not be called through delegatecall revert UUPSUnauthorizedCallContext(); } } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call. * * As a security check, {proxiableUUID} is invoked in the new implementation, and the return value * is expected to be the implementation slot in ERC1967. * * Emits an {IERC1967-Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) { revert UUPSUnsupportedProxiableUUID(slot); } ERC1967Utils.upgradeToAndCall(newImplementation, data); } catch { // The implementation is not UUPS revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation); } } }
// 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 // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// 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.1) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.20; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol) pragma solidity ^0.8.20; import {IBeacon} from "../beacon/IBeacon.sol"; import {Address} from "../../utils/Address.sol"; import {StorageSlot} from "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. */ library ERC1967Utils { // We re-declare ERC-1967 events here because they can't be used directly from IERC1967. // This will be fixed in Solidity 0.8.21. At that point we should remove these events. /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev The `implementation` of the proxy is invalid. */ error ERC1967InvalidImplementation(address implementation); /** * @dev The `admin` of the proxy is invalid. */ error ERC1967InvalidAdmin(address admin); /** * @dev The `beacon` of the proxy is invalid. */ error ERC1967InvalidBeacon(address beacon); /** * @dev An upgrade function sees `msg.value > 0` that may be lost. */ error ERC1967NonPayable(); /** * @dev Returns the current implementation address. */ function getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (newImplementation.code.length == 0) { revert ERC1967InvalidImplementation(newImplementation); } StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Performs implementation upgrade with additional setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0) { Address.functionDelegateCall(newImplementation, data); } else { _checkNonPayable(); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using * the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { revert ERC1967InvalidAdmin(address(0)); } StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {IERC1967-AdminChanged} event. */ function changeAdmin(address newAdmin) internal { emit AdminChanged(getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1. */ // solhint-disable-next-line private-vars-leading-underscore bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (newBeacon.code.length == 0) { revert ERC1967InvalidBeacon(newBeacon); } StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon; address beaconImplementation = IBeacon(newBeacon).implementation(); if (beaconImplementation.code.length == 0) { revert ERC1967InvalidImplementation(beaconImplementation); } } /** * @dev Change the beacon and trigger a setup call if data is nonempty. * This function is payable only if the setup call is performed, otherwise `msg.value` is rejected * to avoid stuck value in the contract. * * Emits an {IERC1967-BeaconUpgraded} event. * * CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since * it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for * efficiency. */ function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } else { _checkNonPayable(); } } /** * @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract * if an upgrade doesn't perform an initialization call. */ function _checkNonPayable() private { if (msg.value > 0) { revert ERC1967NonPayable(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.20; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {UpgradeableBeacon} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/" ], "optimizer": { "enabled": true, "runs": 20000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","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":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_chain","type":"bytes32"},{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"indexed":false,"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"name":"CrosschainFeeConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum Operation","name":"_op","type":"uint8"},{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"indexed":false,"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"name":"DefaultFeeConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"indexed":false,"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"name":"UserBurnFeeConfigSet","type":"event"},{"inputs":[],"name":"FEE_RATE_BASE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_dstChain","type":"bytes32"}],"name":"getCrosschainFeeConfig","outputs":[{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Operation","name":"_op","type":"uint8"}],"name":"getDefaultFeeConfig","outputs":[{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"enum Operation","name":"op","type":"uint8"},{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"uint128","name":"nonce","type":"uint128"},{"internalType":"bytes32","name":"srcChain","type":"bytes32"},{"internalType":"bytes","name":"srcAddress","type":"bytes"},{"internalType":"bytes32","name":"dstChain","type":"bytes32"},{"internalType":"bytes","name":"dstAddress","type":"bytes"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes","name":"extra","type":"bytes"}],"internalType":"struct Request","name":"r","type":"tuple"}],"name":"getFee","outputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserBurnFeeConfig","outputs":[{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_dstChain","type":"bytes32"},{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"name":"setCrosschainFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Operation","name":"_op","type":"uint8"},{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"name":"setDefaultFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"components":[{"internalType":"uint256","name":"maxFee","type":"uint256"},{"internalType":"uint256","name":"minFee","type":"uint256"},{"components":[{"internalType":"uint224","name":"amountTier","type":"uint224"},{"internalType":"uint32","name":"feeRate","type":"uint32"}],"internalType":"struct FeeModel.FeeTier[]","name":"tiers","type":"tuple[]"}],"internalType":"struct FeeModel.FeeConfig","name":"_config","type":"tuple"}],"name":"setUserBurnFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a0346200025357601f6200256238819003918201601f19168301926001600160401b0392909183851183861017620002585781602092849260409788528339810103126200025357516001600160a01b039190828116908190036200025357306080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0092835460ff81871c1615938116801590816200024a575b60011490816200023f575b15908162000235575b5062000224576001600160401b0319811660011785558362000206575b50620000d76200026e565b620000e16200026e565b620000eb6200026e565b8115620001ee577f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b03199081169091557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805491821684179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36200017e6200026e565b620001886200026e565b620001ad575b50516122b19081620002b18239608051818181610b2e0152610e7a0152f35b68ff00000000000000001981541690557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d26020825160018152a1386200018e565b8451631e4fbdf760e01b815260006004820152602490fd5b6001600160481b0319166801000000000000000117845538620000cc565b855163f92ee8a960e01b8152600490fd5b90501538620000af565b303b159150620000a6565b8591506200009b565b600080fd5b634e487b7160e01b600052604160045260246000fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156200029e57565b604051631afcd79f60e31b8152600490fdfe60406080815260048036101561001457600080fd5b60009160e0918335831c92836317c3041b146113505783633cfdbfb61461127057836345ef03d1146110e55783634f1ef28614610df05783634fdf5d1d14610ba357836352d1902d14610b03578363573b24a91461096b57836361c3efb11461094d578363715018a6146108de57836379ba5097146108505783638da5cb5b146107fc578363ad3cb1cc1461074f578363b3be265514610619578363b5360ff81461045a57508263c4d66de814610262578263c794dff61461021457508163e30c3978146101bc575063f2fde38b146100ec57600080fd5b346101b95760206003193601126101b9576101056114c3565b61010d612112565b73ffffffffffffffffffffffffffffffffffffffff809116907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00827fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b80fd5b90503461021057816003193601126102105760209073ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054169051908152f35b5080fd5b9091503461025e57600319926020843601126101b95781359367ffffffffffffffff8511610210576101409085360301126101b957506020926102579101611c7a565b9051908152f35b8280fd5b9091503461025e57602060031936011261025e5761027e6114c3565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549160ff83861c16159267ffffffffffffffff811680159081610452575b6001149081610448575b15908161043f575b50610417578360017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000083161786556103e2575b5061030e612182565b610316612182565b61031e612182565b73ffffffffffffffffffffffffffffffffffffffff8216156103b357506103449061205e565b61034c612182565b610354612182565b61035c578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff602093541690555160018152a138808280f35b602490868651917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000166801000000000000000117845538610305565b5084517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b905015386102d2565b303b1591506102ca565b8591506102c0565b8492346106155760031991818336011261061157833593600585101561060d576024359167ffffffffffffffff8311610609576060838301958436030112610609576104a4612112565b6104ad86611791565b6104b6856118f6565b6104bf866115cd565b92853584556104e06044600260019660248501358882015501920187611615565b936801000000000000000085116105dd575081548483558085106105b5575b509190885260208089209189935b85851061054c578a8a7fa0bd31d2706f583ce676e13864da3fdf288f1310b2779a2272fa652d0db980d26105468c8c51918291826116a3565b0390a280f35b8688827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff6105768495611669565b167fffffffff000000000000000000000000000000000000000000000000000000006105a3888401611692565b871b161787550194019401939261050d565b828a52858560208c2092830192015b8281106105d25750506104ff565b8b81550186906105c4565b8960416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8680fd5b8580fd5b8480fd5b8380fd5b9184346101b957602092836003193601126102105773ffffffffffffffffffffffffffffffffffffffff61064b6114c3565b610653611fa7565b50168252603484528282209183519461066b866114eb565b83548652600260019485810154838901520180549367ffffffffffffffff85116107235750918551976106a3838660051b018a611552565b84895282890193825282822091935b8585106106dd576106d989896106cf8d8083850152511515611fc8565b5191829182611439565b0390f35b868481928a516106ec81611536565b86547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168252861c838201528152019301940193916106b2565b8360416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b848334610210578160031936011261021057805161076c81611536565b600581526020907f352e302e300000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b8481106107e657505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016107aa565b84833461021057816003193601126102105760209073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054169051908152f35b5091503461025e578260031936011261025e573373ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c005416036108ae57826108ab3361205e565b80f35b6024925051907f118cdaa70000000000000000000000000000000000000000000000000000000082523390820152fd5b5083346101b957806003193601126101b95750602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601c60248201527f556e61626c6520746f2072656e6f756e6365206f776e657273686970000000006044820152fd5b84833461021057816003193601126102105760209051620f42408152f35b84923461061557600319918183360112610611578335936024359167ffffffffffffffff8311610609576060838301958436030112610609576109ac612112565b6109b5856118f6565b8587526020926033845284882093863585556109e36044600260019760248601358982015501930188611615565b94680100000000000000008611610ad757508254858455808610610ab0575b50929189528089209189935b858510610a47578a8a7ff0e7cfe2ca0b00068136dbf0eb79d3d072d5ac7a3ab9bd4dccc65b5179e64e376105468c8c51918291826116a3565b8688827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff610a718495611669565b167fffffffff00000000000000000000000000000000000000000000000000000000610a9e888401611692565b871b1617875501940194019392610a0e565b838b528686848d2092830192015b828110610acc575050610a02565b8c8155018790610abe565b8a60416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b509083346101b957806003193601126101b9575073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163003610b7d57602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b5091503461025e578060031936011261025e57610bbe6114c3565b908360249283359073ffffffffffffffffffffffffffffffffffffffff9081831680930361061557610bee612112565b1680610c6d57508180809247905af1610c0561202e565b5015610c115750505080f35b60649291602060139251937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152fd5b9280925094939451907f70a08231000000000000000000000000000000000000000000000000000000008252308583015260209182818881885afa908115610de6578891610db5575b50835190838201927fa9059cbb000000000000000000000000000000000000000000000000000000008452888301526044820152604481526080810181811067ffffffffffffffff821117610d8a57845251610d23918891829182885af1610d1c61202e565b90856121db565b8051918215159182610d69575b50509050610d3f575050505080f35b51917f5274afe7000000000000000000000000000000000000000000000000000000008352820152fd5b80925081938101031261060957015180159081150361060d57803880610d30565b87896041897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b90508281813d8311610ddf575b610dcc8183611552565b81010312610ddb575138610cb6565b8780fd5b503d610dc2565b84513d8a823e3d90fd5b5091508060031936011261025e57610e066114c3565b90602493843567ffffffffffffffff81116102105736602382011215610210578085013593610e3485611593565b610e4085519182611552565b85815260209586820193368a838301011161060d578186928b8a930187378301015273ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000000000000000000000000000000000000000000000168030149081156110b7575b5061108f57610eb2612112565b8216958551907f52d1902d00000000000000000000000000000000000000000000000000000000825280828a818b5afa918291879361105f575b5050610f2157505050505051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b86899689927f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc908181036110315750853b156110035780547fffffffffffffffffffffffff0000000000000000000000000000000000000000168317905551869392917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a2825115610fce575050610fca9382915190845af4610fc461202e565b916121db565b5080f35b93509350505034610fde57505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b5087935051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b848a918451917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9080929350813d8311611088575b6110778183611552565b8101031261060d5751903880610eec565b503d61106d565b8786517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610ea5565b9250903461061557600319918183360112610611576111026114c3565b906024359167ffffffffffffffff83116106095760608383019584360301126106095773ffffffffffffffffffffffffffffffffffffffff90611143612112565b61114c866118f6565b169485875260209260348452848820938635855561117c6044600260019760248601358982015501930188611615565b94680100000000000000008611610ad757508254858455808610611249575b50929189528089209189935b8585106111e0578a8a7f27fa6c267e6b8b93544bb95461325d0878dce53f7c3683fc82c2976e3b0be1866105468c8c51918291826116a3565b8688827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff61120a8495611669565b167fffffffff00000000000000000000000000000000000000000000000000000000611237888401611692565b871b16178755019401940193926111a7565b838b528686848d2092830192015b82811061126557505061119b565b8c8155018790611257565b9184346101b957602092836003193601126102105761128d611fa7565b508035825260338452828220918351946112a6866114eb565b83548652600260019485810154838901520180549367ffffffffffffffff85116107235750918551976112de838660051b018a611552565b84895282890193825282822091935b85851061130a576106d989896106cf8d8083850152511515611fc8565b868481928a5161131981611536565b86547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168252861c838201528152019301940193916112ed565b9184346101b95760209283600319360112610210578035600581101561025e576113829061137c611fa7565b506115cd565b9183519461138f866114eb565b83548652600260019485810154838901520180549367ffffffffffffffff85116107235750918551976113c7838660051b018a611552565b84895282890193825282822091935b8585106113f3576106d989896106cf8d8083850152511515611fc8565b868481928a5161140281611536565b86547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168252861c838201528152019301940193916113d6565b90602080835260808301908251818501528060a0818501516040958691828901520151956060808201528651809552019401926000905b83821061147f57505050505090565b845180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16875283015163ffffffff16868401529485019493820193600190910190611470565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036114e657565b600080fd5b6060810190811067ffffffffffffffff82111761150757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761150757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761150757604052565b67ffffffffffffffff811161150757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60058110156115e6576000526032602052604060002090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156114e6570180359067ffffffffffffffff82116114e657602001918160061b360383136114e657565b357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681036114e65790565b3563ffffffff811681036114e65790565b9060209081835260808301918135818501526040918181013583860152828101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156114e657019281843594019467ffffffffffffffff85116114e6578460061b360386136114e6576060818101529084905260a001939291906000905b83821061173757505050505090565b909192939485357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168091036114e6578152818601359063ffffffff82168092036114e65782810191909152830194830193929160010190611728565b600581101590816115e65760018114918215611827575b8215611816575b5050156117b857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206f70000000000000000000000000000000000000000000006044820152fd5b9091506115e65760031438806117af565b5060028114915060006117a8565b1561183c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f456d7074792066656520636f6e666967000000000000000000000000000000006044820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146118c75760010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060209182810135622dc6c08111611bf657813510611b725760409182820161192c6119238285611615565b90501515611835565b815b6119388285611615565b9050811015611b6a5761194b8285611615565b821015611b3b578160061b019261196184611669565b907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff918280821692168210611ade5763ffffffff6119a08a612710939801611692565b1611611a81576119b08487611615565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101915081116118c75783146119f2575b50506119ed9061189a565b61192e565b036119fe5738806119e2565b6084868651907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602360248201527f546865206c61737420746965722073686f756c642062652075696e743232342e60448201527f6d617800000000000000000000000000000000000000000000000000000000006064820152fd5b6064888851907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601760248201527f466565207261746520746f6f20686967682c203e2031250000000000000000006044820152fd5b6064898951907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601260248201527f5469657273206e6f7420696e206f7264657200000000000000000000000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b505050505050565b608483604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f4d696e696d69756d206665652073686f756c64206e6f7420657863656564206d60448201527f6178696d756d20666565000000000000000000000000000000000000000000006064820152fd5b608484604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602860248201527f4d696e696d69756d206665652073686f756c64206e6f7420657863656564203060448201527f2e303320464254430000000000000000000000000000000000000000000000006064820152fd5b803560058110156114e657611c8e81611791565b600060038203611d4a5760a0830135600052603360205260406000206002810154611d3a57505b6114e657611cc2906115cd565b6002810154611d2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f46656520636f6e666967206e6f742073657400000000000000000000000000006044820152606490fd5b60e0611d37920135611dea565b90565b91505060e0611d37920135611dea565b60028203611cb55760808301357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112156114e6578301803567ffffffffffffffff81116114e657602082019181360383136114e657602091810103126114e6573573ffffffffffffffffffffffffffffffffffffffff81168091036114e657600052603460205260406000206002810154611d3a5750611cb5565b9190600092600060018301549180831015611f49576002840191825492611e12841515611835565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff840184811191835b868110611e6a575b50505050505050808410611e62575b5054808311611e5e5750565b9150565b925038611e52565b81855260208520810184611f1c578382148015611ef4575b611e955750611e909061189a565b611e3b565b95979a505050505091505460e01c828102928184041490151715611ec75750620f424090049238808080808080611e43565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526011600452fd5b507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154168710611e82565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f616d6f756e74206c6f776572207468616e206d696e696d616c206665650000006044820152fd5b60405190611fb4826114eb565b606060408360008152600060208201520152565b15611fcf57565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f46656520636f6e666967206e6f742073657400000000000000000000000000006044820152606490fd5b3d15612059573d9061203f82611593565b9161204d6040519384611552565b82523d6000602084013e565b606090565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008281541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549073ffffffffffffffffffffffffffffffffffffffff80931680948316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361215257565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156121b157565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b9061221a57508051156121f057805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580612272575b61222b575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b1561222356fea2646970667358221220f07b4b4d7099b247e0813daa296a992783068a42f977e841ee038a63b270a96f64736f6c63430008140033000000000000000000000000a55aa39feffe45836c9a07a04f9be566f6606f88
Deployed Bytecode
0x60406080815260048036101561001457600080fd5b60009160e0918335831c92836317c3041b146113505783633cfdbfb61461127057836345ef03d1146110e55783634f1ef28614610df05783634fdf5d1d14610ba357836352d1902d14610b03578363573b24a91461096b57836361c3efb11461094d578363715018a6146108de57836379ba5097146108505783638da5cb5b146107fc578363ad3cb1cc1461074f578363b3be265514610619578363b5360ff81461045a57508263c4d66de814610262578263c794dff61461021457508163e30c3978146101bc575063f2fde38b146100ec57600080fd5b346101b95760206003193601126101b9576101056114c3565b61010d612112565b73ffffffffffffffffffffffffffffffffffffffff809116907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00827fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227008380a380f35b80fd5b90503461021057816003193601126102105760209073ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0054169051908152f35b5080fd5b9091503461025e57600319926020843601126101b95781359367ffffffffffffffff8511610210576101409085360301126101b957506020926102579101611c7a565b9051908152f35b8280fd5b9091503461025e57602060031936011261025e5761027e6114c3565b907ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a009182549160ff83861c16159267ffffffffffffffff811680159081610452575b6001149081610448575b15908161043f575b50610417578360017fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000083161786556103e2575b5061030e612182565b610316612182565b61031e612182565b73ffffffffffffffffffffffffffffffffffffffff8216156103b357506103449061205e565b61034c612182565b610354612182565b61035c578280f35b7fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d291817fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff602093541690555160018152a138808280f35b602490868651917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000166801000000000000000117845538610305565b5084517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b905015386102d2565b303b1591506102ca565b8591506102c0565b8492346106155760031991818336011261061157833593600585101561060d576024359167ffffffffffffffff8311610609576060838301958436030112610609576104a4612112565b6104ad86611791565b6104b6856118f6565b6104bf866115cd565b92853584556104e06044600260019660248501358882015501920187611615565b936801000000000000000085116105dd575081548483558085106105b5575b509190885260208089209189935b85851061054c578a8a7fa0bd31d2706f583ce676e13864da3fdf288f1310b2779a2272fa652d0db980d26105468c8c51918291826116a3565b0390a280f35b8688827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff6105768495611669565b167fffffffff000000000000000000000000000000000000000000000000000000006105a3888401611692565b871b161787550194019401939261050d565b828a52858560208c2092830192015b8281106105d25750506104ff565b8b81550186906105c4565b8960416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8680fd5b8580fd5b8480fd5b8380fd5b9184346101b957602092836003193601126102105773ffffffffffffffffffffffffffffffffffffffff61064b6114c3565b610653611fa7565b50168252603484528282209183519461066b866114eb565b83548652600260019485810154838901520180549367ffffffffffffffff85116107235750918551976106a3838660051b018a611552565b84895282890193825282822091935b8585106106dd576106d989896106cf8d8083850152511515611fc8565b5191829182611439565b0390f35b868481928a516106ec81611536565b86547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168252861c838201528152019301940193916106b2565b8360416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b848334610210578160031936011261021057805161076c81611536565b600581526020907f352e302e300000000000000000000000000000000000000000000000000000008282015282519382859384528251928382860152825b8481106107e657505050828201840152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168101030190f35b81810183015188820188015287955082016107aa565b84833461021057816003193601126102105760209073ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930054169051908152f35b5091503461025e578260031936011261025e573373ffffffffffffffffffffffffffffffffffffffff7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c005416036108ae57826108ab3361205e565b80f35b6024925051907f118cdaa70000000000000000000000000000000000000000000000000000000082523390820152fd5b5083346101b957806003193601126101b95750602060649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601c60248201527f556e61626c6520746f2072656e6f756e6365206f776e657273686970000000006044820152fd5b84833461021057816003193601126102105760209051620f42408152f35b84923461061557600319918183360112610611578335936024359167ffffffffffffffff8311610609576060838301958436030112610609576109ac612112565b6109b5856118f6565b8587526020926033845284882093863585556109e36044600260019760248601358982015501930188611615565b94680100000000000000008611610ad757508254858455808610610ab0575b50929189528089209189935b858510610a47578a8a7ff0e7cfe2ca0b00068136dbf0eb79d3d072d5ac7a3ab9bd4dccc65b5179e64e376105468c8c51918291826116a3565b8688827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff610a718495611669565b167fffffffff00000000000000000000000000000000000000000000000000000000610a9e888401611692565b871b1617875501940194019392610a0e565b838b528686848d2092830192015b828110610acc575050610a02565b8c8155018790610abe565b8a60416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b509083346101b957806003193601126101b9575073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008691b08a7b9febfed05ea680270fbb72a82b9ea0163003610b7d57602090517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8152f35b517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b5091503461025e578060031936011261025e57610bbe6114c3565b908360249283359073ffffffffffffffffffffffffffffffffffffffff9081831680930361061557610bee612112565b1680610c6d57508180809247905af1610c0561202e565b5015610c115750505080f35b60649291602060139251937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f455448207472616e73666572206661696c6564000000000000000000000000006044820152fd5b9280925094939451907f70a08231000000000000000000000000000000000000000000000000000000008252308583015260209182818881885afa908115610de6578891610db5575b50835190838201927fa9059cbb000000000000000000000000000000000000000000000000000000008452888301526044820152604481526080810181811067ffffffffffffffff821117610d8a57845251610d23918891829182885af1610d1c61202e565b90856121db565b8051918215159182610d69575b50509050610d3f575050505080f35b51917f5274afe7000000000000000000000000000000000000000000000000000000008352820152fd5b80925081938101031261060957015180159081150361060d57803880610d30565b87896041897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b90508281813d8311610ddf575b610dcc8183611552565b81010312610ddb575138610cb6565b8780fd5b503d610dc2565b84513d8a823e3d90fd5b5091508060031936011261025e57610e066114c3565b90602493843567ffffffffffffffff81116102105736602382011215610210578085013593610e3485611593565b610e4085519182611552565b85815260209586820193368a838301011161060d578186928b8a930187378301015273ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000008691b08a7b9febfed05ea680270fbb72a82b9ea0168030149081156110b7575b5061108f57610eb2612112565b8216958551907f52d1902d00000000000000000000000000000000000000000000000000000000825280828a818b5afa918291879361105f575b5050610f2157505050505051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b86899689927f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc908181036110315750853b156110035780547fffffffffffffffffffffffff0000000000000000000000000000000000000000168317905551869392917fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8580a2825115610fce575050610fca9382915190845af4610fc461202e565b916121db565b5080f35b93509350505034610fde57505080f35b7fb398979f000000000000000000000000000000000000000000000000000000008152fd5b5087935051917f4c9c8ce3000000000000000000000000000000000000000000000000000000008352820152fd5b848a918451917faa1d49a4000000000000000000000000000000000000000000000000000000008352820152fd5b9080929350813d8311611088575b6110778183611552565b8101031261060d5751903880610eec565b503d61106d565b8786517fe07c8dba000000000000000000000000000000000000000000000000000000008152fd5b9050817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5416141538610ea5565b9250903461061557600319918183360112610611576111026114c3565b906024359167ffffffffffffffff83116106095760608383019584360301126106095773ffffffffffffffffffffffffffffffffffffffff90611143612112565b61114c866118f6565b169485875260209260348452848820938635855561117c6044600260019760248601358982015501930188611615565b94680100000000000000008611610ad757508254858455808610611249575b50929189528089209189935b8585106111e0578a8a7f27fa6c267e6b8b93544bb95461325d0878dce53f7c3683fc82c2976e3b0be1866105468c8c51918291826116a3565b8688827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff61120a8495611669565b167fffffffff00000000000000000000000000000000000000000000000000000000611237888401611692565b871b16178755019401940193926111a7565b838b528686848d2092830192015b82811061126557505061119b565b8c8155018790611257565b9184346101b957602092836003193601126102105761128d611fa7565b508035825260338452828220918351946112a6866114eb565b83548652600260019485810154838901520180549367ffffffffffffffff85116107235750918551976112de838660051b018a611552565b84895282890193825282822091935b85851061130a576106d989896106cf8d8083850152511515611fc8565b868481928a5161131981611536565b86547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168252861c838201528152019301940193916112ed565b9184346101b95760209283600319360112610210578035600581101561025e576113829061137c611fa7565b506115cd565b9183519461138f866114eb565b83548652600260019485810154838901520180549367ffffffffffffffff85116107235750918551976113c7838660051b018a611552565b84895282890193825282822091935b8585106113f3576106d989896106cf8d8083850152511515611fc8565b868481928a5161140281611536565b86547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168252861c838201528152019301940193916113d6565b90602080835260808301908251818501528060a0818501516040958691828901520151956060808201528651809552019401926000905b83821061147f57505050505090565b845180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16875283015163ffffffff16868401529485019493820193600190910190611470565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036114e657565b600080fd5b6060810190811067ffffffffffffffff82111761150757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761150757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761150757604052565b67ffffffffffffffff811161150757601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60058110156115e6576000526032602052604060002090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1813603018212156114e6570180359067ffffffffffffffff82116114e657602001918160061b360383136114e657565b357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff811681036114e65790565b3563ffffffff811681036114e65790565b9060209081835260808301918135818501526040918181013583860152828101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1823603018112156114e657019281843594019467ffffffffffffffff85116114e6578460061b360386136114e6576060818101529084905260a001939291906000905b83821061173757505050505090565b909192939485357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81168091036114e6578152818601359063ffffffff82168092036114e65782810191909152830194830193929160010190611728565b600581101590816115e65760018114918215611827575b8215611816575b5050156117b857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f496e76616c6964206f70000000000000000000000000000000000000000000006044820152fd5b9091506115e65760031438806117af565b5060028114915060006117a8565b1561183c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f456d7074792066656520636f6e666967000000000000000000000000000000006044820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146118c75760010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060209182810135622dc6c08111611bf657813510611b725760409182820161192c6119238285611615565b90501515611835565b815b6119388285611615565b9050811015611b6a5761194b8285611615565b821015611b3b578160061b019261196184611669565b907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff918280821692168210611ade5763ffffffff6119a08a612710939801611692565b1611611a81576119b08487611615565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101915081116118c75783146119f2575b50506119ed9061189a565b61192e565b036119fe5738806119e2565b6084868651907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602360248201527f546865206c61737420746965722073686f756c642062652075696e743232342e60448201527f6d617800000000000000000000000000000000000000000000000000000000006064820152fd5b6064888851907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601760248201527f466565207261746520746f6f20686967682c203e2031250000000000000000006044820152fd5b6064898951907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601260248201527f5469657273206e6f7420696e206f7264657200000000000000000000000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b505050505050565b608483604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f4d696e696d69756d206665652073686f756c64206e6f7420657863656564206d60448201527f6178696d756d20666565000000000000000000000000000000000000000000006064820152fd5b608484604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602860248201527f4d696e696d69756d206665652073686f756c64206e6f7420657863656564203060448201527f2e303320464254430000000000000000000000000000000000000000000000006064820152fd5b803560058110156114e657611c8e81611791565b600060038203611d4a5760a0830135600052603360205260406000206002810154611d3a57505b6114e657611cc2906115cd565b6002810154611d2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f46656520636f6e666967206e6f742073657400000000000000000000000000006044820152606490fd5b60e0611d37920135611dea565b90565b91505060e0611d37920135611dea565b60028203611cb55760808301357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112156114e6578301803567ffffffffffffffff81116114e657602082019181360383136114e657602091810103126114e6573573ffffffffffffffffffffffffffffffffffffffff81168091036114e657600052603460205260406000206002810154611d3a5750611cb5565b9190600092600060018301549180831015611f49576002840191825492611e12841515611835565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff840184811191835b868110611e6a575b50505050505050808410611e62575b5054808311611e5e5750565b9150565b925038611e52565b81855260208520810184611f1c578382148015611ef4575b611e955750611e909061189a565b611e3b565b95979a505050505091505460e01c828102928184041490151715611ec75750620f424090049238808080808080611e43565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526011600452fd5b507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8154168710611e82565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f616d6f756e74206c6f776572207468616e206d696e696d616c206665650000006044820152fd5b60405190611fb4826114eb565b606060408360008152600060208201520152565b15611fcf57565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f46656520636f6e666967206e6f742073657400000000000000000000000000006044820152606490fd5b3d15612059573d9061203f82611593565b9161204d6040519384611552565b82523d6000602084013e565b606090565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000907f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c008281541690557f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080549073ffffffffffffffffffffffffffffffffffffffff80931680948316179055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b73ffffffffffffffffffffffffffffffffffffffff7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005416330361215257565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156121b157565b60046040517fd7e6bcf8000000000000000000000000000000000000000000000000000000008152fd5b9061221a57508051156121f057805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b81511580612272575b61222b575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b1561222356fea2646970667358221220f07b4b4d7099b247e0813daa296a992783068a42f977e841ee038a63b270a96f64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a55aa39feffe45836c9a07a04f9be566f6606f88
-----Decoded View---------------
Arg [0] : _owner (address): 0xA55aA39fefFE45836c9A07a04f9BE566f6606f88
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a55aa39feffe45836c9a07a04f9be566f6606f88
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.