More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 42 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Approve | 41854848 | 19 hrs ago | IN | 0 ETH | 0.00000015 | ||||
| Send | 41215194 | 15 days ago | IN | 0.00001704 ETH | 0.00000129 | ||||
| Send | 41086163 | 18 days ago | IN | 0.00001705 ETH | 0.0000017 | ||||
| Approve | 41078972 | 18 days ago | IN | 0 ETH | 0.00000015 | ||||
| Send | 41078766 | 18 days ago | IN | 0.0000157 ETH | 0.00000095 | ||||
| Approve | 41078711 | 18 days ago | IN | 0 ETH | 0.00000014 | ||||
| Approve | 41051055 | 19 days ago | IN | 0 ETH | 0.0000004 | ||||
| Approve | 40376193 | 35 days ago | IN | 0 ETH | 0.00000019 | ||||
| Approve | 40346887 | 35 days ago | IN | 0 ETH | 0.00000018 | ||||
| Approve | 40286191 | 37 days ago | IN | 0 ETH | 0.00000007 | ||||
| Approve | 40284664 | 37 days ago | IN | 0 ETH | 0.00000013 | ||||
| Approve | 40236450 | 38 days ago | IN | 0 ETH | 0.00000007 | ||||
| Approve | 40056957 | 42 days ago | IN | 0 ETH | 0.00000006 | ||||
| Approve | 39988134 | 44 days ago | IN | 0 ETH | 0.00000009 | ||||
| Approve | 39956745 | 44 days ago | IN | 0 ETH | 0.0000001 | ||||
| Approve | 39717983 | 50 days ago | IN | 0 ETH | 0.00000006 | ||||
| Approve | 39711649 | 50 days ago | IN | 0 ETH | 0.00000006 | ||||
| Send | 39688838 | 50 days ago | IN | 0.00001671 ETH | 0.00000127 | ||||
| Approve | 39684060 | 51 days ago | IN | 0 ETH | 0.00000056 | ||||
| Approve | 39438997 | 56 days ago | IN | 0 ETH | 0.00000005 | ||||
| Approve | 39381223 | 58 days ago | IN | 0 ETH | 0.00000016 | ||||
| Approve | 39335719 | 59 days ago | IN | 0 ETH | 0.00000009 | ||||
| Approve | 39335030 | 59 days ago | IN | 0 ETH | 0.00000002 | ||||
| Send | 39318254 | 59 days ago | IN | 0.00003145 ETH | 0.00000047 | ||||
| Approve | 39316649 | 59 days ago | IN | 0 ETH | 0.0000002 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 41215194 | 15 days ago | 0.00001704 ETH | ||||
| 41086163 | 18 days ago | 0.00001705 ETH | ||||
| 41078766 | 18 days ago | 0.0000157 ETH | ||||
| 39688838 | 50 days ago | 0.00001671 ETH | ||||
| 39318254 | 59 days ago | 0.00003145 ETH | ||||
| 39007057 | 66 days ago | 0.00001645 ETH | ||||
| 38699679 | 73 days ago | 0.00001737 ETH | ||||
| 38699216 | 73 days ago | 0.00001737 ETH | ||||
| 38232295 | 84 days ago | 0.00003324 ETH | ||||
| 38123714 | 87 days ago | 0.00001411 ETH | ||||
| 38066125 | 88 days ago | 0.00001411 ETH | ||||
| 38062372 | 88 days ago | 0.00002908 ETH | ||||
| 37998845 | 90 days ago | 0.00002918 ETH | ||||
| 37503086 | 101 days ago | 0.00002655 ETH | ||||
| 37497142 | 101 days ago | 0.00001286 ETH | ||||
| 37243100 | 107 days ago | 0.00002646 ETH | ||||
| 37009398 | 112 days ago | 0.00001277 ETH | ||||
| 36769238 | 118 days ago | 0.00002618 ETH | ||||
| 36747743 | 119 days ago | 0.00001257 ETH | ||||
| 36699234 | 120 days ago | 0.00001346 ETH | ||||
| 36690342 | 120 days ago | 0.00001346 ETH | ||||
| 36680494 | 120 days ago | 0.00002785 ETH | ||||
| 36667187 | 120 days ago | 0.00001228 ETH | ||||
| 36663800 | 120 days ago | 0.00001147 ETH | ||||
| 36335510 | 128 days ago | 0.00002421 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PolterOft
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {OFT} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFT.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
contract PolterOft is OFT {
uint256 public immutable maxTotalSupply;
address public minter;
constructor(
string memory _name,
string memory _symbol,
address _lzEndpoint,
address _delegate,
uint256 _maxTotalSupply
) OFT(_name, _symbol, _lzEndpoint, _delegate) Ownable(_delegate) {
maxTotalSupply = _maxTotalSupply;
emit Transfer(address(0), msg.sender, 0);
}
function setMinter(address _minter) external returns (bool) {
require(minter == address(0));
minter = _minter;
return true;
}
function mint(address _to, uint256 _value) external returns (bool) {
require(msg.sender == minter);
// _balances[_to] = _balances[_to].add(_value);
// totalSupply = totalSupply.add(_value);
require(maxTotalSupply >= totalSupply() + _value);
_mint(_to, _value);
// emit Transfer(address(0), _to, _value);
return true;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
/**
* @title IOAppCore
*/
interface IOAppCore {
// Custom error messages
error OnlyPeer(uint32 eid, bytes32 sender);
error NoPeer(uint32 eid);
error InvalidEndpointCall();
error InvalidDelegate();
// Event emitted when a peer (OApp) is set for a corresponding endpoint
event PeerSet(uint32 eid, bytes32 peer);
/**
* @notice Retrieves the OApp version information.
* @return senderVersion The version of the OAppSender.sol contract.
* @return receiverVersion The version of the OAppReceiver.sol contract.
*/
function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);
/**
* @notice Retrieves the LayerZero endpoint associated with the OApp.
* @return iEndpoint The LayerZero endpoint as an interface.
*/
function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);
/**
* @notice Retrieves the peer (OApp) associated with a corresponding endpoint.
* @param _eid The endpoint ID.
* @return peer The peer address (OApp instance) associated with the corresponding endpoint.
*/
function peers(uint32 _eid) external view returns (bytes32 peer);
/**
* @notice Sets the peer address (OApp instance) for a corresponding endpoint.
* @param _eid The endpoint ID.
* @param _peer The address of the peer to be associated with the corresponding endpoint.
*/
function setPeer(uint32 _eid, bytes32 _peer) external;
/**
* @notice Sets the delegate address for the OApp Core.
* @param _delegate The address of the delegate to be set.
*/
function setDelegate(address _delegate) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title IOAppMsgInspector
* @dev Interface for the OApp Message Inspector, allowing examination of message and options contents.
*/
interface IOAppMsgInspector {
// Custom error message for inspection failure
error InspectionFailed(bytes message, bytes options);
/**
* @notice Allows the inspector to examine LayerZero message contents and optionally throw a revert if invalid.
* @param _message The message payload to be inspected.
* @param _options Additional options or parameters for inspection.
* @return valid A boolean indicating whether the inspection passed (true) or failed (false).
*
* @dev Optionally done as a revert, OR use the boolean provided to handle the failure.
*/
function inspect(bytes calldata _message, bytes calldata _options) external view returns (bool valid);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @dev Struct representing enforced option parameters.
*/
struct EnforcedOptionParam {
uint32 eid; // Endpoint ID
uint16 msgType; // Message Type
bytes options; // Additional options
}
/**
* @title IOAppOptionsType3
* @dev Interface for the OApp with Type 3 Options, allowing the setting and combining of enforced options.
*/
interface IOAppOptionsType3 {
// Custom error message for invalid options
error InvalidOptions(bytes options);
// Event emitted when enforced options are set
event EnforcedOptionSet(EnforcedOptionParam[] _enforcedOptions);
/**
* @notice Sets enforced options for specific endpoint and message type combinations.
* @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
*/
function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) external;
/**
* @notice Combines options for a given endpoint and message type.
* @param _eid The endpoint ID.
* @param _msgType The OApp message type.
* @param _extraOptions Additional options passed by the caller.
* @return options The combination of caller specified options AND enforced options.
*/
function combineOptions(
uint32 _eid,
uint16 _msgType,
bytes calldata _extraOptions
) external view returns (bytes memory options);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { ILayerZeroReceiver, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol";
interface IOAppReceiver is ILayerZeroReceiver {
/**
* @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.
* @param _origin The origin information containing the source endpoint and sender address.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address on the src chain.
* - nonce: The nonce of the message.
* @param _message The lzReceive payload.
* @param _sender The sender address.
* @return isSender Is a valid sender.
*
* @dev Applications can optionally choose to implement a separate composeMsg sender that is NOT the bridging layer.
* @dev The default sender IS the OAppReceiver implementer.
*/
function isComposeMsgSender(
Origin calldata _origin,
bytes calldata _message,
address _sender
) external view returns (bool isSender);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppOptionsType3, EnforcedOptionParam } from "../interfaces/IOAppOptionsType3.sol";
/**
* @title OAppOptionsType3
* @dev Abstract contract implementing the IOAppOptionsType3 interface with type 3 options.
*/
abstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable {
uint16 internal constant OPTION_TYPE_3 = 3;
// @dev The "msgType" should be defined in the child contract.
mapping(uint32 eid => mapping(uint16 msgType => bytes enforcedOption)) public enforcedOptions;
/**
* @dev Sets the enforced options for specific endpoint and message type combinations.
* @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
*
* @dev Only the owner/admin of the OApp can call this function.
* @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
* @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.
* eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
* if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
*/
function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) public virtual onlyOwner {
_setEnforcedOptions(_enforcedOptions);
}
/**
* @dev Sets the enforced options for specific endpoint and message type combinations.
* @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
*
* @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
* @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.
* eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
* if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
*/
function _setEnforcedOptions(EnforcedOptionParam[] memory _enforcedOptions) internal virtual {
for (uint256 i = 0; i < _enforcedOptions.length; i++) {
// @dev Enforced options are only available for optionType 3, as type 1 and 2 dont support combining.
_assertOptionsType3(_enforcedOptions[i].options);
enforcedOptions[_enforcedOptions[i].eid][_enforcedOptions[i].msgType] = _enforcedOptions[i].options;
}
emit EnforcedOptionSet(_enforcedOptions);
}
/**
* @notice Combines options for a given endpoint and message type.
* @param _eid The endpoint ID.
* @param _msgType The OAPP message type.
* @param _extraOptions Additional options passed by the caller.
* @return options The combination of caller specified options AND enforced options.
*
* @dev If there is an enforced lzReceive option:
* - {gasLimit: 200k, msg.value: 1 ether} AND a caller supplies a lzReceive option: {gasLimit: 100k, msg.value: 0.5 ether}
* - The resulting options will be {gasLimit: 300k, msg.value: 1.5 ether} when the message is executed on the remote lzReceive() function.
* @dev This presence of duplicated options is handled off-chain in the verifier/executor.
*/
function combineOptions(
uint32 _eid,
uint16 _msgType,
bytes calldata _extraOptions
) public view virtual returns (bytes memory) {
bytes memory enforced = enforcedOptions[_eid][_msgType];
// No enforced options, pass whatever the caller supplied, even if it's empty or legacy type 1/2 options.
if (enforced.length == 0) return _extraOptions;
// No caller options, return enforced
if (_extraOptions.length == 0) return enforced;
// @dev If caller provided _extraOptions, must be type 3 as its the ONLY type that can be combined.
if (_extraOptions.length >= 2) {
_assertOptionsType3(_extraOptions);
// @dev Remove the first 2 bytes containing the type from the _extraOptions and combine with enforced.
return bytes.concat(enforced, _extraOptions[2:]);
}
// No valid set of options was found.
revert InvalidOptions(_extraOptions);
}
/**
* @dev Internal function to assert that options are of type 3.
* @param _options The options to be checked.
*/
function _assertOptionsType3(bytes memory _options) internal pure virtual {
uint16 optionsType;
assembly {
optionsType := mload(add(_options, 2))
}
if (optionsType != OPTION_TYPE_3) revert InvalidOptions(_options);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// @dev Import the 'MessagingFee' and 'MessagingReceipt' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
import { OAppSender, MessagingFee, MessagingReceipt } from "./OAppSender.sol";
// @dev Import the 'Origin' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
import { OAppReceiver, Origin } from "./OAppReceiver.sol";
import { OAppCore } from "./OAppCore.sol";
/**
* @title OApp
* @dev Abstract contract serving as the base for OApp implementation, combining OAppSender and OAppReceiver functionality.
*/
abstract contract OApp is OAppSender, OAppReceiver {
/**
* @dev Constructor to initialize the OApp with the provided endpoint and owner.
* @param _endpoint The address of the LOCAL LayerZero endpoint.
* @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
*/
constructor(address _endpoint, address _delegate) OAppCore(_endpoint, _delegate) {}
/**
* @notice Retrieves the OApp version information.
* @return senderVersion The version of the OAppSender.sol implementation.
* @return receiverVersion The version of the OAppReceiver.sol implementation.
*/
function oAppVersion()
public
pure
virtual
override(OAppSender, OAppReceiver)
returns (uint64 senderVersion, uint64 receiverVersion)
{
return (SENDER_VERSION, RECEIVER_VERSION);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol";
/**
* @title OAppCore
* @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.
*/
abstract contract OAppCore is IOAppCore, Ownable {
// The LayerZero endpoint associated with the given OApp
ILayerZeroEndpointV2 public immutable endpoint;
// Mapping to store peers associated with corresponding endpoints
mapping(uint32 eid => bytes32 peer) public peers;
/**
* @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.
* @param _endpoint The address of the LOCAL Layer Zero endpoint.
* @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
*
* @dev The delegate typically should be set as the owner of the contract.
*/
constructor(address _endpoint, address _delegate) {
endpoint = ILayerZeroEndpointV2(_endpoint);
if (_delegate == address(0)) revert InvalidDelegate();
endpoint.setDelegate(_delegate);
}
/**
* @notice Sets the peer address (OApp instance) for a corresponding endpoint.
* @param _eid The endpoint ID.
* @param _peer The address of the peer to be associated with the corresponding endpoint.
*
* @dev Only the owner/admin of the OApp can call this function.
* @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.
* @dev Set this to bytes32(0) to remove the peer address.
* @dev Peer is a bytes32 to accommodate non-evm chains.
*/
function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {
_setPeer(_eid, _peer);
}
/**
* @notice Sets the peer address (OApp instance) for a corresponding endpoint.
* @param _eid The endpoint ID.
* @param _peer The address of the peer to be associated with the corresponding endpoint.
*
* @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.
* @dev Set this to bytes32(0) to remove the peer address.
* @dev Peer is a bytes32 to accommodate non-evm chains.
*/
function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {
peers[_eid] = _peer;
emit PeerSet(_eid, _peer);
}
/**
* @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.
* ie. the peer is set to bytes32(0).
* @param _eid The endpoint ID.
* @return peer The address of the peer associated with the specified endpoint.
*/
function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {
bytes32 peer = peers[_eid];
if (peer == bytes32(0)) revert NoPeer(_eid);
return peer;
}
/**
* @notice Sets the delegate address for the OApp.
* @param _delegate The address of the delegate to be set.
*
* @dev Only the owner/admin of the OApp can call this function.
* @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.
*/
function setDelegate(address _delegate) public onlyOwner {
endpoint.setDelegate(_delegate);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { IOAppReceiver, Origin } from "./interfaces/IOAppReceiver.sol";
import { OAppCore } from "./OAppCore.sol";
/**
* @title OAppReceiver
* @dev Abstract contract implementing the ILayerZeroReceiver interface and extending OAppCore for OApp receivers.
*/
abstract contract OAppReceiver is IOAppReceiver, OAppCore {
// Custom error message for when the caller is not the registered endpoint/
error OnlyEndpoint(address addr);
// @dev The version of the OAppReceiver implementation.
// @dev Version is bumped when changes are made to this contract.
uint64 internal constant RECEIVER_VERSION = 2;
/**
* @notice Retrieves the OApp version information.
* @return senderVersion The version of the OAppSender.sol contract.
* @return receiverVersion The version of the OAppReceiver.sol contract.
*
* @dev Providing 0 as the default for OAppSender version. Indicates that the OAppSender is not implemented.
* ie. this is a RECEIVE only OApp.
* @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions.
*/
function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {
return (0, RECEIVER_VERSION);
}
/**
* @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.
* @dev _origin The origin information containing the source endpoint and sender address.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address on the src chain.
* - nonce: The nonce of the message.
* @dev _message The lzReceive payload.
* @param _sender The sender address.
* @return isSender Is a valid sender.
*
* @dev Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer.
* @dev The default sender IS the OAppReceiver implementer.
*/
function isComposeMsgSender(
Origin calldata /*_origin*/,
bytes calldata /*_message*/,
address _sender
) public view virtual returns (bool) {
return _sender == address(this);
}
/**
* @notice Checks if the path initialization is allowed based on the provided origin.
* @param origin The origin information containing the source endpoint and sender address.
* @return Whether the path has been initialized.
*
* @dev This indicates to the endpoint that the OApp has enabled msgs for this particular path to be received.
* @dev This defaults to assuming if a peer has been set, its initialized.
* Can be overridden by the OApp if there is other logic to determine this.
*/
function allowInitializePath(Origin calldata origin) public view virtual returns (bool) {
return peers[origin.srcEid] == origin.sender;
}
/**
* @notice Retrieves the next nonce for a given source endpoint and sender address.
* @dev _srcEid The source endpoint ID.
* @dev _sender The sender address.
* @return nonce The next nonce.
*
* @dev The path nonce starts from 1. If 0 is returned it means that there is NO nonce ordered enforcement.
* @dev Is required by the off-chain executor to determine the OApp expects msg execution is ordered.
* @dev This is also enforced by the OApp.
* @dev By default this is NOT enabled. ie. nextNonce is hardcoded to return 0.
*/
function nextNonce(uint32 /*_srcEid*/, bytes32 /*_sender*/) public view virtual returns (uint64 nonce) {
return 0;
}
/**
* @dev Entry point for receiving messages or packets from the endpoint.
* @param _origin The origin information containing the source endpoint and sender address.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address on the src chain.
* - nonce: The nonce of the message.
* @param _guid The unique identifier for the received LayerZero message.
* @param _message The payload of the received message.
* @param _executor The address of the executor for the received message.
* @param _extraData Additional arbitrary data provided by the corresponding executor.
*
* @dev Entry point for receiving msg/packet from the LayerZero endpoint.
*/
function lzReceive(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address _executor,
bytes calldata _extraData
) public payable virtual {
// Ensures that only the endpoint can attempt to lzReceive() messages to this OApp.
if (address(endpoint) != msg.sender) revert OnlyEndpoint(msg.sender);
// Ensure that the sender matches the expected peer for the source endpoint.
if (_getPeerOrRevert(_origin.srcEid) != _origin.sender) revert OnlyPeer(_origin.srcEid, _origin.sender);
// Call the internal OApp implementation of lzReceive.
_lzReceive(_origin, _guid, _message, _executor, _extraData);
}
/**
* @dev Internal function to implement lzReceive logic without needing to copy the basic parameter validation.
*/
function _lzReceive(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address _executor,
bytes calldata _extraData
) internal virtual;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { MessagingParams, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { OAppCore } from "./OAppCore.sol";
/**
* @title OAppSender
* @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.
*/
abstract contract OAppSender is OAppCore {
using SafeERC20 for IERC20;
// Custom error messages
error NotEnoughNative(uint256 msgValue);
error LzTokenUnavailable();
// @dev The version of the OAppSender implementation.
// @dev Version is bumped when changes are made to this contract.
uint64 internal constant SENDER_VERSION = 1;
/**
* @notice Retrieves the OApp version information.
* @return senderVersion The version of the OAppSender.sol contract.
* @return receiverVersion The version of the OAppReceiver.sol contract.
*
* @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.
* ie. this is a SEND only OApp.
* @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions
*/
function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {
return (SENDER_VERSION, 0);
}
/**
* @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.
* @param _dstEid The destination endpoint ID.
* @param _message The message payload.
* @param _options Additional options for the message.
* @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.
* @return fee The calculated MessagingFee for the message.
* - nativeFee: The native fee for the message.
* - lzTokenFee: The LZ token fee for the message.
*/
function _quote(
uint32 _dstEid,
bytes memory _message,
bytes memory _options,
bool _payInLzToken
) internal view virtual returns (MessagingFee memory fee) {
return
endpoint.quote(
MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),
address(this)
);
}
/**
* @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.
* @param _dstEid The destination endpoint ID.
* @param _message The message payload.
* @param _options Additional options for the message.
* @param _fee The calculated LayerZero fee for the message.
* - nativeFee: The native fee.
* - lzTokenFee: The lzToken fee.
* @param _refundAddress The address to receive any excess fee values sent to the endpoint.
* @return receipt The receipt for the sent message.
* - guid: The unique identifier for the sent message.
* - nonce: The nonce of the sent message.
* - fee: The LayerZero fee incurred for the message.
*/
function _lzSend(
uint32 _dstEid,
bytes memory _message,
bytes memory _options,
MessagingFee memory _fee,
address _refundAddress
) internal virtual returns (MessagingReceipt memory receipt) {
// @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.
uint256 messageValue = _payNative(_fee.nativeFee);
if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);
return
// solhint-disable-next-line check-send-result
endpoint.send{ value: messageValue }(
MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),
_refundAddress
);
}
/**
* @dev Internal function to pay the native fee associated with the message.
* @param _nativeFee The native fee to be paid.
* @return nativeFee The amount of native currency paid.
*
* @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,
* this will need to be overridden because msg.value would contain multiple lzFees.
* @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.
* @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.
* @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.
*/
function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {
if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);
return _nativeFee;
}
/**
* @dev Internal function to pay the LZ token fee associated with the message.
* @param _lzTokenFee The LZ token fee to be paid.
*
* @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.
* @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().
*/
function _payLzToken(uint256 _lzTokenFee) internal virtual {
// @dev Cannot cache the token because it is not immutable in the endpoint.
address lzToken = endpoint.lzToken();
if (lzToken == address(0)) revert LzTokenUnavailable();
// Pay LZ token fee by sending tokens to the endpoint.
IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { MessagingReceipt, MessagingFee } from "../../oapp/OAppSender.sol";
/**
* @dev Struct representing token parameters for the OFT send() operation.
*/
struct SendParam {
uint32 dstEid; // Destination endpoint ID.
bytes32 to; // Recipient address.
uint256 amountLD; // Amount to send in local decimals.
uint256 minAmountLD; // Minimum amount to send in local decimals.
bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.
bytes composeMsg; // The composed message for the send() operation.
bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.
}
/**
* @dev Struct representing OFT limit information.
* @dev These amounts can change dynamically and are up the the specific oft implementation.
*/
struct OFTLimit {
uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.
uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.
}
/**
* @dev Struct representing OFT receipt information.
*/
struct OFTReceipt {
uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.
// @dev In non-default implementations, the amountReceivedLD COULD differ from this value.
uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.
}
/**
* @dev Struct representing OFT fee details.
* @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.
*/
struct OFTFeeDetail {
int256 feeAmountLD; // Amount of the fee in local decimals.
string description; // Description of the fee.
}
/**
* @title IOFT
* @dev Interface for the OftChain (OFT) token.
* @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.
* @dev This specific interface ID is '0x02e49c2c'.
*/
interface IOFT {
// Custom error messages
error InvalidLocalDecimals();
error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);
// Events
event OFTSent(
bytes32 indexed guid, // GUID of the OFT message.
uint32 dstEid, // Destination Endpoint ID.
address indexed fromAddress, // Address of the sender on the src chain.
uint256 amountSentLD, // Amount of tokens sent in local decimals.
uint256 amountReceivedLD // Amount of tokens received in local decimals.
);
event OFTReceived(
bytes32 indexed guid, // GUID of the OFT message.
uint32 srcEid, // Source Endpoint ID.
address indexed toAddress, // Address of the recipient on the dst chain.
uint256 amountReceivedLD // Amount of tokens received in local decimals.
);
/**
* @notice Retrieves interfaceID and the version of the OFT.
* @return interfaceId The interface ID.
* @return version The version.
*
* @dev interfaceId: This specific interface ID is '0x02e49c2c'.
* @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.
* @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.
* ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)
*/
function oftVersion() external view returns (bytes4 interfaceId, uint64 version);
/**
* @notice Retrieves the address of the token associated with the OFT.
* @return token The address of the ERC20 token implementation.
*/
function token() external view returns (address);
/**
* @notice Indicates whether the OFT contract requires approval of the 'token()' to send.
* @return requiresApproval Needs approval of the underlying token implementation.
*
* @dev Allows things like wallet implementers to determine integration requirements,
* without understanding the underlying token implementation.
*/
function approvalRequired() external view returns (bool);
/**
* @notice Retrieves the shared decimals of the OFT.
* @return sharedDecimals The shared decimals of the OFT.
*/
function sharedDecimals() external view returns (uint8);
/**
* @notice Provides a quote for OFT-related operations.
* @param _sendParam The parameters for the send operation.
* @return limit The OFT limit information.
* @return oftFeeDetails The details of OFT fees.
* @return receipt The OFT receipt information.
*/
function quoteOFT(
SendParam calldata _sendParam
) external view returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);
/**
* @notice Provides a quote for the send() operation.
* @param _sendParam The parameters for the send() operation.
* @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.
* @return fee The calculated LayerZero messaging fee from the send() operation.
*
* @dev MessagingFee: LayerZero msg fee
* - nativeFee: The native fee.
* - lzTokenFee: The lzToken fee.
*/
function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);
/**
* @notice Executes the send() operation.
* @param _sendParam The parameters for the send operation.
* @param _fee The fee information supplied by the caller.
* - nativeFee: The native fee.
* - lzTokenFee: The lzToken fee.
* @param _refundAddress The address to receive any excess funds from fees etc. on the src.
* @return receipt The LayerZero messaging receipt from the send() operation.
* @return oftReceipt The OFT receipt information.
*
* @dev MessagingReceipt: LayerZero msg receipt
* - guid: The unique identifier for the sent message.
* - nonce: The nonce of the sent message.
* - fee: The LayerZero fee incurred for the message.
*/
function send(
SendParam calldata _sendParam,
MessagingFee calldata _fee,
address _refundAddress
) external payable returns (MessagingReceipt memory, OFTReceipt memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
library OFTComposeMsgCodec {
// Offset constants for decoding composed messages
uint8 private constant NONCE_OFFSET = 8;
uint8 private constant SRC_EID_OFFSET = 12;
uint8 private constant AMOUNT_LD_OFFSET = 44;
uint8 private constant COMPOSE_FROM_OFFSET = 76;
/**
* @dev Encodes a OFT composed message.
* @param _nonce The nonce value.
* @param _srcEid The source endpoint ID.
* @param _amountLD The amount in local decimals.
* @param _composeMsg The composed message.
* @return _msg The encoded Composed message.
*/
function encode(
uint64 _nonce,
uint32 _srcEid,
uint256 _amountLD,
bytes memory _composeMsg // 0x[composeFrom][composeMsg]
) internal pure returns (bytes memory _msg) {
_msg = abi.encodePacked(_nonce, _srcEid, _amountLD, _composeMsg);
}
/**
* @dev Retrieves the nonce from the composed message.
* @param _msg The message.
* @return The nonce value.
*/
function nonce(bytes calldata _msg) internal pure returns (uint64) {
return uint64(bytes8(_msg[:NONCE_OFFSET]));
}
/**
* @dev Retrieves the source endpoint ID from the composed message.
* @param _msg The message.
* @return The source endpoint ID.
*/
function srcEid(bytes calldata _msg) internal pure returns (uint32) {
return uint32(bytes4(_msg[NONCE_OFFSET:SRC_EID_OFFSET]));
}
/**
* @dev Retrieves the amount in local decimals from the composed message.
* @param _msg The message.
* @return The amount in local decimals.
*/
function amountLD(bytes calldata _msg) internal pure returns (uint256) {
return uint256(bytes32(_msg[SRC_EID_OFFSET:AMOUNT_LD_OFFSET]));
}
/**
* @dev Retrieves the composeFrom value from the composed message.
* @param _msg The message.
* @return The composeFrom value.
*/
function composeFrom(bytes calldata _msg) internal pure returns (bytes32) {
return bytes32(_msg[AMOUNT_LD_OFFSET:COMPOSE_FROM_OFFSET]);
}
/**
* @dev Retrieves the composed message.
* @param _msg The message.
* @return The composed message.
*/
function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {
return _msg[COMPOSE_FROM_OFFSET:];
}
/**
* @dev Converts an address to bytes32.
* @param _addr The address to convert.
* @return The bytes32 representation of the address.
*/
function addressToBytes32(address _addr) internal pure returns (bytes32) {
return bytes32(uint256(uint160(_addr)));
}
/**
* @dev Converts bytes32 to an address.
* @param _b The bytes32 value to convert.
* @return The address representation of bytes32.
*/
function bytes32ToAddress(bytes32 _b) internal pure returns (address) {
return address(uint160(uint256(_b)));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
library OFTMsgCodec {
// Offset constants for encoding and decoding OFT messages
uint8 private constant SEND_TO_OFFSET = 32;
uint8 private constant SEND_AMOUNT_SD_OFFSET = 40;
/**
* @dev Encodes an OFT LayerZero message.
* @param _sendTo The recipient address.
* @param _amountShared The amount in shared decimals.
* @param _composeMsg The composed message.
* @return _msg The encoded message.
* @return hasCompose A boolean indicating whether the message has a composed payload.
*/
function encode(
bytes32 _sendTo,
uint64 _amountShared,
bytes memory _composeMsg
) internal view returns (bytes memory _msg, bool hasCompose) {
hasCompose = _composeMsg.length > 0;
// @dev Remote chains will want to know the composed function caller ie. msg.sender on the src.
_msg = hasCompose
? abi.encodePacked(_sendTo, _amountShared, addressToBytes32(msg.sender), _composeMsg)
: abi.encodePacked(_sendTo, _amountShared);
}
/**
* @dev Checks if the OFT message is composed.
* @param _msg The OFT message.
* @return A boolean indicating whether the message is composed.
*/
function isComposed(bytes calldata _msg) internal pure returns (bool) {
return _msg.length > SEND_AMOUNT_SD_OFFSET;
}
/**
* @dev Retrieves the recipient address from the OFT message.
* @param _msg The OFT message.
* @return The recipient address.
*/
function sendTo(bytes calldata _msg) internal pure returns (bytes32) {
return bytes32(_msg[:SEND_TO_OFFSET]);
}
/**
* @dev Retrieves the amount in shared decimals from the OFT message.
* @param _msg The OFT message.
* @return The amount in shared decimals.
*/
function amountSD(bytes calldata _msg) internal pure returns (uint64) {
return uint64(bytes8(_msg[SEND_TO_OFFSET:SEND_AMOUNT_SD_OFFSET]));
}
/**
* @dev Retrieves the composed message from the OFT message.
* @param _msg The OFT message.
* @return The composed message.
*/
function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {
return _msg[SEND_AMOUNT_SD_OFFSET:];
}
/**
* @dev Converts an address to bytes32.
* @param _addr The address to convert.
* @return The bytes32 representation of the address.
*/
function addressToBytes32(address _addr) internal pure returns (bytes32) {
return bytes32(uint256(uint160(_addr)));
}
/**
* @dev Converts bytes32 to an address.
* @param _b The bytes32 value to convert.
* @return The address representation of bytes32.
*/
function bytes32ToAddress(bytes32 _b) internal pure returns (address) {
return address(uint160(uint256(_b)));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { IOFT, OFTCore } from "./OFTCore.sol";
/**
* @title OFT Contract
* @dev OFT is an ERC-20 token that extends the functionality of the OFTCore contract.
*/
abstract contract OFT is OFTCore, ERC20 {
/**
* @dev Constructor for the OFT contract.
* @param _name The name of the OFT.
* @param _symbol The symbol of the OFT.
* @param _lzEndpoint The LayerZero endpoint address.
* @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
*/
constructor(
string memory _name,
string memory _symbol,
address _lzEndpoint,
address _delegate
) ERC20(_name, _symbol) OFTCore(decimals(), _lzEndpoint, _delegate) {}
/**
* @dev Retrieves the address of the underlying ERC20 implementation.
* @return The address of the OFT token.
*
* @dev In the case of OFT, address(this) and erc20 are the same contract.
*/
function token() public view returns (address) {
return address(this);
}
/**
* @notice Indicates whether the OFT contract requires approval of the 'token()' to send.
* @return requiresApproval Needs approval of the underlying token implementation.
*
* @dev In the case of OFT where the contract IS the token, approval is NOT required.
*/
function approvalRequired() external pure virtual returns (bool) {
return false;
}
/**
* @dev Burns tokens from the sender's specified balance.
* @param _from The address to debit the tokens from.
* @param _amountLD The amount of tokens to send in local decimals.
* @param _minAmountLD The minimum amount to send in local decimals.
* @param _dstEid The destination chain ID.
* @return amountSentLD The amount sent in local decimals.
* @return amountReceivedLD The amount received in local decimals on the remote.
*/
function _debit(
address _from,
uint256 _amountLD,
uint256 _minAmountLD,
uint32 _dstEid
) internal virtual override returns (uint256 amountSentLD, uint256 amountReceivedLD) {
(amountSentLD, amountReceivedLD) = _debitView(_amountLD, _minAmountLD, _dstEid);
// @dev In NON-default OFT, amountSentLD could be 100, with a 10% fee, the amountReceivedLD amount is 90,
// therefore amountSentLD CAN differ from amountReceivedLD.
// @dev Default OFT burns on src.
_burn(_from, amountSentLD);
}
/**
* @dev Credits tokens to the specified address.
* @param _to The address to credit the tokens to.
* @param _amountLD The amount of tokens to credit in local decimals.
* @dev _srcEid The source chain ID.
* @return amountReceivedLD The amount of tokens ACTUALLY received in local decimals.
*/
function _credit(
address _to,
uint256 _amountLD,
uint32 /*_srcEid*/
) internal virtual override returns (uint256 amountReceivedLD) {
if (_to == address(0x0)) _to = address(0xdead); // _mint(...) does not support address(0x0)
// @dev Default OFT mints on dst.
_mint(_to, _amountLD);
// @dev In the case of NON-default OFT, the _amountLD MIGHT not be == amountReceivedLD.
return _amountLD;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { IERC20Metadata, IERC20 } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { IOFT, OFTCore } from "./OFTCore.sol";
/**
* @title OFTAdapter Contract
* @dev OFTAdapter is a contract that adapts an ERC-20 token to the OFT functionality.
*
* @dev For existing ERC20 tokens, this can be used to convert the token to crosschain compatibility.
* @dev WARNING: ONLY 1 of these should exist for a given global mesh,
* unless you make a NON-default implementation of OFT and needs to be done very carefully.
* @dev WARNING: The default OFTAdapter implementation assumes LOSSLESS transfers, ie. 1 token in, 1 token out.
* IF the 'innerToken' applies something like a transfer fee, the default will NOT work...
* a pre/post balance check will need to be done to calculate the amountSentLD/amountReceivedLD.
*/
abstract contract OFTAdapter is OFTCore {
using SafeERC20 for IERC20;
IERC20 internal immutable innerToken;
/**
* @dev Constructor for the OFTAdapter contract.
* @param _token The address of the ERC-20 token to be adapted.
* @param _lzEndpoint The LayerZero endpoint address.
* @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
*/
constructor(
address _token,
address _lzEndpoint,
address _delegate
) OFTCore(IERC20Metadata(_token).decimals(), _lzEndpoint, _delegate) {
innerToken = IERC20(_token);
}
/**
* @dev Retrieves the address of the underlying ERC20 implementation.
* @return The address of the adapted ERC-20 token.
*
* @dev In the case of OFTAdapter, address(this) and erc20 are NOT the same contract.
*/
function token() public view returns (address) {
return address(innerToken);
}
/**
* @notice Indicates whether the OFT contract requires approval of the 'token()' to send.
* @return requiresApproval Needs approval of the underlying token implementation.
*
* @dev In the case of default OFTAdapter, approval is required.
* @dev In non-default OFTAdapter contracts with something like mint and burn privileges, it would NOT need approval.
*/
function approvalRequired() external pure virtual returns (bool) {
return true;
}
/**
* @dev Burns tokens from the sender's specified balance, ie. pull method.
* @param _from The address to debit from.
* @param _amountLD The amount of tokens to send in local decimals.
* @param _minAmountLD The minimum amount to send in local decimals.
* @param _dstEid The destination chain ID.
* @return amountSentLD The amount sent in local decimals.
* @return amountReceivedLD The amount received in local decimals on the remote.
*
* @dev msg.sender will need to approve this _amountLD of tokens to be locked inside of the contract.
* @dev WARNING: The default OFTAdapter implementation assumes LOSSLESS transfers, ie. 1 token in, 1 token out.
* IF the 'innerToken' applies something like a transfer fee, the default will NOT work...
* a pre/post balance check will need to be done to calculate the amountReceivedLD.
*/
function _debit(
address _from,
uint256 _amountLD,
uint256 _minAmountLD,
uint32 _dstEid
) internal virtual override returns (uint256 amountSentLD, uint256 amountReceivedLD) {
(amountSentLD, amountReceivedLD) = _debitView(_amountLD, _minAmountLD, _dstEid);
// @dev Lock tokens by moving them into this contract from the caller.
innerToken.safeTransferFrom(_from, address(this), amountSentLD);
}
/**
* @dev Credits tokens to the specified address.
* @param _to The address to credit the tokens to.
* @param _amountLD The amount of tokens to credit in local decimals.
* @dev _srcEid The source chain ID.
* @return amountReceivedLD The amount of tokens ACTUALLY received in local decimals.
*
* @dev WARNING: The default OFTAdapter implementation assumes LOSSLESS transfers, ie. 1 token in, 1 token out.
* IF the 'innerToken' applies something like a transfer fee, the default will NOT work...
* a pre/post balance check will need to be done to calculate the amountReceivedLD.
*/
function _credit(
address _to,
uint256 _amountLD,
uint32 /*_srcEid*/
) internal virtual override returns (uint256 amountReceivedLD) {
// @dev Unlock the tokens and transfer to the recipient.
innerToken.safeTransfer(_to, _amountLD);
// @dev In the case of NON-default OFTAdapter, the amountLD MIGHT not be == amountReceivedLD.
return _amountLD;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { OApp, Origin } from "../oapp/OApp.sol";
import { OAppOptionsType3 } from "../oapp/libs/OAppOptionsType3.sol";
import { IOAppMsgInspector } from "../oapp/interfaces/IOAppMsgInspector.sol";
import { OAppPreCrimeSimulator } from "../precrime/OAppPreCrimeSimulator.sol";
import { IOFT, SendParam, OFTLimit, OFTReceipt, OFTFeeDetail, MessagingReceipt, MessagingFee } from "./interfaces/IOFT.sol";
import { OFTMsgCodec } from "./libs/OFTMsgCodec.sol";
import { OFTComposeMsgCodec } from "./libs/OFTComposeMsgCodec.sol";
/**
* @title OFTCore
* @dev Abstract contract for the OftChain (OFT) token.
*/
abstract contract OFTCore is IOFT, OApp, OAppPreCrimeSimulator, OAppOptionsType3 {
using OFTMsgCodec for bytes;
using OFTMsgCodec for bytes32;
// @notice Provides a conversion rate when swapping between denominations of SD and LD
// - shareDecimals == SD == shared Decimals
// - localDecimals == LD == local decimals
// @dev Considers that tokens have different decimal amounts on various chains.
// @dev eg.
// For a token
// - locally with 4 decimals --> 1.2345 => uint(12345)
// - remotely with 2 decimals --> 1.23 => uint(123)
// - The conversion rate would be 10 ** (4 - 2) = 100
// @dev If you want to send 1.2345 -> (uint 12345), you CANNOT represent that value on the remote,
// you can only display 1.23 -> uint(123).
// @dev To preserve the dust that would otherwise be lost on that conversion,
// we need to unify a denomination that can be represented on ALL chains inside of the OFT mesh
uint256 public immutable decimalConversionRate;
// @notice Msg types that are used to identify the various OFT operations.
// @dev This can be extended in child contracts for non-default oft operations
// @dev These values are used in things like combineOptions() in OAppOptionsType3.sol.
uint16 public constant SEND = 1;
uint16 public constant SEND_AND_CALL = 2;
// Address of an optional contract to inspect both 'message' and 'options'
address public msgInspector;
event MsgInspectorSet(address inspector);
/**
* @dev Constructor.
* @param _localDecimals The decimals of the token on the local chain (this chain).
* @param _endpoint The address of the LayerZero endpoint.
* @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
*/
constructor(uint8 _localDecimals, address _endpoint, address _delegate) OApp(_endpoint, _delegate) {
if (_localDecimals < sharedDecimals()) revert InvalidLocalDecimals();
decimalConversionRate = 10 ** (_localDecimals - sharedDecimals());
}
/**
* @notice Retrieves interfaceID and the version of the OFT.
* @return interfaceId The interface ID.
* @return version The version.
*
* @dev interfaceId: This specific interface ID is '0x02e49c2c'.
* @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.
* @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.
* ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)
*/
function oftVersion() external pure virtual returns (bytes4 interfaceId, uint64 version) {
return (type(IOFT).interfaceId, 1);
}
/**
* @dev Retrieves the shared decimals of the OFT.
* @return The shared decimals of the OFT.
*
* @dev Sets an implicit cap on the amount of tokens, over uint64.max() will need some sort of outbound cap / totalSupply cap
* Lowest common decimal denominator between chains.
* Defaults to 6 decimal places to provide up to 18,446,744,073,709.551615 units (max uint64).
* For tokens exceeding this totalSupply(), they will need to override the sharedDecimals function with something smaller.
* ie. 4 sharedDecimals would be 1,844,674,407,370,955.1615
*/
function sharedDecimals() public view virtual returns (uint8) {
return 6;
}
/**
* @dev Sets the message inspector address for the OFT.
* @param _msgInspector The address of the message inspector.
*
* @dev This is an optional contract that can be used to inspect both 'message' and 'options'.
* @dev Set it to address(0) to disable it, or set it to a contract address to enable it.
*/
function setMsgInspector(address _msgInspector) public virtual onlyOwner {
msgInspector = _msgInspector;
emit MsgInspectorSet(_msgInspector);
}
/**
* @notice Provides a quote for OFT-related operations.
* @param _sendParam The parameters for the send operation.
* @return oftLimit The OFT limit information.
* @return oftFeeDetails The details of OFT fees.
* @return oftReceipt The OFT receipt information.
*/
function quoteOFT(
SendParam calldata _sendParam
)
external
view
virtual
returns (OFTLimit memory oftLimit, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory oftReceipt)
{
uint256 minAmountLD = 0; // Unused in the default implementation.
uint256 maxAmountLD = type(uint64).max; // Unused in the default implementation.
oftLimit = OFTLimit(minAmountLD, maxAmountLD);
// Unused in the default implementation; reserved for future complex fee details.
oftFeeDetails = new OFTFeeDetail[](0);
// @dev This is the same as the send() operation, but without the actual send.
// - amountSentLD is the amount in local decimals that would be sent from the sender.
// - amountReceivedLD is the amount in local decimals that will be credited to the recipient on the remote OFT instance.
// @dev The amountSentLD MIGHT not equal the amount the user actually receives. HOWEVER, the default does.
(uint256 amountSentLD, uint256 amountReceivedLD) = _debitView(
_sendParam.amountLD,
_sendParam.minAmountLD,
_sendParam.dstEid
);
oftReceipt = OFTReceipt(amountSentLD, amountReceivedLD);
}
/**
* @notice Provides a quote for the send() operation.
* @param _sendParam The parameters for the send() operation.
* @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.
* @return msgFee The calculated LayerZero messaging fee from the send() operation.
*
* @dev MessagingFee: LayerZero msg fee
* - nativeFee: The native fee.
* - lzTokenFee: The lzToken fee.
*/
function quoteSend(
SendParam calldata _sendParam,
bool _payInLzToken
) external view virtual returns (MessagingFee memory msgFee) {
// @dev mock the amount to receive, this is the same operation used in the send().
// The quote is as similar as possible to the actual send() operation.
(, uint256 amountReceivedLD) = _debitView(_sendParam.amountLD, _sendParam.minAmountLD, _sendParam.dstEid);
// @dev Builds the options and OFT message to quote in the endpoint.
(bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam, amountReceivedLD);
// @dev Calculates the LayerZero fee for the send() operation.
return _quote(_sendParam.dstEid, message, options, _payInLzToken);
}
/**
* @dev Executes the send operation.
* @param _sendParam The parameters for the send operation.
* @param _fee The calculated fee for the send() operation.
* - nativeFee: The native fee.
* - lzTokenFee: The lzToken fee.
* @param _refundAddress The address to receive any excess funds.
* @return msgReceipt The receipt for the send operation.
* @return oftReceipt The OFT receipt information.
*
* @dev MessagingReceipt: LayerZero msg receipt
* - guid: The unique identifier for the sent message.
* - nonce: The nonce of the sent message.
* - fee: The LayerZero fee incurred for the message.
*/
function send(
SendParam calldata _sendParam,
MessagingFee calldata _fee,
address _refundAddress
) external payable virtual returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt) {
// @dev Applies the token transfers regarding this send() operation.
// - amountSentLD is the amount in local decimals that was ACTUALLY sent/debited from the sender.
// - amountReceivedLD is the amount in local decimals that will be received/credited to the recipient on the remote OFT instance.
(uint256 amountSentLD, uint256 amountReceivedLD) = _debit(
msg.sender,
_sendParam.amountLD,
_sendParam.minAmountLD,
_sendParam.dstEid
);
// @dev Builds the options and OFT message to quote in the endpoint.
(bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam, amountReceivedLD);
// @dev Sends the message to the LayerZero endpoint and returns the LayerZero msg receipt.
msgReceipt = _lzSend(_sendParam.dstEid, message, options, _fee, _refundAddress);
// @dev Formulate the OFT receipt.
oftReceipt = OFTReceipt(amountSentLD, amountReceivedLD);
emit OFTSent(msgReceipt.guid, _sendParam.dstEid, msg.sender, amountSentLD, amountReceivedLD);
}
/**
* @dev Internal function to build the message and options.
* @param _sendParam The parameters for the send() operation.
* @param _amountLD The amount in local decimals.
* @return message The encoded message.
* @return options The encoded options.
*/
function _buildMsgAndOptions(
SendParam calldata _sendParam,
uint256 _amountLD
) internal view virtual returns (bytes memory message, bytes memory options) {
bool hasCompose;
// @dev This generated message has the msg.sender encoded into the payload so the remote knows who the caller is.
(message, hasCompose) = OFTMsgCodec.encode(
_sendParam.to,
_toSD(_amountLD),
// @dev Must be include a non empty bytes if you want to compose, EVEN if you dont need it on the remote.
// EVEN if you dont require an arbitrary payload to be sent... eg. '0x01'
_sendParam.composeMsg
);
// @dev Change the msg type depending if its composed or not.
uint16 msgType = hasCompose ? SEND_AND_CALL : SEND;
// @dev Combine the callers _extraOptions with the enforced options via the OAppOptionsType3.
options = combineOptions(_sendParam.dstEid, msgType, _sendParam.extraOptions);
// @dev Optionally inspect the message and options depending if the OApp owner has set a msg inspector.
// @dev If it fails inspection, needs to revert in the implementation. ie. does not rely on return boolean
if (msgInspector != address(0)) IOAppMsgInspector(msgInspector).inspect(message, options);
}
/**
* @dev Internal function to handle the receive on the LayerZero endpoint.
* @param _origin The origin information.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address from the src chain.
* - nonce: The nonce of the LayerZero message.
* @param _guid The unique identifier for the received LayerZero message.
* @param _message The encoded message.
* @dev _executor The address of the executor.
* @dev _extraData Additional data.
*/
function _lzReceive(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address /*_executor*/, // @dev unused in the default implementation.
bytes calldata /*_extraData*/ // @dev unused in the default implementation.
) internal virtual override {
// @dev The src sending chain doesnt know the address length on this chain (potentially non-evm)
// Thus everything is bytes32() encoded in flight.
address toAddress = _message.sendTo().bytes32ToAddress();
// @dev Credit the amountLD to the recipient and return the ACTUAL amount the recipient received in local decimals
uint256 amountReceivedLD = _credit(toAddress, _toLD(_message.amountSD()), _origin.srcEid);
if (_message.isComposed()) {
// @dev Proprietary composeMsg format for the OFT.
bytes memory composeMsg = OFTComposeMsgCodec.encode(
_origin.nonce,
_origin.srcEid,
amountReceivedLD,
_message.composeMsg()
);
// @dev Stores the lzCompose payload that will be executed in a separate tx.
// Standardizes functionality for executing arbitrary contract invocation on some non-evm chains.
// @dev The off-chain executor will listen and process the msg based on the src-chain-callers compose options passed.
// @dev The index is used when a OApp needs to compose multiple msgs on lzReceive.
// For default OFT implementation there is only 1 compose msg per lzReceive, thus its always 0.
endpoint.sendCompose(toAddress, _guid, 0 /* the index of the composed message*/, composeMsg);
}
emit OFTReceived(_guid, _origin.srcEid, toAddress, amountReceivedLD);
}
/**
* @dev Internal function to handle the OAppPreCrimeSimulator simulated receive.
* @param _origin The origin information.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address from the src chain.
* - nonce: The nonce of the LayerZero message.
* @param _guid The unique identifier for the received LayerZero message.
* @param _message The LayerZero message.
* @param _executor The address of the off-chain executor.
* @param _extraData Arbitrary data passed by the msg executor.
*
* @dev Enables the preCrime simulator to mock sending lzReceive() messages,
* routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver.
*/
function _lzReceiveSimulate(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address _executor,
bytes calldata _extraData
) internal virtual override {
_lzReceive(_origin, _guid, _message, _executor, _extraData);
}
/**
* @dev Check if the peer is considered 'trusted' by the OApp.
* @param _eid The endpoint ID to check.
* @param _peer The peer to check.
* @return Whether the peer passed is considered 'trusted' by the OApp.
*
* @dev Enables OAppPreCrimeSimulator to check whether a potential Inbound Packet is from a trusted source.
*/
function isPeer(uint32 _eid, bytes32 _peer) public view virtual override returns (bool) {
return peers[_eid] == _peer;
}
/**
* @dev Internal function to remove dust from the given local decimal amount.
* @param _amountLD The amount in local decimals.
* @return amountLD The amount after removing dust.
*
* @dev Prevents the loss of dust when moving amounts between chains with different decimals.
* @dev eg. uint(123) with a conversion rate of 100 becomes uint(100).
*/
function _removeDust(uint256 _amountLD) internal view virtual returns (uint256 amountLD) {
return (_amountLD / decimalConversionRate) * decimalConversionRate;
}
/**
* @dev Internal function to convert an amount from shared decimals into local decimals.
* @param _amountSD The amount in shared decimals.
* @return amountLD The amount in local decimals.
*/
function _toLD(uint64 _amountSD) internal view virtual returns (uint256 amountLD) {
return _amountSD * decimalConversionRate;
}
/**
* @dev Internal function to convert an amount from local decimals into shared decimals.
* @param _amountLD The amount in local decimals.
* @return amountSD The amount in shared decimals.
*/
function _toSD(uint256 _amountLD) internal view virtual returns (uint64 amountSD) {
return uint64(_amountLD / decimalConversionRate);
}
/**
* @dev Internal function to mock the amount mutation from a OFT debit() operation.
* @param _amountLD The amount to send in local decimals.
* @param _minAmountLD The minimum amount to send in local decimals.
* @dev _dstEid The destination endpoint ID.
* @return amountSentLD The amount sent, in local decimals.
* @return amountReceivedLD The amount to be received on the remote chain, in local decimals.
*
* @dev This is where things like fees would be calculated and deducted from the amount to be received on the remote.
*/
function _debitView(
uint256 _amountLD,
uint256 _minAmountLD,
uint32 /*_dstEid*/
) internal view virtual returns (uint256 amountSentLD, uint256 amountReceivedLD) {
// @dev Remove the dust so nothing is lost on the conversion between chains with different decimals for the token.
amountSentLD = _removeDust(_amountLD);
// @dev The amount to send is the same as amount received in the default implementation.
amountReceivedLD = amountSentLD;
// @dev Check for slippage.
if (amountReceivedLD < _minAmountLD) {
revert SlippageExceeded(amountReceivedLD, _minAmountLD);
}
}
/**
* @dev Internal function to perform a debit operation.
* @param _from The address to debit.
* @param _amountLD The amount to send in local decimals.
* @param _minAmountLD The minimum amount to send in local decimals.
* @param _dstEid The destination endpoint ID.
* @return amountSentLD The amount sent in local decimals.
* @return amountReceivedLD The amount received in local decimals on the remote.
*
* @dev Defined here but are intended to be overriden depending on the OFT implementation.
* @dev Depending on OFT implementation the _amountLD could differ from the amountReceivedLD.
*/
function _debit(
address _from,
uint256 _amountLD,
uint256 _minAmountLD,
uint32 _dstEid
) internal virtual returns (uint256 amountSentLD, uint256 amountReceivedLD);
/**
* @dev Internal function to perform a credit operation.
* @param _to The address to credit.
* @param _amountLD The amount to credit in local decimals.
* @param _srcEid The source endpoint ID.
* @return amountReceivedLD The amount ACTUALLY received in local decimals.
*
* @dev Defined here but are intended to be overriden depending on the OFT implementation.
* @dev Depending on OFT implementation the _amountLD could differ from the amountReceivedLD.
*/
function _credit(
address _to,
uint256 _amountLD,
uint32 _srcEid
) internal virtual returns (uint256 amountReceivedLD);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
// @dev Import the Origin so it's exposed to OAppPreCrimeSimulator implementers.
// solhint-disable-next-line no-unused-import
import { InboundPacket, Origin } from "../libs/Packet.sol";
/**
* @title IOAppPreCrimeSimulator Interface
* @dev Interface for the preCrime simulation functionality in an OApp.
*/
interface IOAppPreCrimeSimulator {
// @dev simulation result used in PreCrime implementation
error SimulationResult(bytes result);
error OnlySelf();
/**
* @dev Emitted when the preCrime contract address is set.
* @param preCrimeAddress The address of the preCrime contract.
*/
event PreCrimeSet(address preCrimeAddress);
/**
* @dev Retrieves the address of the preCrime contract implementation.
* @return The address of the preCrime contract.
*/
function preCrime() external view returns (address);
/**
* @dev Retrieves the address of the OApp contract.
* @return The address of the OApp contract.
*/
function oApp() external view returns (address);
/**
* @dev Sets the preCrime contract address.
* @param _preCrime The address of the preCrime contract.
*/
function setPreCrime(address _preCrime) external;
/**
* @dev Mocks receiving a packet, then reverts with a series of data to infer the state/result.
* @param _packets An array of LayerZero InboundPacket objects representing received packets.
*/
function lzReceiveAndRevert(InboundPacket[] calldata _packets) external payable;
/**
* @dev checks if the specified peer is considered 'trusted' by the OApp.
* @param _eid The endpoint Id to check.
* @param _peer The peer to check.
* @return Whether the peer passed is considered 'trusted' by the OApp.
*/
function isPeer(uint32 _eid, bytes32 _peer) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
struct PreCrimePeer {
uint32 eid;
bytes32 preCrime;
bytes32 oApp;
}
// TODO not done yet
interface IPreCrime {
error OnlyOffChain();
// for simulate()
error PacketOversize(uint256 max, uint256 actual);
error PacketUnsorted();
error SimulationFailed(bytes reason);
// for preCrime()
error SimulationResultNotFound(uint32 eid);
error InvalidSimulationResult(uint32 eid, bytes reason);
error CrimeFound(bytes crime);
function getConfig(bytes[] calldata _packets, uint256[] calldata _packetMsgValues) external returns (bytes memory);
function simulate(
bytes[] calldata _packets,
uint256[] calldata _packetMsgValues
) external payable returns (bytes memory);
function buildSimulationResult() external view returns (bytes memory);
function preCrime(
bytes[] calldata _packets,
uint256[] calldata _packetMsgValues,
bytes[] calldata _simulations
) external;
function version() external view returns (uint64 major, uint8 minor);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol";
/**
* @title InboundPacket
* @dev Structure representing an inbound packet received by the contract.
*/
struct InboundPacket {
Origin origin; // Origin information of the packet.
uint32 dstEid; // Destination endpointId of the packet.
address receiver; // Receiver address for the packet.
bytes32 guid; // Unique identifier of the packet.
uint256 value; // msg.value of the packet.
address executor; // Executor address for the packet.
bytes message; // Message payload of the packet.
bytes extraData; // Additional arbitrary data for the packet.
}
/**
* @title PacketDecoder
* @dev Library for decoding LayerZero packets.
*/
library PacketDecoder {
using PacketV1Codec for bytes;
/**
* @dev Decode an inbound packet from the given packet data.
* @param _packet The packet data to decode.
* @return packet An InboundPacket struct representing the decoded packet.
*/
function decode(bytes calldata _packet) internal pure returns (InboundPacket memory packet) {
packet.origin = Origin(_packet.srcEid(), _packet.sender(), _packet.nonce());
packet.dstEid = _packet.dstEid();
packet.receiver = _packet.receiverB20();
packet.guid = _packet.guid();
packet.message = _packet.message();
}
/**
* @dev Decode multiple inbound packets from the given packet data and associated message values.
* @param _packets An array of packet data to decode.
* @param _packetMsgValues An array of associated message values for each packet.
* @return packets An array of InboundPacket structs representing the decoded packets.
*/
function decode(
bytes[] calldata _packets,
uint256[] memory _packetMsgValues
) internal pure returns (InboundPacket[] memory packets) {
packets = new InboundPacket[](_packets.length);
for (uint256 i = 0; i < _packets.length; i++) {
bytes calldata packet = _packets[i];
packets[i] = PacketDecoder.decode(packet);
// @dev Allows the verifier to specify the msg.value that gets passed in lzReceive.
packets[i].value = _packetMsgValues[i];
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IPreCrime } from "./interfaces/IPreCrime.sol";
import { IOAppPreCrimeSimulator, InboundPacket, Origin } from "./interfaces/IOAppPreCrimeSimulator.sol";
/**
* @title OAppPreCrimeSimulator
* @dev Abstract contract serving as the base for preCrime simulation functionality in an OApp.
*/
abstract contract OAppPreCrimeSimulator is IOAppPreCrimeSimulator, Ownable {
// The address of the preCrime implementation.
address public preCrime;
/**
* @dev Retrieves the address of the OApp contract.
* @return The address of the OApp contract.
*
* @dev The simulator contract is the base contract for the OApp by default.
* @dev If the simulator is a separate contract, override this function.
*/
function oApp() external view virtual returns (address) {
return address(this);
}
/**
* @dev Sets the preCrime contract address.
* @param _preCrime The address of the preCrime contract.
*/
function setPreCrime(address _preCrime) public virtual onlyOwner {
preCrime = _preCrime;
emit PreCrimeSet(_preCrime);
}
/**
* @dev Interface for pre-crime simulations. Always reverts at the end with the simulation results.
* @param _packets An array of InboundPacket objects representing received packets to be delivered.
*
* @dev WARNING: MUST revert at the end with the simulation results.
* @dev Gives the preCrime implementation the ability to mock sending packets to the lzReceive function,
* WITHOUT actually executing them.
*/
function lzReceiveAndRevert(InboundPacket[] calldata _packets) public payable virtual {
for (uint256 i = 0; i < _packets.length; i++) {
InboundPacket calldata packet = _packets[i];
// Ignore packets that are not from trusted peers.
if (!isPeer(packet.origin.srcEid, packet.origin.sender)) continue;
// @dev Because a verifier is calling this function, it doesnt have access to executor params:
// - address _executor
// - bytes calldata _extraData
// preCrime will NOT work for OApps that rely on these two parameters inside of their _lzReceive().
// They are instead stubbed to default values, address(0) and bytes("")
// @dev Calling this.lzReceiveSimulate removes ability for assembly return 0 callstack exit,
// which would cause the revert to be ignored.
this.lzReceiveSimulate{ value: packet.value }(
packet.origin,
packet.guid,
packet.message,
packet.executor,
packet.extraData
);
}
// @dev Revert with the simulation results. msg.sender must implement IPreCrime.buildSimulationResult().
revert SimulationResult(IPreCrime(msg.sender).buildSimulationResult());
}
/**
* @dev Is effectively an internal function because msg.sender must be address(this).
* Allows resetting the call stack for 'internal' calls.
* @param _origin The origin information containing the source endpoint and sender address.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address on the src chain.
* - nonce: The nonce of the message.
* @param _guid The unique identifier of the packet.
* @param _message The message payload of the packet.
* @param _executor The executor address for the packet.
* @param _extraData Additional data for the packet.
*/
function lzReceiveSimulate(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address _executor,
bytes calldata _extraData
) external payable virtual {
// @dev Ensure ONLY can be called 'internally'.
if (msg.sender != address(this)) revert OnlySelf();
_lzReceiveSimulate(_origin, _guid, _message, _executor, _extraData);
}
/**
* @dev Internal function to handle the OAppPreCrimeSimulator simulated receive.
* @param _origin The origin information.
* - srcEid: The source chain endpoint ID.
* - sender: The sender address from the src chain.
* - nonce: The nonce of the LayerZero message.
* @param _guid The GUID of the LayerZero message.
* @param _message The LayerZero message.
* @param _executor The address of the off-chain executor.
* @param _extraData Arbitrary data passed by the msg executor.
*
* @dev Enables the preCrime simulator to mock sending lzReceive() messages,
* routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver.
*/
function _lzReceiveSimulate(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address _executor,
bytes calldata _extraData
) internal virtual;
/**
* @dev checks if the specified peer is considered 'trusted' by the OApp.
* @param _eid The endpoint Id to check.
* @param _peer The peer to check.
* @return Whether the peer passed is considered 'trusted' by the OApp.
*/
function isPeer(uint32 _eid, bytes32 _peer) public view virtual returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import { IMessageLibManager } from "./IMessageLibManager.sol";
import { IMessagingComposer } from "./IMessagingComposer.sol";
import { IMessagingChannel } from "./IMessagingChannel.sol";
import { IMessagingContext } from "./IMessagingContext.sol";
struct MessagingParams {
uint32 dstEid;
bytes32 receiver;
bytes message;
bytes options;
bool payInLzToken;
}
struct MessagingReceipt {
bytes32 guid;
uint64 nonce;
MessagingFee fee;
}
struct MessagingFee {
uint256 nativeFee;
uint256 lzTokenFee;
}
struct Origin {
uint32 srcEid;
bytes32 sender;
uint64 nonce;
}
interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {
event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);
event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);
event PacketDelivered(Origin origin, address receiver);
event LzReceiveAlert(
address indexed receiver,
address indexed executor,
Origin origin,
bytes32 guid,
uint256 gas,
uint256 value,
bytes message,
bytes extraData,
bytes reason
);
event LzTokenSet(address token);
event DelegateSet(address sender, address delegate);
function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);
function send(
MessagingParams calldata _params,
address _refundAddress
) external payable returns (MessagingReceipt memory);
function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;
function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);
function initializable(Origin calldata _origin, address _receiver) external view returns (bool);
function lzReceive(
Origin calldata _origin,
address _receiver,
bytes32 _guid,
bytes calldata _message,
bytes calldata _extraData
) external payable;
// oapp can burn messages partially by calling this function with its own business logic if messages are verified in order
function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;
function setLzToken(address _lzToken) external;
function lzToken() external view returns (address);
function nativeToken() external view returns (address);
function setDelegate(address _delegate) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import { Origin } from "./ILayerZeroEndpointV2.sol";
interface ILayerZeroReceiver {
function allowInitializePath(Origin calldata _origin) external view returns (bool);
function nextNonce(uint32 _eid, bytes32 _sender) external view returns (uint64);
function lzReceive(
Origin calldata _origin,
bytes32 _guid,
bytes calldata _message,
address _executor,
bytes calldata _extraData
) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import { SetConfigParam } from "./IMessageLibManager.sol";
enum MessageLibType {
Send,
Receive,
SendAndReceive
}
interface IMessageLib is IERC165 {
function setConfig(address _oapp, SetConfigParam[] calldata _config) external;
function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view returns (bytes memory config);
function isSupportedEid(uint32 _eid) external view returns (bool);
// message libs of same major version are compatible
function version() external view returns (uint64 major, uint8 minor, uint8 endpointVersion);
function messageLibType() external view returns (MessageLibType);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
struct SetConfigParam {
uint32 eid;
uint32 configType;
bytes config;
}
interface IMessageLibManager {
struct Timeout {
address lib;
uint256 expiry;
}
event LibraryRegistered(address newLib);
event DefaultSendLibrarySet(uint32 eid, address newLib);
event DefaultReceiveLibrarySet(uint32 eid, address newLib);
event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);
event SendLibrarySet(address sender, uint32 eid, address newLib);
event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);
event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);
function registerLibrary(address _lib) external;
function isRegisteredLibrary(address _lib) external view returns (bool);
function getRegisteredLibraries() external view returns (address[] memory);
function setDefaultSendLibrary(uint32 _eid, address _newLib) external;
function defaultSendLibrary(uint32 _eid) external view returns (address);
function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _gracePeriod) external;
function defaultReceiveLibrary(uint32 _eid) external view returns (address);
function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;
function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);
function isSupportedEid(uint32 _eid) external view returns (bool);
function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);
/// ------------------- OApp interfaces -------------------
function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;
function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);
function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);
function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;
function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);
function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _expiry) external;
function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);
function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;
function getConfig(
address _oapp,
address _lib,
uint32 _eid,
uint32 _configType
) external view returns (bytes memory config);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
interface IMessagingChannel {
event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);
event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);
event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);
function eid() external view returns (uint32);
// this is an emergency function if a message cannot be verified for some reasons
// required to provide _nextNonce to avoid race condition
function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;
function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;
function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;
function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);
function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);
function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);
function inboundPayloadHash(
address _receiver,
uint32 _srcEid,
bytes32 _sender,
uint64 _nonce
) external view returns (bytes32);
function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
interface IMessagingComposer {
event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);
event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);
event LzComposeAlert(
address indexed from,
address indexed to,
address indexed executor,
bytes32 guid,
uint16 index,
uint256 gas,
uint256 value,
bytes message,
bytes extraData,
bytes reason
);
function composeQueue(
address _from,
address _to,
bytes32 _guid,
uint16 _index
) external view returns (bytes32 messageHash);
function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;
function lzCompose(
address _from,
address _to,
bytes32 _guid,
uint16 _index,
bytes calldata _message,
bytes calldata _extraData
) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
interface IMessagingContext {
function isSendingMessage() external view returns (bool);
function getSendContext() external view returns (uint32 dstEid, address sender);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import { MessagingFee } from "./ILayerZeroEndpointV2.sol";
import { IMessageLib } from "./IMessageLib.sol";
struct Packet {
uint64 nonce;
uint32 srcEid;
address sender;
uint32 dstEid;
bytes32 receiver;
bytes32 guid;
bytes message;
}
interface ISendLib is IMessageLib {
function send(
Packet calldata _packet,
bytes calldata _options,
bool _payInLzToken
) external returns (MessagingFee memory, bytes memory encodedPacket);
function quote(
Packet calldata _packet,
bytes calldata _options,
bool _payInLzToken
) external view returns (MessagingFee memory);
function setTreasury(address _treasury) external;
function withdrawFee(address _to, uint256 _amount) external;
function withdrawLzTokenFee(address _lzToken, address _to, uint256 _amount) external;
}// SPDX-License-Identifier: LZBL-1.2
pragma solidity ^0.8.20;
library AddressCast {
error AddressCast_InvalidSizeForAddress();
error AddressCast_InvalidAddress();
function toBytes32(bytes calldata _addressBytes) internal pure returns (bytes32 result) {
if (_addressBytes.length > 32) revert AddressCast_InvalidAddress();
result = bytes32(_addressBytes);
unchecked {
uint256 offset = 32 - _addressBytes.length;
result = result >> (offset * 8);
}
}
function toBytes32(address _address) internal pure returns (bytes32 result) {
result = bytes32(uint256(uint160(_address)));
}
function toBytes(bytes32 _addressBytes32, uint256 _size) internal pure returns (bytes memory result) {
if (_size == 0 || _size > 32) revert AddressCast_InvalidSizeForAddress();
result = new bytes(_size);
unchecked {
uint256 offset = 256 - _size * 8;
assembly {
mstore(add(result, 32), shl(offset, _addressBytes32))
}
}
}
function toAddress(bytes32 _addressBytes32) internal pure returns (address result) {
result = address(uint160(uint256(_addressBytes32)));
}
function toAddress(bytes calldata _addressBytes) internal pure returns (address result) {
if (_addressBytes.length != 20) revert AddressCast_InvalidAddress();
result = address(bytes20(_addressBytes));
}
}// SPDX-License-Identifier: LZBL-1.2
pragma solidity ^0.8.20;
import { Packet } from "../../interfaces/ISendLib.sol";
import { AddressCast } from "../../libs/AddressCast.sol";
library PacketV1Codec {
using AddressCast for address;
using AddressCast for bytes32;
uint8 internal constant PACKET_VERSION = 1;
// header (version + nonce + path)
// version
uint256 private constant PACKET_VERSION_OFFSET = 0;
// nonce
uint256 private constant NONCE_OFFSET = 1;
// path
uint256 private constant SRC_EID_OFFSET = 9;
uint256 private constant SENDER_OFFSET = 13;
uint256 private constant DST_EID_OFFSET = 45;
uint256 private constant RECEIVER_OFFSET = 49;
// payload (guid + message)
uint256 private constant GUID_OFFSET = 81; // keccak256(nonce + path)
uint256 private constant MESSAGE_OFFSET = 113;
function encode(Packet memory _packet) internal pure returns (bytes memory encodedPacket) {
encodedPacket = abi.encodePacked(
PACKET_VERSION,
_packet.nonce,
_packet.srcEid,
_packet.sender.toBytes32(),
_packet.dstEid,
_packet.receiver,
_packet.guid,
_packet.message
);
}
function encodePacketHeader(Packet memory _packet) internal pure returns (bytes memory) {
return
abi.encodePacked(
PACKET_VERSION,
_packet.nonce,
_packet.srcEid,
_packet.sender.toBytes32(),
_packet.dstEid,
_packet.receiver
);
}
function encodePayload(Packet memory _packet) internal pure returns (bytes memory) {
return abi.encodePacked(_packet.guid, _packet.message);
}
function header(bytes calldata _packet) internal pure returns (bytes calldata) {
return _packet[0:GUID_OFFSET];
}
function version(bytes calldata _packet) internal pure returns (uint8) {
return uint8(bytes1(_packet[PACKET_VERSION_OFFSET:NONCE_OFFSET]));
}
function nonce(bytes calldata _packet) internal pure returns (uint64) {
return uint64(bytes8(_packet[NONCE_OFFSET:SRC_EID_OFFSET]));
}
function srcEid(bytes calldata _packet) internal pure returns (uint32) {
return uint32(bytes4(_packet[SRC_EID_OFFSET:SENDER_OFFSET]));
}
function sender(bytes calldata _packet) internal pure returns (bytes32) {
return bytes32(_packet[SENDER_OFFSET:DST_EID_OFFSET]);
}
function senderAddressB20(bytes calldata _packet) internal pure returns (address) {
return sender(_packet).toAddress();
}
function dstEid(bytes calldata _packet) internal pure returns (uint32) {
return uint32(bytes4(_packet[DST_EID_OFFSET:RECEIVER_OFFSET]));
}
function receiver(bytes calldata _packet) internal pure returns (bytes32) {
return bytes32(_packet[RECEIVER_OFFSET:GUID_OFFSET]);
}
function receiverB20(bytes calldata _packet) internal pure returns (address) {
return receiver(_packet).toAddress();
}
function guid(bytes calldata _packet) internal pure returns (bytes32) {
return bytes32(_packet[GUID_OFFSET:MESSAGE_OFFSET]);
}
function message(bytes calldata _packet) internal pure returns (bytes calldata) {
return bytes(_packet[MESSAGE_OFFSET:]);
}
function payload(bytes calldata _packet) internal pure returns (bytes calldata) {
return bytes(_packet[GUID_OFFSET:]);
}
function payloadHash(bytes calldata _packet) internal pure returns (bytes32) {
return keccak256(payload(_packet));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* 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.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* 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 returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 default value returned by this function, unless
* it's 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 returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual 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 `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` 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 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
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 `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` amount of tokens from `from` to `to`.
*
* 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.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` 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.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
* ```
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @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.20;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
// inserted interface here to prevent compiler version conflict with older versions.abi
// assuming interface not changing anymore
interface IMultiFeeDistribution {
function addReward(address rewardsToken) external;
function mint(address user, uint256 amount, bool withPenalty) external;
}
// set deposit token during creation
// set minter during creation
// keep track max sales total
// users deposit and receive vesting, ACCUMULATIVE
// owner able to withdraw
// set exchange rate
// set min deposit
// duration can only be set during construction
contract LgeVesting is Ownable {
using SafeERC20 for IERC20;
bool public hasStarted=false;
uint256 public constant duration = 86400 * 30 * 6; // 6 mths
uint256 public immutable maxMintableTokens;
uint256 public minDeposit=0;
uint256 public totalDeposit=0;
uint256 public totalSold=0;
uint256 public mintedTokens=0;
uint8 public exchangeRate=0; // e.g. +5% bonus is 105 (ie 1.05)
IMultiFeeDistribution public minter;
mapping(address => Vest) public vests;
address public depositToken;
event Started();
event Stopped();
event Deposited(
address user,
uint256 depositAmount,
uint256 receivedAmount
);
event Sold(
uint256 amount,
uint256 totalAmount
);
event Claimed(
address user,
uint256 amount
);
event Withdrawn(
address user,
uint256 amount
);
event RateChanged(
uint256 rate
);
event MinChanged(
uint256 min
);
struct Vest {
uint256 startTime;
uint256 total;
uint256 claimed;
}
constructor(
address _depositToken,
uint256 _min,
uint8 _rate,
IMultiFeeDistribution _minter,
uint256 _maxMintable,
address _delegate
) Ownable(_delegate) {
require(_min > 0, 'minimum deposit must be more than 0');
require(_rate > 0, 'exchange rate must be more than 0');
require(_maxMintable > _min * _rate / 100, 'max mintable must be more than minimum deposit * rate');
require(address(_minter) != address(0), 'minter address must not be 0x0');
depositToken = _depositToken;
minter = _minter;
maxMintableTokens = _maxMintable;
exchangeRate = _rate;
minDeposit = _min;
}
// *********************
// **** ADMIN START ****
// *********************
function start() external onlyOwner {
require(!hasStarted, 'lge has already started');
hasStarted = true;
emit Started();
}
function stop() external onlyOwner {
require(hasStarted, 'lge has already stopped');
hasStarted = false;
emit Stopped();
}
function setMinDeposit(uint256 _min) external onlyOwner {
require(_min > 0, 'minimum deposit must be more than 0');
minDeposit = _min;
emit MinChanged(minDeposit);
}
function setExchangeRate(uint8 _rate) external onlyOwner {
require(_rate > 0, 'exchange rate must be more than 0');
exchangeRate = _rate;
emit RateChanged(exchangeRate);
}
// owner withdraw deposit
// TEST :: withdraw more than deposited
function withdraw(uint256 amount) external onlyOwner {
IERC20(depositToken).safeTransfer(msg.sender, amount);
emit Withdrawn(msg.sender, amount);
}
// *******************
// **** ADMIN END ****
// *******************
// ********************
// **** USER START ****
// ********************
// depositor deposit payment
// claims duration remains the same for total amount
// TEST :: selling more than allocated
function deposit(uint256 depositAmount) external {
require(hasStarted, 'lge has not started');
require(depositAmount >= minDeposit, 'deposit is less than minimum required');
// assume minted token is 18 decimals
uint256 tokenAmount = depositAmount * exchangeRate * 1e18 / 10**ERC20(depositToken).decimals() / 100;
require(tokenAmount > 0, 'amount sold is zero');
require(totalSold + tokenAmount <= maxMintableTokens, 'max tokens available for sale exceeded');
Vest storage v = vests[msg.sender];
if (v.startTime == 0) {
// create new entry
v.startTime = block.timestamp;
v.total = tokenAmount;
} else {
// accumulate if already bought before
v.total += tokenAmount;
}
totalDeposit += depositAmount;
totalSold += tokenAmount;
IERC20(depositToken).safeTransferFrom(msg.sender, address(this), depositAmount);
emit Deposited(msg.sender, depositAmount, tokenAmount);
emit Sold(tokenAmount, totalSold);
}
// TEST :: multiple periods of buys and claims
// show amount depositor can claim
function claimable(address _claimer) external view returns (uint256) {
Vest storage v = vests[_claimer];
if (v.startTime == 0) return 0;
uint256 elapsedTime = block.timestamp - v.startTime;
if (elapsedTime > duration) elapsedTime = duration;
uint256 amount = v.total * elapsedTime / duration;
return amount - v.claimed;
}
// depositor claim token
function claim(address _receiver) external {
Vest storage v = vests[msg.sender];
uint256 elapsedTime = block.timestamp - v.startTime;
if (elapsedTime > duration) elapsedTime = duration;
uint256 totalClaimable = v.total * elapsedTime / duration;
if (totalClaimable > v.claimed) {
uint256 amount = totalClaimable - v.claimed;
mintedTokens += amount;
require(mintedTokens <= maxMintableTokens, 'cannot claim more than max mintable');
minter.mint(_receiver, amount, false);
v.claimed = totalClaimable;
emit Claimed(_receiver, amount);
}
}
// ******************
// **** USER END ****
// ******************
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { OFTAdapter } from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFTAdapter.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract PolterOftAdapter is OFTAdapter {
constructor(
address _token, // a deployed, already existing ERC20 token address
address _layerZeroEndpoint, // local endpoint address
address _owner // token owner used as a delegate in LayerZero Endpoint
) OFTAdapter(_token, _layerZeroEndpoint, _owner) Ownable(_owner) {
//
// your custom contract logic here
//
}
}{
"optimizer": {
"enabled": true,
"runs": 2000
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_lzEndpoint","type":"address"},{"internalType":"address","name":"_delegate","type":"address"},{"internalType":"uint256","name":"_maxTotalSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidDelegate","type":"error"},{"inputs":[],"name":"InvalidEndpointCall","type":"error"},{"inputs":[],"name":"InvalidLocalDecimals","type":"error"},{"inputs":[{"internalType":"bytes","name":"options","type":"bytes"}],"name":"InvalidOptions","type":"error"},{"inputs":[],"name":"LzTokenUnavailable","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"NoPeer","type":"error"},{"inputs":[{"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"NotEnoughNative","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"OnlyEndpoint","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"OnlyPeer","type":"error"},{"inputs":[],"name":"OnlySelf","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"name":"SimulationResult","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"}],"name":"SlippageExceeded","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":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"indexed":false,"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"EnforcedOptionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"inspector","type":"address"}],"name":"MsgInspectorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"name":"OFTReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"dstEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"name":"OFTSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"peer","type":"bytes32"}],"name":"PeerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"preCrimeAddress","type":"address"}],"name":"PreCrimeSet","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":[],"name":"SEND","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_AND_CALL","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"}],"name":"allowInitializePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"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":[],"name":"approvalRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","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":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint16","name":"_msgType","type":"uint16"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"}],"name":"combineOptions","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalConversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpointV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"}],"name":"enforcedOptions","outputs":[{"internalType":"bytes","name":"enforcedOption","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"address","name":"_sender","type":"address"}],"name":"isComposeMsgSender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"isPeer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct InboundPacket[]","name":"_packets","type":"tuple[]"}],"name":"lzReceiveAndRevert","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceiveSimulate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"msgInspector","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":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nextNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oApp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oAppVersion","outputs":[{"internalType":"uint64","name":"senderVersion","type":"uint64"},{"internalType":"uint64","name":"receiverVersion","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"oftVersion","outputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"internalType":"uint64","name":"version","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"peers","outputs":[{"internalType":"bytes32","name":"peer","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preCrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"}],"name":"quoteOFT","outputs":[{"components":[{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"uint256","name":"maxAmountLD","type":"uint256"}],"internalType":"struct OFTLimit","name":"oftLimit","type":"tuple"},{"components":[{"internalType":"int256","name":"feeAmountLD","type":"int256"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct OFTFeeDetail[]","name":"oftFeeDetails","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"internalType":"struct OFTReceipt","name":"oftReceipt","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quoteSend","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"msgFee","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_fee","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"msgReceipt","type":"tuple"},{"components":[{"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"internalType":"struct OFTReceipt","name":"oftReceipt","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"setEnforcedOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_msgInspector","type":"address"}],"name":"setMsgInspector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_preCrime","type":"address"}],"name":"setPreCrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharedDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"value","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":"value","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"}]Contract Creation Code
60e06040523480156200001157600080fd5b5060405162003d8c38038062003d8c83398101604081905262000034916200030d565b84848484838360128484818181818e6001600160a01b0381166200007257604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200007d81620001d6565b506001600160a01b038083166080528116620000ac57604051632d618d8160e21b815260040160405180910390fd5b60805160405163ca5eb5e160e01b81526001600160a01b0383811660048301529091169063ca5eb5e190602401600060405180830381600087803b158015620000f457600080fd5b505af115801562000109573d6000803e3d6000fd5b5050505050505050620001216200022660201b60201c565b60ff168360ff16101562000148576040516301e9714b60e41b815260040160405180910390fd5b62000155600684620003bc565b6200016290600a620004db565b60a0525060089150620001789050838262000582565b50600962000187828262000582565b50505060c08590525050604051600080825233935091507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a350505050506200064e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600690565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200025357600080fd5b81516001600160401b03808211156200027057620002706200022b565b604051601f8301601f19908116603f011681019082821181831017156200029b576200029b6200022b565b81604052838152602092508683858801011115620002b857600080fd5b600091505b83821015620002dc5785820183015181830184015290820190620002bd565b600093810190920192909252949350505050565b80516001600160a01b03811681146200030857600080fd5b919050565b600080600080600060a086880312156200032657600080fd5b85516001600160401b03808211156200033e57600080fd5b6200034c89838a0162000241565b965060208801519150808211156200036357600080fd5b50620003728882890162000241565b9450506200038360408701620002f0565b92506200039360608701620002f0565b9150608086015190509295509295909350565b634e487b7160e01b600052601160045260246000fd5b60ff8281168282160390811115620003d857620003d8620003a6565b92915050565b600181815b808511156200041f578160001904821115620004035762000403620003a6565b808516156200041157918102915b93841c9390800290620003e3565b509250929050565b6000826200043857506001620003d8565b816200044757506000620003d8565b81600181146200046057600281146200046b576200048b565b6001915050620003d8565b60ff8411156200047f576200047f620003a6565b50506001821b620003d8565b5060208310610133831016604e8410600b8410161715620004b0575081810a620003d8565b620004bc8383620003de565b8060001904821115620004d357620004d3620003a6565b029392505050565b6000620004ec60ff84168362000427565b9392505050565b600181811c908216806200050857607f821691505b6020821081036200052957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200057d57600081815260208120601f850160051c81016020861015620005585750805b601f850160051c820191505b81811015620005795782815560010162000564565b5050505b505050565b81516001600160401b038111156200059e576200059e6200022b565b620005b681620005af8454620004f3565b846200052f565b602080601f831160018114620005ee5760008415620005d55750858301515b600019600386901b1c1916600185901b17855562000579565b600085815260208120601f198616915b828110156200061f57888601518255948401946001909101908401620005fe565b50858210156200063e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c0516136c1620006cb600039600081816104ea0152610cac01526000818161075901528181611f4701528181611fbc01526121da01526000818161061701528181610ae9015281816113010152818161165601528181611a3e01528181611d640152818161232501526123f501526136c16000f3fe6080604052600436106102fd5760003560e01c8063715018a61161018f578063bb0b6a53116100e1578063d42438851161008a578063fc0c546a11610064578063fc0c546a1461059b578063fca3b5aa14610929578063ff7bd03d1461094957600080fd5b8063d4243885146108a3578063dd62ed3e146108c3578063f2fde38b1461090957600080fd5b8063c7c7f5b3116100bb578063c7c7f5b31461084f578063ca5eb5e114610870578063d045a0dc1461089057600080fd5b8063bb0b6a53146107ef578063bc70b3541461081c578063bd815db01461083c57600080fd5b806395d89b4111610143578063a9059cbb1161011d578063a9059cbb1461078f578063b731ea0a146107af578063b98bd070146107cf57600080fd5b806395d89b4114610732578063963efcaa146107475780639f68b9641461077b57600080fd5b806382413eac1161017457806382413eac146106e0578063857749b0146107005780638da5cb5b1461071457600080fd5b8063715018a61461068f5780637d25a05e146106a457600080fd5b806323b872dd1161025357806352ae2879116101fc5780635e280f11116101d65780635e280f11146106055780636fc1b31e1461063957806370a082311461065957600080fd5b806352ae28791461059b5780635535d461146105ae5780635a0dfe4d146105ce57600080fd5b80633400288b1161022d5780633400288b1461052e5780633b6f743b1461054e57806340c10f191461057b57600080fd5b806323b872dd146104b85780632ab4d052146104d8578063313ce5671461050c57600080fd5b806313137d65116102b557806317442b701161028f57806317442b701461046257806318160ddd146104845780631f5e1334146104a357600080fd5b806313137d65146103e4578063134d4f25146103f9578063156a0d0f1461042157600080fd5b8063095ea7b3116102e6578063095ea7b3146103655780630d35b41514610395578063111ecdad146103c457600080fd5b806306fdde0314610302578063075461721461032d575b600080fd5b34801561030e57600080fd5b50610317610969565b60405161032491906126ca565b60405180910390f35b34801561033957600080fd5b50600a5461034d906001600160a01b031681565b6040516001600160a01b039091168152602001610324565b34801561037157600080fd5b506103856103803660046126f2565b6109fb565b6040519015158152602001610324565b3480156103a157600080fd5b506103b56103b0366004612736565b610a15565b6040516103249392919061276b565b3480156103d057600080fd5b5060045461034d906001600160a01b031681565b6103f76103f236600461287c565b610ae7565b005b34801561040557600080fd5b5061040e600281565b60405161ffff9091168152602001610324565b34801561042d57600080fd5b50604080517f02e49c2c0000000000000000000000000000000000000000000000000000000081526001602082015201610324565b34801561046e57600080fd5b5060408051600181526002602082015201610324565b34801561049057600080fd5b506007545b604051908152602001610324565b3480156104af57600080fd5b5061040e600181565b3480156104c457600080fd5b506103856104d336600461291c565b610bd9565b3480156104e457600080fd5b506104957f000000000000000000000000000000000000000000000000000000000000000081565b34801561051857600080fd5b5060125b60405160ff9091168152602001610324565b34801561053a57600080fd5b506103f7610549366004612976565b610bff565b34801561055a57600080fd5b5061056e6105693660046129a0565b610c15565b60405161032491906129f2565b34801561058757600080fd5b506103856105963660046126f2565b610c7c565b3480156105a757600080fd5b503061034d565b3480156105ba57600080fd5b506103176105c9366004612a1b565b610ce9565b3480156105da57600080fd5b506103856105e9366004612976565b63ffffffff919091166000908152600160205260409020541490565b34801561061157600080fd5b5061034d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561064557600080fd5b506103f7610654366004612a4e565b610d8e565b34801561066557600080fd5b50610495610674366004612a4e565b6001600160a01b031660009081526005602052604090205490565b34801561069b57600080fd5b506103f7610df8565b3480156106b057600080fd5b506106c76106bf366004612976565b600092915050565b60405167ffffffffffffffff9091168152602001610324565b3480156106ec57600080fd5b506103856106fb366004612a6b565b610e0c565b34801561070c57600080fd5b50600661051c565b34801561072057600080fd5b506000546001600160a01b031661034d565b34801561073e57600080fd5b50610317610e21565b34801561075357600080fd5b506104957f000000000000000000000000000000000000000000000000000000000000000081565b34801561078757600080fd5b506000610385565b34801561079b57600080fd5b506103856107aa3660046126f2565b610e30565b3480156107bb57600080fd5b5060025461034d906001600160a01b031681565b3480156107db57600080fd5b506103f76107ea366004612b17565b610e3e565b3480156107fb57600080fd5b5061049561080a366004612b59565b60016020526000908152604090205481565b34801561082857600080fd5b50610317610837366004612b74565b610e58565b6103f761084a366004612b17565b611019565b61086261085d366004612bd5565b6111c6565b604051610324929190612c43565b34801561087c57600080fd5b506103f761088b366004612a4e565b6112c1565b6103f761089e36600461287c565b611360565b3480156108af57600080fd5b506103f76108be366004612a4e565b6113a8565b3480156108cf57600080fd5b506104956108de366004612c96565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561091557600080fd5b506103f7610924366004612a4e565b61140b565b34801561093557600080fd5b50610385610944366004612a4e565b611462565b34801561095557600080fd5b50610385610964366004612cc4565b6114ae565b60606008805461097890612ce0565b80601f01602080910402602001604051908101604052809291908181526020018280546109a490612ce0565b80156109f15780601f106109c6576101008083540402835291602001916109f1565b820191906000526020600020905b8154815290600101906020018083116109d457829003601f168201915b5050505050905090565b600033610a098185856114e4565b60019150505b92915050565b60408051808201909152600080825260208201526060610a48604051806040016040528060008152602001600081525090565b604080518082018252600080825267ffffffffffffffff602080840182905284518381529081019094529195509182610aa4565b604080518082019091526000815260606020820152815260200190600190039081610a7c5790505b509350600080610ac9604089013560608a0135610ac460208c018c612b59565b6114f6565b60408051808201909152918252602082015296989597505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163314610b50576040517f91ac5e4f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b60208701803590610b6a90610b65908a612b59565b611553565b14610bc157610b7c6020880188612b59565b6040517fc26bebcc00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260208801356024820152604401610b47565b610bd0878787878787876115a8565b50505050505050565b600033610be7858285611728565b610bf28585856117bf565b60019150505b9392505050565b610c07611850565b610c118282611896565b5050565b60408051808201909152600080825260208201526000610c4560408501356060860135610ac46020880188612b59565b915050600080610c5586846118eb565b9092509050610c72610c6a6020880188612b59565b838388611a28565b9695505050505050565b600a546000906001600160a01b03163314610c9657600080fd5b81610ca060075490565b610caa9190612d40565b7f00000000000000000000000000000000000000000000000000000000000000001015610cd657600080fd5b610ce08383611b09565b50600192915050565b600360209081526000928352604080842090915290825290208054610d0d90612ce0565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3990612ce0565b8015610d865780601f10610d5b57610100808354040283529160200191610d86565b820191906000526020600020905b815481529060010190602001808311610d6957829003601f168201915b505050505081565b610d96611850565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197906020015b60405180910390a150565b610e00611850565b610e0a6000611b58565b565b6001600160a01b03811630145b949350505050565b60606009805461097890612ce0565b600033610a098185856117bf565b610e46611850565b610c11610e538284612df8565b611bb5565b63ffffffff8416600090815260036020908152604080832061ffff87168452909152812080546060929190610e8c90612ce0565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb890612ce0565b8015610f055780601f10610eda57610100808354040283529160200191610f05565b820191906000526020600020905b815481529060010190602001808311610ee857829003601f168201915b505050505090508051600003610f555783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929450610e199350505050565b6000839003610f65579050610e19565b60028310610fe357610fac84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cc692505050565b80610fba8460028188612f0e565b604051602001610fcc93929190612f38565b604051602081830303815290604052915050610e19565b83836040517f9a6d49cd000000000000000000000000000000000000000000000000000000008152600401610b47929190612f8b565b60005b8181101561112c573683838381811061103757611037612f9f565b90506020028101906110499190612fb5565b905061107c61105b6020830183612b59565b602083013563ffffffff919091166000908152600160205260409020541490565b611086575061111a565b3063d045a0dc60c08301358360a08101356110a5610100830183612ff3565b6110b6610100890160e08a01612a4e565b6110c46101208a018a612ff3565b6040518963ffffffff1660e01b81526004016110e6979695949392919061306e565b6000604051808303818588803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b5050505050505b80611124816130f5565b91505061101c565b50336001600160a01b0316638e9e70996040518163ffffffff1660e01b8152600401600060405180830381865afa15801561116b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611193919081019061310f565b6040517f8351eea7000000000000000000000000000000000000000000000000000000008152600401610b4791906126ca565b6111ce612632565b604080518082019091526000808252602082015260008061120533604089013560608a013561120060208c018c612b59565b611d0b565b9150915060008061121689846118eb565b909250905061124261122b60208b018b612b59565b838361123c368d90038d018d61317d565b8b611d31565b60408051808201909152858152602080820186905282519298509096503391907f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a90611290908d018d612b59565b6040805163ffffffff909216825260208201899052810187905260600160405180910390a350505050935093915050565b6112c9611850565b6040517fca5eb5e10000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190602401600060405180830381600087803b15801561134557600080fd5b505af1158015611359573d6000803e3d6000fd5b5050505050565b333014611399576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bd087878787878787610bc1565b6113b0611850565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776090602001610ded565b611413611850565b6001600160a01b038116611456576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b61145f81611b58565b50565b600a546000906001600160a01b03161561147b57600080fd5b50600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600190565b60006020820180359060019083906114c69086612b59565b63ffffffff1681526020810191909152604001600020541492915050565b6114f18383836001611e3c565b505050565b60008061150285611f43565b91508190508381101561154b576040517f71c4efed0000000000000000000000000000000000000000000000000000000081526004810182905260248101859052604401610b47565b935093915050565b63ffffffff811660009081526001602052604081205480610a0f576040517ff6ff4fb700000000000000000000000000000000000000000000000000000000815263ffffffff84166004820152602401610b47565b60006115ba6115b78787611f7a565b90565b905060006115e6826115d46115cf8a8a611f92565b611fb5565b6115e160208d018d612b59565b611feb565b905060288611156116c657600061162361160660608c0160408d016131af565b61161360208d018d612b59565b8461161e8c8c612013565b61205e565b6040517f7cb590120000000000000000000000000000000000000000000000000000000081529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637cb59012906116929086908d9060009087906004016131cc565b600060405180830381600087803b1580156116ac57600080fd5b505af11580156116c0573d6000803e3d6000fd5b50505050505b6001600160a01b038216887fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c6116ff60208d018d612b59565b6040805163ffffffff9092168252602082018690520160405180910390a3505050505050505050565b6001600160a01b0383811660009081526006602090815260408083209386168352929052205460001981146117b957818110156117aa576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610b47565b6117b984848484036000611e3c565b50505050565b6001600160a01b038316611802576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6001600160a01b038216611845576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6114f1838383612090565b6000546001600160a01b03163314610e0a576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610b47565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b60608060006119488560200135611901866121d3565b61190e60a0890189612ff3565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121ff92505050565b909350905060008161195b57600161195e565b60025b905061197e6119706020880188612b59565b8261083760808a018a612ff3565b6004549093506001600160a01b031615611a1f57600480546040517f043a78eb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169163043a78eb916119dc9188918891016131fe565b602060405180830381865afa1580156119f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1d9190613223565b505b50509250929050565b60408051808201909152600080825260208201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ddc28c586040518060a001604052808863ffffffff168152602001611a8b89611553565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b8152600401611ac0929190613240565b6040805180830381865afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0091906132e9565b95945050505050565b6001600160a01b038216611b4c576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b610c1160008383612090565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b8151811015611c9657611be7828281518110611bd657611bd6612f9f565b602002602001015160400151611cc6565b818181518110611bf957611bf9612f9f565b60200260200101516040015160036000848481518110611c1b57611c1b612f9f565b60200260200101516000015163ffffffff1663ffffffff1681526020019081526020016000206000848481518110611c5557611c55612f9f565b60200260200101516020015161ffff1661ffff1681526020019081526020016000209081611c839190613353565b5080611c8e816130f5565b915050611bb8565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b67481604051610ded9190613413565b600281015161ffff8116600314610c1157816040517f9a6d49cd000000000000000000000000000000000000000000000000000000008152600401610b4791906126ca565b600080611d198585856114f6565b9092509050611d288683612291565b94509492505050565b611d39612632565b6000611d4884600001516122e0565b602085015190915015611d6257611d628460200151612321565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632637a450826040518060a001604052808b63ffffffff168152602001611db28c611553565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401611dee929190613240565b60806040518083038185885af1158015611e0c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611e31919061349c565b979650505050505050565b6001600160a01b038416611e7f576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6001600160a01b038316611ec2576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6001600160a01b03808516600090815260066020908152604080832093871683529290522082905580156117b957826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611f3591815260200190565b60405180910390a350505050565b60007f0000000000000000000000000000000000000000000000000000000000000000611f7081846134e6565b610a0f9190613508565b6000611f896020828486612f0e565b610bf89161351f565b6000611fa2602860208486612f0e565b611fab9161353d565b60c01c9392505050565b6000610a0f7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff8416613508565b60006001600160a01b0384166120015761dead93505b61200b8484611b09565b509092915050565b60606120228260288186612f0e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929695505050505050565b6060848484846040516020016120779493929190613585565b6040516020818303038152906040529050949350505050565b6001600160a01b0383166120bb5780600760008282546120b09190612d40565b909155506121469050565b6001600160a01b03831660009081526005602052604090205481811015612127576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610b47565b6001600160a01b03841660009081526005602052604090209082900390555b6001600160a01b03821661216257600780548290039055612181565b6001600160a01b03821660009081526005602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516121c691815260200190565b60405180910390a3505050565b6000610a0f7f0000000000000000000000000000000000000000000000000000000000000000836134e6565b805160609015158061226057848460405160200161224c92919091825260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016602082015260280190565b604051602081830303815290604052612287565b848433856040516020016122779493929190613603565b6040516020818303038152906040525b9150935093915050565b6001600160a01b0382166122d4576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b610c1182600083612090565b600081341461231d576040517f9f704120000000000000000000000000000000000000000000000000000000008152346004820152602401610b47565b5090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015612381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a5919061365c565b90506001600160a01b0381166123e7576040517f5373352a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805133602482018190527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03818116604485015260648085018890528551808603909101815260849094019094526020830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610c119385169286906117b990859060006124a18383612508565b905080516000141580156124c65750808060200190518101906124c49190613223565b155b156114f1576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610b47565b6060610bf88383600084600080856001600160a01b0316848660405161252e9190613679565b60006040518083038185875af1925050503d806000811461256b576040519150601f19603f3d011682016040523d82523d6000602084013e612570565b606091505b5091509150610c728683836060826125905761258b826125f0565b610bf8565b81511580156125a757506001600160a01b0384163b155b156125e9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610b47565b5080610bf8565b8051156126005780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001612675604051806040016040528060008152602001600081525090565b905290565b60005b8381101561269557818101518382015260200161267d565b50506000910152565b600081518084526126b681602086016020860161267a565b601f01601f19169290920160200192915050565b602081526000610bf8602083018461269e565b6001600160a01b038116811461145f57600080fd5b6000806040838503121561270557600080fd5b8235612710816126dd565b946020939093013593505050565b600060e0828403121561273057600080fd5b50919050565b60006020828403121561274857600080fd5b813567ffffffffffffffff81111561275f57600080fd5b610e198482850161271e565b8351815260208085015190820152600060a08201604060a08185015281865180845260c08601915060c08160051b8701019350602080890160005b83811015612803578887037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff400185528151805188528301518388018790526127f08789018261269e565b97505093820193908201906001016127a6565b50508751606088015250505060208501516080850152509050610e19565b60006060828403121561273057600080fd5b60008083601f84011261284557600080fd5b50813567ffffffffffffffff81111561285d57600080fd5b60208301915083602082850101111561287557600080fd5b9250929050565b600080600080600080600060e0888a03121561289757600080fd5b6128a18989612821565b965060608801359550608088013567ffffffffffffffff808211156128c557600080fd5b6128d18b838c01612833565b909750955060a08a013591506128e6826126dd565b90935060c089013590808211156128fc57600080fd5b506129098a828b01612833565b989b979a50959850939692959293505050565b60008060006060848603121561293157600080fd5b833561293c816126dd565b9250602084013561294c816126dd565b929592945050506040919091013590565b803563ffffffff8116811461297157600080fd5b919050565b6000806040838503121561298957600080fd5b6127108361295d565b801515811461145f57600080fd5b600080604083850312156129b357600080fd5b823567ffffffffffffffff8111156129ca57600080fd5b6129d68582860161271e565b92505060208301356129e781612992565b809150509250929050565b815181526020808301519082015260408101610a0f565b803561ffff8116811461297157600080fd5b60008060408385031215612a2e57600080fd5b612a378361295d565b9150612a4560208401612a09565b90509250929050565b600060208284031215612a6057600080fd5b8135610bf8816126dd565b60008060008060a08587031215612a8157600080fd5b612a8b8686612821565b9350606085013567ffffffffffffffff811115612aa757600080fd5b612ab387828801612833565b9094509250506080850135612ac7816126dd565b939692955090935050565b60008083601f840112612ae457600080fd5b50813567ffffffffffffffff811115612afc57600080fd5b6020830191508360208260051b850101111561287557600080fd5b60008060208385031215612b2a57600080fd5b823567ffffffffffffffff811115612b4157600080fd5b612b4d85828601612ad2565b90969095509350505050565b600060208284031215612b6b57600080fd5b610bf88261295d565b60008060008060608587031215612b8a57600080fd5b612b938561295d565b9350612ba160208601612a09565b9250604085013567ffffffffffffffff811115612bbd57600080fd5b612bc987828801612833565b95989497509550505050565b60008060008385036080811215612beb57600080fd5b843567ffffffffffffffff811115612c0257600080fd5b612c0e8782880161271e565b9450506040601f1982011215612c2357600080fd5b506020840191506060840135612c38816126dd565b809150509250925092565b600060c0820190508351825267ffffffffffffffff60208501511660208301526040840151612c7f604084018280518252602090810151910152565b5082516080830152602083015160a0830152610bf8565b60008060408385031215612ca957600080fd5b8235612cb4816126dd565b915060208301356129e7816126dd565b600060608284031215612cd657600080fd5b610bf88383612821565b600181811c90821680612cf457607f821691505b60208210810361273057634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610a0f57610a0f612d2a565b6040516060810167ffffffffffffffff81118282101715612d7657612d76612d14565b60405290565b6040805190810167ffffffffffffffff81118282101715612d7657612d76612d14565b604051601f8201601f1916810167ffffffffffffffff81118282101715612dc857612dc8612d14565b604052919050565b600067ffffffffffffffff821115612dea57612dea612d14565b50601f01601f191660200190565b600067ffffffffffffffff80841115612e1357612e13612d14565b8360051b6020612e24818301612d9f565b868152918501918181019036841115612e3c57600080fd5b865b84811015612f0257803586811115612e565760008081fd5b88016060368290031215612e6a5760008081fd5b612e72612d53565b612e7b8261295d565b8152612e88868301612a09565b8682015260408083013589811115612ea05760008081fd5b929092019136601f840112612eb55760008081fd5b8235612ec8612ec382612dd0565b612d9f565b8181523689838701011115612edd5760008081fd5b818986018a830137600091810189019190915290820152845250918301918301612e3e565b50979650505050505050565b60008085851115612f1e57600080fd5b83861115612f2b57600080fd5b5050820193919092039150565b60008451612f4a81846020890161267a565b8201838582376000930192835250909392505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b602081526000610e19602083018486612f60565b634e487b7160e01b600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1833603018112612fe957600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261302857600080fd5b83018035915067ffffffffffffffff82111561304357600080fd5b60200191503681900382131561287557600080fd5b67ffffffffffffffff8116811461145f57600080fd5b63ffffffff61307c8961295d565b168152602088013560208201526000604089013561309981613058565b67ffffffffffffffff811660408401525087606083015260e060808301526130c560e083018789612f60565b6001600160a01b03861660a084015282810360c08401526130e7818587612f60565b9a9950505050505050505050565b6000600019820361310857613108612d2a565b5060010190565b60006020828403121561312157600080fd5b815167ffffffffffffffff81111561313857600080fd5b8201601f8101841361314957600080fd5b8051613157612ec382612dd0565b81815285602083850101111561316c57600080fd5b611b0082602083016020860161267a565b60006040828403121561318f57600080fd5b613197612d7c565b82358152602083013560208201528091505092915050565b6000602082840312156131c157600080fd5b8135610bf881613058565b6001600160a01b038516815283602082015261ffff83166040820152608060608201526000610c72608083018461269e565b604081526000613211604083018561269e565b8281036020840152611b00818561269e565b60006020828403121561323557600080fd5b8151610bf881612992565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a0608084015261327660e084018261269e565b90506060850151603f198483030160a0850152613293828261269e565b60809690960151151560c08501525050506001600160a01b039190911660209091015290565b6000604082840312156132cb57600080fd5b6132d3612d7c565b9050815181526020820151602082015292915050565b6000604082840312156132fb57600080fd5b610bf883836132b9565b601f8211156114f157600081815260208120601f850160051c8101602086101561332c5750805b601f850160051c820191505b8181101561334b57828155600101613338565b505050505050565b815167ffffffffffffffff81111561336d5761336d612d14565b6133818161337b8454612ce0565b84613305565b602080601f8311600181146133b6576000841561339e5750858301515b600019600386901b1c1916600185901b17855561334b565b600085815260208120601f198616915b828110156133e5578886015182559484019460019091019084016133c6565b50858210156134035787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561348e57888303603f190185528151805163ffffffff1684528781015161ffff1688850152860151606087850181905261347a8186018361269e565b96890196945050509086019060010161343a565b509098975050505050505050565b6000608082840312156134ae57600080fd5b6134b6612d53565b8251815260208301516134c881613058565b60208201526134da84604085016132b9565b60408201529392505050565b60008261350357634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610a0f57610a0f612d2a565b80356020831015610a0f57600019602084900360031b1b1692915050565b7fffffffffffffffff000000000000000000000000000000000000000000000000813581811691600885101561357d5780818660080360031b1b83161692505b505092915050565b7fffffffffffffffff0000000000000000000000000000000000000000000000008560c01b1681527fffffffff000000000000000000000000000000000000000000000000000000008460e01b16600882015282600c820152600082516135f381602c85016020870161267a565b91909101602c0195945050505050565b8481527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b1660208201528260288201526000825161364c81604885016020870161267a565b9190910160480195945050505050565b60006020828403121561366e57600080fd5b8151610bf8816126dd565b60008251612fe981846020870161267a56fea264697066735822122074d4ee5f7fc27a5854a26252fd66479e35607b9d93e0f1b9925ae88de62ed55264736f6c6343000814003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000001a44076050125825900e736c501f859c50fe728c0000000000000000000000000159f847e62ee65b7e11ba3210ec767eedbced2500000000000000000000000000000000000000000053bb15fc2c1a368059e29c000000000000000000000000000000000000000000000000000000000000001d506f6c7465722e46696e616e63652050726f746f636f6c20546f6b656e0000000000000000000000000000000000000000000000000000000000000000000006504f4c5445520000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102fd5760003560e01c8063715018a61161018f578063bb0b6a53116100e1578063d42438851161008a578063fc0c546a11610064578063fc0c546a1461059b578063fca3b5aa14610929578063ff7bd03d1461094957600080fd5b8063d4243885146108a3578063dd62ed3e146108c3578063f2fde38b1461090957600080fd5b8063c7c7f5b3116100bb578063c7c7f5b31461084f578063ca5eb5e114610870578063d045a0dc1461089057600080fd5b8063bb0b6a53146107ef578063bc70b3541461081c578063bd815db01461083c57600080fd5b806395d89b4111610143578063a9059cbb1161011d578063a9059cbb1461078f578063b731ea0a146107af578063b98bd070146107cf57600080fd5b806395d89b4114610732578063963efcaa146107475780639f68b9641461077b57600080fd5b806382413eac1161017457806382413eac146106e0578063857749b0146107005780638da5cb5b1461071457600080fd5b8063715018a61461068f5780637d25a05e146106a457600080fd5b806323b872dd1161025357806352ae2879116101fc5780635e280f11116101d65780635e280f11146106055780636fc1b31e1461063957806370a082311461065957600080fd5b806352ae28791461059b5780635535d461146105ae5780635a0dfe4d146105ce57600080fd5b80633400288b1161022d5780633400288b1461052e5780633b6f743b1461054e57806340c10f191461057b57600080fd5b806323b872dd146104b85780632ab4d052146104d8578063313ce5671461050c57600080fd5b806313137d65116102b557806317442b701161028f57806317442b701461046257806318160ddd146104845780631f5e1334146104a357600080fd5b806313137d65146103e4578063134d4f25146103f9578063156a0d0f1461042157600080fd5b8063095ea7b3116102e6578063095ea7b3146103655780630d35b41514610395578063111ecdad146103c457600080fd5b806306fdde0314610302578063075461721461032d575b600080fd5b34801561030e57600080fd5b50610317610969565b60405161032491906126ca565b60405180910390f35b34801561033957600080fd5b50600a5461034d906001600160a01b031681565b6040516001600160a01b039091168152602001610324565b34801561037157600080fd5b506103856103803660046126f2565b6109fb565b6040519015158152602001610324565b3480156103a157600080fd5b506103b56103b0366004612736565b610a15565b6040516103249392919061276b565b3480156103d057600080fd5b5060045461034d906001600160a01b031681565b6103f76103f236600461287c565b610ae7565b005b34801561040557600080fd5b5061040e600281565b60405161ffff9091168152602001610324565b34801561042d57600080fd5b50604080517f02e49c2c0000000000000000000000000000000000000000000000000000000081526001602082015201610324565b34801561046e57600080fd5b5060408051600181526002602082015201610324565b34801561049057600080fd5b506007545b604051908152602001610324565b3480156104af57600080fd5b5061040e600181565b3480156104c457600080fd5b506103856104d336600461291c565b610bd9565b3480156104e457600080fd5b506104957f00000000000000000000000000000000000000000053bb15fc2c1a368059e29c81565b34801561051857600080fd5b5060125b60405160ff9091168152602001610324565b34801561053a57600080fd5b506103f7610549366004612976565b610bff565b34801561055a57600080fd5b5061056e6105693660046129a0565b610c15565b60405161032491906129f2565b34801561058757600080fd5b506103856105963660046126f2565b610c7c565b3480156105a757600080fd5b503061034d565b3480156105ba57600080fd5b506103176105c9366004612a1b565b610ce9565b3480156105da57600080fd5b506103856105e9366004612976565b63ffffffff919091166000908152600160205260409020541490565b34801561061157600080fd5b5061034d7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c81565b34801561064557600080fd5b506103f7610654366004612a4e565b610d8e565b34801561066557600080fd5b50610495610674366004612a4e565b6001600160a01b031660009081526005602052604090205490565b34801561069b57600080fd5b506103f7610df8565b3480156106b057600080fd5b506106c76106bf366004612976565b600092915050565b60405167ffffffffffffffff9091168152602001610324565b3480156106ec57600080fd5b506103856106fb366004612a6b565b610e0c565b34801561070c57600080fd5b50600661051c565b34801561072057600080fd5b506000546001600160a01b031661034d565b34801561073e57600080fd5b50610317610e21565b34801561075357600080fd5b506104957f000000000000000000000000000000000000000000000000000000e8d4a5100081565b34801561078757600080fd5b506000610385565b34801561079b57600080fd5b506103856107aa3660046126f2565b610e30565b3480156107bb57600080fd5b5060025461034d906001600160a01b031681565b3480156107db57600080fd5b506103f76107ea366004612b17565b610e3e565b3480156107fb57600080fd5b5061049561080a366004612b59565b60016020526000908152604090205481565b34801561082857600080fd5b50610317610837366004612b74565b610e58565b6103f761084a366004612b17565b611019565b61086261085d366004612bd5565b6111c6565b604051610324929190612c43565b34801561087c57600080fd5b506103f761088b366004612a4e565b6112c1565b6103f761089e36600461287c565b611360565b3480156108af57600080fd5b506103f76108be366004612a4e565b6113a8565b3480156108cf57600080fd5b506104956108de366004612c96565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561091557600080fd5b506103f7610924366004612a4e565b61140b565b34801561093557600080fd5b50610385610944366004612a4e565b611462565b34801561095557600080fd5b50610385610964366004612cc4565b6114ae565b60606008805461097890612ce0565b80601f01602080910402602001604051908101604052809291908181526020018280546109a490612ce0565b80156109f15780601f106109c6576101008083540402835291602001916109f1565b820191906000526020600020905b8154815290600101906020018083116109d457829003601f168201915b5050505050905090565b600033610a098185856114e4565b60019150505b92915050565b60408051808201909152600080825260208201526060610a48604051806040016040528060008152602001600081525090565b604080518082018252600080825267ffffffffffffffff602080840182905284518381529081019094529195509182610aa4565b604080518082019091526000815260606020820152815260200190600190039081610a7c5790505b509350600080610ac9604089013560608a0135610ac460208c018c612b59565b6114f6565b60408051808201909152918252602082015296989597505050505050565b7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b03163314610b50576040517f91ac5e4f0000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b60208701803590610b6a90610b65908a612b59565b611553565b14610bc157610b7c6020880188612b59565b6040517fc26bebcc00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015260208801356024820152604401610b47565b610bd0878787878787876115a8565b50505050505050565b600033610be7858285611728565b610bf28585856117bf565b60019150505b9392505050565b610c07611850565b610c118282611896565b5050565b60408051808201909152600080825260208201526000610c4560408501356060860135610ac46020880188612b59565b915050600080610c5586846118eb565b9092509050610c72610c6a6020880188612b59565b838388611a28565b9695505050505050565b600a546000906001600160a01b03163314610c9657600080fd5b81610ca060075490565b610caa9190612d40565b7f00000000000000000000000000000000000000000053bb15fc2c1a368059e29c1015610cd657600080fd5b610ce08383611b09565b50600192915050565b600360209081526000928352604080842090915290825290208054610d0d90612ce0565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3990612ce0565b8015610d865780601f10610d5b57610100808354040283529160200191610d86565b820191906000526020600020905b815481529060010190602001808311610d6957829003601f168201915b505050505081565b610d96611850565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197906020015b60405180910390a150565b610e00611850565b610e0a6000611b58565b565b6001600160a01b03811630145b949350505050565b60606009805461097890612ce0565b600033610a098185856117bf565b610e46611850565b610c11610e538284612df8565b611bb5565b63ffffffff8416600090815260036020908152604080832061ffff87168452909152812080546060929190610e8c90612ce0565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb890612ce0565b8015610f055780601f10610eda57610100808354040283529160200191610f05565b820191906000526020600020905b815481529060010190602001808311610ee857829003601f168201915b505050505090508051600003610f555783838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929450610e199350505050565b6000839003610f65579050610e19565b60028310610fe357610fac84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cc692505050565b80610fba8460028188612f0e565b604051602001610fcc93929190612f38565b604051602081830303815290604052915050610e19565b83836040517f9a6d49cd000000000000000000000000000000000000000000000000000000008152600401610b47929190612f8b565b60005b8181101561112c573683838381811061103757611037612f9f565b90506020028101906110499190612fb5565b905061107c61105b6020830183612b59565b602083013563ffffffff919091166000908152600160205260409020541490565b611086575061111a565b3063d045a0dc60c08301358360a08101356110a5610100830183612ff3565b6110b6610100890160e08a01612a4e565b6110c46101208a018a612ff3565b6040518963ffffffff1660e01b81526004016110e6979695949392919061306e565b6000604051808303818588803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b5050505050505b80611124816130f5565b91505061101c565b50336001600160a01b0316638e9e70996040518163ffffffff1660e01b8152600401600060405180830381865afa15801561116b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611193919081019061310f565b6040517f8351eea7000000000000000000000000000000000000000000000000000000008152600401610b4791906126ca565b6111ce612632565b604080518082019091526000808252602082015260008061120533604089013560608a013561120060208c018c612b59565b611d0b565b9150915060008061121689846118eb565b909250905061124261122b60208b018b612b59565b838361123c368d90038d018d61317d565b8b611d31565b60408051808201909152858152602080820186905282519298509096503391907f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a90611290908d018d612b59565b6040805163ffffffff909216825260208201899052810187905260600160405180910390a350505050935093915050565b6112c9611850565b6040517fca5eb5e10000000000000000000000000000000000000000000000000000000081526001600160a01b0382811660048301527f0000000000000000000000001a44076050125825900e736c501f859c50fe728c169063ca5eb5e190602401600060405180830381600087803b15801561134557600080fd5b505af1158015611359573d6000803e3d6000fd5b5050505050565b333014611399576040517f14d4a4e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bd087878787878787610bc1565b6113b0611850565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c242776090602001610ded565b611413611850565b6001600160a01b038116611456576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b61145f81611b58565b50565b600a546000906001600160a01b03161561147b57600080fd5b50600a805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055600190565b60006020820180359060019083906114c69086612b59565b63ffffffff1681526020810191909152604001600020541492915050565b6114f18383836001611e3c565b505050565b60008061150285611f43565b91508190508381101561154b576040517f71c4efed0000000000000000000000000000000000000000000000000000000081526004810182905260248101859052604401610b47565b935093915050565b63ffffffff811660009081526001602052604081205480610a0f576040517ff6ff4fb700000000000000000000000000000000000000000000000000000000815263ffffffff84166004820152602401610b47565b60006115ba6115b78787611f7a565b90565b905060006115e6826115d46115cf8a8a611f92565b611fb5565b6115e160208d018d612b59565b611feb565b905060288611156116c657600061162361160660608c0160408d016131af565b61161360208d018d612b59565b8461161e8c8c612013565b61205e565b6040517f7cb590120000000000000000000000000000000000000000000000000000000081529091506001600160a01b037f0000000000000000000000001a44076050125825900e736c501f859c50fe728c1690637cb59012906116929086908d9060009087906004016131cc565b600060405180830381600087803b1580156116ac57600080fd5b505af11580156116c0573d6000803e3d6000fd5b50505050505b6001600160a01b038216887fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c6116ff60208d018d612b59565b6040805163ffffffff9092168252602082018690520160405180910390a3505050505050505050565b6001600160a01b0383811660009081526006602090815260408083209386168352929052205460001981146117b957818110156117aa576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610b47565b6117b984848484036000611e3c565b50505050565b6001600160a01b038316611802576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6001600160a01b038216611845576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6114f1838383612090565b6000546001600160a01b03163314610e0a576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610b47565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b60608060006119488560200135611901866121d3565b61190e60a0890189612ff3565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121ff92505050565b909350905060008161195b57600161195e565b60025b905061197e6119706020880188612b59565b8261083760808a018a612ff3565b6004549093506001600160a01b031615611a1f57600480546040517f043a78eb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169163043a78eb916119dc9188918891016131fe565b602060405180830381865afa1580156119f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1d9190613223565b505b50509250929050565b60408051808201909152600080825260208201527f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031663ddc28c586040518060a001604052808863ffffffff168152602001611a8b89611553565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b8152600401611ac0929190613240565b6040805180830381865afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0091906132e9565b95945050505050565b6001600160a01b038216611b4c576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b610c1160008383612090565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b8151811015611c9657611be7828281518110611bd657611bd6612f9f565b602002602001015160400151611cc6565b818181518110611bf957611bf9612f9f565b60200260200101516040015160036000848481518110611c1b57611c1b612f9f565b60200260200101516000015163ffffffff1663ffffffff1681526020019081526020016000206000848481518110611c5557611c55612f9f565b60200260200101516020015161ffff1661ffff1681526020019081526020016000209081611c839190613353565b5080611c8e816130f5565b915050611bb8565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b67481604051610ded9190613413565b600281015161ffff8116600314610c1157816040517f9a6d49cd000000000000000000000000000000000000000000000000000000008152600401610b4791906126ca565b600080611d198585856114f6565b9092509050611d288683612291565b94509492505050565b611d39612632565b6000611d4884600001516122e0565b602085015190915015611d6257611d628460200151612321565b7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b0316632637a450826040518060a001604052808b63ffffffff168152602001611db28c611553565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401611dee929190613240565b60806040518083038185885af1158015611e0c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611e31919061349c565b979650505050505050565b6001600160a01b038416611e7f576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6001600160a01b038316611ec2576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b6001600160a01b03808516600090815260066020908152604080832093871683529290522082905580156117b957826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611f3591815260200190565b60405180910390a350505050565b60007f000000000000000000000000000000000000000000000000000000e8d4a51000611f7081846134e6565b610a0f9190613508565b6000611f896020828486612f0e565b610bf89161351f565b6000611fa2602860208486612f0e565b611fab9161353d565b60c01c9392505050565b6000610a0f7f000000000000000000000000000000000000000000000000000000e8d4a5100067ffffffffffffffff8416613508565b60006001600160a01b0384166120015761dead93505b61200b8484611b09565b509092915050565b60606120228260288186612f0e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929695505050505050565b6060848484846040516020016120779493929190613585565b6040516020818303038152906040529050949350505050565b6001600160a01b0383166120bb5780600760008282546120b09190612d40565b909155506121469050565b6001600160a01b03831660009081526005602052604090205481811015612127576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610b47565b6001600160a01b03841660009081526005602052604090209082900390555b6001600160a01b03821661216257600780548290039055612181565b6001600160a01b03821660009081526005602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516121c691815260200190565b60405180910390a3505050565b6000610a0f7f000000000000000000000000000000000000000000000000000000e8d4a51000836134e6565b805160609015158061226057848460405160200161224c92919091825260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016602082015260280190565b604051602081830303815290604052612287565b848433856040516020016122779493929190613603565b6040516020818303038152906040525b9150935093915050565b6001600160a01b0382166122d4576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610b47565b610c1182600083612090565b600081341461231d576040517f9f704120000000000000000000000000000000000000000000000000000000008152346004820152602401610b47565b5090565b60007f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa158015612381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a5919061365c565b90506001600160a01b0381166123e7576040517f5373352a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805133602482018190527f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b03818116604485015260648085018890528551808603909101815260849094019094526020830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610c119385169286906117b990859060006124a18383612508565b905080516000141580156124c65750808060200190518101906124c49190613223565b155b156114f1576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610b47565b6060610bf88383600084600080856001600160a01b0316848660405161252e9190613679565b60006040518083038185875af1925050503d806000811461256b576040519150601f19603f3d011682016040523d82523d6000602084013e612570565b606091505b5091509150610c728683836060826125905761258b826125f0565b610bf8565b81511580156125a757506001600160a01b0384163b155b156125e9576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610b47565b5080610bf8565b8051156126005780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806060016040528060008019168152602001600067ffffffffffffffff168152602001612675604051806040016040528060008152602001600081525090565b905290565b60005b8381101561269557818101518382015260200161267d565b50506000910152565b600081518084526126b681602086016020860161267a565b601f01601f19169290920160200192915050565b602081526000610bf8602083018461269e565b6001600160a01b038116811461145f57600080fd5b6000806040838503121561270557600080fd5b8235612710816126dd565b946020939093013593505050565b600060e0828403121561273057600080fd5b50919050565b60006020828403121561274857600080fd5b813567ffffffffffffffff81111561275f57600080fd5b610e198482850161271e565b8351815260208085015190820152600060a08201604060a08185015281865180845260c08601915060c08160051b8701019350602080890160005b83811015612803578887037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff400185528151805188528301518388018790526127f08789018261269e565b97505093820193908201906001016127a6565b50508751606088015250505060208501516080850152509050610e19565b60006060828403121561273057600080fd5b60008083601f84011261284557600080fd5b50813567ffffffffffffffff81111561285d57600080fd5b60208301915083602082850101111561287557600080fd5b9250929050565b600080600080600080600060e0888a03121561289757600080fd5b6128a18989612821565b965060608801359550608088013567ffffffffffffffff808211156128c557600080fd5b6128d18b838c01612833565b909750955060a08a013591506128e6826126dd565b90935060c089013590808211156128fc57600080fd5b506129098a828b01612833565b989b979a50959850939692959293505050565b60008060006060848603121561293157600080fd5b833561293c816126dd565b9250602084013561294c816126dd565b929592945050506040919091013590565b803563ffffffff8116811461297157600080fd5b919050565b6000806040838503121561298957600080fd5b6127108361295d565b801515811461145f57600080fd5b600080604083850312156129b357600080fd5b823567ffffffffffffffff8111156129ca57600080fd5b6129d68582860161271e565b92505060208301356129e781612992565b809150509250929050565b815181526020808301519082015260408101610a0f565b803561ffff8116811461297157600080fd5b60008060408385031215612a2e57600080fd5b612a378361295d565b9150612a4560208401612a09565b90509250929050565b600060208284031215612a6057600080fd5b8135610bf8816126dd565b60008060008060a08587031215612a8157600080fd5b612a8b8686612821565b9350606085013567ffffffffffffffff811115612aa757600080fd5b612ab387828801612833565b9094509250506080850135612ac7816126dd565b939692955090935050565b60008083601f840112612ae457600080fd5b50813567ffffffffffffffff811115612afc57600080fd5b6020830191508360208260051b850101111561287557600080fd5b60008060208385031215612b2a57600080fd5b823567ffffffffffffffff811115612b4157600080fd5b612b4d85828601612ad2565b90969095509350505050565b600060208284031215612b6b57600080fd5b610bf88261295d565b60008060008060608587031215612b8a57600080fd5b612b938561295d565b9350612ba160208601612a09565b9250604085013567ffffffffffffffff811115612bbd57600080fd5b612bc987828801612833565b95989497509550505050565b60008060008385036080811215612beb57600080fd5b843567ffffffffffffffff811115612c0257600080fd5b612c0e8782880161271e565b9450506040601f1982011215612c2357600080fd5b506020840191506060840135612c38816126dd565b809150509250925092565b600060c0820190508351825267ffffffffffffffff60208501511660208301526040840151612c7f604084018280518252602090810151910152565b5082516080830152602083015160a0830152610bf8565b60008060408385031215612ca957600080fd5b8235612cb4816126dd565b915060208301356129e7816126dd565b600060608284031215612cd657600080fd5b610bf88383612821565b600181811c90821680612cf457607f821691505b60208210810361273057634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610a0f57610a0f612d2a565b6040516060810167ffffffffffffffff81118282101715612d7657612d76612d14565b60405290565b6040805190810167ffffffffffffffff81118282101715612d7657612d76612d14565b604051601f8201601f1916810167ffffffffffffffff81118282101715612dc857612dc8612d14565b604052919050565b600067ffffffffffffffff821115612dea57612dea612d14565b50601f01601f191660200190565b600067ffffffffffffffff80841115612e1357612e13612d14565b8360051b6020612e24818301612d9f565b868152918501918181019036841115612e3c57600080fd5b865b84811015612f0257803586811115612e565760008081fd5b88016060368290031215612e6a5760008081fd5b612e72612d53565b612e7b8261295d565b8152612e88868301612a09565b8682015260408083013589811115612ea05760008081fd5b929092019136601f840112612eb55760008081fd5b8235612ec8612ec382612dd0565b612d9f565b8181523689838701011115612edd5760008081fd5b818986018a830137600091810189019190915290820152845250918301918301612e3e565b50979650505050505050565b60008085851115612f1e57600080fd5b83861115612f2b57600080fd5b5050820193919092039150565b60008451612f4a81846020890161267a565b8201838582376000930192835250909392505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b602081526000610e19602083018486612f60565b634e487b7160e01b600052603260045260246000fd5b600082357ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec1833603018112612fe957600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261302857600080fd5b83018035915067ffffffffffffffff82111561304357600080fd5b60200191503681900382131561287557600080fd5b67ffffffffffffffff8116811461145f57600080fd5b63ffffffff61307c8961295d565b168152602088013560208201526000604089013561309981613058565b67ffffffffffffffff811660408401525087606083015260e060808301526130c560e083018789612f60565b6001600160a01b03861660a084015282810360c08401526130e7818587612f60565b9a9950505050505050505050565b6000600019820361310857613108612d2a565b5060010190565b60006020828403121561312157600080fd5b815167ffffffffffffffff81111561313857600080fd5b8201601f8101841361314957600080fd5b8051613157612ec382612dd0565b81815285602083850101111561316c57600080fd5b611b0082602083016020860161267a565b60006040828403121561318f57600080fd5b613197612d7c565b82358152602083013560208201528091505092915050565b6000602082840312156131c157600080fd5b8135610bf881613058565b6001600160a01b038516815283602082015261ffff83166040820152608060608201526000610c72608083018461269e565b604081526000613211604083018561269e565b8281036020840152611b00818561269e565b60006020828403121561323557600080fd5b8151610bf881612992565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a0608084015261327660e084018261269e565b90506060850151603f198483030160a0850152613293828261269e565b60809690960151151560c08501525050506001600160a01b039190911660209091015290565b6000604082840312156132cb57600080fd5b6132d3612d7c565b9050815181526020820151602082015292915050565b6000604082840312156132fb57600080fd5b610bf883836132b9565b601f8211156114f157600081815260208120601f850160051c8101602086101561332c5750805b601f850160051c820191505b8181101561334b57828155600101613338565b505050505050565b815167ffffffffffffffff81111561336d5761336d612d14565b6133818161337b8454612ce0565b84613305565b602080601f8311600181146133b6576000841561339e5750858301515b600019600386901b1c1916600185901b17855561334b565b600085815260208120601f198616915b828110156133e5578886015182559484019460019091019084016133c6565b50858210156134035787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561348e57888303603f190185528151805163ffffffff1684528781015161ffff1688850152860151606087850181905261347a8186018361269e565b96890196945050509086019060010161343a565b509098975050505050505050565b6000608082840312156134ae57600080fd5b6134b6612d53565b8251815260208301516134c881613058565b60208201526134da84604085016132b9565b60408201529392505050565b60008261350357634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610a0f57610a0f612d2a565b80356020831015610a0f57600019602084900360031b1b1692915050565b7fffffffffffffffff000000000000000000000000000000000000000000000000813581811691600885101561357d5780818660080360031b1b83161692505b505092915050565b7fffffffffffffffff0000000000000000000000000000000000000000000000008560c01b1681527fffffffff000000000000000000000000000000000000000000000000000000008460e01b16600882015282600c820152600082516135f381602c85016020870161267a565b91909101602c0195945050505050565b8481527fffffffffffffffff0000000000000000000000000000000000000000000000008460c01b1660208201528260288201526000825161364c81604885016020870161267a565b9190910160480195945050505050565b60006020828403121561366e57600080fd5b8151610bf8816126dd565b60008251612fe981846020870161267a56fea264697066735822122074d4ee5f7fc27a5854a26252fd66479e35607b9d93e0f1b9925ae88de62ed55264736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000001a44076050125825900e736c501f859c50fe728c0000000000000000000000000159f847e62ee65b7e11ba3210ec767eedbced2500000000000000000000000000000000000000000053bb15fc2c1a368059e29c000000000000000000000000000000000000000000000000000000000000001d506f6c7465722e46696e616e63652050726f746f636f6c20546f6b656e0000000000000000000000000000000000000000000000000000000000000000000006504f4c5445520000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Polter.Finance Protocol Token
Arg [1] : _symbol (string): POLTER
Arg [2] : _lzEndpoint (address): 0x1a44076050125825900e736c501f859c50fE728c
Arg [3] : _delegate (address): 0x0159f847E62ee65B7E11bA3210Ec767eeDbCeD25
Arg [4] : _maxTotalSupply (uint256): 101224331112863810973196956
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000001a44076050125825900e736c501f859c50fe728c
Arg [3] : 0000000000000000000000000159f847e62ee65b7e11ba3210ec767eedbced25
Arg [4] : 00000000000000000000000000000000000000000053bb15fc2c1a368059e29c
Arg [5] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [6] : 506f6c7465722e46696e616e63652050726f746f636f6c20546f6b656e000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 504f4c5445520000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
201:979:40:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89:31;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;278:21:40;;;;;;;;;;-1:-1:-1;278:21:40;;;;-1:-1:-1;;;;;278:21:40;;;;;;-1:-1:-1;;;;;993:55:42;;;975:74;;963:2;948:18;278:21:40;829:226:42;4293:186:31;;;;;;;;;;-1:-1:-1;4293:186:31;;;;;:::i;:::-;;:::i;:::-;;;1704:14:42;;1697:22;1679:41;;1667:2;1652:18;4293:186:31;1539:187:42;4928:1258:11;;;;;;;;;;-1:-1:-1;4928:1258:11;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;2132:27::-;;;;;;;;;;-1:-1:-1;2132:27:11;;;;-1:-1:-1;;;;;2132:27:11;;;4368:708:2;;;;;;:::i;:::-;;:::i;:::-;;2006:40:11;;;;;;;;;;;;2045:1;2006:40;;;;;5548:6:42;5536:19;;;5518:38;;5506:2;5491:18;2006:40:11;5374:188:42;3277:140:11;;;;;;;;;;-1:-1:-1;3277:140:11;;;3384:22;5737:98:42;;3408:1:11;5866:2:42;5851:18;;5844:59;5710:18;3277:140:11;5567:342:42;1287:235:0;;;;;;;;;;-1:-1:-1;1287:235:0;;;843:1:3;6121:34:42;;678:1:2;6186:2:42;6171:18;;6164:43;6057:18;1287:235:0;5914:299:42;3144:97:31;;;;;;;;;;-1:-1:-1;3222:12:31;;3144:97;;;6364:25:42;;;6352:2;6337:18;3144:97:31;6218:177:42;1969:31:11;;;;;;;;;;;;1999:1;1969:31;;5039:244:31;;;;;;;;;;-1:-1:-1;5039:244:31;;;;;:::i;:::-;;:::i;233:39:40:-;;;;;;;;;;;;;;;3002:82:31;;;;;;;;;;-1:-1:-1;3075:2:31;3002:82;;;7033:4:42;7021:17;;;7003:36;;6991:2;6976:18;3002:82:31;6861:184:42;1724:108:1;;;;;;;;;;-1:-1:-1;1724:108:1;;;;;:::i;:::-;;:::i;6637:774:11:-;;;;;;;;;;-1:-1:-1;6637:774:11;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;800:378:40:-;;;;;;;;;;-1:-1:-1;800:378:40;;;;;:::i;:::-;;:::i;875:93:15:-;;;;;;;;;;-1:-1:-1;956:4:15;875:93;;538::8;;;;;;;;;;-1:-1:-1;538:93:8;;;;;:::i;:::-;;:::i;14792:132:11:-;;;;;;;;;;-1:-1:-1;14792:132:11;;;;;:::i;:::-;14897:11;;;;;14874:4;14897:11;;;:5;:11;;;;;;:20;;14792:132;446:46:1;;;;;;;;;;;;;;;4459:163:11;;;;;;;;;;-1:-1:-1;4459:163:11;;;;;:::i;:::-;;:::i;3299:116:31:-;;;;;;;;;;-1:-1:-1;3299:116:31;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:31;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2293:101:29;;;;;;;;;;;;;:::i;3507:128:2:-;;;;;;;;;;-1:-1:-1;3507:128:2;;;;;:::i;:::-;3596:12;3507:128;;;;;;;;9688:18:42;9676:31;;;9658:50;;9646:2;9631:18;3507:128:2;9514:200:42;2013:216:2;;;;;;;;;;-1:-1:-1;2013:216:2;;;;;:::i;:::-;;:::i;4024:87:11:-;;;;;;;;;;-1:-1:-1;4103:1:11;4024:87;;1638:85:29;;;;;;;;;;-1:-1:-1;1684:7:29;1710:6;-1:-1:-1;;;;;1710:6:29;1638:85;;2276:93:31;;;;;;;;;;;;;:::i;1663:46:11:-;;;;;;;;;;;;;;;1460:94:9;;;;;;;;;;-1:-1:-1;1519:4:9;1460:94;;3610:178:31;;;;;;;;;;-1:-1:-1;3610:178:31;;;;;:::i;:::-;;:::i;559:23:15:-;;;;;;;;;;-1:-1:-1;559:23:15;;;;-1:-1:-1;;;;;559:23:15;;;1391:156:8;;;;;;;;;;-1:-1:-1;1391:156:8;;;;;:::i;:::-;;:::i;569:48:1:-;;;;;;;;;;-1:-1:-1;569:48:1;;;;;:::i;:::-;;;;;;;;;;;;;;3510:981:8;;;;;;;;;;-1:-1:-1;3510:981:8;;;;;:::i;:::-;;:::i;1698:1333:15:-;;;;;;:::i;:::-;;:::i;8099:1340:11:-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;3252:105:1:-;;;;;;;;;;-1:-1:-1;3252:105:1;;;;;:::i;:::-;;:::i;3679:409:15:-;;;;;;:::i;:::-;;:::i;1100:139::-;;;;;;;;;;-1:-1:-1;1100:139:15;;;;;:::i;:::-;;:::i;3846:140:31:-;;;;;;;;;;-1:-1:-1;3846:140:31;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:31;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;2543:215:29;;;;;;;;;;-1:-1:-1;2543:215:29;;;;;:::i;:::-;;:::i;641:153:40:-;;;;;;;;;;-1:-1:-1;641:153:40;;;;;:::i;:::-;;:::i;2771:149:2:-;;;;;;;;;;-1:-1:-1;2771:149:2;;;;;:::i;:::-;;:::i;2074:89:31:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:37;4420:31:31;735:10:37;4436:7:31;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;;:::o;4928:1258:11:-;-1:-1:-1;;;;;;;;;;;;;;;;;5080:35:11;5117:28;-1:-1:-1;;;;;;;;;;;;;;;;;;;5117:28:11;5335:34;;;;;;;;-1:-1:-1;5335:34:11;;;5257:16;5335:34;;;;;;;5486:21;;;;;;;;;;;5335:34;;-1:-1:-1;;;5486:21:11;;;-1:-1:-1;;;;;;;;;;;;;;;;;5486:21:11;;;;;;;;;;;;;;;-1:-1:-1;5470:37:11;-1:-1:-1;5944:20:11;;5994:120;6018:19;;;;6051:22;;;;6087:17;;;;6018:10;6087:17;:::i;:::-;5994:10;:120::i;:::-;6137:42;;;;;;;;;;;;;;;;4928:1258;;;;-1:-1:-1;;;;;;4928:1258:11:o;4368:708:2:-;4681:8;-1:-1:-1;;;;;4673:31:2;4694:10;4673:31;4669:68;;4713:24;;;;;4726:10;4713:24;;;975:74:42;948:18;;4713:24:2;;;;;;;;4669:68;4873:14;;;;;;4837:32;;4854:14;;4873:7;4854:14;:::i;:::-;4837:16;:32::i;:::-;:50;4833:103;;4905:14;;;;:7;:14;:::i;:::-;4896:40;;;;;15540:10:42;15528:23;;;4896:40:2;;;15510:42:42;4921:14:2;;;;15568:18:42;;;15561:34;15483:18;;4896:40:2;15338:263:42;4833:103:2;5010:59;5021:7;5030:5;5037:8;;5047:9;5058:10;;5010;:59::i;:::-;4368:708;;;;;;;:::o;5039:244:31:-;5126:4;735:10:37;5182:37:31;5198:4;735:10:37;5213:5:31;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;5272:4;5265:11;;;5039:244;;;;;;:::o;1724:108:1:-;1531:13:29;:11;:13::i;:::-;1804:21:1::1;1813:4;1819:5;1804:8;:21::i;:::-;1724:108:::0;;:::o;6637:774:11:-;-1:-1:-1;;;;;;;;;;;;;;;;;6971:24:11;6999:74;7010:19;;;;7031:22;;;;7055:17;;;;7010:10;7055:17;:::i;6999:74::-;6968:105;;;7162:20;7184;7208:49;7228:10;7240:16;7208:19;:49::i;:::-;7161:96;;-1:-1:-1;7161:96:11;-1:-1:-1;7346:58:11;7353:17;;;;:10;:17;:::i;:::-;7372:7;7381;7390:13;7346:6;:58::i;:::-;7339:65;6637:774;-1:-1:-1;;;;;;6637:774:11:o;800:378:40:-;899:6;;861:4;;-1:-1:-1;;;;;899:6:40;885:10;:20;877:29;;;;;;1064:6;1048:13;3222:12:31;;;3144:97;1048:13:40;:22;;;;:::i;:::-;1030:14;:40;;1022:49;;;;;;1081:18;1087:3;1092:6;1081:5;:18::i;:::-;-1:-1:-1;1167:4:40;800:378;;;;:::o;538:93:8:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4459:163:11:-;1531:13:29;:11;:13::i;:::-;4542:12:11::1;:28:::0;;-1:-1:-1;;4542:28:11::1;-1:-1:-1::0;;;;;4542:28:11;::::1;::::0;;::::1;::::0;;;4585:30:::1;::::0;975:74:42;;;4585:30:11::1;::::0;963:2:42;948:18;4585:30:11::1;;;;;;;;4459:163:::0;:::o;2293:101:29:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;2013:216:2:-;-1:-1:-1;;;;;2198:24:2;;2217:4;2198:24;2013:216;;;;;;;:::o;2276:93:31:-;2323:13;2355:7;2348:14;;;;;:::i;3610:178::-;3679:4;735:10:37;3733:27:31;735:10:37;3750:2:31;3754:5;3733:9;:27::i;1391:156:8:-;1531:13:29;:11;:13::i;:::-;1503:37:8::1;;1523:16:::0;;1503:37:::1;:::i;:::-;:19;:37::i;3510:981::-:0;3701:21;;;3677;3701;;;:15;:21;;;;;;;;:31;;;;;;;;;;3677:55;;3653:12;;3677:21;3701:31;3677:55;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3861:8;:15;3880:1;3861:20;3857:46;;3890:13;;3883:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3883:20:8;;-1:-1:-1;3883:20:8;;-1:-1:-1;;;;3883:20:8;3857:46;3988:1;3964:25;;;3960:46;;3998:8;-1:-1:-1;3991:15:8;;3960:46;4153:1;4129:25;;4125:267;;4170:34;4190:13;;4170:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4170:19:8;;-1:-1:-1;;;4170:34:8:i;:::-;4353:8;4363:17;:13;4377:1;4363:13;;:17;:::i;:::-;4340:41;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;4333:48;;;;;4125:267;4470:13;;4455:29;;;;;;;;;;;;:::i;1698:1333:15:-;1799:9;1794:1037;1814:19;;;1794:1037;;;1854:29;1886:8;;1895:1;1886:11;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;1854:43;-1:-1:-1;1980:50:15;1987:20;;;;1854:43;1987:20;:::i;:::-;2009;;;;14897:11:11;;;;;14874:4;14897:11;;;:5;:11;;;;;;:20;;14792:132;1980:50:15;1975:65;;2032:8;;;1975:65;2602:4;:22;2633:12;;;;:6;2696:11;;;;2725:14;;;;2633:6;2725:14;:::i;:::-;2757:15;;;;;;;;:::i;:::-;2790:16;;;;:6;:16;:::i;:::-;2602:218;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1840:991;1794:1037;1835:3;;;;:::i;:::-;;;;1794:1037;;;;2988:10;-1:-1:-1;;;;;2978:43:15;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2978:45:15;;;;;;;;;;;;:::i;:::-;2961:63;;;;;;;;;;;:::i;8099:1340:11:-;8260:34;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;8658:20:11;;8708:140;8728:10;8752:19;;;;8785:22;;;;8821:17;;;;8752:10;8821:17;:::i;:::-;8708:6;:140::i;:::-;8657:191;;;;8937:20;8959;8983:49;9003:10;9015:16;8983:19;:49::i;:::-;8936:96;;-1:-1:-1;8936:96:11;-1:-1:-1;9155:66:11;9163:17;;;;:10;:17;:::i;:::-;9182:7;9191;9155:66;;;;;;;9200:4;9155:66;:::i;:::-;9206:14;9155:7;:66::i;:::-;9287:42;;;;;;;;;;;;;;;;;;;9353:15;;9142:79;;-1:-1:-1;9287:42:11;;-1:-1:-1;9389:10:11;;9353:15;9345:87;;9370:17;;;;:10;:17;:::i;:::-;9345:87;;;24301:10:42;24289:23;;;24271:42;;24344:2;24329:18;;24322:34;;;24372:18;;24365:34;;;24259:2;24244:18;9345:87:11;;;;;;;8326:1113;;;;8099:1340;;;;;;:::o;3252:105:1:-;1531:13:29;:11;:13::i;:::-;3319:31:1::1;::::0;;;;-1:-1:-1;;;;;993:55:42;;;3319:31:1::1;::::0;::::1;975:74:42::0;3319:8:1::1;:20;::::0;::::1;::::0;948:18:42;;3319:31:1::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;3252:105:::0;:::o;3679:409:15:-;3958:10;3980:4;3958:27;3954:50;;3994:10;;;;;;;;;;;;;;3954:50;4014:67;4033:7;4042:5;4049:8;;4059:9;4070:10;;4014:18;:67::i;1100:139::-;1531:13:29;:11;:13::i;:::-;1175:8:15::1;:20:::0;;-1:-1:-1;;1175:20:15::1;-1:-1:-1::0;;;;;1175:20:15;::::1;::::0;;::::1;::::0;;;1210:22:::1;::::0;975:74:42;;;1210:22:15::1;::::0;963:2:42;948:18;1210:22:15::1;829:226:42::0;2543:215:29;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:29;::::1;2623:91;;2672:31;::::0;::::1;::::0;;2700:1:::1;2672:31;::::0;::::1;975:74:42::0;948:18;;2672:31:29::1;829:226:42::0;2623:91:29::1;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;641:153:40:-;719:6;;695:4;;-1:-1:-1;;;;;719:6:40;:20;711:29;;;;;;-1:-1:-1;750:6:40;:16;;-1:-1:-1;;750:16:40;-1:-1:-1;;;;;750:16:40;;;;;;;;;;-1:-1:-1;;641:153:40:o;2771:149:2:-;2853:4;2900:13;;;;;;2876:5;;2853:4;;2882:13;;2900:6;2882:13;:::i;:::-;2876:20;;;;;;;;;;;;;-1:-1:-1;2876:20:2;;:37;;2771:149;-1:-1:-1;;2771:149:2:o;8989:128:31:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;16809:668:11:-;16951:20;16973:24;17147:22;17159:9;17147:11;:22::i;:::-;17132:37;;17295:12;17276:31;;17377:12;17358:16;:31;17354:117;;;17412:48;;;;;;;;24584:25:42;;;24625:18;;;24618:34;;;24557:18;;17412:48:11;24410:248:42;17354:117:11;16809:668;;;;;;:::o;2718:196:1:-;2822:11;;;2788:7;2822:11;;;:5;:11;;;;;;;2843:43;;2874:12;;;;;24837:10:42;24825:23;;2874:12:1;;;24807:42:42;24780:18;;2874:12:1;24663:192:42;11585:1806:11;12062:17;12082:36;:17;:8;;:15;:17::i;:::-;2891:2:14;2780:123;12082:36:11;12062:56;;12251:24;12278:62;12286:9;12297:26;12303:19;:8;;:17;:19::i;:::-;12297:5;:26::i;:::-;12325:14;;;;:7;:14;:::i;:::-;12278:7;:62::i;:::-;12251:89;-1:-1:-1;243:2:14;-1:-1:-1;;12351:955:11;;;12455:23;12481:175;12524:13;;;;;;;;:::i;:::-;12555:14;;;;:7;:14;:::i;:::-;12587:16;12621:21;:8;;:19;:21::i;:::-;12481:25;:175::i;:::-;13203:92;;;;;12455:201;;-1:-1:-1;;;;;;13203:8:11;:20;;;;:92;;13224:9;;13235:5;;13242:1;;12455:201;;13203:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12378:928;12351:955;-1:-1:-1;;;;;13321:63:11;;13333:5;13321:63;13340:14;;;;:7;:14;:::i;:::-;13321:63;;;15540:10:42;15528:23;;;15510:42;;15583:2;15568:18;;15561:34;;;15483:18;13321:63:11;;;;;;;11888:1503;;11585:1806;;;;;;;:::o;10663:477:31:-;-1:-1:-1;;;;;3952:18:31;;;10762:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10828:37:31;;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;;;;-1:-1:-1;;;;;26105:55:42;;10936:60:31;;;26087:74:42;26177:18;;;26170:34;;;26220:18;;;26213:34;;;26060:18;;10936:60:31;25885:368:42;10881:130:31;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10752:388;10663:477;;;:::o;5656:300::-;-1:-1:-1;;;;;5739:18:31;;5735:86;;5780:30;;;;;5807:1;5780:30;;;975:74:42;948:18;;5780:30:31;829:226:42;5735:86:31;-1:-1:-1;;;;;5834:16:31;;5830:86;;5873:32;;;;;5902:1;5873:32;;;975:74:42;948:18;;5873:32:31;829:226:42;5830:86:31;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;1796:162:29:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:29;735:10:37;1855:23:29;1851:101;;1901:40;;;;;735:10:37;1901:40:29;;;975:74:42;948:18;;1901:40:29;829:226:42;2286:134:1;2359:11;;;;;;;:5;:11;;;;;;;;;:19;;;2393:20;;15510:42:42;;;15568:18;;15561:34;;;2393:20:1;;15483:18:42;2393:20:1;;;;;;;2286:134;;:::o;9733:1334:11:-;9865:20;9887;9919:15;10090:324;10122:10;:13;;;10149:16;10155:9;10149:5;:16::i;:::-;10383:21;;;;:10;:21;:::i;:::-;10090:324;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10090:18:11;;-1:-1:-1;;;10090:324:11:i;:::-;10066:348;;-1:-1:-1;10066:348:11;-1:-1:-1;10494:14:11;10066:348;10511:33;;1999:1;10511:33;;;2045:1;10511:33;10494:50;-1:-1:-1;10666:67:11;10681:17;;;;:10;:17;:::i;:::-;10700:7;10709:23;;;;:10;:23;:::i;10666:67::-;10975:12;;10656:77;;-1:-1:-1;;;;;;10975:12:11;:26;10971:89;;11021:12;;;11003:57;;;;;-1:-1:-1;;;;;11021:12:11;;;;11003:39;;:57;;11043:7;;11052;;11003:57;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;10971:89;9909:1158;;9733:1334;;;;;:::o;2038:391:3:-;-1:-1:-1;;;;;;;;;;;;;;;;;2259:8:3;-1:-1:-1;;;;;2259:14:3;;2291:86;;;;;;;;2307:7;2291:86;;;;;;2316:25;2333:7;2316:16;:25::i;:::-;2291:86;;;;2343:8;2291:86;;;;2353:8;2291:86;;;;2363:13;2291:86;;;;;2403:4;2259:163;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2240:182;2038:391;-1:-1:-1;;;;;2038:391:3:o;7721:208:31:-;-1:-1:-1;;;;;7791:21:31;;7787:91;;7835:32;;;;;7864:1;7835:32;;;975:74:42;948:18;;7835:32:31;829:226:42;7787:91:31;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;2912:187:29:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:29;;;-1:-1:-1;;3020:17:29;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;2237:514:8:-;2345:9;2340:354;2364:16;:23;2360:1;:27;2340:354;;;2522:48;2542:16;2559:1;2542:19;;;;;;;;:::i;:::-;;;;;;;:27;;;2522:19;:48::i;:::-;2656:16;2673:1;2656:19;;;;;;;;:::i;:::-;;;;;;;:27;;;2584:15;:40;2600:16;2617:1;2600:19;;;;;;;;:::i;:::-;;;;;;;:23;;;2584:40;;;;;;;;;;;;;;;:69;2625:16;2642:1;2625:19;;;;;;;;:::i;:::-;;;;;;;:27;;;2584:69;;;;;;;;;;;;;;;:99;;;;;;:::i;:::-;-1:-1:-1;2389:3:8;;;;:::i;:::-;;;;2340:354;;;;2709:35;2727:16;2709:35;;;;;;:::i;4631:264::-;4801:1;4787:16;;4781:23;4827:28;;;463:1;4827:28;4823:65;;4879:8;4864:24;;;;;;;;;;;:::i;2037:567:9:-;2198:20;2220:24;2291:44;2302:9;2313:12;2327:7;2291:10;:44::i;:::-;2256:79;;-1:-1:-1;2256:79:9;-1:-1:-1;2571:26:9;2577:5;2256:79;2571:5;:26::i;:::-;2037:567;;;;;;;:::o;3188:766:3:-;3389:31;;:::i;:::-;3554:20;3577:26;3588:4;:14;;;3577:10;:26::i;:::-;3617:15;;;;3554:49;;-1:-1:-1;3617:19:3;3613:53;;3638:28;3650:4;:15;;;3638:11;:28::i;:::-;3755:8;-1:-1:-1;;;;;3755:13:3;;3777:12;3809:92;;;;;;;;3825:7;3809:92;;;;;;3834:25;3851:7;3834:16;:25::i;:::-;3809:92;;;;3861:8;3809:92;;;;3871:8;3809:92;;;;3899:1;3881:4;:15;;;:19;3809:92;;;;;3919:14;3755:192;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3677:270;3188:766;-1:-1:-1;;;;;;;3188:766:3:o;9949:432:31:-;-1:-1:-1;;;;;10061:19:31;;10057:89;;10103:32;;;;;10132:1;10103:32;;;975:74:42;948:18;;10103:32:31;829:226:42;10057:89:31;-1:-1:-1;;;;;10159:21:31;;10155:90;;10203:31;;;;;10231:1;10203:31;;;975:74:42;948:18;;10203:31:31;829:226:42;10155:90:31;-1:-1:-1;;;;;10254:18:31;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:31;10342:5;-1:-1:-1;;;;;10333:31:31;;10358:5;10333:31;;;;6364:25:42;;6352:2;6337:18;;6218:177;10333:31:31;;;;;;;;9949:432;;;;:::o;15318:172:11:-;15389:16;15462:21;15425:33;15462:21;15425:9;:33;:::i;:::-;15424:59;;;;:::i;1573:123:14:-;1633:7;1667:21;188:2;1633:7;1667:4;;:21;:::i;:::-;1659:30;;;:::i;1874:152::-;1936:6;1975:42;243:2;188;1975:4;;:42;:::i;:::-;1968:50;;;:::i;:::-;1961:58;;;1874:152;-1:-1:-1;;;1874:152:14:o;15714:139:11:-;15778:16;15813:33;15825:21;15813:33;;;;:::i;2939:462:9:-;3073:24;-1:-1:-1;;;;;3113:19:9;;3109:46;;3148:6;3134:21;;3109:46;3251:21;3257:3;3262:9;3251:5;:21::i;:::-;-1:-1:-1;3385:9:9;;2939:462;-1:-1:-1;;2939:462:9:o;2186:130:14:-;2250:12;2281:28;:4;243:2;2281:4;;:28;:::i;:::-;2274:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2274:35:14;;2186:130;-1:-1:-1;;;;;;2186:130:14:o;640:284:13:-;824:17;877:6;885:7;894:9;905:11;860:57;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;853:64;;640:284;;;;;;:::o;6271:1107:31:-;-1:-1:-1;;;;;6360:18:31;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:31;;-1:-1:-1;6356:540:31;;-1:-1:-1;;;;;6570:15:31;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;;;;-1:-1:-1;;;;;26105:55:42;;6649:50:31;;;26087:74:42;26177:18;;;26170:34;;;26220:18;;;26213:34;;;26060:18;;6649:50:31;25885:368:42;6599:115:31;-1:-1:-1;;;;;6834:15:31;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:31;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:31;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:31;7355:4;-1:-1:-1;;;;;7346:25:31;;7365:5;7346:25;;;;6364::42;;6352:2;6337:18;;6218:177;7346:25:31;;;;;;;;6271:1107;;;:::o;16077:147:11:-;16142:15;16183:33;16195:21;16183:9;:33;:::i;598:506:14:-;791:18;;732:17;;791:22;;;934:163;;1074:7;1083:13;1057:40;;;;;;;;34514:19:42;;;34571:3;34567:16;34585:66;34563:89;34558:2;34549:12;;34542:111;34678:2;34669:12;;34359:328;1057:40:14;;;;;;;;;;;;;934:163;;;976:7;985:13;1017:10;1030:11;959:83;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;934:163;927:170;;598:506;;;;;;:::o;8247:206:31:-;-1:-1:-1;;;;;8317:21:31;;8313:89;;8361:30;;;;;8388:1;8361:30;;;975:74:42;948:18;;8361:30:31;829:226:42;8313:89:31;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;4650:191:3:-;4716:17;4762:10;4749:9;:23;4745:62;;4781:26;;;;;4797:9;4781:26;;;6364:25:42;6337:18;;4781:26:3;6218:177:42;4745:62:3;-1:-1:-1;4824:10:3;4650:191::o;5218:410::-;5371:15;5389:8;-1:-1:-1;;;;;5389:16:3;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5371:36;-1:-1:-1;;;;;;5421:21:3;;5417:54;;5451:20;;;;;;;;;;;;;;5417:54;1829:53:35;;;5578:10:3;1829:53:35;;;35786:34:42;;;5598:8:3;-1:-1:-1;;;;;35856:15:42;;;35836:18;;;35829:43;35888:18;;;;35881:34;;;1829:53:35;;;;;;;;;;35698:18:42;;;;1829:53:35;;;;;;;;;;;;;;5545:76:3;;:32;;;5609:11;;1802:81:35;;5545:32:3;;-1:-1:-1;4504:33:35;5545:32:3;1829:53:35;4504:27;:33::i;:::-;4478:59;;4551:10;:17;4572:1;4551:22;;:57;;;;;4589:10;4578:30;;;;;;;;;;;;:::i;:::-;4577:31;4551:57;4547:135;;;4631:40;;;;;-1:-1:-1;;;;;993:55:42;;4631:40:35;;;975:74:42;948:18;;4631:40:35;829:226:42;2705:151:36;2780:12;2811:38;2833:6;2841:4;2847:1;2780:12;3421;3435:23;3462:6;-1:-1:-1;;;;;3462:11:36;3481:5;3488:4;3462:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3420:73;;;;3510:55;3537:6;3545:7;3554:10;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;;;;;;5071:18:36;;;:23;5045:49;5041:119;;;5121:24;;;;;-1:-1:-1;;;;;993:55:42;;5121:24:36;;;975:74:42;948:18;;5121:24:36;829:226:42;5041:119:36;-1:-1:-1;5180:10:36;5173:17;;5743:516;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:250:42:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:42;238:16;;231:27;14:250::o;269:330::-;311:3;349:5;343:12;376:6;371:3;364:19;392:76;461:6;454:4;449:3;445:14;438:4;431:5;427:16;392:76;:::i;:::-;513:2;501:15;-1:-1:-1;;497:88:42;488:98;;;;588:4;484:109;;269:330;-1:-1:-1;;269:330:42:o;604:220::-;753:2;742:9;735:21;716:4;773:45;814:2;803:9;799:18;791:6;773:45;:::i;1060:154::-;-1:-1:-1;;;;;1139:5:42;1135:54;1128:5;1125:65;1115:93;;1204:1;1201;1194:12;1219:315;1287:6;1295;1348:2;1336:9;1327:7;1323:23;1319:32;1316:52;;;1364:1;1361;1354:12;1316:52;1403:9;1390:23;1422:31;1447:5;1422:31;:::i;:::-;1472:5;1524:2;1509:18;;;;1496:32;;-1:-1:-1;;;1219:315:42:o;1731:158::-;1793:5;1838:3;1829:6;1824:3;1820:16;1816:26;1813:46;;;1855:1;1852;1845:12;1813:46;-1:-1:-1;1877:6:42;1731:158;-1:-1:-1;1731:158:42:o;1894:360::-;1982:6;2035:2;2023:9;2014:7;2010:23;2006:32;2003:52;;;2051:1;2048;2041:12;2003:52;2091:9;2078:23;2124:18;2116:6;2113:30;2110:50;;;2156:1;2153;2146:12;2110:50;2179:69;2240:7;2231:6;2220:9;2216:22;2179:69;:::i;2413:1392::-;2333:12;;2321:25;;2395:4;2384:16;;;2378:23;2362:14;;;2355:47;2779:4;2827:3;2812:19;;2904:2;2942:3;2937:2;2926:9;2922:18;2915:31;2966:6;3001;2995:13;3032:6;3024;3017:22;3070:3;3059:9;3055:19;3048:26;;3133:3;3123:6;3120:1;3116:14;3105:9;3101:30;3097:40;3083:54;;3156:4;3195:2;3187:6;3183:15;3216:1;3226:487;3240:6;3237:1;3234:13;3226:487;;;3305:22;;;3329:66;3301:95;3289:108;;3420:13;;3461:9;;3446:25;;3510:11;;3504:18;3542:15;;;3535:27;;;3585:48;3617:15;;;3504:18;3585:48;:::i;:::-;3575:58;-1:-1:-1;;3691:12:42;;;;3656:15;;;;3262:1;3255:9;3226:487;;;-1:-1:-1;;2333:12:42;;3795:2;3780:18;;2321:25;-1:-1:-1;;;2395:4:42;2384:16;;2378:23;2362:14;;;2355:47;-1:-1:-1;3730:6:42;-1:-1:-1;3745:54:42;2259:149;3810:154;3869:5;3914:2;3905:6;3900:3;3896:16;3892:25;3889:45;;;3930:1;3927;3920:12;3969:347;4020:8;4030:6;4084:3;4077:4;4069:6;4065:17;4061:27;4051:55;;4102:1;4099;4092:12;4051:55;-1:-1:-1;4125:20:42;;4168:18;4157:30;;4154:50;;;4200:1;4197;4190:12;4154:50;4237:4;4229:6;4225:17;4213:29;;4289:3;4282:4;4273:6;4265;4261:19;4257:30;4254:39;4251:59;;;4306:1;4303;4296:12;4251:59;3969:347;;;;;:::o;4321:1048::-;4464:6;4472;4480;4488;4496;4504;4512;4565:3;4553:9;4544:7;4540:23;4536:33;4533:53;;;4582:1;4579;4572:12;4533:53;4605;4650:7;4639:9;4605:53;:::i;:::-;4595:63;;4705:2;4694:9;4690:18;4677:32;4667:42;;4760:3;4749:9;4745:19;4732:33;4784:18;4825:2;4817:6;4814:14;4811:34;;;4841:1;4838;4831:12;4811:34;4880:58;4930:7;4921:6;4910:9;4906:22;4880:58;:::i;:::-;4957:8;;-1:-1:-1;4854:84:42;-1:-1:-1;5042:3:42;5027:19;;5014:33;;-1:-1:-1;5056:31:42;5014:33;5056:31;:::i;:::-;5106:5;;-1:-1:-1;5164:3:42;5149:19;;5136:33;;5181:16;;;5178:36;;;5210:1;5207;5200:12;5178:36;;5249:60;5301:7;5290:8;5279:9;5275:24;5249:60;:::i;:::-;4321:1048;;;;-1:-1:-1;4321:1048:42;;-1:-1:-1;4321:1048:42;;;;5223:86;;-1:-1:-1;;;4321:1048:42:o;6400:456::-;6477:6;6485;6493;6546:2;6534:9;6525:7;6521:23;6517:32;6514:52;;;6562:1;6559;6552:12;6514:52;6601:9;6588:23;6620:31;6645:5;6620:31;:::i;:::-;6670:5;-1:-1:-1;6727:2:42;6712:18;;6699:32;6740:33;6699:32;6740:33;:::i;:::-;6400:456;;6792:7;;-1:-1:-1;;;6846:2:42;6831:18;;;;6818:32;;6400:456::o;7050:163::-;7117:20;;7177:10;7166:22;;7156:33;;7146:61;;7203:1;7200;7193:12;7146:61;7050:163;;;:::o;7218:252::-;7285:6;7293;7346:2;7334:9;7325:7;7321:23;7317:32;7314:52;;;7362:1;7359;7352:12;7314:52;7385:28;7403:9;7385:28;:::i;7475:118::-;7561:5;7554:13;7547:21;7540:5;7537:32;7527:60;;7583:1;7580;7573:12;7598:489;7692:6;7700;7753:2;7741:9;7732:7;7728:23;7724:32;7721:52;;;7769:1;7766;7759:12;7721:52;7809:9;7796:23;7842:18;7834:6;7831:30;7828:50;;;7874:1;7871;7864:12;7828:50;7897:69;7958:7;7949:6;7938:9;7934:22;7897:69;:::i;:::-;7887:79;;;8016:2;8005:9;8001:18;7988:32;8029:28;8051:5;8029:28;:::i;:::-;8076:5;8066:15;;;7598:489;;;;;:::o;8092:257::-;2333:12;;2321:25;;2395:4;2384:16;;;2378:23;2362:14;;;2355:47;8286:2;8271:18;;8298:45;2259:149;8354:159;8421:20;;8481:6;8470:18;;8460:29;;8450:57;;8503:1;8500;8493:12;8518:256;8584:6;8592;8645:2;8633:9;8624:7;8620:23;8616:32;8613:52;;;8661:1;8658;8651:12;8613:52;8684:28;8702:9;8684:28;:::i;:::-;8674:38;;8731:37;8764:2;8753:9;8749:18;8731:37;:::i;:::-;8721:47;;8518:256;;;;;:::o;9262:247::-;9321:6;9374:2;9362:9;9353:7;9349:23;9345:32;9342:52;;;9390:1;9387;9380:12;9342:52;9429:9;9416:23;9448:31;9473:5;9448:31;:::i;9719:670::-;9833:6;9841;9849;9857;9910:3;9898:9;9889:7;9885:23;9881:33;9878:53;;;9927:1;9924;9917:12;9878:53;9950;9995:7;9984:9;9950:53;:::i;:::-;9940:63;;10054:2;10043:9;10039:18;10026:32;10081:18;10073:6;10070:30;10067:50;;;10113:1;10110;10103:12;10067:50;10152:58;10202:7;10193:6;10182:9;10178:22;10152:58;:::i;:::-;10229:8;;-1:-1:-1;10126:84:42;-1:-1:-1;;10314:3:42;10299:19;;10286:33;10328:31;10286:33;10328:31;:::i;:::-;9719:670;;;;-1:-1:-1;9719:670:42;;-1:-1:-1;;9719:670:42:o;10394:395::-;10485:8;10495:6;10549:3;10542:4;10534:6;10530:17;10526:27;10516:55;;10567:1;10564;10557:12;10516:55;-1:-1:-1;10590:20:42;;10633:18;10622:30;;10619:50;;;10665:1;10662;10655:12;10619:50;10702:4;10694:6;10690:17;10678:29;;10762:3;10755:4;10745:6;10742:1;10738:14;10730:6;10726:27;10722:38;10719:47;10716:67;;;10779:1;10776;10769:12;10794:503;10918:6;10926;10979:2;10967:9;10958:7;10954:23;10950:32;10947:52;;;10995:1;10992;10985:12;10947:52;11035:9;11022:23;11068:18;11060:6;11057:30;11054:50;;;11100:1;11097;11090:12;11054:50;11139:98;11229:7;11220:6;11209:9;11205:22;11139:98;:::i;:::-;11256:8;;11113:124;;-1:-1:-1;10794:503:42;-1:-1:-1;;;;10794:503:42:o;11302:184::-;11360:6;11413:2;11401:9;11392:7;11388:23;11384:32;11381:52;;;11429:1;11426;11419:12;11381:52;11452:28;11470:9;11452:28;:::i;11673:553::-;11759:6;11767;11775;11783;11836:2;11824:9;11815:7;11811:23;11807:32;11804:52;;;11852:1;11849;11842:12;11804:52;11875:28;11893:9;11875:28;:::i;:::-;11865:38;;11922:37;11955:2;11944:9;11940:18;11922:37;:::i;:::-;11912:47;;12010:2;11999:9;11995:18;11982:32;12037:18;12029:6;12026:30;12023:50;;;12069:1;12066;12059:12;12023:50;12108:58;12158:7;12149:6;12138:9;12134:22;12108:58;:::i;:::-;11673:553;;;;-1:-1:-1;12185:8:42;-1:-1:-1;;;;11673:553:42:o;12734:716::-;12872:6;12880;12888;12932:9;12923:7;12919:23;12962:3;12958:2;12954:12;12951:32;;;12979:1;12976;12969:12;12951:32;13019:9;13006:23;13052:18;13044:6;13041:30;13038:50;;;13084:1;13081;13074:12;13038:50;13107:69;13168:7;13159:6;13148:9;13144:22;13107:69;:::i;:::-;13097:79;;;13269:2;-1:-1:-1;;13196:2:42;13192:75;13188:84;13185:104;;;13285:1;13282;13275:12;13185:104;;13323:2;13312:9;13308:18;13298:28;;13376:2;13365:9;13361:18;13348:32;13389:31;13414:5;13389:31;:::i;:::-;13439:5;13429:15;;;12734:716;;;;;:::o;13455:613::-;13699:4;13741:3;13730:9;13726:19;13718:27;;13778:6;13772:13;13761:9;13754:32;13854:18;13846:4;13838:6;13834:17;13828:24;13824:49;13817:4;13806:9;13802:20;13795:79;13921:4;13913:6;13909:17;13903:24;13936:62;13992:4;13981:9;13977:20;13963:12;2333;;2321:25;;2395:4;2384:16;;;2378:23;2362:14;;2355:47;2259:149;13936:62;-1:-1:-1;2333:12:42;;14057:3;14042:19;;2321:25;2395:4;2384:16;;2378:23;2362:14;;;2355:47;14007:55;2259:149;14073:388;14141:6;14149;14202:2;14190:9;14181:7;14177:23;14173:32;14170:52;;;14218:1;14215;14208:12;14170:52;14257:9;14244:23;14276:31;14301:5;14276:31;:::i;:::-;14326:5;-1:-1:-1;14383:2:42;14368:18;;14355:32;14396:33;14355:32;14396:33;:::i;14466:236::-;14551:6;14604:2;14592:9;14583:7;14579:23;14575:32;14572:52;;;14620:1;14617;14610:12;14572:52;14643:53;14688:7;14677:9;14643:53;:::i;14707:437::-;14786:1;14782:12;;;;14829;;;14850:61;;14904:4;14896:6;14892:17;14882:27;;14850:61;14957:2;14949:6;14946:14;14926:18;14923:38;14920:218;;-1:-1:-1;;;14991:1:42;14984:88;15095:4;15092:1;15085:15;15123:4;15120:1;15113:15;15149:184;-1:-1:-1;;;15198:1:42;15191:88;15298:4;15295:1;15288:15;15322:4;15319:1;15312:15;15606:184;-1:-1:-1;;;15655:1:42;15648:88;15755:4;15752:1;15745:15;15779:4;15776:1;15769:15;15795:125;15860:9;;;15881:10;;;15878:36;;;15894:18;;:::i;15925:253::-;15997:2;15991:9;16039:4;16027:17;;16074:18;16059:34;;16095:22;;;16056:62;16053:88;;;16121:18;;:::i;:::-;16157:2;16150:22;15925:253;:::o;16183:251::-;16255:2;16249:9;;;16285:15;;16330:18;16315:34;;16351:22;;;16312:62;16309:88;;;16377:18;;:::i;16439:334::-;16510:2;16504:9;16566:2;16556:13;;-1:-1:-1;;16552:86:42;16540:99;;16669:18;16654:34;;16690:22;;;16651:62;16648:88;;;16716:18;;:::i;:::-;16752:2;16745:22;16439:334;;-1:-1:-1;16439:334:42:o;16778:245::-;16826:4;16859:18;16851:6;16848:30;16845:56;;;16881:18;;:::i;:::-;-1:-1:-1;16938:2:42;16926:15;-1:-1:-1;;16922:88:42;17012:4;16918:99;;16778:245::o;17028:2115::-;17218:9;17252:18;17293:2;17285:6;17282:14;17279:40;;;17299:18;;:::i;:::-;17345:6;17342:1;17338:14;17371:4;17395:28;17419:2;17415;17411:11;17395:28;:::i;:::-;17457:19;;;17527:14;;;;17492:12;;;;17564:14;17553:26;;17550:46;;;17592:1;17589;17582:12;17550:46;17616:5;17630:1480;17646:6;17641:3;17638:15;17630:1480;;;17732:3;17719:17;17768:2;17755:11;17752:19;17749:109;;;17812:1;17841:2;17837;17830:14;17749:109;17881:23;;17949:4;17928:14;17924:23;;;17920:34;17917:124;;;17995:1;18024:2;18020;18013:14;17917:124;18069:22;;:::i;:::-;18120:21;18138:2;18120:21;:::i;:::-;18111:7;18104:38;18180:30;18206:2;18202;18198:11;18180:30;:::i;:::-;18175:2;18166:7;18162:16;18155:56;18234:2;18284;18280;18276:11;18263:25;18315:2;18307:6;18304:14;18301:104;;;18359:1;18388:2;18384;18377:14;18301:104;18428:15;;;;;18485:14;18478:4;18470:13;;18466:34;18456:135;;18543:1;18573:3;18568;18561:16;18456:135;18628:2;18615:16;18657:49;18673:32;18701:3;18673:32;:::i;:::-;18657:49;:::i;:::-;18733:3;18726:5;18719:18;18779:14;18774:2;18768:3;18764:2;18760:12;18756:21;18753:41;18750:134;;;18836:1;18866:3;18861;18854:16;18750:134;18939:3;18934:2;18930;18926:11;18921:2;18914:5;18910:14;18897:46;18989:1;18967:15;;;18963:24;;18956:35;;;;19011:16;;;19004:31;19048:20;;-1:-1:-1;19088:12:42;;;;17663;;17630:1480;;;-1:-1:-1;19132:5:42;17028:2115;-1:-1:-1;;;;;;;17028:2115:42:o;19148:331::-;19253:9;19264;19306:8;19294:10;19291:24;19288:44;;;19328:1;19325;19318:12;19288:44;19357:6;19347:8;19344:20;19341:40;;;19377:1;19374;19367:12;19341:40;-1:-1:-1;;19403:23:42;;;19448:25;;;;;-1:-1:-1;19148:331:42:o;19484:476::-;19675:3;19713:6;19707:13;19729:66;19788:6;19783:3;19776:4;19768:6;19764:17;19729:66;:::i;:::-;19817:16;;19870:6;19862;19817:16;19842:35;19934:1;19896:18;;19923:13;;;-1:-1:-1;19896:18:42;;19484:476;-1:-1:-1;;;19484:476:42:o;19965:325::-;20053:6;20048:3;20041:19;20105:6;20098:5;20091:4;20086:3;20082:14;20069:43;;20157:1;20150:4;20141:6;20136:3;20132:16;20128:27;20121:38;20023:3;20279:4;-1:-1:-1;;20204:2:42;20196:6;20192:15;20188:88;20183:3;20179:98;20175:109;20168:116;;19965:325;;;;:::o;20295:244::-;20452:2;20441:9;20434:21;20415:4;20472:61;20529:2;20518:9;20514:18;20506:6;20498;20472:61;:::i;20544:184::-;-1:-1:-1;;;20593:1:42;20586:88;20693:4;20690:1;20683:15;20717:4;20714:1;20707:15;20733:389;20832:4;20890:11;20877:25;20980:66;20969:8;20953:14;20949:29;20945:102;20925:18;20921:127;20911:155;;21062:1;21059;21052:12;20911:155;21083:33;;;;;20733:389;-1:-1:-1;;20733:389:42:o;21127:580::-;21204:4;21210:6;21270:11;21257:25;21360:66;21349:8;21333:14;21329:29;21325:102;21305:18;21301:127;21291:155;;21442:1;21439;21432:12;21291:155;21469:33;;21521:20;;;-1:-1:-1;21564:18:42;21553:30;;21550:50;;;21596:1;21593;21586:12;21550:50;21629:4;21617:17;;-1:-1:-1;21660:14:42;21656:27;;;21646:38;;21643:58;;;21697:1;21694;21687:12;21712:129;21797:18;21790:5;21786:30;21779:5;21776:41;21766:69;;21831:1;21828;21821:12;21846:1015;22224:10;22197:25;22215:6;22197:25;:::i;:::-;22193:42;22182:9;22175:61;22299:4;22291:6;22287:17;22274:31;22267:4;22256:9;22252:20;22245:61;22156:4;22353;22345:6;22341:17;22328:31;22368:30;22392:5;22368:30;:::i;:::-;22447:18;22440:5;22436:30;22429:4;22418:9;22414:20;22407:60;;22503:6;22498:2;22487:9;22483:18;22476:34;22547:3;22541;22530:9;22526:19;22519:32;22574:62;22631:3;22620:9;22616:19;22608:6;22600;22574:62;:::i;:::-;-1:-1:-1;;;;;22677:6:42;22673:55;22667:3;22656:9;22652:19;22645:84;22778:9;22770:6;22766:22;22760:3;22749:9;22745:19;22738:51;22806:49;22848:6;22840;22832;22806:49;:::i;:::-;22798:57;21846:1015;-1:-1:-1;;;;;;;;;;21846:1015:42:o;22866:195::-;22905:3;-1:-1:-1;;22929:5:42;22926:77;22923:103;;23006:18;;:::i;:::-;-1:-1:-1;23053:1:42;23042:13;;22866:195::o;23066:647::-;23145:6;23198:2;23186:9;23177:7;23173:23;23169:32;23166:52;;;23214:1;23211;23204:12;23166:52;23247:9;23241:16;23280:18;23272:6;23269:30;23266:50;;;23312:1;23309;23302:12;23266:50;23335:22;;23388:4;23380:13;;23376:27;-1:-1:-1;23366:55:42;;23417:1;23414;23407:12;23366:55;23446:2;23440:9;23471:48;23487:31;23515:2;23487:31;:::i;23471:48::-;23542:2;23535:5;23528:17;23582:7;23577:2;23572;23568;23564:11;23560:20;23557:33;23554:53;;;23603:1;23600;23593:12;23554:53;23616:67;23680:2;23675;23668:5;23664:14;23659:2;23655;23651:11;23616:67;:::i;23718:348::-;23807:6;23860:2;23848:9;23839:7;23835:23;23831:32;23828:52;;;23876:1;23873;23866:12;23828:52;23902:22;;:::i;:::-;23960:9;23947:23;23940:5;23933:38;24031:2;24020:9;24016:18;24003:32;23998:2;23991:5;23987:14;23980:56;24055:5;24045:15;;;23718:348;;;;:::o;24860:245::-;24918:6;24971:2;24959:9;24950:7;24946:23;24942:32;24939:52;;;24987:1;24984;24977:12;24939:52;25026:9;25013:23;25045:30;25069:5;25045:30;:::i;25110:502::-;-1:-1:-1;;;;;25352:6:42;25348:55;25337:9;25330:74;25440:6;25435:2;25424:9;25420:18;25413:34;25495:6;25487;25483:19;25478:2;25467:9;25463:18;25456:47;25539:3;25534:2;25523:9;25519:18;25512:31;25311:4;25560:46;25601:3;25590:9;25586:19;25578:6;25560:46;:::i;26258:379::-;26451:2;26440:9;26433:21;26414:4;26477:45;26518:2;26507:9;26503:18;26495:6;26477:45;:::i;:::-;26570:9;26562:6;26558:22;26553:2;26542:9;26538:18;26531:50;26598:33;26624:6;26616;26598:33;:::i;26642:245::-;26709:6;26762:2;26750:9;26741:7;26737:23;26733:32;26730:52;;;26778:1;26775;26768:12;26730:52;26810:9;26804:16;26829:28;26851:5;26829:28;:::i;26892:973::-;27115:2;27104:9;27097:21;27173:10;27164:6;27158:13;27154:30;27149:2;27138:9;27134:18;27127:58;27239:4;27231:6;27227:17;27221:24;27216:2;27205:9;27201:18;27194:52;27078:4;27293:2;27285:6;27281:15;27275:22;27334:4;27328:3;27317:9;27313:19;27306:33;27362:52;27409:3;27398:9;27394:19;27380:12;27362:52;:::i;:::-;27348:66;;27463:2;27455:6;27451:15;27445:22;-1:-1:-1;;27521:9:42;27513:6;27509:22;27505:95;27498:4;27487:9;27483:20;27476:125;27624:41;27658:6;27642:14;27624:41;:::i;:::-;27734:3;27722:16;;;;27716:23;27709:31;27702:39;27696:3;27681:19;;27674:68;-1:-1:-1;;;;;;;;27803:55:42;;;;27796:4;27781:20;;;27774:85;27610:55;26892:973::o;27870:284::-;27940:5;27988:4;27976:9;27971:3;27967:19;27963:30;27960:50;;;28006:1;28003;27996:12;27960:50;28028:22;;:::i;:::-;28019:31;;28079:9;28073:16;28066:5;28059:31;28143:2;28132:9;28128:18;28122:25;28117:2;28110:5;28106:14;28099:49;27870:284;;;;:::o;28159:259::-;28259:6;28312:2;28300:9;28291:7;28287:23;28283:32;28280:52;;;28328:1;28325;28318:12;28280:52;28351:61;28404:7;28393:9;28351:61;:::i;28548:544::-;28649:2;28644:3;28641:11;28638:448;;;28685:1;28710:5;28706:2;28699:17;28755:4;28751:2;28741:19;28825:2;28813:10;28809:19;28806:1;28802:27;28796:4;28792:38;28861:4;28849:10;28846:20;28843:47;;;-1:-1:-1;28884:4:42;28843:47;28939:2;28934:3;28930:12;28927:1;28923:20;28917:4;28913:31;28903:41;;28994:82;29012:2;29005:5;29002:13;28994:82;;;29057:17;;;29038:1;29027:13;28994:82;;;28998:3;;;28548:544;;;:::o;29328:1467::-;29452:3;29446:10;29479:18;29471:6;29468:30;29465:56;;;29501:18;;:::i;:::-;29530:96;29619:6;29579:38;29611:4;29605:11;29579:38;:::i;:::-;29573:4;29530:96;:::i;:::-;29681:4;;29745:2;29734:14;;29762:1;29757:781;;;;30582:1;30599:6;30596:89;;;-1:-1:-1;30651:19:42;;;30645:26;30596:89;-1:-1:-1;;29225:1:42;29221:11;;;29217:84;29213:89;29203:100;29309:1;29305:11;;;29200:117;30698:81;;29727:1062;;29757:781;28495:1;28488:14;;;28532:4;28519:18;;-1:-1:-1;;29793:79:42;;;29969:236;29983:7;29980:1;29977:14;29969:236;;;30072:19;;;30066:26;30051:42;;30164:27;;;;30132:1;30120:14;;;;29999:19;;29969:236;;;29973:3;30233:6;30224:7;30221:19;30218:261;;;30294:19;;;30288:26;-1:-1:-1;;30377:1:42;30373:14;;;30389:3;30369:24;30365:97;30361:102;30346:118;30331:134;;30218:261;-1:-1:-1;;;;;30525:1:42;30509:14;;;30505:22;30492:36;;-1:-1:-1;29328:1467:42:o;30800:1221::-;31014:4;31043:2;31083;31072:9;31068:18;31113:2;31102:9;31095:21;31136:6;31171;31165:13;31202:6;31194;31187:22;31228:2;31218:12;;31261:2;31250:9;31246:18;31239:25;;31323:2;31313:6;31310:1;31306:14;31295:9;31291:30;31287:39;31361:2;31353:6;31349:15;31382:1;31392:600;31406:6;31403:1;31400:13;31392:600;;;31471:22;;;-1:-1:-1;;31467:95:42;31455:108;;31586:13;;31658:9;;31669:10;31654:26;31639:42;;31728:11;;;31722:18;31742:6;31718:31;31701:15;;;31694:56;31789:11;;31783:18;31622:4;31821:15;;;31814:27;;;31864:48;31896:15;;;31783:18;31864:48;:::i;:::-;31970:12;;;;31854:58;-1:-1:-1;;;31935:15:42;;;;31428:1;31421:9;31392:600;;;-1:-1:-1;32009:6:42;;30800:1221;-1:-1:-1;;;;;;;;30800:1221:42:o;32026:525::-;32130:6;32183:3;32171:9;32162:7;32158:23;32154:33;32151:53;;;32200:1;32197;32190:12;32151:53;32226:22;;:::i;:::-;32277:9;32271:16;32264:5;32257:31;32333:2;32322:9;32318:18;32312:25;32346:32;32370:7;32346:32;:::i;:::-;32405:2;32394:14;;32387:31;32450:70;32512:7;32507:2;32492:18;;32450:70;:::i;:::-;32445:2;32434:14;;32427:94;32438:5;32026:525;-1:-1:-1;;;32026:525:42:o;32556:274::-;32596:1;32622;32612:189;;-1:-1:-1;;;32654:1:42;32647:88;32758:4;32755:1;32748:15;32786:4;32783:1;32776:15;32612:189;-1:-1:-1;32815:9:42;;32556:274::o;32835:168::-;32908:9;;;32939;;32956:15;;;32950:22;;32936:37;32926:71;;32977:18;;:::i;33008:315::-;33128:19;;33167:2;33159:11;;33156:161;;;-1:-1:-1;;33228:2:42;33224:12;;;33221:1;33217:20;33213:93;33202:105;33008:315;;;;:::o;33328:369::-;33486:66;33448:19;;33570:11;;;;33601:1;33593:10;;33590:101;;;33678:2;33672;33665:3;33662:1;33658:11;33655:1;33651:19;33647:28;33643:2;33639:37;33635:46;33626:55;;33590:101;;;33328:369;;;;:::o;33702:652::-;33963:66;33954:6;33949:3;33945:16;33941:89;33936:3;33929:102;34082:66;34073:6;34068:3;34064:16;34060:89;34056:1;34051:3;34047:11;34040:110;34180:6;34175:2;34170:3;34166:12;34159:28;33911:3;34216:6;34210:13;34232:75;34300:6;34295:2;34290:3;34286:12;34279:4;34271:6;34267:17;34232:75;:::i;:::-;34327:16;;;;34345:2;34323:25;;33702:652;-1:-1:-1;;;;;33702:652:42:o;34692:570::-;34933:6;34928:3;34921:19;34992:66;34983:6;34978:3;34974:16;34970:89;34965:2;34960:3;34956:12;34949:111;35090:6;35085:2;35080:3;35076:12;35069:28;34903:3;35126:6;35120:13;35142:73;35208:6;35203:2;35198:3;35194:12;35189:2;35181:6;35177:15;35142:73;:::i;:::-;35235:16;;;;35253:2;35231:25;;34692:570;-1:-1:-1;;;;;34692:570:42:o;35267:251::-;35337:6;35390:2;35378:9;35369:7;35365:23;35361:32;35358:52;;;35406:1;35403;35396:12;35358:52;35438:9;35432:16;35457:31;35482:5;35457:31;:::i;35926:287::-;36055:3;36093:6;36087:13;36109:66;36168:6;36163:3;36156:4;36148:6;36144:17;36109:66;:::i
Swarm Source
ipfs://74d4ee5f7fc27a5854a26252fd66479e35607b9d93e0f1b9925ae88de62ed552
Loading...
Loading
Loading...
Loading
OVERVIEW
Polter is a decentralized non-custodial lending and borrowing platform where depositors earn a percentage of the interest charged for borrowing.Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.