Source Code
Overview
ETH Balance
ETH Value
$2.15 (@ $2,925.78/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 708 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Approve | 599264 | 427 days ago | IN | 0 ETH | 0.00000741 | ||||
| Swap Exact Token... | 580020 | 432 days ago | IN | 0.0001 ETH | 0.00001403 | ||||
| Swap Exact Token... | 510933 | 449 days ago | IN | 0.0001 ETH | 0.00001393 | ||||
| Swap Exact Token... | 481312 | 458 days ago | IN | 0.0001 ETH | 0.00001266 | ||||
| Swap Exact Token... | 481122 | 458 days ago | IN | 0.0001 ETH | 0.00001266 | ||||
| Swap Exact Token... | 470884 | 462 days ago | IN | 0.0001 ETH | 0.00000899 | ||||
| Swap Exact Token... | 470876 | 462 days ago | IN | 0.0001 ETH | 0.00000899 | ||||
| Swap Exact Token... | 454297 | 470 days ago | IN | 0.0001 ETH | 0.00001393 | ||||
| Swap Exact Token... | 454108 | 470 days ago | IN | 0.0001 ETH | 0.00001266 | ||||
| Swap Exact ETH F... | 447935 | 472 days ago | IN | 0.00011 ETH | 0.00000594 | ||||
| Swap Exact Token... | 447264 | 473 days ago | IN | 0.0001 ETH | 0.00000696 | ||||
| Transfer | 432321 | 478 days ago | IN | 0 ETH | 0.00000468 | ||||
| Swap Exact Token... | 423929 | 481 days ago | IN | 0.0001 ETH | 0.00001266 | ||||
| Swap Exact Token... | 413518 | 485 days ago | IN | 0.0001 ETH | 0.00001266 | ||||
| Swap Exact Token... | 398056 | 491 days ago | IN | 0.0001 ETH | 0.00000633 | ||||
| Swap Exact Token... | 387229 | 495 days ago | IN | 0.0001 ETH | 0.00000696 | ||||
| Swap Exact ETH F... | 385497 | 496 days ago | IN | 0.0002 ETH | 0.00001018 | ||||
| Swap Exact ETH F... | 384798 | 496 days ago | IN | 0.0011 ETH | 0.00001189 | ||||
| Swap Exact Token... | 367861 | 502 days ago | IN | 0.0001 ETH | 0.00000728 | ||||
| Swap Exact ETH F... | 362429 | 505 days ago | IN | 0.00067523 ETH | 0.00001018 | ||||
| Swap Exact ETH F... | 347374 | 510 days ago | IN | 0.0011 ETH | 0.00000611 | ||||
| Swap Exact ETH F... | 347373 | 510 days ago | IN | 0.0011 ETH | 0.00000713 | ||||
| Swap Exact Token... | 340701 | 513 days ago | IN | 0.0001 ETH | 0.00000639 | ||||
| Swap Exact Token... | 335680 | 514 days ago | IN | 0.0001 ETH | 0.00000633 | ||||
| Swap Exact Token... | 335671 | 514 days ago | IN | 0.0001 ETH | 0.00000633 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 580022 | 432 days ago | 0.00038964 ETH | ||||
| 580022 | 432 days ago | 0.00038964 ETH | ||||
| 580022 | 432 days ago | 0.00038964 ETH | ||||
| 580022 | 432 days ago | 0.00038964 ETH | ||||
| 580020 | 432 days ago | 0.0001 ETH | ||||
| 510936 | 449 days ago | 0.00039183 ETH | ||||
| 510936 | 449 days ago | 0.00039183 ETH | ||||
| 510936 | 449 days ago | 0.00039183 ETH | ||||
| 510936 | 449 days ago | 0.00039183 ETH | ||||
| 510933 | 449 days ago | 0.0001 ETH | ||||
| 481314 | 458 days ago | 0.00045951 ETH | ||||
| 481314 | 458 days ago | 0.00045951 ETH | ||||
| 481314 | 458 days ago | 0.00045951 ETH | ||||
| 481314 | 458 days ago | 0.00045951 ETH | ||||
| 481312 | 458 days ago | 0.0001 ETH | ||||
| 481124 | 458 days ago | 0.00025366 ETH | ||||
| 481124 | 458 days ago | 0.00025366 ETH | ||||
| 481124 | 458 days ago | 0.00025366 ETH | ||||
| 481124 | 458 days ago | 0.00025366 ETH | ||||
| 481122 | 458 days ago | 0.0001 ETH | ||||
| 470886 | 462 days ago | 0.00029787 ETH | ||||
| 470886 | 462 days ago | 0.00029787 ETH | ||||
| 470886 | 462 days ago | 0.00029787 ETH | ||||
| 470886 | 462 days ago | 0.00029787 ETH | ||||
| 470884 | 462 days ago | 0.0001 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
TokenSlave
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 100 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {SlaveTokenBase} from "./lib/SlaveTokenBase.sol";
contract TokenSlave is SlaveTokenBase {
constructor(
address _vizingPad,
uint64 _masterChainId
) SlaveTokenBase("Orbit Guy", "ORBGUY", _vizingPad, address(0), _masterChainId) {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev 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 {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @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 {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.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.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the 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 override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `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.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageStruct} from "./IMessageStruct.sol";
interface IMessageChannel is IMessageStruct {
/*
/// @notice LaunchPad is the function that user or DApps send omni-chain message to other chain
/// Once the message is sent, the Relay will validate the message and send it to the target chain
/// @dev 1. we will call the LaunchPad.Launch function to emit the message
/// @dev 2. the message will be sent to the destination chain
/// @param earliestArrivalTimestamp The earliest arrival time for the message
/// set to 0, vizing will forward the information ASAP.
/// @param latestArrivalTimestamp The latest arrival time for the message
/// set to 0, vizing will forward the information ASAP.
/// @param relayer the specify relayer for your message
/// set to 0, all the relayers will be able to forward the message
/// @param sender The sender address for the message
/// most likely the address of the EOA, the user of some DApps
/// @param value native token amount, will be sent to the target contract
/// @param destChainid The destination chain id for the message
/// @param additionParams The addition params for the message
/// if not in expert mode, set to 0 (`new bytes(0)`)
/// @param message Arbitrary information
///
/// bytes
/// message = abi.encodePacked(
/// byte1 uint256 uint24 uint64 bytes
/// messageType, activateContract, executeGasLimit, maxFeePerGas, signature
/// )
///
*/
function Launch(
uint64 earliestArrivalTimestamp,
uint64 latestArrivalTimestamp,
address relayer,
address sender,
uint256 value,
uint64 destChainid,
bytes calldata additionParams,
bytes calldata message
) external payable;
///
/// bytes byte1 uint256 uint24 uint64 bytes
/// message = abi.encodePacked(messageType, activateContract, executeGasLimit, maxFeePerGas, signature)
///
function launchMultiChain(
launchEnhanceParams calldata params
) external payable;
/// @notice batch landing message to the chain, execute the landing message
/// @dev trusted relayer will call this function to send omni-chain message to the Station
/// @param params the landing message params
/// @param proofs the proof of the validated message
function Landing(
landingParams[] calldata params,
bytes[][] calldata proofs
) external payable;
/// @notice similar to the Landing function, but with gasLimit
function LandingSpecifiedGas(
landingParams[] calldata params,
uint24 gasLimit,
bytes[][] calldata proofs
) external payable;
/// @dev feel free to call this function before pass message to the Station,
/// this method will return the protocol fee that the message need to pay, longer message will pay more
function estimateGas(
uint256[] calldata value,
uint64[] calldata destChainid,
bytes[] calldata additionParams,
bytes[] calldata message
) external view returns (uint256);
function estimateGas(
uint256 value,
uint64 destChainid,
bytes calldata additionParams,
bytes calldata message
) external view returns (uint256);
function estimatePrice(
address sender,
uint64 destChainid
) external view returns (uint64);
function gasSystemAddr() external view returns (address);
/// @dev get the message launch nonce of the sender on the specific chain
/// @param chainId the chain id of the sender
/// @param sender the address of the sender
function GetNonceLaunch(
uint64 chainId,
address sender
) external view returns (uint32);
/// @dev get the message landing nonce of the sender on the specific chain
/// @param chainId the chain id of the sender
/// @param sender the address of the sender
function GetNonceLanding(
uint64 chainId,
address sender
) external view returns (uint32);
/// @dev get the version of the Station
/// @return the version of the Station, like "v1.0.0"
function Version() external view returns (string memory);
/// @dev get the chainId of current Station
/// @return chainId, defined in the L2SupportLib.sol
function Chainid() external view returns (uint64);
function minArrivalTime() external view returns (uint64);
function maxArrivalTime() external view returns (uint64);
function expertLandingHook(bytes1 hook) external view returns (address);
function expertLaunchHook(bytes1 hook) external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageStruct} from "./IMessageStruct.sol";
interface IMessageDashboard is IMessageStruct {
/// @dev Only owner can call this function to stop or restart the engine
/// @param stop true is stop, false is start
function PauseEngine(bool stop) external;
/// @notice return the states of the engine
/// @return 0x01 is stop, 0x02 is start
function engineState() external view returns (uint8);
/// @notice return the states of the engine & Landing Pad
function padState() external view returns (uint8, uint8);
// function mptRoot() external view returns (bytes32);
/// @dev withdraw the protocol fee from the contract, only owner can call this function
/// @param amount the amount of the withdraw protocol fee
function Withdraw(uint256 amount, address to) external;
/// @dev set the payment system address, only owner can call this function
/// @param gasSystemAddress the address of the payment system
function setGasSystem(address gasSystemAddress) external;
function setExpertLaunchHooks(
bytes1[] calldata ids,
address[] calldata hooks
) external;
function setExpertLandingHooks(
bytes1[] calldata ids,
address[] calldata hooks
) external;
/// notice reset the permission of the contract, only owner can call this function
function roleConfiguration(
bytes32 role,
address[] calldata accounts,
bool[] calldata states
) external;
function stationAdminSetRole(
bytes32 role,
address[] calldata accounts,
bool[] calldata states
) external;
/// @notice transfer the ownership of the contract, only owner can call this function
function transferOwnership(address newOwner) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import "./IMessageSpaceStation.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IMessageEmitter {
function minArrivalTime() external view returns (uint64);
function maxArrivalTime() external view returns (uint64);
function minGasLimit() external view returns (uint24);
function maxGasLimit() external view returns (uint24);
function defaultBridgeMode() external view returns (bytes1);
function selectedRelayer() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageStruct} from "./IMessageStruct.sol";
interface IMessageEvent is IMessageStruct {
/// @notice Throws event after a message which attempts to omni-chain is submitted to LaunchPad contract
event SuccessfulLaunchMessage(
uint32 indexed nonce,
uint64 earliestArrivalTimestamp,
uint64 latestArrivalTimestamp,
address relayer,
address sender,
address srcContract,
uint256 value,
uint64 destChainid,
bytes additionParams,
bytes message
);
/// @notice Throws event after a message which attempts to omni-chain is submitted to LaunchPad contract
event SuccessfulLaunchMultiMessages(
uint32[] indexed nonce,
uint64 earliestArrivalTimestamp,
uint64 latestArrivalTimestamp,
address relayer,
address sender,
address srcContract,
uint256[] value,
uint64[] destChainid,
bytes[] additionParams,
bytes[] message
);
/// @notice Throws event after a omni-chain message is submitted from source chain to target chain
event SuccessfulLanding(bytes32 indexed messageId, landingParams params);
/// @notice Throws event after protocol state is changed, such as pause or resume
event EngineStateRefreshing(bool indexed isPause);
/// @notice Throws event after protocol fee calculation is changed
event PaymentSystemChanging(address indexed gasSystemAddress);
/// @notice Throws event after successful withdrawa
event WithdrawRequest(address indexed to, uint256 amount);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
interface IMessageReceiver {
function receiveStandardMessage(
uint64 srcChainId,
uint256 srcContract,
bytes calldata message
) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageStruct} from "./IMessageStruct.sol";
interface IMessageSimulation is IMessageStruct {
/// @dev for sequencer to simulate the landing message, call this function before call Landing
/// @param params the landing message params
/// check the revert message "SimulateResult" to get the result of the simulation
/// for example, if the result is [true, false, true], it means the first and third message is valid, the second message is invalid
function SimulateLanding(landingParams[] calldata params) external payable;
/// @dev call this function off-chain to estimate the gas of excute the landing message
/// @param params the landing message params
/// @return the result of the estimation, true is valid, false is invalid
function EstimateExecuteGas(
landingParams[] calldata params
) external returns (bool[] memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageStruct} from "./IMessageStruct.sol";
import {IMessageDashboard} from "./IMessageDashboard.sol";
import {IMessageEvent} from "../interface/IMessageEvent.sol";
import {IMessageChannel} from "../interface/IMessageChannel.sol";
import {IMessageSimulation} from "../interface/IMessageSimulation.sol";
interface IMessageSpaceStation is
IMessageStruct,
IMessageDashboard,
IMessageEvent,
IMessageChannel,
IMessageSimulation
{}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
interface IMessageStruct {
struct launchParams {
uint64 earliestArrivalTimestamp;
uint64 latestArrivalTimestamp;
address relayer;
address sender;
uint256 value;
uint64 destChainid;
bytes additionParams;
bytes message;
}
struct landingParams {
bytes32 messageId;
uint64 earliestArrivalTimestamp;
uint64 latestArrivalTimestamp;
uint64 srcChainid;
bytes32 srcTxHash;
uint256 srcContract;
uint32 srcChainNonce;
uint256 sender;
uint256 value;
bytes additionParams;
bytes message;
}
struct launchEnhanceParams {
uint64 earliestArrivalTimestamp;
uint64 latestArrivalTimestamp;
address relayer;
address sender;
uint256[] value;
uint64[] destChainid;
bytes[] additionParams;
bytes[] message;
}
struct RollupMessageStruct {
SignedMessageBase base;
IMessageStruct.launchParams params;
}
struct SignedMessageBase {
uint64 srcChainId;
uint24 nonceLaunch;
bytes32 srcTxHash;
bytes32 destTxHash;
uint64 srcTxTimestamp;
uint64 destTxTimestamp;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
interface IVizingGasSystemChannel {
/*
/// @notice Estimate how many native token we should spend to exchange the amountOut in the destChainid
/// @param destChainid The chain id of the destination chain
/// @param amountOut The value we want to receive in the destination chain
/// @return amountIn the native token amount on the source chain we should spend
*/
function exactOutput(
uint64 destChainid,
uint256 amountOut
) external view returns (uint256 amountIn);
/*
/// @notice Estimate how many native token we could get in the destChainid if we input the amountIn
/// @param destChainid The chain id of the destination chain
/// @param amountIn The value we spent in the source chain
/// @return amountOut the native token amount the destination chain will receive
*/
function exactInput(
uint64 destChainid,
uint256 amountIn
) external view returns (uint256 amountOut);
/*
/// @notice Estimate the gas fee we should pay to vizing
/// @param destChainid The chain id of the destination chain
/// @param message The message we want to send to the destination chain
*/
function estimateGas(
uint256 amountOut,
uint64 destChainid,
bytes calldata message
) external view returns (uint256);
/*
/// @notice Estimate the gas fee & native token we should pay to vizing
/// @param amountOut amountOut in the destination chain
/// @param destChainid The chain id of the destination chain
/// @param message The message we want to send to the destination chain
*/
function batchEstimateTotalFee(
uint256[] calldata amountOut,
uint64[] calldata destChainid,
bytes[] calldata message
) external view returns (uint256 totalFee);
/*
/// @notice Estimate the total fee we should pay to vizing
/// @param value The value we spent in the source chain
/// @param destChainid The chain id of the destination chain
/// @param message The message we want to send to the destination chain
*/
function estimateTotalFee(
uint256 value,
uint64 destChainid,
bytes calldata message
) external view returns (uint256 totalFee);
/*
/// @notice Estimate the gas price we need to encode in message
/// @param sender most likely the address of the DApp, which forward the message from user
/// @param destChainid The chain id of the destination chain
*/
function estimatePrice(
address targetContract,
uint64 destChainid
) external view returns (uint64);
/*
/// @notice Estimate the gas price we need to encode in message
/// @param destChainid The chain id of the destination chain
*/
function estimatePrice(uint64 destChainid) external view returns (uint64);
/*
/// @notice Calculate the fee for the native token transfer
/// @param amount The value we spent in the source chain
*/
function computeTradeFee(
uint64 destChainid,
uint256 amountOut
) external view returns (uint256 fee);
/*
/// @notice Calculate the fee for the native token transfer
/// @param amount The value we spent in the source chain
*/
function computeTradeFee(
address targetContract,
uint64 destChainid,
uint256 amountOut
) external view returns (uint256 fee);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
library MessageTypeLib {
bytes1 constant DEFAULT = 0x00;
/* ********************* message type **********************/
bytes1 constant STANDARD_ACTIVATE = 0x01;
bytes1 constant ARBITRARY_ACTIVATE = 0x02;
bytes1 constant MESSAGE_POST = 0x03;
bytes1 constant NATIVE_TOKEN_SEND = 0x04;
/**
* additionParams type *********************
*/
// Single-Send mode
bytes1 constant SINGLE_SEND = 0x01;
bytes1 constant ERC20_HANDLER = 0x03;
bytes1 constant MULTI_MANY_2_ONE = 0x04;
bytes1 constant MULTI_UNIVERSAL = 0x05;
bytes1 constant MAX_MODE = 0xFF;
function fetchMsgMode(
bytes calldata message
) internal pure returns (bytes1) {
if (message.length < 1) {
return DEFAULT;
}
bytes1 messageSlice = bytes1(message[0:1]);
return messageSlice;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageStruct} from "./interface/IMessageStruct.sol";
import {IMessageChannel} from "./interface/IMessageChannel.sol";
import {IMessageEmitter} from "./interface/IMessageEmitter.sol";
import {IMessageReceiver} from "./interface/IMessageReceiver.sol";
import {IVizingGasSystemChannel} from "./interface/IVizingGasSystemChannel.sol";
abstract contract MessageEmitter is IMessageEmitter {
/// @dev bellow are the default parameters for the OmniToken,
/// we **Highly recommended** to use immutable variables to store these parameters
/// @notice minArrivalTime the minimal arrival timestamp for the omni-chain message
/// @notice maxArrivalTime the maximal arrival timestamp for the omni-chain message
/// @notice minGasLimit the minimal gas limit for target chain execute omni-chain message
/// @notice maxGasLimit the maximal gas limit for target chain execute omni-chain message
/// @notice defaultBridgeMode the default mode for the omni-chain message,
/// in OmniToken, we use MessageTypeLib.ARBITRARY_ACTIVATE (0x02), target chain will **ACTIVATE** the message
/// @notice selectedRelayer the specify relayer for your message
/// set to 0, all the relayers will be able to forward the message
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
function minArrivalTime() external view virtual override returns (uint64) {}
function maxArrivalTime() external view virtual override returns (uint64) {}
function minGasLimit() external view virtual override returns (uint24) {}
function maxGasLimit() external view virtual override returns (uint24) {}
function defaultBridgeMode()
external
view
virtual
override
returns (bytes1)
{}
function selectedRelayer()
external
view
virtual
override
returns (address)
{}
IMessageChannel public LaunchPad;
constructor(address _LaunchPad) {
__LaunchPadInit(_LaunchPad);
}
/*
/// rewrite set LaunchPad address function
/// @notice call this function to reset the LaunchPad contract address
/// @param _LaunchPad The new LaunchPad contract address
*/
function __LaunchPadInit(address _LaunchPad) internal virtual {
LaunchPad = IMessageChannel(_LaunchPad);
}
/*
/// @notice call this function to packet the message before sending it to the LandingPad contract
/// @param mode the emitter mode, check MessageTypeLib.sol for more details
/// eg: 0x02 for ARBITRARY_ACTIVATE, your message will be activated on the target chain
/// @param gasLimit the gas limit for executing the specific function on the target contract
/// @param targetContract the target contract address on the destination chain
/// @param message the message to be sent to the target contract
/// @return the packed message
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _packetMessage(
bytes1 mode,
address targetContract,
uint24 gasLimit,
uint64 price,
bytes memory message
) internal pure returns (bytes memory) {
return
abi.encodePacked(
mode,
uint256(uint160(targetContract)),
gasLimit,
price,
message
);
}
/*
/// @notice use this function to send the ERC20 token to the destination chain
/// @param tokenSymbol The token symbol
/// @param sender The sender address for the message
/// @param receiver The receiver address for the message
/// @param amount The amount of tokens to be sent
/// see https://docs.vizing.com/docs/DApp/Omni-ERC20-Transfer
*/
function _packetAdditionParams(
bytes1 mode,
bytes1 tokenSymbol,
address sender,
address receiver,
uint256 amount
) internal pure returns (bytes memory) {
return abi.encodePacked(mode, tokenSymbol, sender, receiver, amount);
}
/*
/// @notice Calculate the amount of native tokens obtained on the target chain
/// @param value The value we send to vizing on the source chain
*/
function _computeTradeFee(
uint64 destChainid,
uint256 value
) internal view returns (uint256 amountIn) {
return
IVizingGasSystemChannel(LaunchPad.gasSystemAddr()).computeTradeFee(
destChainid,
value
);
}
/*
/// @notice Fetch the nonce of the user with specific destination chain
/// @param destChainid The chain id of the destination chain
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _fetchNonce(
uint64 destChainid
) internal view virtual returns (uint32 nonce) {
nonce = LaunchPad.GetNonceLaunch(destChainid, msg.sender);
}
/*
/// @notice Estimate the gas price we need to encode in message
/// @param destChainid The chain id of the destination chain
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _fetchPrice(
uint64 destChainid
) internal view virtual returns (uint64) {
return
IVizingGasSystemChannel(LaunchPad.gasSystemAddr()).estimatePrice(
destChainid
);
}
/*
/// @notice Estimate the gas price we need to encode in message
/// @param targetContract The target contract address on the destination chain
/// @param destChainid The chain id of the destination chain
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _fetchPrice(
address targetContract,
uint64 destChainid
) internal view virtual returns (uint64) {
return
IVizingGasSystemChannel(LaunchPad.gasSystemAddr()).estimatePrice(
targetContract,
destChainid
);
}
/*
/// @notice similar to uniswap Swap Router
/// @notice Estimate how many native token we should spend to exchange the amountOut in the destChainid
/// @param destChainid The chain id of the destination chain
/// @param amountOut The value we want to exchange in the destination chain
/// @return amountIn the native token amount on the source chain we should spend
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _exactOutput(
uint64 destChainid,
uint256 amountOut
) internal view returns (uint256 amountIn) {
return
IVizingGasSystemChannel(LaunchPad.gasSystemAddr()).exactOutput(
destChainid,
amountOut
);
}
/*
/// @notice similar to uniswap Swap Router
/// @notice Estimate how many native token we could get in the destChainid if we input the amountIn
/// @param destChainid The chain id of the destination chain
/// @param amountIn The value we spent in the source chain
/// @return amountOut the native token amount the destination chain will receive
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _exactInput(
uint64 destChainid,
uint256 amountIn
) internal view returns (uint256 amountOut) {
return
IVizingGasSystemChannel(LaunchPad.gasSystemAddr()).exactInput(
destChainid,
amountIn
);
}
/*
/// @notice Estimate the gas price we need to encode in message
/// @param value The native token that value target address will receive in the destination chain
/// @param destChainid The chain id of the destination chain
/// @param additionParams The addition params for the message
/// if not in expert mode, set to 0 (`new bytes(0)`)
/// @param message The message we want to send to the destination chain
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function _estimateVizingGasFee(
uint256 value,
uint64 destChainid,
bytes memory additionParams,
bytes memory message
) internal view returns (uint256 vizingGasFee) {
return
LaunchPad.estimateGas(value, destChainid, additionParams, message);
}
/*
/// @notice **Highly recommend** to call this function in your frontend program
/// @notice Estimate the gas price we need to encode in message
/// @param value The native token that value target address will receive in the destination chain
/// @param destChainid The chain id of the destination chain
/// @param additionParams The addition params for the message
/// if not in expert mode, set to 0 (`new bytes(0)`)
/// @param message The message we want to send to the destination chain
/// see https://docs.vizing.com/docs/BuildOnVizing/Contract
*/
function estimateVizingGasFee(
uint256 value,
uint64 destChainid,
bytes calldata additionParams,
bytes calldata message
) external view returns (uint256 vizingGasFee) {
return
_estimateVizingGasFee(value, destChainid, additionParams, message);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {IMessageChannel} from "./interface/IMessageChannel.sol";
import {IMessageReceiver} from "./interface/IMessageReceiver.sol";
abstract contract MessageReceiver is IMessageReceiver {
error LandingPadAccessDenied();
error NotImplement();
IMessageChannel public LandingPad;
modifier onlyVizingPad() {
if (msg.sender != address(LandingPad)) revert LandingPadAccessDenied();
_;
}
constructor(address _LandingPad) {
__LandingPadInit(_LandingPad);
}
/*
/// rewrite set LandingPad address function
/// @notice call this function to reset the LaunchPad contract address
/// @param _LaunchPad The new LaunchPad contract address
*/
function __LandingPadInit(address _LandingPad) internal virtual {
LandingPad = IMessageChannel(_LandingPad);
}
/// @notice the standard function to receive the omni-chain message
function receiveStandardMessage(
uint64 srcChainId,
uint256 srcContract,
bytes calldata message
) external payable virtual override onlyVizingPad {
_receiveMessage(srcChainId, srcContract, message);
}
/// @dev override this function to handle the omni-chain message
/// @param srcChainId the source chain id
/// @param srcContract the source contract address
/// @param message the message from the source chain
function _receiveMessage(
uint64 srcChainId,
uint256 srcContract,
bytes calldata message
) internal virtual {
(srcChainId, srcContract, message);
revert NotImplement();
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import {MessageEmitter} from "./MessageEmitter.sol";
import {MessageReceiver} from "./MessageReceiver.sol";
abstract contract VizingOmni is MessageEmitter, MessageReceiver {
constructor(
address _vizingPad
) MessageEmitter(_vizingPad) MessageReceiver(_vizingPad) {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {VizingOmni} from "@vizing/contracts/VizingOmni.sol";
import {MessageTypeLib} from "@vizing/contracts/library/MessageTypeLib.sol";
import "./ExcessivelySafeCall.sol";
import "./NonblockingApp.sol";
abstract contract ERC314PlusCore is ERC20, Ownable, ReentrancyGuard, VizingOmni, NonblockingApp {
using ExcessivelySafeCall for address;
enum ActionType {
deposit,
launch,
claimPing,
claimPong,
buyPing,
buyPong,
sellPing,
sellPong
}
struct DebitAmount {
uint native;
uint token;
}
event MessageReceived(uint64 _srcChainId, address _srcAddress, uint value, bytes _payload);
event PongfeeFailed(uint64 _srcChainId, address _srcAddress, uint8 _action, uint _pongFee, uint _expectPongFee);
event Launch(
address indexed _sender,
uint _native,
uint _token,
uint _presaleToken,
uint _refundNative,
address _feeAddr
);
event Swap(address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out);
uint64 public immutable override minArrivalTime;
uint64 public immutable override maxArrivalTime;
uint24 public immutable override minGasLimit;
uint24 public immutable override maxGasLimit;
bytes1 public immutable override defaultBridgeMode;
address public immutable override selectedRelayer;
uint64 public masterChainId;
bool public launched;
uint public messageReceived;
address public feeAddress;
mapping(address => uint) public deposited; //local chain deposited address=>amount
mapping(address => bool) public claimed;
uint MAX_INT = 2 ** 256 - 1;
constructor(
string memory _name,
string memory _symbol,
address _vizingPad,
uint64 _masterChainId
) VizingOmni(_vizingPad) ERC20(_name, _symbol) {
masterChainId = _masterChainId;
launched = false;
defaultBridgeMode = MessageTypeLib.STANDARD_ACTIVATE;
}
//----vizing bridge common----
function paramsEstimateGas(
uint64 dstChainId,
address dstContract,
uint value,
bytes memory params
) public view virtual returns (uint) {
bytes memory message = _packetMessage(
defaultBridgeMode,
dstContract,
maxGasLimit,
_fetchPrice(dstContract, dstChainId),
abi.encode(_msgSender(), params)
);
return LaunchPad.estimateGas(value, dstChainId, new bytes(0), message);
}
function paramsEmit2LaunchPad(
uint bridgeFee,
uint64 dstChainId,
address dstContract,
uint value,
bytes memory params,
address sender
) internal virtual {
bytes memory message = _packetMessage(
defaultBridgeMode,
dstContract,
maxGasLimit,
_fetchPrice(dstContract, dstChainId),
abi.encode(_msgSender(), params)
);
/*
emit2LaunchPad(
0, //uint64(block.timestamp + minArrivalTime),
0, //uint64(block.timestamp + maxArrivalTime),
selectedRelayer,
sender,
value,
dstChainId,
new bytes(0),
message
);
*/
uint bridgeValue = value + bridgeFee;
require(msg.value >= bridgeValue, "bridgeFee err.");
LaunchPad.Launch{value: bridgeValue}(0, 0, selectedRelayer, sender, value, dstChainId, new bytes(0), message);
}
//---- message call function----
function master_deposit(
uint pongFee,
uint64 srcChainId,
address sender,
address target,
uint amount
) internal virtual {
revert NotImplement();
}
function master_claim(uint pongFee, uint64 srcChainId, address sender, address target) internal virtual {
revert NotImplement();
}
function master_buy(uint pongFee, uint64 srcChainId, address sender, address target, uint native) internal virtual {
revert NotImplement();
}
function master_sell(uint pongFee, uint64 srcChainId, address sender, address target, uint token) internal virtual {
revert NotImplement();
}
function slave_launch(uint64 srcChainId, address sender) internal virtual {
revert NotImplement();
}
function slave_deposit(uint64 srcChainId, address sender, address target, uint amount) internal virtual {
revert NotImplement();
}
function slave_claim(uint64 srcChainId, address sender, address target, uint native, uint token) internal virtual {
revert NotImplement();
}
function slave_buy(uint64 srcChainId, address sender, address target, uint native, uint token) internal virtual {
revert NotImplement();
}
function slave_sell(uint64 srcChainId, address sender, address target, uint native, uint token) internal virtual {
revert NotImplement();
}
function action_master(
uint64 srcChainId,
address sender,
uint8 action,
uint pongFee,
bytes memory params
) internal virtual {
if (action == uint8(ActionType.deposit)) {
(address target, uint amount) = abi.decode(params, (address, uint));
master_deposit(pongFee, srcChainId, sender, target, amount);
} else if (action == uint8(ActionType.claimPing)) {
address target = abi.decode(params, (address));
master_claim(pongFee, srcChainId, sender, target);
} else if (action == uint8(ActionType.buyPing)) {
(address target, uint native) = abi.decode(params, (address, uint));
master_buy(pongFee, srcChainId, sender, target, native);
} else if (action == uint8(ActionType.sellPing)) {
(address target, uint token) = abi.decode(params, (address, uint));
master_sell(pongFee, srcChainId, sender, target, token);
} else revert NotImplement();
}
function action_slave(
uint64 srcChainId,
address sender,
uint8 action,
uint pongFee,
bytes memory params
) internal virtual {
if (action == uint8(ActionType.deposit)) {
(address target, uint amount) = abi.decode(params, (address, uint));
slave_deposit(srcChainId, sender, target, amount);
} else if (action == uint8(ActionType.claimPong)) {
(address target, uint native, uint token) = abi.decode(params, (address, uint, uint));
slave_claim(srcChainId, sender, target, native, token);
} else if (action == uint8(ActionType.buyPong)) {
(address target, uint native, uint token) = abi.decode(params, (address, uint, uint));
slave_buy(srcChainId, sender, target, native, token);
} else if (action == uint8(ActionType.sellPong)) {
(address target, uint token, uint native) = abi.decode(params, (address, uint, uint));
slave_sell(srcChainId, sender, target, native, token);
} else if (action == uint8(ActionType.launch)) {
slave_launch(srcChainId, sender);
} else revert NotImplement();
}
//---- message----
function _computePongValueWithOutPongFee(
uint8 action,
uint64 srcChainId,
uint pongFee,
bytes memory params
) internal view virtual returns (uint value, uint sendToFee) {
value = msg.value - pongFee;
sendToFee = 0;
}
function _nonblockingReceive(
uint64 srcChainId,
address sender,
uint8 action,
uint pongFee,
bytes calldata params
) public payable virtual override {
require(_msgSender() == address(this), "ERC314PlusCore: caller must be self");
if (srcChainId == masterChainId) action_slave(srcChainId, sender, action, pongFee, params);
else action_master(srcChainId, sender, action, pongFee, params);
}
function _callSelf(
uint64 srcChainId,
address sender,
uint8 action,
uint pongFee,
uint callValue,
bytes memory params
) internal returns (bool success, bytes memory reason) {
(success, reason) = address(this).excessivelySafeCall(
gasleft(),
callValue,
150,
abi.encodeWithSelector(this._nonblockingReceive.selector, srcChainId, sender, action, pongFee, params)
);
}
function verifySource(uint64 srcChainId, address srcContract) internal view virtual returns (bool authorized);
function _receiveMessage(
uint64 srcChainId,
uint256 srcContract,
bytes calldata _payload
) internal virtual override {
require(verifySource(srcChainId, address(uint160(srcContract))), "unauthorized.");
(address sender, bytes memory message) = abi.decode(_payload, (address, bytes));
messageReceived += 1;
emit MessageReceived(srcChainId, sender, msg.value, message);
(uint8 action, uint pongFee, bytes memory params) = abi.decode(message, (uint8, uint, bytes));
(uint value, uint sendToFee) = _computePongValueWithOutPongFee(action, srcChainId, pongFee, params);
uint callValue = pongFee + value - sendToFee;
if (sendToFee > 0) payable(feeAddress).transfer(sendToFee);
(bool success, bytes memory reason) = _callSelf(srcChainId, sender, action, pongFee, callValue, params);
if (!success) {
_storeFailedMessage(srcChainId, sender, message, reason, callValue);
}
}
//---- interface ----
function deposit(uint pongFee, uint amount) public payable virtual;
function claim(uint pongFee) public payable virtual;
function swapExactETHForTokens(uint pongFee, address to, uint deadline) external payable virtual;
function swapExactTokensForETH(uint pongFee, uint amountIn, address to, uint deadline) external payable virtual;
function _transfer(address from, address to, uint256 amount) internal virtual override {
if (_msgSender() != address(this) && to == address(this)) {
revert("Unsupported");
} else {
super._transfer(from, to, amount);
}
}
//----Signature---
/*
function _fetchSignature(bytes memory message) internal view virtual returns (bytes memory signature) {
//signature = abi.encodeCall(this.receiveMessage, (deployChainId, address(this), msg.sender, message));
signature = message;
}
*/
function _depositPingPongSignature(
address target,
uint pongFee,
uint amount
) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.deposit), pongFee, abi.encode(target, amount));
}
function _claimPingSignature(address target, uint pongFee) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.claimPing), pongFee, abi.encode(target));
}
function _claimPongSignature(
address target,
uint refund,
uint amount
) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.claimPong), 0, abi.encode(target, refund, amount));
}
function _buyPingSignature(
address target,
uint pongFee,
uint amountIn
) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.buyPing), pongFee, abi.encode(target, amountIn));
}
function _buyPongSignature(address target, uint native, uint token) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.buyPong), 0, abi.encode(target, native, token));
}
function _sellPingSignature(
address target,
uint pongFee,
uint amountIn
) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.sellPing), pongFee, abi.encode(target, amountIn));
}
function _sellPongSignature(address target, uint native, uint token) internal view virtual returns (bytes memory) {
return abi.encode(uint8(ActionType.sellPong), 0, abi.encode(target, native, token));
}
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.7.6;
library ExcessivelySafeCall {
uint256 constant LOW_28_MASK = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
/// @notice Use when you _really_ really _really_ don't trust the called
/// contract. This prevents the called contract from causing reversion of
/// the caller in as many ways as we can.
/// @dev The main difference between this and a solidity low-level call is
/// that we limit the number of bytes that the callee can cause to be
/// copied to caller memory. This prevents stupid things like malicious
/// contracts returning 10,000,000 bytes causing a local OOG when copying
/// to memory.
/// @param _target The address to call
/// @param _gas The amount of gas to forward to the remote contract
/// @param _value The value in wei to send to the remote contract
/// @param _maxCopy The maximum number of bytes of returndata to copy
/// to memory.
/// @param _calldata The data to send to the remote contract
/// @return success and returndata, as `.call()`. Returndata is capped to
/// `_maxCopy` bytes.
function excessivelySafeCall(
address _target,
uint256 _gas,
uint256 _value,
uint16 _maxCopy,
bytes memory _calldata
) internal returns (bool, bytes memory) {
// set up for assembly call
uint256 _toCopy;
bool _success;
bytes memory _returnData = new bytes(_maxCopy);
// dispatch message to recipient
// by assembly calling "handle" function
// we call via assembly to avoid memcopying a very large returndata
// returned by a malicious contract
assembly {
_success := call(
_gas, // gas
_target, // recipient
_value, // ether value
add(_calldata, 0x20), // inloc
mload(_calldata), // inlen
0, // outloc
0 // outlen
)
// limit our copy to 256 bytes
_toCopy := returndatasize()
if gt(_toCopy, _maxCopy) {
_toCopy := _maxCopy
}
// Store the length of the copied bytes
mstore(_returnData, _toCopy)
// copy the bytes from returndata[0:_toCopy]
returndatacopy(add(_returnData, 0x20), 0, _toCopy)
}
return (_success, _returnData);
}
/// @notice Use when you _really_ really _really_ don't trust the called
/// contract. This prevents the called contract from causing reversion of
/// the caller in as many ways as we can.
/// @dev The main difference between this and a solidity low-level call is
/// that we limit the number of bytes that the callee can cause to be
/// copied to caller memory. This prevents stupid things like malicious
/// contracts returning 10,000,000 bytes causing a local OOG when copying
/// to memory.
/// @param _target The address to call
/// @param _gas The amount of gas to forward to the remote contract
/// @param _maxCopy The maximum number of bytes of returndata to copy
/// to memory.
/// @param _calldata The data to send to the remote contract
/// @return success and returndata, as `.call()`. Returndata is capped to
/// `_maxCopy` bytes.
function excessivelySafeStaticCall(
address _target,
uint256 _gas,
uint16 _maxCopy,
bytes memory _calldata
) internal view returns (bool, bytes memory) {
// set up for assembly call
uint256 _toCopy;
bool _success;
bytes memory _returnData = new bytes(_maxCopy);
// dispatch message to recipient
// by assembly calling "handle" function
// we call via assembly to avoid memcopying a very large returndata
// returned by a malicious contract
assembly {
_success := staticcall(
_gas, // gas
_target, // recipient
add(_calldata, 0x20), // inloc
mload(_calldata), // inlen
0, // outloc
0 // outlen
)
// limit our copy to 256 bytes
_toCopy := returndatasize()
if gt(_toCopy, _maxCopy) {
_toCopy := _maxCopy
}
// Store the length of the copied bytes
mstore(_returnData, _toCopy)
// copy the bytes from returndata[0:_toCopy]
returndatacopy(add(_returnData, 0x20), 0, _toCopy)
}
return (_success, _returnData);
}
/**
* @notice Swaps function selectors in encoded contract calls
* @dev Allows reuse of encoded calldata for functions with identical
* argument types but different names. It simply swaps out the first 4 bytes
* for the new selector. This function modifies memory in place, and should
* only be used with caution.
* @param _newSelector The new 4-byte selector
* @param _buf The encoded contract args
*/
function swapSelector(bytes4 _newSelector, bytes memory _buf) internal pure {
require(_buf.length >= 4);
uint256 _mask = LOW_28_MASK;
assembly {
// load the first word of
let _word := mload(add(_buf, 0x20))
// mask out the top 4 bytes
// /x
_word := and(_word, _mask)
_word := or(_newSelector, _word)
mstore(add(_buf, 0x20), _word)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ExcessivelySafeCall.sol";
abstract contract NonblockingApp {
//mapping(uint64 => mapping(address => bytes32)) public failedMessages;
uint public messageFailed;
event MessageFailed(
uint64 _srcChainId,
address _srcAddress,
bytes _payload,
bytes _reason,
uint _value,
uint _callValue
);
event RetryMessageSuccess(uint64 _srcChainId, address _srcAddress, bytes32 _payloadHash);
function _nonblockingReceive(
uint64 srcChainId,
address sender,
uint8 action,
uint pongFee,
bytes calldata message
) public payable virtual;
function _storeFailedMessage(
uint64 _srcChainId,
address _srcAddress,
bytes memory _payload,
bytes memory _reason,
uint _callValue
) internal virtual {
messageFailed += 1;
//failedMessages[_srcChainId][_srcAddress] = keccak256(_payload);
emit MessageFailed(_srcChainId, _srcAddress, _payload, _reason, msg.value, _callValue);
}
/*
function retryMessage(uint64 _srcChainId, address _srcAddress, bytes calldata _payload) public payable virtual {
// assert there is message to retry
bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress];
require(payloadHash != bytes32(0), "NonblockingApp: no stored message");
require(keccak256(_payload) == payloadHash, "NonblockingApp: invalid payload");
// clear the stored message
failedMessages[_srcChainId][_srcAddress] = bytes32(0);
// execute the message. revert if it fails again
_nonblockingReceive(_srcChainId, _srcAddress, _payload);
emit RetryMessageSuccess(_srcChainId, _srcAddress, payloadHash);
}
*/
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ERC314PlusCore} from "./ERC314PlusCore.sol";
import {IMessageStruct} from "@vizing/contracts/interface/IMessageStruct.sol";
contract SlaveTokenBase is ERC314PlusCore {
address public masterContract;
constructor(
string memory _name,
string memory _symbol,
address _vizingPad,
address _defaultRelayer,
uint64 _masterChainId
) ERC314PlusCore(_name, _symbol, _vizingPad, _masterChainId) {
minArrivalTime = 1 minutes;
maxArrivalTime = 1 days;
minGasLimit = 100000;
maxGasLimit = 1000000;
selectedRelayer = _defaultRelayer;
}
function setMasterContract(address addr) public virtual onlyOwner {
masterContract = addr;
}
function verifySource(
uint64 srcChainId,
address srcContract
) internal view virtual override returns (bool authorized) {
return masterContract == srcContract && masterChainId == srcChainId;
}
//----slave call
function slave_launch(uint64 srcChainId, address sender) internal virtual override {
launched = true;
}
function slave_deposit(uint64 srcChainId, address sender, address target, uint amount) internal virtual override {
deposited[target] += amount;
}
function slave_claim(
uint64 srcChainId,
address sender,
address target,
uint native,
uint token
) internal virtual override {
if (token > 0) _mint(target, token);
if (native > 0) payable(target).transfer(native);
claimed[target] = true;
}
function slave_buy(
uint64 srcChainId,
address sender,
address target,
uint native,
uint token
) internal virtual override {
if (token > 0) _mint(target, token);
if (native > 0) payable(target).transfer(native);
}
function slave_sell(
uint64 srcChainId,
address sender,
address target,
uint native,
uint token
) internal virtual override {
if (token > 0) _mint(target, token);
if (native > 0) payable(target).transfer(native);
}
//----deposit
function depositPingEstimateGas(
uint pongFee,
address target,
uint amount
) public view virtual returns (uint pingFee) {
pingFee = paramsEstimateGas(
masterChainId,
masterContract,
amount + pongFee,
_depositPingPongSignature(target, pongFee, amount)
);
}
function deposit(uint pongFee, uint amount) public payable virtual override nonReentrant {
require(!launched, "launched");
uint pingFee = depositPingEstimateGas(pongFee, _msgSender(), amount);
require(msg.value >= amount + pingFee + pongFee, "bridge fee not enough");
paramsEmit2LaunchPad(
pingFee,
masterChainId,
masterContract,
amount + pongFee,
_depositPingPongSignature(_msgSender(), pongFee, amount),
_msgSender()
);
}
//----claim
function claimPingEstimateGas(uint pongFee, address target) public view virtual returns (uint pingFee) {
pingFee = paramsEstimateGas(masterChainId, masterContract, pongFee, _claimPingSignature(target, pongFee));
}
function claim(uint pongFee) public payable virtual override nonReentrant {
require(launched, "unlaunched");
require(!claimed[_msgSender()], "claimed");
uint pingFee = claimPingEstimateGas(pongFee, _msgSender());
require(msg.value >= pingFee + pongFee, "bridge fee not enough");
paramsEmit2LaunchPad(
pingFee,
masterChainId,
masterContract,
pongFee,
_claimPingSignature(_msgSender(), pongFee),
_msgSender()
);
}
//----_buy
function buyPingEstimateGas(
uint pongFee,
address target,
uint amountIn
) public view virtual returns (uint pingFee) {
pingFee = paramsEstimateGas(
masterChainId,
masterContract,
pongFee,
_buyPingSignature(target, pongFee, amountIn)
);
}
function _buy(uint pongFee, address to, uint deadline) internal {
require(launched, "unlaunched");
require(deadline == 0 || deadline > block.timestamp, "deadline err.");
uint pingFee = buyPingEstimateGas(pongFee, to, msg.value);
uint amountIn = msg.value - pingFee - pongFee;
require(amountIn > 0, "amount in err.");
paramsEmit2LaunchPad(
pingFee,
masterChainId,
masterContract,
amountIn + pongFee,
_buyPingSignature(to, pongFee, amountIn),
_msgSender()
);
}
//----_sell
function sellPingEstimateGas(
uint pongFee,
address target,
uint amountIn
) public view virtual returns (uint pingFee) {
pingFee = paramsEstimateGas(
masterChainId,
masterContract,
pongFee,
_sellPingSignature(target, pongFee, amountIn)
);
}
function _sell(uint pongFee, address from, address to, uint amountIn, uint deadline) internal {
require(launched, "unlaunched");
require(amountIn > 0, "amount in err.");
require(deadline == 0 || deadline > block.timestamp, "deadline err.");
require(balanceOf(from) >= amountIn, "sell amount exceeds balance");
uint pingFee = sellPingEstimateGas(pongFee, to, amountIn);
require(msg.value >= pingFee + pongFee, "bridge fee not enough");
_burn(from, amountIn);
paramsEmit2LaunchPad(
pingFee,
masterChainId,
masterContract,
pongFee,
_sellPingSignature(to, pongFee, amountIn),
_msgSender()
);
}
//----314token
function getReserves() public view returns (uint, uint) {
revert NotImplement();
}
function getAmountOut(uint value, bool isBuy) public view returns (uint) {
revert NotImplement();
}
function swapExactETHForTokens(
uint pongFee,
address to,
uint deadline
) external payable virtual override nonReentrant {
_buy(pongFee, to, deadline);
}
function swapExactTokensForETH(
uint pongFee,
uint amountIn,
address to,
uint deadline
) external payable virtual override nonReentrant {
_sell(pongFee, _msgSender(), to, amountIn, deadline);
}
receive() external payable {
//_buy(_msgSender(), block.timestamp);
}
function withdrawFee(address to, uint amount) public onlyOwner {
payable(to).transfer(amount);
}
}{
"optimizer": {
"enabled": true,
"runs": 100
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_vizingPad","type":"address"},{"internalType":"uint64","name":"_masterChainId","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"LandingPadAccessDenied","type":"error"},{"inputs":[],"name":"NotImplement","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_native","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_token","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_presaleToken","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_refundNative","type":"uint256"},{"indexed":false,"internalType":"address","name":"_feeAddr","type":"address"}],"name":"Launch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"_srcChainId","type":"uint64"},{"indexed":false,"internalType":"address","name":"_srcAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_reason","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_callValue","type":"uint256"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"_srcChainId","type":"uint64"},{"indexed":false,"internalType":"address","name":"_srcAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"MessageReceived","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":"uint64","name":"_srcChainId","type":"uint64"},{"indexed":false,"internalType":"address","name":"_srcAddress","type":"address"},{"indexed":false,"internalType":"uint8","name":"_action","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"_pongFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_expectPongFee","type":"uint256"}],"name":"PongfeeFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"_srcChainId","type":"uint64"},{"indexed":false,"internalType":"address","name":"_srcAddress","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"RetryMessageSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"}],"name":"Swap","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":"LandingPad","outputs":[{"internalType":"contract IMessageChannel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LaunchPad","outputs":[{"internalType":"contract IMessageChannel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"srcChainId","type":"uint64"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint8","name":"action","type":"uint8"},{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"_nonblockingReceive","outputs":[],"stateMutability":"payable","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":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"buyPingEstimateGas","outputs":[{"internalType":"uint256","name":"pingFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"address","name":"target","type":"address"}],"name":"claimPingEstimateGas","outputs":[{"internalType":"uint256","name":"pingFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultBridgeMode","outputs":[{"internalType":"bytes1","name":"","type":"bytes1"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositPingEstimateGas","outputs":[{"internalType":"uint256","name":"pingFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint64","name":"destChainid","type":"uint64"},{"internalType":"bytes","name":"additionParams","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"estimateVizingGasFee","outputs":[{"internalType":"uint256","name":"vizingGasFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bool","name":"isBuy","type":"bool"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"launched","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterChainId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxArrivalTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxGasLimit","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageFailed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minArrivalTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minGasLimit","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"dstChainId","type":"uint64"},{"internalType":"address","name":"dstContract","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"paramsEstimateGas","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"srcChainId","type":"uint64"},{"internalType":"uint256","name":"srcContract","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"receiveStandardMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"selectedRelayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"sellPingEstimateGas","outputs":[{"internalType":"uint256","name":"pingFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setMasterContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pongFee","type":"uint256"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
610140604052600019600f553480156200001857600080fd5b5060405162003208380380620032088339810160408190526200003b91620001b9565b604051806040016040528060098152602001684f726269742047757960b81b815250604051806040016040528060068152602001654f524247555960d01b8152508360008484848483818081868681600390816200009a9190620002b5565b506004620000a98282620002b5565b505050620000c6620000c06200016360201b60201c565b62000167565b6001600655600780546001600160a01b0319166001600160a01b03831617905550600880546001600160a01b0319166001600160a01b0383161790555050600a80546001600160481b0319166001600160401b039092169190911790555050600160f81b610100525050603c6080526201518060a052620186a060c052620f424060e0526001600160a01b03166101205250620003819350505050565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008060408385031215620001cd57600080fd5b82516001600160a01b0381168114620001e557600080fd5b60208401519092506001600160401b03811681146200020357600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200023957607f821691505b6020821081036200025a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002b0576000816000526020600020601f850160051c810160208610156200028b5750805b601f850160051c820191505b81811015620002ac5782815560010162000297565b5050505b505050565b81516001600160401b03811115620002d157620002d16200020e565b620002e981620002e2845462000224565b8462000260565b602080601f831160018114620003215760008415620003085750858301515b600019600386901b1c1916600185901b178555620002ac565b600085815260208120601f198616915b82811015620003525788860151825594840194600190910190840162000331565b5085821015620003715787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516101005161012051612e14620003f46000396000818161077501526117e00152600081816104ba01528181610a2f015261172d0152600081816105ec01528181610a51015261174f01526000610591015260006108590152600061055d0152612e146000f3fe6080604052600436106102805760003560e01c80636715f7091161014f578063b0cfd4d2116100c1578063de8aeda01161007a578063de8aeda014610847578063e0b838e91461087b578063e2bbb1581461089b578063f2fde38b146108ae578063fd9be522146108ce578063ffee770f146108ee57600080fd5b8063b0cfd4d214610763578063c884ef8314610797578063cb13cddb146107c7578063cd446e22146107f4578063dd62ed3e14610814578063de2a60f71461083457600080fd5b80638091f3bf116101135780638091f3bf146106af5780638da5cb5b146106d057806395d89b41146106ee57806397945d2d14610703578063a457c2d714610723578063a9059cbb1461074357600080fd5b80636715f7091461060e57806370a082311461062e578063715018a61461066457806376c8131214610679578063786627ce1461069957600080fd5b8063313ce567116101f35780634c2c8370116101ac5780634c2c837014610515578063575580d7146105355780635ad3ad061461054b5780635aeb4d771461057f5780635c7e072b146105c75780635e45da23146105da57600080fd5b8063313ce56714610439578063379607f5146104555780633950935114610468578063412753581461048857806345636279146104a857806346093c1b146104f557600080fd5b806310c3cf061161024557806310c3cf061461035e57806311106ee21461039657806318160ddd146103c45780631b6fa94a146103d957806323b872dd146103f95780632a3a236f1461041957600080fd5b806273b5551461028c57806306fdde03146102a15780630902f1ac146102cc578063095ea7b3146102f65780630e82845d1461032657600080fd5b3661028757005b600080fd5b61029f61029a366004612421565b610901565b005b3480156102ad57600080fd5b506102b661093e565b6040516102c391906124cc565b60405180910390f35b3480156102d857600080fd5b506102e16109d0565b604080519283526020830191909152016102c3565b34801561030257600080fd5b506103166103113660046124f4565b6109ef565b60405190151581526020016102c3565b34801561033257600080fd5b50600854610346906001600160a01b031681565b6040516001600160a01b0390911681526020016102c3565b34801561036a57600080fd5b50600a5461037e906001600160401b031681565b6040516001600160401b0390911681526020016102c3565b3480156103a257600080fd5b506103b66103b1366004612520565b610a09565b6040519081526020016102c3565b3480156103d057600080fd5b506002546103b6565b3480156103e557600080fd5b506103b66103f4366004612618565b610a27565b34801561040557600080fd5b50610316610414366004612683565b610b2f565b34801561042557600080fd5b5061029f6104343660046126c4565b610b53565b34801561044557600080fd5b50604051601281526020016102c3565b61029f6104633660046126e1565b610b7d565b34801561047457600080fd5b506103166104833660046124f4565b610c78565b34801561049457600080fd5b50600c54610346906001600160a01b031681565b3480156104b457600080fd5b506104dc7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160f81b031990911681526020016102c3565b34801561050157600080fd5b506103b66105103660046126fa565b610c9a565b34801561052157600080fd5b506103b661053036600461271f565b610cce565b34801561054157600080fd5b506103b660095481565b34801561055757600080fd5b5061037e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561058b57600080fd5b506105b37f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016102c3565b61029f6105d5366004612746565b610d04565b3480156105e657600080fd5b506105b37f000000000000000000000000000000000000000000000000000000000000000081565b34801561061a57600080fd5b506103b661062936600461271f565b610d23565b34801561063a57600080fd5b506103b66106493660046126c4565b6001600160a01b031660009081526020819052604090205490565b34801561067057600080fd5b5061029f610d51565b34801561068557600080fd5b506103b6610694366004612785565b610d65565b3480156106a557600080fd5b506103b6600b5481565b3480156106bb57600080fd5b50600a5461031690600160401b900460ff1681565b3480156106dc57600080fd5b506005546001600160a01b0316610346565b3480156106fa57600080fd5b506102b6610de7565b34801561070f57600080fd5b506103b661071e36600461271f565b610df6565b34801561072f57600080fd5b5061031661073e3660046124f4565b610e2d565b34801561074f57600080fd5b5061031661075e3660046124f4565b610ea8565b34801561076f57600080fd5b506103467f000000000000000000000000000000000000000000000000000000000000000081565b3480156107a357600080fd5b506103166107b23660046126c4565b600e6020526000908152604090205460ff1681565b3480156107d357600080fd5b506103b66107e23660046126c4565b600d6020526000908152604090205481565b34801561080057600080fd5b50601054610346906001600160a01b031681565b34801561082057600080fd5b506103b661082f366004612810565b610eb6565b61029f61084236600461284d565b610ee1565b34801561085357600080fd5b5061037e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561088757600080fd5b50600754610346906001600160a01b031681565b61029f6108a93660046128bf565b610fe5565b3480156108ba57600080fd5b5061029f6108c93660046126c4565b6110ba565b3480156108da57600080fd5b5061029f6108e93660046124f4565b611130565b61029f6108fc36600461271f565b611173565b6008546001600160a01b0316331461092c57604051637d92a0f560e11b815260040160405180910390fd5b61093884848484611190565b50505050565b60606003805461094d906128e1565b80601f0160208091040260200160405190810160405280929190818152602001828054610979906128e1565b80156109c65780601f1061099b576101008083540402835291602001916109c6565b820191906000526020600020905b8154815290600101906020018083116109a957829003601f168201915b5050505050905090565b60008060405160016235f76760e11b0319815260040160405180910390fd5b6000336109fd818585611304565b60019150505b92915050565b600060405160016235f76760e11b0319815260040160405180910390fd5b600080610aa17f0000000000000000000000000000000000000000000000000000000000000000867f0000000000000000000000000000000000000000000000000000000000000000610a7a898b611428565b3388604051602001610a8d92919061291b565b604051602081830303815290604052611511565b600754604080516000815260208101918290526342feeaa160e11b9091529192506001600160a01b0316906385fdd54290610ae49087908a90866024820161293f565b602060405180830381865afa158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b259190612979565b9695505050505050565b600033610b3d85828561154f565b610b488585856115c3565b506001949350505050565b610b5b611621565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b610b8561167b565b600a54600160401b900460ff16610bb75760405162461bcd60e51b8152600401610bae90612992565b60405180910390fd5b336000908152600e602052604090205460ff1615610c015760405162461bcd60e51b815260206004820152600760248201526618db185a5b595960ca1b6044820152606401610bae565b6000610c0d8233610c9a565b9050610c1982826129cc565b341015610c385760405162461bcd60e51b8152600401610bae906129df565b600a54601054610c6a9183916001600160401b03909116906001600160a01b031685610c6433886116d4565b33611726565b50610c756001600655565b50565b6000336109fd818585610c8b8383610eb6565b610c9591906129cc565b611304565b600a54601054600091610cc7916001600160401b03909116906001600160a01b0316856103f486826116d4565b9392505050565b600a54601054600091610cfc916001600160401b03909116906001600160a01b0316866103f487828861188e565b949350505050565b610d0c61167b565b610d1984338486856118e3565b6109386001600655565b600a54601054600091610cfc916001600160401b03909116906001600160a01b0316866103f4878288611a2d565b610d59611621565b610d636000611a36565b565b6000610ddc878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250611a8892505050565b979650505050505050565b60606004805461094d906128e1565b600a54601054600091610cfc916001600160401b03909116906001600160a01b0316610e2287866129cc565b6103f4878988611b09565b60003381610e3b8286610eb6565b905083811015610e9b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610bae565b610b488286868403611304565b6000336109fd8185856115c3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b333014610f3c5760405162461bcd60e51b815260206004820152602360248201527f455243333134506c7573436f72653a2063616c6c6572206d757374206265207360448201526232b63360e91b6064820152608401610bae565b600a546001600160401b0390811690871603610f9a57610f958686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b1292505050565b610fdd565b610fdd8686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c4492505050565b505050505050565b610fed61167b565b600a54600160401b900460ff16156110325760405162461bcd60e51b81526020600482015260086024820152671b185d5b98da195960c21b6044820152606401610bae565b600061103f833384610df6565b90508261104c82846129cc565b61105691906129cc565b3410156110755760405162461bcd60e51b8152600401610bae906129df565b600a546010546110ab9183916001600160401b03909116906001600160a01b03166110a087876129cc565b610c64338989611b09565b506110b66001600655565b5050565b6110c2611621565b6001600160a01b0381166111275760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bae565b610c7581611a36565b611138611621565b6040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561116e573d6000803e3d6000fd5b505050565b61117b61167b565b611186838383611cf0565b61116e6001600655565b61119a8484611dbf565b6111d65760405162461bcd60e51b815260206004820152600d60248201526c3ab730baba3437b934bd32b21760991b6044820152606401610bae565b6000806111e583850185612a0e565b915091506001600b60008282546111fc91906129cc565b90915550506040517ff496afe4c96f98ccadfe979e32fee625d67b649ab3b164a018eedbaecdcb7b2a90611237908890859034908690612a5d565b60405180910390a16000806000838060200190518101906112589190612a93565b92509250925060008061126d858c8686611df4565b909250905060008161127f84876129cc565b6112899190612b28565b905081156112cd57600c546040516001600160a01b039091169083156108fc029084906000818181858888f193505050501580156112cb573d6000803e3d6000fd5b505b6000806112de8e8b8a8a878b611e0e565b91509150816112f4576112f48e8b8b8487611e85565b5050505050505050505050505050565b6001600160a01b0383166113665760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610bae565b6001600160a01b0382166113c75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610bae565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6007546040805163425e3ad360e11b815290516000926001600160a01b0316916384bc75a69160048083019260209291908290030181865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190612b3b565b604051632aee183f60e21b81526001600160a01b0385811660048301526001600160401b0385166024830152919091169063abb860fc90604401602060405180830381865afa1580156114ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc79190612b58565b606085856001600160a01b0316858585604051602001611535959493929190612b75565b604051602081830303815290604052905095945050505050565b600061155b8484610eb6565b9050600019811461093857818110156115b65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610bae565b6109388484848403611304565b3330148015906115db57506001600160a01b03821630145b156116165760405162461bcd60e51b815260206004820152600b60248201526a155b9cdd5c1c1bdc9d195960aa1b6044820152606401610bae565b61116e838383611ee6565b6005546001600160a01b03163314610d635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bae565b6002600654036116cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bae565b6002600655565b604080516001600160a01b038416602082015260609160029184910160408051601f198184030181529082905261170f939291602001612bd8565b604051602081830303815290604052905092915050565b60006117787f0000000000000000000000000000000000000000000000000000000000000000867f0000000000000000000000000000000000000000000000000000000000000000610a7a898b611428565b9050600061178688866129cc565b9050803410156117c95760405162461bcd60e51b815260206004820152600e60248201526d313934b233b2a332b29032b9391760911b6044820152606401610bae565b6007546001600160a01b031663209afe56826000807f0000000000000000000000000000000000000000000000000000000000000000888b8e846040519080825280601f01601f19166020018201604052801561182d576020820181803683370190505b508b6040518a63ffffffff1660e01b8152600401611852989796959493929190612bfa565b6000604051808303818588803b15801561186b57600080fd5b505af115801561187f573d6000803e3d6000fd5b50505050505050505050505050565b606060045b604080516001600160a01b0387166020820152808201859052815180820383018152606082019092526118cb92918691608001612bd8565b60405160208183030381529060405290509392505050565b600a54600160401b900460ff1661190c5760405162461bcd60e51b8152600401610bae90612992565b6000821161192c5760405162461bcd60e51b8152600401610bae90612c70565b80158061193857504281115b6119545760405162461bcd60e51b8152600401610bae90612c98565b81611974856001600160a01b031660009081526020819052604090205490565b10156119c25760405162461bcd60e51b815260206004820152601b60248201527f73656c6c20616d6f756e7420657863656564732062616c616e636500000000006044820152606401610bae565b60006119cf868585610d23565b90506119db86826129cc565b3410156119fa5760405162461bcd60e51b8152600401610bae906129df565b611a048584612078565b600a54601054610fdd9183916001600160401b03909116906001600160a01b031689610c6489828a5b60606006611893565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6007546040516342feeaa160e11b81526000916001600160a01b0316906385fdd54290611abf90889088908890889060040161293f565b602060405180830381865afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b009190612979565b95945050505050565b60606000611893565b60ff8316611b485760008082806020019051810190611b319190612cbf565b91509150611b4187878484612198565b5050611c3d565b60021960ff841601611b8857600080600083806020019051810190611b6d9190612ced565b925092509250611b8088888585856121cb565b505050611c3d565b60041960ff841601611bc057600080600083806020019051810190611bad9190612ced565b925092509250611b808888858585612241565b60061960ff841601611bf857600080600083806020019051810190611be59190612ced565b925092509250611b808888858486612241565b60001960ff841601611c2157611c1c600a805460ff60401b1916600160401b179055565b611c3d565b60405160016235f76760e11b0319815260040160405180910390fd5b5050505050565b60ff8316611c745760008082806020019051810190611c639190612cbf565b91509150611b418488888585611c21565b60011960ff841601611caa57600081806020019051810190611c969190612b3b565b9050611ca483878784611c21565b50611c3d565b60031960ff841601611ccd5760008082806020019051810190611c639190612cbf565b60051960ff841601611c215760008082806020019051810190611c639190612cbf565b600a54600160401b900460ff16611d195760405162461bcd60e51b8152600401610bae90612992565b801580611d2557504281115b611d415760405162461bcd60e51b8152600401610bae90612c98565b6000611d4e848434610cce565b9050600084611d5d8334612b28565b611d679190612b28565b905060008111611d895760405162461bcd60e51b8152600401610bae90612c70565b600a54601054611c3d9184916001600160401b03909116906001600160a01b0316611db489866129cc565b610c64898b8861188e565b6010546000906001600160a01b038381169116148015610cc75750600a546001600160401b0390811690841614905092915050565b600080611e018434612b28565b9660009650945050505050565b60006060611e765a85609663de2a60f760e01b8c8c8c8c8b604051602401611e3a959493929190612d24565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152309392919061228d565b90999098509650505050505050565b600160096000828254611e9891906129cc565b90915550506040517ff0b808371c16e9cdc7de5c17ebb6bc3166c06a15d8112e2b44164fde17efadfe90611ed790879087908790879034908890612d63565b60405180910390a15050505050565b6001600160a01b038316611f4a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610bae565b6001600160a01b038216611fac5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610bae565b6001600160a01b038316600090815260208190526040902054818110156120245760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610bae565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020612dbf833981519152910160405180910390a3610938565b6001600160a01b0382166120d85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610bae565b6001600160a01b0382166000908152602081905260409020548181101561214c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610bae565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020612dbf833981519152910160405180910390a3505050565b6001600160a01b0382166000908152600d6020526040812080548392906121c09084906129cc565b909155505050505050565b80156121db576121db8382612317565b8115612219576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015612217573d6000803e3d6000fd5b505b50506001600160a01b03166000908152600e60205260409020805460ff191660011790555050565b8015612251576122518382612317565b8115611c3d576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610fdd573d6000803e3d6000fd5b6000606060008060008661ffff166001600160401b038111156122b2576122b2612555565b6040519080825280601f01601f1916602001820160405280156122dc576020820181803683370190505b5090506000808751602089018b8e8ef191503d9250868311156122fd578692505b828152826000602083013e90999098509650505050505050565b6001600160a01b03821661236d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610bae565b806002600082825461237f91906129cc565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020612dbf833981519152910160405180910390a35050565b6001600160401b0381168114610c7557600080fd5b60008083601f8401126123eb57600080fd5b5081356001600160401b0381111561240257600080fd5b60208301915083602082850101111561241a57600080fd5b9250929050565b6000806000806060858703121561243757600080fd5b8435612442816123c4565b93506020850135925060408501356001600160401b0381111561246457600080fd5b612470878288016123d9565b95989497509550505050565b60005b8381101561249757818101518382015260200161247f565b50506000910152565b600081518084526124b881602086016020860161247c565b601f01601f19169290920160200192915050565b602081526000610cc760208301846124a0565b6001600160a01b0381168114610c7557600080fd5b6000806040838503121561250757600080fd5b8235612512816124df565b946020939093013593505050565b6000806040838503121561253357600080fd5b823591506020830135801515811461254a57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561259357612593612555565b604052919050565b60006001600160401b038211156125b4576125b4612555565b50601f01601f191660200190565b600082601f8301126125d357600080fd5b81356125e66125e18261259b565b61256b565b8181528460208386010111156125fb57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561262e57600080fd5b8435612639816123c4565b93506020850135612649816124df565b92506040850135915060608501356001600160401b0381111561266b57600080fd5b612677878288016125c2565b91505092959194509250565b60008060006060848603121561269857600080fd5b83356126a3816124df565b925060208401356126b3816124df565b929592945050506040919091013590565b6000602082840312156126d657600080fd5b8135610cc7816124df565b6000602082840312156126f357600080fd5b5035919050565b6000806040838503121561270d57600080fd5b82359150602083013561254a816124df565b60008060006060848603121561273457600080fd5b8335925060208401356126b3816124df565b6000806000806080858703121561275c57600080fd5b84359350602085013592506040850135612775816124df565b9396929550929360600135925050565b6000806000806000806080878903121561279e57600080fd5b8635955060208701356127b0816123c4565b945060408701356001600160401b03808211156127cc57600080fd5b6127d88a838b016123d9565b909650945060608901359150808211156127f157600080fd5b506127fe89828a016123d9565b979a9699509497509295939492505050565b6000806040838503121561282357600080fd5b823561282e816124df565b9150602083013561254a816124df565b60ff81168114610c7557600080fd5b60008060008060008060a0878903121561286657600080fd5b8635612871816123c4565b95506020870135612881816124df565b945060408701356128918161283e565b93506060870135925060808701356001600160401b038111156128b357600080fd5b6127fe89828a016123d9565b600080604083850312156128d257600080fd5b50508035926020909101359150565b600181811c908216806128f557607f821691505b60208210810361291557634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610cfc908301846124a0565b8481526001600160401b038416602082015260806040820152600061296760808301856124a0565b8281036060840152610ddc81856124a0565b60006020828403121561298b57600080fd5b5051919050565b6020808252600a90820152691d5b9b185d5b98da195960b21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a0357610a036129b6565b6020808252601590820152740c4e4d2c8ceca40cccaca40dcdee840cadcdeeaced605b1b604082015260600190565b60008060408385031215612a2157600080fd5b8235612a2c816124df565b915060208301356001600160401b03811115612a4757600080fd5b612a53858286016125c2565b9150509250929050565b6001600160401b038516815260018060a01b0384166020820152826040820152608060608201526000610b2560808301846124a0565b600080600060608486031215612aa857600080fd5b8351612ab38161283e565b6020850151604086015191945092506001600160401b03811115612ad657600080fd5b8401601f81018613612ae757600080fd5b8051612af56125e18261259b565b818152876020838501011115612b0a57600080fd5b612b1b82602083016020860161247c565b8093505050509250925092565b81810381811115610a0357610a036129b6565b600060208284031215612b4d57600080fd5b8151610cc7816124df565b600060208284031215612b6a57600080fd5b8151610cc7816123c4565b6001600160f81b0319861681526001810185905260e884901b6001600160e81b031916602182015260c083901b6001600160c01b03191660248201528151600090612bc781602c85016020870161247c565b91909101602c019695505050505050565b60ff84168152826020820152606060408201526000611b0060608301846124a0565b6001600160401b03898116825288811660208301526001600160a01b0388811660408401528716606083015260808201869052841660a082015261010060c08201819052600090612c4d838201866124a0565b905082810360e0840152612c6181856124a0565b9b9a5050505050505050505050565b6020808252600e908201526d30b6b7bab73a1034b71032b9391760911b604082015260600190565b6020808252600d908201526c3232b0b23634b7329032b9391760991b604082015260600190565b60008060408385031215612cd257600080fd5b8251612cdd816124df565b6020939093015192949293505050565b600080600060608486031215612d0257600080fd5b8351612d0d816124df565b602085015160409095015190969495509392505050565b6001600160401b038616815260018060a01b038516602082015260ff8416604082015282606082015260a060808201526000610ddc60a08301846124a0565b6001600160401b03871681526001600160a01b038616602082015260c060408201819052600090612d96908301876124a0565b8281036060840152612da881876124a0565b6080840195909552505060a0015294935050505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212205a20a60bc5be31e800754b06ab07766fb9bba526cd437093679c7b6307a55ae264736f6c63430008170033000000000000000000000000176baa4c563985209c159f3ecc7d9f09d3914de00000000000000000000000000000000000000000000000000000000000006f66
Deployed Bytecode
0x6080604052600436106102805760003560e01c80636715f7091161014f578063b0cfd4d2116100c1578063de8aeda01161007a578063de8aeda014610847578063e0b838e91461087b578063e2bbb1581461089b578063f2fde38b146108ae578063fd9be522146108ce578063ffee770f146108ee57600080fd5b8063b0cfd4d214610763578063c884ef8314610797578063cb13cddb146107c7578063cd446e22146107f4578063dd62ed3e14610814578063de2a60f71461083457600080fd5b80638091f3bf116101135780638091f3bf146106af5780638da5cb5b146106d057806395d89b41146106ee57806397945d2d14610703578063a457c2d714610723578063a9059cbb1461074357600080fd5b80636715f7091461060e57806370a082311461062e578063715018a61461066457806376c8131214610679578063786627ce1461069957600080fd5b8063313ce567116101f35780634c2c8370116101ac5780634c2c837014610515578063575580d7146105355780635ad3ad061461054b5780635aeb4d771461057f5780635c7e072b146105c75780635e45da23146105da57600080fd5b8063313ce56714610439578063379607f5146104555780633950935114610468578063412753581461048857806345636279146104a857806346093c1b146104f557600080fd5b806310c3cf061161024557806310c3cf061461035e57806311106ee21461039657806318160ddd146103c45780631b6fa94a146103d957806323b872dd146103f95780632a3a236f1461041957600080fd5b806273b5551461028c57806306fdde03146102a15780630902f1ac146102cc578063095ea7b3146102f65780630e82845d1461032657600080fd5b3661028757005b600080fd5b61029f61029a366004612421565b610901565b005b3480156102ad57600080fd5b506102b661093e565b6040516102c391906124cc565b60405180910390f35b3480156102d857600080fd5b506102e16109d0565b604080519283526020830191909152016102c3565b34801561030257600080fd5b506103166103113660046124f4565b6109ef565b60405190151581526020016102c3565b34801561033257600080fd5b50600854610346906001600160a01b031681565b6040516001600160a01b0390911681526020016102c3565b34801561036a57600080fd5b50600a5461037e906001600160401b031681565b6040516001600160401b0390911681526020016102c3565b3480156103a257600080fd5b506103b66103b1366004612520565b610a09565b6040519081526020016102c3565b3480156103d057600080fd5b506002546103b6565b3480156103e557600080fd5b506103b66103f4366004612618565b610a27565b34801561040557600080fd5b50610316610414366004612683565b610b2f565b34801561042557600080fd5b5061029f6104343660046126c4565b610b53565b34801561044557600080fd5b50604051601281526020016102c3565b61029f6104633660046126e1565b610b7d565b34801561047457600080fd5b506103166104833660046124f4565b610c78565b34801561049457600080fd5b50600c54610346906001600160a01b031681565b3480156104b457600080fd5b506104dc7f010000000000000000000000000000000000000000000000000000000000000081565b6040516001600160f81b031990911681526020016102c3565b34801561050157600080fd5b506103b66105103660046126fa565b610c9a565b34801561052157600080fd5b506103b661053036600461271f565b610cce565b34801561054157600080fd5b506103b660095481565b34801561055757600080fd5b5061037e7f000000000000000000000000000000000000000000000000000000000000003c81565b34801561058b57600080fd5b506105b37f00000000000000000000000000000000000000000000000000000000000186a081565b60405162ffffff90911681526020016102c3565b61029f6105d5366004612746565b610d04565b3480156105e657600080fd5b506105b37f00000000000000000000000000000000000000000000000000000000000f424081565b34801561061a57600080fd5b506103b661062936600461271f565b610d23565b34801561063a57600080fd5b506103b66106493660046126c4565b6001600160a01b031660009081526020819052604090205490565b34801561067057600080fd5b5061029f610d51565b34801561068557600080fd5b506103b6610694366004612785565b610d65565b3480156106a557600080fd5b506103b6600b5481565b3480156106bb57600080fd5b50600a5461031690600160401b900460ff1681565b3480156106dc57600080fd5b506005546001600160a01b0316610346565b3480156106fa57600080fd5b506102b6610de7565b34801561070f57600080fd5b506103b661071e36600461271f565b610df6565b34801561072f57600080fd5b5061031661073e3660046124f4565b610e2d565b34801561074f57600080fd5b5061031661075e3660046124f4565b610ea8565b34801561076f57600080fd5b506103467f000000000000000000000000000000000000000000000000000000000000000081565b3480156107a357600080fd5b506103166107b23660046126c4565b600e6020526000908152604090205460ff1681565b3480156107d357600080fd5b506103b66107e23660046126c4565b600d6020526000908152604090205481565b34801561080057600080fd5b50601054610346906001600160a01b031681565b34801561082057600080fd5b506103b661082f366004612810565b610eb6565b61029f61084236600461284d565b610ee1565b34801561085357600080fd5b5061037e7f000000000000000000000000000000000000000000000000000000000001518081565b34801561088757600080fd5b50600754610346906001600160a01b031681565b61029f6108a93660046128bf565b610fe5565b3480156108ba57600080fd5b5061029f6108c93660046126c4565b6110ba565b3480156108da57600080fd5b5061029f6108e93660046124f4565b611130565b61029f6108fc36600461271f565b611173565b6008546001600160a01b0316331461092c57604051637d92a0f560e11b815260040160405180910390fd5b61093884848484611190565b50505050565b60606003805461094d906128e1565b80601f0160208091040260200160405190810160405280929190818152602001828054610979906128e1565b80156109c65780601f1061099b576101008083540402835291602001916109c6565b820191906000526020600020905b8154815290600101906020018083116109a957829003601f168201915b5050505050905090565b60008060405160016235f76760e11b0319815260040160405180910390fd5b6000336109fd818585611304565b60019150505b92915050565b600060405160016235f76760e11b0319815260040160405180910390fd5b600080610aa17f0100000000000000000000000000000000000000000000000000000000000000867f00000000000000000000000000000000000000000000000000000000000f4240610a7a898b611428565b3388604051602001610a8d92919061291b565b604051602081830303815290604052611511565b600754604080516000815260208101918290526342feeaa160e11b9091529192506001600160a01b0316906385fdd54290610ae49087908a90866024820161293f565b602060405180830381865afa158015610b01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b259190612979565b9695505050505050565b600033610b3d85828561154f565b610b488585856115c3565b506001949350505050565b610b5b611621565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b610b8561167b565b600a54600160401b900460ff16610bb75760405162461bcd60e51b8152600401610bae90612992565b60405180910390fd5b336000908152600e602052604090205460ff1615610c015760405162461bcd60e51b815260206004820152600760248201526618db185a5b595960ca1b6044820152606401610bae565b6000610c0d8233610c9a565b9050610c1982826129cc565b341015610c385760405162461bcd60e51b8152600401610bae906129df565b600a54601054610c6a9183916001600160401b03909116906001600160a01b031685610c6433886116d4565b33611726565b50610c756001600655565b50565b6000336109fd818585610c8b8383610eb6565b610c9591906129cc565b611304565b600a54601054600091610cc7916001600160401b03909116906001600160a01b0316856103f486826116d4565b9392505050565b600a54601054600091610cfc916001600160401b03909116906001600160a01b0316866103f487828861188e565b949350505050565b610d0c61167b565b610d1984338486856118e3565b6109386001600655565b600a54601054600091610cfc916001600160401b03909116906001600160a01b0316866103f4878288611a2d565b610d59611621565b610d636000611a36565b565b6000610ddc878787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250611a8892505050565b979650505050505050565b60606004805461094d906128e1565b600a54601054600091610cfc916001600160401b03909116906001600160a01b0316610e2287866129cc565b6103f4878988611b09565b60003381610e3b8286610eb6565b905083811015610e9b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610bae565b610b488286868403611304565b6000336109fd8185856115c3565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b333014610f3c5760405162461bcd60e51b815260206004820152602360248201527f455243333134506c7573436f72653a2063616c6c6572206d757374206265207360448201526232b63360e91b6064820152608401610bae565b600a546001600160401b0390811690871603610f9a57610f958686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b1292505050565b610fdd565b610fdd8686868686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c4492505050565b505050505050565b610fed61167b565b600a54600160401b900460ff16156110325760405162461bcd60e51b81526020600482015260086024820152671b185d5b98da195960c21b6044820152606401610bae565b600061103f833384610df6565b90508261104c82846129cc565b61105691906129cc565b3410156110755760405162461bcd60e51b8152600401610bae906129df565b600a546010546110ab9183916001600160401b03909116906001600160a01b03166110a087876129cc565b610c64338989611b09565b506110b66001600655565b5050565b6110c2611621565b6001600160a01b0381166111275760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bae565b610c7581611a36565b611138611621565b6040516001600160a01b0383169082156108fc029083906000818181858888f1935050505015801561116e573d6000803e3d6000fd5b505050565b61117b61167b565b611186838383611cf0565b61116e6001600655565b61119a8484611dbf565b6111d65760405162461bcd60e51b815260206004820152600d60248201526c3ab730baba3437b934bd32b21760991b6044820152606401610bae565b6000806111e583850185612a0e565b915091506001600b60008282546111fc91906129cc565b90915550506040517ff496afe4c96f98ccadfe979e32fee625d67b649ab3b164a018eedbaecdcb7b2a90611237908890859034908690612a5d565b60405180910390a16000806000838060200190518101906112589190612a93565b92509250925060008061126d858c8686611df4565b909250905060008161127f84876129cc565b6112899190612b28565b905081156112cd57600c546040516001600160a01b039091169083156108fc029084906000818181858888f193505050501580156112cb573d6000803e3d6000fd5b505b6000806112de8e8b8a8a878b611e0e565b91509150816112f4576112f48e8b8b8487611e85565b5050505050505050505050505050565b6001600160a01b0383166113665760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610bae565b6001600160a01b0382166113c75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610bae565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6007546040805163425e3ad360e11b815290516000926001600160a01b0316916384bc75a69160048083019260209291908290030181865afa158015611472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114969190612b3b565b604051632aee183f60e21b81526001600160a01b0385811660048301526001600160401b0385166024830152919091169063abb860fc90604401602060405180830381865afa1580156114ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc79190612b58565b606085856001600160a01b0316858585604051602001611535959493929190612b75565b604051602081830303815290604052905095945050505050565b600061155b8484610eb6565b9050600019811461093857818110156115b65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610bae565b6109388484848403611304565b3330148015906115db57506001600160a01b03821630145b156116165760405162461bcd60e51b815260206004820152600b60248201526a155b9cdd5c1c1bdc9d195960aa1b6044820152606401610bae565b61116e838383611ee6565b6005546001600160a01b03163314610d635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bae565b6002600654036116cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bae565b6002600655565b604080516001600160a01b038416602082015260609160029184910160408051601f198184030181529082905261170f939291602001612bd8565b604051602081830303815290604052905092915050565b60006117787f0100000000000000000000000000000000000000000000000000000000000000867f00000000000000000000000000000000000000000000000000000000000f4240610a7a898b611428565b9050600061178688866129cc565b9050803410156117c95760405162461bcd60e51b815260206004820152600e60248201526d313934b233b2a332b29032b9391760911b6044820152606401610bae565b6007546001600160a01b031663209afe56826000807f0000000000000000000000000000000000000000000000000000000000000000888b8e846040519080825280601f01601f19166020018201604052801561182d576020820181803683370190505b508b6040518a63ffffffff1660e01b8152600401611852989796959493929190612bfa565b6000604051808303818588803b15801561186b57600080fd5b505af115801561187f573d6000803e3d6000fd5b50505050505050505050505050565b606060045b604080516001600160a01b0387166020820152808201859052815180820383018152606082019092526118cb92918691608001612bd8565b60405160208183030381529060405290509392505050565b600a54600160401b900460ff1661190c5760405162461bcd60e51b8152600401610bae90612992565b6000821161192c5760405162461bcd60e51b8152600401610bae90612c70565b80158061193857504281115b6119545760405162461bcd60e51b8152600401610bae90612c98565b81611974856001600160a01b031660009081526020819052604090205490565b10156119c25760405162461bcd60e51b815260206004820152601b60248201527f73656c6c20616d6f756e7420657863656564732062616c616e636500000000006044820152606401610bae565b60006119cf868585610d23565b90506119db86826129cc565b3410156119fa5760405162461bcd60e51b8152600401610bae906129df565b611a048584612078565b600a54601054610fdd9183916001600160401b03909116906001600160a01b031689610c6489828a5b60606006611893565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6007546040516342feeaa160e11b81526000916001600160a01b0316906385fdd54290611abf90889088908890889060040161293f565b602060405180830381865afa158015611adc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b009190612979565b95945050505050565b60606000611893565b60ff8316611b485760008082806020019051810190611b319190612cbf565b91509150611b4187878484612198565b5050611c3d565b60021960ff841601611b8857600080600083806020019051810190611b6d9190612ced565b925092509250611b8088888585856121cb565b505050611c3d565b60041960ff841601611bc057600080600083806020019051810190611bad9190612ced565b925092509250611b808888858585612241565b60061960ff841601611bf857600080600083806020019051810190611be59190612ced565b925092509250611b808888858486612241565b60001960ff841601611c2157611c1c600a805460ff60401b1916600160401b179055565b611c3d565b60405160016235f76760e11b0319815260040160405180910390fd5b5050505050565b60ff8316611c745760008082806020019051810190611c639190612cbf565b91509150611b418488888585611c21565b60011960ff841601611caa57600081806020019051810190611c969190612b3b565b9050611ca483878784611c21565b50611c3d565b60031960ff841601611ccd5760008082806020019051810190611c639190612cbf565b60051960ff841601611c215760008082806020019051810190611c639190612cbf565b600a54600160401b900460ff16611d195760405162461bcd60e51b8152600401610bae90612992565b801580611d2557504281115b611d415760405162461bcd60e51b8152600401610bae90612c98565b6000611d4e848434610cce565b9050600084611d5d8334612b28565b611d679190612b28565b905060008111611d895760405162461bcd60e51b8152600401610bae90612c70565b600a54601054611c3d9184916001600160401b03909116906001600160a01b0316611db489866129cc565b610c64898b8861188e565b6010546000906001600160a01b038381169116148015610cc75750600a546001600160401b0390811690841614905092915050565b600080611e018434612b28565b9660009650945050505050565b60006060611e765a85609663de2a60f760e01b8c8c8c8c8b604051602401611e3a959493929190612d24565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152309392919061228d565b90999098509650505050505050565b600160096000828254611e9891906129cc565b90915550506040517ff0b808371c16e9cdc7de5c17ebb6bc3166c06a15d8112e2b44164fde17efadfe90611ed790879087908790879034908890612d63565b60405180910390a15050505050565b6001600160a01b038316611f4a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610bae565b6001600160a01b038216611fac5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610bae565b6001600160a01b038316600090815260208190526040902054818110156120245760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610bae565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020612dbf833981519152910160405180910390a3610938565b6001600160a01b0382166120d85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610bae565b6001600160a01b0382166000908152602081905260409020548181101561214c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610bae565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020612dbf833981519152910160405180910390a3505050565b6001600160a01b0382166000908152600d6020526040812080548392906121c09084906129cc565b909155505050505050565b80156121db576121db8382612317565b8115612219576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015612217573d6000803e3d6000fd5b505b50506001600160a01b03166000908152600e60205260409020805460ff191660011790555050565b8015612251576122518382612317565b8115611c3d576040516001600160a01b0384169083156108fc029084906000818181858888f19350505050158015610fdd573d6000803e3d6000fd5b6000606060008060008661ffff166001600160401b038111156122b2576122b2612555565b6040519080825280601f01601f1916602001820160405280156122dc576020820181803683370190505b5090506000808751602089018b8e8ef191503d9250868311156122fd578692505b828152826000602083013e90999098509650505050505050565b6001600160a01b03821661236d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610bae565b806002600082825461237f91906129cc565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020612dbf833981519152910160405180910390a35050565b6001600160401b0381168114610c7557600080fd5b60008083601f8401126123eb57600080fd5b5081356001600160401b0381111561240257600080fd5b60208301915083602082850101111561241a57600080fd5b9250929050565b6000806000806060858703121561243757600080fd5b8435612442816123c4565b93506020850135925060408501356001600160401b0381111561246457600080fd5b612470878288016123d9565b95989497509550505050565b60005b8381101561249757818101518382015260200161247f565b50506000910152565b600081518084526124b881602086016020860161247c565b601f01601f19169290920160200192915050565b602081526000610cc760208301846124a0565b6001600160a01b0381168114610c7557600080fd5b6000806040838503121561250757600080fd5b8235612512816124df565b946020939093013593505050565b6000806040838503121561253357600080fd5b823591506020830135801515811461254a57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561259357612593612555565b604052919050565b60006001600160401b038211156125b4576125b4612555565b50601f01601f191660200190565b600082601f8301126125d357600080fd5b81356125e66125e18261259b565b61256b565b8181528460208386010111156125fb57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561262e57600080fd5b8435612639816123c4565b93506020850135612649816124df565b92506040850135915060608501356001600160401b0381111561266b57600080fd5b612677878288016125c2565b91505092959194509250565b60008060006060848603121561269857600080fd5b83356126a3816124df565b925060208401356126b3816124df565b929592945050506040919091013590565b6000602082840312156126d657600080fd5b8135610cc7816124df565b6000602082840312156126f357600080fd5b5035919050565b6000806040838503121561270d57600080fd5b82359150602083013561254a816124df565b60008060006060848603121561273457600080fd5b8335925060208401356126b3816124df565b6000806000806080858703121561275c57600080fd5b84359350602085013592506040850135612775816124df565b9396929550929360600135925050565b6000806000806000806080878903121561279e57600080fd5b8635955060208701356127b0816123c4565b945060408701356001600160401b03808211156127cc57600080fd5b6127d88a838b016123d9565b909650945060608901359150808211156127f157600080fd5b506127fe89828a016123d9565b979a9699509497509295939492505050565b6000806040838503121561282357600080fd5b823561282e816124df565b9150602083013561254a816124df565b60ff81168114610c7557600080fd5b60008060008060008060a0878903121561286657600080fd5b8635612871816123c4565b95506020870135612881816124df565b945060408701356128918161283e565b93506060870135925060808701356001600160401b038111156128b357600080fd5b6127fe89828a016123d9565b600080604083850312156128d257600080fd5b50508035926020909101359150565b600181811c908216806128f557607f821691505b60208210810361291557634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0383168152604060208201819052600090610cfc908301846124a0565b8481526001600160401b038416602082015260806040820152600061296760808301856124a0565b8281036060840152610ddc81856124a0565b60006020828403121561298b57600080fd5b5051919050565b6020808252600a90820152691d5b9b185d5b98da195960b21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610a0357610a036129b6565b6020808252601590820152740c4e4d2c8ceca40cccaca40dcdee840cadcdeeaced605b1b604082015260600190565b60008060408385031215612a2157600080fd5b8235612a2c816124df565b915060208301356001600160401b03811115612a4757600080fd5b612a53858286016125c2565b9150509250929050565b6001600160401b038516815260018060a01b0384166020820152826040820152608060608201526000610b2560808301846124a0565b600080600060608486031215612aa857600080fd5b8351612ab38161283e565b6020850151604086015191945092506001600160401b03811115612ad657600080fd5b8401601f81018613612ae757600080fd5b8051612af56125e18261259b565b818152876020838501011115612b0a57600080fd5b612b1b82602083016020860161247c565b8093505050509250925092565b81810381811115610a0357610a036129b6565b600060208284031215612b4d57600080fd5b8151610cc7816124df565b600060208284031215612b6a57600080fd5b8151610cc7816123c4565b6001600160f81b0319861681526001810185905260e884901b6001600160e81b031916602182015260c083901b6001600160c01b03191660248201528151600090612bc781602c85016020870161247c565b91909101602c019695505050505050565b60ff84168152826020820152606060408201526000611b0060608301846124a0565b6001600160401b03898116825288811660208301526001600160a01b0388811660408401528716606083015260808201869052841660a082015261010060c08201819052600090612c4d838201866124a0565b905082810360e0840152612c6181856124a0565b9b9a5050505050505050505050565b6020808252600e908201526d30b6b7bab73a1034b71032b9391760911b604082015260600190565b6020808252600d908201526c3232b0b23634b7329032b9391760991b604082015260600190565b60008060408385031215612cd257600080fd5b8251612cdd816124df565b6020939093015192949293505050565b600080600060608486031215612d0257600080fd5b8351612d0d816124df565b602085015160409095015190969495509392505050565b6001600160401b038616815260018060a01b038516602082015260ff8416604082015282606082015260a060808201526000610ddc60a08301846124a0565b6001600160401b03871681526001600160a01b038616602082015260c060408201819052600090612d96908301876124a0565b8281036060840152612da881876124a0565b6080840195909552505060a0015294935050505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212205a20a60bc5be31e800754b06ab07766fb9bba526cd437093679c7b6307a55ae264736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000176baa4c563985209c159f3ecc7d9f09d3914de00000000000000000000000000000000000000000000000000000000000006f66
-----Decoded View---------------
Arg [0] : _vizingPad (address): 0x176BAa4c563985209c159F3ecC7D9F09d3914dE0
Arg [1] : _masterChainId (uint64): 28518
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000176baa4c563985209c159f3ecc7d9f09d3914de0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000006f66
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$27.55
Net Worth in ETH
Token Allocations
ETH
100.00%
Multichain Portfolio | 35 Chains
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.