Contracts
Get Contract ABI for Verified Contract Source Codes
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
Find verified contracts ✅on our Verified Contracts Source Code page.
https://api.kromascan.com/api
?module=contract
&action=getabi
&address=0x6c66F1d5684630Fb69350A7A88bCca60629d7252
&apikey=YourApiKeyToken
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|---|
address | the |
Sample Response
{
"status": "1",
"message": "OK",
"result": "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_tldOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_domainPrice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_buyingEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_royalty\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_factoryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_metadataAddress\",\"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\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"domain\",\"type\":\"string\"}],\"name\":\"DataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"defaultDomain\",\"type\":\"string\"}],\"name\":\"DefaultDomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"fullDomainName\",\"type\":\"string\"}],\"name\":\"DomainBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"domainBuyingToggle\",\"type\":\"bool\"}],\"name\":\"DomainBuyingToggle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"fullDomainName\",\"type\":\"string\"}],\"name\":\"DomainCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"MintingDisabledForever\",\"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\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"referralFee\",\"type\":\"uint256\"}],\"name\":\"ReferralFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tldPrice\",\"type\":\"uint256\"}],\"name\":\"TldPriceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tldRoyalty\",\"type\":\"uint256\"}],\"name\":\"TldRoyaltyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"buyingDisabledForever\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"buyingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_metadataAddress\",\"type\":\"address\"}],\"name\":\"changeMetadataAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_minter\",\"type\":\"address\"}],\"name\":\"changeMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxLength\",\"type\":\"uint256\"}],\"name\":\"changeNameMaxLength\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"changePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_referral\",\"type\":\"uint256\"}],\"name\":\"changeReferralFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_royalty\",\"type\":\"uint256\"}],\"name\":\"changeRoyalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newReceiver\",\"type\":\"address\"}],\"name\":\"changeRoyaltyFeeReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newUpdater\",\"type\":\"address\"}],\"name\":\"changeRoyaltyFeeUpdater\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"defaultNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableBuyingForever\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"domainIdsNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"domains\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"data\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_data\",\"type\":\"string\"}],\"name\":\"editData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"editDefaultDomain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factoryAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeMetadata\",\"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\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"getDomainData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"getDomainHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"idCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"metadataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"metadataFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_domainHolder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_referrer\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameMaxLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"referral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royalty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltyFeeReceiver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltyFeeUpdater\",\"outputs\":[{\"internalType\":\"address\",\"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\":\"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\":[],\"name\":\"toggleBuyingDomains\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"}]"
}
A simple sample for retrieving the contractABI using Web3.js and Jquery to interact with a contract.
var Web3 = require('web3');
var web3 = new Web3(new Web3.providers.HttpProvider());
var version = web3.version.api;
$.getJSON('https://api.kromascan.com/api?module=contract&action=getabi&address=0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359', function (data) {
var contractABI = "";
contractABI = JSON.parse(data.result);
if (contractABI != ''){
var MyContract = web3.eth.contract(contractABI);
var myContractInstance = MyContract.at("0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359");
var result = myContractInstance.memberId("0xfe8ad7dd2f564a877cc23feea6c0a9cc2e783715");
console.log("result1 : " + result);
var result = myContractInstance.members(1);
console.log("result2 : " + result);
} else {
console.log("Error" );
}
});
Get Contract Source Code for Verified Contract Source Codes
Returns the Solidity source code of a verified smart contract.
📩 Tip : You can also download a CSV list of verified contracts addresses of which the code publishers have provided a corresponding Open Source license for redistribution.
https://api.kromascan.com/api
?module=contract
&action=getsourcecode
&address=0x6c66F1d5684630Fb69350A7A88bCca60629d7252
&apikey=YourApiKeyToken
Query Parameters
Parameter | Description |
---|---|
address | the |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"SourceCode": "{{\r\n \"language\": \"Solidity\",\r\n \"sources\": {\r\n \"@openzeppelin/contracts/access/Ownable.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/security/ReentrancyGuard.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/token/ERC721/ERC721.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: balance query for the zero address\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _owners[tokenId];\\n require(owner != address(0), \\\"ERC721: owner query for nonexistent token\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_exists(tokenId), \\\"ERC721Metadata: URI query for nonexistent token\\\");\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overriden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n require(_exists(tokenId), \\\"ERC721: approved query for nonexistent token\\\");\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory _data\\n ) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: transfer caller is not owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, _data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory _data\\n ) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _owners[tokenId] != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n require(_exists(tokenId), \\\"ERC721: operator query for nonexistent token\\\");\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(\\n address to,\\n uint256 tokenId,\\n bytes memory _data\\n ) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, _data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n _balances[owner] -= 1;\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer of token that is not own\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits a {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits a {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory _data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {}\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/token/ERC721/IERC721.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title ERC721 token receiver interface\\n * @dev Interface for any contract that wants to support safeTransfers\\n * from ERC721 asset contracts.\\n */\\ninterface IERC721Receiver {\\n /**\\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\\n * by `operator` from `from`, this function is called.\\n *\\n * It must return its Solidity selector to confirm the token transfer.\\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\\n *\\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\\n */\\n function onERC721Received(\\n address operator,\\n address from,\\n uint256 tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/utils/Address.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/utils/Context.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/utils/introspection/ERC165.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/utils/introspection/IERC165.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\"\r\n },\r\n \"@openzeppelin/contracts/utils/Strings.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\"\r\n },\r\n \"base64-sol/base64.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: MIT\\n\\n/// @title Base64\\n/// @author Brecht Devos - <brecht@loopring.org>\\n/// @notice Provides a function for encoding some bytes in base64\\nlibrary Base64 {\\n string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\\n\\n function encode(bytes memory data) internal pure returns (string memory) {\\n if (data.length == 0) return '';\\n \\n // load the table into memory\\n string memory table = TABLE;\\n\\n // multiply by 4/3 rounded up\\n uint256 encodedLen = 4 * ((data.length + 2) / 3);\\n\\n // add some extra buffer at the end required for the writing\\n string memory result = new string(encodedLen + 32);\\n\\n assembly {\\n // set the actual output length\\n mstore(result, encodedLen)\\n \\n // prepare the lookup table\\n let tablePtr := add(table, 1)\\n \\n // input ptr\\n let dataPtr := data\\n let endPtr := add(dataPtr, mload(data))\\n \\n // result ptr, jump over length\\n let resultPtr := add(result, 32)\\n \\n // run over the input, 3 bytes at a time\\n for {} lt(dataPtr, endPtr) {}\\n {\\n dataPtr := add(dataPtr, 3)\\n \\n // read 3 bytes\\n let input := mload(dataPtr)\\n \\n // write 4 characters\\n mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))\\n resultPtr := add(resultPtr, 1)\\n mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))\\n resultPtr := add(resultPtr, 1)\\n mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))\\n resultPtr := add(resultPtr, 1)\\n mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F)))))\\n resultPtr := add(resultPtr, 1)\\n }\\n \\n // padding with '='\\n switch mod(mload(data), 3)\\n case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }\\n case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }\\n }\\n \\n return result;\\n }\\n}\\n\"\r\n },\r\n \"contracts/factories/flexi/FlexiPunkTLD.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity ^0.8.4;\\n\\nimport \\\"./interfaces/IFlexiPunkMetadata.sol\\\";\\nimport \\\"../../interfaces/IBasePunkTLD.sol\\\";\\nimport \\\"../../lib/strings.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"base64-sol/base64.sol\\\";\\n\\n/// @title Punk Domains TLD contract (Flexi)\\n/// @author Tempe Techie\\n/// @notice Dynamically generated NFT contract which represents a top-level domain\\ncontract FlexiPunkTLD is IBasePunkTLD, ERC721, Ownable, ReentrancyGuard {\\n using strings for string;\\n\\n // Domain struct is defined in IBasePunkTLD\\n\\n address public immutable factoryAddress; // FlexiPunkTLDFactory address\\n address public metadataAddress; // FlexiPunkMetadata address\\n address public minter; // address which is allowed to mint domains even if contract is paused\\n address public royaltyFeeUpdater; // address which is allowed to change the royalty fee\\n address public royaltyFeeReceiver; // address which receives the royalty fee\\n\\n bool public buyingEnabled = false; // buying domains enabled\\n bool public buyingDisabledForever = false; // buying domains disabled forever\\n bool public metadataFrozen = false; // metadata address frozen forever\\n\\n uint256 public totalSupply;\\n uint256 public idCounter = 1; // up only\\n\\n uint256 public override price; // domain price\\n uint256 public royalty; // share of each domain purchase (in bips) that goes to Punk Domains\\n uint256 public override referral = 1000; // share of each domain purchase (in bips) that goes to the referrer (referral fee)\\n uint256 public nameMaxLength = 140; // max length of a domain name\\n \\n mapping (string => Domain) public override domains; // mapping (domain name => Domain struct); Domain struct is defined in IBasePunkTLD\\n mapping (uint256 => string) public domainIdsNames; // mapping (tokenId => domain name)\\n mapping (address => string) public override defaultNames; // user's default domain\\n\\n event MintingDisabledForever(address user);\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n address _tldOwner,\\n uint256 _domainPrice,\\n bool _buyingEnabled,\\n uint256 _royalty,\\n address _factoryAddress,\\n address _metadataAddress\\n ) ERC721(_name, _symbol) {\\n price = _domainPrice;\\n buyingEnabled = _buyingEnabled;\\n royalty = _royalty;\\n metadataAddress = _metadataAddress;\\n\\n Ownable factory = Ownable(_factoryAddress);\\n\\n factoryAddress = _factoryAddress;\\n royaltyFeeUpdater = factory.owner();\\n royaltyFeeReceiver = factory.owner();\\n\\n transferOwnership(_tldOwner);\\n }\\n\\n // READ\\n\\n // Domain getters - you can also get all Domain data by calling the auto-generated domains(domainName) method\\n function getDomainHolder(string calldata _domainName) public override view returns(address) {\\n return domains[strings.lower(_domainName)].holder;\\n }\\n\\n function getDomainData(string calldata _domainName) public override view returns(string memory) {\\n return domains[strings.lower(_domainName)].data; // should be a JSON object\\n }\\n\\n function tokenURI(uint256 _tokenId) public view override returns (string memory) {\\n return IFlexiPunkMetadata(metadataAddress).getMetadata(\\n domains[domainIdsNames[_tokenId]].name, \\n name(), \\n _tokenId\\n );\\n }\\n\\n // WRITE\\n\\n /// @notice Flexi-specific function\\n function burn(string calldata _domainName) external {\\n string memory dName = strings.lower(_domainName);\\n require(domains[dName].holder == _msgSender(), \\\"You do not own the selected domain\\\");\\n uint256 tokenId = domains[dName].tokenId;\\n delete domainIdsNames[tokenId]; // delete tokenId => domainName mapping\\n delete domains[dName]; // delete string => Domain struct mapping\\n\\n if (keccak256(bytes(defaultNames[_msgSender()])) == keccak256(bytes(dName))) {\\n delete defaultNames[_msgSender()];\\n }\\n\\n _burn(tokenId); // burn the token\\n --totalSupply;\\n emit DomainBurned(_msgSender(), dName);\\n }\\n\\n /// @notice Default domain is the domain name that reverse resolver returns for a given address.\\n function editDefaultDomain(string calldata _domainName) external {\\n string memory dName = strings.lower(_domainName);\\n require(domains[dName].holder == _msgSender(), \\\"You do not own the selected domain\\\");\\n defaultNames[_msgSender()] = dName;\\n emit DefaultDomainChanged(_msgSender(), dName);\\n }\\n\\n /// @notice Edit domain custom data. Make sure to not accidentally delete previous data. Fetch previous data first.\\n /// @param _domainName Only domain name, no TLD/extension.\\n /// @param _data Custom data needs to be in a JSON object format.\\n function editData(string calldata _domainName, string calldata _data) external {\\n string memory dName = strings.lower(_domainName);\\n require(domains[dName].holder == _msgSender(), \\\"Only domain holder can edit their data\\\");\\n domains[dName].data = _data;\\n emit DataChanged(_msgSender(), _domainName);\\n }\\n\\n /// @notice Mint a new domain name as NFT (no dots and spaces allowed).\\n /// @param _domainName Enter domain name without TLD and make sure letters are in lowercase form.\\n /// @return token ID\\n function mint(\\n string memory _domainName,\\n address _domainHolder,\\n address _referrer\\n ) external payable override nonReentrant returns(uint256) {\\n require(!buyingDisabledForever, \\\"Domain minting disabled forever\\\");\\n require(buyingEnabled || _msgSender() == owner() || _msgSender() == minter, \\\"Buying domains disabled\\\");\\n require(msg.value >= price, \\\"Value below price\\\");\\n\\n _sendPayment(msg.value, _referrer);\\n\\n return _mintDomain(_domainName, _domainHolder, \\\"\\\");\\n }\\n\\n function _mintDomain(\\n string memory _domainNameRaw, \\n address _domainHolder,\\n string memory _data\\n ) internal returns(uint256) {\\n // convert domain name to lowercase (only works for ascii, clients should enforce ascii domains only)\\n string memory _domainName = strings.lower(_domainNameRaw);\\n\\n require(strings.len(strings.toSlice(_domainName)) > 0, \\\"Domain name empty\\\");\\n require(bytes(_domainName).length < nameMaxLength, \\\"Domain name is too long\\\");\\n require(strings.count(strings.toSlice(_domainName), strings.toSlice(\\\".\\\")) == 0, \\\"There should be no dots in the name\\\");\\n require(strings.count(strings.toSlice(_domainName), strings.toSlice(\\\" \\\")) == 0, \\\"There should be no spaces in the name\\\");\\n require(domains[_domainName].holder == address(0), \\\"Domain with this name already exists\\\");\\n\\n _mint(_domainHolder, idCounter);\\n\\n Domain memory newDomain; // Domain struct is defined in IBasePunkTLD\\n \\n // store data in Domain struct\\n newDomain.name = _domainName;\\n newDomain.tokenId = idCounter;\\n newDomain.holder = _domainHolder;\\n newDomain.data = _data;\\n\\n // add to both mappings\\n domains[_domainName] = newDomain;\\n domainIdsNames[idCounter] = _domainName;\\n\\n if (bytes(defaultNames[_domainHolder]).length == 0) {\\n defaultNames[_domainHolder] = _domainName; // if default domain name is not set for that holder, set it now\\n }\\n \\n emit DomainCreated(_msgSender(), _domainHolder, string(abi.encodePacked(_domainName, name())));\\n\\n ++idCounter;\\n ++totalSupply;\\n\\n return idCounter-1;\\n }\\n\\n function _sendPayment(uint256 _paymentAmount, address _referrer) internal {\\n if (royalty > 0 && royalty < 5000) { \\n // send royalty - must be less than 50% (5000 bips)\\n (bool sentRoyalty, ) = payable(royaltyFeeReceiver).call{value: ((_paymentAmount * royalty) / 10000)}(\\\"\\\");\\n require(sentRoyalty, \\\"Failed to send royalty to factory owner\\\");\\n }\\n\\n if (_referrer != address(0) && referral > 0 && referral < 5000) {\\n // send referral fee - must be less than 50% (5000 bips)\\n (bool sentReferralFee, ) = payable(_referrer).call{value: ((_paymentAmount * referral) / 10000)}(\\\"\\\");\\n require(sentReferralFee, \\\"Failed to send referral fee\\\");\\n }\\n\\n // send the rest to TLD owner\\n (bool sent, ) = payable(owner()).call{value: address(this).balance}(\\\"\\\");\\n require(sent, \\\"Failed to send domain payment to TLD owner\\\");\\n }\\n\\n ///@dev Hook that is called before any token transfer. This includes minting and burning.\\n function _beforeTokenTransfer(address from,address to,uint256 tokenId) internal override virtual {\\n\\n if (from != address(0)) { // run on every transfer but not on mint\\n domains[domainIdsNames[tokenId]].holder = to; // change holder address in Domain struct\\n \\n if (bytes(defaultNames[to]).length == 0 && to != address(0)) {\\n defaultNames[to] = domains[domainIdsNames[tokenId]].name; // if default domain name is not set for that holder, set it now\\n }\\n\\n if (strings.equals(strings.toSlice(domains[domainIdsNames[tokenId]].name), strings.toSlice(defaultNames[from]))) {\\n delete defaultNames[from]; // if previous owner had this domain name as default, unset it as default\\n }\\n }\\n \\n }\\n\\n // OWNER\\n\\n /// @notice Only TLD contract owner can call this function. Flexi-specific function.\\n function changeMetadataAddress(address _metadataAddress) external onlyOwner {\\n require(!metadataFrozen, \\\"Cannot change metadata address anymore\\\");\\n metadataAddress = _metadataAddress;\\n }\\n\\n /// @notice Only TLD contract owner can call this function. Flexi-specific function.\\n function changeMinter(address _minter) external onlyOwner {\\n minter = _minter;\\n }\\n\\n /// @notice Only TLD contract owner can call this function.\\n function changeNameMaxLength(uint256 _maxLength) external override onlyOwner {\\n nameMaxLength = _maxLength;\\n }\\n\\n /// @notice Only TLD contract owner can call this function.\\n function changePrice(uint256 _price) external override onlyOwner {\\n price = _price;\\n emit TldPriceChanged(_msgSender(), _price);\\n }\\n\\n /// @notice Only TLD contract owner can call this function.\\n function changeReferralFee(uint256 _referral) external override onlyOwner {\\n require(_referral < 5000, \\\"Referral fee cannot be 50% or higher\\\");\\n referral = _referral; // referral must be in bips\\n emit ReferralFeeChanged(_msgSender(), _referral);\\n }\\n\\n /// @notice Only TLD contract owner can call this function. Flexi-specific function.\\n function disableBuyingForever() external onlyOwner {\\n buyingDisabledForever = true; // this action is irreversible\\n emit MintingDisabledForever(_msgSender());\\n }\\n\\n /// @notice Freeze metadata address. Only TLD contract owner can call this function.\\n function freezeMetadata() external onlyOwner {\\n metadataFrozen = true; // this action is irreversible\\n }\\n\\n /// @notice Only TLD contract owner can call this function.\\n function toggleBuyingDomains() external onlyOwner {\\n buyingEnabled = !buyingEnabled;\\n emit DomainBuyingToggle(_msgSender(), buyingEnabled);\\n }\\n \\n // ROYALTY FEE UPDATER\\n\\n /// @notice This changes royalty fee in the wrapper contract\\n function changeRoyalty(uint256 _royalty) external {\\n require(_royalty <= 5000, \\\"Cannot exceed 50%\\\");\\n require(_msgSender() == royaltyFeeUpdater, \\\"Sender is not royalty fee updater\\\");\\n royalty = _royalty;\\n emit TldRoyaltyChanged(_msgSender(), _royalty);\\n }\\n\\n /// @notice This changes royalty fee receiver address. Flexi-specific function.\\n function changeRoyaltyFeeReceiver(address _newReceiver) external {\\n require(_msgSender() == royaltyFeeReceiver, \\\"Sender is not royalty fee receiver\\\");\\n royaltyFeeReceiver = _newReceiver;\\n }\\n\\n /// @notice This changes royalty fee updater address. Flexi-specific function.\\n function changeRoyaltyFeeUpdater(address _newUpdater) external {\\n require(_msgSender() == royaltyFeeUpdater, \\\"Sender is not royalty fee updater\\\");\\n royaltyFeeUpdater = _newUpdater;\\n }\\n}\\n\"\r\n },\r\n \"contracts/factories/flexi/interfaces/IFlexiPunkMetadata.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity ^0.8.4;\\n\\ninterface IFlexiPunkMetadata {\\n\\n function getMetadata(string calldata _domainName, string calldata _tld, uint256 _tokenId) external view returns(string memory);\\n\\n}\\n\"\r\n },\r\n \"contracts/interfaces/IBasePunkTLD.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBasePunkTLD is IERC721 {\\n\\n struct Domain {\\n string name; // domain name that goes before the TLD name; example: \\\"tempetechie\\\" in \\\"tempetechie.web3\\\"\\n uint256 tokenId;\\n address holder;\\n string data; // stringified JSON object, example: {\\\"description\\\": \\\"Some text\\\", \\\"twitter\\\": \\\"@techie1239\\\", \\\"friends\\\": [\\\"0x123...\\\"], \\\"url\\\": \\\"https://punk.domains\\\"}\\n }\\n\\n event DomainCreated(address indexed user, address indexed owner, string fullDomainName);\\n event DomainBurned(address indexed user, string fullDomainName);\\n event DefaultDomainChanged(address indexed user, string defaultDomain);\\n event DataChanged(address indexed user, string indexed domain); // note that domain may be missing on events from older contracts\\n event TldPriceChanged(address indexed user, uint256 tldPrice);\\n event ReferralFeeChanged(address indexed user, uint256 referralFee);\\n event TldRoyaltyChanged(address indexed user, uint256 tldRoyalty);\\n event DomainBuyingToggle(address indexed user, bool domainBuyingToggle);\\n\\n function domains(string calldata _domainName) external view returns(string memory, uint256, address, string memory);\\n\\n function defaultNames(address) external view returns(string memory);\\n\\n function getDomainData(string calldata _domainName) external view returns(string memory);\\n\\n function getDomainHolder(string calldata _domainName) external view returns(address);\\n\\n function price() external view returns (uint256);\\n function referral() external view returns (uint256);\\n\\n function changeNameMaxLength(uint256 _maxLength) external;\\n\\n function changePrice(uint256 _price) external;\\n\\n function changeReferralFee(uint256 _referral) external;\\n\\n function mint(\\n string memory _domainName,\\n address _domainHolder,\\n address _referrer\\n ) external payable returns(uint256);\\n\\n}\\n\"\r\n },\r\n \"contracts/lib/strings.sol\": {\r\n \"content\": \"// SPDX-License-Identifier: Apache-2.0\\n\\n/*\\n * @title String & slice utility library for Solidity contracts.\\n * @author Nick Johnson <arachnid@notdot.net>\\n */\\n\\npragma solidity ^0.8.0;\\n\\nlibrary strings {\\n struct slice {\\n uint _len;\\n uint _ptr;\\n }\\n\\n function memcpy(uint dest, uint src, uint _len) private pure {\\n // Copy word-length chunks while possible\\n for(; _len >= 32; _len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n uint mask = type(uint).max;\\n if (_len > 0) {\\n mask = 256 ** (32 - _len) - 1;\\n }\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n\\n /*\\n * @dev Returns a slice containing the entire string.\\n * @param self The string to make a slice from.\\n * @return A newly allocated slice containing the entire string.\\n */\\n function toSlice(string memory self) internal pure returns (slice memory) {\\n uint ptr;\\n assembly {\\n ptr := add(self, 0x20)\\n }\\n return slice(bytes(self).length, ptr);\\n }\\n\\n /*\\n * @dev Returns the length of a null-terminated bytes32 string.\\n * @param self The value to find the length of.\\n * @return The length of the string, from 0 to 32.\\n */\\n function len(bytes32 self) internal pure returns (uint) {\\n uint ret;\\n if (self == 0)\\n return 0;\\n if (uint(self) & type(uint128).max == 0) {\\n ret += 16;\\n self = bytes32(uint(self) / 0x100000000000000000000000000000000);\\n }\\n if (uint(self) & type(uint64).max == 0) {\\n ret += 8;\\n self = bytes32(uint(self) / 0x10000000000000000);\\n }\\n if (uint(self) & type(uint32).max == 0) {\\n ret += 4;\\n self = bytes32(uint(self) / 0x100000000);\\n }\\n if (uint(self) & type(uint16).max == 0) {\\n ret += 2;\\n self = bytes32(uint(self) / 0x10000);\\n }\\n if (uint(self) & type(uint8).max == 0) {\\n ret += 1;\\n }\\n return 32 - ret;\\n }\\n\\n /*\\n * @dev Returns a slice containing the entire bytes32, interpreted as a\\n * null-terminated utf-8 string.\\n * @param self The bytes32 value to convert to a slice.\\n * @return A new slice containing the value of the input argument up to the\\n * first null.\\n */\\n function toSliceB32(bytes32 self) internal pure returns (slice memory ret) {\\n // Allocate space for `self` in memory, copy it there, and point ret at it\\n assembly {\\n let ptr := mload(0x40)\\n mstore(0x40, add(ptr, 0x20))\\n mstore(ptr, self)\\n mstore(add(ret, 0x20), ptr)\\n }\\n ret._len = len(self);\\n }\\n\\n /*\\n * @dev Returns a new slice containing the same data as the current slice.\\n * @param self The slice to copy.\\n * @return A new slice containing the same data as `self`.\\n */\\n function copy(slice memory self) internal pure returns (slice memory) {\\n return slice(self._len, self._ptr);\\n }\\n\\n /*\\n * @dev Copies a slice to a new string.\\n * @param self The slice to copy.\\n * @return A newly allocated string containing the slice's text.\\n */\\n function toString(slice memory self) internal pure returns (string memory) {\\n string memory ret = new string(self._len);\\n uint retptr;\\n assembly { retptr := add(ret, 32) }\\n\\n memcpy(retptr, self._ptr, self._len);\\n return ret;\\n }\\n\\n /*\\n * @dev Returns the length in runes of the slice. Note that this operation\\n * takes time proportional to the length of the slice; avoid using it\\n * in loops, and call `slice.empty()` if you only need to know whether\\n * the slice is empty or not.\\n * @param self The slice to operate on.\\n * @return The length of the slice in runes.\\n */\\n function len(slice memory self) internal pure returns (uint l) {\\n // Starting at ptr-31 means the LSB will be the byte we care about\\n uint ptr = self._ptr - 31;\\n uint end = ptr + self._len;\\n for (l = 0; ptr < end; l++) {\\n uint8 b;\\n assembly { b := and(mload(ptr), 0xFF) }\\n if (b < 0x80) {\\n ptr += 1;\\n } else if(b < 0xE0) {\\n ptr += 2;\\n } else if(b < 0xF0) {\\n ptr += 3;\\n } else if(b < 0xF8) {\\n ptr += 4;\\n } else if(b < 0xFC) {\\n ptr += 5;\\n } else {\\n ptr += 6;\\n }\\n }\\n }\\n\\n /*\\n * @dev Returns true if the slice is empty (has a length of 0).\\n * @param self The slice to operate on.\\n * @return True if the slice is empty, False otherwise.\\n */\\n function empty(slice memory self) internal pure returns (bool) {\\n return self._len == 0;\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two slices are equal. Comparison is done per-rune,\\n * on unicode codepoints.\\n * @param self The first slice to compare.\\n * @param other The second slice to compare.\\n * @return The result of the comparison.\\n */\\n function compare(slice memory self, slice memory other) internal pure returns (int) {\\n uint shortest = self._len;\\n if (other._len < self._len)\\n shortest = other._len;\\n\\n uint selfptr = self._ptr;\\n uint otherptr = other._ptr;\\n for (uint idx = 0; idx < shortest; idx += 32) {\\n uint a;\\n uint b;\\n assembly {\\n a := mload(selfptr)\\n b := mload(otherptr)\\n }\\n if (a != b) {\\n // Mask out irrelevant bytes and check again\\n uint mask = type(uint).max; // 0xffff...\\n if(shortest < 32) {\\n mask = ~(2 ** (8 * (32 - shortest + idx)) - 1);\\n }\\n unchecked {\\n uint diff = (a & mask) - (b & mask);\\n if (diff != 0)\\n return int(diff);\\n }\\n }\\n selfptr += 32;\\n otherptr += 32;\\n }\\n return int(self._len) - int(other._len);\\n }\\n\\n /*\\n * @dev Returns true if the two slices contain the same text.\\n * @param self The first slice to compare.\\n * @param self The second slice to compare.\\n * @return True if the slices are equal, false otherwise.\\n */\\n function equals(slice memory self, slice memory other) internal pure returns (bool) {\\n return compare(self, other) == 0;\\n }\\n\\n /*\\n * @dev Extracts the first rune in the slice into `rune`, advancing the\\n * slice to point to the next rune and returning `self`.\\n * @param self The slice to operate on.\\n * @param rune The slice that will contain the first rune.\\n * @return `rune`.\\n */\\n function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) {\\n rune._ptr = self._ptr;\\n\\n if (self._len == 0) {\\n rune._len = 0;\\n return rune;\\n }\\n\\n uint l;\\n uint b;\\n // Load the first byte of the rune into the LSBs of b\\n assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) }\\n if (b < 0x80) {\\n l = 1;\\n } else if(b < 0xE0) {\\n l = 2;\\n } else if(b < 0xF0) {\\n l = 3;\\n } else {\\n l = 4;\\n }\\n\\n // Check for truncated codepoints\\n if (l > self._len) {\\n rune._len = self._len;\\n self._ptr += self._len;\\n self._len = 0;\\n return rune;\\n }\\n\\n self._ptr += l;\\n self._len -= l;\\n rune._len = l;\\n return rune;\\n }\\n\\n /*\\n * @dev Returns the first rune in the slice, advancing the slice to point\\n * to the next rune.\\n * @param self The slice to operate on.\\n * @return A slice containing only the first rune from `self`.\\n */\\n function nextRune(slice memory self) internal pure returns (slice memory ret) {\\n nextRune(self, ret);\\n }\\n\\n /*\\n * @dev Returns the number of the first codepoint in the slice.\\n * @param self The slice to operate on.\\n * @return The number of the first codepoint in the slice.\\n */\\n function ord(slice memory self) internal pure returns (uint ret) {\\n if (self._len == 0) {\\n return 0;\\n }\\n\\n uint word;\\n uint length;\\n uint divisor = 2 ** 248;\\n\\n // Load the rune into the MSBs of b\\n assembly { word:= mload(mload(add(self, 32))) }\\n uint b = word / divisor;\\n if (b < 0x80) {\\n ret = b;\\n length = 1;\\n } else if(b < 0xE0) {\\n ret = b & 0x1F;\\n length = 2;\\n } else if(b < 0xF0) {\\n ret = b & 0x0F;\\n length = 3;\\n } else {\\n ret = b & 0x07;\\n length = 4;\\n }\\n\\n // Check for truncated codepoints\\n if (length > self._len) {\\n return 0;\\n }\\n\\n for (uint i = 1; i < length; i++) {\\n divisor = divisor / 256;\\n b = (word / divisor) & 0xFF;\\n if (b & 0xC0 != 0x80) {\\n // Invalid UTF-8 sequence\\n return 0;\\n }\\n ret = (ret * 64) | (b & 0x3F);\\n }\\n\\n return ret;\\n }\\n\\n /*\\n * @dev Returns the keccak-256 hash of the slice.\\n * @param self The slice to hash.\\n * @return The hash of the slice.\\n */\\n function keccak(slice memory self) internal pure returns (bytes32 ret) {\\n assembly {\\n ret := keccak256(mload(add(self, 32)), mload(self))\\n }\\n }\\n\\n /*\\n * @dev Returns true if `self` starts with `needle`.\\n * @param self The slice to operate on.\\n * @param needle The slice to search for.\\n * @return True if the slice starts with the provided text, false otherwise.\\n */\\n function startsWith(slice memory self, slice memory needle) internal pure returns (bool) {\\n if (self._len < needle._len) {\\n return false;\\n }\\n\\n if (self._ptr == needle._ptr) {\\n return true;\\n }\\n\\n bool equal;\\n assembly {\\n let length := mload(needle)\\n let selfptr := mload(add(self, 0x20))\\n let needleptr := mload(add(needle, 0x20))\\n equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))\\n }\\n return equal;\\n }\\n\\n /*\\n * @dev If `self` starts with `needle`, `needle` is removed from the\\n * beginning of `self`. Otherwise, `self` is unmodified.\\n * @param self The slice to operate on.\\n * @param needle The slice to search for.\\n * @return `self`\\n */\\n function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) {\\n if (self._len < needle._len) {\\n return self;\\n }\\n\\n bool equal = true;\\n if (self._ptr != needle._ptr) {\\n assembly {\\n let length := mload(needle)\\n let selfptr := mload(add(self, 0x20))\\n let needleptr := mload(add(needle, 0x20))\\n equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))\\n }\\n }\\n\\n if (equal) {\\n self._len -= needle._len;\\n self._ptr += needle._len;\\n }\\n\\n return self;\\n }\\n\\n /*\\n * @dev Returns true if the slice ends with `needle`.\\n * @param self The slice to operate on.\\n * @param needle The slice to search for.\\n * @return True if the slice starts with the provided text, false otherwise.\\n */\\n function endsWith(slice memory self, slice memory needle) internal pure returns (bool) {\\n if (self._len < needle._len) {\\n return false;\\n }\\n\\n uint selfptr = self._ptr + self._len - needle._len;\\n\\n if (selfptr == needle._ptr) {\\n return true;\\n }\\n\\n bool equal;\\n assembly {\\n let length := mload(needle)\\n let needleptr := mload(add(needle, 0x20))\\n equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))\\n }\\n\\n return equal;\\n }\\n\\n /*\\n * @dev If `self` ends with `needle`, `needle` is removed from the\\n * end of `self`. Otherwise, `self` is unmodified.\\n * @param self The slice to operate on.\\n * @param needle The slice to search for.\\n * @return `self`\\n */\\n function until(slice memory self, slice memory needle) internal pure returns (slice memory) {\\n if (self._len < needle._len) {\\n return self;\\n }\\n\\n uint selfptr = self._ptr + self._len - needle._len;\\n bool equal = true;\\n if (selfptr != needle._ptr) {\\n assembly {\\n let length := mload(needle)\\n let needleptr := mload(add(needle, 0x20))\\n equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))\\n }\\n }\\n\\n if (equal) {\\n self._len -= needle._len;\\n }\\n\\n return self;\\n }\\n\\n // Returns the memory address of the first byte of the first occurrence of\\n // `needle` in `self`, or the first byte after `self` if not found.\\n function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {\\n uint ptr = selfptr;\\n uint idx;\\n\\n if (needlelen <= selflen) {\\n if (needlelen <= 32) {\\n bytes32 mask;\\n if (needlelen > 0) {\\n mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));\\n }\\n\\n bytes32 needledata;\\n assembly { needledata := and(mload(needleptr), mask) }\\n\\n uint end = selfptr + selflen - needlelen;\\n bytes32 ptrdata;\\n assembly { ptrdata := and(mload(ptr), mask) }\\n\\n while (ptrdata != needledata) {\\n if (ptr >= end)\\n return selfptr + selflen;\\n ptr++;\\n assembly { ptrdata := and(mload(ptr), mask) }\\n }\\n return ptr;\\n } else {\\n // For long needles, use hashing\\n bytes32 hash;\\n assembly { hash := keccak256(needleptr, needlelen) }\\n\\n for (idx = 0; idx <= selflen - needlelen; idx++) {\\n bytes32 testHash;\\n assembly { testHash := keccak256(ptr, needlelen) }\\n if (hash == testHash)\\n return ptr;\\n ptr += 1;\\n }\\n }\\n }\\n return selfptr + selflen;\\n }\\n\\n // Returns the memory address of the first byte after the last occurrence of\\n // `needle` in `self`, or the address of `self` if not found.\\n function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {\\n uint ptr;\\n\\n if (needlelen <= selflen) {\\n if (needlelen <= 32) {\\n bytes32 mask;\\n if (needlelen > 0) {\\n mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));\\n }\\n\\n bytes32 needledata;\\n assembly { needledata := and(mload(needleptr), mask) }\\n\\n ptr = selfptr + selflen - needlelen;\\n bytes32 ptrdata;\\n assembly { ptrdata := and(mload(ptr), mask) }\\n\\n while (ptrdata != needledata) {\\n if (ptr <= selfptr)\\n return selfptr;\\n ptr--;\\n assembly { ptrdata := and(mload(ptr), mask) }\\n }\\n return ptr + needlelen;\\n } else {\\n // For long needles, use hashing\\n bytes32 hash;\\n assembly { hash := keccak256(needleptr, needlelen) }\\n ptr = selfptr + (selflen - needlelen);\\n while (ptr >= selfptr) {\\n bytes32 testHash;\\n assembly { testHash := keccak256(ptr, needlelen) }\\n if (hash == testHash)\\n return ptr + needlelen;\\n ptr -= 1;\\n }\\n }\\n }\\n return selfptr;\\n }\\n\\n /*\\n * @dev Modifies `self` to contain everything from the first occurrence of\\n * `needle` to the end of the slice. `self` is set to the empty slice\\n * if `needle` is not found.\\n * @param self The slice to search and modify.\\n * @param needle The text to search for.\\n * @return `self`.\\n */\\n function find(slice memory self, slice memory needle) internal pure returns (slice memory) {\\n uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);\\n self._len -= ptr - self._ptr;\\n self._ptr = ptr;\\n return self;\\n }\\n\\n /*\\n * @dev Modifies `self` to contain the part of the string from the start of\\n * `self` to the end of the first occurrence of `needle`. If `needle`\\n * is not found, `self` is set to the empty slice.\\n * @param self The slice to search and modify.\\n * @param needle The text to search for.\\n * @return `self`.\\n */\\n function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) {\\n uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);\\n self._len = ptr - self._ptr;\\n return self;\\n }\\n\\n /*\\n * @dev Splits the slice, setting `self` to everything after the first\\n * occurrence of `needle`, and `token` to everything before it. If\\n * `needle` does not occur in `self`, `self` is set to the empty slice,\\n * and `token` is set to the entirety of `self`.\\n * @param self The slice to split.\\n * @param needle The text to search for in `self`.\\n * @param token An output parameter to which the first token is written.\\n * @return `token`.\\n */\\n function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {\\n uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);\\n token._ptr = self._ptr;\\n token._len = ptr - self._ptr;\\n if (ptr == self._ptr + self._len) {\\n // Not found\\n self._len = 0;\\n } else {\\n self._len -= token._len + needle._len;\\n self._ptr = ptr + needle._len;\\n }\\n return token;\\n }\\n\\n /*\\n * @dev Splits the slice, setting `self` to everything after the first\\n * occurrence of `needle`, and returning everything before it. If\\n * `needle` does not occur in `self`, `self` is set to the empty slice,\\n * and the entirety of `self` is returned.\\n * @param self The slice to split.\\n * @param needle The text to search for in `self`.\\n * @return The part of `self` up to the first occurrence of `delim`.\\n */\\n function split(slice memory self, slice memory needle) internal pure returns (slice memory token) {\\n split(self, needle, token);\\n }\\n\\n /*\\n * @dev Splits the slice, setting `self` to everything before the last\\n * occurrence of `needle`, and `token` to everything after it. If\\n * `needle` does not occur in `self`, `self` is set to the empty slice,\\n * and `token` is set to the entirety of `self`.\\n * @param self The slice to split.\\n * @param needle The text to search for in `self`.\\n * @param token An output parameter to which the first token is written.\\n * @return `token`.\\n */\\n function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {\\n uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);\\n token._ptr = ptr;\\n token._len = self._len - (ptr - self._ptr);\\n if (ptr == self._ptr) {\\n // Not found\\n self._len = 0;\\n } else {\\n self._len -= token._len + needle._len;\\n }\\n return token;\\n }\\n\\n /*\\n * @dev Splits the slice, setting `self` to everything before the last\\n * occurrence of `needle`, and returning everything after it. If\\n * `needle` does not occur in `self`, `self` is set to the empty slice,\\n * and the entirety of `self` is returned.\\n * @param self The slice to split.\\n * @param needle The text to search for in `self`.\\n * @return The part of `self` after the last occurrence of `delim`.\\n */\\n function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) {\\n rsplit(self, needle, token);\\n }\\n\\n /*\\n * @dev Counts the number of nonoverlapping occurrences of `needle` in `self`.\\n * @param self The slice to search.\\n * @param needle The text to search for in `self`.\\n * @return The number of occurrences of `needle` found in `self`.\\n */\\n function count(slice memory self, slice memory needle) internal pure returns (uint cnt) {\\n uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len;\\n while (ptr <= self._ptr + self._len) {\\n cnt++;\\n ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len;\\n }\\n }\\n\\n /*\\n * @dev Returns True if `self` contains `needle`.\\n * @param self The slice to search.\\n * @param needle The text to search for in `self`.\\n * @return True if `needle` is found in `self`, false otherwise.\\n */\\n function contains(slice memory self, slice memory needle) internal pure returns (bool) {\\n return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr;\\n }\\n\\n /*\\n * @dev Returns a newly allocated string containing the concatenation of\\n * `self` and `other`.\\n * @param self The first slice to concatenate.\\n * @param other The second slice to concatenate.\\n * @return The concatenation of the two strings.\\n */\\n function concat(slice memory self, slice memory other) internal pure returns (string memory) {\\n string memory ret = new string(self._len + other._len);\\n uint retptr;\\n assembly { retptr := add(ret, 32) }\\n memcpy(retptr, self._ptr, self._len);\\n memcpy(retptr + self._len, other._ptr, other._len);\\n return ret;\\n }\\n\\n /*\\n * @dev Joins an array of slices, using `self` as a delimiter, returning a\\n * newly allocated string.\\n * @param self The delimiter to use.\\n * @param parts A list of slices to join.\\n * @return A newly allocated string containing all the slices in `parts`,\\n * joined with `self`.\\n */\\n function join(slice memory self, slice[] memory parts) internal pure returns (string memory) {\\n if (parts.length == 0)\\n return \\\"\\\";\\n\\n uint length = self._len * (parts.length - 1);\\n for(uint i = 0; i < parts.length; i++)\\n length += parts[i]._len;\\n\\n string memory ret = new string(length);\\n uint retptr;\\n assembly { retptr := add(ret, 32) }\\n\\n for(uint i = 0; i < parts.length; i++) {\\n memcpy(retptr, parts[i]._ptr, parts[i]._len);\\n retptr += parts[i]._len;\\n if (i < parts.length - 1) {\\n memcpy(retptr, self._ptr, self._len);\\n retptr += self._len;\\n }\\n }\\n\\n return ret;\\n }\\n\\n /**\\n * Lower\\n * \\n * Converts all the values of a string to their corresponding lower case\\n * value.\\n * \\n * @param _base When being used for a data type this is the extended object\\n * otherwise this is the string base to convert to lower case\\n * @return string \\n */\\n function lower(string memory _base)\\n internal\\n pure\\n returns (string memory) {\\n bytes memory _baseBytes = bytes(_base);\\n for (uint i = 0; i < _baseBytes.length; i++) {\\n _baseBytes[i] = _lower(_baseBytes[i]);\\n }\\n return string(_baseBytes);\\n }\\n\\n /**\\n * Lower\\n * \\n * Convert an alphabetic character to lower case and return the original\\n * value when not alphabetic\\n * \\n * @param _b1 The byte to be converted to lower case\\n * @return bytes1 The converted value if the passed value was alphabetic\\n * and in a upper case otherwise returns the original value\\n */\\n function _lower(bytes1 _b1)\\n private\\n pure\\n returns (bytes1) {\\n\\n if (_b1 >= 0x41 && _b1 <= 0x5A) {\\n return bytes1(uint8(_b1) + 32);\\n }\\n\\n return _b1;\\n }\\n}\"\r\n }\r\n },\r\n \"settings\": {\r\n \"optimizer\": {\r\n \"enabled\": true,\r\n \"runs\": 200\r\n },\r\n \"outputSelection\": {\r\n \"*\": {\r\n \"*\": [\r\n \"evm.bytecode\",\r\n \"evm.deployedBytecode\",\r\n \"devdoc\",\r\n \"userdoc\",\r\n \"metadata\",\r\n \"abi\"\r\n ]\r\n }\r\n },\r\n \"libraries\": {}\r\n }\r\n}}",
"ABI": "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_tldOwner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_domainPrice\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_buyingEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_royalty\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_factoryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_metadataAddress\",\"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\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"domain\",\"type\":\"string\"}],\"name\":\"DataChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"defaultDomain\",\"type\":\"string\"}],\"name\":\"DefaultDomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"fullDomainName\",\"type\":\"string\"}],\"name\":\"DomainBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"domainBuyingToggle\",\"type\":\"bool\"}],\"name\":\"DomainBuyingToggle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"fullDomainName\",\"type\":\"string\"}],\"name\":\"DomainCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"MintingDisabledForever\",\"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\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"referralFee\",\"type\":\"uint256\"}],\"name\":\"ReferralFeeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tldPrice\",\"type\":\"uint256\"}],\"name\":\"TldPriceChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tldRoyalty\",\"type\":\"uint256\"}],\"name\":\"TldRoyaltyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"buyingDisabledForever\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"buyingEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_metadataAddress\",\"type\":\"address\"}],\"name\":\"changeMetadataAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_minter\",\"type\":\"address\"}],\"name\":\"changeMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxLength\",\"type\":\"uint256\"}],\"name\":\"changeNameMaxLength\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"changePrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_referral\",\"type\":\"uint256\"}],\"name\":\"changeReferralFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_royalty\",\"type\":\"uint256\"}],\"name\":\"changeRoyalty\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newReceiver\",\"type\":\"address\"}],\"name\":\"changeRoyaltyFeeReceiver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newUpdater\",\"type\":\"address\"}],\"name\":\"changeRoyaltyFeeUpdater\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"defaultNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disableBuyingForever\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"domainIdsNames\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"domains\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"holder\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"data\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_data\",\"type\":\"string\"}],\"name\":\"editData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"editDefaultDomain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factoryAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeMetadata\",\"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\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"getDomainData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"}],\"name\":\"getDomainHolder\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"idCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"metadataAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"metadataFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_domainName\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"_domainHolder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_referrer\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameMaxLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"price\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"referral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royalty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltyFeeReceiver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltyFeeUpdater\",\"outputs\":[{\"internalType\":\"address\",\"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\":\"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\":[],\"name\":\"toggleBuyingDomains\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\"}]",
"ContractName": "FlexiPunkTLD",
"CompilerVersion": "v0.8.4+commit.c7e474f2",
"OptimizationUsed": "1",
"Runs": "200",
"ConstructorArguments": "00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000b29050965a5ac70ab487aa47546cdcbc97dae45d0000000000000000000000000000000000000000000000000003328b944c400000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bba4db63da448c124ee38eec636b697ca9bdf9e1000000000000000000000000f51f7a532a2aadfe8e2320bf5ba8275503bb378900000000000000000000000000000000000000000000000000000000000000082e616c6b726f6d6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082e414c4b524f4d41000000000000000000000000000000000000000000000000",
"EVMVersion": "Default",
"Library": "",
"LicenseType": "",
"Proxy": "0",
"Implementation": "",
"SwarmSource": ""
}
]
}
Get Contract Creator and Creation Tx Hash
Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.
https://api.kromascan.com/api
?module=contract
&action=getcontractcreation
&contractaddresses=0x6c66F1d5684630Fb69350A7A88bCca60629d7252
Try this endpoint in your browser 🔗
Query Parameters
Parameter | Description |
---|---|
contractaddresses | the |
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"contractAddress": "0x6c66f1d5684630fb69350a7a88bcca60629d7252",
"contractCreator": "0xb29050965a5ac70ab487aa47546cdcbc97dae45d",
"txHash": "0x488e6bcefd18f3eb0edf981af32934e1f1863ed98721067a3727fe551cd245eb"
}
]
}
Verify Source Code
Submits a contract source code to Kromascan for verification.
📝 Note : This endpoint is limited to 100 verifications/day, regardless of API PRO tier.
Requires a valid Kromascan API key, it will be rejected otherwise
Only supports HTTP POST due to max transfer size limitations for HTTP GET
Supports up to 10 different library pairs
Contracts that use "imports" will need to have the code concatenated into one file as we do not support "imports" in separate files.
List of supported solc versions, only solc version v0.4.11 and above is supported e.g. v0.4.25+commit.59dbf8f1
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified Source Codes will be displayed at the Verified Contracts page.
Source Code Submission Gist
See Demo Source Verification Submission Code at Source Code Verification Sample.
//Submit Source Code for Verification
$.ajax({
type: "POST", //Only POST supported
url: "//api.etherscan.io/api", //Set to the correct API url for Other Networks
data: {
apikey: $('#apikey').val(), //A valid API-Key is required
module: 'contract', //Do not change
action: 'verifysourcecode', //Do not change
contractaddress: $('#contractaddress').val(), //Contract Address starts with 0x...
sourceCode: $('#sourceCode').val(), //Contract Source Code (Flattened if necessary)
codeformat: $('#codeformat').val(), //solidity-single-file (default) or solidity-standard-json-input (for std-input-json-format support
contractname: $('#contractname').val(), //ContractName (if codeformat=solidity-standard-json-input, then enter contractname as ex: erc20.sol:erc20)
compilerversion: $('#compilerversion').val(), // see https://kromascan.com/solcversions for list of support versions
optimizationUsed: $('#optimizationUsed').val(), //0 = No Optimization, 1 = Optimization used (applicable when codeformat=solidity-single-file)
runs: 200, //set to 200 as default unless otherwise (applicable when codeformat=solidity-single-file)
constructorArguements: $('#constructorArguements').val(), //if applicable
evmversion: $('#evmVersion').val(), //leave blank for compiler default, homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg, istanbul (applicable when codeformat=solidity-single-file)
licenseType: $('#licenseType').val(), //Valid codes 1-14 where 1=No License .. 14=Business Source License 1.1, see https://kromascan.com/contract-license-types
libraryname1: $('#libraryname1').val(), //if applicable, a matching pair with libraryaddress1 required
libraryaddress1: $('#libraryaddress1').val(), //if applicable, a matching pair with libraryname1 required
libraryname2: $('#libraryname2').val(), //if applicable, matching pair required
libraryaddress2: $('#libraryaddress2').val(), //if applicable, matching pair required
libraryname3: $('#libraryname3').val(), //if applicable, matching pair required
libraryaddress3: $('#libraryaddress3').val(), //if applicable, matching pair required
libraryname4: $('#libraryname4').val(), //if applicable, matching pair required
libraryaddress4: $('#libraryaddress4').val(), //if applicable, matching pair required
libraryname5: $('#libraryname5').val(), //if applicable, matching pair required
libraryaddress5: $('#libraryaddress5').val(), //if applicable, matching pair required
libraryname6: $('#libraryname6').val(), //if applicable, matching pair required
libraryaddress6: $('#libraryaddress6').val(), //if applicable, matching pair required
libraryname7: $('#libraryname7').val(), //if applicable, matching pair required
libraryaddress7: $('#libraryaddress7').val(), //if applicable, matching pair required
libraryname8: $('#libraryname8').val(), //if applicable, matching pair required
libraryaddress8: $('#libraryaddress8').val(), //if applicable, matching pair required
libraryname9: $('#libraryname9').val(), //if applicable, matching pair required
libraryaddress9: $('#libraryaddress9').val(), //if applicable, matching pair required
libraryname10: $('#libraryname10').val(), //if applicable, matching pair required
libraryaddress10: $('#libraryaddress10').val() //if applicable, matching pair required
},
success: function (result) {
console.log(result);
if (result.status == "1") {
//1 = submission success, use the guid returned (result.result) to check the status of your submission.
// Average time of processing is 30-60 seconds
document.getElementById("postresult").innerHTML = result.status + ";" + result.message + ";" + result.result;
// result.result is the GUID receipt for the submission, you can use this guid for checking the verification status
} else {
//0 = error
document.getElementById("postresult").innerHTML = result.status + ";" + result.message + ";" + result.result;
}
console.log("status : " + result.status);
console.log("result : " + result.result);
},
error: function (result) {
console.log("error!");
document.getElementById("postresult").innerHTML = "Unexpected Error"
}
});
Check Source Code Verification Submission Status
👇 Note: Upon successful submission, a GUID is returned, which can be used to check for submission status.
//Check Source Code Verification Status
$.ajax({
type: "GET",
url: "//api.etherscan.io/api",
data: {
apikey: $('#apikey').val(),
guid: 'ezq878u486pzijkvvmerl6a9mzwhv6sefgvqi5tkwceejc7tvn', //Replace with your Source Code GUID receipt above
module: "contract",
action: "checkverifystatus"
},
success: function (result) {
console.log("status : " + result.status); //0=Error, 1=Pass
console.log("message : " + result.message); //OK, NOTOK
console.log("result : " + result.result); //result explanation
$('#guidstatus').html(">> " + result.result);
},
error: function (result) {
alert('error');
}
});
Verify Proxy Contract
Submits a proxy contract source code to Kromascan for verification.
Requires a valid Kromascan API key, it will be rejected otherwise
Current daily limit of 100 submissions per day per user (subject to change)
Only supports HTTP post
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab
Verifying Proxy Contract using cURL
// example with only the mandatory contract address parameter
curl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f" "https://api.kromascan.com/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// example using the expectedimplementation optional parameter
// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifier
curl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6" "https://api.kromascan.com/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// OK
{"status":"1","message":"OK","result":"gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz"}
// NOTOK
{"status":"0","message":"NOTOK","result":"Invalid API Key"}
Checking Proxy Contract Verification Submission Status using cURL
curl "https://api.kromascan.com/api?module=contract&action=checkproxyverification&guid=gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz&apikey=YourApiKeyToken"
// OK
{"status":"1","message":"OK","result":"The proxy's (0xbc46363a7669f6e12353fa95bb067aead3675c29) implementation contract is found at 0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6 and is successfully updated."}
// NOTOK
{"status":"0","message":"NOTOK","result":"A corresponding implementation contract was unfortunately not detected for the proxy address."}
Last updated