Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 438 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 21275961 | 12 hrs ago | IN | 0 ETH | 0.00032844 | ||||
Approve | 21275917 | 13 hrs ago | IN | 0 ETH | 0.0005446 | ||||
Approve | 21268519 | 37 hrs ago | IN | 0 ETH | 0.00037545 | ||||
Approve | 21265589 | 47 hrs ago | IN | 0 ETH | 0.00170844 | ||||
Approve | 21260655 | 2 days ago | IN | 0 ETH | 0.0004086 | ||||
Approve | 21260562 | 2 days ago | IN | 0 ETH | 0.00041234 | ||||
Approve | 21235275 | 6 days ago | IN | 0 ETH | 0.00053402 | ||||
Approve | 21196249 | 11 days ago | IN | 0 ETH | 0.00076093 | ||||
Approve | 21191793 | 12 days ago | IN | 0 ETH | 0.00075151 | ||||
Approve | 21177725 | 14 days ago | IN | 0 ETH | 0.00083269 | ||||
Approve | 21177567 | 14 days ago | IN | 0 ETH | 0.00044402 | ||||
Approve | 21166571 | 15 days ago | IN | 0 ETH | 0.00122054 | ||||
Approve | 21155694 | 17 days ago | IN | 0 ETH | 0.00049938 | ||||
Approve | 21154861 | 17 days ago | IN | 0 ETH | 0.00037548 | ||||
Approve | 21150337 | 18 days ago | IN | 0 ETH | 0.0006205 | ||||
Approve | 21150270 | 18 days ago | IN | 0 ETH | 0.00065283 | ||||
Approve | 21148837 | 18 days ago | IN | 0 ETH | 0.0004653 | ||||
Approve | 21148337 | 18 days ago | IN | 0 ETH | 0.00049992 | ||||
Transfer | 21148268 | 18 days ago | IN | 0 ETH | 0.00041565 | ||||
Transfer | 21146773 | 18 days ago | IN | 0 ETH | 0.00036524 | ||||
Transfer | 21140176 | 19 days ago | IN | 0 ETH | 0.00049547 | ||||
Approve | 21137858 | 19 days ago | IN | 0 ETH | 0.00091657 | ||||
Approve | 21124263 | 21 days ago | IN | 0 ETH | 0.00018419 | ||||
Transfer | 21113879 | 23 days ago | IN | 0 ETH | 0.00027273 | ||||
Approve | 21112765 | 23 days ago | IN | 0 ETH | 0.00018706 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18470067 | 393 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x3B350F20...75f42397E The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
XERC20
Compiler Version
v0.8.18+commit.87f61d96
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.4 <0.9.0; import {IXERC20} from '../interfaces/IXERC20.sol'; import {ERC20} from '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import {ERC20Permit} from '@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol'; import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol'; contract XERC20 is ERC20, Ownable, IXERC20, ERC20Permit { /** * @notice The duration it takes for the limits to fully replenish */ uint256 private constant _DURATION = 1 days; /** * @notice The address of the factory which deployed this contract */ address public immutable FACTORY; /** * @notice The address of the lockbox contract */ address public lockbox; /** * @notice Maps bridge address to bridge configurations */ mapping(address => Bridge) public bridges; /** * @notice Constructs the initial config of the XERC20 * * @param _name The name of the token * @param _symbol The symbol of the token * @param _factory The factory which deployed this contract */ constructor( string memory _name, string memory _symbol, address _factory ) ERC20(string.concat('x', _name), string.concat('x', _symbol)) ERC20Permit(string.concat('x', _name)) { _transferOwnership(_factory); FACTORY = _factory; } /** * @notice Mints tokens for a user * @dev Can only be called by a bridge * @param _user The address of the user who needs tokens minted * @param _amount The amount of tokens being minted */ function mint(address _user, uint256 _amount) public { _mintWithCaller(msg.sender, _user, _amount); } /** * @notice Burns tokens for a user * @dev Can only be called by a bridge * @param _user The address of the user who needs tokens burned * @param _amount The amount of tokens being burned */ function burn(address _user, uint256 _amount) public { if (msg.sender != _user) { _spendAllowance(_user, msg.sender, _amount); } _burnWithCaller(msg.sender, _user, _amount); } /** * @notice Sets the lockbox address * * @param _lockbox The address of the lockbox */ function setLockbox(address _lockbox) public { if (msg.sender != FACTORY) revert IXERC20_NotFactory(); lockbox = _lockbox; emit LockboxSet(_lockbox); } /** * @notice Updates the limits of any bridge * @dev Can only be called by the owner * @param _mintingLimit The updated minting limit we are setting to the bridge * @param _burningLimit The updated burning limit we are setting to the bridge * @param _bridge The address of the bridge we are setting the limits too */ function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external onlyOwner { _changeMinterLimit(_bridge, _mintingLimit); _changeBurnerLimit(_bridge, _burningLimit); emit BridgeLimitsSet(_mintingLimit, _burningLimit, _bridge); } /** * @notice Returns the max limit of a bridge * * @param _bridge the bridge we are viewing the limits of * @return _limit The limit the bridge has */ function mintingMaxLimitOf(address _bridge) public view returns (uint256 _limit) { _limit = bridges[_bridge].minterParams.maxLimit; } /** * @notice Returns the max limit of a bridge * * @param _bridge the bridge we are viewing the limits of * @return _limit The limit the bridge has */ function burningMaxLimitOf(address _bridge) public view returns (uint256 _limit) { _limit = bridges[_bridge].burnerParams.maxLimit; } /** * @notice Returns the current limit of a bridge * * @param _bridge the bridge we are viewing the limits of * @return _limit The limit the bridge has */ function mintingCurrentLimitOf(address _bridge) public view returns (uint256 _limit) { _limit = _getCurrentLimit( bridges[_bridge].minterParams.currentLimit, bridges[_bridge].minterParams.maxLimit, bridges[_bridge].minterParams.timestamp, bridges[_bridge].minterParams.ratePerSecond ); } /** * @notice Returns the current limit of a bridge * * @param _bridge the bridge we are viewing the limits of * @return _limit The limit the bridge has */ function burningCurrentLimitOf(address _bridge) public view returns (uint256 _limit) { _limit = _getCurrentLimit( bridges[_bridge].burnerParams.currentLimit, bridges[_bridge].burnerParams.maxLimit, bridges[_bridge].burnerParams.timestamp, bridges[_bridge].burnerParams.ratePerSecond ); } /** * @notice Uses the limit of any bridge * @param _bridge The address of the bridge who is being changed * @param _change The change in the limit */ function _useMinterLimits(address _bridge, uint256 _change) internal { uint256 _currentLimit = mintingCurrentLimitOf(_bridge); bridges[_bridge].minterParams.timestamp = block.timestamp; bridges[_bridge].minterParams.currentLimit = _currentLimit - _change; } /** * @notice Uses the limit of any bridge * @param _bridge The address of the bridge who is being changed * @param _change The change in the limit */ function _useBurnerLimits(address _bridge, uint256 _change) internal { uint256 _currentLimit = burningCurrentLimitOf(_bridge); bridges[_bridge].burnerParams.timestamp = block.timestamp; bridges[_bridge].burnerParams.currentLimit = _currentLimit - _change; } /** * @notice Updates the limit of any bridge * @dev Can only be called by the owner * @param _bridge The address of the bridge we are setting the limit too * @param _limit The updated limit we are setting to the bridge */ function _changeMinterLimit(address _bridge, uint256 _limit) internal { uint256 _oldLimit = bridges[_bridge].minterParams.maxLimit; uint256 _currentLimit = mintingCurrentLimitOf(_bridge); bridges[_bridge].minterParams.maxLimit = _limit; bridges[_bridge].minterParams.currentLimit = _calculateNewCurrentLimit(_limit, _oldLimit, _currentLimit); bridges[_bridge].minterParams.ratePerSecond = _limit / _DURATION; bridges[_bridge].minterParams.timestamp = block.timestamp; } /** * @notice Updates the limit of any bridge * @dev Can only be called by the owner * @param _bridge The address of the bridge we are setting the limit too * @param _limit The updated limit we are setting to the bridge */ function _changeBurnerLimit(address _bridge, uint256 _limit) internal { uint256 _oldLimit = bridges[_bridge].burnerParams.maxLimit; uint256 _currentLimit = burningCurrentLimitOf(_bridge); bridges[_bridge].burnerParams.maxLimit = _limit; bridges[_bridge].burnerParams.currentLimit = _calculateNewCurrentLimit(_limit, _oldLimit, _currentLimit); bridges[_bridge].burnerParams.ratePerSecond = _limit / _DURATION; bridges[_bridge].burnerParams.timestamp = block.timestamp; } /** * @notice Updates the current limit * * @param _limit The new limit * @param _oldLimit The old limit * @param _currentLimit The current limit */ function _calculateNewCurrentLimit( uint256 _limit, uint256 _oldLimit, uint256 _currentLimit ) internal pure returns (uint256 _newCurrentLimit) { uint256 _difference; if (_oldLimit > _limit) { _difference = _oldLimit - _limit; _newCurrentLimit = _currentLimit > _difference ? _currentLimit - _difference : 0; } else { _difference = _limit - _oldLimit; _newCurrentLimit = _currentLimit + _difference; } } /** * @notice Gets the current limit * * @param _currentLimit The current limit * @param _maxLimit The max limit * @param _timestamp The timestamp of the last update * @param _ratePerSecond The rate per second */ function _getCurrentLimit( uint256 _currentLimit, uint256 _maxLimit, uint256 _timestamp, uint256 _ratePerSecond ) internal view returns (uint256 _limit) { _limit = _currentLimit; if (_limit == _maxLimit) { return _limit; } else if (_timestamp + _DURATION <= block.timestamp) { _limit = _maxLimit; } else if (_timestamp + _DURATION > block.timestamp) { uint256 _timePassed = block.timestamp - _timestamp; uint256 _calculatedLimit = _limit + (_timePassed * _ratePerSecond); _limit = _calculatedLimit > _maxLimit ? _maxLimit : _calculatedLimit; } } /** * @notice Internal function for burning tokens * * @param _caller The caller address * @param _user The user address * @param _amount The amount to burn */ function _burnWithCaller(address _caller, address _user, uint256 _amount) internal { if (_caller != lockbox) { uint256 _currentLimit = burningCurrentLimitOf(_caller); if (_currentLimit < _amount) revert IXERC20_NotHighEnoughLimits(); _useBurnerLimits(_caller, _amount); } _burn(_user, _amount); } /** * @notice Internal function for minting tokens * * @param _caller The caller address * @param _user The user address * @param _amount The amount to mint */ function _mintWithCaller(address _caller, address _user, uint256 _amount) internal { if (_caller != lockbox) { uint256 _currentLimit = mintingCurrentLimitOf(_caller); if (_currentLimit < _amount) revert IXERC20_NotHighEnoughLimits(); _useMinterLimits(_caller, _amount); } _mint(_user, _amount); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.4 <0.9.0; interface IXERC20 { /** * @notice Emits when a lockbox is set * * @param _lockbox The address of the lockbox */ event LockboxSet(address _lockbox); /** * @notice Emits when a limit is set * * @param _mintingLimit The updated minting limit we are setting to the bridge * @param _burningLimit The updated burning limit we are setting to the bridge * @param _bridge The address of the bridge we are setting the limit too */ event BridgeLimitsSet(uint256 _mintingLimit, uint256 _burningLimit, address indexed _bridge); /** * @notice Reverts when a user with too low of a limit tries to call mint/burn */ error IXERC20_NotHighEnoughLimits(); /** * @notice Reverts when caller is not the factory */ error IXERC20_NotFactory(); struct Bridge { BridgeParameters minterParams; BridgeParameters burnerParams; } struct BridgeParameters { uint256 timestamp; uint256 ratePerSecond; uint256 maxLimit; uint256 currentLimit; } /** * @notice Sets the lockbox address * * @param _lockbox The address of the lockbox */ function setLockbox(address _lockbox) external; /** * @notice Updates the limits of any bridge * @dev Can only be called by the owner * @param _mintingLimit The updated minting limit we are setting to the bridge * @param _burningLimit The updated burning limit we are setting to the bridge * @param _bridge The address of the bridge we are setting the limits too */ function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external; /** * @notice Returns the max limit of a minter * * @param _minter The minter we are viewing the limits of * @return _limit The limit the minter has */ function mintingMaxLimitOf(address _minter) external view returns (uint256 _limit); /** * @notice Returns the max limit of a bridge * * @param _bridge the bridge we are viewing the limits of * @return _limit The limit the bridge has */ function burningMaxLimitOf(address _bridge) external view returns (uint256 _limit); /** * @notice Returns the current limit of a minter * * @param _minter The minter we are viewing the limits of * @return _limit The limit the minter has */ function mintingCurrentLimitOf(address _minter) external view returns (uint256 _limit); /** * @notice Returns the current limit of a bridge * * @param _bridge the bridge we are viewing the limits of * @return _limit The limit the bridge has */ function burningCurrentLimitOf(address _bridge) external view returns (uint256 _limit); /** * @notice Mints tokens for a user * @dev Can only be called by a minter * @param _user The address of the user who needs tokens minted * @param _amount The amount of tokens being minted */ function mint(address _user, uint256 _amount) external; /** * @notice Burns tokens for a user * @dev Can only be called by a minter * @param _user The address of the user who needs tokens burned * @param _amount The amount of tokens being burned */ function burn(address _user, uint256 _amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `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.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol) pragma solidity ^0.8.0; import "./draft-IERC20Permit.sol"; import "../ERC20.sol"; import "../../../utils/cryptography/ECDSA.sol"; import "../../../utils/cryptography/EIP712.sol"; import "../../../utils/Counters.sol"; /** * @dev Implementation 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. * * _Available since v3.4._ */ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 { using Counters for Counters.Counter; mapping(address => Counters.Counter) private _nonces; // solhint-disable-next-line var-name-mixedcase bytes32 private constant _PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`. * However, to ensure consistency with the upgradeable transpiler, we will continue * to reserve a slot. * @custom:oz-renamed-from _PERMIT_TYPEHASH */ // solhint-disable-next-line var-name-mixedcase bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT; /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @dev See {IERC20Permit-permit}. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "ERC20Permit: expired deadline"); bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); require(signer == owner, "ERC20Permit: invalid signature"); _approve(owner, spender, value); } /** * @dev See {IERC20Permit-nonces}. */ function nonces(address owner) public view virtual override returns (uint256) { return _nonces[owner].current(); } /** * @dev See {IERC20Permit-DOMAIN_SEPARATOR}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view override returns (bytes32) { return _domainSeparatorV4(); } /** * @dev "Consume a nonce": return the current value and increment. * * _Available since v4.1._ */ function _useNonce(address owner) internal virtual returns (uint256 current) { Counters.Counter storage nonce = _nonces[owner]; current = nonce.current(); nonce.increment(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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. */ 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]. */ 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.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
{ "remappings": [ "ds-test/=lib/ds-test/src/", "prb/test/=lib/prb-test/src/", "forge-std/=lib/forge-std/src/", "isolmate/=lib/isolmate/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "permit2/=lib/permit2/", "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "prb-test/=lib/prb-test/src/", "solmate/=lib/permit2/lib/solmate/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"IXERC20_NotFactory","type":"error"},{"inputs":[],"name":"IXERC20_NotHighEnoughLimits","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_mintingLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_burningLimit","type":"uint256"},{"indexed":true,"internalType":"address","name":"_bridge","type":"address"}],"name":"BridgeLimitsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_lockbox","type":"address"}],"name":"LockboxSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FACTORY","outputs":[{"internalType":"address","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":[{"internalType":"address","name":"","type":"address"}],"name":"bridges","outputs":[{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ratePerSecond","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"},{"internalType":"uint256","name":"currentLimit","type":"uint256"}],"internalType":"struct IXERC20.BridgeParameters","name":"minterParams","type":"tuple"},{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"ratePerSecond","type":"uint256"},{"internalType":"uint256","name":"maxLimit","type":"uint256"},{"internalType":"uint256","name":"currentLimit","type":"uint256"}],"internalType":"struct IXERC20.BridgeParameters","name":"burnerParams","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"burningCurrentLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"burningMaxLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockbox","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"mintingCurrentLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"}],"name":"mintingMaxLimitOf","outputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bridge","type":"address"},{"internalType":"uint256","name":"_mintingLimit","type":"uint256"},{"internalType":"uint256","name":"_burningLimit","type":"uint256"}],"name":"setLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lockbox","type":"address"}],"name":"setLockbox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063715018a6116100f9578063a457c2d711610097578063ced67f0c11610071578063ced67f0c146103fe578063d505accf14610490578063dd62ed3e146104a3578063f2fde38b146104dc57600080fd5b8063a457c2d7146103ac578063a9059cbb146103bf578063c1eb7137146103d257600080fd5b806395d89b41116100d357806395d89b411461036b578063998955d3146103735780639dc29fac14610386578063a08d56541461039957600080fd5b8063715018a61461033f5780637ecebe00146103475780638da5cb5b1461035a57600080fd5b80633644e51511610166578063435350b711610140578063435350b7146102dd578063651fd268146102f057806366cc57021461030357806370a082311461031657600080fd5b80633644e515146102ad57806339509351146102b557806340c10f19146102c857600080fd5b806318160ddd116101a257806318160ddd1461024457806323b872dd1461024c5780632dd310001461025f578063313ce5671461029e57600080fd5b806306fdde03146101c9578063095ea7b3146101e75780630c05f82c1461020a575b600080fd5b6101d16104ef565b6040516101de919061199d565b60405180910390f35b6101fa6101f5366004611a25565b610581565b60405190151581526020016101de565b610236610218366004611a4f565b6001600160a01b031660009081526009602052604090206002015490565b6040519081526020016101de565b600254610236565b6101fa61025a366004611a6a565b61059b565b6102867f000000000000000000000000c10fa06d401c05bce65b55efb1ef2158e55ff1d781565b6040516001600160a01b0390911681526020016101de565b604051601281526020016101de565b6102366105c1565b6101fa6102c3366004611a25565b6105d0565b6102db6102d6366004611a25565b61060f565b005b6102db6102eb366004611a4f565b61061e565b6102366102fe366004611a4f565b6106ec565b600854610286906001600160a01b031681565b610236610324366004611a4f565b6001600160a01b031660009081526020819052604090205490565b6102db610720565b610236610355366004611a4f565b610734565b6005546001600160a01b0316610286565b6101d1610752565b610236610381366004611a4f565b610761565b6102db610394366004611a25565b610798565b6102db6103a7366004611aa6565b6107be565b6101fa6103ba366004611a25565b610823565b6101fa6103cd366004611a25565b6108dd565b6102366103e0366004611a4f565b6001600160a01b031660009081526009602052604090206006015490565b61048261040c366004611a4f565b6009602090815260009182526040918290208251608080820185528254825260018301548285015260028301548286015260038301546060808401919091528551918201865260048401548252600584015494820194909452600683015494810194909452600790910154918301919091529082565b6040516101de929190611ad9565b6102db61049e366004611b25565b6108eb565b6102366104b1366004611b98565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102db6104ea366004611a4f565b610a4f565b6060600380546104fe90611bcb565b80601f016020809104026020016040519081016040528092919081815260200182805461052a90611bcb565b80156105775780601f1061054c57610100808354040283529160200191610577565b820191906000526020600020905b81548152906001019060200180831161055a57829003601f168201915b5050505050905090565b60003361058f818585610adf565b60019150505b92915050565b6000336105a9858285610c37565b6105b4858585610ce7565b60019150505b9392505050565b60006105cb610ed4565b905090565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919061058f908290869061060a908790611c47565b610adf565b61061a338383610ffb565b5050565b336001600160a01b037f000000000000000000000000c10fa06d401c05bce65b55efb1ef2158e55ff1d71614610680576040517f2029e52500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527ffa2e15ea41196e438f0593ecdd6036acd83bdfcd39d627b77c17eab43f376a399060200160405180910390a150565b6001600160a01b03811660009081526009602052604081206003810154600282015482546001909301546105959390611072565b6107286110ea565b6107326000611144565b565b6001600160a01b038116600090815260066020526040812054610595565b6060600480546104fe90611bcb565b6001600160a01b03811660009081526009602052604081206007810154600682015460048301546005909301546105959390611072565b336001600160a01b038316146107b3576107b3823383610c37565b61061a3383836111ae565b6107c66110ea565b6107d08383611220565b6107da83826112c4565b60408051838152602081018390526001600160a01b038516917f93f3bbfe8cfb354ec059175107653f49f6eb479a8622a7d83866ea015435c944910160405180910390a2505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156108c55760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6108d28286868403610adf565b506001949350505050565b60003361058f818585610ce7565b8342111561093b5760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e6500000060448201526064016108bc565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988888861096a8c61136e565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e00160405160208183030381529060405280519060200120905060006109c582611396565b905060006109d5828787876113ff565b9050896001600160a01b0316816001600160a01b031614610a385760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e6174757265000060448201526064016108bc565b610a438a8a8a610adf565b50505050505050505050565b610a576110ea565b6001600160a01b038116610ad35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108bc565b610adc81611144565b50565b6001600160a01b038316610b5a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b038216610bd65760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610ce15781811015610cd45760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016108bc565b610ce18484848403610adf565b50505050565b6001600160a01b038316610d635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b038216610ddf5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b03831660009081526020819052604090205481811015610e6e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610ce1565b6000306001600160a01b037f0000000000000000000000008b04bf3358b88e3630aa64c1c76ff3b6c699c6a716148015610f2d57507f000000000000000000000000000000000000000000000000000000000000000146145b15610f5757507fac84936ba2e8601322164eff5fbc994a60e8fae67c0889ebcf401f2dd14f1bcf90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fb1f17d01d765e66bd30928dbabf2eb8f8680b5be03eaf48e07edb58e8b7f5ef7828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6008546001600160a01b0384811691161461106357600061101b846106ec565b905081811015611057576040517f0b6842aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6110618483611427565b505b61106d828261147d565b505050565b838381146110e257426110886201518085611c47565b116110945750826110e2565b426110a26201518085611c47565b11156110e25760006110b48442611c5a565b905060006110c28483611c6d565b6110cc9084611c47565b90508581116110db57806110dd565b855b925050505b949350505050565b6005546001600160a01b031633146107325760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108bc565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6008546001600160a01b038481169116146112165760006111ce84610761565b90508181101561120a576040517f0b6842aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611214848361153c565b505b61106d8282611596565b6001600160a01b03821660009081526009602052604081206002015490611246846106ec565b6001600160a01b038516600090815260096020526040902060020184905590506112718383836116ff565b6001600160a01b03851660009081526009602052604090206003015561129a6201518084611c84565b6001600160a01b039094166000908152600960205260409020600181019490945550504290915550565b6001600160a01b038216600090815260096020526040812060060154906112ea84610761565b6001600160a01b038516600090815260096020526040902060060184905590506113158383836116ff565b6001600160a01b03851660009081526009602052604090206007015561133e6201518084611c84565b6001600160a01b039094166000908152600960205260409020600581019490945550504260049092019190915550565b6001600160a01b03811660009081526006602052604090208054600181018255905b50919050565b60006105956113a3610ed4565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061141087878787611756565b9150915061141d81611838565b5095945050505050565b6000611432836106ec565b6001600160a01b038416600090815260096020526040902042905590506114598282611c5a565b6001600160a01b039093166000908152600960205260409020600301929092555050565b6001600160a01b0382166114d35760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016108bc565b80600260008282546114e59190611c47565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600061154783610761565b6001600160a01b03841660009081526009602052604090204260049091015590506115728282611c5a565b6001600160a01b039093166000908152600960205260409020600701929092555050565b6001600160a01b0382166116125760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b038216600090815260208190526040902054818110156116a15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016108bc565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b60008084841115611735576117148585611c5a565b905080831161172457600061172e565b61172e8184611c5a565b915061174e565b61173f8486611c5a565b905061174b8184611c47565b91505b509392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561178d575060009050600361182f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156117e1573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b0381166118285760006001925092505061182f565b9150600090505b94509492505050565b600081600481111561184c5761184c611cbf565b036118545750565b600181600481111561186857611868611cbf565b036118b55760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108bc565b60028160048111156118c9576118c9611cbf565b036119165760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108bc565b600381600481111561192a5761192a611cbf565b03610adc5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016108bc565b600060208083528351808285015260005b818110156119ca578581018301518582016040015282016119ae565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b80356001600160a01b0381168114611a2057600080fd5b919050565b60008060408385031215611a3857600080fd5b611a4183611a09565b946020939093013593505050565b600060208284031215611a6157600080fd5b6105ba82611a09565b600080600060608486031215611a7f57600080fd5b611a8884611a09565b9250611a9660208501611a09565b9150604084013590509250925092565b600080600060608486031215611abb57600080fd5b611ac484611a09565b95602085013595506040909401359392505050565b82518152602080840151818301526040808501518184015260608086015181850152845160808501529184015160a084015283015160c083015282015160e082015261010081016105ba565b600080600080600080600060e0888a031215611b4057600080fd5b611b4988611a09565b9650611b5760208901611a09565b95506040880135945060608801359350608088013560ff81168114611b7b57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611bab57600080fd5b611bb483611a09565b9150611bc260208401611a09565b90509250929050565b600181811c90821680611bdf57607f821691505b602082108103611390577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8082018082111561059557610595611c18565b8181038181111561059557610595611c18565b808202811582820484141761059557610595611c18565b600082611cba577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea26469706673582212206c05d1cb2d5ee7acbc37954b185ac7b8f84da140342a0bb1dc1b9522b4a8dd9064736f6c63430008120033
Deployed Bytecode Sourcemap
359:9110:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2154:98:1;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4431:197;;;;;;:::i;:::-;;:::i;:::-;;;1251:14:14;;1244:22;1226:41;;1214:2;1199:18;4431:197:1;1086:187:14;3135:139:12;;;;;;:::i;:::-;-1:-1:-1;;;;;3231:16:12;3200:14;3231:16;;;:7;:16;;;;;:38;;;;3135:139;;;;1615:25:14;;;1603:2;1588:18;3135:139:12;1469:177:14;3242:106:1;3329:12;;3242:106;;5190:286;;;;;;:::i;:::-;;:::i;629:32:12:-;;;;;;;;-1:-1:-1;;;;;2148:55:14;;;2130:74;;2118:2;2103:18;629:32:12;1984:226:14;3091:91:1;;;3173:2;2357:36:14;;2345:2;2330:18;3091:91:1;2215:184:14;2879:113:4;;;:::i;5871:234:1:-;;;;;;:::i;:::-;;:::i;1560:107:12:-;;;;;;:::i;:::-;;:::i;:::-;;2186:166;;;;;;:::i;:::-;;:::i;3765:321::-;;;;;;:::i;:::-;;:::i;727:22::-;;;;;-1:-1:-1;;;;;727:22:12;;;3406:125:1;;;;;;:::i;:::-;-1:-1:-1;;;;;3506:18:1;3480:7;3506:18;;;;;;;;;;;;3406:125;1831:101:0;;;:::i;2629:126:4:-;;;;;;:::i;:::-;;:::i;1201:85:0:-;1273:6;;-1:-1:-1;;;;;1273:6:0;1201:85;;2365:102:1;;;:::i;4264:321:12:-;;;;;;:::i;:::-;;:::i;1882:196::-;;;;;;:::i;:::-;;:::i;2694:267::-;;;;;;:::i;:::-;;:::i;6592:427:1:-;;;;;;:::i;:::-;;:::i;3727:189::-;;;;;;:::i;:::-;;:::i;3448:139:12:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3544:16:12;3513:14;3544:16;;;:7;:16;;;;;:38;;;;3448:139;824:41;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1942:626:4:-;;;;;;:::i;:::-;;:::i;3974:149:1:-;;;;;;:::i;:::-;-1:-1:-1;;;;;4089:18:1;;;4063:7;4089:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3974:149;2081:198:0;;;;;;:::i;:::-;;:::i;2154:98:1:-;2208:13;2240:5;2233:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2154:98;:::o;4431:197::-;4514:4;719:10:6;4568:32:1;719:10:6;4584:7:1;4593:6;4568:8;:32::i;:::-;4617:4;4610:11;;;4431:197;;;;;:::o;5190:286::-;5317:4;719:10:6;5373:38:1;5389:4;719:10:6;5404:6:1;5373:15;:38::i;:::-;5421:27;5431:4;5437:2;5441:6;5421:9;:27::i;:::-;5465:4;5458:11;;;5190:286;;;;;;:::o;2879:113:4:-;2939:7;2965:20;:18;:20::i;:::-;2958:27;;2879:113;:::o;5871:234:1:-;719:10:6;5959:4:1;4089:18;;;:11;:18;;;;;;;;-1:-1:-1;;;;;4089:27:1;;;;;;;;;;5959:4;;719:10:6;6013:64:1;;719:10:6;;4089:27:1;;6038:38;;6066:10;;6038:38;:::i;:::-;6013:8;:64::i;1560:107:12:-;1619:43;1635:10;1647:5;1654:7;1619:15;:43::i;:::-;1560:107;;:::o;2186:166::-;2241:10;-1:-1:-1;;;;;2255:7:12;2241:21;;2237:54;;2271:20;;;;;;;;;;;;;;2237:54;2297:7;:18;;;;-1:-1:-1;;;;;2297:18:12;;;;;;;;2327:20;;2130:74:14;;;2327:20:12;;2118:2:14;2103:18;2327:20:12;;;;;;;2186:166;:::o;3765:321::-;-1:-1:-1;;;;;3889:16:12;;3834:14;3889:16;;;:7;:16;;;;;:42;;;;3939:38;;;;3985:39;;4032:43;;;;;3865:216;;3985:39;3865:16;:216::i;1831:101:0:-;1094:13;:11;:13::i;:::-;1895:30:::1;1922:1;1895:18;:30::i;:::-;1831:101::o:0;2629:126:4:-;-1:-1:-1;;;;;2724:14:4;;2698:7;2724:14;;;:7;:14;;;;;918::7;2724:24:4;827:112:7;2365:102:1;2421:13;2453:7;2446:14;;;;;:::i;4264:321:12:-;-1:-1:-1;;;;;4388:16:12;;4333:14;4388:16;;;:7;:16;;;;;:42;;;;4438:38;;;;4388:29;;;4484:39;4531:43;;;;;4364:216;;4484:39;4364:16;:216::i;1882:196::-;1945:10;-1:-1:-1;;;;;1945:19:12;;;1941:83;;1974:43;1990:5;1997:10;2009:7;1974:15;:43::i;:::-;2030;2046:10;2058:5;2065:7;2030:15;:43::i;2694:267::-;1094:13:0;:11;:13::i;:::-;2801:42:12::1;2820:7;2829:13;2801:18;:42::i;:::-;2849;2868:7;2877:13;2849:18;:42::i;:::-;2902:54;::::0;;5532:25:14;;;5588:2;5573:18;;5566:34;;;-1:-1:-1;;;;;2902:54:12;::::1;::::0;::::1;::::0;5505:18:14;2902:54:12::1;;;;;;;2694:267:::0;;;:::o;6592:427:1:-;719:10:6;6685:4:1;4089:18;;;:11;:18;;;;;;;;-1:-1:-1;;;;;4089:27:1;;;;;;;;;;6685:4;;719:10:6;6829:15:1;6809:16;:35;;6801:85;;;;-1:-1:-1;;;6801:85:1;;5813:2:14;6801:85:1;;;5795:21:14;5852:2;5832:18;;;5825:30;5891:34;5871:18;;;5864:62;5962:7;5942:18;;;5935:35;5987:19;;6801:85:1;;;;;;;;;6920:60;6929:5;6936:7;6964:15;6945:16;:34;6920:8;:60::i;:::-;-1:-1:-1;7008:4:1;;6592:427;-1:-1:-1;;;;6592:427:1:o;3727:189::-;3806:4;719:10:6;3860:28:1;719:10:6;3877:2:1;3881:6;3860:9;:28::i;1942:626:4:-;2177:8;2158:15;:27;;2150:69;;;;-1:-1:-1;;;2150:69:4;;6219:2:14;2150:69:4;;;6201:21:14;6258:2;6238:18;;;6231:30;6297:31;6277:18;;;6270:59;6346:18;;2150:69:4;6017:353:14;2150:69:4;2230:18;1137:95;2290:5;2297:7;2306:5;2313:16;2323:5;2313:9;:16::i;:::-;2261:79;;;;;;6662:25:14;;;;-1:-1:-1;;;;;6784:15:14;;;6764:18;;;6757:43;6836:15;;;;6816:18;;;6809:43;6868:18;;;6861:34;6911:19;;;6904:35;6955:19;;;6948:35;;;6634:19;;2261:79:4;;;;;;;;;;;;2251:90;;;;;;2230:111;;2352:12;2367:28;2384:10;2367:16;:28::i;:::-;2352:43;;2406:14;2423:28;2437:4;2443:1;2446;2449;2423:13;:28::i;:::-;2406:45;;2479:5;-1:-1:-1;;;;;2469:15:4;:6;-1:-1:-1;;;;;2469:15:4;;2461:58;;;;-1:-1:-1;;;2461:58:4;;7196:2:14;2461:58:4;;;7178:21:14;7235:2;7215:18;;;7208:30;7274:32;7254:18;;;7247:60;7324:18;;2461:58:4;6994:354:14;2461:58:4;2530:31;2539:5;2546:7;2555:5;2530:8;:31::i;:::-;2140:428;;;1942:626;;;;;;;:::o;2081:198:0:-;1094:13;:11;:13::i;:::-;-1:-1:-1;;;;;2169:22:0;::::1;2161:73;;;::::0;-1:-1:-1;;;2161:73:0;;7555:2:14;2161:73:0::1;::::0;::::1;7537:21:14::0;7594:2;7574:18;;;7567:30;7633:34;7613:18;;;7606:62;7704:8;7684:18;;;7677:36;7730:19;;2161:73:0::1;7353:402:14::0;2161:73:0::1;2244:28;2263:8;2244:18;:28::i;:::-;2081:198:::0;:::o;10504:370:1:-;-1:-1:-1;;;;;10635:19:1;;10627:68;;;;-1:-1:-1;;;10627:68:1;;7962:2:14;10627:68:1;;;7944:21:14;8001:2;7981:18;;;7974:30;8040:34;8020:18;;;8013:62;8111:6;8091:18;;;8084:34;8135:19;;10627:68:1;7760:400:14;10627:68:1;-1:-1:-1;;;;;10713:21:1;;10705:68;;;;-1:-1:-1;;;10705:68:1;;8367:2:14;10705:68:1;;;8349:21:14;8406:2;8386:18;;;8379:30;8445:34;8425:18;;;8418:62;8516:4;8496:18;;;8489:32;8538:19;;10705:68:1;8165:398:14;10705:68:1;-1:-1:-1;;;;;10784:18:1;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;10835:32;;1615:25:14;;;10835:32:1;;1588:18:14;10835:32:1;;;;;;;10504:370;;;:::o;11155:441::-;-1:-1:-1;;;;;4089:18:1;;;11285:24;4089:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;11371:17;11351:37;;11347:243;;11432:6;11412:16;:26;;11404:68;;;;-1:-1:-1;;;11404:68:1;;8770:2:14;11404:68:1;;;8752:21:14;8809:2;8789:18;;;8782:30;8848:31;8828:18;;;8821:59;8897:18;;11404:68:1;8568:353:14;11404:68:1;11514:51;11523:5;11530:7;11558:6;11539:16;:25;11514:8;:51::i;:::-;11275:321;11155:441;;;:::o;7473:818::-;-1:-1:-1;;;;;7599:18:1;;7591:68;;;;-1:-1:-1;;;7591:68:1;;9128:2:14;7591:68:1;;;9110:21:14;9167:2;9147:18;;;9140:30;9206:34;9186:18;;;9179:62;9277:7;9257:18;;;9250:35;9302:19;;7591:68:1;8926:401:14;7591:68:1;-1:-1:-1;;;;;7677:16:1;;7669:64;;;;-1:-1:-1;;;7669:64:1;;9534:2:14;7669:64:1;;;9516:21:14;9573:2;9553:18;;;9546:30;9612:34;9592:18;;;9585:62;9683:5;9663:18;;;9656:33;9706:19;;7669:64:1;9332:399:14;7669:64:1;-1:-1:-1;;;;;7815:15:1;;7793:19;7815:15;;;;;;;;;;;7848:21;;;;7840:72;;;;-1:-1:-1;;;7840:72:1;;9938:2:14;7840:72:1;;;9920:21:14;9977:2;9957:18;;;9950:30;10016:34;9996:18;;;9989:62;10087:8;10067:18;;;10060:36;10113:19;;7840:72:1;9736:402:14;7840:72:1;-1:-1:-1;;;;;7946:15:1;;;:9;:15;;;;;;;;;;;7964:20;;;7946:38;;8161:13;;;;;;;;;;:23;;;;;;8210:26;;1615:25:14;;;8161:13:1;;8210:26;;1588:18:14;8210:26:1;;;;;;;8247:37;9139:328:12;3152:308:10;3205:7;3236:4;-1:-1:-1;;;;;3245:12:10;3228:29;;:66;;;;;3278:16;3261:13;:33;3228:66;3224:230;;;-1:-1:-1;3317:24:10;;3152:308::o;3224:230::-;-1:-1:-1;3642:73:10;;;3401:10;3642:73;;;;11348:25:14;;;;3413:12:10;11389:18:14;;;11382:34;3427:15:10;11432:18:14;;;11425:34;3686:13:10;11475:18:14;;;11468:34;3709:4:10;11518:19:14;;;;11511:84;;;;3642:73:10;;;;;;;;;;11320:19:14;;;;3642:73:10;;;3632:84;;;;;;2879:113:4:o;9139:328:12:-;9243:7;;-1:-1:-1;;;;;9232:18:12;;;9243:7;;9232:18;9228:208;;9260:21;9284:30;9306:7;9284:21;:30::i;:::-;9260:54;;9342:7;9326:13;:23;9322:65;;;9358:29;;;;;;;;;;;;;;9322:65;9395:34;9412:7;9421;9395:16;:34::i;:::-;9252:184;9228:208;9441:21;9447:5;9454:7;9441:5;:21::i;:::-;9139:328;;;:::o;7826:615::-;8012:13;8031:406;;;8064:13;8031:406;8120:15;8094:22;537:6;8094:10;:22;:::i;:::-;:41;8090:347;;-1:-1:-1;8154:9:12;8090:347;;;8205:15;8180:22;537:6;8180:10;:22;:::i;:::-;:40;8176:261;;;8230:19;8252:28;8270:10;8252:15;:28;:::i;:::-;8230:50;-1:-1:-1;8288:24:12;8325:28;8339:14;8230:50;8325:28;:::i;:::-;8315:39;;:6;:39;:::i;:::-;8288:66;;8390:9;8371:16;:28;:59;;8414:16;8371:59;;;8402:9;8371:59;8362:68;;8222:215;;8176:261;7826:615;;;;;;:::o;1359:130:0:-;1273:6;;-1:-1:-1;;;;;1273:6:0;719:10:6;1422:23:0;1414:68;;;;-1:-1:-1;;;1414:68:0;;10651:2:14;1414:68:0;;;10633:21:14;;;10670:18;;;10663:30;10729:34;10709:18;;;10702:62;10781:18;;1414:68:0;10449:356:14;2433:187:0;2525:6;;;-1:-1:-1;;;;;2541:17:0;;;;;;;;;;;2573:40;;2525:6;;;2541:17;2525:6;;2573:40;;2506:16;;2573:40;2496:124;2433:187;:::o;8626:328:12:-;8730:7;;-1:-1:-1;;;;;8719:18:12;;;8730:7;;8719:18;8715:208;;8747:21;8771:30;8793:7;8771:21;:30::i;:::-;8747:54;;8829:7;8813:13;:23;8809:65;;;8845:29;;;;;;;;;;;;;;8809:65;8882:34;8899:7;8908;8882:16;:34::i;:::-;8739:184;8715:208;8928:21;8934:5;8941:7;8928:5;:21::i;5712:497::-;-1:-1:-1;;;;;5808:16:12;;5788:17;5808:16;;;:7;:16;;;;;:38;;;;5876:30;5816:7;5876:21;:30::i;:::-;-1:-1:-1;;;;;5912:16:12;;;;;;:7;:16;;;;;:38;;:47;;;5852:54;-1:-1:-1;6011:59:12;5953:6;6045:9;5852:54;6011:25;:59::i;:::-;-1:-1:-1;;;;;5966:16:12;;;;;;:7;:16;;;;;:42;;:104;6123:18;537:6;6123;:18;:::i;:::-;-1:-1:-1;;;;;6077:16:12;;;;;;;:7;:16;;;;;:43;;;:64;;;;-1:-1:-1;;6189:15:12;6147:57;;;-1:-1:-1;5712:497:12:o;6454:::-;-1:-1:-1;;;;;6550:16:12;;6530:17;6550:16;;;:7;:16;;;;;:38;;;;6618:30;6558:7;6618:21;:30::i;:::-;-1:-1:-1;;;;;6654:16:12;;;;;;:7;:16;;;;;:38;;:47;;;6594:54;-1:-1:-1;6753:59:12;6695:6;6787:9;6594:54;6753:25;:59::i;:::-;-1:-1:-1;;;;;6708:16:12;;;;;;:7;:16;;;;;:42;;:104;6865:18;537:6;6865;:18;:::i;:::-;-1:-1:-1;;;;;6819:16:12;;;;;;;:7;:16;;;;;:43;;;:64;;;;-1:-1:-1;;6931:15:12;6819:29;;;;6889:57;;;;-1:-1:-1;6454:497:12:o;3123:203:4:-;-1:-1:-1;;;;;3243:14:4;;3183:15;3243:14;;;:7;:14;;;;;918::7;;1050:1;1032:19;;;;918:14;3302:17:4;3200:126;3123:203;;;:::o;4348:165:10:-;4425:7;4451:55;4473:20;:18;:20::i;:::-;4495:10;8470:57:9;;13041:66:14;8470:57:9;;;13029:79:14;13124:11;;;13117:27;;;13160:12;;;13153:28;;;8434:7:9;;13197:12:14;;8470:57:9;;;;;;;;;;;;8460:68;;;;;;8453:75;;8341:194;;;;;6696:270;6819:7;6839:17;6858:18;6880:25;6891:4;6897:1;6900;6903;6880:10;:25::i;:::-;6838:67;;;;6915:18;6927:5;6915:11;:18::i;:::-;-1:-1:-1;6950:9:9;6696:270;-1:-1:-1;;;;;6696:270:9:o;4755:271:12:-;4830:21;4854:30;4876:7;4854:21;:30::i;:::-;-1:-1:-1;;;;;4890:16:12;;;;;;:7;:16;;;;;4932:15;4890:57;;4830:54;-1:-1:-1;4998:23:12;5014:7;4830:54;4998:23;:::i;:::-;-1:-1:-1;;;;;4953:16:12;;;;;;;:7;:16;;;;;:42;;:68;;;;-1:-1:-1;;4755:271:12:o;8567:535:1:-;-1:-1:-1;;;;;8650:21:1;;8642:65;;;;-1:-1:-1;;;8642:65:1;;11808:2:14;8642:65:1;;;11790:21:14;11847:2;11827:18;;;11820:30;11886:33;11866:18;;;11859:61;11937:18;;8642:65:1;11606:355:14;8642:65:1;8794:6;8778:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;8946:18:1;;:9;:18;;;;;;;;;;;:28;;;;;;8999:37;1615:25:14;;;8999:37:1;;1588:18:14;8999:37:1;;;;;;;1560:107:12;;:::o;5196:271::-;5271:21;5295:30;5317:7;5295:21;:30::i;:::-;-1:-1:-1;;;;;5331:16:12;;;;;;:7;:16;;;;;5373:15;5331:29;;;;:57;5271:54;-1:-1:-1;5439:23:12;5455:7;5271:54;5439:23;:::i;:::-;-1:-1:-1;;;;;5394:16:12;;;;;;;:7;:16;;;;;:42;;:68;;;;-1:-1:-1;;5196:271:12:o;9422:659:1:-;-1:-1:-1;;;;;9505:21:1;;9497:67;;;;-1:-1:-1;;;9497:67:1;;12168:2:14;9497:67:1;;;12150:21:14;12207:2;12187:18;;;12180:30;12246:34;12226:18;;;12219:62;12317:3;12297:18;;;12290:31;12338:19;;9497:67:1;11966:397:14;9497:67:1;-1:-1:-1;;;;;9660:18:1;;9635:22;9660:18;;;;;;;;;;;9696:24;;;;9688:71;;;;-1:-1:-1;;;9688:71:1;;12570:2:14;9688:71:1;;;12552:21:14;12609:2;12589:18;;;12582:30;12648:34;12628:18;;;12621:62;12719:4;12699:18;;;12692:32;12741:19;;9688:71:1;12368:398:14;9688:71:1;-1:-1:-1;;;;;9793:18:1;;:9;:18;;;;;;;;;;;9814:23;;;9793:44;;9930:12;:22;;;;;;;9978:37;1615:25:14;;;9793:9:1;;:18;9978:37;;1588:18:14;9978:37:1;;;;;;;9139:328:12;;;:::o;7125:460::-;7257:24;7289:19;7331:6;7319:9;:18;7315:266;;;7361:18;7373:6;7361:9;:18;:::i;:::-;7347:32;;7422:11;7406:13;:27;:61;;7466:1;7406:61;;;7436:27;7452:11;7436:13;:27;:::i;:::-;7387:80;;7315:266;;;7502:18;7511:9;7502:6;:18;:::i;:::-;7488:32;-1:-1:-1;7547:27:12;7488:32;7547:13;:27;:::i;:::-;7528:46;;7315:266;7283:302;7125:460;;;;;:::o;5069:1494:9:-;5195:7;;6119:66;6106:79;;6102:161;;;-1:-1:-1;6217:1:9;;-1:-1:-1;6221:30:9;6201:51;;6102:161;6374:24;;;6357:14;6374:24;;;;;;;;;13447:25:14;;;13520:4;13508:17;;13488:18;;;13481:45;;;;13542:18;;;13535:34;;;13585:18;;;13578:34;;;6374:24:9;;13419:19:14;;6374:24:9;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6374:24:9;;;;;;-1:-1:-1;;;;;;;6412:20:9;;6408:101;;6464:1;6468:29;6448:50;;;;;;;6408:101;6527:6;-1:-1:-1;6535:20:9;;-1:-1:-1;5069:1494:9;;;;;;;;:::o;570:511::-;647:20;638:5;:29;;;;;;;;:::i;:::-;;634:441;;570:511;:::o;634:441::-;743:29;734:5;:38;;;;;;;;:::i;:::-;;730:345;;788:34;;-1:-1:-1;;;788:34:9;;14014:2:14;788:34:9;;;13996:21:14;14053:2;14033:18;;;14026:30;14092:26;14072:18;;;14065:54;14136:18;;788:34:9;13812:348:14;730:345:9;852:35;843:5;:44;;;;;;;;:::i;:::-;;839:236;;903:41;;-1:-1:-1;;;903:41:9;;14367:2:14;903:41:9;;;14349:21:14;14406:2;14386:18;;;14379:30;14445:33;14425:18;;;14418:61;14496:18;;903:41:9;14165:355:14;839:236:9;974:30;965:5;:39;;;;;;;;:::i;:::-;;961:114;;1020:44;;-1:-1:-1;;;1020:44:9;;14727:2:14;1020:44:9;;;14709:21:14;14766:2;14746:18;;;14739:30;14805:34;14785:18;;;14778:62;14876:4;14856:18;;;14849:32;14898:19;;1020:44:9;14525:398:14;14:607;126:4;155:2;184;173:9;166:21;216:6;210:13;259:6;254:2;243:9;239:18;232:34;284:1;294:140;308:6;305:1;302:13;294:140;;;403:14;;;399:23;;393:30;369:17;;;388:2;365:26;358:66;323:10;;294:140;;;298:3;483:1;478:2;469:6;458:9;454:22;450:31;443:42;612:2;542:66;537:2;529:6;525:15;521:88;510:9;506:104;502:113;494:121;;;;14:607;;;;:::o;626:196::-;694:20;;-1:-1:-1;;;;;743:54:14;;733:65;;723:93;;812:1;809;802:12;723:93;626:196;;;:::o;827:254::-;895:6;903;956:2;944:9;935:7;931:23;927:32;924:52;;;972:1;969;962:12;924:52;995:29;1014:9;995:29;:::i;:::-;985:39;1071:2;1056:18;;;;1043:32;;-1:-1:-1;;;827:254:14:o;1278:186::-;1337:6;1390:2;1378:9;1369:7;1365:23;1361:32;1358:52;;;1406:1;1403;1396:12;1358:52;1429:29;1448:9;1429:29;:::i;1651:328::-;1728:6;1736;1744;1797:2;1785:9;1776:7;1772:23;1768:32;1765:52;;;1813:1;1810;1803:12;1765:52;1836:29;1855:9;1836:29;:::i;:::-;1826:39;;1884:38;1918:2;1907:9;1903:18;1884:38;:::i;:::-;1874:48;;1969:2;1958:9;1954:18;1941:32;1931:42;;1651:328;;;;;:::o;2586:322::-;2663:6;2671;2679;2732:2;2720:9;2711:7;2707:23;2703:32;2700:52;;;2748:1;2745;2738:12;2700:52;2771:29;2790:9;2771:29;:::i;:::-;2761:39;2847:2;2832:18;;2819:32;;-1:-1:-1;2898:2:14;2883:18;;;2870:32;;2586:322;-1:-1:-1;;;2586:322:14:o;3187:442::-;2995:12;;2983:25;;3057:4;3046:16;;;3040:23;3024:14;;;3017:47;3113:4;3102:16;;;3096:23;3080:14;;;3073:47;3169:4;3158:16;;;3152:23;3136:14;;;3129:47;2995:12;;3618:3;3603:19;;2983:25;3046:16;;;3040:23;3024:14;;;3017:47;3102:16;;3096:23;3080:14;;;3073:47;3158:16;;3152:23;3136:14;;;3129:47;3485:3;3470:19;;3560:63;2913:269;3634:693;3745:6;3753;3761;3769;3777;3785;3793;3846:3;3834:9;3825:7;3821:23;3817:33;3814:53;;;3863:1;3860;3853:12;3814:53;3886:29;3905:9;3886:29;:::i;:::-;3876:39;;3934:38;3968:2;3957:9;3953:18;3934:38;:::i;:::-;3924:48;;4019:2;4008:9;4004:18;3991:32;3981:42;;4070:2;4059:9;4055:18;4042:32;4032:42;;4124:3;4113:9;4109:19;4096:33;4169:4;4162:5;4158:16;4151:5;4148:27;4138:55;;4189:1;4186;4179:12;4138:55;3634:693;;;;-1:-1:-1;3634:693:14;;;;4212:5;4264:3;4249:19;;4236:33;;-1:-1:-1;4316:3:14;4301:19;;;4288:33;;3634:693;-1:-1:-1;;3634:693:14:o;4332:260::-;4400:6;4408;4461:2;4449:9;4440:7;4436:23;4432:32;4429:52;;;4477:1;4474;4467:12;4429:52;4500:29;4519:9;4500:29;:::i;:::-;4490:39;;4548:38;4582:2;4571:9;4567:18;4548:38;:::i;:::-;4538:48;;4332:260;;;;;:::o;4597:437::-;4676:1;4672:12;;;;4719;;;4740:61;;4794:4;4786:6;4782:17;4772:27;;4740:61;4847:2;4839:6;4836:14;4816:18;4813:38;4810:218;;4884:77;4881:1;4874:88;4985:4;4982:1;4975:15;5013:4;5010:1;5003:15;5039:184;5091:77;5088:1;5081:88;5188:4;5185:1;5178:15;5212:4;5209:1;5202:15;5228:125;5293:9;;;5314:10;;;5311:36;;;5327:18;;:::i;10143:128::-;10210:9;;;10231:11;;;10228:37;;;10245:18;;:::i;10276:168::-;10349:9;;;10380;;10397:15;;;10391:22;;10377:37;10367:71;;10418:18;;:::i;10810:274::-;10850:1;10876;10866:189;;10911:77;10908:1;10901:88;11012:4;11009:1;11002:15;11040:4;11037:1;11030:15;10866:189;-1:-1:-1;11069:9:14;;10810:274::o;13623:184::-;13675:77;13672:1;13665:88;13772:4;13769:1;13762:15;13796:4;13793:1;13786:15
Swarm Source
ipfs://6c05d1cb2d5ee7acbc37954b185ac7b8f84da140342a0bb1dc1b9522b4a8dd90
Loading...
Loading
Loading...
Loading
OVERVIEW
Planet Ix is a Play 2 Earn, NFT-Based strategry game with a big DEFI / GameFi section. The game and its $IXT token has been on-chain since 2021.Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.