Overview
Max Total Supply
26,334.29211894512023597 MGN
Holders
2,506 (0.00%)
Market
Price
$165.08 @ 0.061423 ETH
Onchain Market Cap
$4,347,264.94
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.004822199581692342 MGNValue
$0.80 ( ~0.000297665880646068 ETH) [0.0000%]Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
Mugen
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.7; import {ERC20} from "openzeppelin/contracts/token/ERC20/ERC20.sol"; import {IERC165} from "openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IMugen} from "../interfaces/IMugen.sol"; import "./OFTCore.sol"; /// @title Mugen /// @author Mugen Dev /// @notice ERC20 implementation ontop of Layer Zero /// @notice Ownable is inherited through OFTCore /// which needs to be maintained either with a governance system or /// multisig in order to update its Layer Zero configurations. contract Mugen is OFTCore, ERC20, IMugen { error NotOwner(); error MinterSet(); /// @notice address who is available to mint tokens, set to the treasury /// in order to implement the bonding curve. address public minter; constructor(address _lzEndpoint) ERC20("Mugen", "MGN") OFTCore(_lzEndpoint) {} function mint(address _to, uint256 _amount) external override onlyMinter { _mint(_to, _amount); } function supportsInterface(bytes4 interfaceId) public view virtual override(OFTCore, IERC165) returns (bool) { return interfaceId == type(IMugen).interfaceId || interfaceId == type(IERC20).interfaceId || super.supportsInterface(interfaceId); } function circulatingSupply() public view virtual override returns (uint256) { return totalSupply(); } function _debitFrom( address _from, uint16, bytes memory, uint256 _amount ) internal virtual override { address spender = _msgSender(); if (_from != spender) { _spendAllowance(_from, spender, _amount); } _burn(_from, _amount); } function _creditTo( uint16, address _toAddress, uint256 _amount ) internal virtual override { _mint(_toAddress, _amount); } function setMinter(address _minter) external onlyOwner { minter = _minter; } modifier onlyMinter() { require( msg.sender == minter || msg.sender == owner(), "Only minter can call this" ); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IOFTCore.sol"; import "openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @dev Interface of the OFT standard */ interface IMugen is IOFTCore, IERC20 { function mint(address _to, uint256 amount_) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./NonblockingLzApp.sol"; import "../interfaces/IOFTCore.sol"; import "openzeppelin/contracts/utils/introspection/ERC165.sol"; abstract contract OFTCore is NonblockingLzApp, ERC165, IOFTCore { constructor(address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {} function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IOFTCore).interfaceId || super.supportsInterface(interfaceId); } function estimateSendFee( uint16 _dstChainId, bytes memory _toAddress, uint256 _amount, bool _useZro, bytes memory _adapterParams ) public view virtual override returns (uint256 nativeFee, uint256 zroFee) { // mock the payload for send() bytes memory payload = abi.encode(_toAddress, _amount); return lzEndpoint.estimateFees( _dstChainId, address(this), payload, _useZro, _adapterParams ); } function sendFrom( address _from, uint16 _dstChainId, bytes memory _toAddress, uint256 _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams ) public payable virtual override { _send( _from, _dstChainId, _toAddress, _amount, _refundAddress, _zroPaymentAddress, _adapterParams ); } function _nonblockingLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual override { // decode and load the toAddress (bytes memory toAddressBytes, uint256 amount) = abi.decode( _payload, (bytes, uint256) ); address toAddress; assembly { toAddress := mload(add(toAddressBytes, 20)) } _creditTo(_srcChainId, toAddress, amount); emit ReceiveFromChain( _srcChainId, _srcAddress, toAddress, amount, _nonce ); } function _send( address _from, uint16 _dstChainId, bytes memory _toAddress, uint256 _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams ) internal virtual { _debitFrom(_from, _dstChainId, _toAddress, _amount); bytes memory payload = abi.encode(_toAddress, _amount); _lzSend( _dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams ); uint64 nonce = lzEndpoint.getOutboundNonce(_dstChainId, address(this)); emit SendToChain(_from, _dstChainId, _toAddress, _amount, nonce); } function _debitFrom( address _from, uint16 _dstChainId, bytes memory _toAddress, uint256 _amount ) internal virtual; function _creditTo( uint16 _srcChainId, address _toAddress, uint256 _amount ) internal virtual; }
// 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 IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the 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 v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin/contracts/token/ERC20/IERC20.sol"; import "openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface of the IOFT core standard */ interface IOFTCore is IERC165 { /** * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) * _dstChainId - L0 defined chain id to send tokens too * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain * _amount - amount of the tokens to transfer * _useZro - indicates to use zro to pay L0 fees * _adapterParam - flexible bytes array to indicate messaging adapter services in L0 */ function estimateSendFee( uint16 _dstChainId, bytes calldata _toAddress, uint256 _amount, bool _useZro, bytes calldata _adapterParams ) external view returns (uint256 nativeFee, uint256 zroFee); /** * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` * `_from` the owner of token * `_dstChainId` the destination chain identifier * `_toAddress` can be any size depending on the `dstChainId`. * `_amount` the quantity of tokens in wei * `_refundAddress` the address LayerZero refunds if too much message fee is sent * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) * `_adapterParams` is a flexible bytes array to indicate messaging adapter services */ function sendFrom( address _from, uint16 _dstChainId, bytes calldata _toAddress, uint256 _amount, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams ) external payable; /** * @dev returns the circulating amount of tokens on current chain */ function circulatingSupply() external view returns (uint256); /** * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`) * `_nonce` is the outbound nonce */ event SendToChain( address indexed _sender, uint16 indexed _dstChainId, bytes indexed _toAddress, uint256 _amount, uint64 _nonce ); /** * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain. * `_nonce` is the inbound nonce. */ event ReceiveFromChain( uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint256 _amount, uint64 _nonce ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./LzApp.sol"; /* * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress) */ abstract contract NonblockingLzApp is LzApp { constructor(address _endpoint) LzApp(_endpoint) {} mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages; event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload); // overriding the virtual function in LzReceiver function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override { // try-catch all errors/exceptions try this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload) { // do nothing } catch { // error / exception failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload); emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload); } } function nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual { // only internal transaction require(_msgSender() == address(this), "NonblockingLzApp: caller must be LzApp"); _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } //@notice override this function function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual; function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public payable virtual { // assert there is message to retry bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce]; require(payloadHash != bytes32(0), "NonblockingLzApp: no stored message"); require(keccak256(_payload) == payloadHash, "NonblockingLzApp: invalid payload"); // clear the stored message failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0); // execute the message. revert if it fails again _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/ILayerZeroReceiver.sol"; import "../interfaces/ILayerZeroUserApplicationConfig.sol"; import "../interfaces/ILayerZeroEndpoint.sol"; /* * a generic LzReceiver implementation */ abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig { ILayerZeroEndpoint public immutable lzEndpoint; mapping(uint16 => bytes) public trustedRemoteLookup; event SetTrustedRemote(uint16 _srcChainId, bytes _srcAddress); constructor(address _endpoint) { lzEndpoint = ILayerZeroEndpoint(_endpoint); } function lzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) public virtual override { // lzReceive must be called by the endpoint for security require( _msgSender() == address(lzEndpoint), "LzApp: invalid endpoint caller" ); bytes memory trustedRemote = trustedRemoteLookup[_srcChainId]; // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote. require( _srcAddress.length == trustedRemote.length && keccak256(_srcAddress) == keccak256(trustedRemote), "LzApp: invalid source sending contract" ); _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging function _blockingLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual; function _lzSend( uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams ) internal virtual { bytes memory trustedRemote = trustedRemoteLookup[_dstChainId]; require( trustedRemote.length != 0, "LzApp: destination chain is not a trusted source" ); lzEndpoint.send{value: msg.value}( _dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams ); } //---------------------------UserApplication config---------------------------------------- function getConfig( uint16 _version, uint16 _chainId, address, uint256 _configType ) external view returns (bytes memory) { return lzEndpoint.getConfig( _version, _chainId, address(this), _configType ); } // generic config for LayerZero user Application function setConfig( uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config ) external override onlyOwner { lzEndpoint.setConfig(_version, _chainId, _configType, _config); } function setSendVersion(uint16 _version) external override onlyOwner { lzEndpoint.setSendVersion(_version); } function setReceiveVersion(uint16 _version) external override onlyOwner { lzEndpoint.setReceiveVersion(_version); } function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner { lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress); } // allow owner to set it multiple times. function setTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external virtual onlyOwner { trustedRemoteLookup[_srcChainId] = _srcAddress; emit SetTrustedRemote(_srcChainId, _srcAddress); } //--------------------------- VIEW FUNCTION ---------------------------------------- function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) { bytes memory trustedSource = trustedRemoteLookup[_srcChainId]; return keccak256(trustedSource) == keccak256(_srcAddress); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface ILayerZeroReceiver { // @notice LayerZero endpoint will invoke this function to deliver the message on the destination // @param _srcChainId - the source endpoint identifier // @param _srcAddress - the source sending contract address from the source chain // @param _nonce - the ordered message nonce // @param _payload - the signed payload is the UA bytes has encoded to be sent function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface ILayerZeroUserApplicationConfig { // @notice set the configuration of the LayerZero messaging library of the specified version // @param _version - messaging library version // @param _chainId - the chainId for the pending config change // @param _configType - type of configuration. every messaging library has its own convention. // @param _config - configuration in the bytes. can encode arbitrary content. function setConfig(uint16 _version, uint16 _chainId, uint256 _configType, bytes calldata _config) external; // @notice set the send() LayerZero messaging library version to _version // @param _version - new messaging library version function setSendVersion(uint16 _version) external; // @notice set the lzReceive() LayerZero messaging library version to _version // @param _version - new messaging library version function setReceiveVersion(uint16 _version) external; // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload // @param _srcChainId - the chainId of the source chain // @param _srcAddress - the contract address of the source contract at the source chain function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; import "./ILayerZeroUserApplicationConfig.sol"; interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig { // @notice send a LayerZero message to the specified address at a LayerZero endpoint. // @param _dstChainId - the destination chain identifier // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains // @param _payload - a custom bytes payload to send to the destination contract // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination function send( uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams ) external payable; // @notice used by the messaging library to publish verified payload // @param _srcChainId - the source chain identifier // @param _srcAddress - the source contract (as bytes) at the source chain // @param _dstAddress - the address on destination chain // @param _nonce - the unbound message ordering nonce // @param _gasLimit - the gas limit for external contract execution // @param _payload - verified payload to send to the destination contract function receivePayload( uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint256 _gasLimit, bytes calldata _payload ) external; // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64); // @notice get the outboundNonce from this source chain which, consequently, is always an EVM // @param _srcAddress - the source chain contract address function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64); // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery // @param _dstChainId - the destination chain identifier // @param _userApplication - the user app address on this EVM chain // @param _payload - the custom message to send over LayerZero // @param _payInZRO - if false, user app pays the protocol fee in native token // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain function estimateFees( uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam ) external view returns (uint256 nativeFee, uint256 zroFee); // @notice get this Endpoint's immutable source identifier function getChainId() external view returns (uint16); // @notice the interface to retry failed message on this Endpoint destination // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address // @param _payload - the payload to be retried function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external; // @notice query if any STORED payload (message blocking) at the endpoint. // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool); // @notice query if the _libraryAddress is valid for sending msgs. // @param _userApplication - the user app address on this EVM chain function getSendLibraryAddress(address _userApplication) external view returns (address); // @notice query if the _libraryAddress is valid for receiving msgs. // @param _userApplication - the user app address on this EVM chain function getReceiveLibraryAddress(address _userApplication) external view returns (address); // @notice query if the non-reentrancy guard for send() is on // @return true if the guard is on. false otherwise function isSendingPayload() external view returns (bool); // @notice query if the non-reentrancy guard for receive() is on // @return true if the guard is on. false otherwise function isReceivingPayload() external view returns (bool); // @notice get the configuration of the LayerZero messaging library of the specified version // @param _version - messaging library version // @param _chainId - the chainId for the pending config change // @param _userApplication - the contract address of the user application // @param _configType - type of configuration. every messaging library has its own convention. function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint256 _configType) external view returns (bytes memory); // @notice get the send() LayerZero messaging library version // @param _userApplication - the contract address of the user application function getSendVersion(address _userApplication) external view returns (uint16); // @notice get the lzReceive() LayerZero messaging library version // @param _userApplication - the contract address of the user application function getReceiveVersion(address _userApplication) external view returns (uint16); }
{ "remappings": [ "chainlink/=lib/chainlink/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_lzEndpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MinterSet","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":true,"internalType":"address","name":"_toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"ReceiveFromChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"_toAddress","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"SendToChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"SetTrustedRemote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"circulatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_useZro","type":"bool"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"estimateSendFee","outputs":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"zroFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"address","name":"_zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"sendFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162002b8638038062002b868339810160408190526200003491620001cc565b6040518060400160405280600581526020016426bab3b2b760d91b8152506040518060400160405280600381526020016226a3a760e91b8152508280806200008b62000085620000d260201b60201c565b620000d6565b60601b6001600160601b03191660805250508151620000b290600690602085019062000126565b508051620000c890600790602084019062000126565b505050506200023b565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200013490620001fe565b90600052602060002090601f016020900481019282620001585760008555620001a3565b82601f106200017357805160ff1916838001178555620001a3565b82800160010185558215620001a3579182015b82811115620001a357825182559160200191906001019062000186565b50620001b1929150620001b5565b5090565b5b80821115620001b15760008155600101620001b6565b600060208284031215620001df57600080fd5b81516001600160a01b0381168114620001f757600080fd5b9392505050565b600181811c908216806200021357607f821691505b602082108114156200023557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c6128ed62000299600039600081816105a50152818161069d0152818161095c01528181610a1801528181610ab201528181610cf901528181610fa1015281816112e9015281816119900152611cbb01526128ed6000f3fe6080604052600436106101f85760003560e01c806366ad5c8a1161010d578063a9059cbb116100a0578063dd62ed3e1161006f578063dd62ed3e146105fa578063eb8d72b71461061a578063f2fde38b1461063a578063f5ecbdbc1461065a578063fca3b5aa1461067a57600080fd5b8063a9059cbb14610573578063b353aaa714610593578063cbed8b9c146105c7578063d1deba1f146105e757600080fd5b80638da5cb5b116100dc5780638da5cb5b1461050b5780639358928b1461052957806395d89b411461053e578063a457c2d71461055357600080fd5b806366ad5c8a1461048057806370a08231146104a0578063715018a6146104d65780637533d788146104eb57600080fd5b806323b872dd116101905780633d8b38f61161015f5780633d8b38f6146103be57806340c10f19146103de57806342d65a8d146103fe578063519056361461041e5780635b8c41e61461043157600080fd5b806323b872dd1461032d5780632a205e3d1461034d578063313ce56714610382578063395093511461039e57600080fd5b806307e0db17116101cc57806307e0db17146102ae578063095ea7b3146102ce57806310ddb137146102ee57806318160ddd1461030e57600080fd5b80621d3567146101fd57806301ffc9a71461021f57806306fdde03146102545780630754617214610276575b600080fd5b34801561020957600080fd5b5061021d6102183660046123b5565b61069a565b005b34801561022b57600080fd5b5061023f61023a3660046121ac565b610841565b60405190151581526020015b60405180910390f35b34801561026057600080fd5b50610269610887565b60405161024b91906125ba565b34801561028257600080fd5b50600854610296906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b3480156102ba57600080fd5b5061021d6102c9366004612250565b610919565b3480156102da57600080fd5b5061023f6102e9366004612180565b6109bd565b3480156102fa57600080fd5b5061021d610309366004612250565b6109d5565b34801561031a57600080fd5b506005545b60405190815260200161024b565b34801561033957600080fd5b5061023f610348366004612086565b610a4f565b34801561035957600080fd5b5061036d6103683660046122bd565b610a73565b6040805192835260208301919091520161024b565b34801561038e57600080fd5b506040516012815260200161024b565b3480156103aa57600080fd5b5061023f6103b9366004612180565b610b4d565b3480156103ca57600080fd5b5061023f6103d936600461226b565b610b6f565b3480156103ea57600080fd5b5061021d6103f9366004612180565b610c3b565b34801561040a57600080fd5b5061021d61041936600461226b565b610cb8565b61021d61042c3660046120c7565b610d69565b34801561043d57600080fd5b5061031f61044c366004612354565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561048c57600080fd5b5061021d61049b3660046123b5565b610d78565b3480156104ac57600080fd5b5061031f6104bb366004612029565b6001600160a01b031660009081526003602052604090205490565b3480156104e257600080fd5b5061021d610de8565b3480156104f757600080fd5b50610269610506366004612250565b610e1e565b34801561051757600080fd5b506000546001600160a01b0316610296565b34801561053557600080fd5b5061031f610eb8565b34801561054a57600080fd5b50610269610ec8565b34801561055f57600080fd5b5061023f61056e366004612180565b610ed7565b34801561057f57600080fd5b5061023f61058e366004612180565b610f52565b34801561059f57600080fd5b506102967f000000000000000000000000000000000000000000000000000000000000000081565b3480156105d357600080fd5b5061021d6105e236600461248a565b610f60565b61021d6105f53660046123b5565b611017565b34801561060657600080fd5b5061031f61061536600461204d565b611169565b34801561062657600080fd5b5061021d61063536600461226b565b611194565b34801561064657600080fd5b5061021d610655366004612029565b61121d565b34801561066657600080fd5b5061026961067536600461243d565b6112b8565b34801561068657600080fd5b5061021d610695366004612029565b611378565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146107175760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff84166000908152600160205260408120805461073590612826565b80601f016020809104026020016040519081016040528092919081815260200182805461076190612826565b80156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b50505050509050805184511480156107d3575080805190602001208480519060200120145b61082e5760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b606482015260840161070e565b61083a858585856113c4565b5050505050565b60006001600160e01b031982166340c10f1960e01b148061087257506001600160e01b031982166336372b0760e01b145b806108815750610881826114b5565b92915050565b60606006805461089690612826565b80601f01602080910402602001604051908101604052809291908181526020018280546108c290612826565b801561090f5780601f106108e45761010080835404028352916020019161090f565b820191906000526020600020905b8154815290600101906020018083116108f257829003601f168201915b5050505050905090565b6000546001600160a01b031633146109435760405162461bcd60e51b815260040161070e906125ef565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b1580156109a957600080fd5b505af115801561083a573d6000803e3d6000fd5b6000336109cb8185856114ea565b5060019392505050565b6000546001600160a01b031633146109ff5760405162461bcd60e51b815260040161070e906125ef565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb1379060240161098f565b600033610a5d85828561160e565b610a68858585611682565b506001949350505050565b60008060008686604051602001610a8b9291906125cd565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090610aef908b90309086908b908b90600401612624565b604080518083038186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3e91906124f8565b92509250509550959350505050565b6000336109cb818585610b608383611169565b610b6a91906127cb565b6114ea565b61ffff831660009081526001602052604081208054829190610b9090612826565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbc90612826565b8015610c095780601f10610bde57610100808354040283529160200191610c09565b820191906000526020600020905b815481529060010190602001808311610bec57829003601f168201915b505050505090508383604051610c2092919061258e565b60405180910390208180519060200120149150509392505050565b6008546001600160a01b0316331480610c5e57506000546001600160a01b031633145b610caa5760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206d696e7465722063616e2063616c6c207468697300000000000000604482015260640161070e565b610cb48282611850565b5050565b6000546001600160a01b03163314610ce25760405162461bcd60e51b815260040161070e906125ef565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610d3290869086908690600401612678565b600060405180830381600087803b158015610d4c57600080fd5b505af1158015610d60573d6000803e3d6000fd5b50505050505050565b610d608787878787878761192f565b333014610dd65760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b606482015260840161070e565b610de284848484611a86565b50505050565b6000546001600160a01b03163314610e125760405162461bcd60e51b815260040161070e906125ef565b610e1c6000611b21565b565b60016020526000908152604090208054610e3790612826565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6390612826565b8015610eb05780601f10610e8557610100808354040283529160200191610eb0565b820191906000526020600020905b815481529060010190602001808311610e9357829003601f168201915b505050505081565b6000610ec360055490565b905090565b60606007805461089690612826565b60003381610ee58286611169565b905083811015610f455760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161070e565b610a6882868684036114ea565b6000336109cb818585611682565b6000546001600160a01b03163314610f8a5760405162461bcd60e51b815260040161070e906125ef565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90610fde9088908890889088908890600401612746565b600060405180830381600087803b158015610ff857600080fd5b505af115801561100c573d6000803e3d6000fd5b505050505050505050565b61ffff8416600090815260026020526040808220905161103890869061259e565b90815260408051602092819003830190206001600160401b038616600090815292529020549050806110b85760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b606482015260840161070e565b8151602083012081146111175760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b606482015260840161070e565b61ffff8516600090815260026020526040808220905161113890879061259e565b90815260408051602092819003830190206001600160401b0387166000908152925290205561083a85858585611a86565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146111be5760405162461bcd60e51b815260040161070e906125ef565b61ffff831660009081526001602052604090206111dc908383611e8e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161121093929190612678565b60405180910390a1505050565b6000546001600160a01b031633146112475760405162461bcd60e51b815260040161070e906125ef565b6001600160a01b0381166112ac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161070e565b6112b581611b21565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc9060840160006040518083038186803b15801561133357600080fd5b505afa158015611347573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261136f91908101906121d6565b95945050505050565b6000546001600160a01b031633146113a25760405162461bcd60e51b815260040161070e906125ef565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b604051633356ae4560e11b815230906366ad5c8a906113ed9087908790879087906004016126fd565b600060405180830381600087803b15801561140757600080fd5b505af1925050508015611418575060015b610de2578080519060200120600260008661ffff1661ffff1681526020019081526020016000208460405161144d919061259e565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d906114a89086908690869086906126fd565b60405180910390a1610de2565b60006001600160e01b031982166301d1d13560e71b148061088157506301ffc9a760e01b6001600160e01b0319831614610881565b6001600160a01b03831661154c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161070e565b6001600160a01b0382166115ad5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161070e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061161a8484611169565b90506000198114610de257818110156116755760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161070e565b610de284848484036114ea565b6001600160a01b0383166116e65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161070e565b6001600160a01b0382166117485760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161070e565b6001600160a01b038316600090815260036020526040902054818110156117c05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161070e565b6001600160a01b038085166000908152600360205260408082208585039055918516815290812080548492906117f79084906127cb565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161184391815260200190565b60405180910390a3610de2565b6001600160a01b0382166118a65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161070e565b80600560008282546118b891906127cb565b90915550506001600160a01b038216600090815260036020526040812080548392906118e59084906127cb565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b61193b87878787611b76565b600085856040516020016119509291906125cd565b604051602081830303815290604052905061196e8782868686611b9c565b604051630f428ae960e31b815261ffff881660048201523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637a1457489060440160206040518083038186803b1580156119da57600080fd5b505afa1580156119ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a12919061251c565b905086604051611a22919061259e565b604080519182900382208883526001600160401b03841660208401529161ffff8b16916001600160a01b038d16917f024797cc77ce15dc717112d54fb1df125fdfd8c81344fb046c5e074427ce1543910160405180910390a4505050505050505050565b60008082806020019051810190611a9d919061220a565b60148201519193509150611ab2878284611d36565b806001600160a01b031686604051611aca919061259e565b604080519182900382208583526001600160401b03891660208401529161ffff8b16917f64e10c37f404d128982dce114f5d233c14c5c7f6d8db93099e3d99dacb9e27ba910160405180910390a450505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b505050565b336001600160a01b0385168114611b9257611b9285828461160e565b61083a8583611d40565b61ffff851660009081526001602052604081208054611bba90612826565b80601f0160208091040260200160405190810160405280929190818152602001828054611be690612826565b8015611c335780601f10611c0857610100808354040283529160200191611c33565b820191906000526020600020905b815481529060010190602001808311611c1657829003601f168201915b50505050509050805160001415611ca55760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b606482015260840161070e565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100903490611cfc908a9086908b908b908b908b90600401612696565b6000604051808303818588803b158015611d1557600080fd5b505af1158015611d29573d6000803e3d6000fd5b5050505050505050505050565b611b718282611850565b6001600160a01b038216611da05760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161070e565b6001600160a01b03821660009081526003602052604090205481811015611e145760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161070e565b6001600160a01b0383166000908152600360205260408120838303905560058054849290611e439084906127e3565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b828054611e9a90612826565b90600052602060002090601f016020900481019282611ebc5760008555611f02565b82601f10611ed55782800160ff19823516178555611f02565b82800160010185558215611f02579182015b82811115611f02578235825591602001919060010190611ee7565b50611f0e929150611f12565b5090565b5b80821115611f0e5760008155600101611f13565b60008083601f840112611f3957600080fd5b5081356001600160401b03811115611f5057600080fd5b602083019150836020828501011115611f6857600080fd5b9250929050565b600082601f830112611f8057600080fd5b8135611f93611f8e826127a4565b612774565b818152846020838601011115611fa857600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112611fd657600080fd5b8151611fe4611f8e826127a4565b818152846020838601011115611ff957600080fd5b61200a8260208301602087016127fa565b949350505050565b803561ffff8116811461202457600080fd5b919050565b60006020828403121561203b57600080fd5b81356120468161288d565b9392505050565b6000806040838503121561206057600080fd5b823561206b8161288d565b9150602083013561207b8161288d565b809150509250929050565b60008060006060848603121561209b57600080fd5b83356120a68161288d565b925060208401356120b68161288d565b929592945050506040919091013590565b600080600080600080600060e0888a0312156120e257600080fd5b87356120ed8161288d565b96506120fb60208901612012565b955060408801356001600160401b038082111561211757600080fd5b6121238b838c01611f6f565b965060608a0135955060808a0135915061213c8261288d565b90935060a08901359061214e8261288d565b90925060c0890135908082111561216457600080fd5b506121718a828b01611f6f565b91505092959891949750929550565b6000806040838503121561219357600080fd5b823561219e8161288d565b946020939093013593505050565b6000602082840312156121be57600080fd5b81356001600160e01b03198116811461204657600080fd5b6000602082840312156121e857600080fd5b81516001600160401b038111156121fe57600080fd5b61200a84828501611fc5565b6000806040838503121561221d57600080fd5b82516001600160401b0381111561223357600080fd5b61223f85828601611fc5565b925050602083015190509250929050565b60006020828403121561226257600080fd5b61204682612012565b60008060006040848603121561228057600080fd5b61228984612012565b925060208401356001600160401b038111156122a457600080fd5b6122b086828701611f27565b9497909650939450505050565b600080600080600060a086880312156122d557600080fd5b6122de86612012565b945060208601356001600160401b03808211156122fa57600080fd5b61230689838a01611f6f565b95506040880135945060608801359150811515821461232457600080fd5b9092506080870135908082111561233a57600080fd5b5061234788828901611f6f565b9150509295509295909350565b60008060006060848603121561236957600080fd5b61237284612012565b925060208401356001600160401b0381111561238d57600080fd5b61239986828701611f6f565b92505060408401356123aa816128a2565b809150509250925092565b600080600080608085870312156123cb57600080fd5b6123d485612012565b935060208501356001600160401b03808211156123f057600080fd5b6123fc88838901611f6f565b94506040870135915061240e826128a2565b9092506060860135908082111561242457600080fd5b5061243187828801611f6f565b91505092959194509250565b6000806000806080858703121561245357600080fd5b61245c85612012565b935061246a60208601612012565b9250604085013561247a8161288d565b9396929550929360600135925050565b6000806000806000608086880312156124a257600080fd5b6124ab86612012565b94506124b960208701612012565b93506040860135925060608601356001600160401b038111156124db57600080fd5b6124e788828901611f27565b969995985093965092949392505050565b6000806040838503121561250b57600080fd5b505080516020909101519092909150565b60006020828403121561252e57600080fd5b8151612046816128a2565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845261257a8160208601602086016127fa565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b600082516125b08184602087016127fa565b9190910192915050565b6020815260006120466020830184612562565b6040815260006125e06040830185612562565b90508260208301529392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061265290830186612562565b8415156060840152828103608084015261266c8185612562565b98975050505050505050565b61ffff8416815260406020820152600061136f604083018486612539565b61ffff8716815260c0602082015260006126b360c0830188612562565b82810360408401526126c58188612562565b6001600160a01b0387811660608601528616608085015283810360a085015290506126f08185612562565b9998505050505050505050565b61ffff8516815260806020820152600061271a6080830186612562565b6001600160401b0385166040840152828103606084015261273b8185612562565b979650505050505050565b600061ffff80881683528087166020840152508460408301526080606083015261273b608083018486612539565b604051601f8201601f191681016001600160401b038111828210171561279c5761279c612877565b604052919050565b60006001600160401b038211156127bd576127bd612877565b50601f01601f191660200190565b600082198211156127de576127de612861565b500190565b6000828210156127f5576127f5612861565b500390565b60005b838110156128155781810151838201526020016127fd565b83811115610de25750506000910152565b600181811c9082168061283a57607f821691505b6020821081141561285b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146112b557600080fd5b6001600160401b03811681146112b557600080fdfea2646970667358221220b8a5484aed53a854d81680cfabb6952388e7cf8c99ff0f08afe0b7e5bae5c55464736f6c634300080700330000000000000000000000003c2269811836af69497e5f486a85d7316753cf62
Deployed Bytecode
0x6080604052600436106101f85760003560e01c806366ad5c8a1161010d578063a9059cbb116100a0578063dd62ed3e1161006f578063dd62ed3e146105fa578063eb8d72b71461061a578063f2fde38b1461063a578063f5ecbdbc1461065a578063fca3b5aa1461067a57600080fd5b8063a9059cbb14610573578063b353aaa714610593578063cbed8b9c146105c7578063d1deba1f146105e757600080fd5b80638da5cb5b116100dc5780638da5cb5b1461050b5780639358928b1461052957806395d89b411461053e578063a457c2d71461055357600080fd5b806366ad5c8a1461048057806370a08231146104a0578063715018a6146104d65780637533d788146104eb57600080fd5b806323b872dd116101905780633d8b38f61161015f5780633d8b38f6146103be57806340c10f19146103de57806342d65a8d146103fe578063519056361461041e5780635b8c41e61461043157600080fd5b806323b872dd1461032d5780632a205e3d1461034d578063313ce56714610382578063395093511461039e57600080fd5b806307e0db17116101cc57806307e0db17146102ae578063095ea7b3146102ce57806310ddb137146102ee57806318160ddd1461030e57600080fd5b80621d3567146101fd57806301ffc9a71461021f57806306fdde03146102545780630754617214610276575b600080fd5b34801561020957600080fd5b5061021d6102183660046123b5565b61069a565b005b34801561022b57600080fd5b5061023f61023a3660046121ac565b610841565b60405190151581526020015b60405180910390f35b34801561026057600080fd5b50610269610887565b60405161024b91906125ba565b34801561028257600080fd5b50600854610296906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b3480156102ba57600080fd5b5061021d6102c9366004612250565b610919565b3480156102da57600080fd5b5061023f6102e9366004612180565b6109bd565b3480156102fa57600080fd5b5061021d610309366004612250565b6109d5565b34801561031a57600080fd5b506005545b60405190815260200161024b565b34801561033957600080fd5b5061023f610348366004612086565b610a4f565b34801561035957600080fd5b5061036d6103683660046122bd565b610a73565b6040805192835260208301919091520161024b565b34801561038e57600080fd5b506040516012815260200161024b565b3480156103aa57600080fd5b5061023f6103b9366004612180565b610b4d565b3480156103ca57600080fd5b5061023f6103d936600461226b565b610b6f565b3480156103ea57600080fd5b5061021d6103f9366004612180565b610c3b565b34801561040a57600080fd5b5061021d61041936600461226b565b610cb8565b61021d61042c3660046120c7565b610d69565b34801561043d57600080fd5b5061031f61044c366004612354565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561048c57600080fd5b5061021d61049b3660046123b5565b610d78565b3480156104ac57600080fd5b5061031f6104bb366004612029565b6001600160a01b031660009081526003602052604090205490565b3480156104e257600080fd5b5061021d610de8565b3480156104f757600080fd5b50610269610506366004612250565b610e1e565b34801561051757600080fd5b506000546001600160a01b0316610296565b34801561053557600080fd5b5061031f610eb8565b34801561054a57600080fd5b50610269610ec8565b34801561055f57600080fd5b5061023f61056e366004612180565b610ed7565b34801561057f57600080fd5b5061023f61058e366004612180565b610f52565b34801561059f57600080fd5b506102967f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6281565b3480156105d357600080fd5b5061021d6105e236600461248a565b610f60565b61021d6105f53660046123b5565b611017565b34801561060657600080fd5b5061031f61061536600461204d565b611169565b34801561062657600080fd5b5061021d61063536600461226b565b611194565b34801561064657600080fd5b5061021d610655366004612029565b61121d565b34801561066657600080fd5b5061026961067536600461243d565b6112b8565b34801561068657600080fd5b5061021d610695366004612029565b611378565b337f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b0316146107175760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff84166000908152600160205260408120805461073590612826565b80601f016020809104026020016040519081016040528092919081815260200182805461076190612826565b80156107ae5780601f10610783576101008083540402835291602001916107ae565b820191906000526020600020905b81548152906001019060200180831161079157829003601f168201915b50505050509050805184511480156107d3575080805190602001208480519060200120145b61082e5760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b606482015260840161070e565b61083a858585856113c4565b5050505050565b60006001600160e01b031982166340c10f1960e01b148061087257506001600160e01b031982166336372b0760e01b145b806108815750610881826114b5565b92915050565b60606006805461089690612826565b80601f01602080910402602001604051908101604052809291908181526020018280546108c290612826565b801561090f5780601f106108e45761010080835404028352916020019161090f565b820191906000526020600020905b8154815290600101906020018083116108f257829003601f168201915b5050505050905090565b6000546001600160a01b031633146109435760405162461bcd60e51b815260040161070e906125ef565b6040516307e0db1760e01b815261ffff821660048201527f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b0316906307e0db17906024015b600060405180830381600087803b1580156109a957600080fd5b505af115801561083a573d6000803e3d6000fd5b6000336109cb8185856114ea565b5060019392505050565b6000546001600160a01b031633146109ff5760405162461bcd60e51b815260040161070e906125ef565b6040516310ddb13760e01b815261ffff821660048201527f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b0316906310ddb1379060240161098f565b600033610a5d85828561160e565b610a68858585611682565b506001949350505050565b60008060008686604051602001610a8b9291906125cd565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6216906340a7bb1090610aef908b90309086908b908b90600401612624565b604080518083038186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3e91906124f8565b92509250509550959350505050565b6000336109cb818585610b608383611169565b610b6a91906127cb565b6114ea565b61ffff831660009081526001602052604081208054829190610b9090612826565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbc90612826565b8015610c095780601f10610bde57610100808354040283529160200191610c09565b820191906000526020600020905b815481529060010190602001808311610bec57829003601f168201915b505050505090508383604051610c2092919061258e565b60405180910390208180519060200120149150509392505050565b6008546001600160a01b0316331480610c5e57506000546001600160a01b031633145b610caa5760405162461bcd60e51b815260206004820152601960248201527f4f6e6c79206d696e7465722063616e2063616c6c207468697300000000000000604482015260640161070e565b610cb48282611850565b5050565b6000546001600160a01b03163314610ce25760405162461bcd60e51b815260040161070e906125ef565b6040516342d65a8d60e01b81526001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6216906342d65a8d90610d3290869086908690600401612678565b600060405180830381600087803b158015610d4c57600080fd5b505af1158015610d60573d6000803e3d6000fd5b50505050505050565b610d608787878787878761192f565b333014610dd65760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b606482015260840161070e565b610de284848484611a86565b50505050565b6000546001600160a01b03163314610e125760405162461bcd60e51b815260040161070e906125ef565b610e1c6000611b21565b565b60016020526000908152604090208054610e3790612826565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6390612826565b8015610eb05780601f10610e8557610100808354040283529160200191610eb0565b820191906000526020600020905b815481529060010190602001808311610e9357829003601f168201915b505050505081565b6000610ec360055490565b905090565b60606007805461089690612826565b60003381610ee58286611169565b905083811015610f455760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161070e565b610a6882868684036114ea565b6000336109cb818585611682565b6000546001600160a01b03163314610f8a5760405162461bcd60e51b815260040161070e906125ef565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62169063cbed8b9c90610fde9088908890889088908890600401612746565b600060405180830381600087803b158015610ff857600080fd5b505af115801561100c573d6000803e3d6000fd5b505050505050505050565b61ffff8416600090815260026020526040808220905161103890869061259e565b90815260408051602092819003830190206001600160401b038616600090815292529020549050806110b85760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b606482015260840161070e565b8151602083012081146111175760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b606482015260840161070e565b61ffff8516600090815260026020526040808220905161113890879061259e565b90815260408051602092819003830190206001600160401b0387166000908152925290205561083a85858585611a86565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146111be5760405162461bcd60e51b815260040161070e906125ef565b61ffff831660009081526001602052604090206111dc908383611e8e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161121093929190612678565b60405180910390a1505050565b6000546001600160a01b031633146112475760405162461bcd60e51b815260040161070e906125ef565b6001600160a01b0381166112ac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161070e565b6112b581611b21565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b03169063f5ecbdbc9060840160006040518083038186803b15801561133357600080fd5b505afa158015611347573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261136f91908101906121d6565b95945050505050565b6000546001600160a01b031633146113a25760405162461bcd60e51b815260040161070e906125ef565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b604051633356ae4560e11b815230906366ad5c8a906113ed9087908790879087906004016126fd565b600060405180830381600087803b15801561140757600080fd5b505af1925050508015611418575060015b610de2578080519060200120600260008661ffff1661ffff1681526020019081526020016000208460405161144d919061259e565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d906114a89086908690869086906126fd565b60405180910390a1610de2565b60006001600160e01b031982166301d1d13560e71b148061088157506301ffc9a760e01b6001600160e01b0319831614610881565b6001600160a01b03831661154c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161070e565b6001600160a01b0382166115ad5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161070e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061161a8484611169565b90506000198114610de257818110156116755760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161070e565b610de284848484036114ea565b6001600160a01b0383166116e65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161070e565b6001600160a01b0382166117485760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161070e565b6001600160a01b038316600090815260036020526040902054818110156117c05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161070e565b6001600160a01b038085166000908152600360205260408082208585039055918516815290812080548492906117f79084906127cb565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161184391815260200190565b60405180910390a3610de2565b6001600160a01b0382166118a65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161070e565b80600560008282546118b891906127cb565b90915550506001600160a01b038216600090815260036020526040812080548392906118e59084906127cb565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b61193b87878787611b76565b600085856040516020016119509291906125cd565b604051602081830303815290604052905061196e8782868686611b9c565b604051630f428ae960e31b815261ffff881660048201523060248201526000907f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b031690637a1457489060440160206040518083038186803b1580156119da57600080fd5b505afa1580156119ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a12919061251c565b905086604051611a22919061259e565b604080519182900382208883526001600160401b03841660208401529161ffff8b16916001600160a01b038d16917f024797cc77ce15dc717112d54fb1df125fdfd8c81344fb046c5e074427ce1543910160405180910390a4505050505050505050565b60008082806020019051810190611a9d919061220a565b60148201519193509150611ab2878284611d36565b806001600160a01b031686604051611aca919061259e565b604080519182900382208583526001600160401b03891660208401529161ffff8b16917f64e10c37f404d128982dce114f5d233c14c5c7f6d8db93099e3d99dacb9e27ba910160405180910390a450505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b505050565b336001600160a01b0385168114611b9257611b9285828461160e565b61083a8583611d40565b61ffff851660009081526001602052604081208054611bba90612826565b80601f0160208091040260200160405190810160405280929190818152602001828054611be690612826565b8015611c335780601f10611c0857610100808354040283529160200191611c33565b820191906000526020600020905b815481529060010190602001808311611c1657829003601f168201915b50505050509050805160001415611ca55760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b606482015260840161070e565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62169063c5803100903490611cfc908a9086908b908b908b908b90600401612696565b6000604051808303818588803b158015611d1557600080fd5b505af1158015611d29573d6000803e3d6000fd5b5050505050505050505050565b611b718282611850565b6001600160a01b038216611da05760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161070e565b6001600160a01b03821660009081526003602052604090205481811015611e145760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161070e565b6001600160a01b0383166000908152600360205260408120838303905560058054849290611e439084906127e3565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b828054611e9a90612826565b90600052602060002090601f016020900481019282611ebc5760008555611f02565b82601f10611ed55782800160ff19823516178555611f02565b82800160010185558215611f02579182015b82811115611f02578235825591602001919060010190611ee7565b50611f0e929150611f12565b5090565b5b80821115611f0e5760008155600101611f13565b60008083601f840112611f3957600080fd5b5081356001600160401b03811115611f5057600080fd5b602083019150836020828501011115611f6857600080fd5b9250929050565b600082601f830112611f8057600080fd5b8135611f93611f8e826127a4565b612774565b818152846020838601011115611fa857600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112611fd657600080fd5b8151611fe4611f8e826127a4565b818152846020838601011115611ff957600080fd5b61200a8260208301602087016127fa565b949350505050565b803561ffff8116811461202457600080fd5b919050565b60006020828403121561203b57600080fd5b81356120468161288d565b9392505050565b6000806040838503121561206057600080fd5b823561206b8161288d565b9150602083013561207b8161288d565b809150509250929050565b60008060006060848603121561209b57600080fd5b83356120a68161288d565b925060208401356120b68161288d565b929592945050506040919091013590565b600080600080600080600060e0888a0312156120e257600080fd5b87356120ed8161288d565b96506120fb60208901612012565b955060408801356001600160401b038082111561211757600080fd5b6121238b838c01611f6f565b965060608a0135955060808a0135915061213c8261288d565b90935060a08901359061214e8261288d565b90925060c0890135908082111561216457600080fd5b506121718a828b01611f6f565b91505092959891949750929550565b6000806040838503121561219357600080fd5b823561219e8161288d565b946020939093013593505050565b6000602082840312156121be57600080fd5b81356001600160e01b03198116811461204657600080fd5b6000602082840312156121e857600080fd5b81516001600160401b038111156121fe57600080fd5b61200a84828501611fc5565b6000806040838503121561221d57600080fd5b82516001600160401b0381111561223357600080fd5b61223f85828601611fc5565b925050602083015190509250929050565b60006020828403121561226257600080fd5b61204682612012565b60008060006040848603121561228057600080fd5b61228984612012565b925060208401356001600160401b038111156122a457600080fd5b6122b086828701611f27565b9497909650939450505050565b600080600080600060a086880312156122d557600080fd5b6122de86612012565b945060208601356001600160401b03808211156122fa57600080fd5b61230689838a01611f6f565b95506040880135945060608801359150811515821461232457600080fd5b9092506080870135908082111561233a57600080fd5b5061234788828901611f6f565b9150509295509295909350565b60008060006060848603121561236957600080fd5b61237284612012565b925060208401356001600160401b0381111561238d57600080fd5b61239986828701611f6f565b92505060408401356123aa816128a2565b809150509250925092565b600080600080608085870312156123cb57600080fd5b6123d485612012565b935060208501356001600160401b03808211156123f057600080fd5b6123fc88838901611f6f565b94506040870135915061240e826128a2565b9092506060860135908082111561242457600080fd5b5061243187828801611f6f565b91505092959194509250565b6000806000806080858703121561245357600080fd5b61245c85612012565b935061246a60208601612012565b9250604085013561247a8161288d565b9396929550929360600135925050565b6000806000806000608086880312156124a257600080fd5b6124ab86612012565b94506124b960208701612012565b93506040860135925060608601356001600160401b038111156124db57600080fd5b6124e788828901611f27565b969995985093965092949392505050565b6000806040838503121561250b57600080fd5b505080516020909101519092909150565b60006020828403121561252e57600080fd5b8151612046816128a2565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845261257a8160208601602086016127fa565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b600082516125b08184602087016127fa565b9190910192915050565b6020815260006120466020830184612562565b6040815260006125e06040830185612562565b90508260208301529392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061265290830186612562565b8415156060840152828103608084015261266c8185612562565b98975050505050505050565b61ffff8416815260406020820152600061136f604083018486612539565b61ffff8716815260c0602082015260006126b360c0830188612562565b82810360408401526126c58188612562565b6001600160a01b0387811660608601528616608085015283810360a085015290506126f08185612562565b9998505050505050505050565b61ffff8516815260806020820152600061271a6080830186612562565b6001600160401b0385166040840152828103606084015261273b8185612562565b979650505050505050565b600061ffff80881683528087166020840152508460408301526080606083015261273b608083018486612539565b604051601f8201601f191681016001600160401b038111828210171561279c5761279c612877565b604052919050565b60006001600160401b038211156127bd576127bd612877565b50601f01601f191660200190565b600082198211156127de576127de612861565b500190565b6000828210156127f5576127f5612861565b500390565b60005b838110156128155781810151838201526020016127fd565b83811115610de25750506000910152565b600181811c9082168061283a57607f821691505b6020821081141561285b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146112b557600080fd5b6001600160401b03811681146112b557600080fdfea2646970667358221220b8a5484aed53a854d81680cfabb6952388e7cf8c99ff0f08afe0b7e5bae5c55464736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62
-----Decoded View---------------
Arg [0] : _lzEndpoint (address): 0x3c2269811836af69497E5F486A85D7316753cf62
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.