More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 27 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Bridge | 16264680 | 29 hrs ago | IN | 0 CRO | 0.57474143 | ||||
Transfer | 16264568 | 29 hrs ago | IN | 100 CRO | 0.10605 | ||||
Bridge | 16025057 | 16 days ago | IN | 0 CRO | 0.5749122 | ||||
Bridge | 16013202 | 17 days ago | IN | 0 CRO | 0.56937601 | ||||
Bridge | 16006882 | 18 days ago | IN | 0 CRO | 0.5749122 | ||||
Bridge | 16006225 | 18 days ago | IN | 0 CRO | 0.5749122 | ||||
Bridge | 16006114 | 18 days ago | IN | 0 CRO | 0.5749122 | ||||
Bridge | 16006040 | 18 days ago | IN | 0 CRO | 0.5749122 | ||||
Bridge | 16005984 | 18 days ago | IN | 0 CRO | 0.5720661 | ||||
Bridge | 16005915 | 18 days ago | IN | 0 CRO | 0.6086107 | ||||
Bridge | 15998327 | 18 days ago | IN | 0 CRO | 0.57474143 | ||||
Bridge | 15996637 | 18 days ago | IN | 0 CRO | 0.57474143 | ||||
Bridge | 15994510 | 18 days ago | IN | 0 CRO | 0.57474143 | ||||
Bridge | 15994474 | 18 days ago | IN | 0 CRO | 0.61803061 | ||||
Bridge | 15971755 | 20 days ago | IN | 0 CRO | 0.574791 | ||||
Bridge | 15970210 | 20 days ago | IN | 0 CRO | 0.5749122 | ||||
Bridge | 15970155 | 20 days ago | IN | 0 CRO | 0.57457579 | ||||
Bridge | 15865289 | 27 days ago | IN | 0 CRO | 0.574791 | ||||
Bridge | 15854953 | 27 days ago | IN | 0 CRO | 0.6289218 | ||||
Bridge | 15854914 | 27 days ago | IN | 0 CRO | 0.5748516 | ||||
Bridge | 15854828 | 27 days ago | IN | 0 CRO | 0.5691 | ||||
Bridge | 15843141 | 28 days ago | IN | 0 CRO | 0.574791 | ||||
Bridge | 15815646 | 30 days ago | IN | 0 CRO | 0.5749122 | ||||
Transfer | 15740862 | 35 days ago | IN | 10 CRO | 0.10605 | ||||
Bridge | 15732343 | 35 days ago | IN | 0 CRO | 0.66095449 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xD1e44db5...0546a8438 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ERC20WarpToken
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@vialabs/contracts/message/MessageClient.sol"; import "@openzeppelin/contracts-4/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts-4/token/ERC20/utils/SafeERC20.sol"; contract ERC20WarpToken is ERC20Burnable, MessageClient { IERC20 public immutable baseToken; uint public immutable homeChain; uint public immutable chainId; uint8 public immutable tokenDecimals; event TokensReceived(address _eTo, uint256 _eAmount); /** * On the "homeChain" the baseToken will be transferred to this contract and the equivalent amount of tokens will be minted on * the destination chain. On the destination chain the "new" ERC20 will be minted and transferred to the recipient. When bridging * back from a new chain to the home chain, the tokens will be burned on the destination chain and the equivalent amount will be * unlocked on the home chain from this contract. This acts as a "locker" for the tokens on the home chain. * * On each new non-home chain, the tokens will be burned on the source chain and minted on the destination chain (like helloerc20) * * @param _homeChain chain ID of the original ERC20 token * @param _baseToken address of the original ERC20 token (blank if not on the home chain) * @param _tokenName name of the ERC20 token on each additional chain (blank if on the home chain) * @param _tokenSymbol symbol of the ERC20 token on each additional chain (blank if on the home chain) * @param _tokenDecimals decimals of the ERC20 token on each additional chain */ constructor( uint _homeChain, address _baseToken, string memory _tokenName, string memory _tokenSymbol, uint8 _tokenDecimals ) ERC20(_tokenName, _tokenSymbol) { baseToken = IERC20(_baseToken); homeChain = _homeChain; chainId = block.chainid; tokenDecimals = _tokenDecimals; } /** * Bridge tokens from the current chain to the destination chain. If the current chain is the home chain, the tokens will be * transferred to this contract locked. If the current chain is not the home chain, the tokens will be burned on the current chain. * * After locking or burning, a cross chain message will be sent to the destination chain with the recipient and amount of tokens. * * @param _destChainId chain ID of the destination chain * @param _recipient address of the recipient on the destination chain * @param _amount amount of tokens to bridge */ function bridge( uint _destChainId, address _recipient, uint _amount ) external onlyActiveChain(_destChainId) { if (chainId == homeChain) { // lock tokens if home chain SafeERC20.safeTransferFrom( baseToken, msg.sender, address(this), _amount ); } else { // burn tokens if "new" chain _burn(msg.sender, _amount); } // send cross chain message _sendMessage(_destChainId, abi.encode(_recipient, _amount)); } function decimals() public view override returns (uint8) { return tokenDecimals; } /** * If the destination chain is the home chain, the tokens will be unlocked and transferred to the recipient. If the destination * chain is not the home chain, the tokens will be minted on the destination chain and transferred to the recipient. */ function messageProcess( uint, uint _sourceChainId, address _sender, address, uint, bytes calldata _data ) external override onlySelf(_sender, _sourceChainId) { (address _recipient, uint _amount) = abi.decode(_data, (address, uint)); if (chainId == homeChain) { // unlock tokens if home chain SafeERC20.safeTransfer(baseToken, _recipient, _amount); } else { // mint tokens of "new" chain _mint(_recipient, _amount); } emit TokensReceived(_recipient, _amount); } }
// 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 (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// 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.4) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated 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.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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 // 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.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol) pragma solidity ^0.8.0; import "./IBeacon.sol"; import "../Proxy.sol"; import "../ERC1967/ERC1967Upgrade.sol"; /** * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}. * * The beacon address is stored in storage slot `uint256(keccak256('eip1967.proxy.beacon')) - 1`, so that it doesn't * conflict with the storage layout of the implementation behind the proxy. * * _Available since v3.4._ */ contract BeaconProxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the proxy with `beacon`. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. This * will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity * constructor. * * Requirements: * * - `beacon` must be a contract with the interface {IBeacon}. */ constructor(address beacon, bytes memory data) payable { _upgradeBeaconToAndCall(beacon, data, false); } /** * @dev Returns the current beacon address. */ function _beacon() internal view virtual returns (address) { return _getBeacon(); } /** * @dev Returns the current implementation address of the associated beacon. */ function _implementation() internal view virtual override returns (address) { return IBeacon(_getBeacon()).implementation(); } /** * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}. * * If `data` is nonempty, it's used as data in a delegate call to the implementation returned by the beacon. * * Requirements: * * - `beacon` must be a contract. * - The implementation returned by `beacon` must be a contract. */ function _setBeacon(address beacon, bytes memory data) internal virtual { _upgradeBeaconToAndCall(beacon, data, false); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol) pragma solidity ^0.8.0; import "./IBeacon.sol"; import "../../access/Ownable.sol"; import "../../utils/Address.sol"; /** * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their * implementation contract, which is where they will delegate all function calls. * * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon. */ contract UpgradeableBeacon is IBeacon, Ownable { address private _implementation; /** * @dev Emitted when the implementation returned by the beacon is changed. */ event Upgraded(address indexed implementation); /** * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the * beacon. */ constructor(address implementation_) { _setImplementation(implementation_); } /** * @dev Returns the current implementation address. */ function implementation() public view virtual override returns (address) { return _implementation; } /** * @dev Upgrades the beacon to a new implementation. * * Emits an {Upgraded} event. * * Requirements: * * - msg.sender must be the owner of the contract. * - `newImplementation` must be a contract. */ function upgradeTo(address newImplementation) public virtual onlyOwner { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation contract address for this beacon * * Requirements: * * - `newImplementation` must be a contract. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract"); _implementation = newImplementation; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.0; import "../Proxy.sol"; import "./ERC1967Upgrade.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. */ contract ERC1967Proxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. * * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded * function call, and allows initializing the storage of the proxy like a Solidity constructor. */ constructor(address _logic, bytes memory _data) payable { _upgradeToAndCall(_logic, _data, false); } /** * @dev Returns the current implementation address. */ function _implementation() internal view virtual override returns (address impl) { return ERC1967Upgrade._getImplementation(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/IERC1967.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967Upgrade is IERC1967 { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.3) (proxy/transparent/ProxyAdmin.sol) pragma solidity ^0.8.0; import "./TransparentUpgradeableProxy.sol"; import "../../access/Ownable.sol"; /** * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}. */ contract ProxyAdmin is Ownable { /** * @dev Returns the current implementation of `proxy`. * * Requirements: * * - This contract must be the admin of `proxy`. */ function getProxyImplementation(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("implementation()")) == 0x5c60da1b (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b"); require(success); return abi.decode(returndata, (address)); } /** * @dev Returns the current admin of `proxy`. * * Requirements: * * - This contract must be the admin of `proxy`. */ function getProxyAdmin(ITransparentUpgradeableProxy proxy) public view virtual returns (address) { // We need to manually run the static call since the getter cannot be flagged as view // bytes4(keccak256("admin()")) == 0xf851a440 (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440"); require(success); return abi.decode(returndata, (address)); } /** * @dev Changes the admin of `proxy` to `newAdmin`. * * Requirements: * * - This contract must be the current admin of `proxy`. */ function changeProxyAdmin(ITransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner { proxy.changeAdmin(newAdmin); } /** * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}. * * Requirements: * * - This contract must be the admin of `proxy`. */ function upgrade(ITransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner { proxy.upgradeTo(implementation); } /** * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See * {TransparentUpgradeableProxy-upgradeToAndCall}. * * Requirements: * * - This contract must be the admin of `proxy`. */ function upgradeAndCall( ITransparentUpgradeableProxy proxy, address implementation, bytes memory data ) public payable virtual onlyOwner { proxy.upgradeToAndCall{value: msg.value}(implementation, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol) pragma solidity ^0.8.0; import "../ERC1967/ERC1967Proxy.sol"; /** * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy} * does not implement this interface directly, and some of its functions are implemented by an internal dispatch * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not * include them in the ABI so this interface must be used to interact with it. */ interface ITransparentUpgradeableProxy is IERC1967 { function admin() external view returns (address); function implementation() external view returns (address); function changeAdmin(address) external; function upgradeTo(address) external; function upgradeToAndCall(address, bytes memory) external payable; } /** * @dev This contract implements a proxy that is upgradeable by an admin. * * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector * clashing], which can potentially be used in an attack, this contract uses the * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two * things that go hand in hand: * * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if * that call matches one of the admin functions exposed by the proxy itself. * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the * implementation. If the admin tries to call a function on the implementation it will fail with an error that says * "admin cannot fallback to proxy target". * * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due * to sudden errors when trying to call a function from the proxy implementation. * * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy. * * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the * implementation. * * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised. */ contract TransparentUpgradeableProxy is ERC1967Proxy { /** * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}. */ constructor(address _logic, address admin_, bytes memory _data) payable ERC1967Proxy(_logic, _data) { _changeAdmin(admin_); } /** * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin. * * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the * implementation provides a function with the same selector. */ modifier ifAdmin() { if (msg.sender == _getAdmin()) { _; } else { _fallback(); } } /** * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior */ function _fallback() internal virtual override { if (msg.sender == _getAdmin()) { bytes memory ret; bytes4 selector = msg.sig; if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) { ret = _dispatchUpgradeTo(); } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) { ret = _dispatchUpgradeToAndCall(); } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) { ret = _dispatchChangeAdmin(); } else if (selector == ITransparentUpgradeableProxy.admin.selector) { ret = _dispatchAdmin(); } else if (selector == ITransparentUpgradeableProxy.implementation.selector) { ret = _dispatchImplementation(); } else { revert("TransparentUpgradeableProxy: admin cannot fallback to proxy target"); } assembly { return(add(ret, 0x20), mload(ret)) } } else { super._fallback(); } } /** * @dev Returns the current admin. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` */ function _dispatchAdmin() private returns (bytes memory) { _requireZeroValue(); address admin = _getAdmin(); return abi.encode(admin); } /** * @dev Returns the current implementation. * * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` */ function _dispatchImplementation() private returns (bytes memory) { _requireZeroValue(); address implementation = _implementation(); return abi.encode(implementation); } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _dispatchChangeAdmin() private returns (bytes memory) { _requireZeroValue(); address newAdmin = abi.decode(msg.data[4:], (address)); _changeAdmin(newAdmin); return ""; } /** * @dev Upgrade the implementation of the proxy. */ function _dispatchUpgradeTo() private returns (bytes memory) { _requireZeroValue(); address newImplementation = abi.decode(msg.data[4:], (address)); _upgradeToAndCall(newImplementation, bytes(""), false); return ""; } /** * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the * proxied contract. */ function _dispatchUpgradeToAndCall() private returns (bytes memory) { (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes)); _upgradeToAndCall(newImplementation, data, true); return ""; } /** * @dev Returns the current admin. * * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead. */ function _admin() internal view virtual returns (address) { return _getAdmin(); } /** * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to * emulate some proxy functions being non-payable while still allowing value to pass through. */ function _requireZeroValue() private { require(msg.value == 0); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// 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 // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // (c)2021-2024 Atlas // security-contact: [email protected] pragma solidity ^0.8.9; interface IERC20cl { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); }
// SPDX-License-Identifier: MIT // (c)2021-2024 Atlas // security-contact: [email protected] pragma solidity ^0.8.9; interface IMessageV3 { event SendRequested(uint txId, address sender, address recipient, uint chain, bool express, bytes data, uint16 confirmations); event SendProcessed(uint txId, uint sourceChainId, address sender, address recipient); event Success(uint txId, uint sourceChainId, address sender, address recipient, uint amount); event ErrorLog(uint txId, string message); event SetExsig(address caller, address signer); event SetMaxgas(address caller, uint maxGas); event SetMaxfee(address caller, uint maxFee); function chainsig() external view returns (address signer); function weth() external view returns (address wethTokenAddress); function feeToken() external view returns (address feeToken); function feeTokenDecimals() external view returns (uint feeTokenDecimals); function minFee() external view returns (uint minFee); function bridgeEnabled() external view returns (bool bridgeEnabled); function takeFeesOffline() external view returns (bool takeFeesOffline); function whitelistOnly() external view returns (bool whitelistOnly); function enabledChains(uint destChainId) external view returns (bool enabled); function customSourceFee(address caller) external view returns (uint customSourceFee); function maxgas(address caller) external view returns (uint maxgas); function exsig(address caller) external view returns (address signer); // @dev backwards compat with BridgeClient function minTokenForChain(uint chainId) external returns (uint amount); function sendMessage(address recipient, uint chain, bytes calldata data, uint16 confirmations, bool express) external returns (uint txId); // @dev backwards compat with BridgeClient function sendRequest(address recipient, uint chainId, uint amount, address referrer, bytes calldata data, uint16 confirmations) external returns (uint txId); function setExsig(address signer) external; function setMaxgas(uint maxgas) external; function setMaxfee(uint maxfee) external; function getSourceFee(uint _destChainId, bool _express) external view returns (uint _fee); }
// SPDX-License-Identifier: MIT // (c)2021-2024 Atlas // security-contact: [email protected] pragma solidity ^0.8.9; import "./IMessageV3.sol"; import "./IERC20cl.sol"; interface IFeature { function getPayload(uint _txId) external view returns (bytes memory); } interface IFeatureGateway { function isFeatureEnabled(uint32) external view returns (bool); function featureAddresses(uint32) external view returns (address); function messageV3() external view returns (IMessageV3); function processForward(uint _txId, uint _sourceChainId, uint _destChainId, address _sender, address _recipient, uint _gas, bytes[] calldata _data) external; function process(uint txId, uint sourceChainId, uint destChainId, address sender, address recipient, uint gas, uint32 featureId, bytes calldata featureReply, bytes[] calldata data) external; } /** * @title MessageV3 Client * @author Atlas <[email protected]> */ abstract contract MessageClient { IMessageV3 public MESSAGEv3; IERC20cl public FEE_TOKEN; IFeatureGateway public FEATURE_GATEWAY; mapping(uint => mapping(uint32 => ChainData)) public FEATURES; struct ChainData { address endpoint; // address of this contract on specified chain bytes endpointExtended; // address of this contract on non EVM uint16 confirmations; // source confirmations bool extended; // are we using extended endpoint? (addresses larger than uint256) } mapping(uint => ChainData) public CHAINS; address public MESSAGE_OWNER; modifier onlySelf(address _sender, uint _sourceChainId) { require(msg.sender == address(MESSAGEv3), "MessageClient: not authorized"); require(_sender == CHAINS[_sourceChainId].endpoint, "MessageClient: not authorized"); _; } modifier onlyActiveChain(uint _destinationChainId) { require(CHAINS[_destinationChainId].endpoint != address(0), "MessageClient: destination chain not active"); _; } modifier onlyMessageOwner() { require(msg.sender == MESSAGE_OWNER, "MessageClient: not authorized"); _; } event MessageOwnershipTransferred(address previousOwner, address newOwner); event RecoverToken(address owner, address token, uint amount); event SetMaxgas(address owner, uint maxGas); event SetMaxfee(address owner, uint maxfee); event SetExsig(address owner, address exsig); event SendMessageWithFeature(uint txId, uint destinationChainId, uint32 featureId, bytes featureData); constructor() { MESSAGE_OWNER = msg.sender; } function transferMessageOwnership(address _newMessageOwner) external onlyMessageOwner { MESSAGE_OWNER = _newMessageOwner; emit MessageOwnershipTransferred(msg.sender, _newMessageOwner); } /** BRIDGE RECEIVER */ // @dev DEPRICATED kept for backwards compatibility function messageProcess( uint _txId, // transaction id uint _sourceChainId, // source chain id address _sender, // corresponding MessageClient address on source chain address, uint, bytes calldata _data // encoded message from source chain ) external virtual onlySelf (_sender, _sourceChainId) { _processMessage(_txId, _sourceChainId, _data); } // @dev PREFERRED if no Features used // this is extended by the implementing class if not using Features function _processMessage(uint _txId, uint _sourceChainId, bytes calldata _data) internal virtual { (uint32 _featureId, bytes memory _featureData, bytes memory _messageData) = abi.decode(_data, (uint32, bytes, bytes)); // call the implementing class to process the message _processMessageWithFeature(_txId, _sourceChainId, _messageData, _featureId, _featureData, _getFeatureResponse(_featureId, _txId)); } // @dev REQUIRED if using Features // this is extended by the implementing class if using Features function _processMessageWithFeature( uint, // transaction id uint, // source chain id bytes memory, // encoded message from source chain uint32, // feature id bytes memory, // encoded feature data bytes memory // reply from feature processing off-chain ) internal virtual { revert("MessageClient: _processMessage or _processMessageWithFeature not implemented"); } function _getFeatureResponse(uint32 _featureId, uint _txId) internal view returns (bytes memory) { return IFeature(FEATURE_GATEWAY.featureAddresses(_featureId)).getPayload(_txId); } /** BRIDGE SENDER */ function _sendMessage(uint _destinationChainId, bytes memory _data) internal returns (uint _txId) { ChainData memory _chain = CHAINS[_destinationChainId]; if(_chain.extended) { // non-evm addresses larger than uint256 _data = abi.encode(_data, _chain.endpointExtended); } return IMessageV3(MESSAGEv3).sendMessage( _chain.endpoint, // corresponding MessageClient contract address on destination chain _destinationChainId, // id of the destination chain _data, // arbitrary data package to send _chain.confirmations, // amount of required transaction confirmations false // send express mode on destination ); } function _sendMessageExpress(uint _destinationChainId, bytes memory _data) internal returns (uint _txId) { ChainData memory _chain = CHAINS[_destinationChainId]; if(_chain.extended) { // non-evm addresses larger than uint256 _data = abi.encode(_data, _chain.endpointExtended); } return IMessageV3(MESSAGEv3).sendMessage( _chain.endpoint, // corresponding MessageV3Client contract address on destination chain _destinationChainId, // id of the destination chain _data, // arbitrary data package to send _chain.confirmations, // amount of required transaction confirmations true // send express mode on destination ); } function _sendMessageWithFeature(uint _destinationChainId, bytes memory _messageData, uint32 _featureId, bytes memory _featureData) internal returns (uint _txId) { require(FEATURE_GATEWAY.isFeatureEnabled(_featureId), "MessageClient: feature not enabled"); // wrap feature data into message data so it can be signed bytes memory _data = abi.encode(_featureId, _featureData, _messageData); ChainData memory _chain = CHAINS[_destinationChainId]; if(_chain.extended) { // non-evm addresses larger than uint256 _data = abi.encode(_data, _chain.endpointExtended); } _txId = IMessageV3(MESSAGEv3).sendMessage( _chain.endpoint, // corresponding MessageV3Client contract address on destination chain _destinationChainId, // id of the destination chain _data, // arbitrary data package to send _chain.confirmations, // amount of required transaction confirmations false // send express mode on destination ); // signal we have feature data included with the message data emit SendMessageWithFeature(_txId, _destinationChainId, _featureId, _featureData); } /** OWNER */ function configureClientExtended( address _messageV3, // MessageV3 bridge address uint[] calldata _chains, // list of chains to accept as valid destinations bytes[] calldata _endpoints, // list of corresponding MessageV3Client addresses on each chain uint16[] calldata _confirmations // confirmations required on each chain before processing ) external onlyMessageOwner { uint _chainsLength = _chains.length; for(uint x=0; x < _chainsLength; x++) { CHAINS[_chains[x]].confirmations = _confirmations[x]; CHAINS[_chains[x]].endpointExtended = _endpoints[x]; CHAINS[_chains[x]].extended = true; CHAINS[_chains[x]].endpoint = address(1); } _configureMessageV3(_messageV3); } function configureClient( address _messageV3, // MessageV3 bridge address uint[] calldata _chains, // list of chains to accept as valid destinations address[] calldata _endpoints, // list of corresponding MessageV3Client addresses on each chain uint16[] calldata _confirmations // confirmations required on each chain before processing ) public onlyMessageOwner { uint _chainsLength = _chains.length; for(uint x=0; x < _chainsLength; x++) { CHAINS[_chains[x]].confirmations = _confirmations[x]; CHAINS[_chains[x]].endpoint = _endpoints[x]; CHAINS[_chains[x]].extended = false; } _configureMessageV3(_messageV3); } function configureFeatureGateway(address _featureGateway) external onlyMessageOwner { FEATURE_GATEWAY = IFeatureGateway(_featureGateway); } function _configureMessageV3(address _messageV3) internal { MESSAGEv3 = IMessageV3(_messageV3); FEE_TOKEN = IERC20cl(MESSAGEv3.feeToken()); // approve bridge for source chain fees (limited per transaction with setMaxfee) if(address(FEE_TOKEN) != address(0)) { FEE_TOKEN.approve(address(MESSAGEv3), type(uint).max); } // approve bridge for destination gas fees (limited per transaction with setMaxgas) if(address(MESSAGEv3.weth()) != address(0)) { IERC20cl(MESSAGEv3.weth()).approve(address(MESSAGEv3), type(uint).max); } } function setExsig(address _signer) public onlyMessageOwner { MESSAGEv3.setExsig(_signer); emit SetExsig(msg.sender, _signer); } function setMaxgas(uint _maxGas) public onlyMessageOwner { MESSAGEv3.setMaxgas(_maxGas); emit SetMaxgas(msg.sender, _maxGas); } function setMaxfee(uint _maxFee) public onlyMessageOwner { MESSAGEv3.setMaxfee(_maxFee); emit SetMaxfee(msg.sender, _maxFee); } function recoverToken(address _token, uint _amount) public onlyMessageOwner { if(_token == address(0)) { // payable(msg.sender).transfer(_amount); // @note Zk needs (bool success, ) = payable(msg.sender).call{value: _amount}(""); require(success, "Transfer failed"); } else { IERC20cl(_token).transfer(msg.sender, _amount); } emit RecoverToken(msg.sender, _token, _amount); } function isSelf(address _sender, uint _sourceChainId) public view returns (bool) { if(_sender == CHAINS[_sourceChainId].endpoint) return true; return false; } function isAuthorized(address _sender, uint _sourceChainId) public view returns (bool) { return isSelf(_sender, _sourceChainId); } receive() external payable {} fallback() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts-4/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts-4/token/ERC20/extensions/ERC20Burnable.sol"; contract MockToken is ERC20, ERC20Burnable { constructor(string memory _name, string memory _ticker) ERC20(_name, _ticker) { } function mint(address _to, uint _amount) external { _mint(_to, _amount); } function burn(address _from, uint _amount) external { _burn(_from, _amount); } }
{ "optimizer": { "enabled": true, "runs": 10000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_homeChain","type":"uint256"},{"internalType":"address","name":"_baseToken","type":"address"},{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"uint8","name":"_tokenDecimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"MessageOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RecoverToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"txId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"featureId","type":"uint32"},{"indexed":false,"internalType":"bytes","name":"featureData","type":"bytes"}],"name":"SendMessageWithFeature","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"exsig","type":"address"}],"name":"SetExsig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxfee","type":"uint256"}],"name":"SetMaxfee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxGas","type":"uint256"}],"name":"SetMaxgas","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_eTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"_eAmount","type":"uint256"}],"name":"TokensReceived","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"CHAINS","outputs":[{"internalType":"address","name":"endpoint","type":"address"},{"internalType":"bytes","name":"endpointExtended","type":"bytes"},{"internalType":"uint16","name":"confirmations","type":"uint16"},{"internalType":"bool","name":"extended","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"FEATURES","outputs":[{"internalType":"address","name":"endpoint","type":"address"},{"internalType":"bytes","name":"endpointExtended","type":"bytes"},{"internalType":"uint16","name":"confirmations","type":"uint16"},{"internalType":"bool","name":"extended","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEATURE_GATEWAY","outputs":[{"internalType":"contract IFeatureGateway","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_TOKEN","outputs":[{"internalType":"contract IERC20cl","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MESSAGE_OWNER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MESSAGEv3","outputs":[{"internalType":"contract IMessageV3","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_destChainId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_messageV3","type":"address"},{"internalType":"uint256[]","name":"_chains","type":"uint256[]"},{"internalType":"address[]","name":"_endpoints","type":"address[]"},{"internalType":"uint16[]","name":"_confirmations","type":"uint16[]"}],"name":"configureClient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_messageV3","type":"address"},{"internalType":"uint256[]","name":"_chains","type":"uint256[]"},{"internalType":"bytes[]","name":"_endpoints","type":"bytes[]"},{"internalType":"uint16[]","name":"_confirmations","type":"uint16[]"}],"name":"configureClientExtended","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_featureGateway","type":"address"}],"name":"configureFeatureGateway","outputs":[],"stateMutability":"nonpayable","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":"homeChain","outputs":[{"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":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_sourceChainId","type":"uint256"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_sourceChainId","type":"uint256"}],"name":"isSelf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_sourceChainId","type":"uint256"},{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"messageProcess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setExsig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxFee","type":"uint256"}],"name":"setMaxfee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxGas","type":"uint256"}],"name":"setMaxgas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":"_newMessageOwner","type":"address"}],"name":"transferMessageOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106102175760003560e01c80637468a52b11610126578063b479a961116100a7578063c60853f611610079578063e47ad74d11610061578063e47ad74d1461075f578063f52a91981461077f578063f71941381461079f57005b8063c60853f6146106ec578063dd62ed3e1461070c57005b8063b479a9611461064b578063b7f494a41461066b578063bb0b98301461068b578063c55dae63146106b857005b806395d89b41116100f8578063a457c2d7116100e0578063a457c2d7146105eb578063a9059cbb1461060b578063b29a81401461062b57005b806395d89b41146105a25780639a8a0592146105b757005b80637468a52b146104f157806379cc679014610525578063853c75d81461054557806392ae12fd1461057257005b80632f820a5f116101b057806342966c68116101825780635f46e7401161016a5780635f46e7401461046157806370a082311461048157806373717b08146104c457005b806342966c6814610421578063559b2f651461044157005b80632f820a5f1461036c578063313ce5671461038c57806339509351146103cd5780633b97e856146103ed57005b806320bfe342116101e957806320bfe342146102ec57806323b872dd1461030c5780632972b0f01461032c5780632ee02d7c1461034c57005b806306fdde0314610220578063095ea7b31461024b5780630d0298021461027b57806318160ddd146102cd57005b3661021e57005b005b34801561022c57600080fd5b506102356107bf565b6040516102429190612c3b565b60405180910390f35b34801561025757600080fd5b5061026b610266366004612c70565b610851565b6040519015158152602001610242565b34801561028757600080fd5b506005546102a89073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610242565b3480156102d957600080fd5b506002545b604051908152602001610242565b3480156102f857600080fd5b5061026b610307366004612c70565b61086b565b34801561031857600080fd5b5061026b610327366004612c9c565b6108ab565b34801561033857600080fd5b5061026b610347366004612c70565b6108cf565b34801561035857600080fd5b5061021e610367366004612d29565b6108e2565b34801561037857600080fd5b5061021e610387366004612dd6565b610ae4565b34801561039857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000125b60405160ff9091168152602001610242565b3480156103d957600080fd5b5061026b6103e8366004612c70565b610c63565b3480156103f957600080fd5b506103bb7f000000000000000000000000000000000000000000000000000000000000001281565b34801561042d57600080fd5b5061021e61043c366004612dfd565b610caf565b34801561044d57600080fd5b5061021e61045c366004612e16565b610cbc565b34801561046d57600080fd5b5061021e61047c366004612e33565b610dbe565b34801561048d57600080fd5b506102de61049c366004612e16565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b3480156104d057600080fd5b506006546102a89073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104fd57600080fd5b506102de7f000000000000000000000000000000000000000000000000000000000000001981565b34801561053157600080fd5b5061021e610540366004612c70565b610fc3565b34801561055157600080fd5b50600a546102a89073ffffffffffffffffffffffffffffffffffffffff1681565b34801561057e57600080fd5b5061059261058d366004612dfd565b610fdc565b6040516102429493929190612ee8565b3480156105ae57600080fd5b506102356110ae565b3480156105c357600080fd5b506102de7f000000000000000000000000000000000000000000000000000000000000001981565b3480156105f757600080fd5b5061026b610606366004612c70565b6110bd565b34801561061757600080fd5b5061026b610626366004612c70565b61118e565b34801561063757600080fd5b5061021e610646366004612c70565b61119c565b34801561065757600080fd5b5061021e610666366004612dfd565b6113e3565b34801561067757600080fd5b5061021e610686366004612d29565b61151f565b34801561069757600080fd5b506007546102a89073ffffffffffffffffffffffffffffffffffffffff1681565b3480156106c457600080fd5b506102a87f00000000000000000000000041bc026dabe978bc2fafea1850456511ca4b01bc81565b3480156106f857600080fd5b5061021e610707366004612e16565b611743565b34801561071857600080fd5b506102de610727366004612f33565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b34801561076b57600080fd5b5061021e61077a366004612dfd565b611895565b34801561078b57600080fd5b5061059261079a366004612f6c565b6119d1565b3480156107ab57600080fd5b5061021e6107ba366004612e16565b611a15565b6060600380546107ce90612f9a565b80601f01602080910402602001604051908101604052809291908181526020018280546107fa90612f9a565b80156108475780601f1061081c57610100808354040283529160200191610847565b820191906000526020600020905b81548152906001019060200180831161082a57829003601f168201915b5050505050905090565b60003361085f818585611add565b60019150505b92915050565b60008181526009602052604081205473ffffffffffffffffffffffffffffffffffffffff908116908416036108a257506001610865565b50600092915050565b6000336108b9858285611c91565b6108c4858585611d68565b506001949350505050565b60006108db838361086b565b9392505050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a656400000060448201526064015b60405180910390fd5b8460005b81811015610ad05783838281811061098657610986612fed565b905060200201602081019061099b919061301c565b600960008a8a858181106109b1576109b1612fed565b90506020020135815260200190815260200160002060020160006101000a81548161ffff021916908361ffff1602179055508585828181106109f5576109f5612fed565b9050602002016020810190610a0a9190612e16565b600960008a8a85818110610a2057610a20612fed565b90506020020135815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960008a8a85818110610a8e57610a8e612fed565b90506020020135815260200190815260200160002060020160026101000a81548160ff0219169083151502179055508080610ac89061306f565b91505061096c565b50610ada88611fd7565b5050505050505050565b600083815260096020526040902054839073ffffffffffffffffffffffffffffffffffffffff16610b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4d657373616765436c69656e743a2064657374696e6174696f6e20636861696e60448201527f206e6f7420616374697665000000000000000000000000000000000000000000606482015260840161095f565b7f00000000000000000000000000000000000000000000000000000000000000197f000000000000000000000000000000000000000000000000000000000000001903610c0f57610c0a7f00000000000000000000000041bc026dabe978bc2fafea1850456511ca4b01bc333085612396565b610c19565b610c193383612472565b6040805173ffffffffffffffffffffffffffffffffffffffff85166020820152908101839052610c5c908590606001604051602081830303815290604052612633565b5050505050565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919061085f9082908690610caa9087906130a7565b611add565b610cb93382612472565b50565b600a5473ffffffffffffffffffffffffffffffffffffffff163314610d3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040805133815260208101929092527fe1a25f463c6504824e91268b5b2c05658d5358c9c1698a85346cfae5336a642e91015b60405180910390a150565b6005548590879073ffffffffffffffffffffffffffffffffffffffff163314610e43576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b60008181526009602052604090205473ffffffffffffffffffffffffffffffffffffffff838116911614610ed3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b600080610ee285870187612c70565b915091507f00000000000000000000000000000000000000000000000000000000000000197f000000000000000000000000000000000000000000000000000000000000001903610f5d57610f587f00000000000000000000000041bc026dabe978bc2fafea1850456511ca4b01bc8383612804565b610f67565b610f67828261285a565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527f5a0ebf9442637ca6e817894481a6de0c29715a73efc9e02bb7ef4ed52843362d910160405180910390a15050505050505050505050565b610fce823383611c91565b610fd88282612472565b5050565b6009602052600090815260409020805460018201805473ffffffffffffffffffffffffffffffffffffffff909216929161101590612f9a565b80601f016020809104026020016040519081016040528092919081815260200182805461104190612f9a565b801561108e5780601f106110635761010080835404028352916020019161108e565b820191906000526020600020905b81548152906001019060200180831161107157829003601f168201915b5050506002909301549192505061ffff81169060ff620100009091041684565b6060600480546107ce90612f9a565b33600081815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915281205490919083811015611181576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f000000000000000000000000000000000000000000000000000000606482015260840161095f565b6108c48286868403611add565b60003361085f818585611d68565b600a5473ffffffffffffffffffffffffffffffffffffffff16331461121d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b73ffffffffffffffffffffffffffffffffffffffff82166112f057604051600090339083908381818185875af1925050503d806000811461127a576040519150601f19603f3d011682016040523d82523d6000602084013e61127f565b606091505b50509050806112ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5472616e73666572206661696c65640000000000000000000000000000000000604482015260640161095f565b50611389565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff83169063a9059cbb906044016020604051808303816000875af1158015611363573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138791906130ba565b505b6040805133815273ffffffffffffffffffffffffffffffffffffffff841660208201529081018290527f16a1412f01b73c390eb2548427101644aa86c1443c272f73df00fb74c48fe4999060600160405180910390a15050565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611464576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b6005546040517fb479a9610000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff9091169063b479a96190602401600060405180830381600087803b1580156114d057600080fd5b505af11580156114e4573d6000803e3d6000fd5b505060408051338152602081018590527f7b6bdf5a54b984bdb41e777eb126123085d57633ab56d408d9a1d39dd894e7bb9350019050610db3565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146115a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b8460005b81811015610ad0578383828181106115be576115be612fed565b90506020020160208101906115d3919061301c565b600960008a8a858181106115e9576115e9612fed565b90506020020135815260200190815260200160002060020160006101000a81548161ffff021916908361ffff16021790555085858281811061162d5761162d612fed565b905060200281019061163f91906130dc565b600960008b8b8681811061165557611655612fed565b905060200201358152602001908152602001600020600101918261167a9291906131be565b506001600960008a8a8581811061169357611693612fed565b90506020020135815260200190815260200160002060020160026101000a81548160ff0219169083151502179055506001600960008a8a858181106116da576116da612fed565b90506020020135815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808061173b9061306f565b9150506115a4565b600a5473ffffffffffffffffffffffffffffffffffffffff1633146117c4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b6005546040517fc60853f600000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301529091169063c60853f690602401600060405180830381600087803b15801561183157600080fd5b505af1158015611845573d6000803e3d6000fd5b50506040805133815273ffffffffffffffffffffffffffffffffffffffff851660208201527f3785abad972484d82ebc033d8eb190737cd209b24e7f853dd622e415c3f537a29350019050610db3565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611916576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b6005546040517fe47ad74d0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff9091169063e47ad74d90602401600060405180830381600087803b15801561198257600080fd5b505af1158015611996573d6000803e3d6000fd5b505060408051338152602081018590527f83f76efc0c025b2e3779f7bcead5a89ddaf05dc7829157cdab021a8591e7a6f99350019050610db3565b60086020908152600092835260408084209091529082529020805460018201805473ffffffffffffffffffffffffffffffffffffffff909216929161101590612f9a565b600a5473ffffffffffffffffffffffffffffffffffffffff163314611a96576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4d657373616765436c69656e743a206e6f7420617574686f72697a6564000000604482015260640161095f565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b73ffffffffffffffffffffffffffffffffffffffff8316611b7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff8216611c22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f7373000000000000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611d625781811015611d55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161095f565b611d628484848403611add565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316611e0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f6472657373000000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff8216611eae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f6573730000000000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205481811015611f64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e63650000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611d62565b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117909155604080517f647846a5000000000000000000000000000000000000000000000000000000008152905163647846a5916004808201926020929091908290030181865afa15801561206e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061209291906132d8565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691821790551561219b576006546005546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602482015291169063095ea7b3906044016020604051808303816000875af1158015612175573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219991906130ba565b505b600554604080517f3fc8cef3000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691633fc8cef39160048083019260209291908290030181865afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222f91906132d8565b73ffffffffffffffffffffffffffffffffffffffff1614610cb957600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633fc8cef36040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122db91906132d8565b6005546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602482015291169063095ea7b3906044016020604051808303816000875af1158015612372573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd891906130ba565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052611d629085907f23b872dd00000000000000000000000000000000000000000000000000000000906084015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261294d565b73ffffffffffffffffffffffffffffffffffffffff8216612515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f7300000000000000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260208190526040902054818110156125cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f6365000000000000000000000000000000000000000000000000000000000000606482015260840161095f565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611c84565b505050565b6000828152600960209081526040808320815160808101909252805473ffffffffffffffffffffffffffffffffffffffff16825260018101805485948401919061267c90612f9a565b80601f01602080910402602001604051908101604052809291908181526020018280546126a890612f9a565b80156126f55780601f106126ca576101008083540402835291602001916126f5565b820191906000526020600020905b8154815290600101906020018083116126d857829003601f168201915b50505091835250506002919091015461ffff8116602083015262010000900460ff161515604090910152606081015190915015612755578281602001516040516020016127439291906132f5565b60405160208183030381529060405292505b600554815160408084015190517ffdadc90c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9093169263fdadc90c926127b992909189918991600090600401613323565b6020604051808303816000875af11580156127d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127fc9190613375565b949350505050565b60405173ffffffffffffffffffffffffffffffffffffffff831660248201526044810182905261262e9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064016123f0565b73ffffffffffffffffffffffffffffffffffffffff82166128d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161095f565b80600260008282546128e991906130a7565b909155505073ffffffffffffffffffffffffffffffffffffffff8216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60006129af826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612a5c9092919063ffffffff16565b90508051600014806129d05750808060200190518101906129d091906130ba565b61262e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161095f565b60606127fc8484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051612a90919061338e565b60006040518083038185875af1925050503d8060008114612acd576040519150601f19603f3d011682016040523d82523d6000602084013e612ad2565b606091505b5091509150612ae387838387612aee565b979650505050505050565b60608315612b84578251600003612b7d5773ffffffffffffffffffffffffffffffffffffffff85163b612b7d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161095f565b50816127fc565b6127fc8383815115612b995781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095f9190612c3b565b60005b83811015612be8578181015183820152602001612bd0565b50506000910152565b60008151808452612c09816020860160208601612bcd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006108db6020830184612bf1565b73ffffffffffffffffffffffffffffffffffffffff81168114610cb957600080fd5b60008060408385031215612c8357600080fd5b8235612c8e81612c4e565b946020939093013593505050565b600080600060608486031215612cb157600080fd5b8335612cbc81612c4e565b92506020840135612ccc81612c4e565b929592945050506040919091013590565b60008083601f840112612cef57600080fd5b50813567ffffffffffffffff811115612d0757600080fd5b6020830191508360208260051b8501011115612d2257600080fd5b9250929050565b60008060008060008060006080888a031215612d4457600080fd5b8735612d4f81612c4e565b9650602088013567ffffffffffffffff80821115612d6c57600080fd5b612d788b838c01612cdd565b909850965060408a0135915080821115612d9157600080fd5b612d9d8b838c01612cdd565b909650945060608a0135915080821115612db657600080fd5b50612dc38a828b01612cdd565b989b979a50959850939692959293505050565b600080600060608486031215612deb57600080fd5b833592506020840135612ccc81612c4e565b600060208284031215612e0f57600080fd5b5035919050565b600060208284031215612e2857600080fd5b81356108db81612c4e565b600080600080600080600060c0888a031215612e4e57600080fd5b87359650602088013595506040880135612e6781612c4e565b94506060880135612e7781612c4e565b93506080880135925060a088013567ffffffffffffffff80821115612e9b57600080fd5b818a0191508a601f830112612eaf57600080fd5b813581811115612ebe57600080fd5b8b6020828501011115612ed057600080fd5b60208301945080935050505092959891949750929550565b73ffffffffffffffffffffffffffffffffffffffff85168152608060208201526000612f176080830186612bf1565b61ffff9490941660408301525090151560609091015292915050565b60008060408385031215612f4657600080fd5b8235612f5181612c4e565b91506020830135612f6181612c4e565b809150509250929050565b60008060408385031215612f7f57600080fd5b82359150602083013563ffffffff81168114612f6157600080fd5b600181811c90821680612fae57607f821691505b602082108103612fe7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561302e57600080fd5b813561ffff811681146108db57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036130a0576130a0613040565b5060010190565b8082018082111561086557610865613040565b6000602082840312156130cc57600080fd5b815180151581146108db57600080fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261311157600080fd5b83018035915067ffffffffffffffff82111561312c57600080fd5b602001915036819003821315612d2257600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82111561262e57600081815260208120601f850160051c810160208610156131975750805b601f850160051c820191505b818110156131b6578281556001016131a3565b505050505050565b67ffffffffffffffff8311156131d6576131d6613141565b6131ea836131e48354612f9a565b83613170565b6000601f84116001811461323c57600085156132065750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355610c5c565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561328b578685013582556020948501946001909201910161326b565b50868210156132c6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000602082840312156132ea57600080fd5b81516108db81612c4e565b6040815260006133086040830185612bf1565b828103602084015261331a8185612bf1565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815284602082015260a06040820152600061335860a0830186612bf1565b61ffff949094166060830152509015156080909101529392505050565b60006020828403121561338757600080fd5b5051919050565b600082516133a0818460208701612bcd565b919091019291505056fea264697066735822122018050c770c238018c942c75d5b043171bd54d7c026fb3ea1efce3f6301598bac64736f6c63430008110033
Deployed Bytecode Sourcemap
265:4054:25:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2158:98:0;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4444:197;;;;;;;;;;-1:-1:-1;4444:197:0;;;;;:::i;:::-;;:::i;:::-;;;1473:14:27;;1466:22;1448:41;;1436:2;1421:18;4444:197:0;1308:187:27;966:27:24;;;;;;;;;;-1:-1:-1;966:27:24;;;;;;;;;;;1695:42:27;1683:55;;;1665:74;;1653:2;1638:18;966:27:24;1500:245:27;3255:106:0;;;;;;;;;;-1:-1:-1;3342:12:0;;3255:106;;;1896:25:27;;;1884:2;1869:18;3255:106:0;1750:177:27;10712:178:24;;;;;;;;;;-1:-1:-1;10712:178:24;;;;;:::i;:::-;;:::i;5203:256:0:-;;;;;;;;;;-1:-1:-1;5203:256:0;;;;;:::i;:::-;;:::i;10896:142:24:-;;;;;;;;;;-1:-1:-1;10896:142:24;;;;;:::i;:::-;;:::i;8269:722::-;;;;;;;;;;-1:-1:-1;8269:722:24;;;;;:::i;:::-;;:::i;2683:622:25:-;;;;;;;;;;-1:-1:-1;2683:622:25;;;;;:::i;:::-;;:::i;3313:96::-;;;;;;;;;;-1:-1:-1;3388:13:25;3313:96;;;4553:4:27;4541:17;;;4523:36;;4511:2;4496:18;3313:96:25;4381:184:27;5854:234:0;;;;;;;;;;-1:-1:-1;5854:234:0;;;;;:::i;:::-;;:::i;442:36:25:-;;;;;;;;;;;;;;;578:89:2;;;;;;;;;;-1:-1:-1;578:89:2;;;;;:::i;:::-;;:::i;2586:207:24:-;;;;;;;;;;-1:-1:-1;2586:207:24;;;;;:::i;:::-;;:::i;3690:626:25:-;;;;;;;;;;-1:-1:-1;3690:626:25;;;;;:::i;:::-;;:::i;3419:125:0:-;;;;;;;;;;-1:-1:-1;3419:125:0;;;;;:::i;:::-;3519:18;;3493:7;3519:18;;;;;;;;;;;;3419:125;999:25:24;;;;;;;;;;-1:-1:-1;999:25:24;;;;;;;;368:31:25;;;;;;;;;;;;;;;973:161:2;;;;;;;;;;-1:-1:-1;973:161:2;;;;;:::i;:::-;;:::i;1505:28:24:-;;;;;;;;;;-1:-1:-1;1505:28:24;;;;;;;;1459:40;;;;;;;;;;-1:-1:-1;1459:40:24;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;2369:102:0:-;;;;;;;;;;;;;:::i;406:29:25:-;;;;;;;;;;;;;;;6575:427:0;;;;;;;;;;-1:-1:-1;6575:427:0;;;;;:::i;:::-;;:::i;3740:189::-;;;;;;;;;;-1:-1:-1;3740:189:0;;;;;:::i;:::-;;:::i;10235:471:24:-;;;;;;;;;;-1:-1:-1;10235:471:24;;;;;:::i;:::-;;:::i;10082:147::-;;;;;;;;;;-1:-1:-1;10082:147:24;;;;;:::i;:::-;;:::i;7472:791::-;;;;;;;;;;-1:-1:-1;7472:791:24;;;;;:::i;:::-;;:::i;1030:38::-;;;;;;;;;;-1:-1:-1;1030:38:24;;;;;;;;328:33:25;;;;;;;;;;;;;;;9776:147:24;;;;;;;;;;-1:-1:-1;9776:147:24;;;;;:::i;:::-;;:::i;3987:149:0:-;;;;;;;;;;-1:-1:-1;3987:149:0;;;;;:::i;:::-;4102:18;;;;4076:7;4102:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3987:149;9929:147:24;;;;;;;;;;-1:-1:-1;9929:147:24;;;;;:::i;:::-;;:::i;1074:61::-;;;;;;;;;;-1:-1:-1;1074:61:24;;;;;:::i;:::-;;:::i;8997:151::-;;;;;;;;;;-1:-1:-1;8997:151:24;;;;;:::i;:::-;;:::i;2158:98:0:-;2212:13;2244:5;2237:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2158:98;:::o;4444:197::-;4527:4;734:10:7;4581:32:0;734:10:7;4597:7:0;4606:6;4581:8;:32::i;:::-;4630:4;4623:11;;;4444:197;;;;;:::o;10712:178:24:-;10787:4;10817:22;;;:6;:22;;;;;:31;;;;;10806:42;;;;10803:58;;-1:-1:-1;10857:4:24;10850:11;;10803:58;-1:-1:-1;10878:5:24;10712:178;;;;:::o;5203:256:0:-;5300:4;734:10:7;5356:38:0;5372:4;734:10:7;5387:6:0;5356:15;:38::i;:::-;5404:27;5414:4;5420:2;5424:6;5404:9;:27::i;:::-;-1:-1:-1;5448:4:0;;5203:256;-1:-1:-1;;;;5203:256:0:o;10896:142:24:-;10977:4;11000:31;11007:7;11016:14;11000:6;:31::i;:::-;10993:38;10896:142;-1:-1:-1;;;10896:142:24:o;8269:722::-;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;;;;;;;;;8698:7;8677:18:::1;8722:221;8740:13;8736:1;:17;8722:221;;;8809:14;;8824:1;8809:17;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;8774:6;:18;8781:7;;8789:1;8781:10;;;;;;;:::i;:::-;;;;;;;8774:18;;;;;;;;;;;:32;;;:52;;;;;;;;;;;;;;;;;;8870:10;;8881:1;8870:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;8840:6;:18;8847:7;;8855:1;8847:10;;;;;;;:::i;:::-;;;;;;;8840:18;;;;;;;;;;;:27;;;:43;;;;;;;;;;;;;;;;;;8927:5;8897:6;:18;8904:7;;8912:1;8904:10;;;;;;;:::i;:::-;;;;;;;8897:18;;;;;;;;;;;:27;;;:35;;;;;;;;;;;;;;;;;;8755:3;;;;;:::i;:::-;;;;8722:221;;;;8953:31;8973:10;8953:19;:31::i;:::-;8667:324;8269:722:::0;;;;;;;:::o;2683:622:25:-;1915:1:24;1867:27;;;:6;:27;;;;;:36;2811:12:25;;1867:50:24;:36;1859:106;;;;;;;11411:2:27;1859:106:24;;;11393:21:27;11450:2;11430:18;;;11423:30;11489:34;11469:18;;;11462:62;11560:13;11540:18;;;11533:41;11591:19;;1859:106:24;11209:407:27;1859:106:24;2851:9:25::1;2840:7;:20:::0;2836:353:::1;;2919:156;2964:9;2992:10;3029:4;3053:7;2919:26;:156::i;:::-;2836:353;;;3151:26;3157:10;3169:7;3151:5;:26::i;:::-;3265:31;::::0;;11825:42:27;11813:55;;3265:31:25::1;::::0;::::1;11795:74:27::0;11885:18;;;11878:34;;;3238:59:25::1;::::0;3251:12;;11768:18:27;;3265:31:25::1;;;;;;;;;;;;3238:12;:59::i;:::-;;2683:622:::0;;;;:::o;5854:234:0:-;734:10:7;5942:4:0;4102:18;;;:11;:18;;;;;;;;;:27;;;;;;;;;;5942:4;;734:10:7;5996:64:0;;734:10:7;;4102:27:0;;6021:38;;6049:10;;6021:38;:::i;:::-;5996:8;:64::i;578:89:2:-;633:27;734:10:7;653:6:2;633:5;:27::i;:::-;578:89;:::o;2586:207:24:-;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;2682:13:::1;:32:::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;2729:57:::1;::::0;;2757:10:::1;12288:34:27::0;;12353:2;12338:18;;12331:43;;;;2729:57:24::1;::::0;12200:18:27;2729:57:24::1;;;;;;;;2586:207:::0;:::o;3690:626:25:-;1636:9:24;;3883:7:25;;3892:14;;1636:9:24;;1614:10;:32;1606:74;;;;;;;10198:2:27;1606:74:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;1606:74:24;9996:353:27;1606:74:24;1709:22;;;;:6;:22;;;;;:31;;1698:42;;;1709:31;;1698:42;1690:84;;;;;;;10198:2:27;1690:84:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;1690:84:24;9996:353:27;1690:84:24;3920:18:25::1;::::0;3956:34:::1;::::0;;::::1;3967:5:::0;3956:34:::1;:::i;:::-;3919:71;;;;4018:9;4007:7;:20:::0;4003:253:::1;;4088:54;4111:9;4122:10;4134:7;4088:22;:54::i;:::-;4003:253;;;4218:26;4224:10;4236:7;4218:5;:26::i;:::-;4273:35;::::0;;11825:42:27;11813:55;;11795:74;;11900:2;11885:18;;11878:34;;;4273:35:25::1;::::0;11768:18:27;4273:35:25::1;;;;;;;3908:408;;3690:626:::0;;;;;;;;;:::o;973:161:2:-;1049:46;1065:7;734:10:7;1088:6:2;1049:15;:46::i;:::-;1105:22;1111:7;1120:6;1105:5;:22::i;:::-;973:161;;:::o;1459:40:24:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1459:40:24;;;;;;;-1:-1:-1;;1459:40:24;;;;;;;;;;;:::o;2369:102:0:-;2425:13;2457:7;2450:14;;;;;:::i;6575:427::-;734:10:7;6668:4:0;4102:18;;;:11;:18;;;;;;;;;:27;;;;;;;;;;6668:4;;734:10:7;6812:15:0;6792:16;:35;;6784:85;;;;;;;12915:2:27;6784:85:0;;;12897:21:27;12954:2;12934:18;;;12927:30;12993:34;12973:18;;;12966:62;13064:7;13044:18;;;13037:35;13089:19;;6784:85:0;12713:401:27;6784:85:0;6903:60;6912:5;6919:7;6947:15;6928:16;:34;6903:8;:60::i;3740:189::-;3819:4;734:10:7;3873:28:0;734:10:7;3890:2:0;3894:6;3873:9;:28::i;10235:471:24:-;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;10324:20:::1;::::0;::::1;10321:323;;10463:44;::::0;10445:12:::1;::::0;10471:10:::1;::::0;10495:7;;10445:12;10463:44;10445:12;10463:44;10495:7;10471:10;10463:44:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10444:63;;;10529:7;10521:35;;;::::0;::::1;::::0;;13531:2:27;10521:35:24::1;::::0;::::1;13513:21:27::0;13570:2;13550:18;;;13543:30;13609:17;13589:18;;;13582:45;13644:18;;10521:35:24::1;13329:339:27::0;10521:35:24::1;10346:221;10321:323;;;10587:46;::::0;;;;10613:10:::1;10587:46;::::0;::::1;11795:74:27::0;11885:18;;;11878:34;;;10587:25:24::1;::::0;::::1;::::0;::::1;::::0;11768:18:27;;10587:46:24::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;10321:323;10658:41;::::0;;10671:10:::1;14218:34:27::0;;14167:42;14288:15;;14283:2;14268:18;;14261:43;14320:18;;;14313:34;;;10658:41:24::1;::::0;14145:2:27;14130:18;10658:41:24::1;;;;;;;10235:471:::0;;:::o;10082:147::-;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;10149:9:::1;::::0;:28:::1;::::0;;;;::::1;::::0;::::1;1896:25:27::0;;;10149:9:24::1;::::0;;::::1;::::0;:19:::1;::::0;1869:18:27;;10149:28:24::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;10192:30:24::1;::::0;;10202:10:::1;11795:74:27::0;;11900:2;11885:18;;11878:34;;;10192:30:24::1;::::0;-1:-1:-1;11768:18:27;;-1:-1:-1;10192:30:24::1;11621:297:27::0;7472:791:24;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;7909:7;7888:18:::1;7933:282;7951:13;7947:1;:17;7933:282;;;8020:14;;8035:1;8020:17;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;7985:6;:18;7992:7;;8000:1;7992:10;;;;;;;:::i;:::-;;;;;;;7985:18;;;;;;;;;;;:32;;;:52;;;;;;;;;;;;;;;;;;8089:10;;8100:1;8089:13;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;8051:6;:18;8058:7;;8066:1;8058:10;;;;;;;:::i;:::-;;;;;;;8051:18;;;;;;;;;;;:35;;:51;;;;;;;:::i;:::-;;8146:4;8116:6;:18;8123:7;;8131:1;8123:10;;;;;;;:::i;:::-;;;;;;;8116:18;;;;;;;;;;;:27;;;:34;;;;;;;;;;;;;;;;;;8202:1;8164:6;:18;8171:7;;8179:1;8171:10;;;;;;;:::i;:::-;;;;;;;8164:18;;;;;;;;;;;:27;;;:40;;;;;;;;;;;;;;;;;;7966:3;;;;;:::i;:::-;;;;7933:282;;9776:147:::0;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;9845:9:::1;::::0;:27:::1;::::0;;;;:9:::1;1683:55:27::0;;;9845:27:24::1;::::0;::::1;1665:74:27::0;9845:9:24;;::::1;::::0;:18:::1;::::0;1638::27;;9845:27:24::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;9887:29:24::1;::::0;;9896:10:::1;12288:34:27::0;;12237:42;12358:15;;12353:2;12338:18;;12331:43;9887:29:24::1;::::0;-1:-1:-1;12200:18:27;;-1:-1:-1;9887:29:24::1;12053:327:27::0;9929:147:24;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;9996:9:::1;::::0;:28:::1;::::0;;;;::::1;::::0;::::1;1896:25:27::0;;;9996:9:24::1;::::0;;::::1;::::0;:19:::1;::::0;1869:18:27;;9996:28:24::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;10039:30:24::1;::::0;;10049:10:::1;11795:74:27::0;;11900:2;11885:18;;11878:34;;;10039:30:24::1;::::0;-1:-1:-1;11768:18:27;;-1:-1:-1;10039:30:24::1;11621:297:27::0;1074:61:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;8997:151::-;2049:13;;;;2035:10;:27;2027:69;;;;;;;10198:2:27;2027:69:24;;;10180:21:27;10237:2;10217:18;;;10210:30;10276:31;10256:18;;;10249:59;10325:18;;2027:69:24;9996:353:27;2027:69:24;9091:15:::1;:50:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;8997:151::o;10457:340:0:-;10558:19;;;10550:68;;;;;;;17565:2:27;10550:68:0;;;17547:21:27;17604:2;17584:18;;;17577:30;17643:34;17623:18;;;17616:62;17714:6;17694:18;;;17687:34;17738:19;;10550:68:0;17363:400:27;10550:68:0;10636:21;;;10628:68;;;;;;;17970:2:27;10628:68:0;;;17952:21:27;18009:2;17989:18;;;17982:30;18048:34;18028:18;;;18021:62;18119:4;18099:18;;;18092:32;18141:19;;10628:68:0;17768:398:27;10628:68:0;10707:18;;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10758:32;;1896:25:27;;;10758:32:0;;1869:18:27;10758:32:0;;;;;;;;10457:340;;;:::o;11078:411::-;4102:18;;;;11178:24;4102:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;11264:17;11244:37;;11240:243;;11325:6;11305:16;:26;;11297:68;;;;;;;18373:2:27;11297:68:0;;;18355:21:27;18412:2;18392:18;;;18385:30;18451:31;18431:18;;;18424:59;18500:18;;11297:68:0;18171:353:27;11297:68:0;11407:51;11416:5;11423:7;11451:6;11432:16;:25;11407:8;:51::i;:::-;11168:321;11078:411;;;:::o;7456:788::-;7552:18;;;7544:68;;;;;;;18731:2:27;7544:68:0;;;18713:21:27;18770:2;18750:18;;;18743:30;18809:34;18789:18;;;18782:62;18880:7;18860:18;;;18853:35;18905:19;;7544:68:0;18529:401:27;7544:68:0;7630:16;;;7622:64;;;;;;;19137:2:27;7622:64:0;;;19119:21:27;19176:2;19156:18;;;19149:30;19215:34;19195:18;;;19188:62;19286:5;19266:18;;;19259:33;19309:19;;7622:64:0;18935:399:27;7622:64:0;7768:15;;;7746:19;7768:15;;;;;;;;;;;7801:21;;;;7793:72;;;;;;;19541:2:27;7793:72:0;;;19523:21:27;19580:2;19560:18;;;19553:30;19619:34;19599:18;;;19592:62;19690:8;19670:18;;;19663:36;19716:19;;7793:72:0;19339:402:27;7793:72:0;7899:15;;;;:9;:15;;;;;;;;;;;7917:20;;;7899:38;;8114:13;;;;;;;;;;:23;;;;;;8163:26;;1896:25:27;;;8114:13:0;;8163:26;;1869:18:27;8163:26:0;;;;;;;8200:37;9375:659;9154:616:24;9222:9;:34;;;;;;;;;;;;;9287:20;;;;;;;;:18;;:20;;;;;;;;;;;;;;;9222:34;9287:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9266:9;:42;;;;;;;;;;;;;;9411:32;9408:115;;9459:9;;9485;;9459:53;;;;;:9;9485;;;9459:53;;;11795:74:27;9497:14:24;11885:18:27;;;11878:34;9459:9:24;;;:17;;11768:18:27;;9459:53:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;9408:115;9636:9;;:16;;;;;;;;9665:1;;9628:39;9636:9;;:14;;:16;;;;;;;;;;;;;;:9;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9628:39;;;9625:139;;9692:9;;;;;;;;;;;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9726:9;;9683:70;;;;;:34;9726:9;;;9683:70;;;11795:74:27;9738:14:24;11885:18:27;;;11878:34;9683::24;;;;;11768:18:27;;9683:70:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1355:203:5:-;1482:68;;14167:42:27;14236:15;;;1482:68:5;;;14218:34:27;14288:15;;14268:18;;;14261:43;14320:18;;;14313:34;;;1455:96:5;;1475:5;;1505:27;;14130:18:27;;1482:68:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1455:19;:96::i;9375:659:0:-;9458:21;;;9450:67;;;;;;;20204:2:27;9450:67:0;;;20186:21:27;20243:2;20223:18;;;20216:30;20282:34;20262:18;;;20255:62;20353:3;20333:18;;;20326:31;20374:19;;9450:67:0;20002:397:27;9450:67:0;9613:18;;;9588:22;9613:18;;;;;;;;;;;9649:24;;;;9641:71;;;;;;;20606:2:27;9641:71:0;;;20588:21:27;20645:2;20625:18;;;20618:30;20684:34;20664:18;;;20657:62;20755:4;20735:18;;;20728:32;20777:19;;9641:71:0;20404:398:27;9641:71:0;9746:18;;;:9;:18;;;;;;;;;;;9767:23;;;9746:44;;9883:12;:22;;;;;;;9931:37;1896:25:27;;;9746:9:0;;:18;9931:37;;1869:18:27;9931:37:0;1750:177:27;9979:48:0;9440:594;9375:659;;:::o;4661:762:24:-;4747:10;4795:27;;;:6;:27;;;;;;;;4769:53;;;;;;;;;;;;;;;;;;;4747:10;;4769:53;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4769:53:24;;;-1:-1:-1;;4769:53:24;;;;;;;;;;;;;;;;;;;;;;;;;4835:15;;;;;;-1:-1:-1;4832:136:24;;;4926:5;4933:6;:23;;;4915:42;;;;;;;;;:::i;:::-;;;;;;;;;;;;;4907:50;;4832:136;4995:9;;5031:15;;5267:20;;;;;4984:432;;;;;4995:9;;;;;4984:33;;:432;;5031:15;;5134:19;;5199:5;;4995:9;;4984:432;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4977:439;4661:762;-1:-1:-1;;;;4661:762:24:o;941:175:5:-;1050:58;;11825:42:27;11813:55;;1050:58:5;;;11795:74:27;11885:18;;;11878:34;;;1023:86:5;;1043:5;;1073:23;;11768:18:27;;1050:58:5;11621:297:27;8520:535:0;8603:21;;;8595:65;;;;;;;22162:2:27;8595:65:0;;;22144:21:27;22201:2;22181:18;;;22174:30;22240:33;22220:18;;;22213:61;22291:18;;8595:65:0;21960:355:27;8595:65:0;8747:6;8731:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;8899:18:0;;;:9;:18;;;;;;;;;;;:28;;;;;;8952:37;1896:25:27;;;8952:37:0;;1869:18:27;8952:37:0;;;;;;;973:161:2;;:::o;5196:642:5:-;5615:23;5641:69;5669:4;5641:69;;;;;;;;;;;;;;;;;5649:5;5641:27;;;;:69;;;;;:::i;:::-;5615:95;;5728:10;:17;5749:1;5728:22;:56;;;;5765:10;5754:30;;;;;;;;;;;;:::i;:::-;5720:111;;;;;;;22522:2:27;5720:111:5;;;22504:21:27;22561:2;22541:18;;;22534:30;22600:34;22580:18;;;22573:62;22671:12;22651:18;;;22644:40;22701:19;;5720:111:5;22320:406:27;4108:223:6;4241:12;4272:52;4294:6;4302:4;4308:1;4311:12;4241;5446;5460:23;5487:6;:11;;5506:5;5513:4;5487:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5445:73;;;;5535:69;5562:6;5570:7;5579:10;5591:12;5535:26;:69::i;:::-;5528:76;5165:446;-1:-1:-1;;;;;;;5165:446:6:o;7671:628::-;7851:12;7879:7;7875:418;;;7906:10;:17;7927:1;7906:22;7902:286;;1702:19;;;;8113:60;;;;;;;23632:2:27;8113:60:6;;;23614:21:27;23671:2;23651:18;;;23644:30;23710:31;23690:18;;;23683:59;23759:18;;8113:60:6;23430:353:27;8113:60:6;-1:-1:-1;8208:10:6;8201:17;;7875:418;8249:33;8257:10;8269:12;8980:17;;:21;8976:379;;9208:10;9202:17;9264:15;9251:10;9247:2;9243:19;9236:44;8976:379;9331:12;9324:20;;;;;;;;;;;:::i;14:250:27:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:27;238:16;;231:27;14:250::o;269:330::-;311:3;349:5;343:12;376:6;371:3;364:19;392:76;461:6;454:4;449:3;445:14;438:4;431:5;427:16;392:76;:::i;:::-;513:2;501:15;518:66;497:88;488:98;;;;588:4;484:109;;269:330;-1:-1:-1;;269:330:27:o;604:220::-;753:2;742:9;735:21;716:4;773:45;814:2;803:9;799:18;791:6;773:45;:::i;829:154::-;915:42;908:5;904:54;897:5;894:65;884:93;;973:1;970;963:12;988:315;1056:6;1064;1117:2;1105:9;1096:7;1092:23;1088:32;1085:52;;;1133:1;1130;1123:12;1085:52;1172:9;1159:23;1191:31;1216:5;1191:31;:::i;:::-;1241:5;1293:2;1278:18;;;;1265:32;;-1:-1:-1;;;988:315:27:o;1932:456::-;2009:6;2017;2025;2078:2;2066:9;2057:7;2053:23;2049:32;2046:52;;;2094:1;2091;2084:12;2046:52;2133:9;2120:23;2152:31;2177:5;2152:31;:::i;:::-;2202:5;-1:-1:-1;2259:2:27;2244:18;;2231:32;2272:33;2231:32;2272:33;:::i;:::-;1932:456;;2324:7;;-1:-1:-1;;;2378:2:27;2363:18;;;;2350:32;;1932:456::o;2393:367::-;2456:8;2466:6;2520:3;2513:4;2505:6;2501:17;2497:27;2487:55;;2538:1;2535;2528:12;2487:55;-1:-1:-1;2561:20:27;;2604:18;2593:30;;2590:50;;;2636:1;2633;2626:12;2590:50;2673:4;2665:6;2661:17;2649:29;;2733:3;2726:4;2716:6;2713:1;2709:14;2701:6;2697:27;2693:38;2690:47;2687:67;;;2750:1;2747;2740:12;2687:67;2393:367;;;;;:::o;2765:1223::-;2931:6;2939;2947;2955;2963;2971;2979;3032:3;3020:9;3011:7;3007:23;3003:33;3000:53;;;3049:1;3046;3039:12;3000:53;3088:9;3075:23;3107:31;3132:5;3107:31;:::i;:::-;3157:5;-1:-1:-1;3213:2:27;3198:18;;3185:32;3236:18;3266:14;;;3263:34;;;3293:1;3290;3283:12;3263:34;3332:70;3394:7;3385:6;3374:9;3370:22;3332:70;:::i;:::-;3421:8;;-1:-1:-1;3306:96:27;-1:-1:-1;3509:2:27;3494:18;;3481:32;;-1:-1:-1;3525:16:27;;;3522:36;;;3554:1;3551;3544:12;3522:36;3593:72;3657:7;3646:8;3635:9;3631:24;3593:72;:::i;:::-;3684:8;;-1:-1:-1;3567:98:27;-1:-1:-1;3772:2:27;3757:18;;3744:32;;-1:-1:-1;3788:16:27;;;3785:36;;;3817:1;3814;3807:12;3785:36;;3856:72;3920:7;3909:8;3898:9;3894:24;3856:72;:::i;:::-;2765:1223;;;;-1:-1:-1;2765:1223:27;;-1:-1:-1;2765:1223:27;;;;3830:98;;-1:-1:-1;;;2765:1223:27:o;3993:383::-;4070:6;4078;4086;4139:2;4127:9;4118:7;4114:23;4110:32;4107:52;;;4155:1;4152;4145:12;4107:52;4191:9;4178:23;4168:33;;4251:2;4240:9;4236:18;4223:32;4264:31;4289:5;4264:31;:::i;4570:180::-;4629:6;4682:2;4670:9;4661:7;4657:23;4653:32;4650:52;;;4698:1;4695;4688:12;4650:52;-1:-1:-1;4721:23:27;;4570:180;-1:-1:-1;4570:180:27:o;4755:247::-;4814:6;4867:2;4855:9;4846:7;4842:23;4838:32;4835:52;;;4883:1;4880;4873:12;4835:52;4922:9;4909:23;4941:31;4966:5;4941:31;:::i;5007:1074::-;5122:6;5130;5138;5146;5154;5162;5170;5223:3;5211:9;5202:7;5198:23;5194:33;5191:53;;;5240:1;5237;5230:12;5191:53;5276:9;5263:23;5253:33;;5333:2;5322:9;5318:18;5305:32;5295:42;;5387:2;5376:9;5372:18;5359:32;5400:31;5425:5;5400:31;:::i;:::-;5450:5;-1:-1:-1;5507:2:27;5492:18;;5479:32;5520:33;5479:32;5520:33;:::i;:::-;5572:7;-1:-1:-1;5626:3:27;5611:19;;5598:33;;-1:-1:-1;5682:3:27;5667:19;;5654:33;5706:18;5736:14;;;5733:34;;;5763:1;5760;5753:12;5733:34;5801:6;5790:9;5786:22;5776:32;;5846:7;5839:4;5835:2;5831:13;5827:27;5817:55;;5868:1;5865;5858:12;5817:55;5908:2;5895:16;5934:2;5926:6;5923:14;5920:34;;;5950:1;5947;5940:12;5920:34;5995:7;5990:2;5981:6;5977:2;5973:15;5969:24;5966:37;5963:57;;;6016:1;6013;6006:12;5963:57;6047:2;6043;6039:11;6029:21;;6069:6;6059:16;;;;;5007:1074;;;;;;;;;;:::o;6565:503::-;6800:42;6792:6;6788:55;6777:9;6770:74;6880:3;6875:2;6864:9;6860:18;6853:31;6751:4;6901:46;6942:3;6931:9;6927:19;6919:6;6901:46;:::i;:::-;6995:6;6983:19;;;;6978:2;6963:18;;6956:47;-1:-1:-1;7046:14:27;;7039:22;7034:2;7019:18;;;7012:50;6893:54;6565:503;-1:-1:-1;;6565:503:27:o;8812:388::-;8880:6;8888;8941:2;8929:9;8920:7;8916:23;8912:32;8909:52;;;8957:1;8954;8947:12;8909:52;8996:9;8983:23;9015:31;9040:5;9015:31;:::i;:::-;9065:5;-1:-1:-1;9122:2:27;9107:18;;9094:32;9135:33;9094:32;9135:33;:::i;:::-;9187:7;9177:17;;;8812:388;;;;;:::o;9205:344::-;9272:6;9280;9333:2;9321:9;9312:7;9308:23;9304:32;9301:52;;;9349:1;9346;9339:12;9301:52;9385:9;9372:23;9362:33;;9445:2;9434:9;9430:18;9417:32;9489:10;9482:5;9478:22;9471:5;9468:33;9458:61;;9515:1;9512;9505:12;9554:437;9633:1;9629:12;;;;9676;;;9697:61;;9751:4;9743:6;9739:17;9729:27;;9697:61;9804:2;9796:6;9793:14;9773:18;9770:38;9767:218;;9841:77;9838:1;9831:88;9942:4;9939:1;9932:15;9970:4;9967:1;9960:15;9767:218;;9554:437;;;:::o;10354:184::-;10406:77;10403:1;10396:88;10503:4;10500:1;10493:15;10527:4;10524:1;10517:15;10543:272;10601:6;10654:2;10642:9;10633:7;10629:23;10625:32;10622:52;;;10670:1;10667;10660:12;10622:52;10709:9;10696:23;10759:6;10752:5;10748:18;10741:5;10738:29;10728:57;;10781:1;10778;10771:12;10820:184;10872:77;10869:1;10862:88;10969:4;10966:1;10959:15;10993:4;10990:1;10983:15;11009:195;11048:3;11079:66;11072:5;11069:77;11066:103;;11149:18;;:::i;:::-;-1:-1:-1;11196:1:27;11185:13;;11009:195::o;11923:125::-;11988:9;;;12009:10;;;12006:36;;;12022:18;;:::i;13673:277::-;13740:6;13793:2;13781:9;13772:7;13768:23;13764:32;13761:52;;;13809:1;13806;13799:12;13761:52;13841:9;13835:16;13894:5;13887:13;13880:21;13873:5;13870:32;13860:60;;13916:1;13913;13906:12;14358:580;14435:4;14441:6;14501:11;14488:25;14591:66;14580:8;14564:14;14560:29;14556:102;14536:18;14532:127;14522:155;;14673:1;14670;14663:12;14522:155;14700:33;;14752:20;;;-1:-1:-1;14795:18:27;14784:30;;14781:50;;;14827:1;14824;14817:12;14781:50;14860:4;14848:17;;-1:-1:-1;14891:14:27;14887:27;;;14877:38;;14874:58;;;14928:1;14925;14918:12;14943:184;14995:77;14992:1;14985:88;15092:4;15089:1;15082:15;15116:4;15113:1;15106:15;15257:544;15358:2;15353:3;15350:11;15347:448;;;15394:1;15419:5;15415:2;15408:17;15464:4;15460:2;15450:19;15534:2;15522:10;15518:19;15515:1;15511:27;15505:4;15501:38;15570:4;15558:10;15555:20;15552:47;;;-1:-1:-1;15593:4:27;15552:47;15648:2;15643:3;15639:12;15636:1;15632:20;15626:4;15622:31;15612:41;;15703:82;15721:2;15714:5;15711:13;15703:82;;;15766:17;;;15747:1;15736:13;15703:82;;;15707:3;;;15257:544;;;:::o;16037:1321::-;16159:18;16154:3;16151:27;16148:53;;;16181:18;;:::i;:::-;16210:93;16299:3;16259:38;16291:4;16285:11;16259:38;:::i;:::-;16253:4;16210:93;:::i;:::-;16329:1;16354:2;16349:3;16346:11;16371:1;16366:734;;;;17144:1;17161:3;17158:93;;;-1:-1:-1;17217:19:27;;;17204:33;17158:93;15943:66;15934:1;15930:11;;;15926:84;15922:89;15912:100;16018:1;16014:11;;;15909:117;17264:78;;16339:1013;;16366:734;15204:1;15197:14;;;15241:4;15228:18;;16411:66;16402:76;;;16561:9;16583:229;16597:7;16594:1;16591:14;16583:229;;;16686:19;;;16673:33;16658:49;;16793:4;16778:20;;;;16746:1;16734:14;;;;16613:12;16583:229;;;16587:3;16840;16831:7;16828:16;16825:219;;;16960:66;16954:3;16948;16945:1;16941:11;16937:21;16933:94;16929:99;16916:9;16911:3;16907:19;16894:33;16890:139;16882:6;16875:155;16825:219;;;17087:1;17081:3;17078:1;17074:11;17070:19;17064:4;17057:33;16339:1013;;16037:1321;;;:::o;19746:251::-;19816:6;19869:2;19857:9;19848:7;19844:23;19840:32;19837:52;;;19885:1;19882;19875:12;19837:52;19917:9;19911:16;19936:31;19961:5;19936:31;:::i;20807:379::-;21000:2;20989:9;20982:21;20963:4;21026:45;21067:2;21056:9;21052:18;21044:6;21026:45;:::i;:::-;21119:9;21111:6;21107:22;21102:2;21091:9;21087:18;21080:50;21147:33;21173:6;21165;21147:33;:::i;:::-;21139:41;20807:379;-1:-1:-1;;;;;20807:379:27:o;21191:575::-;21454:42;21446:6;21442:55;21431:9;21424:74;21534:6;21529:2;21518:9;21514:18;21507:34;21577:3;21572:2;21561:9;21557:18;21550:31;21405:4;21598:46;21639:3;21628:9;21624:19;21616:6;21598:46;:::i;:::-;21692:6;21680:19;;;;21675:2;21660:18;;21653:47;-1:-1:-1;21744:14:27;;21737:22;21731:3;21716:19;;;21709:51;21590:54;21191:575;-1:-1:-1;;;21191:575:27:o;21771:184::-;21841:6;21894:2;21882:9;21873:7;21869:23;21865:32;21862:52;;;21910:1;21907;21900:12;21862:52;-1:-1:-1;21933:16:27;;21771:184;-1:-1:-1;21771:184:27:o;23138:287::-;23267:3;23305:6;23299:13;23321:66;23380:6;23375:3;23368:4;23360:6;23356:17;23321:66;:::i;:::-;23403:16;;;;;23138:287;-1:-1:-1;;23138:287:27:o
Swarm Source
ipfs://18050c770c238018c942c75d5b043171bd54d7c026fb3ea1efce3f6301598bac
Loading...
Loading
Loading...
Loading
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.