Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 232 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Send | 21593480 | 23 days ago | IN | 0 ETH | 0.00061705 | ||||
Send | 21587814 | 23 days ago | IN | 0 ETH | 0.00123888 | ||||
Send | 21571207 | 26 days ago | IN | 0 ETH | 0.00052891 | ||||
Send | 19738411 | 282 days ago | IN | 0 ETH | 0.00077346 | ||||
Send | 19415749 | 327 days ago | IN | 0 ETH | 0.00460128 | ||||
Send | 19177311 | 360 days ago | IN | 0 ETH | 0.00479638 | ||||
Send | 19174192 | 361 days ago | IN | 0 ETH | 0.00220826 | ||||
Send | 19153973 | 364 days ago | IN | 0 ETH | 0.00135695 | ||||
Send | 19153232 | 364 days ago | IN | 0 ETH | 0.00122941 | ||||
Send | 19151622 | 364 days ago | IN | 0 ETH | 0.00072475 | ||||
Send | 19151621 | 364 days ago | IN | 0 ETH | 0.00106616 | ||||
Send | 19151465 | 364 days ago | IN | 0 ETH | 0.0011915 | ||||
Send | 19150623 | 364 days ago | IN | 0 ETH | 0.00101405 | ||||
Send | 19150554 | 364 days ago | IN | 0 ETH | 0.0013807 | ||||
Send | 19150537 | 364 days ago | IN | 0 ETH | 0.00165176 | ||||
Send | 19150524 | 364 days ago | IN | 0 ETH | 0.00150594 | ||||
Send | 19150507 | 364 days ago | IN | 0 ETH | 0.00141569 | ||||
Send | 19150488 | 364 days ago | IN | 0 ETH | 0.001488 | ||||
Send | 19150479 | 364 days ago | IN | 0 ETH | 0.00150254 | ||||
Send | 19150462 | 364 days ago | IN | 0 ETH | 0.00119329 | ||||
Send | 19150446 | 364 days ago | IN | 0 ETH | 0.00148644 | ||||
Send | 19150390 | 364 days ago | IN | 0 ETH | 0.00154928 | ||||
Send | 19150371 | 364 days ago | IN | 0 ETH | 0.00136159 | ||||
Send | 19150297 | 364 days ago | IN | 0 ETH | 0.00149005 | ||||
Send | 19150258 | 364 days ago | IN | 0 ETH | 0.00150263 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MultiChainValue
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@zetachain/protocol-contracts/contracts/evm/Zeta.eth.sol"; import "@zetachain/protocol-contracts/contracts/evm/tools/ZetaInteractor.sol"; import "@zetachain/protocol-contracts/contracts/evm/interfaces/ZetaInterfaces.sol"; import "../shared/IWZeta.sol"; /** * @dev Custom errors for contract MultiChainValue */ interface MultiChainValueErrors { error ErrorTransferringZeta(); error ChainIdAlreadyEnabled(); error ChainIdNotAvailable(); error InvalidZetaValueAndGas(); } /** * @dev MultiChainValue goal is to send Zeta token across all supported chains * Extends the logic defined in ZetaInteractor to handle multichain standards */ contract MultiChainValue is ZetaInteractor, MultiChainValueErrors { address public zetaToken; // @dev map of valid chains to send Zeta mapping(uint256 => bool) public availableChainIds; // @dev Constructor calls ZetaInteractor's constructor to setup Connector address and current chain constructor(address connectorAddress_, address zetaToken_) ZetaInteractor(connectorAddress_) { if (zetaToken_ == address(0)) revert ZetaCommonErrors.InvalidAddress(); zetaToken = zetaToken_; } /** * @dev Whitelist a chain to send Zeta */ function addAvailableChainId(uint256 destinationChainId) external onlyOwner { if (availableChainIds[destinationChainId]) revert ChainIdAlreadyEnabled(); availableChainIds[destinationChainId] = true; } /** * @dev Blacklist a chain to send Zeta */ function removeAvailableChainId(uint256 destinationChainId) external onlyOwner { if (!availableChainIds[destinationChainId]) revert ChainIdNotAvailable(); delete availableChainIds[destinationChainId]; } /** * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain */ function sendZeta(uint256 destinationChainId, bytes calldata destinationAddress) public payable { uint256 zetaValueAndGas = msg.value; if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); IWZeta(zetaToken).deposit{value: zetaValueAndGas}(); bool success1 = ZetaEth(zetaToken).approve(address(connector), zetaValueAndGas); if (!success1) revert ErrorTransferringZeta(); connector.send( ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: destinationAddress, destinationGasLimit: 300000, message: abi.encode(msg.sender), zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); } /** * @dev If the destination chain is a valid chain, send the Zeta tokens to that chain */ function send(uint256 destinationChainId, bytes calldata destinationAddress, uint256 zetaValueAndGas) external { if (!availableChainIds[destinationChainId]) revert InvalidDestinationChainId(); if (zetaValueAndGas == 0) revert InvalidZetaValueAndGas(); bool success1 = ZetaEth(zetaToken).approve(address(connector), zetaValueAndGas); bool success2 = ZetaEth(zetaToken).transferFrom(msg.sender, address(this), zetaValueAndGas); if (!(success1 && success2)) revert ErrorTransferringZeta(); connector.send( ZetaInterfaces.SendInput({ destinationChainId: destinationChainId, destinationAddress: destinationAddress, destinationGasLimit: 300000, message: abi.encode(msg.sender), zetaValueAndGas: zetaValueAndGas, zetaParams: abi.encode("") }) ); } function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external isValidRevertCall(zetaRevert) { address messageFrom = abi.decode(zetaRevert.message, (address)); bool success1 = ZetaEth(zetaToken).approve(address(this), zetaRevert.remainingZetaValue); bool success2 = ZetaEth(zetaToken).transferFrom(address(this), messageFrom, zetaRevert.remainingZetaValue); if (!(success1 && success2)) revert ErrorTransferringZeta(); } }
// 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) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// 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 v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; /** * @dev Interface with Zeta Interactor errors */ interface ZetaInteractorErrors { // @dev Thrown when try to send a message or tokens to a non whitelisted chain error InvalidDestinationChainId(); // @dev Thrown when the caller is invalid. e.g.: if onZetaMessage or onZetaRevert are not called by Connector error InvalidCaller(address caller); // @dev Thrown when message on onZetaMessage has the wrong format error InvalidZetaMessageCall(); // @dev Thrown when message on onZetaRevert has the wrong format error InvalidZetaRevertCall(); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; interface ZetaInterfaces { /** * @dev Use SendInput to interact with the Connector: connector.send(SendInput) */ struct SendInput { /// @dev Chain id of the destination chain. More about chain ids https://docs.zetachain.com/learn/glossary#chain-id uint256 destinationChainId; /// @dev Address receiving the message on the destination chain (expressed in bytes since it can be non-EVM) bytes destinationAddress; /// @dev Gas limit for the destination chain's transaction uint256 destinationGasLimit; /// @dev An encoded, arbitrary message to be parsed by the destination contract bytes message; /// @dev ZETA to be sent cross-chain + ZetaChain gas fees + destination chain gas fees (expressed in ZETA) uint256 zetaValueAndGas; /// @dev Optional parameters for the ZetaChain protocol bytes zetaParams; } /** * @dev Our Connector calls onZetaMessage with this struct as argument */ struct ZetaMessage { bytes zetaTxSenderAddress; uint256 sourceChainId; address destinationAddress; /// @dev Remaining ZETA from zetaValueAndGas after subtracting ZetaChain gas fees and destination gas fees uint256 zetaValue; bytes message; } /** * @dev Our Connector calls onZetaRevert with this struct as argument */ struct ZetaRevert { address zetaTxSenderAddress; uint256 sourceChainId; bytes destinationAddress; uint256 destinationChainId; /// @dev Equals to: zetaValueAndGas - ZetaChain gas fees - destination chain gas fees - source chain revert tx gas fees uint256 remainingZetaValue; bytes message; } } interface ZetaConnector { /** * @dev Sending value and data cross-chain is as easy as calling connector.send(SendInput) */ function send(ZetaInterfaces.SendInput calldata input) external; } interface ZetaReceiver { /** * @dev onZetaMessage is called when a cross-chain message reaches a contract */ function onZetaMessage(ZetaInterfaces.ZetaMessage calldata zetaMessage) external; /** * @dev onZetaRevert is called when a cross-chain message reverts. * It's useful to rollback to the original state */ function onZetaRevert(ZetaInterfaces.ZetaRevert calldata zetaRevert) external; } /** * @dev ZetaTokenConsumer makes it easier to handle the following situations: * - Getting Zeta using native coin (to pay for destination gas while using `connector.send`) * - Getting Zeta using a token (to pay for destination gas while using `connector.send`) * - Getting native coin using Zeta (to return unused destination gas when `onZetaRevert` is executed) * - Getting a token using Zeta (to return unused destination gas when `onZetaRevert` is executed) * @dev The interface can be implemented using different strategies, like UniswapV2, UniswapV3, etc */ interface ZetaTokenConsumer { event EthExchangedForZeta(uint256 amountIn, uint256 amountOut); event TokenExchangedForZeta(address token, uint256 amountIn, uint256 amountOut); event ZetaExchangedForEth(uint256 amountIn, uint256 amountOut); event ZetaExchangedForToken(address token, uint256 amountIn, uint256 amountOut); function getZetaFromEth(address destinationAddress, uint256 minAmountOut) external payable returns (uint256); function getZetaFromToken( address destinationAddress, uint256 minAmountOut, address inputToken, uint256 inputTokenAmount ) external returns (uint256); function getEthFromZeta( address destinationAddress, uint256 minAmountOut, uint256 zetaTokenAmount ) external returns (uint256); function getTokenFromZeta( address destinationAddress, uint256 minAmountOut, address outputToken, uint256 zetaTokenAmount ) external returns (uint256); function hasZetaLiquidity() external view returns (bool); } interface ZetaCommonErrors { error InvalidAddress(); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/access/Ownable2Step.sol"; import "../interfaces/ZetaInterfaces.sol"; import "../interfaces/ZetaInteractorErrors.sol"; abstract contract ZetaInteractor is Ownable2Step, ZetaInteractorErrors { bytes32 constant ZERO_BYTES = keccak256(new bytes(0)); uint256 internal immutable currentChainId; ZetaConnector public immutable connector; /** * @dev Maps a chain id to its corresponding address of the MultiChainSwap contract * The address is expressed in bytes to allow non-EVM chains * This mapping is useful, mainly, for two reasons: * - Given a chain id, the contract is able to route a transaction to its corresponding address * - To check that the messages (onZetaMessage, onZetaRevert) come from a trusted source */ mapping(uint256 => bytes) public interactorsByChainId; modifier isValidMessageCall(ZetaInterfaces.ZetaMessage calldata zetaMessage) { _isValidCaller(); if (keccak256(zetaMessage.zetaTxSenderAddress) != keccak256(interactorsByChainId[zetaMessage.sourceChainId])) revert InvalidZetaMessageCall(); _; } modifier isValidRevertCall(ZetaInterfaces.ZetaRevert calldata zetaRevert) { _isValidCaller(); if (zetaRevert.zetaTxSenderAddress != address(this)) revert InvalidZetaRevertCall(); if (zetaRevert.sourceChainId != currentChainId) revert InvalidZetaRevertCall(); _; } constructor(address zetaConnectorAddress) { if (zetaConnectorAddress == address(0)) revert ZetaCommonErrors.InvalidAddress(); currentChainId = block.chainid; connector = ZetaConnector(zetaConnectorAddress); } function _isValidCaller() private view { if (msg.sender != address(connector)) revert InvalidCaller(msg.sender); } /** * @dev Useful for contracts that inherit from this one */ function _isValidChainId(uint256 chainId) internal view returns (bool) { return (keccak256(interactorsByChainId[chainId]) != ZERO_BYTES); } function setInteractorByChainId(uint256 destinationChainId, bytes calldata contractAddress) external onlyOwner { interactorsByChainId[destinationChainId] = contractAddress; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; /** * @dev ZetaEth is an implementation of OpenZeppelin's ERC20 */ contract ZetaEth is ERC20("Zeta", "ZETA") { constructor(address creator, uint256 initialSupply) { _mint(creator, initialSupply * (10 ** uint256(decimals()))); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; interface IWZeta { function deposit() external payable; function withdraw(uint wad) external; function totalSupply() external view returns (uint); function approve(address guy, uint wad) external returns (bool); function transfer(address dst, uint wad) external returns (bool); function transferFrom(address src, address dst, uint wad) external returns (bool); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"connectorAddress_","type":"address"},{"internalType":"address","name":"zetaToken_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ChainIdAlreadyEnabled","type":"error"},{"inputs":[],"name":"ChainIdNotAvailable","type":"error"},{"inputs":[],"name":"ErrorTransferringZeta","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"InvalidCaller","type":"error"},{"inputs":[],"name":"InvalidDestinationChainId","type":"error"},{"inputs":[],"name":"InvalidZetaMessageCall","type":"error"},{"inputs":[],"name":"InvalidZetaRevertCall","type":"error"},{"inputs":[],"name":"InvalidZetaValueAndGas","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"addAvailableChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"availableChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"connector","outputs":[{"internalType":"contract ZetaConnector","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"interactorsByChainId","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"zetaTxSenderAddress","type":"address"},{"internalType":"uint256","name":"sourceChainId","type":"uint256"},{"internalType":"bytes","name":"destinationAddress","type":"bytes"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"uint256","name":"remainingZetaValue","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"}],"internalType":"struct ZetaInterfaces.ZetaRevert","name":"zetaRevert","type":"tuple"}],"name":"onZetaRevert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"}],"name":"removeAvailableChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"bytes","name":"destinationAddress","type":"bytes"},{"internalType":"uint256","name":"zetaValueAndGas","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"bytes","name":"destinationAddress","type":"bytes"}],"name":"sendZeta","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"bytes","name":"contractAddress","type":"bytes"}],"name":"setInteractorByChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zetaToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040516200201c3803806200201c8339818101604052810190620000379190620002d2565b81620000586200004c620001b160201b60201c565b620001b960201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620000c0576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b46608081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000168576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506200036c565b600033905090565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055620001f481620001f760201b620010f81760201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002cc8162000352565b92915050565b60008060408385031215620002ec57620002eb6200034d565b5b6000620002fc85828601620002bb565b92505060206200030f85828601620002bb565b9150509250929050565b600062000326826200032d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200035d8162000319565b81146200036957600080fd5b50565b60805160a05160601c611c64620003b8600039600081816108d501528181610a1e01528181610ba601528181610e4201528181610f0c015261123c015260006105200152611c646000f3fe6080604052600436106100e85760003560e01c8063715018a61161008a578063e30c397811610059578063e30c3978146102ba578063f01ba1a8146102e5578063f23d557f1461030e578063f2fde38b1461032a576100e8565b8063715018a61461023657806379ba50971461024d57806383f3084f146102645780638da5cb5b1461028f576100e8565b80633ff0693c116100c65780633ff0693c1461017e57806348ef9a5c146101a75780634f5b7205146101d05780634fd3f7d71461020d576100e8565b806321e093b1146100ed5780632618143f146101185780633218bf7014610155575b600080fd5b3480156100f957600080fd5b50610102610353565b60405161010f91906117ff565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611541565b610379565b60405161014c9190611895565b60405180910390f35b34801561016157600080fd5b5061017c60048036038101906101779190611541565b610419565b005b34801561018a57600080fd5b506101a560048036038101906101a091906114f8565b61049e565b005b3480156101b357600080fd5b506101ce60048036038101906101c99190611541565b610753565b005b3480156101dc57600080fd5b506101f760048036038101906101f29190611541565b6107e2565b604051610204919061187a565b60405180910390f35b34801561021957600080fd5b50610234600480360381019061022f919061156e565b610802565b005b34801561024257600080fd5b5061024b610832565b005b34801561025957600080fd5b50610262610846565b005b34801561027057600080fd5b506102796108d3565b60405161028691906118b7565b60405180910390f35b34801561029b57600080fd5b506102a46108f7565b6040516102b191906117ff565b60405180910390f35b3480156102c657600080fd5b506102cf610920565b6040516102dc91906117ff565b60405180910390f35b3480156102f157600080fd5b5061030c600480360381019061030791906115ce565b61094a565b005b6103286004803603810190610323919061156e565b610ce6565b005b34801561033657600080fd5b50610351600480360381019061034c9190611471565b61104b565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002602052806000526040600020600091509050805461039890611ab8565b80601f01602080910402602001604051908101604052809291908181526020018280546103c490611ab8565b80156104115780601f106103e657610100808354040283529160200191610411565b820191906000526020600020905b8154815290600101906020018083116103f457829003601f168201915b505050505081565b6104216111bc565b6004600082815260200190815260200160002060009054906101000a900460ff16610478576040517f6832b54d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004600082815260200190815260200160002060006101000a81549060ff021916905550565b806104a761123a565b3073ffffffffffffffffffffffffffffffffffffffff168160000160208101906104d19190611471565b73ffffffffffffffffffffffffffffffffffffffff161461051e576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081602001351461057b576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828060a0019061058d9190611954565b81019061059a919061149e565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b33086608001356040518363ffffffff1660e01b81526004016105ff929190611851565b602060405180830381600087803b15801561061957600080fd5b505af115801561062d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065191906114cb565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308588608001356040518463ffffffff1660e01b81526004016106b89392919061181a565b602060405180830381600087803b1580156106d257600080fd5b505af11580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a91906114cb565b90508180156107165750805b61074c576040517f2bd0ba5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b61075b6111bc565b6004600082815260200190815260200160002060009054906101000a900460ff16156107b3576040517f90a363e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60046020528060005260406000206000915054906101000a900460ff1681565b61080a6111bc565b818160026000868152602001908152602001600020919061082c929190611305565b50505050565b61083a6111bc565b61084460006112cc565b565b60006108506112fd565b90508073ffffffffffffffffffffffffffffffffffffffff16610871610920565b73ffffffffffffffffffffffffffffffffffffffff16146108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be906118d2565b60405180910390fd5b6108d0816112cc565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6004600085815260200190815260200160002060009054906101000a900460ff166109a1576040517f90eaaa7000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008114156109dc576040517f37e1b2cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000846040518363ffffffff1660e01b8152600401610a5b929190611851565b602060405180830381600087803b158015610a7557600080fd5b505af1158015610a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aad91906114cb565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401610b109392919061181a565b602060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6291906114cb565b9050818015610b6e5750805b610ba4576040517f2bd0ba5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ec0269016040518060c0016040528089815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152602001620493e0815260200133604051602001610c5591906117ff565b6040516020818303038152906040528152602001868152602001604051602001610c7e90611912565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610cac9190611932565b600060405180830381600087803b158015610cc657600080fd5b505af1158015610cda573d6000803e3d6000fd5b50505050505050505050565b60003490506004600085815260200190815260200160002060009054906101000a900460ff16610d42576040517f90eaaa7000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000811415610d7d576040517f37e1b2cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b50505050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000846040518363ffffffff1660e01b8152600401610e7f929190611851565b602060405180830381600087803b158015610e9957600080fd5b505af1158015610ead573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed191906114cb565b905080610f0a576040517f2bd0ba5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663ec0269016040518060c0016040528088815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152602001620493e0815260200133604051602001610fbb91906117ff565b6040516020818303038152906040528152602001858152602001604051602001610fe490611912565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016110129190611932565b600060405180830381600087803b15801561102c57600080fd5b505af1158015611040573d6000803e3d6000fd5b505050505050505050565b6110536111bc565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166110b36108f7565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6111c46112fd565b73ffffffffffffffffffffffffffffffffffffffff166111e26108f7565b73ffffffffffffffffffffffffffffffffffffffff1614611238576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122f906118f2565b60405180910390fd5b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112ca57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016112c191906117ff565b60405180910390fd5b565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556112fa816110f8565b50565b600033905090565b82805461131190611ab8565b90600052602060002090601f016020900481019282611333576000855561137a565b82601f1061134c57803560ff191683800117855561137a565b8280016001018555821561137a579182015b8281111561137957823582559160200191906001019061135e565b5b509050611387919061138b565b5090565b5b808211156113a457600081600090555060010161138c565b5090565b6000813590506113b781611bd2565b92915050565b6000813590506113cc81611be9565b92915050565b6000815190506113e181611c00565b92915050565b60008083601f8401126113fd576113fc611b1e565b5b8235905067ffffffffffffffff81111561141a57611419611b19565b5b60208301915083600182028301111561143657611435611b32565b5b9250929050565b600060c0828403121561145357611452611b28565b5b81905092915050565b60008135905061146b81611c17565b92915050565b60006020828403121561148757611486611b41565b5b6000611495848285016113a8565b91505092915050565b6000602082840312156114b4576114b3611b41565b5b60006114c2848285016113bd565b91505092915050565b6000602082840312156114e1576114e0611b41565b5b60006114ef848285016113d2565b91505092915050565b60006020828403121561150e5761150d611b41565b5b600082013567ffffffffffffffff81111561152c5761152b611b3c565b5b6115388482850161143d565b91505092915050565b60006020828403121561155757611556611b41565b5b60006115658482850161145c565b91505092915050565b60008060006040848603121561158757611586611b41565b5b60006115958682870161145c565b935050602084013567ffffffffffffffff8111156115b6576115b5611b3c565b5b6115c2868287016113e7565b92509250509250925092565b600080600080606085870312156115e8576115e7611b41565b5b60006115f68782880161145c565b945050602085013567ffffffffffffffff81111561161757611616611b3c565b5b611623878288016113e7565b935093505060406116368782880161145c565b91505092959194509250565b61164b816119f5565b82525050565b61165a81611a19565b82525050565b600061166b826119b7565b61167581856119c2565b9350611685818560208601611a85565b61168e81611b46565b840191505092915050565b60006116a4826119b7565b6116ae81856119d3565b93506116be818560208601611a85565b6116c781611b46565b840191505092915050565b6116db81611a4f565b82525050565b60006116ee6029836119e4565b91506116f982611b57565b604082019050919050565b60006117116020836119e4565b915061171c82611ba6565b602082019050919050565b60006117346000836119e4565b915061173f82611bcf565b600082019050919050565b600060c08301600083015161176260008601826117e1565b506020830151848203602086015261177a8282611660565b915050604083015161178f60408601826117e1565b50606083015184820360608601526117a78282611660565b91505060808301516117bc60808601826117e1565b5060a083015184820360a08601526117d48282611660565b9150508091505092915050565b6117ea81611a45565b82525050565b6117f981611a45565b82525050565b60006020820190506118146000830184611642565b92915050565b600060608201905061182f6000830186611642565b61183c6020830185611642565b61184960408301846117f0565b949350505050565b60006040820190506118666000830185611642565b61187360208301846117f0565b9392505050565b600060208201905061188f6000830184611651565b92915050565b600060208201905081810360008301526118af8184611699565b905092915050565b60006020820190506118cc60008301846116d2565b92915050565b600060208201905081810360008301526118eb816116e1565b9050919050565b6000602082019050818103600083015261190b81611704565b9050919050565b6000602082019050818103600083015261192b81611727565b9050919050565b6000602082019050818103600083015261194c818461174a565b905092915050565b6000808335600160200384360303811261197157611970611b2d565b5b80840192508235915067ffffffffffffffff82111561199357611992611b23565b5b6020830192506001820236038313156119af576119ae611b37565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611a0082611a25565b9050919050565b6000611a1282611a25565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611a5a82611a61565b9050919050565b6000611a6c82611a73565b9050919050565b6000611a7e82611a25565b9050919050565b60005b83811015611aa3578082015181840152602081019050611a88565b83811115611ab2576000848401525b50505050565b60006002820490506001821680611ad057607f821691505b60208210811415611ae457611ae3611aea565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b611bdb816119f5565b8114611be657600080fd5b50565b611bf281611a07565b8114611bfd57600080fd5b50565b611c0981611a19565b8114611c1457600080fd5b50565b611c2081611a45565b8114611c2b57600080fd5b5056fea2646970667358221220801619c0db8564d5a735702597a61702ce1b64159c3db257029f7024326da27a64736f6c63430008070033000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a000000000000000000000000f091867ec603a6628ed83d274e835539d82e9cc8
Deployed Bytecode
0x6080604052600436106100e85760003560e01c8063715018a61161008a578063e30c397811610059578063e30c3978146102ba578063f01ba1a8146102e5578063f23d557f1461030e578063f2fde38b1461032a576100e8565b8063715018a61461023657806379ba50971461024d57806383f3084f146102645780638da5cb5b1461028f576100e8565b80633ff0693c116100c65780633ff0693c1461017e57806348ef9a5c146101a75780634f5b7205146101d05780634fd3f7d71461020d576100e8565b806321e093b1146100ed5780632618143f146101185780633218bf7014610155575b600080fd5b3480156100f957600080fd5b50610102610353565b60405161010f91906117ff565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611541565b610379565b60405161014c9190611895565b60405180910390f35b34801561016157600080fd5b5061017c60048036038101906101779190611541565b610419565b005b34801561018a57600080fd5b506101a560048036038101906101a091906114f8565b61049e565b005b3480156101b357600080fd5b506101ce60048036038101906101c99190611541565b610753565b005b3480156101dc57600080fd5b506101f760048036038101906101f29190611541565b6107e2565b604051610204919061187a565b60405180910390f35b34801561021957600080fd5b50610234600480360381019061022f919061156e565b610802565b005b34801561024257600080fd5b5061024b610832565b005b34801561025957600080fd5b50610262610846565b005b34801561027057600080fd5b506102796108d3565b60405161028691906118b7565b60405180910390f35b34801561029b57600080fd5b506102a46108f7565b6040516102b191906117ff565b60405180910390f35b3480156102c657600080fd5b506102cf610920565b6040516102dc91906117ff565b60405180910390f35b3480156102f157600080fd5b5061030c600480360381019061030791906115ce565b61094a565b005b6103286004803603810190610323919061156e565b610ce6565b005b34801561033657600080fd5b50610351600480360381019061034c9190611471565b61104b565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6002602052806000526040600020600091509050805461039890611ab8565b80601f01602080910402602001604051908101604052809291908181526020018280546103c490611ab8565b80156104115780601f106103e657610100808354040283529160200191610411565b820191906000526020600020905b8154815290600101906020018083116103f457829003601f168201915b505050505081565b6104216111bc565b6004600082815260200190815260200160002060009054906101000a900460ff16610478576040517f6832b54d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004600082815260200190815260200160002060006101000a81549060ff021916905550565b806104a761123a565b3073ffffffffffffffffffffffffffffffffffffffff168160000160208101906104d19190611471565b73ffffffffffffffffffffffffffffffffffffffff161461051e576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000181602001351461057b576040517fc03e9c3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828060a0019061058d9190611954565b81019061059a919061149e565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b33086608001356040518363ffffffff1660e01b81526004016105ff929190611851565b602060405180830381600087803b15801561061957600080fd5b505af115801561062d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065191906114cb565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd308588608001356040518463ffffffff1660e01b81526004016106b89392919061181a565b602060405180830381600087803b1580156106d257600080fd5b505af11580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a91906114cb565b90508180156107165750805b61074c576040517f2bd0ba5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b61075b6111bc565b6004600082815260200190815260200160002060009054906101000a900460ff16156107b3576040517f90a363e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60046020528060005260406000206000915054906101000a900460ff1681565b61080a6111bc565b818160026000868152602001908152602001600020919061082c929190611305565b50505050565b61083a6111bc565b61084460006112cc565b565b60006108506112fd565b90508073ffffffffffffffffffffffffffffffffffffffff16610871610920565b73ffffffffffffffffffffffffffffffffffffffff16146108c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108be906118d2565b60405180910390fd5b6108d0816112cc565b50565b7f000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a81565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6004600085815260200190815260200160002060009054906101000a900460ff166109a1576040517f90eaaa7000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008114156109dc576040517f37e1b2cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a846040518363ffffffff1660e01b8152600401610a5b929190611851565b602060405180830381600087803b158015610a7557600080fd5b505af1158015610a89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aad91906114cb565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401610b109392919061181a565b602060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6291906114cb565b9050818015610b6e5750805b610ba4576040517f2bd0ba5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a73ffffffffffffffffffffffffffffffffffffffff1663ec0269016040518060c0016040528089815260200188888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152602001620493e0815260200133604051602001610c5591906117ff565b6040516020818303038152906040528152602001868152602001604051602001610c7e90611912565b6040516020818303038152906040528152506040518263ffffffff1660e01b8152600401610cac9190611932565b600060405180830381600087803b158015610cc657600080fd5b505af1158015610cda573d6000803e3d6000fd5b50505050505050505050565b60003490506004600085815260200190815260200160002060009054906101000a900460ff16610d42576040517f90eaaa7000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000811415610d7d576040517f37e1b2cf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b50505050506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b37f000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a846040518363ffffffff1660e01b8152600401610e7f929190611851565b602060405180830381600087803b158015610e9957600080fd5b505af1158015610ead573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed191906114cb565b905080610f0a576040517f2bd0ba5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a73ffffffffffffffffffffffffffffffffffffffff1663ec0269016040518060c0016040528088815260200187878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508152602001620493e0815260200133604051602001610fbb91906117ff565b6040516020818303038152906040528152602001858152602001604051602001610fe490611912565b6040516020818303038152906040528152506040518263ffffffff1660e01b81526004016110129190611932565b600060405180830381600087803b15801561102c57600080fd5b505af1158015611040573d6000803e3d6000fd5b505050505050505050565b6110536111bc565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166110b36108f7565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6111c46112fd565b73ffffffffffffffffffffffffffffffffffffffff166111e26108f7565b73ffffffffffffffffffffffffffffffffffffffff1614611238576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122f906118f2565b60405180910390fd5b565b7f000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112ca57336040517fcbd9d2e00000000000000000000000000000000000000000000000000000000081526004016112c191906117ff565b60405180910390fd5b565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556112fa816110f8565b50565b600033905090565b82805461131190611ab8565b90600052602060002090601f016020900481019282611333576000855561137a565b82601f1061134c57803560ff191683800117855561137a565b8280016001018555821561137a579182015b8281111561137957823582559160200191906001019061135e565b5b509050611387919061138b565b5090565b5b808211156113a457600081600090555060010161138c565b5090565b6000813590506113b781611bd2565b92915050565b6000813590506113cc81611be9565b92915050565b6000815190506113e181611c00565b92915050565b60008083601f8401126113fd576113fc611b1e565b5b8235905067ffffffffffffffff81111561141a57611419611b19565b5b60208301915083600182028301111561143657611435611b32565b5b9250929050565b600060c0828403121561145357611452611b28565b5b81905092915050565b60008135905061146b81611c17565b92915050565b60006020828403121561148757611486611b41565b5b6000611495848285016113a8565b91505092915050565b6000602082840312156114b4576114b3611b41565b5b60006114c2848285016113bd565b91505092915050565b6000602082840312156114e1576114e0611b41565b5b60006114ef848285016113d2565b91505092915050565b60006020828403121561150e5761150d611b41565b5b600082013567ffffffffffffffff81111561152c5761152b611b3c565b5b6115388482850161143d565b91505092915050565b60006020828403121561155757611556611b41565b5b60006115658482850161145c565b91505092915050565b60008060006040848603121561158757611586611b41565b5b60006115958682870161145c565b935050602084013567ffffffffffffffff8111156115b6576115b5611b3c565b5b6115c2868287016113e7565b92509250509250925092565b600080600080606085870312156115e8576115e7611b41565b5b60006115f68782880161145c565b945050602085013567ffffffffffffffff81111561161757611616611b3c565b5b611623878288016113e7565b935093505060406116368782880161145c565b91505092959194509250565b61164b816119f5565b82525050565b61165a81611a19565b82525050565b600061166b826119b7565b61167581856119c2565b9350611685818560208601611a85565b61168e81611b46565b840191505092915050565b60006116a4826119b7565b6116ae81856119d3565b93506116be818560208601611a85565b6116c781611b46565b840191505092915050565b6116db81611a4f565b82525050565b60006116ee6029836119e4565b91506116f982611b57565b604082019050919050565b60006117116020836119e4565b915061171c82611ba6565b602082019050919050565b60006117346000836119e4565b915061173f82611bcf565b600082019050919050565b600060c08301600083015161176260008601826117e1565b506020830151848203602086015261177a8282611660565b915050604083015161178f60408601826117e1565b50606083015184820360608601526117a78282611660565b91505060808301516117bc60808601826117e1565b5060a083015184820360a08601526117d48282611660565b9150508091505092915050565b6117ea81611a45565b82525050565b6117f981611a45565b82525050565b60006020820190506118146000830184611642565b92915050565b600060608201905061182f6000830186611642565b61183c6020830185611642565b61184960408301846117f0565b949350505050565b60006040820190506118666000830185611642565b61187360208301846117f0565b9392505050565b600060208201905061188f6000830184611651565b92915050565b600060208201905081810360008301526118af8184611699565b905092915050565b60006020820190506118cc60008301846116d2565b92915050565b600060208201905081810360008301526118eb816116e1565b9050919050565b6000602082019050818103600083015261190b81611704565b9050919050565b6000602082019050818103600083015261192b81611727565b9050919050565b6000602082019050818103600083015261194c818461174a565b905092915050565b6000808335600160200384360303811261197157611970611b2d565b5b80840192508235915067ffffffffffffffff82111561199357611992611b23565b5b6020830192506001820236038313156119af576119ae611b37565b5b509250929050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611a0082611a25565b9050919050565b6000611a1282611a25565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611a5a82611a61565b9050919050565b6000611a6c82611a73565b9050919050565b6000611a7e82611a25565b9050919050565b60005b83811015611aa3578082015181840152602081019050611a88565b83811115611ab2576000848401525b50505050565b60006002820490506001821680611ad057607f821691505b60208210811415611ae457611ae3611aea565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060008201527f6e6577206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b50565b611bdb816119f5565b8114611be657600080fd5b50565b611bf281611a07565b8114611bfd57600080fd5b50565b611c0981611a19565b8114611c1457600080fd5b50565b611c2081611a45565b8114611c2b57600080fd5b5056fea2646970667358221220801619c0db8564d5a735702597a61702ce1b64159c3db257029f7024326da27a64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a000000000000000000000000f091867ec603a6628ed83d274e835539d82e9cc8
-----Decoded View---------------
Arg [0] : connectorAddress_ (address): 0x000007Cf399229b2f5A4D043F20E90C9C98B7C6a
Arg [1] : zetaToken_ (address): 0xf091867EC603A6628eD83D274E835539D82e9cc8
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000000007cf399229b2f5a4d043f20e90c9c98b7c6a
Arg [1] : 000000000000000000000000f091867ec603a6628ed83d274e835539d82e9cc8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.