ERC-721
Overview
Max Total Supply
2,704 STL
Holders
612
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 STLLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SettlementsV2
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 "@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.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] = '" }, { "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 "@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.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": 600 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract SettlementsLegacy","name":"_legacyAddress","type":"address"},{"internalType":"contract ERC20Mintable","name":"ironToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"goldToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"silverToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"woodToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"woolToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"waterToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"grassToken_","type":"address"},{"internalType":"contract ERC20Mintable","name":"grainToken_","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":"uint256","name":"","type":"uint256"}],"name":"_ages","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_governments","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_morales","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_realms","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"_sizes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_spirits","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"attrIndex","outputs":[{"internalType":"uint8","name":"size","type":"uint8"},{"internalType":"uint8","name":"spirit","type":"uint8"},{"internalType":"uint8","name":"age","type":"uint8"},{"internalType":"uint8","name":"resource","type":"uint8"},{"internalType":"uint8","name":"morale","type":"uint8"},{"internalType":"uint8","name":"government","type":"uint8"},{"internalType":"uint8","name":"turns","type":"uint8"}],"stateMutability":"view","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":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"size","type":"uint8"},{"internalType":"uint8","name":"spirit","type":"uint8"},{"internalType":"uint8","name":"age","type":"uint8"},{"internalType":"uint8","name":"resource","type":"uint8"},{"internalType":"uint8","name":"morale","type":"uint8"},{"internalType":"uint8","name":"government","type":"uint8"},{"internalType":"uint8","name":"turns","type":"uint8"}],"internalType":"struct SettlementsV2.Attributes","name":"attributes","type":"tuple"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimAndReroll","outputs":[],"stateMutability":"nonpayable","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":"getSettlementAge","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSettlementGovernment","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSettlementMorale","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSettlementRealm","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSettlementResource","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSettlementSize","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSettlementSpirit","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getUnharvestedTokens","outputs":[{"internalType":"contract ERC20Mintable","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"helpersContract","outputs":[{"internalType":"contract Helpers","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":[],"name":"legacySettlements","outputs":[{"internalType":"contract SettlementsLegacy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"components":[{"internalType":"uint8","name":"size","type":"uint8"},{"internalType":"uint8","name":"spirit","type":"uint8"},{"internalType":"uint8","name":"age","type":"uint8"},{"internalType":"uint8","name":"resource","type":"uint8"},{"internalType":"uint8","name":"morale","type":"uint8"},{"internalType":"uint8","name":"government","type":"uint8"},{"internalType":"uint8","name":"turns","type":"uint8"}],"internalType":"struct SettlementsV2.Attributes[]","name":"tokenAttributes","type":"tuple[]"}],"name":"multiClaim","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":"uint256","name":"tokenId","type":"uint256"}],"name":"randomise","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"resourceTokenAddresses","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 Helpers","name":"helpersContract_","type":"address"}],"name":"setHelpersContract","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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
600461018081815263043616d760e41b6101a052608090815260066101c09081526512185b5b195d60d21b6101e05260a05260076102008181526656696c6c61676560c81b6102205260c052610240928352632a37bbb760e11b6102605260e092909252600861028081815267111a5cdd1c9a58dd60c21b6102a052610100526102c081815267141c9958da5b98dd60c21b6102e052610120526103009283526610d85c1a5d1bdb60ca1b6103205261014092909252610380604052600561034090815264537461746560d81b6103605261016052620000e3916010919062000933565b506040805160e081018252600560a082018181526408ac2e4e8d60db1b60c084015282528251808401845260048152634669726560e01b6020828101919091528084019190915283518085018552828152642bb0ba32b960d91b818301528385015283518085018552600381526220b4b960e91b81830152606084015283518085019094526006845265105cdd1c985b60d21b90840152608082019290925262000191916011919062000997565b5060405180610100016040528060405180604001604052806007815260200166105b98da595b9d60ca1b81525081526020016040518060400160405280600981526020016810db185cdcda58d85b60ba1b8152508152602001604051806040016040528060088152602001671359591a595d985b60c21b81525081526020016040518060400160405280600b81526020016a52656e61697373616e636560a81b81525081526020016040518060400160405280600a815260200169125b991d5cdd1c9a585b60b21b81525081526020016040518060400160405280600681526020016526b7b232b93760d11b81525081526020016040518060400160405280600b81526020016a24b73337b936b0ba34b7b760a91b81525081526020016040518060400160405280600681526020016546757475726560d01b8152508152506012906008620002e292919062000933565b506040805161014081018252600461010082018181526324b937b760e11b6101208401528252825180840184528181526311dbdb1960e21b6020828101919091528084019190915283518085018552600681526529b4b63b32b960d11b8183015283850152835180850185528281526315dbdbd960e21b818301526060840152835180850185529182526315dbdbdb60e21b828201526080830191909152825180840184526005808252642bb0ba32b960d91b8284015260a08401919091528351808501855281815264477261737360d81b8184015260c0840152835180850190945283526423b930b4b760d91b9083015260e0810191909152620003ec90601390600862000933565b5060408051610180810182526009610140820181815268115e1c1958dd185b9d60ba1b610160840152825282518084018452600b81526a115b9b1a59da1d195b995960aa1b6020828101919091528084019190915283518085018552600a808252694469736d69737369766560b01b828401528486019190915284518086018652600780825266556e686170707960c81b828501526060860191909152855180870187526005815264486170707960d81b8185015260808601528551808701875284815268155b991958da59195960ba1b8185015260a0860152855180870187529081526657617272696e6760c81b8184015260c08501528451808601865260068082526514d8d85c995960d21b8285015260e08601919091528551808701875290815265556e72756c7960d01b81840152610100850152845180860190955291845268105b985c98da1a5cdd60ba1b90840152610120820192909252620005589160149190620009e9565b506040805161016081018252600961012082018181526844656d6f637261637960b81b61014084015282528251808401845281815268436f6d6d756e69736d60b81b602082810191909152808401919091528351808501855282815268536f6369616c69736d60b81b818301528385015283518085018552828152684f6c6967617263687960b81b81830152606084015283518085018552600b8082526a41726973746f637261637960a81b8284015260808501919091528451808601865260088152674d6f6e617263687960c01b8184015260a085015284518086018652838152685468656f637261637960b81b8184015260c0850152845180860186529081526a436f6c6f6e69616c69736d60a81b8183015260e08401528351808501909452600c84526b04469637461746f72736869760a41b90840152610100820192909252620006aa916015919062000a3b565b506040518060c001604052806040518060400160405280600781526020016647656e6573697360c81b81525081526020016040518060400160405280600881526020016756616c68616c6c6160c01b8152508152602001604051806040016040528060088152602001674b65736b656c6c6160c01b815250815260200160405180604001604052806006815260200165536861646f7760d01b815250815260200160405180604001604052806006815260200165506c61696e7360d01b815250815260200160405180604001604052806004815260200163456e647360e01b8152508152506016906006620007a192919062000a8d565b50348015620007af57600080fd5b5060405162004d3a38038062004d3a833981016040819052620007d29162000c3c565b604080518082018252600b81526a536574746c656d656e747360a81b60208083019182528351808501909452600384526214d51360ea1b908401528151919291620008209160009162000adf565b5080516200083690600190602084019062000adf565b505050620008536200084d620008dd60201b60201c565b620008e1565b600b80546001600160a01b0319166001600160a01b038b81169190911790915560408051610100810182528a831681528983166020820152888316918101919091528682166060820152858216608082015284821660a082015283821660c082015290821660e0820152620008cd90600d90600862000b6a565b5050505050505050505062000d65565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805482825590600052602060002090810192821562000985579160200282015b828111156200098557825180516200097491849160209091019062000adf565b509160200191906001019062000954565b506200099392915062000bc2565b5090565b82805482825590600052602060002090810192821562000985579160200282015b82811115620009855782518051620009d891849160209091019062000adf565b5091602001919060010190620009b8565b82805482825590600052602060002090810192821562000985579160200282015b8281111562000985578251805162000a2a91849160209091019062000adf565b509160200191906001019062000a0a565b82805482825590600052602060002090810192821562000985579160200282015b8281111562000985578251805162000a7c91849160209091019062000adf565b509160200191906001019062000a5c565b82805482825590600052602060002090810192821562000985579160200282015b8281111562000985578251805162000ace91849160209091019062000adf565b509160200191906001019062000aae565b82805462000aed9062000d12565b90600052602060002090601f01602090048101928262000b11576000855562000b5c565b82601f1062000b2c57805160ff191683800117855562000b5c565b8280016001018555821562000b5c579182015b8281111562000b5c57825182559160200191906001019062000b3f565b506200099392915062000be3565b82805482825590600052602060002090810192821562000b5c579160200282015b8281111562000b5c57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000b8b565b808211156200099357600062000bd9828262000bfa565b5060010162000bc2565b5b8082111562000993576000815560010162000be4565b50805462000c089062000d12565b6000825580601f1062000c19575050565b601f01602090049060005260206000209081019062000c39919062000be3565b50565b60008060008060008060008060006101208a8c03121562000c5b578485fd5b895162000c688162000d4f565b60208b015190995062000c7b8162000d4f565b60408b015190985062000c8e8162000d4f565b60608b015190975062000ca18162000d4f565b60808b015190965062000cb48162000d4f565b60a08b015190955062000cc78162000d4f565b60c08b015190945062000cda8162000d4f565b60e08b015190935062000ced8162000d4f565b6101008b015190925062000d018162000d4f565b809150509295985092959850929598565b600181811c9082168062000d2757607f821691505b6020821081141562000d4957634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038116811462000c3957600080fd5b613fc58062000d756000396000f3fe608060405234801561001057600080fd5b50600436106102ff5760003560e01c80636658417d1161019c578063aa62581e116100ee578063ddc6326211610097578063ef0b22b411610071578063ef0b22b414610720578063f2fde38b14610733578063f952d4da1461074657600080fd5b8063ddc63262146106be578063e985e9c5146106d1578063ed52a0ce1461070d57600080fd5b8063c87b56dd116100c8578063c87b56dd14610685578063cb133b0f14610698578063cb4f52f8146106ab57600080fd5b8063aa62581e1461064c578063b88d4fde1461065f578063c33329391461067257600080fd5b8063746eae591161015057806395d89b411161012a57806395d89b411461061e578063a22cb46514610626578063a29e25951461063957600080fd5b8063746eae59146105c85780637d7f7840146105db5780638da5cb5b1461060d57600080fd5b80636f3574cd116101815780636f3574cd1461059a57806370a08231146105ad578063715018a6146105c057600080fd5b80636658417d14610567578063684d07701461057a57600080fd5b80632d1353ba1161025557806342842e0e116102095780634f6ccce7116101e35780634f6ccce71461052e5780636352211e1461054157806364449c9c1461055457600080fd5b806342842e0e146104f5578063491d8a58146105085780634efce8411461051b57600080fd5b806334dbc3b31161023a57806334dbc3b3146104bc5780633da391e3146104cf578063404936b4146104e257600080fd5b80632d1353ba146104965780632f745c59146104a957600080fd5b806318160ddd116102b757806323b872dd1161029157806323b872dd1461045d57806327707b9b146104705780632a65294e1461048357600080fd5b806318160ddd1461039457806318f5de38146103a6578063219837071461044a57600080fd5b806306fdde03116102e857806306fdde031461034c578063081812fc14610354578063095ea7b31461037f57600080fd5b806301ffc9a71461030457806305333acf1461032c575b600080fd5b610317610312366004613ad0565b610759565b60405190151581526020015b60405180910390f35b61033f61033a366004613ba8565b61076a565b6040516103239190613cab565b61033f6108a8565b610367610362366004613ba8565b61093a565b6040516001600160a01b039091168152602001610323565b61039261038d366004613999565b6109cf565b005b6008545b604051908152602001610323565b6104076103b4366004613ba8565b600f6020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691650100000000008104821691600160301b9091041687565b6040805160ff9889168152968816602088015294871694860194909452918516606085015284166080840152831660a083015290911660c082015260e001610323565b61033f610458366004613ba8565b610ae5565b61039261046b366004613881565b610b91565b600b54610367906001600160a01b031681565b61033f610491366004613ba8565b610c0c565b6103926104a436600461382d565b610cab565b6103986104b7366004613999565b610d27565b61033f6104ca366004613ba8565b610dcf565b61033f6104dd366004613ba8565b610ddf565b61033f6104f0366004613ba8565b610e7c565b610392610503366004613881565b610e8c565b610392610516366004613bc0565b610ea7565b61033f610529366004613ba8565b611135565b61039861053c366004613ba8565b611145565b61036761054f366004613ba8565b6111f7565b610392610562366004613ba8565b61126e565b61033f610575366004613ba8565b611359565b610398610588366004613ba8565b600e6020526000908152604090205481565b61033f6105a8366004613ba8565b611369565b6103986105bb36600461382d565b611407565b61039261148e565b61033f6105d6366004613ba8565b6114f4565b6105ee6105e9366004613ba8565b611504565b604080516001600160a01b039093168352602083019190915201610323565b600a546001600160a01b0316610367565b61033f611662565b610392610634366004613968565b611671565b600c54610367906001600160a01b031681565b61033f61065a366004613ba8565b611736565b61039261066d3660046138c1565b6117d7565b61033f610680366004613ba8565b611853565b61033f610693366004613ba8565b611863565b6103926106a63660046139c4565b611870565b61033f6106b9366004613ba8565b6118e5565b6103926106cc366004613ba8565b611985565b6103176106df366004613849565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61036761071b366004613ba8565b611a22565b61033f61072e366004613ba8565b611a4c565b61039261074136600461382d565b611ae4565b610392610754366004613ba8565b611bac565b600061076482611c2b565b92915050565b6000818152600260205260409020546060906001600160a01b03166107d25760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064015b60405180910390fd5b6000828152600f6020526040902054601680549091600160301b900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461082390613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461084f90613eb8565b801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b50505050509050919050565b6060600080546108b790613eb8565b80601f01602080910402602001604051908101604052809291908181526020018280546108e390613eb8565b80156109305780601f1061090557610100808354040283529160200191610930565b820191906000526020600020905b81548152906001019060200180831161091357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109b35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107c9565b506000908152600460205260409020546001600160a01b031690565b60006109da826111f7565b9050806001600160a01b0316836001600160a01b03161415610a485760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107c9565b336001600160a01b0382161480610a645750610a6481336106df565b610ad65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016107c9565b610ae08383611c50565b505050565b60168181548110610af557600080fd5b906000526020600020016000915090508054610b1090613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3c90613eb8565b8015610b895780601f10610b5e57610100808354040283529160200191610b89565b820191906000526020600020905b815481529060010190602001808311610b6c57829003601f168201915b505050505081565b610b9b3382611cbe565b610c015760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016107c9565b610ae0838383611db5565b6000818152600260205260409020546060906001600160a01b0316610c6f5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f60205260409020546013805490916301000000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b600a546001600160a01b03163314610d055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c9565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d3283611407565b8210610da65760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016107c9565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60158181548110610af557600080fd5b6000818152600260205260409020546060906001600160a01b0316610e425760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f6020526040902054601180549091610100900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b60108181548110610af557600080fd5b610ae0838383604051806020016040528060008152506117d7565b600b546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015610ef957600080fd5b505af1158015610f0d573d6000803e3d6000fd5b50505050610f1b3383611f60565b6000828152600f602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160ff908116600160301b0266ff00000000000019928216650100000000000265ff000000000019948316640100000000029490941665ffff000000001995831663010000000263ff0000001997841662010000029790971663ffff0000199a84166101000261ffff19909c1693909816929092179990991797909716949094179290921716939093179290921791909116919091179055610fec83611f7e565b604051602001610ffc9190613c19565b60408051808303601f19018152908290528051602090910120600b5463c87b56dd60e01b8352600483018690529092506000916001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561105c57600080fd5b505afa158015611070573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110989190810190613b35565b6040516020016110a89190613c19565b60408051601f1981840301815291815281516020928301206000878152600e9093529120439055905081811461112f5760405162461bcd60e51b815260206004820152602660248201527f4174747269627574657320646f6e2774206d61746368206c656761637920636f6044820152651b9d1c9858dd60d21b60648201526084016107c9565b50505050565b60118181548110610af557600080fd5b600061115060085490565b82106111c45760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016107c9565b600882815481106111e557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806107645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107c9565b6000818152600260205260409020546001600160a01b0316151580156112ad5750611298816111f7565b6001600160a01b0316336001600160a01b0316145b80156112d257506000818152600f60205260409020546005600160301b90910460ff16105b61131e5760405162461bcd60e51b815260206004820152601560248201527f536574746c656d656e74207475726e73206f766572000000000000000000000060448201526064016107c9565b61132781611985565b6000818152600f602052604090205461135690829061135190600160301b900460ff166001613e3c565b611f8b565b50565b60128181548110610af557600080fd5b6000818152600260205260409020546060906001600160a01b03166113cc5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f602052604090205460128054909162010000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b60006001600160a01b0382166114725760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107c9565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146114e85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c9565b6114f26000612699565b565b60138181548110610af557600080fd5b6000818152600f60209081526040808320815160e081018352905460ff8082168352610100820481169483019485526201000082048116838501908152630100000083048216606085019081526401000000008404831660808601908152650100000000008504841660a08701908152600160301b909504841660c08701908152600c5497517fffa0f0a5000000000000000000000000000000000000000000000000000000008152600481018c90528751861660248201529851851660448a015292518416606489015290518316608488015251821660a48701529151811660c486015290511660e4840152839290916001600160a01b03169063ffa0f0a59061010401604080518083038186803b15801561162057600080fd5b505afa158015611634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116589190613b08565b9250925050915091565b6060600180546108b790613eb8565b6001600160a01b0382163314156116ca5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107c9565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000818152600260205260409020546060906001600160a01b03166117995760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f602052604090205460158054909165010000000000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b6117e13383611cbe565b6118475760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016107c9565b61112f848484846126eb565b60148181548110610af557600080fd5b6060610764826000612769565b60005b815181101561112f576118d384848381811061189f57634e487b7160e01b600052603260045260246000fd5b905060200201358383815181106118c657634e487b7160e01b600052603260045260246000fd5b6020026020010151610ea7565b806118dd81613ef3565b915050611873565b6000818152600260205260409020546060906001600160a01b03166119485760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f6020526040902054601480549091640100000000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b60008061199183611504565b91509150816001600160a01b03166340c10f196119ad856111f7565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b1580156119f557600080fd5b505af1158015611a09573d6000803e3d6000fd5b50505060009384525050600e6020525060409020439055565b600d8181548110611a3257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000818152600260205260409020546060906001600160a01b0316611aaf5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f602052604090205460108054909160ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b600a546001600160a01b03163314611b3e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c9565b6001600160a01b038116611ba35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c9565b61135681612699565b600b546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015611bfe57600080fd5b505af1158015611c12573d6000803e3d6000fd5b50505050611c21816003611f8b565b6113563382611f60565b60006001600160e01b0319821663780e9d6360e01b1480610764575061076482612fbf565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c85826111f7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611d375760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107c9565b6000611d42836111f7565b9050806001600160a01b0316846001600160a01b03161480611d7d5750836001600160a01b0316611d728461093a565b6001600160a01b0316145b80611dad57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611dc8826111f7565b6001600160a01b031614611e305760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107c9565b6001600160a01b038216611e925760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107c9565b611e9d83838361300f565b611ea8600082611c50565b6001600160a01b0383166000908152600360205260408120805460019290611ed1908490613e75565b90915550506001600160a01b0382166000908152600360205260408120805460019290611eff908490613e24565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611f7a82826040518060200160405280600081525061301a565b5050565b6060610764826001612769565b61208b611fb4836040518060400160405280600481526020016373697a6560e01b815250613098565b6010805480602002602001604051908101604052809291908181526020016000905b82821015612082578382906000526020600020018054611ff590613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461202190613eb8565b801561206e5780601f106120435761010080835404028352916020019161206e565b820191906000526020600020905b81548152906001019060200180831161205157829003601f168201915b505050505081526020019060010190611fd6565b505050506130d0565b600f600084815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055506121b26120e483604051806040016040528060068152602001651cdc1a5c9a5d60d21b815250613098565b6011805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461212590613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461215190613eb8565b801561219e5780601f106121735761010080835404028352916020019161219e565b820191906000526020600020905b81548152906001019060200180831161218157829003601f168201915b505050505081526020019060010190612106565b600f600084815260200190815260200160002060000160016101000a81548160ff021916908360ff1602179055506122d6612208836040518060400160405280600381526020016261676560e81b815250613098565b6012805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461224990613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461227590613eb8565b80156122c25780601f10612297576101008083540402835291602001916122c2565b820191906000526020600020905b8154815290600101906020018083116122a557829003601f168201915b50505050508152602001906001019061222a565b600f600084815260200190815260200160002060000160026101000a81548160ff021916908360ff1602179055506123ff61233183604051806040016040528060088152602001677265736f7572636560c01b815250613098565b6013805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461237290613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461239e90613eb8565b80156123eb5780601f106123c0576101008083540402835291602001916123eb565b820191906000526020600020905b8154815290600101906020018083116123ce57829003601f168201915b505050505081526020019060010190612353565b600f600084815260200190815260200160002060000160036101000a81548160ff021916908360ff16021790555061252661245883604051806040016040528060068152602001656d6f72616c6560d01b815250613098565b6014805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461249990613eb8565b80601f01602080910402602001604051908101604052809291908181526020018280546124c590613eb8565b80156125125780601f106124e757610100808354040283529160200191612512565b820191906000526020600020905b8154815290600101906020018083116124f557829003601f168201915b50505050508152602001906001019061247a565b600f600084815260200190815260200160002060000160046101000a81548160ff021916908360ff160217905550612651612583836040518060400160405280600a81526020016919dbdd995c9b9b595b9d60b21b815250613098565b6015805480602002602001604051908101604052809291908181526020016000905b828210156120825783829060005260206000200180546125c490613eb8565b80601f01602080910402602001604051908101604052809291908181526020018280546125f090613eb8565b801561263d5780601f106126125761010080835404028352916020019161263d565b820191906000526020600020905b81548152906001019060200180831161262057829003601f168201915b5050505050815260200190600101906125a5565b6000928352600f6020526040909220805466ffff000000000019166501000000000060ff9485160266ff000000000000191617600160301b9290931691909102919091179055565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6126f6848484611db5565b612702848484846130e4565b61112f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016107c9565b6000828152600260205260409020546060906001600160a01b03166127cc5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b61280c6040518060e00160405280606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b6000848152600f602052604090205460108054909160ff1690811061284157634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461285690613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461288290613eb8565b80156128cf5780601f106128a4576101008083540402835291602001916128cf565b820191906000526020600020905b8154815290600101906020018083116128b257829003601f168201915b50505091835250506000848152600f6020526040902054601180549091610100900460ff1690811061291157634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461292690613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461295290613eb8565b801561299f5780601f106129745761010080835404028352916020019161299f565b820191906000526020600020905b81548152906001019060200180831161298257829003601f168201915b50505050506020828101919091526000858152600f909152604090205460128054909162010000900460ff169081106129e857634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546129fd90613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612a2990613eb8565b8015612a765780601f10612a4b57610100808354040283529160200191612a76565b820191906000526020600020905b815481529060010190602001808311612a5957829003601f168201915b50505050506040828101919091526000858152600f60205220546013805490916301000000900460ff16908110612abd57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612ad290613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612afe90613eb8565b8015612b4b5780601f10612b2057610100808354040283529160200191612b4b565b820191906000526020600020905b815481529060010190602001808311612b2e57829003601f168201915b505050505060608201526000848152600f6020526040902054601480549091640100000000900460ff16908110612b9257634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612ba790613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612bd390613eb8565b8015612c205780601f10612bf557610100808354040283529160200191612c20565b820191906000526020600020905b815481529060010190602001808311612c0357829003601f168201915b505050505060808201526000848152600f602052604090205460158054909165010000000000900460ff16908110612c6857634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612c7d90613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612ca990613eb8565b8015612cf65780601f10612ccb57610100808354040283529160200191612cf6565b820191906000526020600020905b815481529060010190602001808311612cd957829003601f168201915b505050505060a08201526000848152600f6020526040902054601680549091600160301b900460ff16908110612d3c57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612d5190613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612d7d90613eb8565b8015612dca5780601f10612d9f57610100808354040283529160200191612dca565b820191906000526020600020905b815481529060010190602001808311612dad57829003601f168201915b50505050508160c001819052506000600d600081548110612dfb57634e487b7160e01b600052603260045260246000fd5b60009182526020822001546001600160a01b0316915084612ea1576000868152600f6020908152604091829020825160e081018452905460ff808216835261010082048116938301939093526201000081048316938201939093526301000000830482166060820152640100000000830482166080820152650100000000008304821660a0820152600160301b9092041660c0820152612e9a87611504565b9093509150505b6000600c60009054906101000a90046001600160a01b03166001600160a01b0316630f14d01a8584866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015612f0257600080fd5b505afa158015612f16573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f3e9190810190613b35565b8a8c6040518663ffffffff1660e01b8152600401612f60959493929190613cbe565b60006040518083038186803b158015612f7857600080fd5b505afa158015612f8c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612fb49190810190613b35565b979650505050505050565b60006001600160e01b031982166380ac58cd60e01b1480612ff057506001600160e01b03198216635b5e139f60e01b145b8061076457506301ffc9a760e01b6001600160e01b0319831614610764565b610ae083838361323c565b61302483836132f4565b61303160008484846130e4565b610ae05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016107c9565b6060816130a484613442565b42446040516020016130b99493929190613c35565b604051602081830303815290604052905092915050565b60006130dd838351613574565b9392505050565b60006001600160a01b0384163b1561323157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613128903390899088908890600401613c6f565b602060405180830381600087803b15801561314257600080fd5b505af1925050508015613172575060408051601f3d908101601f1916820190925261316f91810190613aec565b60015b613217573d8080156131a0576040519150601f19603f3d011682016040523d82523d6000602084013e6131a5565b606091505b50805161320f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016107c9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611dad565b506001949350505050565b6001600160a01b0383166132975761329281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6132ba565b816001600160a01b0316836001600160a01b0316146132ba576132ba83826135ab565b6001600160a01b0382166132d157610ae081613648565b826001600160a01b0316826001600160a01b031614610ae057610ae08282613721565b6001600160a01b03821661334a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107c9565b6000818152600260205260409020546001600160a01b0316156133af5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107c9565b6133bb6000838361300f565b6001600160a01b03821660009081526003602052604081208054600192906133e4908490613e24565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060816134665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613490578061347a81613ef3565b91506134899050600a83613e61565b915061346a565b60008167ffffffffffffffff8111156134b957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156134e3576020820181803683370190505b5090505b8415611dad576134f8600183613e75565b9150613505600a86613f0e565b613510906030613e24565b60f81b81838151811061353357634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061356d600a86613e61565b94506134e7565b600081836040516020016135889190613c19565b6040516020818303038152906040528051906020012060001c6130dd9190613f0e565b600060016135b884611407565b6135c29190613e75565b600083815260076020526040902054909150808214613615576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061365a90600190613e75565b6000838152600960205260408120546008805493945090928490811061369057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106136bf57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061370557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061372c83611407565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600060e08284031215613776578081fd5b60405160e0810181811067ffffffffffffffff8211171561379957613799613f4e565b6040529050806137a883613817565b81526137b660208401613817565b60208201526137c760408401613817565b60408201526137d860608401613817565b60608201526137e960808401613817565b60808201526137fa60a08401613817565b60a082015261380b60c08401613817565b60c08201525092915050565b803560ff8116811461382857600080fd5b919050565b60006020828403121561383e578081fd5b81356130dd81613f64565b6000806040838503121561385b578081fd5b823561386681613f64565b9150602083013561387681613f64565b809150509250929050565b600080600060608486031215613895578081fd5b83356138a081613f64565b925060208401356138b081613f64565b929592945050506040919091013590565b600080600080608085870312156138d6578081fd5b84356138e181613f64565b935060208501356138f181613f64565b925060408501359150606085013567ffffffffffffffff811115613913578182fd5b8501601f81018713613923578182fd5b803561393661393182613dfc565b613dcb565b81815288602083850101111561394a578384fd5b81602084016020830137908101602001929092525092959194509250565b6000806040838503121561397a578182fd5b823561398581613f64565b915060208301358015158114613876578182fd5b600080604083850312156139ab578182fd5b82356139b681613f64565b946020939093013593505050565b6000806000604084860312156139d8578081fd5b833567ffffffffffffffff808211156139ef578283fd5b818601915086601f830112613a02578283fd5b813581811115613a10578384fd5b602088818360051b8601011115613a25578485fd5b808401965081955080880135935082841115613a3f578485fd5b838801935088601f850112613a52578485fd5b8335915082821115613a6657613a66613f4e565b613a74818360051b01613dcb565b828152818101935084820160e0808502870184018c1015613a93578788fd5b8796505b84871015613abf57613aa98c83613765565b8652600196909601959483019490810190613a97565b505080955050505050509250925092565b600060208284031215613ae1578081fd5b81356130dd81613f79565b600060208284031215613afd578081fd5b81516130dd81613f79565b60008060408385031215613b1a578182fd5b8251613b2581613f64565b6020939093015192949293505050565b600060208284031215613b46578081fd5b815167ffffffffffffffff811115613b5c578182fd5b8201601f81018413613b6c578182fd5b8051613b7a61393182613dfc565b818152856020838501011115613b8e578384fd5b613b9f826020830160208601613e8c565b95945050505050565b600060208284031215613bb9578081fd5b5035919050565b6000806101008385031215613bd3578182fd5b82359150613be48460208501613765565b90509250929050565b60008151808452613c05816020860160208601613e8c565b601f01601f19169290920160200192915050565b60008251613c2b818460208701613e8c565b9190910192915050565b60008551613c47818460208a01613e8c565b855190830190613c5b818360208a01613e8c565b019384525050602082015260400192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613ca16080830184613bed565b9695505050505050565b6020815260006130dd6020830184613bed565b60a081526000865160e060a0840152613cdb610180840182613bed565b90506020880151609f19808584030160c0860152613cf98383613bed565b925060408a01519150808584030160e0860152613d168383613bed565b925060608a015191508085840301610100860152613d348383613bed565b925060808a015191508085840301610120860152613d528383613bed565b925060a08a015191508085840301610140860152613d708383613bed565b925060c08a01519150808584030161016086015250613d8f8282613bed565b9150508660208401528281036040840152613daa8187613bed565b915050613dbb606083018515159052565b8260808301529695505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613df457613df4613f4e565b604052919050565b600067ffffffffffffffff821115613e1657613e16613f4e565b50601f01601f191660200190565b60008219821115613e3757613e37613f22565b500190565b600060ff821660ff84168060ff03821115613e5957613e59613f22565b019392505050565b600082613e7057613e70613f38565b500490565b600082821015613e8757613e87613f22565b500390565b60005b83811015613ea7578181015183820152602001613e8f565b8381111561112f5750506000910152565b600181811c90821680613ecc57607f821691505b60208210811415613eed57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613f0757613f07613f22565b5060010190565b600082613f1d57613f1d613f38565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461135657600080fd5b6001600160e01b03198116811461135657600080fdfea2646970667358221220099253f5e06d70812ceefda2f4a87b8d5ce881a24d6bf9bdbaac25d8d3c0b30264736f6c63430008040033000000000000000000000000decc60000ba66700a009b8f9f7d82676b5cfa88a000000000000000000000000a6233451039230fae712371dd7526f6df7625e1f000000000000000000000000044011824d5cbbb788965b11bf98dc1657407644000000000000000000000000def978a5402a6e2d963724f0717c38f0016b52ec000000000000000000000000c754a679a319698f6c88abedb9b435f76de0e14d0000000000000000000000003ecca678b1b595aefa6b2eb21afaed94cdceb7360000000000000000000000007dd14dd66ff3f7a5fada8b1aeb950521a455c81800000000000000000000000006d16c5e84500e36971fed4e9e1dd8183c1cd7ef000000000000000000000000c8a505a1df5c80f7297d8e2a963cfb1872e6a62c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ff5760003560e01c80636658417d1161019c578063aa62581e116100ee578063ddc6326211610097578063ef0b22b411610071578063ef0b22b414610720578063f2fde38b14610733578063f952d4da1461074657600080fd5b8063ddc63262146106be578063e985e9c5146106d1578063ed52a0ce1461070d57600080fd5b8063c87b56dd116100c8578063c87b56dd14610685578063cb133b0f14610698578063cb4f52f8146106ab57600080fd5b8063aa62581e1461064c578063b88d4fde1461065f578063c33329391461067257600080fd5b8063746eae591161015057806395d89b411161012a57806395d89b411461061e578063a22cb46514610626578063a29e25951461063957600080fd5b8063746eae59146105c85780637d7f7840146105db5780638da5cb5b1461060d57600080fd5b80636f3574cd116101815780636f3574cd1461059a57806370a08231146105ad578063715018a6146105c057600080fd5b80636658417d14610567578063684d07701461057a57600080fd5b80632d1353ba1161025557806342842e0e116102095780634f6ccce7116101e35780634f6ccce71461052e5780636352211e1461054157806364449c9c1461055457600080fd5b806342842e0e146104f5578063491d8a58146105085780634efce8411461051b57600080fd5b806334dbc3b31161023a57806334dbc3b3146104bc5780633da391e3146104cf578063404936b4146104e257600080fd5b80632d1353ba146104965780632f745c59146104a957600080fd5b806318160ddd116102b757806323b872dd1161029157806323b872dd1461045d57806327707b9b146104705780632a65294e1461048357600080fd5b806318160ddd1461039457806318f5de38146103a6578063219837071461044a57600080fd5b806306fdde03116102e857806306fdde031461034c578063081812fc14610354578063095ea7b31461037f57600080fd5b806301ffc9a71461030457806305333acf1461032c575b600080fd5b610317610312366004613ad0565b610759565b60405190151581526020015b60405180910390f35b61033f61033a366004613ba8565b61076a565b6040516103239190613cab565b61033f6108a8565b610367610362366004613ba8565b61093a565b6040516001600160a01b039091168152602001610323565b61039261038d366004613999565b6109cf565b005b6008545b604051908152602001610323565b6104076103b4366004613ba8565b600f6020526000908152604090205460ff808216916101008104821691620100008204811691630100000081048216916401000000008204811691650100000000008104821691600160301b9091041687565b6040805160ff9889168152968816602088015294871694860194909452918516606085015284166080840152831660a083015290911660c082015260e001610323565b61033f610458366004613ba8565b610ae5565b61039261046b366004613881565b610b91565b600b54610367906001600160a01b031681565b61033f610491366004613ba8565b610c0c565b6103926104a436600461382d565b610cab565b6103986104b7366004613999565b610d27565b61033f6104ca366004613ba8565b610dcf565b61033f6104dd366004613ba8565b610ddf565b61033f6104f0366004613ba8565b610e7c565b610392610503366004613881565b610e8c565b610392610516366004613bc0565b610ea7565b61033f610529366004613ba8565b611135565b61039861053c366004613ba8565b611145565b61036761054f366004613ba8565b6111f7565b610392610562366004613ba8565b61126e565b61033f610575366004613ba8565b611359565b610398610588366004613ba8565b600e6020526000908152604090205481565b61033f6105a8366004613ba8565b611369565b6103986105bb36600461382d565b611407565b61039261148e565b61033f6105d6366004613ba8565b6114f4565b6105ee6105e9366004613ba8565b611504565b604080516001600160a01b039093168352602083019190915201610323565b600a546001600160a01b0316610367565b61033f611662565b610392610634366004613968565b611671565b600c54610367906001600160a01b031681565b61033f61065a366004613ba8565b611736565b61039261066d3660046138c1565b6117d7565b61033f610680366004613ba8565b611853565b61033f610693366004613ba8565b611863565b6103926106a63660046139c4565b611870565b61033f6106b9366004613ba8565b6118e5565b6103926106cc366004613ba8565b611985565b6103176106df366004613849565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61036761071b366004613ba8565b611a22565b61033f61072e366004613ba8565b611a4c565b61039261074136600461382d565b611ae4565b610392610754366004613ba8565b611bac565b600061076482611c2b565b92915050565b6000818152600260205260409020546060906001600160a01b03166107d25760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064015b60405180910390fd5b6000828152600f6020526040902054601680549091600160301b900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461082390613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461084f90613eb8565b801561089c5780601f106108715761010080835404028352916020019161089c565b820191906000526020600020905b81548152906001019060200180831161087f57829003601f168201915b50505050509050919050565b6060600080546108b790613eb8565b80601f01602080910402602001604051908101604052809291908181526020018280546108e390613eb8565b80156109305780601f1061090557610100808354040283529160200191610930565b820191906000526020600020905b81548152906001019060200180831161091357829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109b35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107c9565b506000908152600460205260409020546001600160a01b031690565b60006109da826111f7565b9050806001600160a01b0316836001600160a01b03161415610a485760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107c9565b336001600160a01b0382161480610a645750610a6481336106df565b610ad65760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016107c9565b610ae08383611c50565b505050565b60168181548110610af557600080fd5b906000526020600020016000915090508054610b1090613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3c90613eb8565b8015610b895780601f10610b5e57610100808354040283529160200191610b89565b820191906000526020600020905b815481529060010190602001808311610b6c57829003601f168201915b505050505081565b610b9b3382611cbe565b610c015760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016107c9565b610ae0838383611db5565b6000818152600260205260409020546060906001600160a01b0316610c6f5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f60205260409020546013805490916301000000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b600a546001600160a01b03163314610d055760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c9565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610d3283611407565b8210610da65760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016107c9565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b60158181548110610af557600080fd5b6000818152600260205260409020546060906001600160a01b0316610e425760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f6020526040902054601180549091610100900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b60108181548110610af557600080fd5b610ae0838383604051806020016040528060008152506117d7565b600b546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015610ef957600080fd5b505af1158015610f0d573d6000803e3d6000fd5b50505050610f1b3383611f60565b6000828152600f602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160ff908116600160301b0266ff00000000000019928216650100000000000265ff000000000019948316640100000000029490941665ffff000000001995831663010000000263ff0000001997841662010000029790971663ffff0000199a84166101000261ffff19909c1693909816929092179990991797909716949094179290921716939093179290921791909116919091179055610fec83611f7e565b604051602001610ffc9190613c19565b60408051808303601f19018152908290528051602090910120600b5463c87b56dd60e01b8352600483018690529092506000916001600160a01b039091169063c87b56dd9060240160006040518083038186803b15801561105c57600080fd5b505afa158015611070573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110989190810190613b35565b6040516020016110a89190613c19565b60408051601f1981840301815291815281516020928301206000878152600e9093529120439055905081811461112f5760405162461bcd60e51b815260206004820152602660248201527f4174747269627574657320646f6e2774206d61746368206c656761637920636f6044820152651b9d1c9858dd60d21b60648201526084016107c9565b50505050565b60118181548110610af557600080fd5b600061115060085490565b82106111c45760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016107c9565b600882815481106111e557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806107645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107c9565b6000818152600260205260409020546001600160a01b0316151580156112ad5750611298816111f7565b6001600160a01b0316336001600160a01b0316145b80156112d257506000818152600f60205260409020546005600160301b90910460ff16105b61131e5760405162461bcd60e51b815260206004820152601560248201527f536574746c656d656e74207475726e73206f766572000000000000000000000060448201526064016107c9565b61132781611985565b6000818152600f602052604090205461135690829061135190600160301b900460ff166001613e3c565b611f8b565b50565b60128181548110610af557600080fd5b6000818152600260205260409020546060906001600160a01b03166113cc5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f602052604090205460128054909162010000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b60006001600160a01b0382166114725760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107c9565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146114e85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c9565b6114f26000612699565b565b60138181548110610af557600080fd5b6000818152600f60209081526040808320815160e081018352905460ff8082168352610100820481169483019485526201000082048116838501908152630100000083048216606085019081526401000000008404831660808601908152650100000000008504841660a08701908152600160301b909504841660c08701908152600c5497517fffa0f0a5000000000000000000000000000000000000000000000000000000008152600481018c90528751861660248201529851851660448a015292518416606489015290518316608488015251821660a48701529151811660c486015290511660e4840152839290916001600160a01b03169063ffa0f0a59061010401604080518083038186803b15801561162057600080fd5b505afa158015611634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116589190613b08565b9250925050915091565b6060600180546108b790613eb8565b6001600160a01b0382163314156116ca5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107c9565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000818152600260205260409020546060906001600160a01b03166117995760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f602052604090205460158054909165010000000000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b6117e13383611cbe565b6118475760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b60648201526084016107c9565b61112f848484846126eb565b60148181548110610af557600080fd5b6060610764826000612769565b60005b815181101561112f576118d384848381811061189f57634e487b7160e01b600052603260045260246000fd5b905060200201358383815181106118c657634e487b7160e01b600052603260045260246000fd5b6020026020010151610ea7565b806118dd81613ef3565b915050611873565b6000818152600260205260409020546060906001600160a01b03166119485760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f6020526040902054601480549091640100000000900460ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b60008061199183611504565b91509150816001600160a01b03166340c10f196119ad856111f7565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b1580156119f557600080fd5b505af1158015611a09573d6000803e3d6000fd5b50505060009384525050600e6020525060409020439055565b600d8181548110611a3257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000818152600260205260409020546060906001600160a01b0316611aaf5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b6000828152600f602052604090205460108054909160ff1690811061080e57634e487b7160e01b600052603260045260246000fd5b600a546001600160a01b03163314611b3e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c9565b6001600160a01b038116611ba35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c9565b61135681612699565b600b546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015611bfe57600080fd5b505af1158015611c12573d6000803e3d6000fd5b50505050611c21816003611f8b565b6113563382611f60565b60006001600160e01b0319821663780e9d6360e01b1480610764575061076482612fbf565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c85826111f7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611d375760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107c9565b6000611d42836111f7565b9050806001600160a01b0316846001600160a01b03161480611d7d5750836001600160a01b0316611d728461093a565b6001600160a01b0316145b80611dad57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611dc8826111f7565b6001600160a01b031614611e305760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107c9565b6001600160a01b038216611e925760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107c9565b611e9d83838361300f565b611ea8600082611c50565b6001600160a01b0383166000908152600360205260408120805460019290611ed1908490613e75565b90915550506001600160a01b0382166000908152600360205260408120805460019290611eff908490613e24565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611f7a82826040518060200160405280600081525061301a565b5050565b6060610764826001612769565b61208b611fb4836040518060400160405280600481526020016373697a6560e01b815250613098565b6010805480602002602001604051908101604052809291908181526020016000905b82821015612082578382906000526020600020018054611ff590613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461202190613eb8565b801561206e5780601f106120435761010080835404028352916020019161206e565b820191906000526020600020905b81548152906001019060200180831161205157829003601f168201915b505050505081526020019060010190611fd6565b505050506130d0565b600f600084815260200190815260200160002060000160006101000a81548160ff021916908360ff1602179055506121b26120e483604051806040016040528060068152602001651cdc1a5c9a5d60d21b815250613098565b6011805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461212590613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461215190613eb8565b801561219e5780601f106121735761010080835404028352916020019161219e565b820191906000526020600020905b81548152906001019060200180831161218157829003601f168201915b505050505081526020019060010190612106565b600f600084815260200190815260200160002060000160016101000a81548160ff021916908360ff1602179055506122d6612208836040518060400160405280600381526020016261676560e81b815250613098565b6012805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461224990613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461227590613eb8565b80156122c25780601f10612297576101008083540402835291602001916122c2565b820191906000526020600020905b8154815290600101906020018083116122a557829003601f168201915b50505050508152602001906001019061222a565b600f600084815260200190815260200160002060000160026101000a81548160ff021916908360ff1602179055506123ff61233183604051806040016040528060088152602001677265736f7572636560c01b815250613098565b6013805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461237290613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461239e90613eb8565b80156123eb5780601f106123c0576101008083540402835291602001916123eb565b820191906000526020600020905b8154815290600101906020018083116123ce57829003601f168201915b505050505081526020019060010190612353565b600f600084815260200190815260200160002060000160036101000a81548160ff021916908360ff16021790555061252661245883604051806040016040528060068152602001656d6f72616c6560d01b815250613098565b6014805480602002602001604051908101604052809291908181526020016000905b8282101561208257838290600052602060002001805461249990613eb8565b80601f01602080910402602001604051908101604052809291908181526020018280546124c590613eb8565b80156125125780601f106124e757610100808354040283529160200191612512565b820191906000526020600020905b8154815290600101906020018083116124f557829003601f168201915b50505050508152602001906001019061247a565b600f600084815260200190815260200160002060000160046101000a81548160ff021916908360ff160217905550612651612583836040518060400160405280600a81526020016919dbdd995c9b9b595b9d60b21b815250613098565b6015805480602002602001604051908101604052809291908181526020016000905b828210156120825783829060005260206000200180546125c490613eb8565b80601f01602080910402602001604051908101604052809291908181526020018280546125f090613eb8565b801561263d5780601f106126125761010080835404028352916020019161263d565b820191906000526020600020905b81548152906001019060200180831161262057829003601f168201915b5050505050815260200190600101906125a5565b6000928352600f6020526040909220805466ffff000000000019166501000000000060ff9485160266ff000000000000191617600160301b9290931691909102919091179055565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6126f6848484611db5565b612702848484846130e4565b61112f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016107c9565b6000828152600260205260409020546060906001600160a01b03166127cc5760405162461bcd60e51b815260206004820152601960248201527814d95d1d1b195b595b9d08191bd95cc81b9bdd08195e1a5cdd603a1b60448201526064016107c9565b61280c6040518060e00160405280606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b6000848152600f602052604090205460108054909160ff1690811061284157634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461285690613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461288290613eb8565b80156128cf5780601f106128a4576101008083540402835291602001916128cf565b820191906000526020600020905b8154815290600101906020018083116128b257829003601f168201915b50505091835250506000848152600f6020526040902054601180549091610100900460ff1690811061291157634e487b7160e01b600052603260045260246000fd5b90600052602060002001805461292690613eb8565b80601f016020809104026020016040519081016040528092919081815260200182805461295290613eb8565b801561299f5780601f106129745761010080835404028352916020019161299f565b820191906000526020600020905b81548152906001019060200180831161298257829003601f168201915b50505050506020828101919091526000858152600f909152604090205460128054909162010000900460ff169081106129e857634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546129fd90613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612a2990613eb8565b8015612a765780601f10612a4b57610100808354040283529160200191612a76565b820191906000526020600020905b815481529060010190602001808311612a5957829003601f168201915b50505050506040828101919091526000858152600f60205220546013805490916301000000900460ff16908110612abd57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612ad290613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612afe90613eb8565b8015612b4b5780601f10612b2057610100808354040283529160200191612b4b565b820191906000526020600020905b815481529060010190602001808311612b2e57829003601f168201915b505050505060608201526000848152600f6020526040902054601480549091640100000000900460ff16908110612b9257634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612ba790613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612bd390613eb8565b8015612c205780601f10612bf557610100808354040283529160200191612c20565b820191906000526020600020905b815481529060010190602001808311612c0357829003601f168201915b505050505060808201526000848152600f602052604090205460158054909165010000000000900460ff16908110612c6857634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612c7d90613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612ca990613eb8565b8015612cf65780601f10612ccb57610100808354040283529160200191612cf6565b820191906000526020600020905b815481529060010190602001808311612cd957829003601f168201915b505050505060a08201526000848152600f6020526040902054601680549091600160301b900460ff16908110612d3c57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612d5190613eb8565b80601f0160208091040260200160405190810160405280929190818152602001828054612d7d90613eb8565b8015612dca5780601f10612d9f57610100808354040283529160200191612dca565b820191906000526020600020905b815481529060010190602001808311612dad57829003601f168201915b50505050508160c001819052506000600d600081548110612dfb57634e487b7160e01b600052603260045260246000fd5b60009182526020822001546001600160a01b0316915084612ea1576000868152600f6020908152604091829020825160e081018452905460ff808216835261010082048116938301939093526201000081048316938201939093526301000000830482166060820152640100000000830482166080820152650100000000008304821660a0820152600160301b9092041660c0820152612e9a87611504565b9093509150505b6000600c60009054906101000a90046001600160a01b03166001600160a01b0316630f14d01a8584866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015612f0257600080fd5b505afa158015612f16573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f3e9190810190613b35565b8a8c6040518663ffffffff1660e01b8152600401612f60959493929190613cbe565b60006040518083038186803b158015612f7857600080fd5b505afa158015612f8c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612fb49190810190613b35565b979650505050505050565b60006001600160e01b031982166380ac58cd60e01b1480612ff057506001600160e01b03198216635b5e139f60e01b145b8061076457506301ffc9a760e01b6001600160e01b0319831614610764565b610ae083838361323c565b61302483836132f4565b61303160008484846130e4565b610ae05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016107c9565b6060816130a484613442565b42446040516020016130b99493929190613c35565b604051602081830303815290604052905092915050565b60006130dd838351613574565b9392505050565b60006001600160a01b0384163b1561323157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613128903390899088908890600401613c6f565b602060405180830381600087803b15801561314257600080fd5b505af1925050508015613172575060408051601f3d908101601f1916820190925261316f91810190613aec565b60015b613217573d8080156131a0576040519150601f19603f3d011682016040523d82523d6000602084013e6131a5565b606091505b50805161320f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016107c9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611dad565b506001949350505050565b6001600160a01b0383166132975761329281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6132ba565b816001600160a01b0316836001600160a01b0316146132ba576132ba83826135ab565b6001600160a01b0382166132d157610ae081613648565b826001600160a01b0316826001600160a01b031614610ae057610ae08282613721565b6001600160a01b03821661334a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107c9565b6000818152600260205260409020546001600160a01b0316156133af5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107c9565b6133bb6000838361300f565b6001600160a01b03821660009081526003602052604081208054600192906133e4908490613e24565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060816134665750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613490578061347a81613ef3565b91506134899050600a83613e61565b915061346a565b60008167ffffffffffffffff8111156134b957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156134e3576020820181803683370190505b5090505b8415611dad576134f8600183613e75565b9150613505600a86613f0e565b613510906030613e24565b60f81b81838151811061353357634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061356d600a86613e61565b94506134e7565b600081836040516020016135889190613c19565b6040516020818303038152906040528051906020012060001c6130dd9190613f0e565b600060016135b884611407565b6135c29190613e75565b600083815260076020526040902054909150808214613615576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061365a90600190613e75565b6000838152600960205260408120546008805493945090928490811061369057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106136bf57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061370557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061372c83611407565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600060e08284031215613776578081fd5b60405160e0810181811067ffffffffffffffff8211171561379957613799613f4e565b6040529050806137a883613817565b81526137b660208401613817565b60208201526137c760408401613817565b60408201526137d860608401613817565b60608201526137e960808401613817565b60808201526137fa60a08401613817565b60a082015261380b60c08401613817565b60c08201525092915050565b803560ff8116811461382857600080fd5b919050565b60006020828403121561383e578081fd5b81356130dd81613f64565b6000806040838503121561385b578081fd5b823561386681613f64565b9150602083013561387681613f64565b809150509250929050565b600080600060608486031215613895578081fd5b83356138a081613f64565b925060208401356138b081613f64565b929592945050506040919091013590565b600080600080608085870312156138d6578081fd5b84356138e181613f64565b935060208501356138f181613f64565b925060408501359150606085013567ffffffffffffffff811115613913578182fd5b8501601f81018713613923578182fd5b803561393661393182613dfc565b613dcb565b81815288602083850101111561394a578384fd5b81602084016020830137908101602001929092525092959194509250565b6000806040838503121561397a578182fd5b823561398581613f64565b915060208301358015158114613876578182fd5b600080604083850312156139ab578182fd5b82356139b681613f64565b946020939093013593505050565b6000806000604084860312156139d8578081fd5b833567ffffffffffffffff808211156139ef578283fd5b818601915086601f830112613a02578283fd5b813581811115613a10578384fd5b602088818360051b8601011115613a25578485fd5b808401965081955080880135935082841115613a3f578485fd5b838801935088601f850112613a52578485fd5b8335915082821115613a6657613a66613f4e565b613a74818360051b01613dcb565b828152818101935084820160e0808502870184018c1015613a93578788fd5b8796505b84871015613abf57613aa98c83613765565b8652600196909601959483019490810190613a97565b505080955050505050509250925092565b600060208284031215613ae1578081fd5b81356130dd81613f79565b600060208284031215613afd578081fd5b81516130dd81613f79565b60008060408385031215613b1a578182fd5b8251613b2581613f64565b6020939093015192949293505050565b600060208284031215613b46578081fd5b815167ffffffffffffffff811115613b5c578182fd5b8201601f81018413613b6c578182fd5b8051613b7a61393182613dfc565b818152856020838501011115613b8e578384fd5b613b9f826020830160208601613e8c565b95945050505050565b600060208284031215613bb9578081fd5b5035919050565b6000806101008385031215613bd3578182fd5b82359150613be48460208501613765565b90509250929050565b60008151808452613c05816020860160208601613e8c565b601f01601f19169290920160200192915050565b60008251613c2b818460208701613e8c565b9190910192915050565b60008551613c47818460208a01613e8c565b855190830190613c5b818360208a01613e8c565b019384525050602082015260400192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613ca16080830184613bed565b9695505050505050565b6020815260006130dd6020830184613bed565b60a081526000865160e060a0840152613cdb610180840182613bed565b90506020880151609f19808584030160c0860152613cf98383613bed565b925060408a01519150808584030160e0860152613d168383613bed565b925060608a015191508085840301610100860152613d348383613bed565b925060808a015191508085840301610120860152613d528383613bed565b925060a08a015191508085840301610140860152613d708383613bed565b925060c08a01519150808584030161016086015250613d8f8282613bed565b9150508660208401528281036040840152613daa8187613bed565b915050613dbb606083018515159052565b8260808301529695505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715613df457613df4613f4e565b604052919050565b600067ffffffffffffffff821115613e1657613e16613f4e565b50601f01601f191660200190565b60008219821115613e3757613e37613f22565b500190565b600060ff821660ff84168060ff03821115613e5957613e59613f22565b019392505050565b600082613e7057613e70613f38565b500490565b600082821015613e8757613e87613f22565b500390565b60005b83811015613ea7578181015183820152602001613e8f565b8381111561112f5750506000910152565b600181811c90821680613ecc57607f821691505b60208210811415613eed57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613f0757613f07613f22565b5060010190565b600082613f1d57613f1d613f38565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461135657600080fd5b6001600160e01b03198116811461135657600080fdfea2646970667358221220099253f5e06d70812ceefda2f4a87b8d5ce881a24d6bf9bdbaac25d8d3c0b30264736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000decc60000ba66700a009b8f9f7d82676b5cfa88a000000000000000000000000a6233451039230fae712371dd7526f6df7625e1f000000000000000000000000044011824d5cbbb788965b11bf98dc1657407644000000000000000000000000def978a5402a6e2d963724f0717c38f0016b52ec000000000000000000000000c754a679a319698f6c88abedb9b435f76de0e14d0000000000000000000000003ecca678b1b595aefa6b2eb21afaed94cdceb7360000000000000000000000007dd14dd66ff3f7a5fada8b1aeb950521a455c81800000000000000000000000006d16c5e84500e36971fed4e9e1dd8183c1cd7ef000000000000000000000000c8a505a1df5c80f7297d8e2a963cfb1872e6a62c
-----Decoded View---------------
Arg [0] : _legacyAddress (address): 0xdEcC60000ba66700a009b8F9F7D82676B5cfA88A
Arg [1] : ironToken_ (address): 0xa6233451039230fAe712371dD7526f6Df7625E1f
Arg [2] : goldToken_ (address): 0x044011824D5CbBb788965B11bF98dc1657407644
Arg [3] : silverToken_ (address): 0xdef978a5402a6E2d963724f0717c38f0016B52ec
Arg [4] : woodToken_ (address): 0xC754a679a319698F6C88ABEDb9B435f76DE0E14D
Arg [5] : woolToken_ (address): 0x3EcCa678B1B595Aefa6B2eb21afaEd94cDcEb736
Arg [6] : waterToken_ (address): 0x7DD14dD66FF3f7A5FAda8B1AEb950521a455C818
Arg [7] : grassToken_ (address): 0x06d16C5e84500e36971FeD4e9e1DD8183C1cD7Ef
Arg [8] : grainToken_ (address): 0xC8a505a1Df5c80f7297d8E2A963cfB1872e6A62c
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000decc60000ba66700a009b8f9f7d82676b5cfa88a
Arg [1] : 000000000000000000000000a6233451039230fae712371dd7526f6df7625e1f
Arg [2] : 000000000000000000000000044011824d5cbbb788965b11bf98dc1657407644
Arg [3] : 000000000000000000000000def978a5402a6e2d963724f0717c38f0016b52ec
Arg [4] : 000000000000000000000000c754a679a319698f6c88abedb9b435f76de0e14d
Arg [5] : 0000000000000000000000003ecca678b1b595aefa6b2eb21afaed94cdceb736
Arg [6] : 0000000000000000000000007dd14dd66ff3f7a5fada8b1aeb950521a455c818
Arg [7] : 00000000000000000000000006d16c5e84500e36971fed4e9e1dd8183c1cd7ef
Arg [8] : 000000000000000000000000c8a505a1df5c80f7297d8e2a963cfb1872e6a62c
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.