Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Erc20Vault
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // NOTE: This special version of the pTokens-erc20-vault is for ETH mainnet, and includes custom // logic to handle ETHPNT<->PNT fungibility, as well as custom logic to handle GALA tokens after // they upgraded from v1 to v2. pragma solidity ^0.8.0; import "./wEth/IWETH.sol"; import "./Withdrawable.sol"; import "./weth-unwrapper/IWEthUnwrapper.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC777/IERC777Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC777/IERC777RecipientUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC1820RegistryUpgradeable.sol"; contract Erc20Vault is Initializable, Withdrawable, IERC777RecipientUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; IERC1820RegistryUpgradeable constant private _erc1820 = IERC1820RegistryUpgradeable( 0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24 ); bytes32 constant private TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient"); bytes32 constant private Erc777Token_INTERFACE_HASH = keccak256("ERC777Token"); EnumerableSetUpgradeable.AddressSet private supportedTokens; address public PNETWORK; IWETH public weth; bytes4 public ORIGIN_CHAIN_ID; address private wEthUnwrapperAddress; address public constant PNT_TOKEN_ADDRESS = 0x89Ab32156e46F46D02ade3FEcbe5Fc4243B9AAeD; address public constant ETHPNT_TOKEN_ADDRESS = 0xf4eA6B892853413bD9d9f1a5D3a620A0ba39c5b2; event PegIn( address _tokenAddress, address _tokenSender, uint256 _tokenAmount, string _destinationAddress, bytes _userData, bytes4 _originChainId, bytes4 _destinationChainId ); function initialize( address _weth, address[] memory _tokensToSupport, bytes4 _originChainId ) public initializer { PNETWORK = msg.sender; for (uint256 i = 0; i < _tokensToSupport.length; i++) { supportedTokens.add(_tokensToSupport[i]); } weth = IWETH(_weth); _erc1820.setInterfaceImplementer(address(this), TOKENS_RECIPIENT_INTERFACE_HASH, address(this)); ORIGIN_CHAIN_ID = _originChainId; } modifier onlyPNetwork() { require(msg.sender == PNETWORK, "Caller must be PNETWORK address!"); _; } modifier onlySupportedTokens(address _tokenAddress) { require(supportedTokens.contains(_tokenAddress), "Token at supplied address is NOT supported!"); _; } function setWeth(address _weth) external onlyPNetwork { weth = IWETH(_weth); } function setWEthUnwrapperAddress(address _address) public onlyPNetwork { wEthUnwrapperAddress = _address; } function setPNetwork(address _pnetwork) external onlyPNetwork { require(_pnetwork != address(0), "Cannot set the zero address as the pNetwork address!"); PNETWORK = _pnetwork; } function isTokenSupported(address _token) external view returns(bool) { return supportedTokens.contains(_token); } function _owner() internal view override returns(address) { return PNETWORK; } function adminWithdrawAllowed(address asset) internal override view returns(uint) { return supportedTokens.contains(asset) ? 0 : super.adminWithdrawAllowed(asset); } function addSupportedToken( address _tokenAddress ) external onlyPNetwork returns (bool SUCCESS) { supportedTokens.add(_tokenAddress); return true; } function removeSupportedToken( address _tokenAddress ) external onlyPNetwork returns (bool SUCCESS) { return supportedTokens.remove(_tokenAddress); } function getSupportedTokens() external view returns(address[] memory res) { res = new address[](supportedTokens.length()); for (uint256 i = 0; i < supportedTokens.length(); i++) { res[i] = supportedTokens.at(i); } } function pegIn( uint256 _tokenAmount, address _tokenAddress, string calldata _destinationAddress, bytes4 _destinationChainId ) external returns (bool) { return pegIn(_tokenAmount, _tokenAddress, _destinationAddress, "", _destinationChainId); } function pegIn( uint256 _tokenAmount, address _tokenAddress, string memory _destinationAddress, bytes memory _userData, bytes4 _destinationChainId ) public onlySupportedTokens(_tokenAddress) returns (bool) { require(_tokenAmount > 0, "Token amount must be greater than zero!"); IERC20Upgradeable(_tokenAddress).safeTransferFrom(msg.sender, address(this), _tokenAmount); // NOTE: This is the special handling of the EthPNT token, where a peg in of EthPNT will // result in an event which will mint a PNT pToken on the other side of the bridge, thus // making fungible the PNT & EthPNT tokens. address normalizedTokenAddress = _tokenAddress == ETHPNT_TOKEN_ADDRESS ? PNT_TOKEN_ADDRESS : _tokenAddress; require(normalizedTokenAddress != address(0), "`normalizedTokenAddress` is set to zero address!"); emit PegIn( normalizedTokenAddress, msg.sender, _tokenAmount, _destinationAddress, _userData, ORIGIN_CHAIN_ID, _destinationChainId ); return true; } /** * @dev Implementation of IERC777Recipient. */ function tokensReceived( address /*operator*/, address from, address to, uint256 amount, bytes calldata userData, bytes calldata /*operatorData*/ ) external override onlySupportedTokens(msg.sender) { require(to == address(this), "Token receiver is not this contract"); if (userData.length > 0) { require(amount > 0, "Token amount must be greater than zero!"); (bytes32 tag, string memory _destinationAddress, bytes4 _destinationChainId) = abi.decode( userData, (bytes32, string, bytes4) ); require( tag == keccak256("ERC777-pegIn"), "Invalid tag for automatic pegIn on ERC777 send" ); emit PegIn( msg.sender, from, amount, _destinationAddress, userData, ORIGIN_CHAIN_ID, _destinationChainId ); } } function pegInEth( string calldata _destinationAddress, bytes4 _destinationChainId ) external payable returns (bool) { return pegInEth(_destinationAddress, _destinationChainId, ""); } function pegInEth( string memory _destinationAddress, bytes4 _destinationChainId, bytes memory _userData ) public payable returns (bool) { require(supportedTokens.contains(address(weth)), "WETH is NOT supported!"); require(msg.value > 0, "Ethers amount must be greater than zero!"); weth.deposit{ value: msg.value }(); emit PegIn( address(weth), msg.sender, msg.value, _destinationAddress, _userData, ORIGIN_CHAIN_ID, _destinationChainId ); return true; } function pegOutWeth( address payable _tokenRecipient, uint256 _tokenAmount, bytes memory _userData ) internal returns (bool) { // NOTE: This is a mitigation for the breaking changes introduced // by the Istanbul hard fork which caused the [out of gas] errors // due to opcode price changes which left too little gas remaining // in the stipend sent to the transfer method when called by a // proxied contract. // See: https://forum.openzeppelin.com/t/openzeppelin-upgradeable-contracts-affected-by-istanbul-hardfork/1616) weth.approve(wEthUnwrapperAddress, _tokenAmount); IWEthUnwrapper(wEthUnwrapperAddress).unwrap(_tokenAmount); // NOTE: This is the latest recommendation (@ time of writing) for transferring ETH. This no longer relies // on the provided 2300 gas stipend and instead forwards all available gas onwards. // SOURCE: https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now (bool success, ) = _tokenRecipient.call{ value: _tokenAmount }(_userData); require(success, "ETH transfer failed when pegging out wETH!"); return success; } function pegOut( address payable _tokenRecipient, address _tokenAddress, uint256 _tokenAmount ) public onlyPNetwork returns (bool success) { return _tokenAddress == address(weth) ? pegOutWeth(_tokenRecipient, _tokenAmount, "") : pegOutTokens(_tokenAddress, _tokenRecipient, _tokenAmount, ""); } function pegOut( address payable _tokenRecipient, address _tokenAddress, uint256 _tokenAmount, bytes calldata _userData ) external onlyPNetwork returns (bool success) { return _tokenAddress == address(weth) ? pegOutWeth(_tokenRecipient, _tokenAmount, _userData) : pegOutTokens(_tokenAddress, _tokenRecipient, _tokenAmount, _userData); } function pegOutTokens( address _tokenAddress, address _tokenRecipient, uint256 _tokenAmount, bytes memory _userData ) internal returns (bool success) { if (_tokenAddress == PNT_TOKEN_ADDRESS) { return handlePntPegOut(_tokenRecipient, _tokenAmount, _userData); } if (_tokenAddress == 0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA) { // NOTE: Gala v1 return handleGalaV1PegOut(_tokenRecipient, _tokenAmount); } if (tokenIsErc777(_tokenAddress)) { // NOTE: This is an ERC777 token, so let's use its `send` function so that hooks are called... IERC777Upgradeable(_tokenAddress).send(_tokenRecipient, _tokenAmount, _userData); } else { // NOTE: Otherwise, we use standard ERC20 transfer function instead. IERC20Upgradeable(_tokenAddress).safeTransfer(_tokenRecipient, _tokenAmount); } return true; } function tokenIsErc777(address _tokenAddress) view internal returns (bool) { return _erc1820.getInterfaceImplementer(_tokenAddress, Erc777Token_INTERFACE_HASH) != address(0); } function handleGalaV1PegOut( address _tokenRecipient, uint256 _tokenAmount ) internal returns (bool success) { // NOTE: Neither Gala tokens implement hooks so we use a basic ERC20 transfer. IERC20Upgradeable(0x15D4c048F83bd7e37d49eA4C83a07267Ec4203dA) // NOTE Gala v1 .safeTransfer(_tokenRecipient, _tokenAmount); IERC20Upgradeable(0xd1d2Eb1B1e90B638588728b4130137D262C87cae) // NOTE Gala v2 .safeTransfer(_tokenRecipient, _tokenAmount); return true; } function handlePntPegOut( address _tokenRecipient, uint256 _tokenAmount, bytes memory _userData ) internal returns (bool success) { // NOTE: The PNT contract is ERC777... IERC777Upgradeable pntContract = IERC777Upgradeable(PNT_TOKEN_ADDRESS); // NOTE: Whilst the EthPNT contract is ERC20. IERC20Upgradeable ethPntContract = IERC20Upgradeable(ETHPNT_TOKEN_ADDRESS); // NOTE: First we need to know how much PNT this vault holds... uint256 vaultPntTokenBalance = pntContract.balanceOf(address(this)); if (_tokenAmount <= vaultPntTokenBalance) { // NOTE: If we can peg out _entirely_ with PNT tokens, we do so... pntContract.send(_tokenRecipient, _tokenAmount, _userData); } else if (vaultPntTokenBalance == 0) { // NOTE: Here we must peg out entirely with ETHPNT tokens instead... ethPntContract.safeTransfer(_tokenRecipient, _tokenAmount); } else { // NOTE: And so here we must peg out the total using as much PNT as possible, with // the remainder being sent as EthPNT... pntContract.send(_tokenRecipient, vaultPntTokenBalance, _userData); ethPntContract.safeTransfer(_tokenRecipient, _tokenAmount - vaultPntTokenBalance); } return true; } receive() external payable { } function changeOriginChainId( bytes4 _newOriginChainId ) public onlyPNetwork returns (bool success) { ORIGIN_CHAIN_ID = _newOriginChainId; return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; function balanceOf(address who) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function allowance(address owner, address spender) external returns (uint256); function transferFrom(address src, address dst, uint wad) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.4.24; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "./AbstractOwnable.sol"; abstract contract Withdrawable is AbstractOwnable { using SafeERC20Upgradeable for IERC20Upgradeable; address constant ETHER = address(0); event LogWithdrawToken( address indexed _from, address indexed _token, uint amount ); /** * @dev Withdraw asset. * @param asset Asset to be withdrawn. */ function adminWithdraw(address asset) public onlyOwner { uint tokenBalance = adminWithdrawAllowed(asset); require(tokenBalance > 0, "admin witdraw not allowed"); _withdraw(asset, tokenBalance); } function _withdraw(address _tokenAddress, uint _amount) internal { if (_tokenAddress == ETHER) { payable(msg.sender).transfer(_amount); } else { IERC20Upgradeable(_tokenAddress).safeTransfer(msg.sender, _amount); } emit LogWithdrawToken(msg.sender, _tokenAddress, _amount); } // can be overridden to disallow withdraw for some token function adminWithdrawAllowed(address asset) internal virtual view returns(uint allowedAmount) { allowedAmount = asset == ETHER ? address(this).balance : IERC20Upgradeable(asset).balanceOf(address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; interface IWEthUnwrapper { function unwrap(uint _amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @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] * ``` * 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 Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 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. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _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. * * `initializer` is equivalent to `reinitializer(1)`, so 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. * * 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. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _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() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @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. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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 amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC777/IERC777.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC777Token standard as defined in the EIP. * * This contract uses the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let * token holders and recipients react to token movements by using setting implementers * for the associated interfaces in said registry. See {IERC1820Registry} and * {ERC1820Implementer}. */ interface IERC777Upgradeable { /** * @dev Emitted when `amount` tokens are created by `operator` and assigned to `to`. * * Note that some additional user `data` and `operatorData` can be logged in the event. */ event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData); /** * @dev Emitted when `operator` destroys `amount` tokens from `account`. * * Note that some additional user `data` and `operatorData` can be logged in the event. */ event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData); /** * @dev Emitted when `operator` is made operator for `tokenHolder` */ event AuthorizedOperator(address indexed operator, address indexed tokenHolder); /** * @dev Emitted when `operator` is revoked its operator status for `tokenHolder` */ event RevokedOperator(address indexed operator, address indexed tokenHolder); /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() external view returns (string memory); /** * @dev Returns the smallest part of the token that is not divisible. This * means all token operations (creation, movement and destruction) must have * amounts that are a multiple of this number. * * For most token contracts, this value will equal 1. */ function granularity() external view returns (uint256); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by an account (`owner`). */ function balanceOf(address owner) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * If send or receive hooks are registered for the caller and `recipient`, * the corresponding functions will be called with `data` and empty * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - the caller must have at least `amount` tokens. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function send( address recipient, uint256 amount, bytes calldata data ) external; /** * @dev Destroys `amount` tokens from the caller's account, reducing the * total supply. * * If a send hook is registered for the caller, the corresponding function * will be called with `data` and empty `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - the caller must have at least `amount` tokens. */ function burn(uint256 amount, bytes calldata data) external; /** * @dev Returns true if an account is an operator of `tokenHolder`. * Operators can send and burn tokens on behalf of their owners. All * accounts are their own operator. * * See {operatorSend} and {operatorBurn}. */ function isOperatorFor(address operator, address tokenHolder) external view returns (bool); /** * @dev Make an account an operator of the caller. * * See {isOperatorFor}. * * Emits an {AuthorizedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function authorizeOperator(address operator) external; /** * @dev Revoke an account's operator status for the caller. * * See {isOperatorFor} and {defaultOperators}. * * Emits a {RevokedOperator} event. * * Requirements * * - `operator` cannot be calling address. */ function revokeOperator(address operator) external; /** * @dev Returns the list of default operators. These accounts are operators * for all token holders, even if {authorizeOperator} was never called on * them. * * This list is immutable, but individual holders may revoke these via * {revokeOperator}, in which case {isOperatorFor} will return false. */ function defaultOperators() external view returns (address[] memory); /** * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must * be an operator of `sender`. * * If send or receive hooks are registered for `sender` and `recipient`, * the corresponding functions will be called with `data` and * `operatorData`. See {IERC777Sender} and {IERC777Recipient}. * * Emits a {Sent} event. * * Requirements * * - `sender` cannot be the zero address. * - `sender` must have at least `amount` tokens. * - the caller must be an operator for `sender`. * - `recipient` cannot be the zero address. * - if `recipient` is a contract, it must implement the {IERC777Recipient} * interface. */ function operatorSend( address sender, address recipient, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; /** * @dev Destroys `amount` tokens from `account`, reducing the total supply. * The caller must be an operator of `account`. * * If a send hook is registered for `account`, the corresponding function * will be called with `data` and `operatorData`. See {IERC777Sender}. * * Emits a {Burned} event. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. * - the caller must be an operator for `account`. */ function operatorBurn( address account, uint256 amount, bytes calldata data, bytes calldata operatorData ) external; event Sent( address indexed operator, address indexed from, address indexed to, uint256 amount, bytes data, bytes operatorData ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../extensions/draft-IERC20PermitUpgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20PermitUpgradeable token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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(IERC20Upgradeable 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, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. * * Accounts can be notified of {IERC777} tokens being sent to them by having a * contract implement this interface (contract holders can be their own * implementer) and registering it on the * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. * * See {IERC1820Registry} and {ERC1820Implementer}. */ interface IERC777RecipientUpgradeable { /** * @dev Called by an {IERC777} token contract whenever tokens are being * moved or created into a registered account (`to`). The type of operation * is conveyed by `from` being the zero address or not. * * This call occurs _after_ the token contract's state is updated, so * {IERC777-balanceOf}, etc., can be used to query the post-operation state. * * This function may revert to prevent the operation from being executed. */ function tokensReceived( address operator, address from, address to, uint256 amount, bytes calldata userData, bytes calldata operatorData ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/introspection/IERC1820Registry.sol) pragma solidity ^0.8.0; /** * @dev Interface of the global ERC1820 Registry, as defined in the * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register * implementers for interfaces in this registry, as well as query support. * * Implementers may be shared by multiple accounts, and can also implement more * than a single interface for each account. Contracts can implement interfaces * for themselves, but externally-owned accounts (EOA) must delegate this to a * contract. * * {IERC165} interfaces can also be queried via the registry. * * For an in-depth explanation and source code analysis, see the EIP text. */ interface IERC1820RegistryUpgradeable { event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer); event ManagerChanged(address indexed account, address indexed newManager); /** * @dev Sets `newManager` as the manager for `account`. A manager of an * account is able to set interface implementers for it. * * By default, each account is its own manager. Passing a value of `0x0` in * `newManager` will reset the manager to this initial state. * * Emits a {ManagerChanged} event. * * Requirements: * * - the caller must be the current manager for `account`. */ function setManager(address account, address newManager) external; /** * @dev Returns the manager for `account`. * * See {setManager}. */ function getManager(address account) external view returns (address); /** * @dev Sets the `implementer` contract as ``account``'s implementer for * `interfaceHash`. * * `account` being the zero address is an alias for the caller's address. * The zero address can also be used in `implementer` to remove an old one. * * See {interfaceHash} to learn how these are created. * * Emits an {InterfaceImplementerSet} event. * * Requirements: * * - the caller must be the current manager for `account`. * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not * end in 28 zeroes). * - `implementer` must implement {IERC1820Implementer} and return true when * queried for support, unless `implementer` is the caller. See * {IERC1820Implementer-canImplementInterfaceForAddress}. */ function setInterfaceImplementer( address account, bytes32 _interfaceHash, address implementer ) external; /** * @dev Returns the implementer of `interfaceHash` for `account`. If no such * implementer is registered, returns the zero address. * * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28 * zeroes), `account` will be queried for support of it. * * `account` being the zero address is an alias for the caller's address. */ function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address); /** * @dev Returns the interface hash for an `interfaceName`, as defined in the * corresponding * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP]. */ function interfaceHash(string calldata interfaceName) external pure returns (bytes32); /** * @notice Updates the cache with whether the contract implements an ERC165 interface or not. * @param account Address of the contract for which to update the cache. * @param interfaceId ERC165 interface for which to update the cache. */ function updateERC165Cache(address account, bytes4 interfaceId) external; /** * @notice Checks whether a contract implements an ERC165 interface or not. * If the result is not cached a direct lookup on the contract address is performed. * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling * {updateERC165Cache} with the contract address. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool); /** * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache. * @param account Address of the contract to check. * @param interfaceId ERC165 interface to check. * @return True if `account` implements `interfaceId`, false otherwise. */ function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract AbstractOwnable { modifier onlyOwner() { require(_owner() == msg.sender, "caller is not the owner"); _; } function _owner() internal virtual returns(address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @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. */ interface IERC20PermitUpgradeable { /** * @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]. */ 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 v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @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, it is bubbled up by this * function (like regular Solidity function calls). * * 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. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @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`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogWithdrawToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_tokenAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_tokenSender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"indexed":false,"internalType":"string","name":"_destinationAddress","type":"string"},{"indexed":false,"internalType":"bytes","name":"_userData","type":"bytes"},{"indexed":false,"internalType":"bytes4","name":"_originChainId","type":"bytes4"},{"indexed":false,"internalType":"bytes4","name":"_destinationChainId","type":"bytes4"}],"name":"PegIn","type":"event"},{"inputs":[],"name":"ETHPNT_TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORIGIN_CHAIN_ID","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PNETWORK","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PNT_TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"addSupportedToken","outputs":[{"internalType":"bool","name":"SUCCESS","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"adminWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_newOriginChainId","type":"bytes4"}],"name":"changeOriginChainId","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getSupportedTokens","outputs":[{"internalType":"address[]","name":"res","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address[]","name":"_tokensToSupport","type":"address[]"},{"internalType":"bytes4","name":"_originChainId","type":"bytes4"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"isTokenSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"string","name":"_destinationAddress","type":"string"},{"internalType":"bytes4","name":"_destinationChainId","type":"bytes4"}],"name":"pegIn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"string","name":"_destinationAddress","type":"string"},{"internalType":"bytes","name":"_userData","type":"bytes"},{"internalType":"bytes4","name":"_destinationChainId","type":"bytes4"}],"name":"pegIn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_destinationAddress","type":"string"},{"internalType":"bytes4","name":"_destinationChainId","type":"bytes4"},{"internalType":"bytes","name":"_userData","type":"bytes"}],"name":"pegInEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"_destinationAddress","type":"string"},{"internalType":"bytes4","name":"_destinationChainId","type":"bytes4"}],"name":"pegInEth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_tokenRecipient","type":"address"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"},{"internalType":"bytes","name":"_userData","type":"bytes"}],"name":"pegOut","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_tokenRecipient","type":"address"},{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"pegOut","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"removeSupportedToken","outputs":[{"internalType":"bool","name":"SUCCESS","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pnetwork","type":"address"}],"name":"setPNetwork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setWEthUnwrapperAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_weth","type":"address"}],"name":"setWeth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"userData","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50612566806100206000396000f3fe6080604052600436106101385760003560e01c806376319190116100ab578063b8d1452f1161006f578063b8d1452f14610390578063c26bbfe1146103b0578063c322525d146103d0578063ca4c7df7146103f0578063d3c7c2c714610403578063e62ece30146104255761013f565b806376319190146102f05780637c89fed01461031057806383c09d421461033057806384570d2f14610350578063a28835b6146103705761013f565b80632c1cad15116100fd5780632c1cad15146102285780632c99d4e21461024857806330498534146102685780633fc8cef3146102905780636d69fcaf146102b057806375151b63146102d05761013f565b806223de29146101445780630dd85b001461016657806314ac3ba6146101a55780631ece240a146101c857806322965469146102085761013f565b3661013f57005b600080fd5b34801561015057600080fd5b5061016461015f366004611e00565b610445565b005b34801561017257600080fd5b5060045461018790600160a01b900460e01b81565b6040516001600160e01b031990911681526020015b60405180910390f35b6101b86101b3366004612055565b6105fe565b604051901515815260200161019c565b3480156101d457600080fd5b506101f073f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b281565b6040516001600160a01b03909116815260200161019c565b34801561021457600080fd5b506101b8610223366004611d8f565b610782565b34801561023457600080fd5b506101b8610243366004611ff2565b610856565b34801561025457600080fd5b506003546101f0906001600160a01b031681565b34801561027457600080fd5b506101f07389ab32156e46f46d02ade3fecbe5fc4243b9aaed81565b34801561029c57600080fd5b506004546101f0906001600160a01b031681565b3480156102bc57600080fd5b506101b86102cb366004611d17565b6108a8565b3480156102dc57600080fd5b506101b86102eb366004611d17565b6108e9565b3480156102fc57600080fd5b506101b861030b366004611d17565b6108fc565b34801561031c57600080fd5b506101b861032b3660046120de565b610934565b34801561033c57600080fd5b506101b861034b366004611d4f565b610987565b34801561035c57600080fd5b5061016461036b366004611eae565b610a0b565b34801561037c57600080fd5b5061016461038b366004611d17565b610c4e565b34801561039c57600080fd5b506101646103ab366004611d17565b610d22565b3480156103bc57600080fd5b506101646103cb366004611d17565b610d6e565b3480156103dc57600080fd5b506101b86103eb36600461214d565b610dba565b6101b86103fe36600461200c565b610f2a565b34801561040f57600080fd5b50610418610f7b565b60405161019c9190612336565b34801561043157600080fd5b50610164610440366004611d17565b611046565b33610451600182611105565b6104765760405162461bcd60e51b815260040161046d906123cb565b60405180910390fd5b6001600160a01b03871630146104da5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e207265636569766572206973206e6f74207468697320636f6e74726044820152621858dd60ea1b606482015260840161046d565b83156105f357600086116105005760405162461bcd60e51b815260040161046d90612416565b6000808061051087890189611fa6565b9250925092507f0ff2ffbc34ecf263fc4e3226fd1c5f750a85f5bda6a8597e1c51ea1a18a36936831461059c5760405162461bcd60e51b815260206004820152602e60248201527f496e76616c69642074616720666f72206175746f6d6174696320706567496e2060448201526d1bdb88115490cdcdcdc81cd95b9960921b606482015260840161046d565b6004546040517fc03be660a5421fb17c93895da9db564bd4485d475f0d8b3175f7d55ed421bebb916105e79133918f918e9188918f918f91600160a01b90910460e01b908a90612217565b60405180910390a15050505b505050505050505050565b600454600090610619906001906001600160a01b0316611105565b61065e5760405162461bcd60e51b815260206004820152601660248201527557455448206973204e4f5420737570706f727465642160501b604482015260640161046d565b600034116106bf5760405162461bcd60e51b815260206004820152602860248201527f45746865727320616d6f756e74206d7573742062652067726561746572207468604482015267616e207a65726f2160c01b606482015260840161046d565b6004805460408051630d0e30db60e41b815290516001600160a01b039092169263d0e30db0923492808301926000929182900301818588803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b50506004546040517fc03be660a5421fb17c93895da9db564bd4485d475f0d8b3175f7d55ed421bebb945061076f93506001600160a01b0382169250339134918a918991600160a01b90910460e01b908b90612298565b60405180910390a15060015b9392505050565b6003546000906001600160a01b031633146107af5760405162461bcd60e51b815260040161046d90612396565b6004546001600160a01b0386811691161461080b5761080685878686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061112692505050565b61084c565b61084c868585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061122292505050565b9695505050505050565b6003546000906001600160a01b031633146108835760405162461bcd60e51b815260040161046d90612396565b506004805463ffffffff60a01b1916600160a01b60e084901c0217905560015b919050565b6003546000906001600160a01b031633146108d55760405162461bcd60e51b815260040161046d90612396565b6108e06001836113d0565b50600192915050565b60006108f6600183611105565b92915050565b6003546000906001600160a01b031633146109295760405162461bcd60e51b815260040161046d90612396565b6108f66001836113e5565b600061084c868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081529250889150610dba9050565b6003546000906001600160a01b031633146109b45760405162461bcd60e51b815260040161046d90612396565b6004546001600160a01b038481169116146109e9576109e483858460405180602001604052806000815250611126565b610a03565b610a03848360405180602001604052806000815250611222565b949350505050565b600054610100900460ff1615808015610a2b5750600054600160ff909116105b80610a455750303b158015610a45575060005460ff166001145b610aa85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161046d565b6000805460ff191660011790558015610acb576000805461ff0019166101001790555b600380546001600160a01b0319163317905560005b8351811015610b3757610b24848281518110610b0c57634e487b7160e01b600052603260045260246000fd5b602002602001015160016113d090919063ffffffff16565b5080610b2f816124d1565b915050610ae0565b50600480546001600160a01b0319166001600160a01b0386161781556040516329965a1d60e01b8152309181018290527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201526044810191909152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b158015610bce57600080fd5b505af1158015610be2573d6000803e3d6000fd5b50506004805463ffffffff60a01b1916600160a01b60e087901c0217905550508015610c48576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b33610c616003546001600160a01b031690565b6001600160a01b031614610cb75760405162461bcd60e51b815260206004820152601760248201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604482015260640161046d565b6000610cc2826113fa565b905060008111610d145760405162461bcd60e51b815260206004820152601960248201527f61646d696e2077697464726177206e6f7420616c6c6f77656400000000000000604482015260640161046d565b610d1e8282611421565b5050565b6003546001600160a01b03163314610d4c5760405162461bcd60e51b815260040161046d90612396565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314610d985760405162461bcd60e51b815260040161046d90612396565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600084610dc8600182611105565b610de45760405162461bcd60e51b815260040161046d906123cb565b60008711610e045760405162461bcd60e51b815260040161046d90612416565b610e196001600160a01b03871633308a6114ba565b60006001600160a01b03871673f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b214610e455786610e5b565b7389ab32156e46f46d02ade3fecbe5fc4243b9aaed5b90506001600160a01b038116610ecc5760405162461bcd60e51b815260206004820152603060248201527f606e6f726d616c697a6564546f6b656e4164647265737360206973207365742060448201526f746f207a65726f20616464726573732160801b606482015260840161046d565b6004546040517fc03be660a5421fb17c93895da9db564bd4485d475f0d8b3175f7d55ed421bebb91610f1491849133918d918c918c91600160a01b900460e01b908c90612298565b60405180910390a1506001979650505050505050565b6000610a0384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516020810190915290815287935091506105fe9050565b6060610f876001611525565b67ffffffffffffffff811115610fad57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610fd6578160200160208202803683370190505b50905060005b610fe66001611525565b81101561104257610ff860018261152f565b82828151811061101857634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061103a816124d1565b915050610fdc565b5090565b6003546001600160a01b031633146110705760405162461bcd60e51b815260040161046d90612396565b6001600160a01b0381166110e35760405162461bcd60e51b815260206004820152603460248201527f43616e6e6f742073657420746865207a65726f20616464726573732061732074604482015273686520704e6574776f726b20616464726573732160601b606482015260840161046d565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526001919091016020526040902054151590565b60006001600160a01b0385167389ab32156e46f46d02ade3fecbe5fc4243b9aaed141561115f5761115884848461153b565b9050610a03565b7315d4c048f83bd7e37d49ea4c83a07267ec4203da6001600160a01b038616141561118e5761115884846116f8565b61119785611738565b1561120357604051634decdde360e11b81526001600160a01b03861690639bd9bbc6906111cc90879087908790600401612306565b600060405180830381600087803b1580156111e657600080fd5b505af11580156111fa573d6000803e3d6000fd5b50505050611217565b6112176001600160a01b03861685856117ff565b506001949350505050565b6004805460055460405163095ea7b360e01b81526001600160a01b03918216938101939093526024830185905260009291169063095ea7b390604401602060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b09190611f86565b50600554604051636f074d1f60e11b8152600481018590526001600160a01b039091169063de0e9a3e90602401600060405180830381600087803b1580156112f757600080fd5b505af115801561130b573d6000803e3d6000fd5b505050506000846001600160a01b0316848460405161132a91906121fb565b60006040518083038185875af1925050503d8060008114611367576040519150601f19603f3d011682016040523d82523d6000602084013e61136c565b606091505b5050905080610a035760405162461bcd60e51b815260206004820152602a60248201527f455448207472616e73666572206661696c6564207768656e2070656767696e67604482015269206f757420774554482160b01b606482015260840161046d565b600061077b836001600160a01b038416611834565b600061077b836001600160a01b038416611883565b6000611407600183611105565b61141957611414826119a0565b6108f6565b506000919050565b6001600160a01b03821661146257604051339082156108fc029083906000818181858888f1935050505015801561145c573d6000803e3d6000fd5b50611476565b6114766001600160a01b03831633836117ff565b6040518181526001600160a01b0383169033907f46ae78bc7b198b8b534ca0070d125569ac5f955976841c4343223079f3abf0de9060200160405180910390a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610c489085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a2f565b60006108f6825490565b600061077b8383611b01565b6040516370a0823160e01b81523060048201526000907389ab32156e46f46d02ade3fecbe5fc4243b9aaed9073f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b290839083906370a082319060240160206040518083038186803b1580156115a257600080fd5b505afa1580156115b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115da91906120c6565b905080861161164a57604051634decdde360e11b81526001600160a01b03841690639bd9bbc690611613908a908a908a90600401612306565b600060405180830381600087803b15801561162d57600080fd5b505af1158015611641573d6000803e3d6000fd5b505050506116eb565b80611668576116636001600160a01b03831688886117ff565b6116eb565b604051634decdde360e11b81526001600160a01b03841690639bd9bbc690611698908a9085908a90600401612306565b600060405180830381600087803b1580156116b257600080fd5b505af11580156116c6573d6000803e3d6000fd5b505050506116eb8782886116da919061248e565b6001600160a01b03851691906117ff565b5060019695505050505050565b60006117197315d4c048f83bd7e37d49ea4c83a07267ec4203da84846117ff565b6108e073d1d2eb1b1e90b638588728b4130137d262c87cae84846117ff565b60405163555ddc6560e11b81526001600160a01b03821660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248201526000908190731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca9060440160206040518083038186803b1580156117b657600080fd5b505afa1580156117ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ee9190611d33565b6001600160a01b0316141592915050565b6040516001600160a01b03831660248201526044810182905261182f90849063a9059cbb60e01b906064016114ee565b505050565b600081815260018301602052604081205461187b575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108f6565b5060006108f6565b600081815260018301602052604081205480156119965760006118a760018361248e565b85549091506000906118bb9060019061248e565b905081811461193c5760008660000182815481106118e957634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061191a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061195b57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108f6565b60009150506108f6565b60006001600160a01b03821615611a28576040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156119f057600080fd5b505afa158015611a04573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141491906120c6565b4792915050565b6000611a84826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b399092919063ffffffff16565b80519091501561182f5780806020019051810190611aa29190611f86565b61182f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161046d565b6000826000018281548110611b2657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6060610a038484600085856001600160a01b0385163b611b9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161046d565b600080866001600160a01b03168587604051611bb791906121fb565b60006040518083038185875af1925050503d8060008114611bf4576040519150601f19603f3d011682016040523d82523d6000602084013e611bf9565b606091505b5091509150611c09828286611c14565b979650505050505050565b60608315611c2357508161077b565b825115611c335782518084602001fd5b8160405162461bcd60e51b815260040161046d9190612383565b80356001600160e01b0319811681146108a357600080fd5b60008083601f840112611c76578182fd5b50813567ffffffffffffffff811115611c8d578182fd5b602083019150836020828501011115611ca557600080fd5b9250929050565b600082601f830112611cbc578081fd5b813567ffffffffffffffff811115611cd657611cd6612502565b611ce9601f8201601f191660200161245d565b818152846020838601011115611cfd578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611d28578081fd5b813561077b81612518565b600060208284031215611d44578081fd5b815161077b81612518565b600080600060608486031215611d63578182fd5b8335611d6e81612518565b92506020840135611d7e81612518565b929592945050506040919091013590565b600080600080600060808688031215611da6578081fd5b8535611db181612518565b94506020860135611dc181612518565b935060408601359250606086013567ffffffffffffffff811115611de3578182fd5b611def88828901611c65565b969995985093965092949392505050565b60008060008060008060008060c0898b031215611e1b578283fd5b8835611e2681612518565b97506020890135611e3681612518565b96506040890135611e4681612518565b955060608901359450608089013567ffffffffffffffff80821115611e69578485fd5b611e758c838d01611c65565b909650945060a08b0135915080821115611e8d578384fd5b50611e9a8b828c01611c65565b999c989b5096995094979396929594505050565b600080600060608486031215611ec2578283fd5b8335611ecd81612518565b925060208481013567ffffffffffffffff80821115611eea578485fd5b818701915087601f830112611efd578485fd5b813581811115611f0f57611f0f612502565b8381029150611f1f84830161245d565b8181528481019084860184860187018c1015611f39578889fd5b8895505b83861015611f675780359450611f5285612518565b84835260019590950194918601918601611f3d565b50809750505050505050611f7d60408501611c4d565b90509250925092565b600060208284031215611f97578081fd5b8151801515811461077b578182fd5b600080600060608486031215611fba578081fd5b83359250602084013567ffffffffffffffff811115611fd7578182fd5b611fe386828701611cac565b925050611f7d60408501611c4d565b600060208284031215612003578081fd5b61077b82611c4d565b600080600060408486031215612020578081fd5b833567ffffffffffffffff811115612036578182fd5b61204286828701611c65565b9094509250611f7d905060208501611c4d565b600080600060608486031215612069578081fd5b833567ffffffffffffffff80821115612080578283fd5b61208c87838801611cac565b945061209a60208701611c4d565b935060408601359150808211156120af578283fd5b506120bc86828701611cac565b9150509250925092565b6000602082840312156120d7578081fd5b5051919050565b6000806000806000608086880312156120f5578283fd5b85359450602086013561210781612518565b9350604086013567ffffffffffffffff811115612122578384fd5b61212e88828901611c65565b9094509250612141905060608701611c4d565b90509295509295909350565b600080600080600060a08688031215612164578283fd5b85359450602086013561217681612518565b9350604086013567ffffffffffffffff80821115612192578485fd5b61219e89838a01611cac565b945060608801359150808211156121b3578283fd5b506121c088828901611cac565b92505061214160808701611c4d565b600081518084526121e78160208601602086016124a5565b601f01601f19169290920160200192915050565b6000825161220d8184602087016124a5565b9190910192915050565b6001600160a01b038981168252881660208201526040810187905260e06060820181905260009061224a908301886121cf565b82810360808401528581528587602083013760208682018101929092526001600160e01b031994851660a08401529290931660c090910152601f909201601f19169091010195945050505050565b6001600160a01b038881168252871660208201526040810186905260e0606082018190526000906122cb908301876121cf565b82810360808401526122dd81876121cf565b6001600160e01b031995861660a08501529390941660c090920191909152509695505050505050565b600060018060a01b03851682528360208301526060604083015261232d60608301846121cf565b95945050505050565b6020808252825182820181905260009190848201906040850190845b818110156123775783516001600160a01b031683529284019291840191600101612352565b50909695505050505050565b60006020825261077b60208301846121cf565b6020808252818101527f43616c6c6572206d75737420626520504e4554574f524b206164647265737321604082015260600190565b6020808252602b908201527f546f6b656e20617420737570706c6965642061646472657373206973204e4f5460408201526a20737570706f727465642160a81b606082015260800190565b60208082526027908201527f546f6b656e20616d6f756e74206d7573742062652067726561746572207468616040820152666e207a65726f2160c81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561248657612486612502565b604052919050565b6000828210156124a0576124a06124ec565b500390565b60005b838110156124c05781810151838201526020016124a8565b83811115610c485750506000910152565b60006000198214156124e5576124e56124ec565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461252d57600080fd5b5056fea26469706673582212202f17069d1b245778535f5913d42e9ae8bff38762f51609f0bd5830fae809cfb464736f6c63430008020033
Deployed Bytecode
0x6080604052600436106101385760003560e01c806376319190116100ab578063b8d1452f1161006f578063b8d1452f14610390578063c26bbfe1146103b0578063c322525d146103d0578063ca4c7df7146103f0578063d3c7c2c714610403578063e62ece30146104255761013f565b806376319190146102f05780637c89fed01461031057806383c09d421461033057806384570d2f14610350578063a28835b6146103705761013f565b80632c1cad15116100fd5780632c1cad15146102285780632c99d4e21461024857806330498534146102685780633fc8cef3146102905780636d69fcaf146102b057806375151b63146102d05761013f565b806223de29146101445780630dd85b001461016657806314ac3ba6146101a55780631ece240a146101c857806322965469146102085761013f565b3661013f57005b600080fd5b34801561015057600080fd5b5061016461015f366004611e00565b610445565b005b34801561017257600080fd5b5060045461018790600160a01b900460e01b81565b6040516001600160e01b031990911681526020015b60405180910390f35b6101b86101b3366004612055565b6105fe565b604051901515815260200161019c565b3480156101d457600080fd5b506101f073f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b281565b6040516001600160a01b03909116815260200161019c565b34801561021457600080fd5b506101b8610223366004611d8f565b610782565b34801561023457600080fd5b506101b8610243366004611ff2565b610856565b34801561025457600080fd5b506003546101f0906001600160a01b031681565b34801561027457600080fd5b506101f07389ab32156e46f46d02ade3fecbe5fc4243b9aaed81565b34801561029c57600080fd5b506004546101f0906001600160a01b031681565b3480156102bc57600080fd5b506101b86102cb366004611d17565b6108a8565b3480156102dc57600080fd5b506101b86102eb366004611d17565b6108e9565b3480156102fc57600080fd5b506101b861030b366004611d17565b6108fc565b34801561031c57600080fd5b506101b861032b3660046120de565b610934565b34801561033c57600080fd5b506101b861034b366004611d4f565b610987565b34801561035c57600080fd5b5061016461036b366004611eae565b610a0b565b34801561037c57600080fd5b5061016461038b366004611d17565b610c4e565b34801561039c57600080fd5b506101646103ab366004611d17565b610d22565b3480156103bc57600080fd5b506101646103cb366004611d17565b610d6e565b3480156103dc57600080fd5b506101b86103eb36600461214d565b610dba565b6101b86103fe36600461200c565b610f2a565b34801561040f57600080fd5b50610418610f7b565b60405161019c9190612336565b34801561043157600080fd5b50610164610440366004611d17565b611046565b33610451600182611105565b6104765760405162461bcd60e51b815260040161046d906123cb565b60405180910390fd5b6001600160a01b03871630146104da5760405162461bcd60e51b815260206004820152602360248201527f546f6b656e207265636569766572206973206e6f74207468697320636f6e74726044820152621858dd60ea1b606482015260840161046d565b83156105f357600086116105005760405162461bcd60e51b815260040161046d90612416565b6000808061051087890189611fa6565b9250925092507f0ff2ffbc34ecf263fc4e3226fd1c5f750a85f5bda6a8597e1c51ea1a18a36936831461059c5760405162461bcd60e51b815260206004820152602e60248201527f496e76616c69642074616720666f72206175746f6d6174696320706567496e2060448201526d1bdb88115490cdcdcdc81cd95b9960921b606482015260840161046d565b6004546040517fc03be660a5421fb17c93895da9db564bd4485d475f0d8b3175f7d55ed421bebb916105e79133918f918e9188918f918f91600160a01b90910460e01b908a90612217565b60405180910390a15050505b505050505050505050565b600454600090610619906001906001600160a01b0316611105565b61065e5760405162461bcd60e51b815260206004820152601660248201527557455448206973204e4f5420737570706f727465642160501b604482015260640161046d565b600034116106bf5760405162461bcd60e51b815260206004820152602860248201527f45746865727320616d6f756e74206d7573742062652067726561746572207468604482015267616e207a65726f2160c01b606482015260840161046d565b6004805460408051630d0e30db60e41b815290516001600160a01b039092169263d0e30db0923492808301926000929182900301818588803b15801561070457600080fd5b505af1158015610718573d6000803e3d6000fd5b50506004546040517fc03be660a5421fb17c93895da9db564bd4485d475f0d8b3175f7d55ed421bebb945061076f93506001600160a01b0382169250339134918a918991600160a01b90910460e01b908b90612298565b60405180910390a15060015b9392505050565b6003546000906001600160a01b031633146107af5760405162461bcd60e51b815260040161046d90612396565b6004546001600160a01b0386811691161461080b5761080685878686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061112692505050565b61084c565b61084c868585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061122292505050565b9695505050505050565b6003546000906001600160a01b031633146108835760405162461bcd60e51b815260040161046d90612396565b506004805463ffffffff60a01b1916600160a01b60e084901c0217905560015b919050565b6003546000906001600160a01b031633146108d55760405162461bcd60e51b815260040161046d90612396565b6108e06001836113d0565b50600192915050565b60006108f6600183611105565b92915050565b6003546000906001600160a01b031633146109295760405162461bcd60e51b815260040161046d90612396565b6108f66001836113e5565b600061084c868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408051602081019091529081529250889150610dba9050565b6003546000906001600160a01b031633146109b45760405162461bcd60e51b815260040161046d90612396565b6004546001600160a01b038481169116146109e9576109e483858460405180602001604052806000815250611126565b610a03565b610a03848360405180602001604052806000815250611222565b949350505050565b600054610100900460ff1615808015610a2b5750600054600160ff909116105b80610a455750303b158015610a45575060005460ff166001145b610aa85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161046d565b6000805460ff191660011790558015610acb576000805461ff0019166101001790555b600380546001600160a01b0319163317905560005b8351811015610b3757610b24848281518110610b0c57634e487b7160e01b600052603260045260246000fd5b602002602001015160016113d090919063ffffffff16565b5080610b2f816124d1565b915050610ae0565b50600480546001600160a01b0319166001600160a01b0386161781556040516329965a1d60e01b8152309181018290527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201526044810191909152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b158015610bce57600080fd5b505af1158015610be2573d6000803e3d6000fd5b50506004805463ffffffff60a01b1916600160a01b60e087901c0217905550508015610c48576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b33610c616003546001600160a01b031690565b6001600160a01b031614610cb75760405162461bcd60e51b815260206004820152601760248201527f63616c6c6572206973206e6f7420746865206f776e6572000000000000000000604482015260640161046d565b6000610cc2826113fa565b905060008111610d145760405162461bcd60e51b815260206004820152601960248201527f61646d696e2077697464726177206e6f7420616c6c6f77656400000000000000604482015260640161046d565b610d1e8282611421565b5050565b6003546001600160a01b03163314610d4c5760405162461bcd60e51b815260040161046d90612396565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314610d985760405162461bcd60e51b815260040161046d90612396565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600084610dc8600182611105565b610de45760405162461bcd60e51b815260040161046d906123cb565b60008711610e045760405162461bcd60e51b815260040161046d90612416565b610e196001600160a01b03871633308a6114ba565b60006001600160a01b03871673f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b214610e455786610e5b565b7389ab32156e46f46d02ade3fecbe5fc4243b9aaed5b90506001600160a01b038116610ecc5760405162461bcd60e51b815260206004820152603060248201527f606e6f726d616c697a6564546f6b656e4164647265737360206973207365742060448201526f746f207a65726f20616464726573732160801b606482015260840161046d565b6004546040517fc03be660a5421fb17c93895da9db564bd4485d475f0d8b3175f7d55ed421bebb91610f1491849133918d918c918c91600160a01b900460e01b908c90612298565b60405180910390a1506001979650505050505050565b6000610a0384848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250604080516020810190915290815287935091506105fe9050565b6060610f876001611525565b67ffffffffffffffff811115610fad57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610fd6578160200160208202803683370190505b50905060005b610fe66001611525565b81101561104257610ff860018261152f565b82828151811061101857634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061103a816124d1565b915050610fdc565b5090565b6003546001600160a01b031633146110705760405162461bcd60e51b815260040161046d90612396565b6001600160a01b0381166110e35760405162461bcd60e51b815260206004820152603460248201527f43616e6e6f742073657420746865207a65726f20616464726573732061732074604482015273686520704e6574776f726b20616464726573732160601b606482015260840161046d565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526001919091016020526040902054151590565b60006001600160a01b0385167389ab32156e46f46d02ade3fecbe5fc4243b9aaed141561115f5761115884848461153b565b9050610a03565b7315d4c048f83bd7e37d49ea4c83a07267ec4203da6001600160a01b038616141561118e5761115884846116f8565b61119785611738565b1561120357604051634decdde360e11b81526001600160a01b03861690639bd9bbc6906111cc90879087908790600401612306565b600060405180830381600087803b1580156111e657600080fd5b505af11580156111fa573d6000803e3d6000fd5b50505050611217565b6112176001600160a01b03861685856117ff565b506001949350505050565b6004805460055460405163095ea7b360e01b81526001600160a01b03918216938101939093526024830185905260009291169063095ea7b390604401602060405180830381600087803b15801561127857600080fd5b505af115801561128c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b09190611f86565b50600554604051636f074d1f60e11b8152600481018590526001600160a01b039091169063de0e9a3e90602401600060405180830381600087803b1580156112f757600080fd5b505af115801561130b573d6000803e3d6000fd5b505050506000846001600160a01b0316848460405161132a91906121fb565b60006040518083038185875af1925050503d8060008114611367576040519150601f19603f3d011682016040523d82523d6000602084013e61136c565b606091505b5050905080610a035760405162461bcd60e51b815260206004820152602a60248201527f455448207472616e73666572206661696c6564207768656e2070656767696e67604482015269206f757420774554482160b01b606482015260840161046d565b600061077b836001600160a01b038416611834565b600061077b836001600160a01b038416611883565b6000611407600183611105565b61141957611414826119a0565b6108f6565b506000919050565b6001600160a01b03821661146257604051339082156108fc029083906000818181858888f1935050505015801561145c573d6000803e3d6000fd5b50611476565b6114766001600160a01b03831633836117ff565b6040518181526001600160a01b0383169033907f46ae78bc7b198b8b534ca0070d125569ac5f955976841c4343223079f3abf0de9060200160405180910390a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610c489085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611a2f565b60006108f6825490565b600061077b8383611b01565b6040516370a0823160e01b81523060048201526000907389ab32156e46f46d02ade3fecbe5fc4243b9aaed9073f4ea6b892853413bd9d9f1a5d3a620a0ba39c5b290839083906370a082319060240160206040518083038186803b1580156115a257600080fd5b505afa1580156115b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115da91906120c6565b905080861161164a57604051634decdde360e11b81526001600160a01b03841690639bd9bbc690611613908a908a908a90600401612306565b600060405180830381600087803b15801561162d57600080fd5b505af1158015611641573d6000803e3d6000fd5b505050506116eb565b80611668576116636001600160a01b03831688886117ff565b6116eb565b604051634decdde360e11b81526001600160a01b03841690639bd9bbc690611698908a9085908a90600401612306565b600060405180830381600087803b1580156116b257600080fd5b505af11580156116c6573d6000803e3d6000fd5b505050506116eb8782886116da919061248e565b6001600160a01b03851691906117ff565b5060019695505050505050565b60006117197315d4c048f83bd7e37d49ea4c83a07267ec4203da84846117ff565b6108e073d1d2eb1b1e90b638588728b4130137d262c87cae84846117ff565b60405163555ddc6560e11b81526001600160a01b03821660048201527fac7fbab5f54a3ca8194167523c6753bfeb96a445279294b6125b68cce217705460248201526000908190731820a4b7618bde71dce8cdc73aab6c95905fad249063aabbb8ca9060440160206040518083038186803b1580156117b657600080fd5b505afa1580156117ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ee9190611d33565b6001600160a01b0316141592915050565b6040516001600160a01b03831660248201526044810182905261182f90849063a9059cbb60e01b906064016114ee565b505050565b600081815260018301602052604081205461187b575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108f6565b5060006108f6565b600081815260018301602052604081205480156119965760006118a760018361248e565b85549091506000906118bb9060019061248e565b905081811461193c5760008660000182815481106118e957634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061191a57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061195b57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108f6565b60009150506108f6565b60006001600160a01b03821615611a28576040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156119f057600080fd5b505afa158015611a04573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141491906120c6565b4792915050565b6000611a84826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611b399092919063ffffffff16565b80519091501561182f5780806020019051810190611aa29190611f86565b61182f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161046d565b6000826000018281548110611b2657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6060610a038484600085856001600160a01b0385163b611b9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161046d565b600080866001600160a01b03168587604051611bb791906121fb565b60006040518083038185875af1925050503d8060008114611bf4576040519150601f19603f3d011682016040523d82523d6000602084013e611bf9565b606091505b5091509150611c09828286611c14565b979650505050505050565b60608315611c2357508161077b565b825115611c335782518084602001fd5b8160405162461bcd60e51b815260040161046d9190612383565b80356001600160e01b0319811681146108a357600080fd5b60008083601f840112611c76578182fd5b50813567ffffffffffffffff811115611c8d578182fd5b602083019150836020828501011115611ca557600080fd5b9250929050565b600082601f830112611cbc578081fd5b813567ffffffffffffffff811115611cd657611cd6612502565b611ce9601f8201601f191660200161245d565b818152846020838601011115611cfd578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611d28578081fd5b813561077b81612518565b600060208284031215611d44578081fd5b815161077b81612518565b600080600060608486031215611d63578182fd5b8335611d6e81612518565b92506020840135611d7e81612518565b929592945050506040919091013590565b600080600080600060808688031215611da6578081fd5b8535611db181612518565b94506020860135611dc181612518565b935060408601359250606086013567ffffffffffffffff811115611de3578182fd5b611def88828901611c65565b969995985093965092949392505050565b60008060008060008060008060c0898b031215611e1b578283fd5b8835611e2681612518565b97506020890135611e3681612518565b96506040890135611e4681612518565b955060608901359450608089013567ffffffffffffffff80821115611e69578485fd5b611e758c838d01611c65565b909650945060a08b0135915080821115611e8d578384fd5b50611e9a8b828c01611c65565b999c989b5096995094979396929594505050565b600080600060608486031215611ec2578283fd5b8335611ecd81612518565b925060208481013567ffffffffffffffff80821115611eea578485fd5b818701915087601f830112611efd578485fd5b813581811115611f0f57611f0f612502565b8381029150611f1f84830161245d565b8181528481019084860184860187018c1015611f39578889fd5b8895505b83861015611f675780359450611f5285612518565b84835260019590950194918601918601611f3d565b50809750505050505050611f7d60408501611c4d565b90509250925092565b600060208284031215611f97578081fd5b8151801515811461077b578182fd5b600080600060608486031215611fba578081fd5b83359250602084013567ffffffffffffffff811115611fd7578182fd5b611fe386828701611cac565b925050611f7d60408501611c4d565b600060208284031215612003578081fd5b61077b82611c4d565b600080600060408486031215612020578081fd5b833567ffffffffffffffff811115612036578182fd5b61204286828701611c65565b9094509250611f7d905060208501611c4d565b600080600060608486031215612069578081fd5b833567ffffffffffffffff80821115612080578283fd5b61208c87838801611cac565b945061209a60208701611c4d565b935060408601359150808211156120af578283fd5b506120bc86828701611cac565b9150509250925092565b6000602082840312156120d7578081fd5b5051919050565b6000806000806000608086880312156120f5578283fd5b85359450602086013561210781612518565b9350604086013567ffffffffffffffff811115612122578384fd5b61212e88828901611c65565b9094509250612141905060608701611c4d565b90509295509295909350565b600080600080600060a08688031215612164578283fd5b85359450602086013561217681612518565b9350604086013567ffffffffffffffff80821115612192578485fd5b61219e89838a01611cac565b945060608801359150808211156121b3578283fd5b506121c088828901611cac565b92505061214160808701611c4d565b600081518084526121e78160208601602086016124a5565b601f01601f19169290920160200192915050565b6000825161220d8184602087016124a5565b9190910192915050565b6001600160a01b038981168252881660208201526040810187905260e06060820181905260009061224a908301886121cf565b82810360808401528581528587602083013760208682018101929092526001600160e01b031994851660a08401529290931660c090910152601f909201601f19169091010195945050505050565b6001600160a01b038881168252871660208201526040810186905260e0606082018190526000906122cb908301876121cf565b82810360808401526122dd81876121cf565b6001600160e01b031995861660a08501529390941660c090920191909152509695505050505050565b600060018060a01b03851682528360208301526060604083015261232d60608301846121cf565b95945050505050565b6020808252825182820181905260009190848201906040850190845b818110156123775783516001600160a01b031683529284019291840191600101612352565b50909695505050505050565b60006020825261077b60208301846121cf565b6020808252818101527f43616c6c6572206d75737420626520504e4554574f524b206164647265737321604082015260600190565b6020808252602b908201527f546f6b656e20617420737570706c6965642061646472657373206973204e4f5460408201526a20737570706f727465642160a81b606082015260800190565b60208082526027908201527f546f6b656e20616d6f756e74206d7573742062652067726561746572207468616040820152666e207a65726f2160c81b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561248657612486612502565b604052919050565b6000828210156124a0576124a06124ec565b500390565b60005b838110156124c05781810151838201526020016124a8565b83811115610c485750506000910152565b60006000198214156124e5576124e56124ec565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461252d57600080fd5b5056fea26469706673582212202f17069d1b245778535f5913d42e9ae8bff38762f51609f0bd5830fae809cfb464736f6c63430008020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.