ERC-721
Overview
Max Total Supply
1,117 ILND
Holders
225
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 ILNDLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Islands
Compiler Version
v0.8.4+commit.c7e474f2
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ERC20Mintable.sol"; import "./IslandsHelper.sol"; // The islands // Travel to diff islands and harvest shit. // @author 1929 contract Islands is ERC721, ERC721Enumerable, Ownable { struct Attributes { uint8 resource; uint8 climate; uint8 terrain; uint8 taxRate; uint32 area; uint32 population; } struct Island { uint256 tokenId; ERC20Mintable resourceTokenContract; string resource; string climate; string terrain; uint32 area; uint32 maxPopulation; uint32 population; uint8 taxRate; } string[] public resources = ["Fish", "Wood", "Iron", "Silver", "Pearl", "Oil", "Diamond"]; string[] public climates = ["Temperate", "Rainy", "Humid", "Arid", "Tropical", "Icy"]; string[] public terrains = ["Flatlands", "Hilly", "Canyons", "Mountainous"]; ERC20Mintable[] public resourcesToTokenContracts; uint256 constant MAX_AREA = 5_000; uint32 constant MAX_POPULATION_PER_SQ_MI = 2_000; IslandsHelper public helperContract; mapping(uint256 => Attributes) public tokenIdToAttributes; mapping(uint256 => uint256) public tokenIdToLastHarvest; // For future use so that expansion packs can increase/decrease the population // Idk what this could be used for... but probably something cool mapping(address => bool) public populationEditors; modifier onlyPopulationEditor() { require( populationEditors[msg.sender] == true, "You don't have permission to edit the population" ); _; } constructor( ERC20Mintable fishToken, ERC20Mintable woodToken, ERC20Mintable ironToken, ERC20Mintable silverToken, ERC20Mintable pearlToken, ERC20Mintable oilToken, ERC20Mintable diamondToken ) ERC721("Islands", "ILND") { resourcesToTokenContracts = [ fishToken, woodToken, ironToken, silverToken, pearlToken, oilToken, diamondToken ]; } /** Setters */ function addPopulationEditor(address newPopulationEditor) public onlyOwner { populationEditors[newPopulationEditor] = true; } function removePopulationEditor(address newPopulationEditor) public onlyOwner { populationEditors[newPopulationEditor] = false; } function setHelperContract(IslandsHelper helperContract_) public onlyOwner { helperContract = helperContract_; } function setPopulation(uint256 tokenId, uint32 population) public onlyPopulationEditor { require(population <= getIslandInfo(tokenId).maxPopulation, "Population is over max"); tokenIdToAttributes[tokenId].population = population; } /** Getters */ function getTaxIncome(uint256 tokenId) public view returns (ERC20Mintable, uint256) { return helperContract.getTaxIncome(tokenId); } function getRandomNumber(bytes memory seed, uint256 maxValue) public pure returns (uint256) { return uint256(keccak256(abi.encode(seed))) % maxValue; } function getTokenIdToAttributes(uint256 tokenId) public view returns (Attributes memory) { return tokenIdToAttributes[tokenId]; } function tokenURI(uint256 tokenId) public view override returns (string memory) { return helperContract.tokenURI(tokenId); } function getPopulationPerSqMi(uint256 tokenId) public pure returns (uint32) { return uint32(getRandomNumber(abi.encode(tokenId), MAX_POPULATION_PER_SQ_MI)) + 10; } function getIslandInfo(uint256 tokenId) public view returns (Island memory) { require(_exists(tokenId), "Island with that tokenId doesn't exist"); Attributes memory attr = tokenIdToAttributes[tokenId]; uint32 populationPerSqMi = getPopulationPerSqMi(tokenId); uint32 maxPopulation = populationPerSqMi * attr.area; return Island({ tokenId: tokenId, resource: resources[attr.resource], resourceTokenContract: resourcesToTokenContracts[attr.resource], climate: climates[attr.climate], terrain: terrains[attr.terrain], area: attr.area, maxPopulation: maxPopulation, population: attr.population, taxRate: attr.taxRate }); } /** State modifications */ function mint(uint256 tokenId) public { require(!_exists(tokenId), "Island with that id already exists"); require( (tokenId <= 9900) || (tokenId <= 10_000 && tokenId > 9900 && msg.sender == owner()), "Island id is invalid" ); Attributes memory attr; uint256 value = getRandomNumber(abi.encode(tokenId, "r"), 1000); attr.resource = uint8(value < 700 ? value % 3 : value % 7); value = getRandomNumber(abi.encode(tokenId, "c"), 1000); attr.climate = uint8(value % 6); value = getRandomNumber(abi.encode(tokenId, "t"), 1000); attr.terrain = uint8(value % 4); value = getRandomNumber(abi.encode(tokenId, "ta"), 1000); attr.taxRate = uint8(value % 50) + 1; attr.area = uint32(getRandomNumber(abi.encode(tokenId, "a"), MAX_AREA)) + 1; uint32 populationPerSqMi = getPopulationPerSqMi(tokenId); uint32 maxPopulation = populationPerSqMi * attr.area; attr.population = (uint32(maxPopulation * getRandomNumber(abi.encode(tokenId), 100)) / 100) + 10; tokenIdToAttributes[tokenId] = attr; tokenIdToLastHarvest[tokenId] = block.number; _safeMint(msg.sender, tokenId); } function harvest(uint256 tokenId) public { (ERC20Mintable resourceTokenContract, uint256 taxIncome) = helperContract.getTaxIncome( tokenId ); tokenIdToLastHarvest[tokenId] = block.number; resourceTokenContract.mint(ownerOf(tokenId), taxIncome); } /** Library overrides */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT 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() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT 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.zeppelin.solutions/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: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, 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}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), 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}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - 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) { _approve(_msgSender(), spender, _allowances[_msgSender()][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) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * 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: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, 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; _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; } _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 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 pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(account, amount); } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` 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 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides a function for encoding some bytes in base64 library Base64 { string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { dataPtr := add(dataPtr, 3) // read 3 bytes let input := mload(dataPtr) // write 4 characters mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F))))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./SettlementsV2.sol"; contract ERC20Mintable is ERC20Burnable, Ownable { mapping(address => bool) public approvedMinters; SettlementsV2 settlements; uint256 public totalMinters = 0; bool public canToggleMints = true; modifier onlyMinter() { require(approvedMinters[msg.sender] == true, "Not an approved minter"); _; } constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) { approvedMinters[msg.sender] = true; } function setSettlementsAddress(SettlementsV2 _settlements) public onlyOwner { settlements = _settlements; } function turnOffMintGovernance() public onlyOwner { canToggleMints = false; } function addMinter(address minter) public onlyOwner { require(canToggleMints, "Minting turned off"); totalMinters += 1; approvedMinters[minter] = true; } function removeMinter(address minter) public onlyOwner { require(canToggleMints, "Minting turned off"); approvedMinters[minter] = false; totalMinters -= 1; } function mint(address to, uint256 amount) public onlyMinter { _mint(to, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/Strings.sol"; import "base64-sol/base64.sol"; import "hardhat/console.sol"; import "./SettlementsV2.sol"; import "./ERC20Mintable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Helpers is Ownable { function _makeLegacyParts( string memory size, string memory spirit, string memory age, string memory resource, string memory morale, string memory government, string memory realm ) public pure returns (string[18] memory) { string[18] memory parts; parts[ 0 ] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.txt { fill: black; font-family: monospace; font-size: 12px;}</style><rect width="100%" height="100%" fill="white" /><text x="10" y="20" class="txt">'; parts[1] = size; parts[2] = '</text><text x="10" y="40" class="txt">'; parts[3] = spirit; parts[4] = '</text><text x="10" y="60" class="txt">'; parts[5] = age; parts[6] = '</text><text x="10" y="80" class="txt">'; parts[7] = resource; parts[8] = '</text><text x="10" y="100" class="txt">'; parts[9] = morale; parts[10] = '</text><text x="10" y="120" class="txt">'; parts[11] = government; parts[12] = '</text><text x="10" y="140" class="txt">'; parts[13] = realm; parts[14] = "</text></svg>"; return parts; } function _makeLegacyAttributeParts(string[18] memory parts) public pure returns (string[18] memory) { string[18] memory attrParts; attrParts[0] = '[{ "trait_type": "Size", "value": "'; attrParts[1] = parts[1]; attrParts[2] = '" }, { "trait_type": "Spirit", "value": "'; attrParts[3] = parts[3]; attrParts[4] = '" }, { "trait_type": "Age", "value": "'; attrParts[5] = parts[5]; attrParts[6] = '" }, { "trait_type": "Resource", "value": "'; attrParts[7] = parts[7]; attrParts[8] = '" }, { "trait_type": "Morale", "value": "'; attrParts[9] = parts[9]; attrParts[10] = '" }, { "trait_type": "Government", "value": "'; attrParts[11] = parts[11]; attrParts[12] = '" }, { "trait_type": "Realm", "value": "'; attrParts[13] = parts[13]; attrParts[14] = '" }]'; return attrParts; } function _makeParts( string memory size, string memory spirit, string memory age, string memory resource, string memory morale, string memory government, string memory realm, uint256 unharvestedTokenAmount, string memory tokenSymbol ) public pure returns (string[18] memory) { string[18] memory parts; parts[ 0 ] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.txt { fill: black; font-family: monospace; font-size: 12px;}</style><rect width="100%" height="100%" fill="white" /><text x="10" y="20" class="txt">'; parts[1] = size; parts[2] = '</text><text x="10" y="40" class="txt">'; parts[3] = spirit; parts[4] = '</text><text x="10" y="60" class="txt">'; parts[5] = age; parts[6] = '</text><text x="10" y="80" class="txt">'; parts[7] = resource; parts[8] = '</text><text x="10" y="100" class="txt">'; parts[9] = morale; parts[10] = '</text><text x="10" y="120" class="txt">'; parts[11] = government; parts[12] = '</text><text x="10" y="140" class="txt">'; parts[13] = realm; parts[14] = '</text><text x="10" y="160" class="txt">'; parts[15] = "------------"; parts[16] = '</text><text x="10" y="180" class="txt">'; parts[17] = string( abi.encodePacked( "$", tokenSymbol, ": ", Strings.toString(unharvestedTokenAmount / 10**18), "</text></svg>" ) ); return parts; } function _makeAttributeParts( string memory size, string memory spirit, string memory age, string memory resource, string memory morale, string memory government, string memory realm, uint256 unharvestedTokenAmount, string memory tokenSymbol ) public pure returns (string[18] memory) { string[18] memory attrParts; attrParts[0] = '[{ "trait_type": "Size", "value": "'; attrParts[1] = size; attrParts[2] = '" }, { "trait_type": "Spirit", "value": "'; attrParts[3] = spirit; attrParts[4] = '" }, { "trait_type": "Age", "value": "'; attrParts[5] = age; attrParts[6] = '" }, { "trait_type": "Resource", "value": "'; attrParts[7] = resource; attrParts[8] = '" }, { "trait_type": "Morale", "value": "'; attrParts[9] = morale; attrParts[10] = '" }, { "trait_type": "Government", "value": "'; attrParts[11] = government; attrParts[12] = '" }, { "trait_type": "Realm", "value": "'; attrParts[13] = realm; attrParts[14] = '" }, { "display_type": "number", "trait_type": '; attrParts[15] = string(abi.encodePacked('"$', tokenSymbol, '", "value": ')); attrParts[16] = string(abi.encodePacked(Strings.toString(unharvestedTokenAmount / 10**18))); attrParts[17] = " }]"; return attrParts; } struct TokenURIInput { string size; string spirit; string age; string resource; string morale; string government; string realm; } function tokenURI( TokenURIInput memory tokenURIInput, uint256 unharvestedTokenAmount, string memory tokenSymbol, bool useLegacy, uint256 tokenId ) public view returns (string memory) { string[18] memory parts; string[18] memory attributesParts; if (useLegacy) { parts = _makeLegacyParts( tokenURIInput.size, tokenURIInput.spirit, tokenURIInput.age, tokenURIInput.resource, tokenURIInput.morale, tokenURIInput.government, tokenURIInput.realm ); attributesParts = _makeLegacyAttributeParts( _makeLegacyParts( tokenURIInput.size, tokenURIInput.spirit, tokenURIInput.age, tokenURIInput.resource, tokenURIInput.morale, tokenURIInput.government, tokenURIInput.realm ) ); } else { parts = _makeParts( tokenURIInput.size, tokenURIInput.spirit, tokenURIInput.age, tokenURIInput.resource, tokenURIInput.morale, tokenURIInput.government, tokenURIInput.realm, unharvestedTokenAmount, tokenSymbol ); attributesParts = _makeAttributeParts( tokenURIInput.size, tokenURIInput.spirit, tokenURIInput.age, tokenURIInput.resource, tokenURIInput.morale, tokenURIInput.government, tokenURIInput.realm, unharvestedTokenAmount, tokenSymbol ); } string memory output = string( abi.encodePacked( parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6], parts[7], parts[8] ) ); output = string( abi.encodePacked( output, parts[9], parts[10], parts[11], parts[12], parts[13], parts[14], parts[15], parts[16] ) ); output = string(abi.encodePacked(output, parts[17])); string memory atrrOutput = string( abi.encodePacked( attributesParts[0], attributesParts[1], attributesParts[2], attributesParts[3], attributesParts[4], attributesParts[5], attributesParts[6], attributesParts[7], attributesParts[8] ) ); atrrOutput = string( abi.encodePacked( atrrOutput, attributesParts[9], attributesParts[10], attributesParts[11], attributesParts[12], attributesParts[13], attributesParts[14] ) ); atrrOutput = string( abi.encodePacked( atrrOutput, attributesParts[15], attributesParts[16], attributesParts[17] ) ); string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name": "Settlement #', Strings.toString(tokenId), '", "description": "Settlements are a turn based civilisation simulator stored entirely on chain, go forth and conquer.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"', ',"attributes":', atrrOutput, "}" ) ) ) ); return string(abi.encodePacked("data:application/json;base64,", json)); } uint8[] public civMultipliers; uint8[] public realmMultipliers; uint8[] public moralMultipliers; uint256 constant ONE = 10**18; function setMultipliers( uint8[] memory civMultipliers_, uint8[] memory realmMultipliers_, uint8[] memory moralMultipliers_ ) public onlyOwner { civMultipliers = civMultipliers_; realmMultipliers = realmMultipliers_; moralMultipliers = moralMultipliers_; } function getUnharvestedTokens(uint256 tokenId, SettlementsV2.Attributes memory attributes) public view returns (ERC20Mintable, uint256) { SettlementsV2 caller = SettlementsV2(msg.sender); uint256 lastHarvest = caller.tokenIdToLastHarvest(tokenId); uint256 blockDelta = block.number - lastHarvest; ERC20Mintable tokenAddress = caller.resourceTokenAddresses(attributes.resource); if (blockDelta == 0 || lastHarvest == 0) { return (tokenAddress, 0); } uint256 realmMultiplier = realmMultipliers[attributes.turns]; uint256 civMultiplier = civMultipliers[attributes.size]; uint256 moralMultiplier = moralMultipliers[attributes.morale]; uint256 tokensToMint = (civMultiplier * blockDelta * moralMultiplier * ONE * realmMultiplier) / 300; return (tokenAddress, tokensToMint); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./Islands.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC20Mintable.sol"; import "base64-sol/base64.sol"; contract IslandsHelper is Ownable { uint256 constant ONE = 10**18; Islands public islandContract; uint8[] public climateMultipliers; uint8[] public terrainMultipliers; function setIslandsContract(Islands islandContract_) public onlyOwner { islandContract = islandContract_; } function setMultipliers(uint8[] memory climateMultipliers_, uint8[] memory terrainMultipliers_) public onlyOwner { climateMultipliers = climateMultipliers_; terrainMultipliers = terrainMultipliers_; } function getImageOutput(Islands.Island memory islandInfo) public view returns (string memory) { string memory imageOutput = string( abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.txt { fill: black; font-family: monospace; font-size: 12px;}</style><rect width="100%" height="100%" fill="white" /><text x="10" y="20" class="txt">', islandInfo.climate, '</text><text x="10" y="40" class="txt">', islandInfo.terrain, '</text><text x="10" y="60" class="txt">', islandInfo.resource, '</text><text x="10" y="80" class="txt">', string(abi.encodePacked(Strings.toString(islandInfo.area), " sq mi")), '</text><text x="10" y="100" class="txt">' ) ); (ERC20Mintable resourceTokenContract, uint256 taxIncome) = getTaxIncome(islandInfo.tokenId); imageOutput = string( abi.encodePacked( imageOutput, string( abi.encodePacked( "Pop. ", Strings.toString(islandInfo.population), "/", Strings.toString(islandInfo.maxPopulation) ) ), '</text><text x="10" y="120" class="txt">', "------------", '</text><text x="10" y="140" class="txt">', string(abi.encodePacked("Tax Rate: ", Strings.toString(islandInfo.taxRate), "%")), '</text><text x="10" y="160" class="txt">', string( abi.encodePacked( "Tax Income: ", Strings.toString(taxIncome / 10**18), " $", resourceTokenContract.symbol() ) ), '</text><text x="10" y="180" class="txt">', "</text></svg>" ) ); return imageOutput; } function getAttrOutput(Islands.Island memory islandInfo) public view returns (string memory) { (ERC20Mintable __, uint256 taxIncome) = getTaxIncome(islandInfo.tokenId); string memory attrOutput = string( abi.encodePacked( '[{ "trait_type": "Climate", "value": "', islandInfo.climate, '" }, { "trait_type": "Terain", "value": "', islandInfo.terrain, '" }, { "trait_type": "Resource", "value": "', islandInfo.resource, '" }, { "trait_type": "Area (sq mi)", "display_type": "number", "value": ', Strings.toString(islandInfo.area), ' }, { "trait_type": "Population", "display_type": "number", "value": ', Strings.toString(islandInfo.population), ' }, { "trait_type": "Tax Rate", "display_type": "boost_percentage", "value": ', Strings.toString(islandInfo.taxRate) ) ); attrOutput = string( abi.encodePacked( attrOutput, ' }, { "trait_type": "Max Population", "display_type": "number", "value": ', Strings.toString(islandInfo.maxPopulation), ' }, { "trait_type": "Tax Income", "display_type": "number", "value": ', Strings.toString(taxIncome / 10**18), " }]" ) ); return attrOutput; } function getTaxIncome(uint256 tokenId) public view returns (ERC20Mintable, uint256) { Islands.Attributes memory islandInfo = islandContract.getTokenIdToAttributes(tokenId); ERC20Mintable resourceTokenContract = islandContract.resourcesToTokenContracts( islandInfo.resource ); uint256 lastHarvest = islandContract.tokenIdToLastHarvest(tokenId); uint256 blockDelta = block.number - lastHarvest; uint256 tokenAmount = (blockDelta * climateMultipliers[islandInfo.climate] * terrainMultipliers[islandInfo.terrain] * islandInfo.taxRate * islandInfo.population * ONE) / 1_000_000_000; return (resourceTokenContract, tokenAmount); } function tokenURI(uint256 tokenId) public view returns (string memory) { Islands.Island memory islandInfo = islandContract.getIslandInfo(tokenId); string memory imageOutput = getImageOutput(islandInfo); string memory attrOutput = getAttrOutput(islandInfo); string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name": "Island #', Strings.toString(tokenId), '", "description": "Islands can be discovered and harvested for their resources. All data is onchain.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(imageOutput)), '", "attributes": ', attrOutput, "}" ) ) ) ); return string(abi.encodePacked("data:application/json;base64,", json)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "base64-sol/base64.sol"; // //▄████████ ▄████████ ███ ███ ▄█ ▄████████ ▄▄▄▄███▄▄▄▄ ▄████████ ███▄▄▄▄ ███ ▄████████ //███ ███ ███ ███ ▀█████████▄ ▀█████████▄ ███ ███ ███ ▄██▀▀▀███▀▀▀██▄ ███ ███ ███▀▀▀██▄ ▀█████████▄ ███ ███ //███ █▀ ███ █▀ ▀███▀▀██ ▀███▀▀██ ███ ███ █▀ ███ ███ ███ ███ █▀ ███ ███ ▀███▀▀██ ███ █▀ //███ ▄███▄▄▄ ███ ▀ ███ ▀ ███ ▄███▄▄▄ ███ ███ ███ ▄███▄▄▄ ███ ███ ███ ▀ ███ //▀███████████ ▀▀███▀▀▀ ███ ███ ███ ▀▀███▀▀▀ ███ ███ ███ ▀▀███▀▀▀ ███ ███ ███ ▀███████████ //███ ███ █▄ ███ ███ ███ ███ █▄ ███ ███ ███ ███ █▄ ███ ███ ███ ███ //▄█ ███ ███ ███ ███ ███ ███▌ ▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄█ ███ //▄████████▀ ██████████ ▄████▀ ▄████▀ █████▄▄██ ██████████ ▀█ ███ █▀ ██████████ ▀█ █▀ ▄████▀ ▄████████▀ //▀ // @author zeth // @notice This contract is heavily inspired by Dom Hofmann's Loot Project with game design from Sid Meirs Civilisation, DND, Settlers of Catan & Age of Empires. // Settlements allows for the creation of settlements of which users have 5 turns to create their perfect civ. // Randomise will pseduo randomly assign a settlement a new set of attributes & increase their turn count. // An allocation of 100 settlements are reserved for owner & future expansion packs contract SettlementsLegacy is ERC721, ERC721Enumerable, ReentrancyGuard, Ownable { constructor() ERC721("Settlements", "STL") {} struct Attributes { uint8 size; uint8 spirit; uint8 age; uint8 resource; uint8 morale; uint8 government; uint8 turns; } string[] private _sizes = [ "Camp", "Hamlet", "Village", "Town", "District", "Precinct", "Capitol", "State" ]; string[] private _spirits = ["Earth", "Fire", "Water", "Air", "Astral"]; string[] private _ages = [ "Ancient", "Classical", "Medieval", "Renaissance", "Industrial", "Modern", "Information", "Future" ]; string[] private _resources = [ "Iron", "Gold", "Silver", "Wood", "Wool", "Water", "Grass", "Grain" ]; string[] private _morales = [ "Expectant", "Enlightened", "Dismissive", "Unhappy", "Happy", "Undecided", "Warring", "Scared", "Unruly", "Anarchist" ]; string[] private _governments = [ "Democracy", "Communism", "Socialism", "Oligarchy", "Aristocracy", "Monarchy", "Theocracy", "Colonialism", "Dictatorship" ]; string[] private _realms = [ "Genesis", "Valhalla", "Keskella", "Shadow", "Plains", "Ends" ]; mapping(uint256 => Attributes) private attrIndex; function indexFor(string memory input, uint256 length) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))) % length; } function _getRandomSeed(uint256 tokenId, string memory seedFor) internal view returns (string memory) { return string( abi.encodePacked( seedFor, Strings.toString(tokenId), block.timestamp, block.difficulty ) ); } function generateAttribute(string memory salt, string[] memory items) internal pure returns (uint8) { return uint8(indexFor(string(salt), items.length)); } function _makeParts(uint256 tokenId) internal view returns (string[15] memory) { string[15] memory parts; parts[ 0 ] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.txt { fill: black; font-family: monospace; font-size: 12px;}</style><rect width="100%" height="100%" fill="white" /><text x="10" y="20" class="txt">'; parts[1] = _sizes[attrIndex[tokenId].size]; parts[2] = '</text><text x="10" y="40" class="txt">'; parts[3] = _spirits[attrIndex[tokenId].spirit]; parts[4] = '</text><text x="10" y="60" class="txt">'; parts[5] = _ages[attrIndex[tokenId].age]; parts[6] = '</text><text x="10" y="80" class="txt">'; parts[7] = _resources[attrIndex[tokenId].resource]; parts[8] = '</text><text x="10" y="100" class="txt">'; parts[9] = _morales[attrIndex[tokenId].morale]; parts[10] = '</text><text x="10" y="120" class="txt">'; parts[11] = _governments[attrIndex[tokenId].government]; parts[12] = '</text><text x="10" y="140" class="txt">'; parts[13] = _realms[attrIndex[tokenId].turns]; parts[14] = "</text></svg>"; return parts; } function _makeAttributeParts(string[15] memory parts) internal pure returns (string[15] memory) { string[15] memory attrParts; attrParts[0] = '[{ "trait_type": "Size", "value": "'; attrParts[1] = parts[1]; attrParts[2] = '" }, { "trait_type": "Spirit", "value": "'; attrParts[3] = parts[3]; attrParts[4] = '" }, { "trait_type": "Age", "value": "'; attrParts[5] = parts[5]; attrParts[6] = '" }, { "trait_type": "Resource", "value": "'; attrParts[7] = parts[7]; attrParts[8] = '" }, { "trait_type": "Morale", "value": "'; attrParts[9] = parts[9]; attrParts[10] = '" }, { "trait_type": "Government", "value": "'; attrParts[11] = parts[11]; attrParts[12] = '" }, { "trait_type": "Realm", "value": "'; attrParts[13] = parts[13]; attrParts[14] = '" }]'; return attrParts; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); string[15] memory parts = _makeParts(tokenId); string[15] memory attributesParts = _makeAttributeParts(parts); string memory output = string( abi.encodePacked( parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6], parts[7], parts[8] ) ); output = string( abi.encodePacked( output, parts[9], parts[10], parts[11], parts[12], parts[13], parts[14] ) ); string memory atrrOutput = string( abi.encodePacked( attributesParts[0], attributesParts[1], attributesParts[2], attributesParts[3], attributesParts[4], attributesParts[5], attributesParts[6], attributesParts[7], attributesParts[8] ) ); atrrOutput = string( abi.encodePacked( atrrOutput, attributesParts[9], attributesParts[10], attributesParts[11], attributesParts[12], attributesParts[13], attributesParts[14] ) ); string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name": "Settlement #', Strings.toString(tokenId), '", "description": "Settlements are a turn based civilisation simulator stored entirely on chain, go forth and conquer.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"', ',"attributes":', atrrOutput, "}" ) ) ) ); output = string( abi.encodePacked("data:application/json;base64,", json) ); return output; } function randomiseAttributes(uint256 tokenId, uint8 turn) internal { attrIndex[tokenId].size = generateAttribute( _getRandomSeed(tokenId, "size"), _sizes ); attrIndex[tokenId].spirit = generateAttribute( _getRandomSeed(tokenId, "spirit"), _spirits ); attrIndex[tokenId].age = generateAttribute( _getRandomSeed(tokenId, "age"), _ages ); attrIndex[tokenId].resource = generateAttribute( _getRandomSeed(tokenId, "resource"), _resources ); attrIndex[tokenId].morale = generateAttribute( _getRandomSeed(tokenId, "morale"), _morales ); attrIndex[tokenId].government = generateAttribute( _getRandomSeed(tokenId, "government"), _governments ); attrIndex[tokenId].turns = turn; } function randomise(uint256 tokenId) public nonReentrant { require( _exists(tokenId) && msg.sender == ownerOf(tokenId) && attrIndex[tokenId].turns < 5, "Settlement turns over" ); randomiseAttributes( tokenId, uint8(SafeMath.add(attrIndex[tokenId].turns, 1)) ); } function settle(uint256 tokenId) public nonReentrant { require( !_exists(tokenId) && tokenId > 0 && tokenId < 9901, "Settlement id is invalid" ); randomiseAttributes(tokenId, 0); _safeMint(msg.sender, tokenId); } function settleForOwner(uint256 tokenId) public nonReentrant onlyOwner { require( !_exists(tokenId) && tokenId > 9900 && tokenId < 10001, "Settlement id is invalid" ); randomiseAttributes(tokenId, 0); _safeMint(msg.sender, tokenId); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./SettlementsLegacy.sol"; import "./ERC20Mintable.sol"; import "./Helper.sol"; import "hardhat/console.sol"; // @author zeth and out.eth // @notice This contract is heavily inspired by Dom Hofmann's Loot Project with game design from Sid Meirs Civilisation, DND, Settlers of Catan & Age of Empires. // Lands allows for the creation of lands of which users have 5 turns to create their perfect civ. // Randomise will pseduo randomly assign a land a new set of attributes & increase their turn count. // An allocation of 100 lands are reserved for owner & future expansion packs contract SettlementsV2 is ERC721, ERC721Enumerable, Ownable { struct Attributes { uint8 size; uint8 spirit; uint8 age; uint8 resource; uint8 morale; uint8 government; uint8 turns; } SettlementsLegacy public legacySettlements; Helpers public helpersContract; ERC20Mintable[] public resourceTokenAddresses; mapping(uint256 => uint256) public tokenIdToLastHarvest; mapping(uint256 => Attributes) public attrIndex; string[] public _sizes = [ "Camp", "Hamlet", "Village", "Town", "District", "Precinct", "Capitol", "State" ]; string[] public _spirits = ["Earth", "Fire", "Water", "Air", "Astral"]; string[] public _ages = [ "Ancient", "Classical", "Medieval", "Renaissance", "Industrial", "Modern", "Information", "Future" ]; string[] public _resources = [ "Iron", "Gold", "Silver", "Wood", "Wool", "Water", "Grass", "Grain" ]; string[] public _morales = [ "Expectant", "Enlightened", "Dismissive", "Unhappy", "Happy", "Undecided", "Warring", "Scared", "Unruly", "Anarchist" ]; string[] public _governments = [ "Democracy", "Communism", "Socialism", "Oligarchy", "Aristocracy", "Monarchy", "Theocracy", "Colonialism", "Dictatorship" ]; string[] public _realms = ["Genesis", "Valhalla", "Keskella", "Shadow", "Plains", "Ends"]; constructor( SettlementsLegacy _legacyAddress, ERC20Mintable ironToken_, ERC20Mintable goldToken_, ERC20Mintable silverToken_, ERC20Mintable woodToken_, ERC20Mintable woolToken_, ERC20Mintable waterToken_, ERC20Mintable grassToken_, ERC20Mintable grainToken_ ) ERC721("Settlements", "STL") { legacySettlements = _legacyAddress; resourceTokenAddresses = [ ironToken_, goldToken_, silverToken_, woodToken_, woolToken_, waterToken_, grassToken_, grainToken_ ]; } function setHelpersContract(Helpers helpersContract_) public onlyOwner { helpersContract = helpersContract_; } function indexFor(string memory input, uint256 length) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))) % length; } function _getRandomSeed(uint256 tokenId, string memory seedFor) internal view returns (string memory) { return string( abi.encodePacked( seedFor, Strings.toString(tokenId), block.timestamp, block.difficulty ) ); } function generateAttribute(string memory salt, string[] memory items) internal pure returns (uint8) { return uint8(indexFor(string(salt), items.length)); } function _oldTokenURI(uint256 tokenId) private view returns (string memory) { return _tokenURI(tokenId, true); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { return _tokenURI(tokenId, false); } function getUnharvestedTokens(uint256 tokenId) public view returns (ERC20Mintable, uint256) { Attributes memory attributes = attrIndex[tokenId]; return helpersContract.getUnharvestedTokens(tokenId, attributes); } function _tokenURI(uint256 tokenId, bool useLegacy) private view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); Helpers.TokenURIInput memory tokenURIInput; tokenURIInput.size = _sizes[attrIndex[tokenId].size]; tokenURIInput.spirit = _spirits[attrIndex[tokenId].spirit]; tokenURIInput.age = _ages[attrIndex[tokenId].age]; tokenURIInput.resource = _resources[attrIndex[tokenId].resource]; tokenURIInput.morale = _morales[attrIndex[tokenId].morale]; tokenURIInput.government = _governments[attrIndex[tokenId].government]; tokenURIInput.realm = _realms[attrIndex[tokenId].turns]; ERC20Mintable tokenContract = resourceTokenAddresses[0]; uint256 unharvestedTokenAmount = 0; if (useLegacy == false) { Attributes memory attributes = attrIndex[tokenId]; (tokenContract, unharvestedTokenAmount) = getUnharvestedTokens(tokenId); } string memory output = helpersContract.tokenURI( tokenURIInput, unharvestedTokenAmount, tokenContract.symbol(), useLegacy, tokenId ); return output; } function randomiseAttributes(uint256 tokenId, uint8 turn) internal { attrIndex[tokenId].size = generateAttribute(_getRandomSeed(tokenId, "size"), _sizes); attrIndex[tokenId].spirit = generateAttribute(_getRandomSeed(tokenId, "spirit"), _spirits); attrIndex[tokenId].age = generateAttribute(_getRandomSeed(tokenId, "age"), _ages); attrIndex[tokenId].resource = generateAttribute( _getRandomSeed(tokenId, "resource"), _resources ); attrIndex[tokenId].morale = generateAttribute(_getRandomSeed(tokenId, "morale"), _morales); attrIndex[tokenId].government = generateAttribute( _getRandomSeed(tokenId, "government"), _governments ); attrIndex[tokenId].turns = turn; } function randomise(uint256 tokenId) public { require( _exists(tokenId) && msg.sender == ownerOf(tokenId) && attrIndex[tokenId].turns < 5, "Settlement turns over" ); harvest(tokenId); randomiseAttributes(tokenId, attrIndex[tokenId].turns + 1); } function harvest(uint256 tokenId) public { (ERC20Mintable tokenAddress, uint256 tokensToMint) = getUnharvestedTokens(tokenId); tokenAddress.mint(ownerOf(tokenId), tokensToMint); tokenIdToLastHarvest[tokenId] = block.number; } function multiClaim(uint256[] calldata tokenIds, Attributes[] memory tokenAttributes) public { for (uint256 i = 0; i < tokenAttributes.length; i++) { claim(tokenIds[i], tokenAttributes[i]); } } function claim(uint256 tokenId, Attributes memory attributes) public { legacySettlements.transferFrom(msg.sender, address(this), tokenId); _safeMint(msg.sender, tokenId); attrIndex[tokenId] = attributes; bytes32 v2Uri = keccak256(abi.encodePacked(_oldTokenURI(tokenId))); bytes32 legacyURI = keccak256(abi.encodePacked(legacySettlements.tokenURI(tokenId))); tokenIdToLastHarvest[tokenId] = block.number; require(v2Uri == legacyURI, "Attributes don't match legacy contract"); } function claimAndReroll(uint256 tokenId) public { legacySettlements.transferFrom(msg.sender, address(this), tokenId); randomiseAttributes(tokenId, 3); _safeMint(msg.sender, tokenId); } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function getSettlementSize(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _sizes[attrIndex[tokenId].size]; } function getSettlementSpirit(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _spirits[attrIndex[tokenId].spirit]; } function getSettlementAge(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _ages[attrIndex[tokenId].age]; } function getSettlementResource(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _resources[attrIndex[tokenId].resource]; } function getSettlementMorale(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _morales[attrIndex[tokenId].morale]; } function getSettlementGovernment(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _governments[attrIndex[tokenId].government]; } function getSettlementRealm(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Settlement does not exist"); return _realms[attrIndex[tokenId].turns]; } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 <0.9.0; library console { address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); function _sendLogPayload(bytes memory payload) private view { uint256 payloadLength = payload.length; address consoleAddress = CONSOLE_ADDRESS; assembly { let payloadStart := add(payload, 32) let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) } } function log() internal view { _sendLogPayload(abi.encodeWithSignature("log()")); } function logInt(int p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); } function logUint(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function logString(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function logBool(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function logAddress(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function logBytes(bytes memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); } function logBytes1(bytes1 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); } function logBytes2(bytes2 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); } function logBytes3(bytes3 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); } function logBytes4(bytes4 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); } function logBytes5(bytes5 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); } function logBytes6(bytes6 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); } function logBytes7(bytes7 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); } function logBytes8(bytes8 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); } function logBytes9(bytes9 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); } function logBytes10(bytes10 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); } function logBytes11(bytes11 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); } function logBytes12(bytes12 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); } function logBytes13(bytes13 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); } function logBytes14(bytes14 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); } function logBytes15(bytes15 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); } function logBytes16(bytes16 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); } function logBytes17(bytes17 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); } function logBytes18(bytes18 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); } function logBytes19(bytes19 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); } function logBytes20(bytes20 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); } function logBytes21(bytes21 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); } function logBytes22(bytes22 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); } function logBytes23(bytes23 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); } function logBytes24(bytes24 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); } function logBytes25(bytes25 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); } function logBytes26(bytes26 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); } function logBytes27(bytes27 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); } function logBytes28(bytes28 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); } function logBytes29(bytes29 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); } function logBytes30(bytes30 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); } function logBytes31(bytes31 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); } function logBytes32(bytes32 p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); } function log(uint p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); } function log(string memory p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); } function log(bool p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); } function log(address p0) internal view { _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); } function log(uint p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); } function log(uint p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); } function log(uint p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); } function log(uint p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); } function log(string memory p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); } function log(string memory p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); } function log(string memory p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); } function log(string memory p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); } function log(bool p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); } function log(bool p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); } function log(bool p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); } function log(bool p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); } function log(address p0, uint p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); } function log(address p0, string memory p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); } function log(address p0, bool p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); } function log(address p0, address p1) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); } function log(uint p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); } function log(uint p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); } function log(uint p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); } function log(uint p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); } function log(uint p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); } function log(uint p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); } function log(uint p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); } function log(uint p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); } function log(uint p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); } function log(uint p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); } function log(uint p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); } function log(uint p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); } function log(uint p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); } function log(uint p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); } function log(uint p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); } function log(uint p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); } function log(string memory p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); } function log(string memory p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); } function log(string memory p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); } function log(string memory p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); } function log(string memory p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); } function log(string memory p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); } function log(string memory p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); } function log(string memory p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); } function log(string memory p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); } function log(string memory p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); } function log(string memory p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); } function log(string memory p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); } function log(string memory p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); } function log(string memory p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); } function log(string memory p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); } function log(string memory p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); } function log(bool p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); } function log(bool p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); } function log(bool p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); } function log(bool p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); } function log(bool p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); } function log(bool p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); } function log(bool p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); } function log(bool p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); } function log(bool p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); } function log(bool p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); } function log(bool p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); } function log(bool p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); } function log(bool p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); } function log(bool p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); } function log(bool p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); } function log(bool p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); } function log(address p0, uint p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); } function log(address p0, uint p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); } function log(address p0, uint p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); } function log(address p0, uint p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); } function log(address p0, string memory p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); } function log(address p0, string memory p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); } function log(address p0, string memory p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); } function log(address p0, string memory p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); } function log(address p0, bool p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); } function log(address p0, bool p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); } function log(address p0, bool p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); } function log(address p0, bool p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); } function log(address p0, address p1, uint p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); } function log(address p0, address p1, string memory p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); } function log(address p0, address p1, bool p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); } function log(address p0, address p1, address p2) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); } function log(uint p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); } function log(uint p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); } function log(uint p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); } function log(uint p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); } function log(uint p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); } function log(string memory p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); } function log(bool p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); } function log(bool p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); } function log(bool p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); } function log(bool p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); } function log(address p0, uint p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); } function log(address p0, string memory p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); } function log(address p0, bool p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, uint p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, string memory p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, bool p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, uint p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, string memory p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, bool p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); } function log(address p0, address p1, address p2, address p3) internal view { _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ERC20Mintable","name":"fishToken","type":"address"},{"internalType":"contract ERC20Mintable","name":"woodToken","type":"address"},{"internalType":"contract ERC20Mintable","name":"ironToken","type":"address"},{"internalType":"contract ERC20Mintable","name":"silverToken","type":"address"},{"internalType":"contract ERC20Mintable","name":"pearlToken","type":"address"},{"internalType":"contract ERC20Mintable","name":"oilToken","type":"address"},{"internalType":"contract ERC20Mintable","name":"diamondToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","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":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"newPopulationEditor","type":"address"}],"name":"addPopulationEditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"climates","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getIslandInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"contract ERC20Mintable","name":"resourceTokenContract","type":"address"},{"internalType":"string","name":"resource","type":"string"},{"internalType":"string","name":"climate","type":"string"},{"internalType":"string","name":"terrain","type":"string"},{"internalType":"uint32","name":"area","type":"uint32"},{"internalType":"uint32","name":"maxPopulation","type":"uint32"},{"internalType":"uint32","name":"population","type":"uint32"},{"internalType":"uint8","name":"taxRate","type":"uint8"}],"internalType":"struct Islands.Island","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPopulationPerSqMi","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"seed","type":"bytes"},{"internalType":"uint256","name":"maxValue","type":"uint256"}],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTaxIncome","outputs":[{"internalType":"contract ERC20Mintable","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenIdToAttributes","outputs":[{"components":[{"internalType":"uint8","name":"resource","type":"uint8"},{"internalType":"uint8","name":"climate","type":"uint8"},{"internalType":"uint8","name":"terrain","type":"uint8"},{"internalType":"uint8","name":"taxRate","type":"uint8"},{"internalType":"uint32","name":"area","type":"uint32"},{"internalType":"uint32","name":"population","type":"uint32"}],"internalType":"struct Islands.Attributes","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"helperContract","outputs":[{"internalType":"contract IslandsHelper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"populationEditors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newPopulationEditor","type":"address"}],"name":"removePopulationEditor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"resources","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"resourcesToTokenContracts","outputs":[{"internalType":"contract ERC20Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IslandsHelper","name":"helperContract_","type":"address"}],"name":"setHelperContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint32","name":"population","type":"uint32"}],"name":"setPopulation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"terrains","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToAttributes","outputs":[{"internalType":"uint8","name":"resource","type":"uint8"},{"internalType":"uint8","name":"climate","type":"uint8"},{"internalType":"uint8","name":"terrain","type":"uint8"},{"internalType":"uint8","name":"taxRate","type":"uint8"},{"internalType":"uint32","name":"area","type":"uint32"},{"internalType":"uint32","name":"population","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToLastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60046101608181526308cd2e6d60e31b6101805260809081526101a08281526315dbdbd960e21b6101c05260a0526101e09182526324b937b760e11b6102005260c09190915260066102209081526529b4b63b32b960d11b6102405260e0526005610260908152641419585c9b60da1b610280526101005260036102a09081526213da5b60ea1b6102c0526101205261032060405260076102e081815266111a585b5bdb9960ca1b6103005261014052620000bd91600b916200039e565b506040805161010081018252600960c082019081526854656d70657261746560b81b60e08301528152815180830183526005808252645261696e7960d81b602083810191909152808401929092528351808501855290815264121d5b5a5960da1b8183015282840152825180840184526004815263105c9a5960e21b818301526060830152825180840184526008815267151c9bdc1a58d85b60c21b8183015260808301528251808401909352600383526249637960e81b9083015260a08101919091526200019190600c90600662000402565b506040805160c08101825260096080820190815268466c61746c616e647360b81b60a0830152815281518083018352600581526448696c6c7960d81b6020828101919091528083019190915282518084018452600781526643616e796f6e7360c81b81830152828401528251808401909352600b83526a4d6f756e7461696e6f757360a81b9083015260608101919091526200023290600d90600462000454565b503480156200024057600080fd5b506040516200339238038062003392833981016040819052620002639162000620565b604080518082018252600781526649736c616e647360c81b6020808301918252835180850190945260048452631253139160e21b908401528151919291620002ae91600091620004a6565b508051620002c4906001906020840190620004a6565b505050620002e1620002db6200034860201b60201c565b6200034c565b6040805160e0810182526001600160a01b03808a1682528881166020830152878116928201929092528582166060820152848216608082015283821660a082015290821660c08201526200033a90600e90600762000531565b5050505050505050620006f1565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054828255906000526020600020908101928215620003f0579160200282015b82811115620003f05782518051620003df918491602090910190620004a6565b5091602001919060010190620003bf565b50620003fe92915062000589565b5090565b828054828255906000526020600020908101928215620003f0579160200282015b82811115620003f0578251805162000443918491602090910190620004a6565b509160200191906001019062000423565b828054828255906000526020600020908101928215620003f0579160200282015b82811115620003f0578251805162000495918491602090910190620004a6565b509160200191906001019062000475565b828054620004b490620006b4565b90600052602060002090601f016020900481019282620004d8576000855562000523565b82601f10620004f357805160ff191683800117855562000523565b8280016001018555821562000523579182015b828111156200052357825182559160200191906001019062000506565b50620003fe929150620005aa565b82805482825590600052602060002090810192821562000523579160200282015b828111156200052357825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000552565b80821115620003fe576000620005a08282620005c1565b5060010162000589565b5b80821115620003fe5760008155600101620005ab565b508054620005cf90620006b4565b6000825580601f10620005e0575050565b601f016020900490600052602060002090810190620006009190620005aa565b50565b80516001600160a01b03811681146200061b57600080fd5b919050565b600080600080600080600060e0888a0312156200063b578283fd5b620006468862000603565b9650620006566020890162000603565b9550620006666040890162000603565b9450620006766060890162000603565b9350620006866080890162000603565b92506200069660a0890162000603565b9150620006a660c0890162000603565b905092959891949750929550565b600181811c90821680620006c957607f821691505b60208210811415620006eb57634e487b7160e01b600052602260045260246000fd5b50919050565b612c9180620007016000396000f3fe608060405234801561001057600080fd5b50600436106102325760003560e01c8063715018a611610130578063a22cb465116100b8578063c5639cc61161007c578063c5639cc6146106b1578063c87b56dd146106c4578063ddc63262146106d7578063e985e9c5146106ea578063f2fde38b1461072657600080fd5b8063a22cb46514610652578063a5dc9e1b14610665578063a7c9d9e914610678578063b5e00d6a1461068b578063b88d4fde1461069e57600080fd5b80638da5cb5b116100ff5780638da5cb5b146105f35780639288f2a11461060457806395d89b41146106175780639a84b6bd1461061f578063a0712d681461063f57600080fd5b8063715018a6146105a257806372bc96b4146105aa57806382365e66146105cd5780638c1d808c146105e057600080fd5b806342842e0e116101be5780636352211e116101825780636352211e14610517578063636699491461052a578063684d07701461053d5780636997e8f61461055d57806370a082311461058f57600080fd5b806342842e0e1461039b5780634eb414c3146103ae5780634f6ccce7146103c1578063521e8749146103d45780635497607a146104ef57600080fd5b80631177f379116102055780631177f379146102b457806318160ddd1461035057806323b872dd14610362578063244d6daa146103755780632f745c591461038857600080fd5b806301ffc9a71461023757806306fdde031461025f578063081812fc14610274578063095ea7b31461029f575b600080fd5b61024a6102453660046126a4565b610739565b60405190151581526020015b60405180910390f35b61026761074a565b604051610256919061286c565b6102876102823660046127bf565b6107dc565b6040516001600160a01b039091168152602001610256565b6102b26102ad366004612679565b610876565b005b61030e6102c23660046127bf565b60106020526000908152604090205460ff808216916101008104821691620100008204811691630100000081049091169063ffffffff6401000000008204811691600160401b90041686565b6040805160ff97881681529587166020870152938616938501939093529316606083015263ffffffff92831660808301529190911660a082015260c001610256565b6008545b604051908152602001610256565b6102b261037036600461259e565b61098c565b6102676103833660046127bf565b6109bd565b610354610396366004612679565b610a69565b6102b26103a936600461259e565b610aff565b6102876103bc3660046127bf565b610b1a565b6103546103cf3660046127bf565b610b44565b61048b6103e23660046127bf565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915250600090815260106020908152604091829020825160c081018452905460ff8082168352610100820481169383019390935262010000810483169382019390935263010000008304909116606082015263ffffffff640100000000830481166080830152600160401b90920490911660a082015290565b6040516102569190600060c08201905060ff835116825260ff602084015116602083015260ff604084015116604083015260ff6060840151166060830152608083015163ffffffff80821660808501528060a08601511660a0850152505092915050565b6105026104fd3660046127bf565b610be5565b60405163ffffffff9091168152602001610256565b6102876105253660046127bf565b610c20565b6102b261053836600461254a565b610c97565b61035461054b3660046127bf565b60116020526000908152604090205481565b61057061056b3660046127bf565b610ce5565b604080516001600160a01b039093168352602083019190915201610256565b61035461059d36600461254a565b610d6e565b6102b2610df5565b61024a6105b836600461254a565b60126020526000908152604090205460ff1681565b6102676105db3660046127bf565b610e2b565b6103546105ee3660046126dc565b610e3b565b600a546001600160a01b0316610287565b6102b26106123660046127d7565b610e79565b610267610f8a565b61063261062d3660046127bf565b610f99565b6040516102569190612957565b6102b261064d3660046127bf565b6113e1565b6102b2610660366004612648565b6117f3565b600f54610287906001600160a01b031681565b6102b261068636600461254a565b6118b8565b6102676106993660046127bf565b611903565b6102b26106ac3660046125de565b611913565b6102b26106bf36600461254a565b61194b565b6102676106d23660046127bf565b611997565b6102b26106e53660046127bf565b611a18565b61024a6106f8366004612566565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102b261073436600461254a565b611b2b565b600061074482611bc6565b92915050565b60606000805461075990612b9f565b80601f016020809104026020016040519081016040528092919081815260200182805461078590612b9f565b80156107d25780601f106107a7576101008083540402835291602001916107d2565b820191906000526020600020905b8154815290600101906020018083116107b557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661085a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061088182610c20565b9050806001600160a01b0316836001600160a01b031614156108ef5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610851565b336001600160a01b038216148061090b575061090b81336106f8565b61097d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610851565b6109878383611beb565b505050565b6109963382611c59565b6109b25760405162461bcd60e51b815260040161085190612906565b610987838383611d50565b600b81815481106109cd57600080fd5b9060005260206000200160009150905080546109e890612b9f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1490612b9f565b8015610a615780601f10610a3657610100808354040283529160200191610a61565b820191906000526020600020905b815481529060010190602001808311610a4457829003601f168201915b505050505081565b6000610a7483610d6e565b8210610ad65760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610851565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61098783838360405180602001604052806000815250611913565b600e8181548110610b2a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610b4f60085490565b8210610bb25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610851565b60088281548110610bd357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610c1582604051602001610bfd91815260200190565b60408051601f198184030181529190526107d0610e3b565b61074490600a612aa1565b6000818152600260205260408120546001600160a01b0316806107445760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610851565b600a546001600160a01b03163314610cc15760405162461bcd60e51b8152600401610851906128d1565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b600f546040516334cbf47b60e11b81526004810183905260009182916001600160a01b0390911690636997e8f690602401604080518083038186803b158015610d2d57600080fd5b505afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d65919061271f565b91509150915091565b60006001600160a01b038216610dd95760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610851565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610e1f5760405162461bcd60e51b8152600401610851906128d1565b610e296000611efb565b565b600d81815481106109cd57600080fd5b60008183604051602001610e4f919061286c565b6040516020818303038152906040528051906020012060001c610e729190612bda565b9392505050565b3360009081526012602052604090205460ff161515600114610ef65760405162461bcd60e51b815260206004820152603060248201527f596f7520646f6e27742068617665207065726d697373696f6e20746f2065646960448201526f3a103a3432903837b83ab630ba34b7b760811b6064820152608401610851565b610eff82610f99565b60c0015163ffffffff168163ffffffff161115610f575760405162461bcd60e51b81526020600482015260166024820152750a0dee0ead8c2e8d2dedc40d2e640deeccae440dac2f60531b6044820152606401610851565b600091825260106020526040909120805463ffffffff909216600160401b0263ffffffff60401b19909216919091179055565b60606001805461075990612b9f565b6110066040518061012001604052806000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600060ff1681525090565b6000828152600260205260409020546001600160a01b03166110795760405162461bcd60e51b815260206004820152602660248201527f49736c616e642077697468207468617420746f6b656e496420646f65736e277460448201526508195e1a5cdd60d21b6064820152608401610851565b6000828152601060209081526040808320815160c081018352905460ff8082168352610100820481169483019490945262010000810484169282019290925263010000008204909216606083015263ffffffff640100000000820481166080840152600160401b9091041660a0820152906110f384610be5565b905060008260800151826111079190612b30565b9050604051806101200160405280868152602001600e856000015160ff168154811061114357634e487b7160e01b600052603260045260246000fd5b600091825260209182902001546001600160a01b031682528551600b8054939092019260ff90911690811061118857634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461119d90612b9f565b80601f01602080910402602001604051908101604052809291908181526020018280546111c990612b9f565b80156112165780601f106111eb57610100808354040283529160200191611216565b820191906000526020600020905b8154815290600101906020018083116111f957829003601f168201915b50505050508152602001600c856020015160ff168154811061124857634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461125d90612b9f565b80601f016020809104026020016040519081016040528092919081815260200182805461128990612b9f565b80156112d65780601f106112ab576101008083540402835291602001916112d6565b820191906000526020600020905b8154815290600101906020018083116112b957829003601f168201915b50505050508152602001600d856040015160ff168154811061130857634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461131d90612b9f565b80601f016020809104026020016040519081016040528092919081815260200182805461134990612b9f565b80156113965780601f1061136b57610100808354040283529160200191611396565b820191906000526020600020905b81548152906001019060200180831161137957829003601f168201915b50505050508152602001846080015163ffffffff1681526020018263ffffffff1681526020018460a0015163ffffffff168152602001846060015160ff168152509350505050919050565b6000818152600260205260409020546001600160a01b0316156114515760405162461bcd60e51b815260206004820152602260248201527f49736c616e642077697468207468617420696420616c72656164792065786973604482015261747360f01b6064820152608401610851565b6126ac811115806114865750612710811115801561147057506126ac81115b80156114865750600a546001600160a01b031633145b6114c95760405162461bcd60e51b8152602060048201526014602482015273125cdb185b99081a59081a5cc81a5b9d985b1a5960621b6044820152606401610851565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915260006115438360405160200161152c918152604060208201819052600190820152603960f91b606082015260800190565b6040516020818303038152906040526103e8610e3b565b90506102bc811061155e57611559600782612bda565b611569565b611569600382612bda565b60ff16825260408051602081018590528082019190915260016060820152606360f81b608082015261159d9060a00161152c565b90506115aa600682612bda565b60ff16602083810191909152604080519182018590528181015260016060820152601d60fa1b60808201526115e19060a00161152c565b90506115ee600482612bda565b60ff16604083810191909152805160208101859052808201919091526002606082015261746160f01b60808201526116289060a00161152c565b9050611635603282612bda565b611640906001612ac9565b60ff1660608301526040516116919061167a908590602001908152604060208201819052600190820152606160f81b606082015260800190565b604051602081830303815290604052611388610e3b565b61169c906001612aa1565b63ffffffff16608083015260006116b284610be5565b905060008360800151826116c69190612b30565b905060646116f6866040516020016116e091815260200190565b6040516020818303038152906040526064610e3b565b6117069063ffffffff8416612b11565b6117109190612aee565b61171b90600a612aa1565b63ffffffff90811660a08601908152600087815260106020908152604080832089518154848c0151848d015160608e015160808f015199518b16600160401b0263ffffffff60401b199a909b1664010000000002999099166bffffffffffffffff000000001960ff9a8b1663010000000263ff00000019938c1662010000029390931663ffff000019948c166101000261ffff199096169b9096169a909a17939093179190911692909217919091179590951694909417949094179092556011909152204390556117ec3386611f4d565b5050505050565b6001600160a01b03821633141561184c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610851565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b031633146118e25760405162461bcd60e51b8152600401610851906128d1565b6001600160a01b03166000908152601260205260409020805460ff19169055565b600c81815481106109cd57600080fd5b61191d3383611c59565b6119395760405162461bcd60e51b815260040161085190612906565b61194584848484611f6b565b50505050565b600a546001600160a01b031633146119755760405162461bcd60e51b8152600401610851906128d1565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600f5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd9060240160006040518083038186803b1580156119dc57600080fd5b505afa1580156119f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610744919081019061274c565b600f546040516334cbf47b60e11b81526004810183905260009182916001600160a01b0390911690636997e8f690602401604080518083038186803b158015611a6057600080fd5b505afa158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061271f565b600085815260116020526040902043905590925090506001600160a01b0382166340c10f19611ac685610c20565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015611b0e57600080fd5b505af1158015611b22573d6000803e3d6000fd5b50505050505050565b600a546001600160a01b03163314611b555760405162461bcd60e51b8152600401610851906128d1565b6001600160a01b038116611bba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610851565b611bc381611efb565b50565b60006001600160e01b0319821663780e9d6360e01b1480610744575061074482611f9e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c2082610c20565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611cd25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610851565b6000611cdd83610c20565b9050806001600160a01b0316846001600160a01b03161480611d185750836001600160a01b0316611d0d846107dc565b6001600160a01b0316145b80611d4857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611d6382610c20565b6001600160a01b031614611dcb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610851565b6001600160a01b038216611e2d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610851565b611e38838383611fee565b611e43600082611beb565b6001600160a01b0383166000908152600360205260408120805460019290611e6c908490612b5c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e9a908490612a89565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f67828260405180602001604052806000815250611ff9565b5050565b611f76848484611d50565b611f828484848461202c565b6119455760405162461bcd60e51b81526004016108519061287f565b60006001600160e01b031982166380ac58cd60e01b1480611fcf57506001600160e01b03198216635b5e139f60e01b145b8061074457506301ffc9a760e01b6001600160e01b0319831614610744565b610987838383612139565b61200383836121f1565b612010600084848461202c565b6109875760405162461bcd60e51b81526004016108519061287f565b60006001600160a01b0384163b1561212e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061207090339089908890889060040161282f565b602060405180830381600087803b15801561208a57600080fd5b505af19250505080156120ba575060408051601f3d908101601f191682019092526120b7918101906126c0565b60015b612114573d8080156120e8576040519150601f19603f3d011682016040523d82523d6000602084013e6120ed565b606091505b50805161210c5760405162461bcd60e51b81526004016108519061287f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d48565b506001949350505050565b6001600160a01b0383166121945761218f81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6121b7565b816001600160a01b0316836001600160a01b0316146121b7576121b7838261233f565b6001600160a01b0382166121ce57610987816123dc565b826001600160a01b0316826001600160a01b0316146109875761098782826124b5565b6001600160a01b0382166122475760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610851565b6000818152600260205260409020546001600160a01b0316156122ac5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610851565b6122b860008383611fee565b6001600160a01b03821660009081526003602052604081208054600192906122e1908490612a89565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161234c84610d6e565b6123569190612b5c565b6000838152600760205260409020549091508082146123a9576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906123ee90600190612b5c565b6000838152600960205260408120546008805493945090928490811061242457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061245357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061249957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006124c083610d6e565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600082601f830112612509578081fd5b813561251c61251782612a61565b612a30565b818152846020838601011115612530578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561255b578081fd5b8135610e7281612c30565b60008060408385031215612578578081fd5b823561258381612c30565b9150602083013561259381612c30565b809150509250929050565b6000806000606084860312156125b2578081fd5b83356125bd81612c30565b925060208401356125cd81612c30565b929592945050506040919091013590565b600080600080608085870312156125f3578081fd5b84356125fe81612c30565b9350602085013561260e81612c30565b925060408501359150606085013567ffffffffffffffff811115612630578182fd5b61263c878288016124f9565b91505092959194509250565b6000806040838503121561265a578182fd5b823561266581612c30565b915060208301358015158114612593578182fd5b6000806040838503121561268b578182fd5b823561269681612c30565b946020939093013593505050565b6000602082840312156126b5578081fd5b8135610e7281612c45565b6000602082840312156126d1578081fd5b8151610e7281612c45565b600080604083850312156126ee578182fd5b823567ffffffffffffffff811115612704578283fd5b612710858286016124f9565b95602094909401359450505050565b60008060408385031215612731578182fd5b825161273c81612c30565b6020939093015192949293505050565b60006020828403121561275d578081fd5b815167ffffffffffffffff811115612773578182fd5b8201601f81018413612783578182fd5b805161279161251782612a61565b8181528560208385010111156127a5578384fd5b6127b6826020830160208601612b73565b95945050505050565b6000602082840312156127d0578081fd5b5035919050565b600080604083850312156127e9578182fd5b82359150602083013563ffffffff81168114612593578182fd5b6000815180845261281b816020860160208601612b73565b601f01601f19169290920160200192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061286290830184612803565b9695505050505050565b602081526000610e726020830184612803565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208152815160208201526000602083015161297e60408401826001600160a01b03169052565b50604083015161012080606085015261299b610140850183612803565b91506060850151601f19808685030160808701526129b98483612803565b935060808701519150808685030160a0870152506129d78382612803565b92505060a08501516129f160c086018263ffffffff169052565b5060c085015163ffffffff811660e08601525060e0850151610100612a1d8187018363ffffffff169052565b9095015160ff1693019290925250919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715612a5957612a59612c1a565b604052919050565b600067ffffffffffffffff821115612a7b57612a7b612c1a565b50601f01601f191660200190565b60008219821115612a9c57612a9c612bee565b500190565b600063ffffffff808316818516808303821115612ac057612ac0612bee565b01949350505050565b600060ff821660ff84168060ff03821115612ae657612ae6612bee565b019392505050565b600063ffffffff80841680612b0557612b05612c04565b92169190910492915050565b6000816000190483118215151615612b2b57612b2b612bee565b500290565b600063ffffffff80831681851681830481118215151615612b5357612b53612bee565b02949350505050565b600082821015612b6e57612b6e612bee565b500390565b60005b83811015612b8e578181015183820152602001612b76565b838111156119455750506000910152565b600181811c90821680612bb357607f821691505b60208210811415612bd457634e487b7160e01b600052602260045260246000fd5b50919050565b600082612be957612be9612c04565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611bc357600080fd5b6001600160e01b031981168114611bc357600080fdfea26469706673582212201acc8e24897b3ba0c0f4a88810fabe8225f95b24f386463c6a5b19ab06051c6b64736f6c634300080400330000000000000000000000002676d86d4d474732e2761fa490f2b65bcaea4b33000000000000000000000000c754a679a319698f6c88abedb9b435f76de0e14d000000000000000000000000a6233451039230fae712371dd7526f6df7625e1f000000000000000000000000def978a5402a6e2d963724f0717c38f0016b52ec000000000000000000000000ac709ce0bbd663f334bbef9525f56063d8c1e5ae000000000000000000000000d136967d807b8f789aedef5108e12742611bdeff000000000000000000000000ce174947bbbc84694f2bfcd0c694a11bbd3a44a4
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102325760003560e01c8063715018a611610130578063a22cb465116100b8578063c5639cc61161007c578063c5639cc6146106b1578063c87b56dd146106c4578063ddc63262146106d7578063e985e9c5146106ea578063f2fde38b1461072657600080fd5b8063a22cb46514610652578063a5dc9e1b14610665578063a7c9d9e914610678578063b5e00d6a1461068b578063b88d4fde1461069e57600080fd5b80638da5cb5b116100ff5780638da5cb5b146105f35780639288f2a11461060457806395d89b41146106175780639a84b6bd1461061f578063a0712d681461063f57600080fd5b8063715018a6146105a257806372bc96b4146105aa57806382365e66146105cd5780638c1d808c146105e057600080fd5b806342842e0e116101be5780636352211e116101825780636352211e14610517578063636699491461052a578063684d07701461053d5780636997e8f61461055d57806370a082311461058f57600080fd5b806342842e0e1461039b5780634eb414c3146103ae5780634f6ccce7146103c1578063521e8749146103d45780635497607a146104ef57600080fd5b80631177f379116102055780631177f379146102b457806318160ddd1461035057806323b872dd14610362578063244d6daa146103755780632f745c591461038857600080fd5b806301ffc9a71461023757806306fdde031461025f578063081812fc14610274578063095ea7b31461029f575b600080fd5b61024a6102453660046126a4565b610739565b60405190151581526020015b60405180910390f35b61026761074a565b604051610256919061286c565b6102876102823660046127bf565b6107dc565b6040516001600160a01b039091168152602001610256565b6102b26102ad366004612679565b610876565b005b61030e6102c23660046127bf565b60106020526000908152604090205460ff808216916101008104821691620100008204811691630100000081049091169063ffffffff6401000000008204811691600160401b90041686565b6040805160ff97881681529587166020870152938616938501939093529316606083015263ffffffff92831660808301529190911660a082015260c001610256565b6008545b604051908152602001610256565b6102b261037036600461259e565b61098c565b6102676103833660046127bf565b6109bd565b610354610396366004612679565b610a69565b6102b26103a936600461259e565b610aff565b6102876103bc3660046127bf565b610b1a565b6103546103cf3660046127bf565b610b44565b61048b6103e23660046127bf565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915250600090815260106020908152604091829020825160c081018452905460ff8082168352610100820481169383019390935262010000810483169382019390935263010000008304909116606082015263ffffffff640100000000830481166080830152600160401b90920490911660a082015290565b6040516102569190600060c08201905060ff835116825260ff602084015116602083015260ff604084015116604083015260ff6060840151166060830152608083015163ffffffff80821660808501528060a08601511660a0850152505092915050565b6105026104fd3660046127bf565b610be5565b60405163ffffffff9091168152602001610256565b6102876105253660046127bf565b610c20565b6102b261053836600461254a565b610c97565b61035461054b3660046127bf565b60116020526000908152604090205481565b61057061056b3660046127bf565b610ce5565b604080516001600160a01b039093168352602083019190915201610256565b61035461059d36600461254a565b610d6e565b6102b2610df5565b61024a6105b836600461254a565b60126020526000908152604090205460ff1681565b6102676105db3660046127bf565b610e2b565b6103546105ee3660046126dc565b610e3b565b600a546001600160a01b0316610287565b6102b26106123660046127d7565b610e79565b610267610f8a565b61063261062d3660046127bf565b610f99565b6040516102569190612957565b6102b261064d3660046127bf565b6113e1565b6102b2610660366004612648565b6117f3565b600f54610287906001600160a01b031681565b6102b261068636600461254a565b6118b8565b6102676106993660046127bf565b611903565b6102b26106ac3660046125de565b611913565b6102b26106bf36600461254a565b61194b565b6102676106d23660046127bf565b611997565b6102b26106e53660046127bf565b611a18565b61024a6106f8366004612566565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102b261073436600461254a565b611b2b565b600061074482611bc6565b92915050565b60606000805461075990612b9f565b80601f016020809104026020016040519081016040528092919081815260200182805461078590612b9f565b80156107d25780601f106107a7576101008083540402835291602001916107d2565b820191906000526020600020905b8154815290600101906020018083116107b557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661085a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061088182610c20565b9050806001600160a01b0316836001600160a01b031614156108ef5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610851565b336001600160a01b038216148061090b575061090b81336106f8565b61097d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610851565b6109878383611beb565b505050565b6109963382611c59565b6109b25760405162461bcd60e51b815260040161085190612906565b610987838383611d50565b600b81815481106109cd57600080fd5b9060005260206000200160009150905080546109e890612b9f565b80601f0160208091040260200160405190810160405280929190818152602001828054610a1490612b9f565b8015610a615780601f10610a3657610100808354040283529160200191610a61565b820191906000526020600020905b815481529060010190602001808311610a4457829003601f168201915b505050505081565b6000610a7483610d6e565b8210610ad65760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610851565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61098783838360405180602001604052806000815250611913565b600e8181548110610b2a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610b4f60085490565b8210610bb25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610851565b60088281548110610bd357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000610c1582604051602001610bfd91815260200190565b60408051601f198184030181529190526107d0610e3b565b61074490600a612aa1565b6000818152600260205260408120546001600160a01b0316806107445760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610851565b600a546001600160a01b03163314610cc15760405162461bcd60e51b8152600401610851906128d1565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b600f546040516334cbf47b60e11b81526004810183905260009182916001600160a01b0390911690636997e8f690602401604080518083038186803b158015610d2d57600080fd5b505afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d65919061271f565b91509150915091565b60006001600160a01b038216610dd95760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610851565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610e1f5760405162461bcd60e51b8152600401610851906128d1565b610e296000611efb565b565b600d81815481106109cd57600080fd5b60008183604051602001610e4f919061286c565b6040516020818303038152906040528051906020012060001c610e729190612bda565b9392505050565b3360009081526012602052604090205460ff161515600114610ef65760405162461bcd60e51b815260206004820152603060248201527f596f7520646f6e27742068617665207065726d697373696f6e20746f2065646960448201526f3a103a3432903837b83ab630ba34b7b760811b6064820152608401610851565b610eff82610f99565b60c0015163ffffffff168163ffffffff161115610f575760405162461bcd60e51b81526020600482015260166024820152750a0dee0ead8c2e8d2dedc40d2e640deeccae440dac2f60531b6044820152606401610851565b600091825260106020526040909120805463ffffffff909216600160401b0263ffffffff60401b19909216919091179055565b60606001805461075990612b9f565b6110066040518061012001604052806000815260200160006001600160a01b03168152602001606081526020016060815260200160608152602001600063ffffffff168152602001600063ffffffff168152602001600063ffffffff168152602001600060ff1681525090565b6000828152600260205260409020546001600160a01b03166110795760405162461bcd60e51b815260206004820152602660248201527f49736c616e642077697468207468617420746f6b656e496420646f65736e277460448201526508195e1a5cdd60d21b6064820152608401610851565b6000828152601060209081526040808320815160c081018352905460ff8082168352610100820481169483019490945262010000810484169282019290925263010000008204909216606083015263ffffffff640100000000820481166080840152600160401b9091041660a0820152906110f384610be5565b905060008260800151826111079190612b30565b9050604051806101200160405280868152602001600e856000015160ff168154811061114357634e487b7160e01b600052603260045260246000fd5b600091825260209182902001546001600160a01b031682528551600b8054939092019260ff90911690811061118857634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461119d90612b9f565b80601f01602080910402602001604051908101604052809291908181526020018280546111c990612b9f565b80156112165780601f106111eb57610100808354040283529160200191611216565b820191906000526020600020905b8154815290600101906020018083116111f957829003601f168201915b50505050508152602001600c856020015160ff168154811061124857634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461125d90612b9f565b80601f016020809104026020016040519081016040528092919081815260200182805461128990612b9f565b80156112d65780601f106112ab576101008083540402835291602001916112d6565b820191906000526020600020905b8154815290600101906020018083116112b957829003601f168201915b50505050508152602001600d856040015160ff168154811061130857634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461131d90612b9f565b80601f016020809104026020016040519081016040528092919081815260200182805461134990612b9f565b80156113965780601f1061136b57610100808354040283529160200191611396565b820191906000526020600020905b81548152906001019060200180831161137957829003601f168201915b50505050508152602001846080015163ffffffff1681526020018263ffffffff1681526020018460a0015163ffffffff168152602001846060015160ff168152509350505050919050565b6000818152600260205260409020546001600160a01b0316156114515760405162461bcd60e51b815260206004820152602260248201527f49736c616e642077697468207468617420696420616c72656164792065786973604482015261747360f01b6064820152608401610851565b6126ac811115806114865750612710811115801561147057506126ac81115b80156114865750600a546001600160a01b031633145b6114c95760405162461bcd60e51b8152602060048201526014602482015273125cdb185b99081a59081a5cc81a5b9d985b1a5960621b6044820152606401610851565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915260006115438360405160200161152c918152604060208201819052600190820152603960f91b606082015260800190565b6040516020818303038152906040526103e8610e3b565b90506102bc811061155e57611559600782612bda565b611569565b611569600382612bda565b60ff16825260408051602081018590528082019190915260016060820152606360f81b608082015261159d9060a00161152c565b90506115aa600682612bda565b60ff16602083810191909152604080519182018590528181015260016060820152601d60fa1b60808201526115e19060a00161152c565b90506115ee600482612bda565b60ff16604083810191909152805160208101859052808201919091526002606082015261746160f01b60808201526116289060a00161152c565b9050611635603282612bda565b611640906001612ac9565b60ff1660608301526040516116919061167a908590602001908152604060208201819052600190820152606160f81b606082015260800190565b604051602081830303815290604052611388610e3b565b61169c906001612aa1565b63ffffffff16608083015260006116b284610be5565b905060008360800151826116c69190612b30565b905060646116f6866040516020016116e091815260200190565b6040516020818303038152906040526064610e3b565b6117069063ffffffff8416612b11565b6117109190612aee565b61171b90600a612aa1565b63ffffffff90811660a08601908152600087815260106020908152604080832089518154848c0151848d015160608e015160808f015199518b16600160401b0263ffffffff60401b199a909b1664010000000002999099166bffffffffffffffff000000001960ff9a8b1663010000000263ff00000019938c1662010000029390931663ffff000019948c166101000261ffff199096169b9096169a909a17939093179190911692909217919091179590951694909417949094179092556011909152204390556117ec3386611f4d565b5050505050565b6001600160a01b03821633141561184c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610851565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600a546001600160a01b031633146118e25760405162461bcd60e51b8152600401610851906128d1565b6001600160a01b03166000908152601260205260409020805460ff19169055565b600c81815481106109cd57600080fd5b61191d3383611c59565b6119395760405162461bcd60e51b815260040161085190612906565b61194584848484611f6b565b50505050565b600a546001600160a01b031633146119755760405162461bcd60e51b8152600401610851906128d1565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600f5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd9060240160006040518083038186803b1580156119dc57600080fd5b505afa1580156119f0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610744919081019061274c565b600f546040516334cbf47b60e11b81526004810183905260009182916001600160a01b0390911690636997e8f690602401604080518083038186803b158015611a6057600080fd5b505afa158015611a74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a98919061271f565b600085815260116020526040902043905590925090506001600160a01b0382166340c10f19611ac685610c20565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b158015611b0e57600080fd5b505af1158015611b22573d6000803e3d6000fd5b50505050505050565b600a546001600160a01b03163314611b555760405162461bcd60e51b8152600401610851906128d1565b6001600160a01b038116611bba5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610851565b611bc381611efb565b50565b60006001600160e01b0319821663780e9d6360e01b1480610744575061074482611f9e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c2082610c20565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611cd25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610851565b6000611cdd83610c20565b9050806001600160a01b0316846001600160a01b03161480611d185750836001600160a01b0316611d0d846107dc565b6001600160a01b0316145b80611d4857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611d6382610c20565b6001600160a01b031614611dcb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610851565b6001600160a01b038216611e2d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610851565b611e38838383611fee565b611e43600082611beb565b6001600160a01b0383166000908152600360205260408120805460019290611e6c908490612b5c565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e9a908490612a89565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f67828260405180602001604052806000815250611ff9565b5050565b611f76848484611d50565b611f828484848461202c565b6119455760405162461bcd60e51b81526004016108519061287f565b60006001600160e01b031982166380ac58cd60e01b1480611fcf57506001600160e01b03198216635b5e139f60e01b145b8061074457506301ffc9a760e01b6001600160e01b0319831614610744565b610987838383612139565b61200383836121f1565b612010600084848461202c565b6109875760405162461bcd60e51b81526004016108519061287f565b60006001600160a01b0384163b1561212e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061207090339089908890889060040161282f565b602060405180830381600087803b15801561208a57600080fd5b505af19250505080156120ba575060408051601f3d908101601f191682019092526120b7918101906126c0565b60015b612114573d8080156120e8576040519150601f19603f3d011682016040523d82523d6000602084013e6120ed565b606091505b50805161210c5760405162461bcd60e51b81526004016108519061287f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d48565b506001949350505050565b6001600160a01b0383166121945761218f81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6121b7565b816001600160a01b0316836001600160a01b0316146121b7576121b7838261233f565b6001600160a01b0382166121ce57610987816123dc565b826001600160a01b0316826001600160a01b0316146109875761098782826124b5565b6001600160a01b0382166122475760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610851565b6000818152600260205260409020546001600160a01b0316156122ac5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610851565b6122b860008383611fee565b6001600160a01b03821660009081526003602052604081208054600192906122e1908490612a89565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161234c84610d6e565b6123569190612b5c565b6000838152600760205260409020549091508082146123a9576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906123ee90600190612b5c565b6000838152600960205260408120546008805493945090928490811061242457634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061245357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061249957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006124c083610d6e565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600082601f830112612509578081fd5b813561251c61251782612a61565b612a30565b818152846020838601011115612530578283fd5b816020850160208301379081016020019190915292915050565b60006020828403121561255b578081fd5b8135610e7281612c30565b60008060408385031215612578578081fd5b823561258381612c30565b9150602083013561259381612c30565b809150509250929050565b6000806000606084860312156125b2578081fd5b83356125bd81612c30565b925060208401356125cd81612c30565b929592945050506040919091013590565b600080600080608085870312156125f3578081fd5b84356125fe81612c30565b9350602085013561260e81612c30565b925060408501359150606085013567ffffffffffffffff811115612630578182fd5b61263c878288016124f9565b91505092959194509250565b6000806040838503121561265a578182fd5b823561266581612c30565b915060208301358015158114612593578182fd5b6000806040838503121561268b578182fd5b823561269681612c30565b946020939093013593505050565b6000602082840312156126b5578081fd5b8135610e7281612c45565b6000602082840312156126d1578081fd5b8151610e7281612c45565b600080604083850312156126ee578182fd5b823567ffffffffffffffff811115612704578283fd5b612710858286016124f9565b95602094909401359450505050565b60008060408385031215612731578182fd5b825161273c81612c30565b6020939093015192949293505050565b60006020828403121561275d578081fd5b815167ffffffffffffffff811115612773578182fd5b8201601f81018413612783578182fd5b805161279161251782612a61565b8181528560208385010111156127a5578384fd5b6127b6826020830160208601612b73565b95945050505050565b6000602082840312156127d0578081fd5b5035919050565b600080604083850312156127e9578182fd5b82359150602083013563ffffffff81168114612593578182fd5b6000815180845261281b816020860160208601612b73565b601f01601f19169290920160200192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061286290830184612803565b9695505050505050565b602081526000610e726020830184612803565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208152815160208201526000602083015161297e60408401826001600160a01b03169052565b50604083015161012080606085015261299b610140850183612803565b91506060850151601f19808685030160808701526129b98483612803565b935060808701519150808685030160a0870152506129d78382612803565b92505060a08501516129f160c086018263ffffffff169052565b5060c085015163ffffffff811660e08601525060e0850151610100612a1d8187018363ffffffff169052565b9095015160ff1693019290925250919050565b604051601f8201601f1916810167ffffffffffffffff81118282101715612a5957612a59612c1a565b604052919050565b600067ffffffffffffffff821115612a7b57612a7b612c1a565b50601f01601f191660200190565b60008219821115612a9c57612a9c612bee565b500190565b600063ffffffff808316818516808303821115612ac057612ac0612bee565b01949350505050565b600060ff821660ff84168060ff03821115612ae657612ae6612bee565b019392505050565b600063ffffffff80841680612b0557612b05612c04565b92169190910492915050565b6000816000190483118215151615612b2b57612b2b612bee565b500290565b600063ffffffff80831681851681830481118215151615612b5357612b53612bee565b02949350505050565b600082821015612b6e57612b6e612bee565b500390565b60005b83811015612b8e578181015183820152602001612b76565b838111156119455750506000910152565b600181811c90821680612bb357607f821691505b60208210811415612bd457634e487b7160e01b600052602260045260246000fd5b50919050565b600082612be957612be9612c04565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611bc357600080fd5b6001600160e01b031981168114611bc357600080fdfea26469706673582212201acc8e24897b3ba0c0f4a88810fabe8225f95b24f386463c6a5b19ab06051c6b64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002676d86d4d474732e2761fa490f2b65bcaea4b33000000000000000000000000c754a679a319698f6c88abedb9b435f76de0e14d000000000000000000000000a6233451039230fae712371dd7526f6df7625e1f000000000000000000000000def978a5402a6e2d963724f0717c38f0016b52ec000000000000000000000000ac709ce0bbd663f334bbef9525f56063d8c1e5ae000000000000000000000000d136967d807b8f789aedef5108e12742611bdeff000000000000000000000000ce174947bbbc84694f2bfcd0c694a11bbd3a44a4
-----Decoded View---------------
Arg [0] : fishToken (address): 0x2676D86D4d474732e2761FA490F2B65bCaEa4B33
Arg [1] : woodToken (address): 0xC754a679a319698F6C88ABEDb9B435f76DE0E14D
Arg [2] : ironToken (address): 0xa6233451039230fAe712371dD7526f6Df7625E1f
Arg [3] : silverToken (address): 0xdef978a5402a6E2d963724f0717c38f0016B52ec
Arg [4] : pearlToken (address): 0xaC709Ce0Bbd663f334bBef9525F56063d8c1e5ae
Arg [5] : oilToken (address): 0xd136967d807b8F789aedef5108E12742611BDeff
Arg [6] : diamondToken (address): 0xcE174947bbBc84694F2bfcD0C694a11bbD3a44A4
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000002676d86d4d474732e2761fa490f2b65bcaea4b33
Arg [1] : 000000000000000000000000c754a679a319698f6c88abedb9b435f76de0e14d
Arg [2] : 000000000000000000000000a6233451039230fae712371dd7526f6df7625e1f
Arg [3] : 000000000000000000000000def978a5402a6e2d963724f0717c38f0016b52ec
Arg [4] : 000000000000000000000000ac709ce0bbd663f334bbef9525f56063d8c1e5ae
Arg [5] : 000000000000000000000000d136967d807b8f789aedef5108e12742611bdeff
Arg [6] : 000000000000000000000000ce174947bbbc84694f2bfcd0c694a11bbd3a44a4
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.