diff --git a/.env.org b/.env.org index c5f9d0d..c2c1c14 100644 --- a/.env.org +++ b/.env.org @@ -1,4 +1,6 @@ -PRIVATE_KEY= +DEPLOYER_KEY= ETHERSCAN_API_KEY= INFURA_API_KEY= -ADMIN_SCW= \ No newline at end of file +ADMIN_SCW= +MINTER= +MINTER_SCW= \ No newline at end of file diff --git a/README.md b/README.md index e3d48e7..641e616 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,10 @@ npm run test -- --grep "AnytypeRegistrarControllerPrivate" 1. Define a **.env** file with 3 variables: ``` -PRIVATE_KEY=XXX DEPLOYER_KEY=XXX INFURA_API_KEY=YYY +ADMIN_SCW=ZZZ +MINTER_SCW=KKK ``` 2. (optional) Remove **deployments/sepolia** folder to reset all migrations: diff --git a/contracts/anytype/AnytypeRegistrarControllerPrivate.sol b/contracts/anytype/AnytypeRegistrarControllerPrivate.sol index 2a55f34..1661e39 100644 --- a/contracts/anytype/AnytypeRegistrarControllerPrivate.sol +++ b/contracts/anytype/AnytypeRegistrarControllerPrivate.sol @@ -57,7 +57,8 @@ contract AnytypeRegistrarControllerPrivate is ReverseRegistrar public immutable reverseRegistrar; INameWrapper public immutable nameWrapper; - address public immutable additionalOwner; + address public minterAccount; + address public minterAccount2; mapping(bytes32 => uint256) public commitments; @@ -68,11 +69,18 @@ contract AnytypeRegistrarControllerPrivate is uint256 expires ); event NameRenewed(string name, bytes32 indexed label, uint256 expires); + event MintersChanged( + address oldMinter, + address newMinter, + address newMinter2 + ); function _checkOwner() internal view virtual override { require( - owner() == _msgSender() || additionalOwner == _msgSender(), - "Ownable: caller is not the owner1 or owner2" + owner() == _msgSender() || + minterAccount == _msgSender() || + minterAccount2 == _msgSender(), + "Ownable: caller is not the owner1 or minter or minter2" ); } @@ -83,7 +91,8 @@ contract AnytypeRegistrarControllerPrivate is ReverseRegistrar _reverseRegistrar, INameWrapper _nameWrapper, ENS _ens, - address _additionalOwner + address _minterAccount, + address _minter2Account ) ReverseClaimer(_ens, msg.sender) { if (_maxCommitmentAge <= _minCommitmentAge) { revert MaxCommitmentAgeTooLow(); @@ -98,7 +107,21 @@ contract AnytypeRegistrarControllerPrivate is maxCommitmentAge = _maxCommitmentAge; reverseRegistrar = _reverseRegistrar; nameWrapper = _nameWrapper; - additionalOwner = _additionalOwner; + minterAccount = _minterAccount; + minterAccount2 = _minter2Account; + } + + function changeMinters(address newMinter, address newMinter2) external { + // this should not be called by minter + // if minter gets hacked -> admin can change the minter + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + require(newMinter != address(0), "Invalid minter address"); + require(newMinter2 != address(0), "Invalid minter2 address"); + + emit MintersChanged(minterAccount, newMinter, newMinter2); + + minterAccount = newMinter; + minterAccount2 = newMinter2; } function valid(string memory name) public pure returns (bool) { diff --git a/contracts/anytype/ERC20NameToken.sol b/contracts/anytype/ERC20NameToken.sol index 06e05ef..550108a 100644 --- a/contracts/anytype/ERC20NameToken.sol +++ b/contracts/anytype/ERC20NameToken.sol @@ -16,12 +16,36 @@ import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; * User can use this token to buy/renew a name for 1 year */ contract ERC20NameToken is Ownable, ERC20 { - constructor() ERC20("AnyNameToken", "ANT") {} + address public minterAccount; + + event MinterChanged(address indexed oldMinter, address indexed newMinter); + + constructor(address _minterAccount) ERC20("AnyNameToken", "ANT") { + minterAccount = _minterAccount; + } + + function _checkOwner() internal view virtual override { + require( + owner() == _msgSender() || minterAccount == _msgSender(), + "Ownable: caller is not the owner1 or owner2" + ); + } function decimals() public view virtual override returns (uint8) { return 6; } + function changeMinter(address newMinter) external { + // this should not be called by minter + // if minter gets hacked -> admin can change the minter + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + require(newMinter != address(0), "Invalid minter address"); + + emit MinterChanged(minterAccount, newMinter); + + minterAccount = newMinter; + } + function mint(address user_, uint amount_) public onlyOwner { _mint(user_, amount_); } diff --git a/contracts/wrapper/README.md b/contracts/wrapper/README.md index 418f571..31a31f7 100644 --- a/contracts/wrapper/README.md +++ b/contracts/wrapper/README.md @@ -426,7 +426,6 @@ cp .env.org .env ### Set credentials ``` -PRIVATE_KEY= ETHERSCAN_API_KEY= INFURA_API_KEY= ``` diff --git a/deploy/anytype/02_deploy_price_oracle.ts b/deploy/anytype/02_deploy_price_oracle.ts index aeaecca..093ab46 100644 --- a/deploy/anytype/02_deploy_price_oracle.ts +++ b/deploy/anytype/02_deploy_price_oracle.ts @@ -6,7 +6,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deploy } = deployments const { deployer } = await getNamedAccounts() - const defaultPrice = 10 * 100 // 10 USD + const defaultPrice = 75 * 100 // 75 USD await deploy('AnytypePriceOracle', { from: deployer, args: [ diff --git a/deploy/anytype/03_deploy_controller_private.ts b/deploy/anytype/03_deploy_controller_private.ts index 14d8ca3..b31c1c1 100644 --- a/deploy/anytype/03_deploy_controller_private.ts +++ b/deploy/anytype/03_deploy_controller_private.ts @@ -25,16 +25,12 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const reverseRegistrar = await ethers.getContract('ReverseRegistrar', owner) const nameWrapper = await ethers.getContract('AnytypeNameWrapper', owner) - // this is usually the admin's SCW (AccountAbstraction) - // so we can control this either directly from admin or from admin's SCW (AccountAbstraction) - const additionalOwner = process.env.ADMIN_SCW - if (!additionalOwner || additionalOwner === '') { - throw new Error('ADMIN_SCW is not set') + const minter = process.env.MINTER + const minterScw = process.env.MINTER_SCW + if (!minterScw || minterScw === '') { + throw new Error('MINTER_SCW is not set') } - console.log( - 'WARNING: private controller additional owner is set to', - additionalOwner, - ) + console.log('WARNING: private controller minter is set to', minterScw) const deployArgs = { from: deployer, @@ -46,7 +42,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { reverseRegistrar.address, nameWrapper.address, registry.address, - additionalOwner, + minter, + minterScw, ], log: true, } diff --git a/deploy/anytype/06_name_token.ts b/deploy/anytype/06_name_token.ts index 4ffd203..46321bd 100644 --- a/deploy/anytype/06_name_token.ts +++ b/deploy/anytype/06_name_token.ts @@ -50,10 +50,15 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } */ + const minterScw = process.env.MINTER_SCW + if (!minterScw || minterScw === '') { + throw new Error('MINTER_SCW is not set') + } + // 2 - deploy NameToken await deploy('ERC20NameToken', { from: deployer, - args: [], + args: [minterScw], log: true, }) diff --git a/deploy/anytype/07_getter.ts b/deploy/anytype/07_getter.ts index f5c5963..aa03b1b 100644 --- a/deploy/anytype/07_getter.ts +++ b/deploy/anytype/07_getter.ts @@ -21,7 +21,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // 2.2 - transfer ownership of the token to the admin's SmartContractWallet // TODO: hardcode!!! - // 0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60 -> 0x045F756F248799F4413a026100Ae49e5E7F2031E + // 0xb87bbe9f9a0866b942b6587d74b06ed98dc1efb9 -> 0x60d728bC91EB32B1B20d0249bF1D000b34975fa3 const currentOwner = await nameToken.owner() console.log('NameToken current owner: ', currentOwner) @@ -43,11 +43,23 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } else { console.log('NameToken is already a payment option') } + + // 2.4 - check minter acccount of PrivateController + const cp = await ethers.getContract( + 'AnytypeRegistrarControllerPrivate', + deployer, + ) + const minter = await cp.minterAccount() + console.log('PrivateController minter: ', minter) } func.id = 'anytype-name-token2' func.tags = ['anytype', 'GETTER'] -func.dependencies = ['AnytypeRegistrarController', 'ERC20NameToken'] +func.dependencies = [ + 'AnytypeRegistrarController', + 'AnytypeRegistrarControllerPrivate', + 'ERC20NameToken', +] export default func diff --git a/deployments/sepolia/.migrations.json b/deployments/sepolia/.migrations.json index 8905924..bd14ff8 100644 --- a/deployments/sepolia/.migrations.json +++ b/deployments/sepolia/.migrations.json @@ -1,4 +1,4 @@ { - "ens": 1708438515, - "root": 1708438573 + "ens": 1712526625, + "root": 1712526686 } \ No newline at end of file diff --git a/deployments/sepolia/AnytypeNameWrapper.json b/deployments/sepolia/AnytypeNameWrapper.json index 4e2ad78..df74352 100644 --- a/deployments/sepolia/AnytypeNameWrapper.json +++ b/deployments/sepolia/AnytypeNameWrapper.json @@ -1,5 +1,5 @@ { - "address": "0x5fd7999d7d84b871F91662Cb6390f6162918515A", + "address": "0x1840D5416B9a60CA44e79Ff67E8771a1644Fd428", "abi": [ { "inputs": [ @@ -1455,69 +1455,69 @@ "type": "function" } ], - "transactionHash": "0x72ca7beec34f5ba3574023ef83c966fce1c2b1f93ec438de467480be550fe6e2", + "transactionHash": "0xd9ac436dded67250ee03115bb4422bde18fe08b738bca9c1eab0eab5920ff881", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x5fd7999d7d84b871F91662Cb6390f6162918515A", - "transactionIndex": 82, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x1840D5416B9a60CA44e79Ff67E8771a1644Fd428", + "transactionIndex": 64, "gasUsed": "5504399", - "logsBloom": "0x00000000000000000000000000000000000000000040000000800000000000002000000000100002080000000000000000000000000010001000000000011000000000002008000000000000008000200001000000000018000000000000000000000000020000000000000000000800004000400000000000000000000000400000000000000000000000040000000000000000000000200000000000000000000000000000000000400010000000800000000000000000008000040000000000000000000000000000000000005000000000000000000000000000000020000000000000000000000000000000001000000000003000000000000000000000", - "blockHash": "0x1acb37714279c32126fc491c8b1c543db6ef664d301f54af41790995a53baa4f", - "transactionHash": "0x72ca7beec34f5ba3574023ef83c966fce1c2b1f93ec438de467480be550fe6e2", + "logsBloom": "0x00002000000000020000000000000000000000000000000000800000000000000001000000001000000000000000000000000000100010000000040000080000000000000000000000000000008000400001000000000000000000000000010000000000820000080000400000000800000000000000000000800000000000400000000024000000000000000000000000000000000000200000000000000000000000002000400000000010000000000080000000004000008000040000000000000000000000000000000000005000000000000000400000000000000020000000000000004000000000000000000000000000001000000000000000000000", + "blockHash": "0x0e3580ccc629f3950db865d3ea11cccf2f65b6fee99a602797c616e089d757f8", + "transactionHash": "0xd9ac436dded67250ee03115bb4422bde18fe08b738bca9c1eab0eab5920ff881", "logs": [ { - "transactionIndex": 82, - "blockNumber": 5327834, - "transactionHash": "0x72ca7beec34f5ba3574023ef83c966fce1c2b1f93ec438de467480be550fe6e2", - "address": "0x5fd7999d7d84b871F91662Cb6390f6162918515A", + "transactionIndex": 64, + "blockNumber": 5650136, + "transactionHash": "0xd9ac436dded67250ee03115bb4422bde18fe08b738bca9c1eab0eab5920ff881", + "address": "0x1840D5416B9a60CA44e79Ff67E8771a1644Fd428", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", - "logIndex": 110, - "blockHash": "0x1acb37714279c32126fc491c8b1c543db6ef664d301f54af41790995a53baa4f" + "logIndex": 103, + "blockHash": "0x0e3580ccc629f3950db865d3ea11cccf2f65b6fee99a602797c616e089d757f8" }, { - "transactionIndex": 82, - "blockNumber": 5327834, - "transactionHash": "0x72ca7beec34f5ba3574023ef83c966fce1c2b1f93ec438de467480be550fe6e2", - "address": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", + "transactionIndex": 64, + "blockNumber": 5650136, + "transactionHash": "0xd9ac436dded67250ee03115bb4422bde18fe08b738bca9c1eab0eab5920ff881", + "address": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", "topics": [ "0x6ada868dd3058cf77a48a74489fd7963688e5464b2b0fa957ace976243270e92", - "0x0000000000000000000000005fd7999d7d84b871f91662cb6390f6162918515a", - "0x5a42b4159e54c4e06d5079a1b36a0cb715adf612d218e5060fbcb69b0e14178b" + "0x0000000000000000000000001840d5416b9a60ca44e79ff67e8771a1644fd428", + "0xcd5e7ba94f351d06b98ca1df5d6712597307c653d22cba296cac37b6e8dac7c4" ], "data": "0x", - "logIndex": 111, - "blockHash": "0x1acb37714279c32126fc491c8b1c543db6ef664d301f54af41790995a53baa4f" + "logIndex": 104, + "blockHash": "0x0e3580ccc629f3950db865d3ea11cccf2f65b6fee99a602797c616e089d757f8" }, { - "transactionIndex": 82, - "blockNumber": 5327834, - "transactionHash": "0x72ca7beec34f5ba3574023ef83c966fce1c2b1f93ec438de467480be550fe6e2", - "address": "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", + "transactionIndex": 64, + "blockNumber": 5650136, + "transactionHash": "0xd9ac436dded67250ee03115bb4422bde18fe08b738bca9c1eab0eab5920ff881", + "address": "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", "topics": [ "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", "0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2", - "0x640caf46e2b570fe849d32f28cb40a9c893a8c2e2d17c7998773220eec0bdc53" + "0xadf4ac815a64d5cf114ead13efeed039c14a76bebc4988d3a57c15b7f6aa4cf7" ], - "data": "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60", - "logIndex": 112, - "blockHash": "0x1acb37714279c32126fc491c8b1c543db6ef664d301f54af41790995a53baa4f" + "data": "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9", + "logIndex": 105, + "blockHash": "0x0e3580ccc629f3950db865d3ea11cccf2f65b6fee99a602797c616e089d757f8" } ], - "blockNumber": 5327834, - "cumulativeGasUsed": "12278177", + "blockNumber": 5650136, + "cumulativeGasUsed": "14190397", "status": 1, "byzantium": true }, "args": [ - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", - "0x42dEa7D082F38018bB3FAb9E4F9D822654f03b32", - "0xba6647fA7569ba5466E955bE3FFd1e476F16719A" + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", + "0xeFb15Cc3A6D496F54dcD112B29adF9fD0E03d2d4", + "0x2a1351f38E5842F57835326137C07b6DecEAc8d9" ], "numDeployments": 1, "solcInputHash": "cd6bf429cc4eb451b6820c60152496f5", diff --git a/deployments/sepolia/AnytypePriceOracle.json b/deployments/sepolia/AnytypePriceOracle.json index 40a0494..086f71f 100644 --- a/deployments/sepolia/AnytypePriceOracle.json +++ b/deployments/sepolia/AnytypePriceOracle.json @@ -1,5 +1,5 @@ { - "address": "0x9EfcBF46938c3a1B27608A2C599706093F9814dD", + "address": "0x690c620CB6E0B0c9a33A22077abF17E28F504e34", "abi": [ { "inputs": [ @@ -146,29 +146,29 @@ "type": "function" } ], - "transactionHash": "0xf74e23a9ccdb2b6b6ce7ba5aab8ad4d4b6df3d4de5aa97d2c6466aea85788c5e", + "transactionHash": "0x85be5289ea1efaf383bc48461fda232efc29793428805859489d17efe72cbd62", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x9EfcBF46938c3a1B27608A2C599706093F9814dD", - "transactionIndex": 74, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x690c620CB6E0B0c9a33A22077abF17E28F504e34", + "transactionIndex": 53, "gasUsed": "431683", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x9797343c53b3a1293c95bf35f2e439a7bf21702428588a08f2176bf46968b68b", - "transactionHash": "0xf74e23a9ccdb2b6b6ce7ba5aab8ad4d4b6df3d4de5aa97d2c6466aea85788c5e", + "blockHash": "0x987bdfaa6d2c010c482ee1583b8695aea552d8cb93702e146fd0f6336909f80a", + "transactionHash": "0x85be5289ea1efaf383bc48461fda232efc29793428805859489d17efe72cbd62", "logs": [], - "blockNumber": 5327839, - "cumulativeGasUsed": "14698477", + "blockNumber": 5650141, + "cumulativeGasUsed": "7884350", "status": 1, "byzantium": true }, "args": [ [ - 1000, - 1000, - 1000, - 1000, - 1000 + 7500, + 7500, + 7500, + 7500, + 7500 ] ], "numDeployments": 1, diff --git a/deployments/sepolia/AnytypeRegistrarController.json b/deployments/sepolia/AnytypeRegistrarController.json index 353316d..d009848 100644 --- a/deployments/sepolia/AnytypeRegistrarController.json +++ b/deployments/sepolia/AnytypeRegistrarController.json @@ -1,5 +1,5 @@ { - "address": "0x039bFf9e672aD4CEb2376F642f110898AA850dd8", + "address": "0x5c0931699A75Ab2947d50327Ff37100f9A192158", "abi": [ { "inputs": [ @@ -674,73 +674,73 @@ "type": "function" } ], - "transactionHash": "0x2b6c99f97ba9204b668faa962a9816357a2db93ab9e783cf656f032106c13dae", + "transactionHash": "0x48431f2992c40f2ca459cf7b8ef3a1fb01bc3a9aec32cf2dadd5d14f521d9cd2", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x039bFf9e672aD4CEb2376F642f110898AA850dd8", - "transactionIndex": 90, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x5c0931699A75Ab2947d50327Ff37100f9A192158", + "transactionIndex": 38, "gasUsed": "2065934", - "logsBloom": "0x000000000000000000000000820000000000000000400000008000000000000020000000001000020a0000002000000000000000000010000000000000001000002000000008000000000000808000200001000000000000100000000000000000000000020000000000000000000800000000400000000000000008000000400000000000000000000000000000000000000080000000200000000000000000000000000000000000000010000000000000000000000000028000040010000000000000000000000000000000005000000000000000000000000000000020000000000000000000000000000000000000000000001000000000000000000000", - "blockHash": "0x6c5081641b2701d6da7d34b58b115f52e7d185ca4c2b9851df00de4d175e4a3e", - "transactionHash": "0x2b6c99f97ba9204b668faa962a9816357a2db93ab9e783cf656f032106c13dae", + "logsBloom": "0x00002000000000000000000000000000000000000000000000800000000000000000000000000000000000000001000000000000000010000000040000000000000000000000000000000000008000000009000000000100000000000000210000000000820000000000000000000800000000000000008000800000000000400000000004000002000000000000000000000000000080220000000000000000000000000000000000000450000000000080000000004000008000040000000000000000000000000000000000005000000000000000400000000000000020000000000000000000000000000000040000000000401000000000000000000000", + "blockHash": "0xd458b945722f06cf5375e846718d752207c146d2ef408ea6db4b7caab119935c", + "transactionHash": "0x48431f2992c40f2ca459cf7b8ef3a1fb01bc3a9aec32cf2dadd5d14f521d9cd2", "logs": [ { - "transactionIndex": 90, - "blockNumber": 5327840, - "transactionHash": "0x2b6c99f97ba9204b668faa962a9816357a2db93ab9e783cf656f032106c13dae", - "address": "0x039bFf9e672aD4CEb2376F642f110898AA850dd8", + "transactionIndex": 38, + "blockNumber": 5650142, + "transactionHash": "0x48431f2992c40f2ca459cf7b8ef3a1fb01bc3a9aec32cf2dadd5d14f521d9cd2", + "address": "0x5c0931699A75Ab2947d50327Ff37100f9A192158", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", - "logIndex": 136, - "blockHash": "0x6c5081641b2701d6da7d34b58b115f52e7d185ca4c2b9851df00de4d175e4a3e" + "logIndex": 77, + "blockHash": "0xd458b945722f06cf5375e846718d752207c146d2ef408ea6db4b7caab119935c" }, { - "transactionIndex": 90, - "blockNumber": 5327840, - "transactionHash": "0x2b6c99f97ba9204b668faa962a9816357a2db93ab9e783cf656f032106c13dae", - "address": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", + "transactionIndex": 38, + "blockNumber": 5650142, + "transactionHash": "0x48431f2992c40f2ca459cf7b8ef3a1fb01bc3a9aec32cf2dadd5d14f521d9cd2", + "address": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", "topics": [ "0x6ada868dd3058cf77a48a74489fd7963688e5464b2b0fa957ace976243270e92", - "0x000000000000000000000000039bff9e672ad4ceb2376f642f110898aa850dd8", - "0x4e56063674658e30c84bd04a1913c4028f6c505b4d81530676d77db9d42a3b73" + "0x0000000000000000000000005c0931699a75ab2947d50327ff37100f9a192158", + "0xfdbe774d011ea1475a8b526ebc2b057c6d99ae6ed40e749e438aa0d43e4c0f97" ], "data": "0x", - "logIndex": 137, - "blockHash": "0x6c5081641b2701d6da7d34b58b115f52e7d185ca4c2b9851df00de4d175e4a3e" + "logIndex": 78, + "blockHash": "0xd458b945722f06cf5375e846718d752207c146d2ef408ea6db4b7caab119935c" }, { - "transactionIndex": 90, - "blockNumber": 5327840, - "transactionHash": "0x2b6c99f97ba9204b668faa962a9816357a2db93ab9e783cf656f032106c13dae", - "address": "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", + "transactionIndex": 38, + "blockNumber": 5650142, + "transactionHash": "0x48431f2992c40f2ca459cf7b8ef3a1fb01bc3a9aec32cf2dadd5d14f521d9cd2", + "address": "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", "topics": [ "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", "0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2", - "0xe3c6f4b5d2a4bd8d052edb67174016f6beff155664e2a43683d72e286d3829ae" + "0xc622464d898a9347ac535296b199d8946d51dfb19f5878e25bcb569f8d824871" ], - "data": "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60", - "logIndex": 138, - "blockHash": "0x6c5081641b2701d6da7d34b58b115f52e7d185ca4c2b9851df00de4d175e4a3e" + "data": "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9", + "logIndex": 79, + "blockHash": "0xd458b945722f06cf5375e846718d752207c146d2ef408ea6db4b7caab119935c" } ], - "blockNumber": 5327840, - "cumulativeGasUsed": "13847761", + "blockNumber": 5650142, + "cumulativeGasUsed": "6104583", "status": 1, "byzantium": true }, "args": [ - "0x42dEa7D082F38018bB3FAb9E4F9D822654f03b32", - "0x9EfcBF46938c3a1B27608A2C599706093F9814dD", + "0xeFb15Cc3A6D496F54dcD112B29adF9fD0E03d2d4", + "0x690c620CB6E0B0c9a33A22077abF17E28F504e34", 0, 86400, - "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", - "0x5fd7999d7d84b871F91662Cb6390f6162918515A", - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be" + "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", + "0x1840D5416B9a60CA44e79Ff67E8771a1644Fd428", + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab" ], "numDeployments": 1, "solcInputHash": "c4dcd6396bfd6dd2b492ee8485b2fe73", diff --git a/deployments/sepolia/AnytypeRegistrarControllerPrivate.json b/deployments/sepolia/AnytypeRegistrarControllerPrivate.json index edcbde0..2674a3c 100644 --- a/deployments/sepolia/AnytypeRegistrarControllerPrivate.json +++ b/deployments/sepolia/AnytypeRegistrarControllerPrivate.json @@ -1,5 +1,5 @@ { - "address": "0x582A09d4c2890F746fccFe1b66a7b1793a035d09", + "address": "0x9EA3c7cC6F17FE621598DbD7BCE560e46c6bA036", "abi": [ { "inputs": [ @@ -35,7 +35,12 @@ }, { "internalType": "address", - "name": "_additionalOwner", + "name": "_minterAccount", + "type": "address" + }, + { + "internalType": "address", + "name": "_minter2Account", "type": "address" } ], @@ -112,6 +117,31 @@ "name": "UnexpiredCommitmentExists", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "oldMinter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newMinter", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newMinter2", + "type": "address" + } + ], + "name": "MintersChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -200,19 +230,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "additionalOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -232,6 +249,24 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newMinter", + "type": "address" + }, + { + "internalType": "address", + "name": "newMinter2", + "type": "address" + } + ], + "name": "changeMinters", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -344,6 +379,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "minterAccount", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minterAccount2", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "nameWrapper", @@ -531,79 +592,80 @@ "type": "function" } ], - "transactionHash": "0xce8c17141302d1bafa19176eb91e57f8312ff4f1f2e0d3cd8b6acf4ac9363db2", + "transactionHash": "0x2962e6effe6299d711ef7ffa2824eecaf6dc07dd0f702c1a1750f25cd33c5914", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x582A09d4c2890F746fccFe1b66a7b1793a035d09", - "transactionIndex": 75, - "gasUsed": "1497422", - "logsBloom": "0x00000000000000000100000000000000000000000040000000800000000200002000000000100002080000000000000000000000000010000000000000001000000000000008000400000000028000200001000000000000000000000000000000000000020000000000000100000800000000400000000000000000000000400000000000000000000000000000000000000000000000200000000000000000000000000000000000000010000000000000000000000000008000040000000000100000000000000000020000005000000000000000000000000400000020000000000000000000000000100000000000000000001000010000000000008000", - "blockHash": "0x2df2bc325c58214aab694b8ba011e52e5d9fd6c6520d3d25d729c76118c92c4d", - "transactionHash": "0xce8c17141302d1bafa19176eb91e57f8312ff4f1f2e0d3cd8b6acf4ac9363db2", + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x9EA3c7cC6F17FE621598DbD7BCE560e46c6bA036", + "transactionIndex": 44, + "gasUsed": "1651469", + "logsBloom": "0x0000200000000000200000000000000000000000000000000080000000000000000000000000000000000000000000000000000000001000000004000000000000000000000000000000000000800000000100000000000000000000000001000000000082000000000000000000080000000000000000000080000000000040000000000400000000000000000000000000000000000020000000000000800000000000000000000020001000000000008000000000c000008100040000000000080000000000000000000000005000080010000000400000000800000020000000000000000000000000000000000000000000003000000000000000000000", + "blockHash": "0x8fd0a1b8567dfe3e94fde9ff78afc77a707b7b3233fbc1812bd40c151b117b86", + "transactionHash": "0x2962e6effe6299d711ef7ffa2824eecaf6dc07dd0f702c1a1750f25cd33c5914", "logs": [ { - "transactionIndex": 75, - "blockNumber": 5327836, - "transactionHash": "0xce8c17141302d1bafa19176eb91e57f8312ff4f1f2e0d3cd8b6acf4ac9363db2", - "address": "0x582A09d4c2890F746fccFe1b66a7b1793a035d09", + "transactionIndex": 44, + "blockNumber": 5650138, + "transactionHash": "0x2962e6effe6299d711ef7ffa2824eecaf6dc07dd0f702c1a1750f25cd33c5914", + "address": "0x9EA3c7cC6F17FE621598DbD7BCE560e46c6bA036", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", - "logIndex": 101, - "blockHash": "0x2df2bc325c58214aab694b8ba011e52e5d9fd6c6520d3d25d729c76118c92c4d" + "logIndex": 112, + "blockHash": "0x8fd0a1b8567dfe3e94fde9ff78afc77a707b7b3233fbc1812bd40c151b117b86" }, { - "transactionIndex": 75, - "blockNumber": 5327836, - "transactionHash": "0xce8c17141302d1bafa19176eb91e57f8312ff4f1f2e0d3cd8b6acf4ac9363db2", - "address": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", + "transactionIndex": 44, + "blockNumber": 5650138, + "transactionHash": "0x2962e6effe6299d711ef7ffa2824eecaf6dc07dd0f702c1a1750f25cd33c5914", + "address": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", "topics": [ "0x6ada868dd3058cf77a48a74489fd7963688e5464b2b0fa957ace976243270e92", - "0x000000000000000000000000582a09d4c2890f746fccfe1b66a7b1793a035d09", - "0xb73a347ecee45cb149e4a70ca9943008c40744359e100f1aa9745a8a521d31dd" + "0x0000000000000000000000009ea3c7cc6f17fe621598dbd7bce560e46c6ba036", + "0xca7069b8e7ab8fb1405a0c66cb34a881b3140a8ef633146f8fdbf9b541dd1806" ], "data": "0x", - "logIndex": 102, - "blockHash": "0x2df2bc325c58214aab694b8ba011e52e5d9fd6c6520d3d25d729c76118c92c4d" + "logIndex": 113, + "blockHash": "0x8fd0a1b8567dfe3e94fde9ff78afc77a707b7b3233fbc1812bd40c151b117b86" }, { - "transactionIndex": 75, - "blockNumber": 5327836, - "transactionHash": "0xce8c17141302d1bafa19176eb91e57f8312ff4f1f2e0d3cd8b6acf4ac9363db2", - "address": "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", + "transactionIndex": 44, + "blockNumber": 5650138, + "transactionHash": "0x2962e6effe6299d711ef7ffa2824eecaf6dc07dd0f702c1a1750f25cd33c5914", + "address": "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", "topics": [ "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", "0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2", - "0x23d9bf6c1ef4daf17250d3e286434900968b11c66d9aaf7360d5aba4bbfdf791" + "0x0cf8410a8d258806936c87e688a7167395c0f615d23378607ed5512759e0ed75" ], - "data": "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60", - "logIndex": 103, - "blockHash": "0x2df2bc325c58214aab694b8ba011e52e5d9fd6c6520d3d25d729c76118c92c4d" + "data": "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9", + "logIndex": 114, + "blockHash": "0x8fd0a1b8567dfe3e94fde9ff78afc77a707b7b3233fbc1812bd40c151b117b86" } ], - "blockNumber": 5327836, - "cumulativeGasUsed": "8202399", + "blockNumber": 5650138, + "cumulativeGasUsed": "7903873", "status": 1, "byzantium": true }, "args": [ - "0x42dEa7D082F38018bB3FAb9E4F9D822654f03b32", + "0xeFb15Cc3A6D496F54dcD112B29adF9fD0E03d2d4", 0, 86400, - "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", - "0x5fd7999d7d84b871F91662Cb6390f6162918515A", - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", - "0x045F756F248799F4413a026100Ae49e5E7F2031E" + "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", + "0x1840D5416B9a60CA44e79Ff67E8771a1644Fd428", + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", + "0xbad4f0a63bf6ff5b165866b6953a3b67df49f211", + "0x48d9872A78e798856c26CC03c68D19db1c633049" ], "numDeployments": 1, - "solcInputHash": "465f7599d1c4574a9ae14cd482541e20", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract AnytypeRegistrarImplementation\",\"name\":\"_base\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minCommitmentAge\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxCommitmentAge\",\"type\":\"uint256\"},{\"internalType\":\"contract ReverseRegistrar\",\"name\":\"_reverseRegistrar\",\"type\":\"address\"},{\"internalType\":\"contract INameWrapper\",\"name\":\"_nameWrapper\",\"type\":\"address\"},{\"internalType\":\"contract ENS\",\"name\":\"_ens\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_additionalOwner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"CommitmentTooNew\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"CommitmentTooOld\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationTooShort\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCommitmentAgeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCommitmentAgeTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NameNotAvailable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ResolverRequiredWhenDataSupplied\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"UnexpiredCommitmentExists\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"NameRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"NameRenewed\",\"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\"},{\"inputs\":[],\"name\":\"MIN_REGISTRATION_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"additionalOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"available\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"reverseRecord\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"ownerControlledFuses\",\"type\":\"uint16\"}],\"name\":\"makeCommitment\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxCommitmentAge\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minCommitmentAge\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameWrapper\",\"outputs\":[{\"internalType\":\"contract INameWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"reverseRecord\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"ownerControlledFuses\",\"type\":\"uint16\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"renew\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reverseRegistrar\",\"outputs\":[{\"internalType\":\"contract ReverseRegistrar\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"valid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"recoverFunds(address,address,uint256)\":{\"details\":\"The contract is Ownable and only the owner can call the recover function.\",\"params\":{\"_amount\":\"The amount of tokens to recover.\",\"_to\":\"The address to send the tokens to.\",\"_token\":\"The address of the ERC20 token to recover\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"recoverFunds(address,address,uint256)\":{\"notice\":\"Recover ERC20 tokens sent to the contract by mistake.\"}},\"notice\":\"This is a fork/copy of the ENS registrar controller with the following changes: .any TLD is used instead of .eth Owner of this contract can register any name without a payment on behalf/for other users.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/anytype/AnytypeRegistrarControllerPrivate.sol\":\"AnytypeRegistrarControllerPrivate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1300},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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: address zero is not a valid owner\\\");\\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 = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\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 _requireMinted(tokenId);\\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 overridden 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 token owner or 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 _requireMinted(tokenId);\\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(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or 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(address from, address to, uint256 tokenId, bytes memory data) 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\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 _ownerOf(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 address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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(address to, uint256 tokenId, bytes memory data) 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, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\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, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\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(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {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 an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) 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 Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\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 /// @solidity memory-safe-assembly\\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 and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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`.\\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(address from, address to, uint256 tokenId, bytes calldata data) external;\\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 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(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\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(address from, address to, uint256 tokenId) 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 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 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 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\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.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\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"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\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, \\\"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(address target, bytes memory data, uint256 value) 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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\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 unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\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 unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\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] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"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\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"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\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/anytype/AnytypeRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"./IAnytypeRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * Each registrar simply controls one top level domain, such as \\\".any\\\"\\n */\\ncontract AnytypeRegistrarImplementation is ERC721, IAnytypeRegistrar, Ownable {\\n // A map of expiry times\\n mapping(uint256 => uint256) expiries;\\n // The ENS registry\\n ENS public ens;\\n // The namehash of the TLD this registrar owns (eg, .any)\\n bytes32 public baseNode;\\n // A map of addresses that are authorised to register and renew names.\\n mapping(address => bool) public controllers;\\n\\n uint256 public constant GRACE_PERIOD = 90 days;\\n bytes4 private constant INTERFACE_META_ID =\\n bytes4(keccak256(\\\"supportsInterface(bytes4)\\\"));\\n\\n bytes4 private constant ERC721_ID =\\n bytes4(\\n keccak256(\\\"balanceOf(address)\\\") ^\\n keccak256(\\\"ownerOf(uint256)\\\") ^\\n keccak256(\\\"approve(address,uint256)\\\") ^\\n keccak256(\\\"getApproved(uint256)\\\") ^\\n keccak256(\\\"setApprovalForAll(address,bool)\\\") ^\\n keccak256(\\\"isApprovedForAll(address,address)\\\") ^\\n keccak256(\\\"transferFrom(address,address,uint256)\\\") ^\\n keccak256(\\\"safeTransferFrom(address,address,uint256)\\\") ^\\n keccak256(\\\"safeTransferFrom(address,address,uint256,bytes)\\\")\\n );\\n\\n bytes4 private constant RECLAIM_ID =\\n bytes4(keccak256(\\\"reclaim(uint256,address)\\\"));\\n\\n /**\\n * v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);\\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187\\n * @dev Returns whether the given spender can transfer a given token ID\\n * @param spender address of the spender to query\\n * @param tokenId uint256 ID of the token to be transferred\\n * @return bool whether the msg.sender is approved for the given token ID,\\n * is an operator of the owner, or is the owner of the token\\n */\\n function _isApprovedOrOwner(\\n address spender,\\n uint256 tokenId\\n ) internal view override returns (bool) {\\n address owner = ownerOf(tokenId);\\n return (spender == owner ||\\n getApproved(tokenId) == spender ||\\n isApprovedForAll(owner, spender));\\n }\\n\\n constructor(ENS _ens, bytes32 _baseNode) ERC721(\\\"\\\", \\\"\\\") {\\n ens = _ens;\\n baseNode = _baseNode;\\n }\\n\\n modifier live() {\\n require(ens.owner(baseNode) == address(this));\\n _;\\n }\\n\\n modifier onlyController() {\\n require(controllers[msg.sender]);\\n _;\\n }\\n\\n /**\\n * @dev Gets the owner of the specified token ID. Names become unowned\\n * when their registration expires.\\n * @param tokenId uint256 ID of the token to query the owner of\\n * @return address currently marked as the owner of the given token ID\\n */\\n function ownerOf(\\n uint256 tokenId\\n ) public view override(IERC721, ERC721) returns (address) {\\n require(expiries[tokenId] > block.timestamp);\\n return super.ownerOf(tokenId);\\n }\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external override onlyOwner {\\n controllers[controller] = true;\\n emit ControllerAdded(controller);\\n }\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external override onlyOwner {\\n controllers[controller] = false;\\n emit ControllerRemoved(controller);\\n }\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external override onlyOwner {\\n ens.setResolver(baseNode, resolver);\\n }\\n\\n // Returns the expiration timestamp of the specified id.\\n function nameExpires(uint256 id) external view override returns (uint256) {\\n return expiries[id];\\n }\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) public view override returns (bool) {\\n // Not available if it's registered here or in its grace period.\\n return expiries[id] + GRACE_PERIOD < block.timestamp;\\n }\\n\\n /**\\n * @dev Register a name.\\n * @param id The token ID (keccak256 of the label).\\n * @param owner The address that should own the registration.\\n * @param duration Duration in seconds for the registration.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external override returns (uint256) {\\n return _register(id, owner, duration, true);\\n }\\n\\n /**\\n * @dev Register a name, without modifying the registry.\\n * @param id The token ID (keccak256 of the label).\\n * @param owner The address that should own the registration.\\n * @param duration Duration in seconds for the registration.\\n */\\n function registerOnly(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256) {\\n return _register(id, owner, duration, false);\\n }\\n\\n function _register(\\n uint256 id,\\n address owner,\\n uint256 duration,\\n bool updateRegistry\\n ) internal live onlyController returns (uint256) {\\n require(available(id));\\n require(\\n block.timestamp + duration + GRACE_PERIOD >\\n block.timestamp + GRACE_PERIOD\\n ); // Prevent future overflow\\n\\n expiries[id] = block.timestamp + duration;\\n if (_exists(id)) {\\n // Name was previously owned, and expired\\n _burn(id);\\n }\\n _mint(owner, id);\\n if (updateRegistry) {\\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\\n }\\n\\n emit NameRegistered(id, owner, block.timestamp + duration);\\n\\n return block.timestamp + duration;\\n }\\n\\n function renew(\\n uint256 id,\\n uint256 duration\\n ) external override live onlyController returns (uint256) {\\n require(expiries[id] + GRACE_PERIOD >= block.timestamp); // Name must be registered here or in grace period\\n require(\\n expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD\\n ); // Prevent future overflow\\n\\n expiries[id] += duration;\\n emit NameRenewed(id, expiries[id]);\\n return expiries[id];\\n }\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external override live {\\n require(_isApprovedOrOwner(msg.sender, id));\\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view override(ERC721, IERC165) returns (bool) {\\n return\\n interfaceID == INTERFACE_META_ID ||\\n interfaceID == ERC721_ID ||\\n interfaceID == RECLAIM_ID;\\n }\\n}\\n\",\"keccak256\":\"0x495ee998f7f439351f12f6c28d4a0f2a7829d76b4ddd9adc3c0bfcd8682ddab2\"},\"contracts/anytype/AnytypeRegistrarControllerPrivate.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport {AnytypeRegistrarImplementation} from \\\"./AnytypeRegistrar.sol\\\";\\nimport {StringUtils} from \\\"../ethregistrar/StringUtils.sol\\\";\\nimport {Resolver} from \\\"../resolvers/Resolver.sol\\\";\\nimport {ENS} from \\\"../registry/ENS.sol\\\";\\nimport {ReverseRegistrar} from \\\"../reverseRegistrar/ReverseRegistrar.sol\\\";\\nimport {ReverseClaimer} from \\\"../reverseRegistrar/ReverseClaimer.sol\\\";\\nimport {IAnytypeRegistrarControllerPrivate} from \\\"./IAnytypeRegistrarControllerPrivate.sol\\\";\\n\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {INameWrapper} from \\\"../wrapper/INameWrapper.sol\\\";\\nimport {ERC20Recoverable} from \\\"../utils/ERC20Recoverable.sol\\\";\\n\\nerror CommitmentTooNew(bytes32 commitment);\\nerror CommitmentTooOld(bytes32 commitment);\\nerror NameNotAvailable(string name);\\nerror DurationTooShort(uint256 duration);\\nerror ResolverRequiredWhenDataSupplied();\\nerror UnexpiredCommitmentExists(bytes32 commitment);\\nerror InsufficientValue();\\nerror Unauthorised(bytes32 node);\\nerror MaxCommitmentAgeTooLow();\\nerror MaxCommitmentAgeTooHigh();\\n\\n/**\\n * This is a fork/copy of the ENS registrar controller with the following changes:\\n * .any TLD is used instead of .eth\\n * Owner of this contract can register any name without a payment on behalf/for other users.\\n */\\ncontract AnytypeRegistrarControllerPrivate is\\n Ownable,\\n IAnytypeRegistrarControllerPrivate,\\n IERC165,\\n ERC20Recoverable,\\n ReverseClaimer\\n{\\n using StringUtils for *;\\n using Address for address;\\n\\n uint256 public constant MIN_REGISTRATION_DURATION = 28 days;\\n\\n // any type namehash\\n // use 'namehash' function to get namehash in your JS code\\n bytes32 private constant ANY_NODE =\\n 0xe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463;\\n\\n uint64 private constant MAX_EXPIRY = type(uint64).max;\\n AnytypeRegistrarImplementation immutable base;\\n\\n // in seconds\\n uint256 public immutable minCommitmentAge;\\n uint256 public immutable maxCommitmentAge;\\n ReverseRegistrar public immutable reverseRegistrar;\\n INameWrapper public immutable nameWrapper;\\n\\n address public immutable additionalOwner;\\n\\n mapping(bytes32 => uint256) public commitments;\\n\\n event NameRegistered(\\n string name,\\n bytes32 indexed label,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(string name, bytes32 indexed label, uint256 expires);\\n\\n function _checkOwner() internal view virtual override {\\n require(owner() == _msgSender() || additionalOwner == _msgSender(), \\\"Ownable: caller is not the owner1 or owner2\\\");\\n }\\n\\n constructor(\\n AnytypeRegistrarImplementation _base,\\n uint256 _minCommitmentAge,\\n uint256 _maxCommitmentAge,\\n ReverseRegistrar _reverseRegistrar,\\n INameWrapper _nameWrapper,\\n ENS _ens,\\n address _additionalOwner\\n ) ReverseClaimer(_ens, msg.sender) {\\n if (_maxCommitmentAge <= _minCommitmentAge) {\\n revert MaxCommitmentAgeTooLow();\\n }\\n\\n if (_maxCommitmentAge > block.timestamp) {\\n revert MaxCommitmentAgeTooHigh();\\n }\\n\\n base = _base;\\n minCommitmentAge = _minCommitmentAge;\\n maxCommitmentAge = _maxCommitmentAge;\\n reverseRegistrar = _reverseRegistrar;\\n nameWrapper = _nameWrapper;\\n additionalOwner = _additionalOwner;\\n }\\n\\n function valid(string memory name) public pure returns (bool) {\\n return name.strlen() >= 3;\\n }\\n\\n function available(string memory name) public view override returns (bool) {\\n bytes32 label = keccak256(bytes(name));\\n return valid(name) && base.available(uint256(label));\\n }\\n\\n function makeCommitment(\\n string memory name,\\n address owner,\\n uint256 duration,\\n bytes32 secret,\\n address resolver,\\n bytes[] calldata data,\\n bool reverseRecord,\\n uint16 ownerControlledFuses\\n ) public view override onlyOwner returns (bytes32) {\\n bytes32 label = keccak256(bytes(name));\\n if (data.length > 0 && resolver == address(0)) {\\n revert ResolverRequiredWhenDataSupplied();\\n }\\n return\\n keccak256(\\n abi.encode(\\n label,\\n owner,\\n duration,\\n secret,\\n resolver,\\n data,\\n reverseRecord,\\n ownerControlledFuses\\n )\\n );\\n }\\n\\n function commit(bytes32 commitment) public override onlyOwner {\\n if (commitments[commitment] + maxCommitmentAge >= block.timestamp) {\\n revert UnexpiredCommitmentExists(commitment);\\n }\\n commitments[commitment] = block.timestamp;\\n }\\n\\n function register(\\n string calldata name,\\n address owner,\\n uint256 duration,\\n bytes32 secret,\\n address resolver,\\n bytes[] calldata data,\\n bool reverseRecord,\\n uint16 ownerControlledFuses\\n ) public override onlyOwner {\\n _consumeCommitment(\\n name,\\n duration,\\n makeCommitment(\\n name,\\n owner,\\n duration,\\n secret,\\n resolver,\\n data,\\n reverseRecord,\\n ownerControlledFuses\\n )\\n );\\n\\n uint256 expires = nameWrapper.registerAndWrapETH2LD(\\n name,\\n owner,\\n duration,\\n resolver,\\n ownerControlledFuses\\n );\\n\\n if (data.length > 0) {\\n _setRecords(resolver, keccak256(bytes(name)), data);\\n }\\n\\n if (reverseRecord) {\\n _setReverseRecord(name, resolver, owner);\\n }\\n\\n emit NameRegistered(name, keccak256(bytes(name)), owner, expires);\\n }\\n\\n function renew(\\n string calldata name,\\n uint256 duration\\n ) external override onlyOwner {\\n bytes32 labelhash = keccak256(bytes(name));\\n uint256 tokenId = uint256(labelhash);\\n\\n uint256 expires = nameWrapper.renew(tokenId, duration);\\n\\n emit NameRenewed(name, labelhash, expires);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) external pure returns (bool) {\\n return\\n interfaceID == type(IERC165).interfaceId ||\\n interfaceID == type(IAnytypeRegistrarControllerPrivate).interfaceId;\\n }\\n\\n /* Internal functions */\\n function _consumeCommitment(\\n string memory name,\\n uint256 duration,\\n bytes32 commitment\\n ) internal {\\n // Require an old enough commitment.\\n if (commitments[commitment] + minCommitmentAge > block.timestamp) {\\n revert CommitmentTooNew(commitment);\\n }\\n\\n // If the commitment is too old, or the name is registered, stop\\n if (commitments[commitment] + maxCommitmentAge <= block.timestamp) {\\n revert CommitmentTooOld(commitment);\\n }\\n if (!available(name)) {\\n revert NameNotAvailable(name);\\n }\\n\\n delete (commitments[commitment]);\\n\\n if (duration < MIN_REGISTRATION_DURATION) {\\n revert DurationTooShort(duration);\\n }\\n }\\n\\n function _setRecords(\\n address resolverAddress,\\n bytes32 label,\\n bytes[] calldata data\\n ) internal {\\n // use hardcoded .any namehash\\n bytes32 nodehash = keccak256(abi.encodePacked(ANY_NODE, label));\\n Resolver resolver = Resolver(resolverAddress);\\n resolver.multicallWithNodeCheck(nodehash, data);\\n }\\n\\n function _setReverseRecord(\\n string memory name,\\n address resolver,\\n address owner\\n ) internal {\\n reverseRegistrar.setNameForAddr(\\n owner,\\n owner,\\n resolver,\\n string.concat(name, \\\".any\\\")\\n );\\n }\\n}\\n\",\"keccak256\":\"0xf8b22269cb7c12a69da7b95c76ff82d5d3d2d038a7306fd7900b335cc18380f4\",\"license\":\"MIT\"},\"contracts/anytype/IAnytypeRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IAnytypeRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x35b8ebf24b17b1dca1550ba969b4ee46a783c6482ca7a29fb2614d42eb99a463\"},\"contracts/anytype/IAnytypeRegistrarControllerPrivate.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IAnytypeRegistrarControllerPrivate {\\n function available(string memory) external returns (bool);\\n\\n function makeCommitment(\\n string memory,\\n address,\\n uint256,\\n bytes32,\\n address,\\n bytes[] calldata,\\n bool,\\n uint16\\n ) external view returns (bytes32);\\n\\n function commit(bytes32) external;\\n\\n function register(\\n string calldata,\\n address,\\n uint256,\\n bytes32,\\n address,\\n bytes[] calldata,\\n bool,\\n uint16\\n ) external;\\n\\n function renew(string calldata, uint256) external;\\n}\\n\",\"keccak256\":\"0xc60e5c5a981cb3fc45040c049fa34b9de3c45f72ae416129123400a2dd4cfdc2\",\"license\":\"MIT\"},\"contracts/ethregistrar/IBaseRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"./IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBaseRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n event NameMigrated(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x15f7b1dfa7cd34444daf79ec9b4d40437caa9257893ce0639d706fcc2ba69e52\"},\"contracts/ethregistrar/StringUtils.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nlibrary StringUtils {\\n /**\\n * @dev Returns the length of a given string\\n *\\n * @param s The string to measure the length of\\n * @return The length of the input string\\n */\\n function strlen(string memory s) internal pure returns (uint256) {\\n uint256 len;\\n uint256 i = 0;\\n uint256 bytelength = bytes(s).length;\\n for (len = 0; i < bytelength; len++) {\\n bytes1 b = bytes(s)[i];\\n if (b < 0x80) {\\n i += 1;\\n } else if (b < 0xE0) {\\n i += 2;\\n } else if (b < 0xF0) {\\n i += 3;\\n } else if (b < 0xF8) {\\n i += 4;\\n } else if (b < 0xFC) {\\n i += 5;\\n } else {\\n i += 6;\\n }\\n }\\n return len;\\n }\\n}\\n\",\"keccak256\":\"0x4cc8363a850dc9130c433ee50e7c97e29a45ae5d9bd0808205ac7134b34f24e4\"},\"contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"contracts/resolvers/Resolver.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"./profiles/IABIResolver.sol\\\";\\nimport \\\"./profiles/IAddressResolver.sol\\\";\\nimport \\\"./profiles/IAddrResolver.sol\\\";\\nimport \\\"./profiles/IContentHashResolver.sol\\\";\\nimport \\\"./profiles/IDNSRecordResolver.sol\\\";\\nimport \\\"./profiles/IDNSZoneResolver.sol\\\";\\nimport \\\"./profiles/IInterfaceResolver.sol\\\";\\nimport \\\"./profiles/INameResolver.sol\\\";\\nimport \\\"./profiles/IPubkeyResolver.sol\\\";\\nimport \\\"./profiles/ITextResolver.sol\\\";\\nimport \\\"./profiles/IExtendedResolver.sol\\\";\\n\\n/**\\n * A generic resolver interface which includes all the functions including the ones deprecated\\n */\\ninterface Resolver is\\n IERC165,\\n IABIResolver,\\n IAddressResolver,\\n IAddrResolver,\\n IContentHashResolver,\\n IDNSRecordResolver,\\n IDNSZoneResolver,\\n IInterfaceResolver,\\n INameResolver,\\n IPubkeyResolver,\\n ITextResolver,\\n IExtendedResolver\\n{\\n /* Deprecated events */\\n event ContentChanged(bytes32 indexed node, bytes32 hash);\\n\\n function setApprovalForAll(address, bool) external;\\n\\n function approve(bytes32 node, address delegate, bool approved) external;\\n\\n function isApprovedForAll(address account, address operator) external;\\n\\n function isApprovedFor(\\n address owner,\\n bytes32 node,\\n address delegate\\n ) external;\\n\\n function setABI(\\n bytes32 node,\\n uint256 contentType,\\n bytes calldata data\\n ) external;\\n\\n function setAddr(bytes32 node, address addr) external;\\n\\n function setAddr(bytes32 node, uint256 coinType, bytes calldata a) external;\\n\\n function setContenthash(bytes32 node, bytes calldata hash) external;\\n\\n function setDnsrr(bytes32 node, bytes calldata data) external;\\n\\n function setName(bytes32 node, string calldata _name) external;\\n\\n function setPubkey(bytes32 node, bytes32 x, bytes32 y) external;\\n\\n function setText(\\n bytes32 node,\\n string calldata key,\\n string calldata value\\n ) external;\\n\\n function setInterface(\\n bytes32 node,\\n bytes4 interfaceID,\\n address implementer\\n ) external;\\n\\n function multicall(\\n bytes[] calldata data\\n ) external returns (bytes[] memory results);\\n\\n function multicallWithNodeCheck(\\n bytes32 nodehash,\\n bytes[] calldata data\\n ) external returns (bytes[] memory results);\\n\\n /* Deprecated functions */\\n function content(bytes32 node) external view returns (bytes32);\\n\\n function multihash(bytes32 node) external view returns (bytes memory);\\n\\n function setContent(bytes32 node, bytes32 hash) external;\\n\\n function setMultihash(bytes32 node, bytes calldata hash) external;\\n}\\n\",\"keccak256\":\"0xfc77ab6b7c59c3ebfe1c720bdebf9b08c2488ff7ac9501a9aa056c5d6d5b50c5\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IABIResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IABIResolver {\\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\\n\\n /**\\n * Returns the ABI associated with an ENS node.\\n * Defined in EIP205.\\n * @param node The ENS node to query\\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\\n * @return contentType The content type of the return value\\n * @return data The ABI data\\n */\\n function ABI(\\n bytes32 node,\\n uint256 contentTypes\\n ) external view returns (uint256, bytes memory);\\n}\\n\",\"keccak256\":\"0x85b373d02d19374fe570af407f459768285704bf7f30ab17c30eabfb5a10e4c3\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IAddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the legacy (ETH-only) addr function.\\n */\\ninterface IAddrResolver {\\n event AddrChanged(bytes32 indexed node, address a);\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(bytes32 node) external view returns (address payable);\\n}\\n\",\"keccak256\":\"0x2ad7f2fc60ebe0f93745fe70247f6a854f66af732483fda2a3c5e055614445e8\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the new (multicoin) addr function.\\n */\\ninterface IAddressResolver {\\n event AddressChanged(\\n bytes32 indexed node,\\n uint256 coinType,\\n bytes newAddress\\n );\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x411447c1e90c51e09702815a85ec725ffbbe37cf96e8cc4d2a8bd4ad8a59d73e\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IContentHashResolver {\\n event ContenthashChanged(bytes32 indexed node, bytes hash);\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xd95cd77684ba5752c428d7dceb4ecc6506ac94f4fbb910489637eb68dcd8e366\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IDNSRecordResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IDNSRecordResolver {\\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\\n event DNSRecordChanged(\\n bytes32 indexed node,\\n bytes name,\\n uint16 resource,\\n bytes record\\n );\\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\\n\\n /**\\n * Obtain a DNS record.\\n * @param node the namehash of the node for which to fetch the record\\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\\n * @return the DNS record in wire format if present, otherwise empty\\n */\\n function dnsRecord(\\n bytes32 node,\\n bytes32 name,\\n uint16 resource\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xcfa52200edd337f2c6c5bf402352600584da033b21323603e53de33051a3e25d\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IDNSZoneResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IDNSZoneResolver {\\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\\n event DNSZonehashChanged(\\n bytes32 indexed node,\\n bytes lastzonehash,\\n bytes zonehash\\n );\\n\\n /**\\n * zonehash obtains the hash for the zone.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function zonehash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xca1b3a16e7005533f2800a3e66fcdccf7c574deac7913d8c810f40aec1d58dc0\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IInterfaceResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IInterfaceResolver {\\n event InterfaceChanged(\\n bytes32 indexed node,\\n bytes4 indexed interfaceID,\\n address implementer\\n );\\n\\n /**\\n * Returns the address of a contract that implements the specified interface for this name.\\n * If an implementer has not been set for this interfaceID and name, the resolver will query\\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\\n * will be returned.\\n * @param node The ENS node to query.\\n * @param interfaceID The EIP 165 interface ID to check for.\\n * @return The address that implements this interface, or 0 if the interface is unsupported.\\n */\\n function interfaceImplementer(\\n bytes32 node,\\n bytes4 interfaceID\\n ) external view returns (address);\\n}\\n\",\"keccak256\":\"0x390321fb58f7b927df9562450981e74b4be3907e7c09df321fd3b7409b63ae28\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IPubkeyResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IPubkeyResolver {\\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\\n\\n /**\\n * Returns the SECP256k1 public key associated with an ENS node.\\n * Defined in EIP 619.\\n * @param node The ENS node to query\\n * @return x The X coordinate of the curve point for the public key.\\n * @return y The Y coordinate of the curve point for the public key.\\n */\\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\\n}\\n\",\"keccak256\":\"0x69748947093dd2fda9ddcebd0adf19a6d1e7600df1d4b1462a0417156caddca7\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"contracts/reverseRegistrar/IReverseRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IReverseRegistrar {\\n function setDefaultResolver(address resolver) external;\\n\\n function claim(address owner) external returns (bytes32);\\n\\n function claimForAddr(\\n address addr,\\n address owner,\\n address resolver\\n ) external returns (bytes32);\\n\\n function claimWithResolver(\\n address owner,\\n address resolver\\n ) external returns (bytes32);\\n\\n function setName(string memory name) external returns (bytes32);\\n\\n function setNameForAddr(\\n address addr,\\n address owner,\\n address resolver,\\n string memory name\\n ) external returns (bytes32);\\n\\n function node(address addr) external pure returns (bytes32);\\n}\\n\",\"keccak256\":\"0x83adfcf6da72b1bcd1e3ac387afe5fc7fdf7f2ac28b7601544d2ca4b9d45d159\"},\"contracts/reverseRegistrar/ReverseClaimer.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.17 <0.9.0;\\n\\nimport {ENS} from \\\"../registry/ENS.sol\\\";\\nimport {IReverseRegistrar} from \\\"../reverseRegistrar/IReverseRegistrar.sol\\\";\\n\\ncontract ReverseClaimer {\\n bytes32 constant ADDR_REVERSE_NODE =\\n 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n constructor(ENS ens, address claimant) {\\n IReverseRegistrar reverseRegistrar = IReverseRegistrar(\\n ens.owner(ADDR_REVERSE_NODE)\\n );\\n reverseRegistrar.claim(claimant);\\n }\\n}\\n\",\"keccak256\":\"0x78a28627241535b595f6fff476a1fa7acc90c80684fe7784734920fc8af6fc22\",\"license\":\"MIT\"},\"contracts/reverseRegistrar/ReverseRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"./IReverseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../root/Controllable.sol\\\";\\n\\nabstract contract NameResolver {\\n function setName(bytes32 node, string memory name) public virtual;\\n}\\n\\nbytes32 constant lookup = 0x3031323334353637383961626364656600000000000000000000000000000000;\\n\\nbytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n// namehash('addr.reverse')\\n\\ncontract ReverseRegistrar is Ownable, Controllable, IReverseRegistrar {\\n ENS public immutable ens;\\n NameResolver public defaultResolver;\\n\\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\\n event DefaultResolverChanged(NameResolver indexed resolver);\\n\\n /**\\n * @dev Constructor\\n * @param ensAddr The address of the ENS registry.\\n */\\n constructor(ENS ensAddr) {\\n ens = ensAddr;\\n\\n // Assign ownership of the reverse record to our deployer\\n ReverseRegistrar oldRegistrar = ReverseRegistrar(\\n ensAddr.owner(ADDR_REVERSE_NODE)\\n );\\n if (address(oldRegistrar) != address(0x0)) {\\n oldRegistrar.claim(msg.sender);\\n }\\n }\\n\\n modifier authorised(address addr) {\\n require(\\n addr == msg.sender ||\\n controllers[msg.sender] ||\\n ens.isApprovedForAll(addr, msg.sender) ||\\n ownsContract(addr),\\n \\\"ReverseRegistrar: Caller is not a controller or authorised by address or the address itself\\\"\\n );\\n _;\\n }\\n\\n function setDefaultResolver(address resolver) public override onlyOwner {\\n require(\\n address(resolver) != address(0),\\n \\\"ReverseRegistrar: Resolver address must not be 0\\\"\\n );\\n defaultResolver = NameResolver(resolver);\\n emit DefaultResolverChanged(NameResolver(resolver));\\n }\\n\\n /**\\n * @dev Transfers ownership of the reverse ENS record associated with the\\n * calling account.\\n * @param owner The address to set as the owner of the reverse record in ENS.\\n * @return The ENS node hash of the reverse record.\\n */\\n function claim(address owner) public override returns (bytes32) {\\n return claimForAddr(msg.sender, owner, address(defaultResolver));\\n }\\n\\n /**\\n * @dev Transfers ownership of the reverse ENS record associated with the\\n * calling account.\\n * @param addr The reverse record to set\\n * @param owner The address to set as the owner of the reverse record in ENS.\\n * @param resolver The resolver of the reverse node\\n * @return The ENS node hash of the reverse record.\\n */\\n function claimForAddr(\\n address addr,\\n address owner,\\n address resolver\\n ) public override authorised(addr) returns (bytes32) {\\n bytes32 labelHash = sha3HexAddress(addr);\\n bytes32 reverseNode = keccak256(\\n abi.encodePacked(ADDR_REVERSE_NODE, labelHash)\\n );\\n emit ReverseClaimed(addr, reverseNode);\\n ens.setSubnodeRecord(ADDR_REVERSE_NODE, labelHash, owner, resolver, 0);\\n return reverseNode;\\n }\\n\\n /**\\n * @dev Transfers ownership of the reverse ENS record associated with the\\n * calling account.\\n * @param owner The address to set as the owner of the reverse record in ENS.\\n * @param resolver The address of the resolver to set; 0 to leave unchanged.\\n * @return The ENS node hash of the reverse record.\\n */\\n function claimWithResolver(\\n address owner,\\n address resolver\\n ) public override returns (bytes32) {\\n return claimForAddr(msg.sender, owner, resolver);\\n }\\n\\n /**\\n * @dev Sets the `name()` record for the reverse ENS record associated with\\n * the calling account. First updates the resolver to the default reverse\\n * resolver if necessary.\\n * @param name The name to set for this address.\\n * @return The ENS node hash of the reverse record.\\n */\\n function setName(string memory name) public override returns (bytes32) {\\n return\\n setNameForAddr(\\n msg.sender,\\n msg.sender,\\n address(defaultResolver),\\n name\\n );\\n }\\n\\n /**\\n * @dev Sets the `name()` record for the reverse ENS record associated with\\n * the account provided. Updates the resolver to a designated resolver\\n * Only callable by controllers and authorised users\\n * @param addr The reverse record to set\\n * @param owner The owner of the reverse node\\n * @param resolver The resolver of the reverse node\\n * @param name The name to set for this address.\\n * @return The ENS node hash of the reverse record.\\n */\\n function setNameForAddr(\\n address addr,\\n address owner,\\n address resolver,\\n string memory name\\n ) public override returns (bytes32) {\\n bytes32 node = claimForAddr(addr, owner, resolver);\\n NameResolver(resolver).setName(node, name);\\n return node;\\n }\\n\\n /**\\n * @dev Returns the node hash for a given account's reverse records.\\n * @param addr The address to hash\\n * @return The ENS node hash.\\n */\\n function node(address addr) public pure override returns (bytes32) {\\n return\\n keccak256(\\n abi.encodePacked(ADDR_REVERSE_NODE, sha3HexAddress(addr))\\n );\\n }\\n\\n /**\\n * @dev An optimised function to compute the sha3 of the lower-case\\n * hexadecimal representation of an Ethereum address.\\n * @param addr The address to hash\\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\\n * input address.\\n */\\n function sha3HexAddress(address addr) private pure returns (bytes32 ret) {\\n assembly {\\n for {\\n let i := 40\\n } gt(i, 0) {\\n\\n } {\\n i := sub(i, 1)\\n mstore8(i, byte(and(addr, 0xf), lookup))\\n addr := div(addr, 0x10)\\n i := sub(i, 1)\\n mstore8(i, byte(and(addr, 0xf), lookup))\\n addr := div(addr, 0x10)\\n }\\n\\n ret := keccak256(0, 40)\\n }\\n }\\n\\n function ownsContract(address addr) internal view returns (bool) {\\n try Ownable(addr).owner() returns (address owner) {\\n return owner == msg.sender;\\n } catch {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd57d28e5791b4b44650a00f5ef6c725af53698ec33faeeaa3591f0dbd939559a\"},\"contracts/root/Controllable.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract Controllable is Ownable {\\n mapping(address => bool) public controllers;\\n\\n event ControllerChanged(address indexed controller, bool enabled);\\n\\n modifier onlyController() {\\n require(\\n controllers[msg.sender],\\n \\\"Controllable: Caller is not a controller\\\"\\n );\\n _;\\n }\\n\\n function setController(address controller, bool enabled) public onlyOwner {\\n controllers[controller] = enabled;\\n emit ControllerChanged(controller, enabled);\\n }\\n}\\n\",\"keccak256\":\"0xb19b8c0fafe9ca2b4bf8aaafee486fa31437672e1e1977bdf84bfe03464969db\"},\"contracts/utils/ERC20Recoverable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.17 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n @notice Contract is used to recover ERC20 tokens sent to the contract by mistake.\\n */\\n\\ncontract ERC20Recoverable is Ownable {\\n /**\\n @notice Recover ERC20 tokens sent to the contract by mistake.\\n @dev The contract is Ownable and only the owner can call the recover function.\\n @param _to The address to send the tokens to.\\n@param _token The address of the ERC20 token to recover\\n @param _amount The amount of tokens to recover.\\n */\\n function recoverFunds(\\n address _token,\\n address _to,\\n uint256 _amount\\n ) external onlyOwner {\\n IERC20(_token).transfer(_to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0x793a38091e1f81499a29ddba82c2b2f3cdd07071b81a832886e8e02a45ff352a\",\"license\":\"MIT\"},\"contracts/wrapper/IMetadataService.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IMetadataService {\\n function uri(uint256) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xb3f1cf6df01ed7b15e5f2318f6823afbdb586ca38c2124c67955c645647ae9a2\",\"license\":\"MIT\"},\"contracts/wrapper/INameWrapper.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"../ethregistrar/IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./IMetadataService.sol\\\";\\nimport \\\"./INameWrapperUpgrade.sol\\\";\\n\\nuint32 constant CANNOT_UNWRAP = 1;\\nuint32 constant CANNOT_BURN_FUSES = 2;\\nuint32 constant CANNOT_TRANSFER = 4;\\nuint32 constant CANNOT_SET_RESOLVER = 8;\\nuint32 constant CANNOT_SET_TTL = 16;\\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\\nuint32 constant CANNOT_APPROVE = 64;\\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\\nuint32 constant IS_DOT_ETH = 1 << 17;\\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\\nuint32 constant CAN_DO_EVERYTHING = 0;\\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\\n// all fuses apart from IS_DOT_ETH\\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\\n\\ninterface INameWrapper is IERC1155 {\\n event NameWrapped(\\n bytes32 indexed node,\\n bytes name,\\n address owner,\\n uint32 fuses,\\n uint64 expiry\\n );\\n\\n event NameUnwrapped(bytes32 indexed node, address owner);\\n\\n event FusesSet(bytes32 indexed node, uint32 fuses);\\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\\n\\n function ens() external view returns (ENS);\\n\\n function registrar() external view returns (IBaseRegistrar);\\n\\n function metadataService() external view returns (IMetadataService);\\n\\n function names(bytes32) external view returns (bytes memory);\\n\\n function name() external view returns (string memory);\\n\\n function upgradeContract() external view returns (INameWrapperUpgrade);\\n\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n\\n function wrap(\\n bytes calldata name,\\n address wrappedOwner,\\n address resolver\\n ) external;\\n\\n function wrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint16 ownerControlledFuses,\\n address resolver\\n ) external returns (uint64 expires);\\n\\n function registerAndWrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint256 duration,\\n address resolver,\\n uint16 ownerControlledFuses\\n ) external returns (uint256 registrarExpiry);\\n\\n function renew(\\n uint256 labelHash,\\n uint256 duration\\n ) external returns (uint256 expires);\\n\\n function unwrap(bytes32 node, bytes32 label, address owner) external;\\n\\n function unwrapETH2LD(\\n bytes32 label,\\n address newRegistrant,\\n address newController\\n ) external;\\n\\n function upgrade(bytes calldata name, bytes calldata extraData) external;\\n\\n function setFuses(\\n bytes32 node,\\n uint16 ownerControlledFuses\\n ) external returns (uint32 newFuses);\\n\\n function setChildFuses(\\n bytes32 parentNode,\\n bytes32 labelhash,\\n uint32 fuses,\\n uint64 expiry\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n string calldata label,\\n address owner,\\n address resolver,\\n uint64 ttl,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n string calldata label,\\n address newOwner,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function extendExpiry(\\n bytes32 node,\\n bytes32 labelhash,\\n uint64 expiry\\n ) external returns (uint64);\\n\\n function canModifyName(\\n bytes32 node,\\n address addr\\n ) external view returns (bool);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function ownerOf(uint256 id) external view returns (address owner);\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address);\\n\\n function getData(\\n uint256 id\\n ) external view returns (address, uint32, uint64);\\n\\n function setMetadataService(IMetadataService _metadataService) external;\\n\\n function uri(uint256 tokenId) external view returns (string memory);\\n\\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\\n\\n function allFusesBurned(\\n bytes32 node,\\n uint32 fuseMask\\n ) external view returns (bool);\\n\\n function isWrapped(bytes32) external view returns (bool);\\n\\n function isWrapped(bytes32, bytes32) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x70310eb67146d7290731c31841399640ac3b6a949eadc6598bc150123d185c57\",\"license\":\"MIT\"},\"contracts/wrapper/INameWrapperUpgrade.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface INameWrapperUpgrade {\\n function wrapFromUpgrade(\\n bytes calldata name,\\n address wrappedOwner,\\n uint32 fuses,\\n uint64 expiry,\\n address approved,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x42e0cec6cd9d1a62d51d45b678f69d3e4ad5555e659b197e41257b308346bb8a\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6101406040523480156200001257600080fd5b5060405162001c5238038062001c52833981016040819052620000359162000224565b81336200004281620001bb565b6040516302571be360e01b81527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201526000906001600160a01b038416906302571be390602401602060405180830381865afa158015620000aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d09190620002b8565b604051630f41a04d60e11b81526001600160a01b03848116600483015291925090821690631e83409a906024016020604051808303816000875af11580156200011d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001439190620002df565b5050505085851162000168576040516307cb550760e31b815260040160405180910390fd5b428511156200018a57604051630b4319e560e21b815260040160405180910390fd5b6001600160a01b0396871660805260a0959095525060c092909252831660e0528216610100521661012052620002f9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200022157600080fd5b50565b600080600080600080600060e0888a0312156200024057600080fd5b87516200024d816200020b565b80975050602088015195506040880151945060608801516200026f816200020b565b608089015190945062000282816200020b565b60a089015190935062000295816200020b565b60c0890151909250620002a8816200020b565b8091505092959891949750929550565b600060208284031215620002cb57600080fd5b8151620002d8816200020b565b9392505050565b600060208284031215620002f257600080fd5b5051919050565b60805160a05160c05160e05161010051610120516118d86200037a600039600081816101680152610a73015260008181610294015281816105e701526107b90152600081816101f80152610ddf0152600081816102e1015281816109560152610c060152600081816102490152610b8f015260006108bd01526118d86000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80638d839ffe116100b2578063acf1a84111610081578063ce1e09c011610066578063ce1e09c0146102dc578063f14fcbc814610303578063f2fde38b1461031657600080fd5b8063acf1a841146102b6578063aeb8ce9b146102c957600080fd5b80638d839ffe146102445780638da5cb5b1461026b5780639791c0971461027c578063a8e5fbc01461028f57600080fd5b8063715018a61161010957806380869853116100ee57806380869853146101f3578063839df9451461021a5780638a95b09f1461023a57600080fd5b8063715018a6146101d857806374694a2b146101e057600080fd5b806301ffc9a71461013b5780632cb6aee4146101635780635d3590d5146101a257806365a69dcf146101b7575b600080fd5b61014e610149366004611020565b610329565b60405190151581526020015b60405180910390f35b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161015a565b6101b56101b036600461107e565b6103c2565b005b6101ca6101c53660046111eb565b61045c565b60405190815260200161015a565b6101b5610501565b6101b56101ee3660046112ee565b610515565b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b6101ca6102283660046113b8565b60016020526000908152604090205481565b6101ca6224ea0081565b6101ca7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661018a565b61014e61028a3660046113d1565b610747565b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b6101b56102c436600461140e565b61075c565b61014e6102d73660046113d1565b610874565b6101ca7f000000000000000000000000000000000000000000000000000000000000000081565b6101b56103113660046113b8565b610937565b6101b561032436600461145a565b6109cd565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a70000000000000000000000000000000000000000000000000000000014806103bc57507fffffffff0000000000000000000000000000000000000000000000000000000082167fe2c97af600000000000000000000000000000000000000000000000000000000145b92915050565b6103ca610a5d565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190611475565b50505050565b6000610466610a5d565b895160208b0120841580159061048357506001600160a01b038716155b156104ba576040517fd3f605c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808a8a8a8a8a8a8a8a6040516020016104db9998979695949392919061154d565b604051602081830303815290604052805190602001209150509998505050505050505050565b610509610a5d565b6105136000610b10565b565b61051d610a5d565b6105b48a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050886105af8d8d8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508f92508e91508d90508c8c8c8c8c61045c565b610b78565b6040517fa40149820000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a401498290610626908e908e908e908e908d908a906004016115af565b6020604051808303816000875af1158015610645573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066991906115f9565b9050831561069457610694868c8c604051610685929190611612565b60405180910390208787610cfa565b82156106dd576106dd8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508d9150610ddd9050565b886001600160a01b03168b8b6040516106f7929190611612565b60405180910390207f0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa8d8d8560405161073293929190611622565b60405180910390a35050505050505050505050565b6000600361075483610e91565b101592915050565b610764610a5d565b60008383604051610776929190611612565b6040519081900381207fc475abff0000000000000000000000000000000000000000000000000000000082526004820181905260248201849052915081906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c475abff906044016020604051808303816000875af115801561080a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082e91906115f9565b9050827f93bc1a84707231b1d9552157299797c64a1a8c5bc79f05153716630c9c4936fc87878460405161086493929190611622565b60405180910390a2505050505050565b8051602082012060009061088783610747565b801561093057506040517f96e494e8000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906396e494e890602401602060405180830381865afa15801561090c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109309190611475565b9392505050565b61093f610a5d565b600081815260016020526040902054429061097b907f00000000000000000000000000000000000000000000000000000000000000009061165c565b106109ba576040517f0a059d71000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b6000908152600160205260409020429055565b6109d5610a5d565b6001600160a01b038116610a515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109b1565b610a5a81610b10565b50565b6000546001600160a01b0316331480610a9e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633145b6105135760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201527f31206f72206f776e65723200000000000000000000000000000000000000000060648201526084016109b1565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600160205260409020544290610bb4907f00000000000000000000000000000000000000000000000000000000000000009061165c565b1115610bef576040517f5320bcf9000000000000000000000000000000000000000000000000000000008152600481018290526024016109b1565b6000818152600160205260409020544290610c2b907f00000000000000000000000000000000000000000000000000000000000000009061165c565b11610c65576040517fcb7690d7000000000000000000000000000000000000000000000000000000008152600481018290526024016109b1565b610c6e83610874565b610ca657826040517f477707e80000000000000000000000000000000000000000000000000000000081526004016109b191906116bf565b6000818152600160205260408120556224ea00821015610cf5576040517f9a71997b000000000000000000000000000000000000000000000000000000008152600481018390526024016109b1565b505050565b604080517fe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463602080830191909152818301869052825180830384018152606083019384905280519101207fe32954eb0000000000000000000000000000000000000000000000000000000090925285906001600160a01b0382169063e32954eb90610d8d908590889088906064016116d2565b6000604051808303816000875af1158015610dac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dd491908101906116f5565b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a806d6b82838587604051602001610e2091906117f4565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401610e4e9493929190611835565b6020604051808303816000875af1158015610e6d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045691906115f9565b8051600090819081905b80821015611017576000858381518110610eb757610eb7611873565b01602001516001600160f81b03191690507f8000000000000000000000000000000000000000000000000000000000000000811015610f0257610efb60018461165c565b9250611004565b7fe0000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610f3f57610efb60028461165c565b7ff0000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610f7c57610efb60038461165c565b7ff8000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610fb957610efb60048461165c565b7ffc000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610ff657610efb60058461165c565b61100160068461165c565b92505b508261100f81611889565b935050610e9b565b50909392505050565b60006020828403121561103257600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461093057600080fd5b80356001600160a01b038116811461107957600080fd5b919050565b60008060006060848603121561109357600080fd5b61109c84611062565b92506110aa60208501611062565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110f9576110f96110ba565b604052919050565b600067ffffffffffffffff82111561111b5761111b6110ba565b50601f01601f191660200190565b600082601f83011261113a57600080fd5b813561114d61114882611101565b6110d0565b81815284602083860101111561116257600080fd5b816020850160208301376000918101602001919091529392505050565b60008083601f84011261119157600080fd5b50813567ffffffffffffffff8111156111a957600080fd5b6020830191508360208260051b85010111156111c457600080fd5b9250929050565b8015158114610a5a57600080fd5b803561ffff8116811461107957600080fd5b60008060008060008060008060006101008a8c03121561120a57600080fd5b893567ffffffffffffffff8082111561122257600080fd5b61122e8d838e01611129565b9a5061123c60208d01611062565b995060408c0135985060608c0135975061125860808d01611062565b965060a08c013591508082111561126e57600080fd5b5061127b8c828d0161117f565b90955093505060c08a013561128f816111cb565b915061129d60e08b016111d9565b90509295985092959850929598565b60008083601f8401126112be57600080fd5b50813567ffffffffffffffff8111156112d657600080fd5b6020830191508360208285010111156111c457600080fd5b6000806000806000806000806000806101008b8d03121561130e57600080fd5b8a3567ffffffffffffffff8082111561132657600080fd5b6113328e838f016112ac565b909c509a508a915061134660208e01611062565b995060408d0135985060608d0135975061136260808e01611062565b965060a08d013591508082111561137857600080fd5b506113858d828e0161117f565b90955093505060c08b0135611399816111cb565b91506113a760e08c016111d9565b90509295989b9194979a5092959850565b6000602082840312156113ca57600080fd5b5035919050565b6000602082840312156113e357600080fd5b813567ffffffffffffffff8111156113fa57600080fd5b61140684828501611129565b949350505050565b60008060006040848603121561142357600080fd5b833567ffffffffffffffff81111561143a57600080fd5b611446868287016112ac565b909790965060209590950135949350505050565b60006020828403121561146c57600080fd5b61093082611062565b60006020828403121561148757600080fd5b8151610930816111cb565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b81835260006020808501808196508560051b810191508460005b878110156115405782840389528135601e198836030181126114f657600080fd5b8701858101903567ffffffffffffffff81111561151257600080fd5b80360382131561152157600080fd5b61152c868284611492565b9a87019a95505050908401906001016114d5565b5091979650505050505050565b60006101008b83526001600160a01b03808c1660208501528a60408501528960608501528089166080850152508060a084015261158d81840187896114bb565b94151560c0840152505061ffff9190911660e090910152979650505050505050565b60a0815260006115c360a08301888a611492565b90506001600160a01b03808716602084015285604084015280851660608401525061ffff83166080830152979650505050505050565b60006020828403121561160b57600080fd5b5051919050565b8183823760009101908152919050565b604081526000611636604083018587611492565b9050826020830152949350505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103bc576103bc611646565b60005b8381101561168a578181015183820152602001611672565b50506000910152565b600081518084526116ab81602086016020860161166f565b601f01601f19169290920160200192915050565b6020815260006109306020830184611693565b8381526040602082015260006116ec6040830184866114bb565b95945050505050565b6000602080838503121561170857600080fd5b825167ffffffffffffffff8082111561172057600080fd5b818501915085601f83011261173457600080fd5b815181811115611746576117466110ba565b8060051b6117558582016110d0565b918252838101850191858101908984111561176f57600080fd5b86860192505b838310156117e75782518581111561178d5760008081fd5b8601603f81018b1361179f5760008081fd5b8781015160406117b161114883611101565b8281528d828486010111156117c65760008081fd5b6117d5838c830184870161166f565b85525050509186019190860190611775565b9998505050505050505050565b6000825161180681846020870161166f565b7f2e616e7900000000000000000000000000000000000000000000000000000000920191825250600401919050565b60006001600160a01b0380871683528086166020840152808516604084015250608060608301526118696080830184611693565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161189b5761189b611646565b506001019056fea2646970667358221220a0516131b33b7c9bf406c1255e3433ec9df469f84ffda1320055e14900383f6364736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101365760003560e01c80638d839ffe116100b2578063acf1a84111610081578063ce1e09c011610066578063ce1e09c0146102dc578063f14fcbc814610303578063f2fde38b1461031657600080fd5b8063acf1a841146102b6578063aeb8ce9b146102c957600080fd5b80638d839ffe146102445780638da5cb5b1461026b5780639791c0971461027c578063a8e5fbc01461028f57600080fd5b8063715018a61161010957806380869853116100ee57806380869853146101f3578063839df9451461021a5780638a95b09f1461023a57600080fd5b8063715018a6146101d857806374694a2b146101e057600080fd5b806301ffc9a71461013b5780632cb6aee4146101635780635d3590d5146101a257806365a69dcf146101b7575b600080fd5b61014e610149366004611020565b610329565b60405190151581526020015b60405180910390f35b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161015a565b6101b56101b036600461107e565b6103c2565b005b6101ca6101c53660046111eb565b61045c565b60405190815260200161015a565b6101b5610501565b6101b56101ee3660046112ee565b610515565b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b6101ca6102283660046113b8565b60016020526000908152604090205481565b6101ca6224ea0081565b6101ca7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661018a565b61014e61028a3660046113d1565b610747565b61018a7f000000000000000000000000000000000000000000000000000000000000000081565b6101b56102c436600461140e565b61075c565b61014e6102d73660046113d1565b610874565b6101ca7f000000000000000000000000000000000000000000000000000000000000000081565b6101b56103113660046113b8565b610937565b6101b561032436600461145a565b6109cd565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a70000000000000000000000000000000000000000000000000000000014806103bc57507fffffffff0000000000000000000000000000000000000000000000000000000082167fe2c97af600000000000000000000000000000000000000000000000000000000145b92915050565b6103ca610a5d565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af1158015610432573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104569190611475565b50505050565b6000610466610a5d565b895160208b0120841580159061048357506001600160a01b038716155b156104ba576040517fd3f605c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808a8a8a8a8a8a8a8a6040516020016104db9998979695949392919061154d565b604051602081830303815290604052805190602001209150509998505050505050505050565b610509610a5d565b6105136000610b10565b565b61051d610a5d565b6105b48a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050886105af8d8d8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508f92508e91508d90508c8c8c8c8c61045c565b610b78565b6040517fa40149820000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a401498290610626908e908e908e908e908d908a906004016115af565b6020604051808303816000875af1158015610645573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066991906115f9565b9050831561069457610694868c8c604051610685929190611612565b60405180910390208787610cfa565b82156106dd576106dd8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508d9150610ddd9050565b886001600160a01b03168b8b6040516106f7929190611612565b60405180910390207f0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa8d8d8560405161073293929190611622565b60405180910390a35050505050505050505050565b6000600361075483610e91565b101592915050565b610764610a5d565b60008383604051610776929190611612565b6040519081900381207fc475abff0000000000000000000000000000000000000000000000000000000082526004820181905260248201849052915081906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c475abff906044016020604051808303816000875af115801561080a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082e91906115f9565b9050827f93bc1a84707231b1d9552157299797c64a1a8c5bc79f05153716630c9c4936fc87878460405161086493929190611622565b60405180910390a2505050505050565b8051602082012060009061088783610747565b801561093057506040517f96e494e8000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906396e494e890602401602060405180830381865afa15801561090c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109309190611475565b9392505050565b61093f610a5d565b600081815260016020526040902054429061097b907f00000000000000000000000000000000000000000000000000000000000000009061165c565b106109ba576040517f0a059d71000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b6000908152600160205260409020429055565b6109d5610a5d565b6001600160a01b038116610a515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109b1565b610a5a81610b10565b50565b6000546001600160a01b0316331480610a9e57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633145b6105135760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201527f31206f72206f776e65723200000000000000000000000000000000000000000060648201526084016109b1565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600160205260409020544290610bb4907f00000000000000000000000000000000000000000000000000000000000000009061165c565b1115610bef576040517f5320bcf9000000000000000000000000000000000000000000000000000000008152600481018290526024016109b1565b6000818152600160205260409020544290610c2b907f00000000000000000000000000000000000000000000000000000000000000009061165c565b11610c65576040517fcb7690d7000000000000000000000000000000000000000000000000000000008152600481018290526024016109b1565b610c6e83610874565b610ca657826040517f477707e80000000000000000000000000000000000000000000000000000000081526004016109b191906116bf565b6000818152600160205260408120556224ea00821015610cf5576040517f9a71997b000000000000000000000000000000000000000000000000000000008152600481018390526024016109b1565b505050565b604080517fe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463602080830191909152818301869052825180830384018152606083019384905280519101207fe32954eb0000000000000000000000000000000000000000000000000000000090925285906001600160a01b0382169063e32954eb90610d8d908590889088906064016116d2565b6000604051808303816000875af1158015610dac573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dd491908101906116f5565b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a806d6b82838587604051602001610e2091906117f4565b6040516020818303038152906040526040518563ffffffff1660e01b8152600401610e4e9493929190611835565b6020604051808303816000875af1158015610e6d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045691906115f9565b8051600090819081905b80821015611017576000858381518110610eb757610eb7611873565b01602001516001600160f81b03191690507f8000000000000000000000000000000000000000000000000000000000000000811015610f0257610efb60018461165c565b9250611004565b7fe0000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610f3f57610efb60028461165c565b7ff0000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610f7c57610efb60038461165c565b7ff8000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610fb957610efb60048461165c565b7ffc000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015610ff657610efb60058461165c565b61100160068461165c565b92505b508261100f81611889565b935050610e9b565b50909392505050565b60006020828403121561103257600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461093057600080fd5b80356001600160a01b038116811461107957600080fd5b919050565b60008060006060848603121561109357600080fd5b61109c84611062565b92506110aa60208501611062565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110f9576110f96110ba565b604052919050565b600067ffffffffffffffff82111561111b5761111b6110ba565b50601f01601f191660200190565b600082601f83011261113a57600080fd5b813561114d61114882611101565b6110d0565b81815284602083860101111561116257600080fd5b816020850160208301376000918101602001919091529392505050565b60008083601f84011261119157600080fd5b50813567ffffffffffffffff8111156111a957600080fd5b6020830191508360208260051b85010111156111c457600080fd5b9250929050565b8015158114610a5a57600080fd5b803561ffff8116811461107957600080fd5b60008060008060008060008060006101008a8c03121561120a57600080fd5b893567ffffffffffffffff8082111561122257600080fd5b61122e8d838e01611129565b9a5061123c60208d01611062565b995060408c0135985060608c0135975061125860808d01611062565b965060a08c013591508082111561126e57600080fd5b5061127b8c828d0161117f565b90955093505060c08a013561128f816111cb565b915061129d60e08b016111d9565b90509295985092959850929598565b60008083601f8401126112be57600080fd5b50813567ffffffffffffffff8111156112d657600080fd5b6020830191508360208285010111156111c457600080fd5b6000806000806000806000806000806101008b8d03121561130e57600080fd5b8a3567ffffffffffffffff8082111561132657600080fd5b6113328e838f016112ac565b909c509a508a915061134660208e01611062565b995060408d0135985060608d0135975061136260808e01611062565b965060a08d013591508082111561137857600080fd5b506113858d828e0161117f565b90955093505060c08b0135611399816111cb565b91506113a760e08c016111d9565b90509295989b9194979a5092959850565b6000602082840312156113ca57600080fd5b5035919050565b6000602082840312156113e357600080fd5b813567ffffffffffffffff8111156113fa57600080fd5b61140684828501611129565b949350505050565b60008060006040848603121561142357600080fd5b833567ffffffffffffffff81111561143a57600080fd5b611446868287016112ac565b909790965060209590950135949350505050565b60006020828403121561146c57600080fd5b61093082611062565b60006020828403121561148757600080fd5b8151610930816111cb565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b81835260006020808501808196508560051b810191508460005b878110156115405782840389528135601e198836030181126114f657600080fd5b8701858101903567ffffffffffffffff81111561151257600080fd5b80360382131561152157600080fd5b61152c868284611492565b9a87019a95505050908401906001016114d5565b5091979650505050505050565b60006101008b83526001600160a01b03808c1660208501528a60408501528960608501528089166080850152508060a084015261158d81840187896114bb565b94151560c0840152505061ffff9190911660e090910152979650505050505050565b60a0815260006115c360a08301888a611492565b90506001600160a01b03808716602084015285604084015280851660608401525061ffff83166080830152979650505050505050565b60006020828403121561160b57600080fd5b5051919050565b8183823760009101908152919050565b604081526000611636604083018587611492565b9050826020830152949350505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103bc576103bc611646565b60005b8381101561168a578181015183820152602001611672565b50506000910152565b600081518084526116ab81602086016020860161166f565b601f01601f19169290920160200192915050565b6020815260006109306020830184611693565b8381526040602082015260006116ec6040830184866114bb565b95945050505050565b6000602080838503121561170857600080fd5b825167ffffffffffffffff8082111561172057600080fd5b818501915085601f83011261173457600080fd5b815181811115611746576117466110ba565b8060051b6117558582016110d0565b918252838101850191858101908984111561176f57600080fd5b86860192505b838310156117e75782518581111561178d5760008081fd5b8601603f81018b1361179f5760008081fd5b8781015160406117b161114883611101565b8281528d828486010111156117c65760008081fd5b6117d5838c830184870161166f565b85525050509186019190860190611775565b9998505050505050505050565b6000825161180681846020870161166f565b7f2e616e7900000000000000000000000000000000000000000000000000000000920191825250600401919050565b60006001600160a01b0380871683528086166020840152808516604084015250608060608301526118696080830184611693565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b60006001820161189b5761189b611646565b506001019056fea2646970667358221220a0516131b33b7c9bf406c1255e3433ec9df469f84ffda1320055e14900383f6364736f6c63430008110033", + "solcInputHash": "49ca6a3dcd0a38c743396303b30f42c4", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract AnytypeRegistrarImplementation\",\"name\":\"_base\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minCommitmentAge\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxCommitmentAge\",\"type\":\"uint256\"},{\"internalType\":\"contract ReverseRegistrar\",\"name\":\"_reverseRegistrar\",\"type\":\"address\"},{\"internalType\":\"contract INameWrapper\",\"name\":\"_nameWrapper\",\"type\":\"address\"},{\"internalType\":\"contract ENS\",\"name\":\"_ens\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_minterAccount\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_minter2Account\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"CommitmentTooNew\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"CommitmentTooOld\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"DurationTooShort\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCommitmentAgeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxCommitmentAgeTooLow\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NameNotAvailable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ResolverRequiredWhenDataSupplied\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"UnexpiredCommitmentExists\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldMinter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newMinter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newMinter2\",\"type\":\"address\"}],\"name\":\"MintersChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"NameRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"expires\",\"type\":\"uint256\"}],\"name\":\"NameRenewed\",\"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\"},{\"inputs\":[],\"name\":\"MIN_REGISTRATION_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"available\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newMinter\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newMinter2\",\"type\":\"address\"}],\"name\":\"changeMinters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"commitment\",\"type\":\"bytes32\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"commitments\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"reverseRecord\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"ownerControlledFuses\",\"type\":\"uint16\"}],\"name\":\"makeCommitment\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxCommitmentAge\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minCommitmentAge\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minterAccount\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minterAccount2\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nameWrapper\",\"outputs\":[{\"internalType\":\"contract INameWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"secret\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"reverseRecord\",\"type\":\"bool\"},{\"internalType\":\"uint16\",\"name\":\"ownerControlledFuses\",\"type\":\"uint16\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"renew\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reverseRegistrar\",\"outputs\":[{\"internalType\":\"contract ReverseRegistrar\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"valid\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"recoverFunds(address,address,uint256)\":{\"details\":\"The contract is Ownable and only the owner can call the recover function.\",\"params\":{\"_amount\":\"The amount of tokens to recover.\",\"_to\":\"The address to send the tokens to.\",\"_token\":\"The address of the ERC20 token to recover\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"recoverFunds(address,address,uint256)\":{\"notice\":\"Recover ERC20 tokens sent to the contract by mistake.\"}},\"notice\":\"This is a fork/copy of the ENS registrar controller with the following changes: .any TLD is used instead of .eth Owner of this contract can register any name without a payment on behalf/for other users.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/anytype/AnytypeRegistrarControllerPrivate.sol\":\"AnytypeRegistrarControllerPrivate\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1300},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(\\n address[] calldata accounts,\\n uint256[] calldata ids\\n ) external view returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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: address zero is not a valid owner\\\");\\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 = _ownerOf(tokenId);\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\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 _requireMinted(tokenId);\\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 overridden 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 token owner or 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 _requireMinted(tokenId);\\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(address from, address to, uint256 tokenId) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner or 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(address from, address to, uint256 tokenId, bytes memory data) 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist\\n */\\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\\n return _owners[tokenId];\\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 _ownerOf(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 address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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(address to, uint256 tokenId, bytes memory data) 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, 1);\\n\\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n unchecked {\\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\\n // Given that tokens are minted one by one, it is impossible in practice that\\n // this ever happens. Might change if we allow batch minting.\\n // The ERC fails to describe this case.\\n _balances[to] += 1;\\n }\\n\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n * This is an internal function that does not check if the sender is authorized to operate on the token.\\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, 1);\\n\\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\\n owner = ERC721.ownerOf(tokenId);\\n\\n // Clear approvals\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // Cannot overflow, as that would require more tokens to be burned/transferred\\n // out than the owner initially received through minting and transferring in.\\n _balances[owner] -= 1;\\n }\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId, 1);\\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(address from, address to, uint256 tokenId) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId, 1);\\n\\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n\\n // Clear approvals from the previous owner\\n delete _tokenApprovals[tokenId];\\n\\n unchecked {\\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\\n // `from`'s balance is the number of token held, which is at least one before the current\\n // transfer.\\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\\n // all 2**256 token ids to be minted, which in practice is impossible.\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n }\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {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 an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(address owner, address operator, bool approved) 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 Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\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 /// @solidity memory-safe-assembly\\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 and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\\n * - When `from` is zero, the tokens will be minted for `to`.\\n * - When `to` is zero, ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\\n * - When `from` is zero, the tokens were minted for `to`.\\n * - When `to` is zero, ``from``'s tokens were burned.\\n * - `from` and `to` are never both zero.\\n * - `batchSize` is non-zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\\n\\n /**\\n * @dev Unsafe write access to the balances, used by extensions that \\\"mint\\\" tokens using an {ownerOf} override.\\n *\\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\\n * that `ownerOf(tokenId)` is `a`.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\\n _balances[account] += amount;\\n }\\n}\\n\",\"keccak256\":\"0x2c309e7df9e05e6ce15bedfe74f3c61b467fc37e0fae9eab496acf5ea0bbd7ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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`.\\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(address from, address to, uint256 tokenId, bytes calldata data) external;\\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 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(address from, address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\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(address from, address to, uint256 tokenId) 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 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 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 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\",\"keccak256\":\"0x5bce51e11f7d194b79ea59fe00c9e8de9fa2c5530124960f29a24d4c740a3266\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.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\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"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\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, \\\"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(address target, bytes memory data, uint256 value) 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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\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 unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n */\\n function toString(int256 value) internal pure returns (string memory) {\\n return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\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 unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\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] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n\\n /**\\n * @dev Returns true if the two strings are equal.\\n */\\n function equal(string memory a, string memory b) internal pure returns (bool) {\\n return keccak256(bytes(a)) == keccak256(bytes(b));\\n }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"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\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"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\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n /**\\n * @dev Returns the largest of two signed numbers.\\n */\\n function max(int256 a, int256 b) internal pure returns (int256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two signed numbers.\\n */\\n function min(int256 a, int256 b) internal pure returns (int256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two signed numbers without overflow.\\n * The result is rounded towards zero.\\n */\\n function average(int256 a, int256 b) internal pure returns (int256) {\\n // Formula from the book \\\"Hacker's Delight\\\"\\n int256 x = (a & b) + ((a ^ b) >> 1);\\n return x + (int256(uint256(x) >> 255) & (a ^ b));\\n }\\n\\n /**\\n * @dev Returns the absolute unsigned value of a signed value.\\n */\\n function abs(int256 n) internal pure returns (uint256) {\\n unchecked {\\n // must be unchecked in order to support `n = type(int256).min`\\n return uint256(n >= 0 ? n : -n);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/anytype/AnytypeRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"./IAnytypeRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * Each registrar simply controls one top level domain, such as \\\".any\\\"\\n */\\ncontract AnytypeRegistrarImplementation is ERC721, IAnytypeRegistrar, Ownable {\\n // A map of expiry times\\n mapping(uint256 => uint256) expiries;\\n // The ENS registry\\n ENS public ens;\\n // The namehash of the TLD this registrar owns (eg, .any)\\n bytes32 public baseNode;\\n // A map of addresses that are authorised to register and renew names.\\n mapping(address => bool) public controllers;\\n\\n uint256 public constant GRACE_PERIOD = 90 days;\\n bytes4 private constant INTERFACE_META_ID =\\n bytes4(keccak256(\\\"supportsInterface(bytes4)\\\"));\\n\\n bytes4 private constant ERC721_ID =\\n bytes4(\\n keccak256(\\\"balanceOf(address)\\\") ^\\n keccak256(\\\"ownerOf(uint256)\\\") ^\\n keccak256(\\\"approve(address,uint256)\\\") ^\\n keccak256(\\\"getApproved(uint256)\\\") ^\\n keccak256(\\\"setApprovalForAll(address,bool)\\\") ^\\n keccak256(\\\"isApprovedForAll(address,address)\\\") ^\\n keccak256(\\\"transferFrom(address,address,uint256)\\\") ^\\n keccak256(\\\"safeTransferFrom(address,address,uint256)\\\") ^\\n keccak256(\\\"safeTransferFrom(address,address,uint256,bytes)\\\")\\n );\\n\\n bytes4 private constant RECLAIM_ID =\\n bytes4(keccak256(\\\"reclaim(uint256,address)\\\"));\\n\\n /**\\n * v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);\\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187\\n * @dev Returns whether the given spender can transfer a given token ID\\n * @param spender address of the spender to query\\n * @param tokenId uint256 ID of the token to be transferred\\n * @return bool whether the msg.sender is approved for the given token ID,\\n * is an operator of the owner, or is the owner of the token\\n */\\n function _isApprovedOrOwner(\\n address spender,\\n uint256 tokenId\\n ) internal view override returns (bool) {\\n address owner = ownerOf(tokenId);\\n return (spender == owner ||\\n getApproved(tokenId) == spender ||\\n isApprovedForAll(owner, spender));\\n }\\n\\n constructor(ENS _ens, bytes32 _baseNode) ERC721(\\\"\\\", \\\"\\\") {\\n ens = _ens;\\n baseNode = _baseNode;\\n }\\n\\n modifier live() {\\n require(ens.owner(baseNode) == address(this));\\n _;\\n }\\n\\n modifier onlyController() {\\n require(controllers[msg.sender]);\\n _;\\n }\\n\\n /**\\n * @dev Gets the owner of the specified token ID. Names become unowned\\n * when their registration expires.\\n * @param tokenId uint256 ID of the token to query the owner of\\n * @return address currently marked as the owner of the given token ID\\n */\\n function ownerOf(\\n uint256 tokenId\\n ) public view override(IERC721, ERC721) returns (address) {\\n require(expiries[tokenId] > block.timestamp);\\n return super.ownerOf(tokenId);\\n }\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external override onlyOwner {\\n controllers[controller] = true;\\n emit ControllerAdded(controller);\\n }\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external override onlyOwner {\\n controllers[controller] = false;\\n emit ControllerRemoved(controller);\\n }\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external override onlyOwner {\\n ens.setResolver(baseNode, resolver);\\n }\\n\\n // Returns the expiration timestamp of the specified id.\\n function nameExpires(uint256 id) external view override returns (uint256) {\\n return expiries[id];\\n }\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) public view override returns (bool) {\\n // Not available if it's registered here or in its grace period.\\n return expiries[id] + GRACE_PERIOD < block.timestamp;\\n }\\n\\n /**\\n * @dev Register a name.\\n * @param id The token ID (keccak256 of the label).\\n * @param owner The address that should own the registration.\\n * @param duration Duration in seconds for the registration.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external override returns (uint256) {\\n return _register(id, owner, duration, true);\\n }\\n\\n /**\\n * @dev Register a name, without modifying the registry.\\n * @param id The token ID (keccak256 of the label).\\n * @param owner The address that should own the registration.\\n * @param duration Duration in seconds for the registration.\\n */\\n function registerOnly(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256) {\\n return _register(id, owner, duration, false);\\n }\\n\\n function _register(\\n uint256 id,\\n address owner,\\n uint256 duration,\\n bool updateRegistry\\n ) internal live onlyController returns (uint256) {\\n require(available(id));\\n require(\\n block.timestamp + duration + GRACE_PERIOD >\\n block.timestamp + GRACE_PERIOD\\n ); // Prevent future overflow\\n\\n expiries[id] = block.timestamp + duration;\\n if (_exists(id)) {\\n // Name was previously owned, and expired\\n _burn(id);\\n }\\n _mint(owner, id);\\n if (updateRegistry) {\\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\\n }\\n\\n emit NameRegistered(id, owner, block.timestamp + duration);\\n\\n return block.timestamp + duration;\\n }\\n\\n function renew(\\n uint256 id,\\n uint256 duration\\n ) external override live onlyController returns (uint256) {\\n require(expiries[id] + GRACE_PERIOD >= block.timestamp); // Name must be registered here or in grace period\\n require(\\n expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD\\n ); // Prevent future overflow\\n\\n expiries[id] += duration;\\n emit NameRenewed(id, expiries[id]);\\n return expiries[id];\\n }\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external override live {\\n require(_isApprovedOrOwner(msg.sender, id));\\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view override(ERC721, IERC165) returns (bool) {\\n return\\n interfaceID == INTERFACE_META_ID ||\\n interfaceID == ERC721_ID ||\\n interfaceID == RECLAIM_ID;\\n }\\n}\\n\",\"keccak256\":\"0x495ee998f7f439351f12f6c28d4a0f2a7829d76b4ddd9adc3c0bfcd8682ddab2\"},\"contracts/anytype/AnytypeRegistrarControllerPrivate.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport {AnytypeRegistrarImplementation} from \\\"./AnytypeRegistrar.sol\\\";\\nimport {StringUtils} from \\\"../ethregistrar/StringUtils.sol\\\";\\nimport {Resolver} from \\\"../resolvers/Resolver.sol\\\";\\nimport {ENS} from \\\"../registry/ENS.sol\\\";\\nimport {ReverseRegistrar} from \\\"../reverseRegistrar/ReverseRegistrar.sol\\\";\\nimport {ReverseClaimer} from \\\"../reverseRegistrar/ReverseClaimer.sol\\\";\\nimport {IAnytypeRegistrarControllerPrivate} from \\\"./IAnytypeRegistrarControllerPrivate.sol\\\";\\n\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IERC165} from \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport {INameWrapper} from \\\"../wrapper/INameWrapper.sol\\\";\\nimport {ERC20Recoverable} from \\\"../utils/ERC20Recoverable.sol\\\";\\n\\nerror CommitmentTooNew(bytes32 commitment);\\nerror CommitmentTooOld(bytes32 commitment);\\nerror NameNotAvailable(string name);\\nerror DurationTooShort(uint256 duration);\\nerror ResolverRequiredWhenDataSupplied();\\nerror UnexpiredCommitmentExists(bytes32 commitment);\\nerror InsufficientValue();\\nerror Unauthorised(bytes32 node);\\nerror MaxCommitmentAgeTooLow();\\nerror MaxCommitmentAgeTooHigh();\\n\\n/**\\n * This is a fork/copy of the ENS registrar controller with the following changes:\\n * .any TLD is used instead of .eth\\n * Owner of this contract can register any name without a payment on behalf/for other users.\\n */\\ncontract AnytypeRegistrarControllerPrivate is\\n Ownable,\\n IAnytypeRegistrarControllerPrivate,\\n IERC165,\\n ERC20Recoverable,\\n ReverseClaimer\\n{\\n using StringUtils for *;\\n using Address for address;\\n\\n uint256 public constant MIN_REGISTRATION_DURATION = 28 days;\\n\\n // any type namehash\\n // use 'namehash' function to get namehash in your JS code\\n bytes32 private constant ANY_NODE =\\n 0xe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463;\\n\\n uint64 private constant MAX_EXPIRY = type(uint64).max;\\n AnytypeRegistrarImplementation immutable base;\\n\\n // in seconds\\n uint256 public immutable minCommitmentAge;\\n uint256 public immutable maxCommitmentAge;\\n ReverseRegistrar public immutable reverseRegistrar;\\n INameWrapper public immutable nameWrapper;\\n\\n address public minterAccount;\\n address public minterAccount2;\\n\\n mapping(bytes32 => uint256) public commitments;\\n\\n event NameRegistered(\\n string name,\\n bytes32 indexed label,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(string name, bytes32 indexed label, uint256 expires);\\n event MintersChanged(address oldMinter, address newMinter, address newMinter2);\\n\\n function _checkOwner() internal view virtual override {\\n require(\\n owner() == _msgSender() || minterAccount == _msgSender() || minterAccount2 == _msgSender(),\\n \\\"Ownable: caller is not the owner1 or minter or minter2\\\"\\n );\\n }\\n\\n constructor(\\n AnytypeRegistrarImplementation _base,\\n uint256 _minCommitmentAge,\\n uint256 _maxCommitmentAge,\\n ReverseRegistrar _reverseRegistrar,\\n INameWrapper _nameWrapper,\\n ENS _ens,\\n address _minterAccount,\\n address _minter2Account\\n ) ReverseClaimer(_ens, msg.sender) {\\n if (_maxCommitmentAge <= _minCommitmentAge) {\\n revert MaxCommitmentAgeTooLow();\\n }\\n\\n if (_maxCommitmentAge > block.timestamp) {\\n revert MaxCommitmentAgeTooHigh();\\n }\\n\\n base = _base;\\n minCommitmentAge = _minCommitmentAge;\\n maxCommitmentAge = _maxCommitmentAge;\\n reverseRegistrar = _reverseRegistrar;\\n nameWrapper = _nameWrapper;\\n minterAccount = _minterAccount;\\n minterAccount2 = _minter2Account;\\n }\\n\\n function changeMinters(address newMinter, address newMinter2) external {\\n // this should not be called by minter\\n // if minter gets hacked -> admin can change the minter\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n require(newMinter != address(0), \\\"Invalid minter address\\\");\\n require(newMinter2 != address(0), \\\"Invalid minter2 address\\\");\\n\\n emit MintersChanged(minterAccount, newMinter, newMinter2);\\n\\n minterAccount = newMinter;\\n minterAccount2 = newMinter2;\\n }\\n\\n function valid(string memory name) public pure returns (bool) {\\n return name.strlen() >= 3;\\n }\\n\\n function available(string memory name) public view override returns (bool) {\\n bytes32 label = keccak256(bytes(name));\\n return valid(name) && base.available(uint256(label));\\n }\\n\\n function makeCommitment(\\n string memory name,\\n address owner,\\n uint256 duration,\\n bytes32 secret,\\n address resolver,\\n bytes[] calldata data,\\n bool reverseRecord,\\n uint16 ownerControlledFuses\\n ) public view override onlyOwner returns (bytes32) {\\n bytes32 label = keccak256(bytes(name));\\n if (data.length > 0 && resolver == address(0)) {\\n revert ResolverRequiredWhenDataSupplied();\\n }\\n return\\n keccak256(\\n abi.encode(\\n label,\\n owner,\\n duration,\\n secret,\\n resolver,\\n data,\\n reverseRecord,\\n ownerControlledFuses\\n )\\n );\\n }\\n\\n function commit(bytes32 commitment) public override onlyOwner {\\n if (commitments[commitment] + maxCommitmentAge >= block.timestamp) {\\n revert UnexpiredCommitmentExists(commitment);\\n }\\n commitments[commitment] = block.timestamp;\\n }\\n\\n function register(\\n string calldata name,\\n address owner,\\n uint256 duration,\\n bytes32 secret,\\n address resolver,\\n bytes[] calldata data,\\n bool reverseRecord,\\n uint16 ownerControlledFuses\\n ) public override onlyOwner {\\n _consumeCommitment(\\n name,\\n duration,\\n makeCommitment(\\n name,\\n owner,\\n duration,\\n secret,\\n resolver,\\n data,\\n reverseRecord,\\n ownerControlledFuses\\n )\\n );\\n\\n uint256 expires = nameWrapper.registerAndWrapETH2LD(\\n name,\\n owner,\\n duration,\\n resolver,\\n ownerControlledFuses\\n );\\n\\n if (data.length > 0) {\\n _setRecords(resolver, keccak256(bytes(name)), data);\\n }\\n\\n if (reverseRecord) {\\n _setReverseRecord(name, resolver, owner);\\n }\\n\\n emit NameRegistered(name, keccak256(bytes(name)), owner, expires);\\n }\\n\\n function renew(\\n string calldata name,\\n uint256 duration\\n ) external override onlyOwner {\\n bytes32 labelhash = keccak256(bytes(name));\\n uint256 tokenId = uint256(labelhash);\\n\\n uint256 expires = nameWrapper.renew(tokenId, duration);\\n\\n emit NameRenewed(name, labelhash, expires);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) external pure returns (bool) {\\n return\\n interfaceID == type(IERC165).interfaceId ||\\n interfaceID == type(IAnytypeRegistrarControllerPrivate).interfaceId;\\n }\\n\\n /* Internal functions */\\n function _consumeCommitment(\\n string memory name,\\n uint256 duration,\\n bytes32 commitment\\n ) internal {\\n // Require an old enough commitment.\\n if (commitments[commitment] + minCommitmentAge > block.timestamp) {\\n revert CommitmentTooNew(commitment);\\n }\\n\\n // If the commitment is too old, or the name is registered, stop\\n if (commitments[commitment] + maxCommitmentAge <= block.timestamp) {\\n revert CommitmentTooOld(commitment);\\n }\\n if (!available(name)) {\\n revert NameNotAvailable(name);\\n }\\n\\n delete (commitments[commitment]);\\n\\n if (duration < MIN_REGISTRATION_DURATION) {\\n revert DurationTooShort(duration);\\n }\\n }\\n\\n function _setRecords(\\n address resolverAddress,\\n bytes32 label,\\n bytes[] calldata data\\n ) internal {\\n // use hardcoded .any namehash\\n bytes32 nodehash = keccak256(abi.encodePacked(ANY_NODE, label));\\n Resolver resolver = Resolver(resolverAddress);\\n resolver.multicallWithNodeCheck(nodehash, data);\\n }\\n\\n function _setReverseRecord(\\n string memory name,\\n address resolver,\\n address owner\\n ) internal {\\n reverseRegistrar.setNameForAddr(\\n owner,\\n owner,\\n resolver,\\n string.concat(name, \\\".any\\\")\\n );\\n }\\n}\\n\",\"keccak256\":\"0x8ebdf7139e14a040edbbc2b191ba9816f4b78318a51bd057c730cb8ced19bac6\",\"license\":\"MIT\"},\"contracts/anytype/IAnytypeRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IAnytypeRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x35b8ebf24b17b1dca1550ba969b4ee46a783c6482ca7a29fb2614d42eb99a463\"},\"contracts/anytype/IAnytypeRegistrarControllerPrivate.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IAnytypeRegistrarControllerPrivate {\\n function available(string memory) external returns (bool);\\n\\n function makeCommitment(\\n string memory,\\n address,\\n uint256,\\n bytes32,\\n address,\\n bytes[] calldata,\\n bool,\\n uint16\\n ) external view returns (bytes32);\\n\\n function commit(bytes32) external;\\n\\n function register(\\n string calldata,\\n address,\\n uint256,\\n bytes32,\\n address,\\n bytes[] calldata,\\n bool,\\n uint16\\n ) external;\\n\\n function renew(string calldata, uint256) external;\\n}\\n\",\"keccak256\":\"0xc60e5c5a981cb3fc45040c049fa34b9de3c45f72ae416129123400a2dd4cfdc2\",\"license\":\"MIT\"},\"contracts/ethregistrar/IBaseRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"./IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBaseRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n event NameMigrated(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true if the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x15f7b1dfa7cd34444daf79ec9b4d40437caa9257893ce0639d706fcc2ba69e52\"},\"contracts/ethregistrar/StringUtils.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nlibrary StringUtils {\\n /**\\n * @dev Returns the length of a given string\\n *\\n * @param s The string to measure the length of\\n * @return The length of the input string\\n */\\n function strlen(string memory s) internal pure returns (uint256) {\\n uint256 len;\\n uint256 i = 0;\\n uint256 bytelength = bytes(s).length;\\n for (len = 0; i < bytelength; len++) {\\n bytes1 b = bytes(s)[i];\\n if (b < 0x80) {\\n i += 1;\\n } else if (b < 0xE0) {\\n i += 2;\\n } else if (b < 0xF0) {\\n i += 3;\\n } else if (b < 0xF8) {\\n i += 4;\\n } else if (b < 0xFC) {\\n i += 5;\\n } else {\\n i += 6;\\n }\\n }\\n return len;\\n }\\n}\\n\",\"keccak256\":\"0x4cc8363a850dc9130c433ee50e7c97e29a45ae5d9bd0808205ac7134b34f24e4\"},\"contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"contracts/resolvers/Resolver.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"./profiles/IABIResolver.sol\\\";\\nimport \\\"./profiles/IAddressResolver.sol\\\";\\nimport \\\"./profiles/IAddrResolver.sol\\\";\\nimport \\\"./profiles/IContentHashResolver.sol\\\";\\nimport \\\"./profiles/IDNSRecordResolver.sol\\\";\\nimport \\\"./profiles/IDNSZoneResolver.sol\\\";\\nimport \\\"./profiles/IInterfaceResolver.sol\\\";\\nimport \\\"./profiles/INameResolver.sol\\\";\\nimport \\\"./profiles/IPubkeyResolver.sol\\\";\\nimport \\\"./profiles/ITextResolver.sol\\\";\\nimport \\\"./profiles/IExtendedResolver.sol\\\";\\n\\n/**\\n * A generic resolver interface which includes all the functions including the ones deprecated\\n */\\ninterface Resolver is\\n IERC165,\\n IABIResolver,\\n IAddressResolver,\\n IAddrResolver,\\n IContentHashResolver,\\n IDNSRecordResolver,\\n IDNSZoneResolver,\\n IInterfaceResolver,\\n INameResolver,\\n IPubkeyResolver,\\n ITextResolver,\\n IExtendedResolver\\n{\\n /* Deprecated events */\\n event ContentChanged(bytes32 indexed node, bytes32 hash);\\n\\n function setApprovalForAll(address, bool) external;\\n\\n function approve(bytes32 node, address delegate, bool approved) external;\\n\\n function isApprovedForAll(address account, address operator) external;\\n\\n function isApprovedFor(\\n address owner,\\n bytes32 node,\\n address delegate\\n ) external;\\n\\n function setABI(\\n bytes32 node,\\n uint256 contentType,\\n bytes calldata data\\n ) external;\\n\\n function setAddr(bytes32 node, address addr) external;\\n\\n function setAddr(bytes32 node, uint256 coinType, bytes calldata a) external;\\n\\n function setContenthash(bytes32 node, bytes calldata hash) external;\\n\\n function setDnsrr(bytes32 node, bytes calldata data) external;\\n\\n function setName(bytes32 node, string calldata _name) external;\\n\\n function setPubkey(bytes32 node, bytes32 x, bytes32 y) external;\\n\\n function setText(\\n bytes32 node,\\n string calldata key,\\n string calldata value\\n ) external;\\n\\n function setInterface(\\n bytes32 node,\\n bytes4 interfaceID,\\n address implementer\\n ) external;\\n\\n function multicall(\\n bytes[] calldata data\\n ) external returns (bytes[] memory results);\\n\\n function multicallWithNodeCheck(\\n bytes32 nodehash,\\n bytes[] calldata data\\n ) external returns (bytes[] memory results);\\n\\n /* Deprecated functions */\\n function content(bytes32 node) external view returns (bytes32);\\n\\n function multihash(bytes32 node) external view returns (bytes memory);\\n\\n function setContent(bytes32 node, bytes32 hash) external;\\n\\n function setMultihash(bytes32 node, bytes calldata hash) external;\\n}\\n\",\"keccak256\":\"0xfc77ab6b7c59c3ebfe1c720bdebf9b08c2488ff7ac9501a9aa056c5d6d5b50c5\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IABIResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IABIResolver {\\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\\n\\n /**\\n * Returns the ABI associated with an ENS node.\\n * Defined in EIP205.\\n * @param node The ENS node to query\\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\\n * @return contentType The content type of the return value\\n * @return data The ABI data\\n */\\n function ABI(\\n bytes32 node,\\n uint256 contentTypes\\n ) external view returns (uint256, bytes memory);\\n}\\n\",\"keccak256\":\"0x85b373d02d19374fe570af407f459768285704bf7f30ab17c30eabfb5a10e4c3\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IAddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the legacy (ETH-only) addr function.\\n */\\ninterface IAddrResolver {\\n event AddrChanged(bytes32 indexed node, address a);\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(bytes32 node) external view returns (address payable);\\n}\\n\",\"keccak256\":\"0x2ad7f2fc60ebe0f93745fe70247f6a854f66af732483fda2a3c5e055614445e8\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the new (multicoin) addr function.\\n */\\ninterface IAddressResolver {\\n event AddressChanged(\\n bytes32 indexed node,\\n uint256 coinType,\\n bytes newAddress\\n );\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x411447c1e90c51e09702815a85ec725ffbbe37cf96e8cc4d2a8bd4ad8a59d73e\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IContentHashResolver {\\n event ContenthashChanged(bytes32 indexed node, bytes hash);\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xd95cd77684ba5752c428d7dceb4ecc6506ac94f4fbb910489637eb68dcd8e366\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IDNSRecordResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IDNSRecordResolver {\\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\\n event DNSRecordChanged(\\n bytes32 indexed node,\\n bytes name,\\n uint16 resource,\\n bytes record\\n );\\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\\n\\n /**\\n * Obtain a DNS record.\\n * @param node the namehash of the node for which to fetch the record\\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\\n * @return the DNS record in wire format if present, otherwise empty\\n */\\n function dnsRecord(\\n bytes32 node,\\n bytes32 name,\\n uint16 resource\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xcfa52200edd337f2c6c5bf402352600584da033b21323603e53de33051a3e25d\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IDNSZoneResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IDNSZoneResolver {\\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\\n event DNSZonehashChanged(\\n bytes32 indexed node,\\n bytes lastzonehash,\\n bytes zonehash\\n );\\n\\n /**\\n * zonehash obtains the hash for the zone.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function zonehash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xca1b3a16e7005533f2800a3e66fcdccf7c574deac7913d8c810f40aec1d58dc0\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IExtendedResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IExtendedResolver {\\n function resolve(\\n bytes memory name,\\n bytes memory data\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x5d81521cfae7d9a4475d27533cd8ed0d3475d369eb0674fd90ffbdbdf292faa3\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IInterfaceResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IInterfaceResolver {\\n event InterfaceChanged(\\n bytes32 indexed node,\\n bytes4 indexed interfaceID,\\n address implementer\\n );\\n\\n /**\\n * Returns the address of a contract that implements the specified interface for this name.\\n * If an implementer has not been set for this interfaceID and name, the resolver will query\\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\\n * will be returned.\\n * @param node The ENS node to query.\\n * @param interfaceID The EIP 165 interface ID to check for.\\n * @return The address that implements this interface, or 0 if the interface is unsupported.\\n */\\n function interfaceImplementer(\\n bytes32 node,\\n bytes4 interfaceID\\n ) external view returns (address);\\n}\\n\",\"keccak256\":\"0x390321fb58f7b927df9562450981e74b4be3907e7c09df321fd3b7409b63ae28\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IPubkeyResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IPubkeyResolver {\\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\\n\\n /**\\n * Returns the SECP256k1 public key associated with an ENS node.\\n * Defined in EIP 619.\\n * @param node The ENS node to query\\n * @return x The X coordinate of the curve point for the public key.\\n * @return y The Y coordinate of the curve point for the public key.\\n */\\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\\n}\\n\",\"keccak256\":\"0x69748947093dd2fda9ddcebd0adf19a6d1e7600df1d4b1462a0417156caddca7\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"contracts/reverseRegistrar/IReverseRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IReverseRegistrar {\\n function setDefaultResolver(address resolver) external;\\n\\n function claim(address owner) external returns (bytes32);\\n\\n function claimForAddr(\\n address addr,\\n address owner,\\n address resolver\\n ) external returns (bytes32);\\n\\n function claimWithResolver(\\n address owner,\\n address resolver\\n ) external returns (bytes32);\\n\\n function setName(string memory name) external returns (bytes32);\\n\\n function setNameForAddr(\\n address addr,\\n address owner,\\n address resolver,\\n string memory name\\n ) external returns (bytes32);\\n\\n function node(address addr) external pure returns (bytes32);\\n}\\n\",\"keccak256\":\"0x83adfcf6da72b1bcd1e3ac387afe5fc7fdf7f2ac28b7601544d2ca4b9d45d159\"},\"contracts/reverseRegistrar/ReverseClaimer.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.17 <0.9.0;\\n\\nimport {ENS} from \\\"../registry/ENS.sol\\\";\\nimport {IReverseRegistrar} from \\\"../reverseRegistrar/IReverseRegistrar.sol\\\";\\n\\ncontract ReverseClaimer {\\n bytes32 constant ADDR_REVERSE_NODE =\\n 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n constructor(ENS ens, address claimant) {\\n IReverseRegistrar reverseRegistrar = IReverseRegistrar(\\n ens.owner(ADDR_REVERSE_NODE)\\n );\\n reverseRegistrar.claim(claimant);\\n }\\n}\\n\",\"keccak256\":\"0x78a28627241535b595f6fff476a1fa7acc90c80684fe7784734920fc8af6fc22\",\"license\":\"MIT\"},\"contracts/reverseRegistrar/ReverseRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"./IReverseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../root/Controllable.sol\\\";\\n\\nabstract contract NameResolver {\\n function setName(bytes32 node, string memory name) public virtual;\\n}\\n\\nbytes32 constant lookup = 0x3031323334353637383961626364656600000000000000000000000000000000;\\n\\nbytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n// namehash('addr.reverse')\\n\\ncontract ReverseRegistrar is Ownable, Controllable, IReverseRegistrar {\\n ENS public immutable ens;\\n NameResolver public defaultResolver;\\n\\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\\n event DefaultResolverChanged(NameResolver indexed resolver);\\n\\n /**\\n * @dev Constructor\\n * @param ensAddr The address of the ENS registry.\\n */\\n constructor(ENS ensAddr) {\\n ens = ensAddr;\\n\\n // Assign ownership of the reverse record to our deployer\\n ReverseRegistrar oldRegistrar = ReverseRegistrar(\\n ensAddr.owner(ADDR_REVERSE_NODE)\\n );\\n if (address(oldRegistrar) != address(0x0)) {\\n oldRegistrar.claim(msg.sender);\\n }\\n }\\n\\n modifier authorised(address addr) {\\n require(\\n addr == msg.sender ||\\n controllers[msg.sender] ||\\n ens.isApprovedForAll(addr, msg.sender) ||\\n ownsContract(addr),\\n \\\"ReverseRegistrar: Caller is not a controller or authorised by address or the address itself\\\"\\n );\\n _;\\n }\\n\\n function setDefaultResolver(address resolver) public override onlyOwner {\\n require(\\n address(resolver) != address(0),\\n \\\"ReverseRegistrar: Resolver address must not be 0\\\"\\n );\\n defaultResolver = NameResolver(resolver);\\n emit DefaultResolverChanged(NameResolver(resolver));\\n }\\n\\n /**\\n * @dev Transfers ownership of the reverse ENS record associated with the\\n * calling account.\\n * @param owner The address to set as the owner of the reverse record in ENS.\\n * @return The ENS node hash of the reverse record.\\n */\\n function claim(address owner) public override returns (bytes32) {\\n return claimForAddr(msg.sender, owner, address(defaultResolver));\\n }\\n\\n /**\\n * @dev Transfers ownership of the reverse ENS record associated with the\\n * calling account.\\n * @param addr The reverse record to set\\n * @param owner The address to set as the owner of the reverse record in ENS.\\n * @param resolver The resolver of the reverse node\\n * @return The ENS node hash of the reverse record.\\n */\\n function claimForAddr(\\n address addr,\\n address owner,\\n address resolver\\n ) public override authorised(addr) returns (bytes32) {\\n bytes32 labelHash = sha3HexAddress(addr);\\n bytes32 reverseNode = keccak256(\\n abi.encodePacked(ADDR_REVERSE_NODE, labelHash)\\n );\\n emit ReverseClaimed(addr, reverseNode);\\n ens.setSubnodeRecord(ADDR_REVERSE_NODE, labelHash, owner, resolver, 0);\\n return reverseNode;\\n }\\n\\n /**\\n * @dev Transfers ownership of the reverse ENS record associated with the\\n * calling account.\\n * @param owner The address to set as the owner of the reverse record in ENS.\\n * @param resolver The address of the resolver to set; 0 to leave unchanged.\\n * @return The ENS node hash of the reverse record.\\n */\\n function claimWithResolver(\\n address owner,\\n address resolver\\n ) public override returns (bytes32) {\\n return claimForAddr(msg.sender, owner, resolver);\\n }\\n\\n /**\\n * @dev Sets the `name()` record for the reverse ENS record associated with\\n * the calling account. First updates the resolver to the default reverse\\n * resolver if necessary.\\n * @param name The name to set for this address.\\n * @return The ENS node hash of the reverse record.\\n */\\n function setName(string memory name) public override returns (bytes32) {\\n return\\n setNameForAddr(\\n msg.sender,\\n msg.sender,\\n address(defaultResolver),\\n name\\n );\\n }\\n\\n /**\\n * @dev Sets the `name()` record for the reverse ENS record associated with\\n * the account provided. Updates the resolver to a designated resolver\\n * Only callable by controllers and authorised users\\n * @param addr The reverse record to set\\n * @param owner The owner of the reverse node\\n * @param resolver The resolver of the reverse node\\n * @param name The name to set for this address.\\n * @return The ENS node hash of the reverse record.\\n */\\n function setNameForAddr(\\n address addr,\\n address owner,\\n address resolver,\\n string memory name\\n ) public override returns (bytes32) {\\n bytes32 node = claimForAddr(addr, owner, resolver);\\n NameResolver(resolver).setName(node, name);\\n return node;\\n }\\n\\n /**\\n * @dev Returns the node hash for a given account's reverse records.\\n * @param addr The address to hash\\n * @return The ENS node hash.\\n */\\n function node(address addr) public pure override returns (bytes32) {\\n return\\n keccak256(\\n abi.encodePacked(ADDR_REVERSE_NODE, sha3HexAddress(addr))\\n );\\n }\\n\\n /**\\n * @dev An optimised function to compute the sha3 of the lower-case\\n * hexadecimal representation of an Ethereum address.\\n * @param addr The address to hash\\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\\n * input address.\\n */\\n function sha3HexAddress(address addr) private pure returns (bytes32 ret) {\\n assembly {\\n for {\\n let i := 40\\n } gt(i, 0) {\\n\\n } {\\n i := sub(i, 1)\\n mstore8(i, byte(and(addr, 0xf), lookup))\\n addr := div(addr, 0x10)\\n i := sub(i, 1)\\n mstore8(i, byte(and(addr, 0xf), lookup))\\n addr := div(addr, 0x10)\\n }\\n\\n ret := keccak256(0, 40)\\n }\\n }\\n\\n function ownsContract(address addr) internal view returns (bool) {\\n try Ownable(addr).owner() returns (address owner) {\\n return owner == msg.sender;\\n } catch {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd57d28e5791b4b44650a00f5ef6c725af53698ec33faeeaa3591f0dbd939559a\"},\"contracts/root/Controllable.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\ncontract Controllable is Ownable {\\n mapping(address => bool) public controllers;\\n\\n event ControllerChanged(address indexed controller, bool enabled);\\n\\n modifier onlyController() {\\n require(\\n controllers[msg.sender],\\n \\\"Controllable: Caller is not a controller\\\"\\n );\\n _;\\n }\\n\\n function setController(address controller, bool enabled) public onlyOwner {\\n controllers[controller] = enabled;\\n emit ControllerChanged(controller, enabled);\\n }\\n}\\n\",\"keccak256\":\"0xb19b8c0fafe9ca2b4bf8aaafee486fa31437672e1e1977bdf84bfe03464969db\"},\"contracts/utils/ERC20Recoverable.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.17 <0.9.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n @notice Contract is used to recover ERC20 tokens sent to the contract by mistake.\\n */\\n\\ncontract ERC20Recoverable is Ownable {\\n /**\\n @notice Recover ERC20 tokens sent to the contract by mistake.\\n @dev The contract is Ownable and only the owner can call the recover function.\\n @param _to The address to send the tokens to.\\n@param _token The address of the ERC20 token to recover\\n @param _amount The amount of tokens to recover.\\n */\\n function recoverFunds(\\n address _token,\\n address _to,\\n uint256 _amount\\n ) external onlyOwner {\\n IERC20(_token).transfer(_to, _amount);\\n }\\n}\\n\",\"keccak256\":\"0x793a38091e1f81499a29ddba82c2b2f3cdd07071b81a832886e8e02a45ff352a\",\"license\":\"MIT\"},\"contracts/wrapper/IMetadataService.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IMetadataService {\\n function uri(uint256) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xb3f1cf6df01ed7b15e5f2318f6823afbdb586ca38c2124c67955c645647ae9a2\",\"license\":\"MIT\"},\"contracts/wrapper/INameWrapper.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"../ethregistrar/IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./IMetadataService.sol\\\";\\nimport \\\"./INameWrapperUpgrade.sol\\\";\\n\\nuint32 constant CANNOT_UNWRAP = 1;\\nuint32 constant CANNOT_BURN_FUSES = 2;\\nuint32 constant CANNOT_TRANSFER = 4;\\nuint32 constant CANNOT_SET_RESOLVER = 8;\\nuint32 constant CANNOT_SET_TTL = 16;\\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\\nuint32 constant CANNOT_APPROVE = 64;\\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\\nuint32 constant IS_DOT_ETH = 1 << 17;\\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\\nuint32 constant CAN_DO_EVERYTHING = 0;\\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\\n// all fuses apart from IS_DOT_ETH\\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\\n\\ninterface INameWrapper is IERC1155 {\\n event NameWrapped(\\n bytes32 indexed node,\\n bytes name,\\n address owner,\\n uint32 fuses,\\n uint64 expiry\\n );\\n\\n event NameUnwrapped(bytes32 indexed node, address owner);\\n\\n event FusesSet(bytes32 indexed node, uint32 fuses);\\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\\n\\n function ens() external view returns (ENS);\\n\\n function registrar() external view returns (IBaseRegistrar);\\n\\n function metadataService() external view returns (IMetadataService);\\n\\n function names(bytes32) external view returns (bytes memory);\\n\\n function name() external view returns (string memory);\\n\\n function upgradeContract() external view returns (INameWrapperUpgrade);\\n\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n\\n function wrap(\\n bytes calldata name,\\n address wrappedOwner,\\n address resolver\\n ) external;\\n\\n function wrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint16 ownerControlledFuses,\\n address resolver\\n ) external returns (uint64 expires);\\n\\n function registerAndWrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint256 duration,\\n address resolver,\\n uint16 ownerControlledFuses\\n ) external returns (uint256 registrarExpiry);\\n\\n function renew(\\n uint256 labelHash,\\n uint256 duration\\n ) external returns (uint256 expires);\\n\\n function unwrap(bytes32 node, bytes32 label, address owner) external;\\n\\n function unwrapETH2LD(\\n bytes32 label,\\n address newRegistrant,\\n address newController\\n ) external;\\n\\n function upgrade(bytes calldata name, bytes calldata extraData) external;\\n\\n function setFuses(\\n bytes32 node,\\n uint16 ownerControlledFuses\\n ) external returns (uint32 newFuses);\\n\\n function setChildFuses(\\n bytes32 parentNode,\\n bytes32 labelhash,\\n uint32 fuses,\\n uint64 expiry\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n string calldata label,\\n address owner,\\n address resolver,\\n uint64 ttl,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n string calldata label,\\n address newOwner,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function extendExpiry(\\n bytes32 node,\\n bytes32 labelhash,\\n uint64 expiry\\n ) external returns (uint64);\\n\\n function canModifyName(\\n bytes32 node,\\n address addr\\n ) external view returns (bool);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function ownerOf(uint256 id) external view returns (address owner);\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address);\\n\\n function getData(\\n uint256 id\\n ) external view returns (address, uint32, uint64);\\n\\n function setMetadataService(IMetadataService _metadataService) external;\\n\\n function uri(uint256 tokenId) external view returns (string memory);\\n\\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\\n\\n function allFusesBurned(\\n bytes32 node,\\n uint32 fuseMask\\n ) external view returns (bool);\\n\\n function isWrapped(bytes32) external view returns (bool);\\n\\n function isWrapped(bytes32, bytes32) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x70310eb67146d7290731c31841399640ac3b6a949eadc6598bc150123d185c57\",\"license\":\"MIT\"},\"contracts/wrapper/INameWrapperUpgrade.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface INameWrapperUpgrade {\\n function wrapFromUpgrade(\\n bytes calldata name,\\n address wrappedOwner,\\n uint32 fuses,\\n uint64 expiry,\\n address approved,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x42e0cec6cd9d1a62d51d45b678f69d3e4ad5555e659b197e41257b308346bb8a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101206040523480156200001257600080fd5b5060405162001e6838038062001e68833981016040819052620000359162000243565b82336200004281620001da565b6040516302571be360e01b81527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260048201526000906001600160a01b038416906302571be390602401602060405180830381865afa158015620000aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d09190620002ed565b604051630f41a04d60e11b81526001600160a01b03848116600483015291925090821690631e83409a906024016020604051808303816000875af11580156200011d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000143919062000314565b5050505086861162000168576040516307cb550760e31b815260040160405180910390fd5b428611156200018a57604051630b4319e560e21b815260040160405180910390fd5b6001600160a01b0397881660805260a09690965260c0949094525090841660e052831661010052600180549184166001600160a01b0319928316179055600280549290931691161790556200032e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200024057600080fd5b50565b600080600080600080600080610100898b0312156200026157600080fd5b88516200026e816200022a565b809850506020890151965060408901519550606089015162000290816200022a565b60808a0151909550620002a3816200022a565b60a08a0151909450620002b6816200022a565b60c08a0151909350620002c9816200022a565b60e08a0151909250620002dc816200022a565b809150509295985092959890939650565b6000602082840312156200030057600080fd5b81516200030d816200022a565b9392505050565b6000602082840312156200032757600080fd5b5051919050565b60805160a05160c05160e05161010051611acb6200039d600039600081816102c90152818161062f015261080101526000818161022d0152610fa201526000818161031601528181610b320152610dc901526000818161027e0152610d52015260006109050152611acb6000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c80638d839ffe116100cd578063aeb8ce9b11610081578063dbcfd29d11610066578063dbcfd29d14610338578063f14fcbc81461034b578063f2fde38b1461035e57600080fd5b8063aeb8ce9b146102fe578063ce1e09c01461031157600080fd5b80639791c097116100b25780639791c097146102b1578063a8e5fbc0146102c4578063acf1a841146102eb57600080fd5b80638d839ffe146102795780638da5cb5b146102a057600080fd5b8063715018a61161012457806380869853116101095780638086985314610228578063839df9451461024f5780638a95b09f1461026f57600080fd5b8063715018a61461020d57806374694a2b1461021557600080fd5b80635d3590d5116101555780635d3590d5146101c45780635fac5574146101d957806365a69dcf146101ec57600080fd5b806301ffc9a714610171578063170f9d9f14610199575b600080fd5b61018461017f3660046111e3565b610371565b60405190151581526020015b60405180910390f35b6002546101ac906001600160a01b031681565b6040516001600160a01b039091168152602001610190565b6101d76101d2366004611241565b61040a565b005b6001546101ac906001600160a01b031681565b6101ff6101fa3660046113ae565b6104a4565b604051908152602001610190565b6101d7610549565b6101d76102233660046114b1565b61055d565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101ff61025d36600461157b565b60036020526000908152604090205481565b6101ff6224ea0081565b6101ff7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03166101ac565b6101846102bf366004611594565b61078f565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101d76102f93660046115d1565b6107a4565b61018461030c366004611594565b6108bc565b6101ff7f000000000000000000000000000000000000000000000000000000000000000081565b6101d761034636600461161d565b61097f565b6101d761035936600461157b565b610b13565b6101d761036c366004611650565b610ba4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061040457507fffffffff0000000000000000000000000000000000000000000000000000000082167fe2c97af600000000000000000000000000000000000000000000000000000000145b92915050565b610412610c34565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af115801561047a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049e919061166b565b50505050565b60006104ae610c34565b895160208b012084158015906104cb57506001600160a01b038716155b15610502576040517fd3f605c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808a8a8a8a8a8a8a8a60405160200161052399989796959493929190611740565b604051602081830303815290604052805190602001209150509998505050505050505050565b610551610c34565b61055b6000610cde565b565b610565610c34565b6105fc8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050886105f78d8d8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508f92508e91508d90508c8c8c8c8c6104a4565b610d3b565b6040517fa40149820000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a40149829061066e908e908e908e908e908d908a906004016117a2565b6020604051808303816000875af115801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b191906117ec565b905083156106dc576106dc868c8c6040516106cd929190611805565b60405180910390208787610ebd565b8215610725576107258b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508d9150610fa09050565b886001600160a01b03168b8b60405161073f929190611805565b60405180910390207f0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa8d8d8560405161077a93929190611815565b60405180910390a35050505050505050505050565b6000600361079c83611054565b101592915050565b6107ac610c34565b600083836040516107be929190611805565b6040519081900381207fc475abff0000000000000000000000000000000000000000000000000000000082526004820181905260248201849052915081906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c475abff906044016020604051808303816000875af1158015610852573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087691906117ec565b9050827f93bc1a84707231b1d9552157299797c64a1a8c5bc79f05153716630c9c4936fc8787846040516108ac93929190611815565b60405180910390a2505050505050565b805160208201206000906108cf8361078f565b801561097857506040517f96e494e8000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906396e494e890602401602060405180830381865afa158015610954573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610978919061166b565b9392505050565b6000546001600160a01b031633146109de5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038216610a345760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206d696e74657220616464726573730000000000000000000060448201526064016109d5565b6001600160a01b038116610a8a5760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206d696e74657232206164647265737300000000000000000060448201526064016109d5565b600154604080516001600160a01b039283168152848316602082015291831682820152517f1dd0036c0e7f90a80939287ea32c848ee77bb8532fb896b7abbe6c778c7d90bd9181900360600190a1600180546001600160a01b0393841673ffffffffffffffffffffffffffffffffffffffff199182161790915560028054929093169116179055565b610b1b610c34565b6000818152600360205260409020544290610b57907f00000000000000000000000000000000000000000000000000000000000000009061184f565b10610b91576040517f0a059d71000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000908152600360205260409020429055565b610bac610c34565b6001600160a01b038116610c285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109d5565b610c3181610cde565b50565b6000546001600160a01b0316331480610c5757506001546001600160a01b031633145b80610c6c57506002546001600160a01b031633145b61055b5760405162461bcd60e51b815260206004820152603660248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201527f31206f72206d696e746572206f72206d696e746572320000000000000000000060648201526084016109d5565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600360205260409020544290610d77907f00000000000000000000000000000000000000000000000000000000000000009061184f565b1115610db2576040517f5320bcf9000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000818152600360205260409020544290610dee907f00000000000000000000000000000000000000000000000000000000000000009061184f565b11610e28576040517fcb7690d7000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b610e31836108bc565b610e6957826040517f477707e80000000000000000000000000000000000000000000000000000000081526004016109d591906118b2565b6000818152600360205260408120556224ea00821015610eb8576040517f9a71997b000000000000000000000000000000000000000000000000000000008152600481018390526024016109d5565b505050565b604080517fe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463602080830191909152818301869052825180830384018152606083019384905280519101207fe32954eb0000000000000000000000000000000000000000000000000000000090925285906001600160a01b0382169063e32954eb90610f50908590889088906064016118c5565b6000604051808303816000875af1158015610f6f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f9791908101906118e8565b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a806d6b82838587604051602001610fe391906119e7565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016110119493929190611a28565b6020604051808303816000875af1158015611030573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049e91906117ec565b8051600090819081905b808210156111da57600085838151811061107a5761107a611a66565b01602001516001600160f81b03191690507f80000000000000000000000000000000000000000000000000000000000000008110156110c5576110be60018461184f565b92506111c7565b7fe0000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015611102576110be60028461184f565b7ff0000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561113f576110be60038461184f565b7ff8000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561117c576110be60048461184f565b7ffc000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610156111b9576110be60058461184f565b6111c460068461184f565b92505b50826111d281611a7c565b93505061105e565b50909392505050565b6000602082840312156111f557600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461097857600080fd5b80356001600160a01b038116811461123c57600080fd5b919050565b60008060006060848603121561125657600080fd5b61125f84611225565b925061126d60208501611225565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156112bc576112bc61127d565b604052919050565b600067ffffffffffffffff8211156112de576112de61127d565b50601f01601f191660200190565b600082601f8301126112fd57600080fd5b813561131061130b826112c4565b611293565b81815284602083860101111561132557600080fd5b816020850160208301376000918101602001919091529392505050565b60008083601f84011261135457600080fd5b50813567ffffffffffffffff81111561136c57600080fd5b6020830191508360208260051b850101111561138757600080fd5b9250929050565b8015158114610c3157600080fd5b803561ffff8116811461123c57600080fd5b60008060008060008060008060006101008a8c0312156113cd57600080fd5b893567ffffffffffffffff808211156113e557600080fd5b6113f18d838e016112ec565b9a506113ff60208d01611225565b995060408c0135985060608c0135975061141b60808d01611225565b965060a08c013591508082111561143157600080fd5b5061143e8c828d01611342565b90955093505060c08a01356114528161138e565b915061146060e08b0161139c565b90509295985092959850929598565b60008083601f84011261148157600080fd5b50813567ffffffffffffffff81111561149957600080fd5b60208301915083602082850101111561138757600080fd5b6000806000806000806000806000806101008b8d0312156114d157600080fd5b8a3567ffffffffffffffff808211156114e957600080fd5b6114f58e838f0161146f565b909c509a508a915061150960208e01611225565b995060408d0135985060608d0135975061152560808e01611225565b965060a08d013591508082111561153b57600080fd5b506115488d828e01611342565b90955093505060c08b013561155c8161138e565b915061156a60e08c0161139c565b90509295989b9194979a5092959850565b60006020828403121561158d57600080fd5b5035919050565b6000602082840312156115a657600080fd5b813567ffffffffffffffff8111156115bd57600080fd5b6115c9848285016112ec565b949350505050565b6000806000604084860312156115e657600080fd5b833567ffffffffffffffff8111156115fd57600080fd5b6116098682870161146f565b909790965060209590950135949350505050565b6000806040838503121561163057600080fd5b61163983611225565b915061164760208401611225565b90509250929050565b60006020828403121561166257600080fd5b61097882611225565b60006020828403121561167d57600080fd5b81516109788161138e565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b818352600060208085019450848460051b86018460005b878110156117335783830389528135601e198836030181126116e957600080fd5b8701858101903567ffffffffffffffff81111561170557600080fd5b80360382131561171457600080fd5b61171f858284611688565b9a87019a94505050908401906001016116c8565b5090979650505050505050565b60006101008b83526001600160a01b03808c1660208501528a60408501528960608501528089166080850152508060a084015261178081840187896116b1565b94151560c0840152505061ffff9190911660e090910152979650505050505050565b60a0815260006117b660a08301888a611688565b90506001600160a01b03808716602084015285604084015280851660608401525061ffff83166080830152979650505050505050565b6000602082840312156117fe57600080fd5b5051919050565b8183823760009101908152919050565b604081526000611829604083018587611688565b9050826020830152949350505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561040457610404611839565b60005b8381101561187d578181015183820152602001611865565b50506000910152565b6000815180845261189e816020860160208601611862565b601f01601f19169290920160200192915050565b6020815260006109786020830184611886565b8381526040602082015260006118df6040830184866116b1565b95945050505050565b600060208083850312156118fb57600080fd5b825167ffffffffffffffff8082111561191357600080fd5b818501915085601f83011261192757600080fd5b8151818111156119395761193961127d565b8060051b611948858201611293565b918252838101850191858101908984111561196257600080fd5b86860192505b838310156119da578251858111156119805760008081fd5b8601603f81018b136119925760008081fd5b8781015160406119a461130b836112c4565b8281528d828486010111156119b95760008081fd5b6119c8838c8301848701611862565b85525050509186019190860190611968565b9998505050505050505050565b600082516119f9818460208701611862565b7f2e616e7900000000000000000000000000000000000000000000000000000000920191825250600401919050565b60006001600160a01b038087168352808616602084015280851660408401525060806060830152611a5c6080830184611886565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201611a8e57611a8e611839565b506001019056fea2646970667358221220a754c6777a5bcfe2bc0530ce3673d6e5d5288930ee6933c3cea47b12504a991064736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061016c5760003560e01c80638d839ffe116100cd578063aeb8ce9b11610081578063dbcfd29d11610066578063dbcfd29d14610338578063f14fcbc81461034b578063f2fde38b1461035e57600080fd5b8063aeb8ce9b146102fe578063ce1e09c01461031157600080fd5b80639791c097116100b25780639791c097146102b1578063a8e5fbc0146102c4578063acf1a841146102eb57600080fd5b80638d839ffe146102795780638da5cb5b146102a057600080fd5b8063715018a61161012457806380869853116101095780638086985314610228578063839df9451461024f5780638a95b09f1461026f57600080fd5b8063715018a61461020d57806374694a2b1461021557600080fd5b80635d3590d5116101555780635d3590d5146101c45780635fac5574146101d957806365a69dcf146101ec57600080fd5b806301ffc9a714610171578063170f9d9f14610199575b600080fd5b61018461017f3660046111e3565b610371565b60405190151581526020015b60405180910390f35b6002546101ac906001600160a01b031681565b6040516001600160a01b039091168152602001610190565b6101d76101d2366004611241565b61040a565b005b6001546101ac906001600160a01b031681565b6101ff6101fa3660046113ae565b6104a4565b604051908152602001610190565b6101d7610549565b6101d76102233660046114b1565b61055d565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101ff61025d36600461157b565b60036020526000908152604090205481565b6101ff6224ea0081565b6101ff7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03166101ac565b6101846102bf366004611594565b61078f565b6101ac7f000000000000000000000000000000000000000000000000000000000000000081565b6101d76102f93660046115d1565b6107a4565b61018461030c366004611594565b6108bc565b6101ff7f000000000000000000000000000000000000000000000000000000000000000081565b6101d761034636600461161d565b61097f565b6101d761035936600461157b565b610b13565b6101d761036c366004611650565b610ba4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061040457507fffffffff0000000000000000000000000000000000000000000000000000000082167fe2c97af600000000000000000000000000000000000000000000000000000000145b92915050565b610412610c34565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820183905284169063a9059cbb906044016020604051808303816000875af115801561047a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049e919061166b565b50505050565b60006104ae610c34565b895160208b012084158015906104cb57506001600160a01b038716155b15610502576040517fd3f605c400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808a8a8a8a8a8a8a8a60405160200161052399989796959493929190611740565b604051602081830303815290604052805190602001209150509998505050505050505050565b610551610c34565b61055b6000610cde565b565b610565610c34565b6105fc8a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050886105f78d8d8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508f92508e91508d90508c8c8c8c8c6104a4565b610d3b565b6040517fa40149820000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a40149829061066e908e908e908e908e908d908a906004016117a2565b6020604051808303816000875af115801561068d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b191906117ec565b905083156106dc576106dc868c8c6040516106cd929190611805565b60405180910390208787610ebd565b8215610725576107258b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92508d9150610fa09050565b886001600160a01b03168b8b60405161073f929190611805565b60405180910390207f0667086d08417333ce63f40d5bc2ef6fd330e25aaaf317b7c489541f8fe600fa8d8d8560405161077a93929190611815565b60405180910390a35050505050505050505050565b6000600361079c83611054565b101592915050565b6107ac610c34565b600083836040516107be929190611805565b6040519081900381207fc475abff0000000000000000000000000000000000000000000000000000000082526004820181905260248201849052915081906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c475abff906044016020604051808303816000875af1158015610852573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087691906117ec565b9050827f93bc1a84707231b1d9552157299797c64a1a8c5bc79f05153716630c9c4936fc8787846040516108ac93929190611815565b60405180910390a2505050505050565b805160208201206000906108cf8361078f565b801561097857506040517f96e494e8000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906396e494e890602401602060405180830381865afa158015610954573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610978919061166b565b9392505050565b6000546001600160a01b031633146109de5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038216610a345760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206d696e74657220616464726573730000000000000000000060448201526064016109d5565b6001600160a01b038116610a8a5760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206d696e74657232206164647265737300000000000000000060448201526064016109d5565b600154604080516001600160a01b039283168152848316602082015291831682820152517f1dd0036c0e7f90a80939287ea32c848ee77bb8532fb896b7abbe6c778c7d90bd9181900360600190a1600180546001600160a01b0393841673ffffffffffffffffffffffffffffffffffffffff199182161790915560028054929093169116179055565b610b1b610c34565b6000818152600360205260409020544290610b57907f00000000000000000000000000000000000000000000000000000000000000009061184f565b10610b91576040517f0a059d71000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000908152600360205260409020429055565b610bac610c34565b6001600160a01b038116610c285760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109d5565b610c3181610cde565b50565b6000546001600160a01b0316331480610c5757506001546001600160a01b031633145b80610c6c57506002546001600160a01b031633145b61055b5760405162461bcd60e51b815260206004820152603660248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201527f31206f72206d696e746572206f72206d696e746572320000000000000000000060648201526084016109d5565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600360205260409020544290610d77907f00000000000000000000000000000000000000000000000000000000000000009061184f565b1115610db2576040517f5320bcf9000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000818152600360205260409020544290610dee907f00000000000000000000000000000000000000000000000000000000000000009061184f565b11610e28576040517fcb7690d7000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b610e31836108bc565b610e6957826040517f477707e80000000000000000000000000000000000000000000000000000000081526004016109d591906118b2565b6000818152600360205260408120556224ea00821015610eb8576040517f9a71997b000000000000000000000000000000000000000000000000000000008152600481018390526024016109d5565b505050565b604080517fe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463602080830191909152818301869052825180830384018152606083019384905280519101207fe32954eb0000000000000000000000000000000000000000000000000000000090925285906001600160a01b0382169063e32954eb90610f50908590889088906064016118c5565b6000604051808303816000875af1158015610f6f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f9791908101906118e8565b50505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a806d6b82838587604051602001610fe391906119e7565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016110119493929190611a28565b6020604051808303816000875af1158015611030573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049e91906117ec565b8051600090819081905b808210156111da57600085838151811061107a5761107a611a66565b01602001516001600160f81b03191690507f80000000000000000000000000000000000000000000000000000000000000008110156110c5576110be60018461184f565b92506111c7565b7fe0000000000000000000000000000000000000000000000000000000000000006001600160f81b031982161015611102576110be60028461184f565b7ff0000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561113f576110be60038461184f565b7ff8000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561117c576110be60048461184f565b7ffc000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610156111b9576110be60058461184f565b6111c460068461184f565b92505b50826111d281611a7c565b93505061105e565b50909392505050565b6000602082840312156111f557600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461097857600080fd5b80356001600160a01b038116811461123c57600080fd5b919050565b60008060006060848603121561125657600080fd5b61125f84611225565b925061126d60208501611225565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156112bc576112bc61127d565b604052919050565b600067ffffffffffffffff8211156112de576112de61127d565b50601f01601f191660200190565b600082601f8301126112fd57600080fd5b813561131061130b826112c4565b611293565b81815284602083860101111561132557600080fd5b816020850160208301376000918101602001919091529392505050565b60008083601f84011261135457600080fd5b50813567ffffffffffffffff81111561136c57600080fd5b6020830191508360208260051b850101111561138757600080fd5b9250929050565b8015158114610c3157600080fd5b803561ffff8116811461123c57600080fd5b60008060008060008060008060006101008a8c0312156113cd57600080fd5b893567ffffffffffffffff808211156113e557600080fd5b6113f18d838e016112ec565b9a506113ff60208d01611225565b995060408c0135985060608c0135975061141b60808d01611225565b965060a08c013591508082111561143157600080fd5b5061143e8c828d01611342565b90955093505060c08a01356114528161138e565b915061146060e08b0161139c565b90509295985092959850929598565b60008083601f84011261148157600080fd5b50813567ffffffffffffffff81111561149957600080fd5b60208301915083602082850101111561138757600080fd5b6000806000806000806000806000806101008b8d0312156114d157600080fd5b8a3567ffffffffffffffff808211156114e957600080fd5b6114f58e838f0161146f565b909c509a508a915061150960208e01611225565b995060408d0135985060608d0135975061152560808e01611225565b965060a08d013591508082111561153b57600080fd5b506115488d828e01611342565b90955093505060c08b013561155c8161138e565b915061156a60e08c0161139c565b90509295989b9194979a5092959850565b60006020828403121561158d57600080fd5b5035919050565b6000602082840312156115a657600080fd5b813567ffffffffffffffff8111156115bd57600080fd5b6115c9848285016112ec565b949350505050565b6000806000604084860312156115e657600080fd5b833567ffffffffffffffff8111156115fd57600080fd5b6116098682870161146f565b909790965060209590950135949350505050565b6000806040838503121561163057600080fd5b61163983611225565b915061164760208401611225565b90509250929050565b60006020828403121561166257600080fd5b61097882611225565b60006020828403121561167d57600080fd5b81516109788161138e565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b818352600060208085019450848460051b86018460005b878110156117335783830389528135601e198836030181126116e957600080fd5b8701858101903567ffffffffffffffff81111561170557600080fd5b80360382131561171457600080fd5b61171f858284611688565b9a87019a94505050908401906001016116c8565b5090979650505050505050565b60006101008b83526001600160a01b03808c1660208501528a60408501528960608501528089166080850152508060a084015261178081840187896116b1565b94151560c0840152505061ffff9190911660e090910152979650505050505050565b60a0815260006117b660a08301888a611688565b90506001600160a01b03808716602084015285604084015280851660608401525061ffff83166080830152979650505050505050565b6000602082840312156117fe57600080fd5b5051919050565b8183823760009101908152919050565b604081526000611829604083018587611688565b9050826020830152949350505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561040457610404611839565b60005b8381101561187d578181015183820152602001611865565b50506000910152565b6000815180845261189e816020860160208601611862565b601f01601f19169290920160200192915050565b6020815260006109786020830184611886565b8381526040602082015260006118df6040830184866116b1565b95945050505050565b600060208083850312156118fb57600080fd5b825167ffffffffffffffff8082111561191357600080fd5b818501915085601f83011261192757600080fd5b8151818111156119395761193961127d565b8060051b611948858201611293565b918252838101850191858101908984111561196257600080fd5b86860192505b838310156119da578251858111156119805760008081fd5b8601603f81018b136119925760008081fd5b8781015160406119a461130b836112c4565b8281528d828486010111156119b95760008081fd5b6119c8838c8301848701611862565b85525050509186019190860190611968565b9998505050505050505050565b600082516119f9818460208701611862565b7f2e616e7900000000000000000000000000000000000000000000000000000000920191825250600401919050565b60006001600160a01b038087168352808616602084015280851660408401525060806060830152611a5c6080830184611886565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201611a8e57611a8e611839565b506001019056fea2646970667358221220a754c6777a5bcfe2bc0530ce3673d6e5d5288930ee6933c3cea47b12504a991064736f6c63430008110033", "devdoc": { "kind": "dev", "methods": { @@ -648,11 +710,27 @@ "type": "t_address" }, { - "astId": 3614, + "astId": 3610, "contract": "contracts/anytype/AnytypeRegistrarControllerPrivate.sol:AnytypeRegistrarControllerPrivate", - "label": "commitments", + "label": "minterAccount", "offset": 0, "slot": "1", + "type": "t_address" + }, + { + "astId": 3612, + "contract": "contracts/anytype/AnytypeRegistrarControllerPrivate.sol:AnytypeRegistrarControllerPrivate", + "label": "minterAccount2", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 3616, + "contract": "contracts/anytype/AnytypeRegistrarControllerPrivate.sol:AnytypeRegistrarControllerPrivate", + "label": "commitments", + "offset": 0, + "slot": "3", "type": "t_mapping(t_bytes32,t_uint256)" } ], diff --git a/deployments/sepolia/AnytypeRegistrarImplementation.json b/deployments/sepolia/AnytypeRegistrarImplementation.json index bf3ef88..831477e 100644 --- a/deployments/sepolia/AnytypeRegistrarImplementation.json +++ b/deployments/sepolia/AnytypeRegistrarImplementation.json @@ -1,5 +1,5 @@ { - "address": "0x42dEa7D082F38018bB3FAb9E4F9D822654f03b32", + "address": "0xeFb15Cc3A6D496F54dcD112B29adF9fD0E03d2d4", "abi": [ { "inputs": [ @@ -705,39 +705,39 @@ "type": "function" } ], - "transactionHash": "0x99e3ec2bae7d15e1c863edcd09fb5c08f8f9d7ec375f3dc77dd30752354a3b54", + "transactionHash": "0x91c84bb665324c590788083094a78169e6733765fa555fc51821df4aebe43c34", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x42dEa7D082F38018bB3FAb9E4F9D822654f03b32", - "transactionIndex": 88, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0xeFb15Cc3A6D496F54dcD112B29adF9fD0E03d2d4", + "transactionIndex": 0, "gasUsed": "1878985", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000002080000000000000000000000000000000000000000001000000000000000000001000000000000000021000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000040000000000000000000000000000000000000000000000000", - "blockHash": "0x9c32877a1ed1d93742f84365f85f7517d9de603b13a9236538b7134d2441d667", - "transactionHash": "0x99e3ec2bae7d15e1c863edcd09fb5c08f8f9d7ec375f3dc77dd30752354a3b54", + "logsBloom": "0x00002000000000000000000000000000000000000000000000800000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000080000820000000000000000000800000000000000000000000000000000400000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe9877a52658cf1ce514ec3f02ac22290b4f2b7a7ffe08d0ece93bcfc845ccaf0", + "transactionHash": "0x91c84bb665324c590788083094a78169e6733765fa555fc51821df4aebe43c34", "logs": [ { - "transactionIndex": 88, - "blockNumber": 5327826, - "transactionHash": "0x99e3ec2bae7d15e1c863edcd09fb5c08f8f9d7ec375f3dc77dd30752354a3b54", - "address": "0x42dEa7D082F38018bB3FAb9E4F9D822654f03b32", + "transactionIndex": 0, + "blockNumber": 5650127, + "transactionHash": "0x91c84bb665324c590788083094a78169e6733765fa555fc51821df4aebe43c34", + "address": "0xeFb15Cc3A6D496F54dcD112B29adF9fD0E03d2d4", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", - "logIndex": 170, - "blockHash": "0x9c32877a1ed1d93742f84365f85f7517d9de603b13a9236538b7134d2441d667" + "logIndex": 0, + "blockHash": "0xe9877a52658cf1ce514ec3f02ac22290b4f2b7a7ffe08d0ece93bcfc845ccaf0" } ], - "blockNumber": 5327826, - "cumulativeGasUsed": "14437198", + "blockNumber": 5650127, + "cumulativeGasUsed": "1878985", "status": 1, "byzantium": true }, "args": [ - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", "0xe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463" ], "numDeployments": 1, diff --git a/deployments/sepolia/AnytypeResolver.json b/deployments/sepolia/AnytypeResolver.json index 75faf3b..3754480 100644 --- a/deployments/sepolia/AnytypeResolver.json +++ b/deployments/sepolia/AnytypeResolver.json @@ -1,5 +1,5 @@ { - "address": "0x44Fafbc60BdA830a0EaEBcdd39Af79Cdf969cdb7", + "address": "0xf8865eFF5C792024e45D9627Fce811a0b041cA00", "abi": [ { "inputs": [ @@ -803,57 +803,57 @@ "type": "function" } ], - "transactionHash": "0xf6a3eed22c676056c3a6ce101fc2cff32ab751a70aa471aa41d5fbeb265feed8", + "transactionHash": "0x0a883a0194f3e659093888f5c3ffb5b37f58f91e78e85c3dd773f8ff70fd238c", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x44Fafbc60BdA830a0EaEBcdd39Af79Cdf969cdb7", - "transactionIndex": 102, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0xf8865eFF5C792024e45D9627Fce811a0b041cA00", + "transactionIndex": 41, "gasUsed": "2229032", - "logsBloom": "0x00000000000000000000000000000000000000000040000000000000000000002000000000100000400000000000000000000000000010000000000000000000000000000008000000000000008000200000000000000000000000020000000000000000000000000000000000000004000000400000000000000000000080000000000000000000000000000000000000000000000000200000000000000000000000000000000000000010000000002000000008000000008000040000000000000000000000000000008020005000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000020", - "blockHash": "0x14ce85b59588811c06ac132fbc8b7cb68881151504cf3fa9e46a29bede3766d7", - "transactionHash": "0xf6a3eed22c676056c3a6ce101fc2cff32ab751a70aa471aa41d5fbeb265feed8", + "logsBloom": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000400000080000000000000000000000000000080000000000000000000000000000000000100000000000000000000000000000000020000000000000000008000000000000000001000000000000000000000000000000000000000002000000000020000000000000000000000000000100000000000c0000000004000008000048000400000000000000000000000000000005000000000000000401000000000000000000000000000000000000000000000000000000000001000000000000000000020", + "blockHash": "0x05b3a0058d0bf05fcfca7e02022ac8d8f0369badb89e5d678ffeca8093d56e47", + "transactionHash": "0x0a883a0194f3e659093888f5c3ffb5b37f58f91e78e85c3dd773f8ff70fd238c", "logs": [ { - "transactionIndex": 102, - "blockNumber": 5327844, - "transactionHash": "0xf6a3eed22c676056c3a6ce101fc2cff32ab751a70aa471aa41d5fbeb265feed8", - "address": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", + "transactionIndex": 41, + "blockNumber": 5650145, + "transactionHash": "0x0a883a0194f3e659093888f5c3ffb5b37f58f91e78e85c3dd773f8ff70fd238c", + "address": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", "topics": [ "0x6ada868dd3058cf77a48a74489fd7963688e5464b2b0fa957ace976243270e92", - "0x00000000000000000000000044fafbc60bda830a0eaebcdd39af79cdf969cdb7", - "0x39340685aae6e2feaca256a0e288bd469b4c0fc5a3b4f461919165a9270cd66c" + "0x000000000000000000000000f8865eff5c792024e45d9627fce811a0b041ca00", + "0x88d4b3513e56e61973a0c61f6281e0f14cbe5c2e6b4c495f50f7d5bffcd2f56c" ], "data": "0x", - "logIndex": 222, - "blockHash": "0x14ce85b59588811c06ac132fbc8b7cb68881151504cf3fa9e46a29bede3766d7" + "logIndex": 58, + "blockHash": "0x05b3a0058d0bf05fcfca7e02022ac8d8f0369badb89e5d678ffeca8093d56e47" }, { - "transactionIndex": 102, - "blockNumber": 5327844, - "transactionHash": "0xf6a3eed22c676056c3a6ce101fc2cff32ab751a70aa471aa41d5fbeb265feed8", - "address": "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", + "transactionIndex": 41, + "blockNumber": 5650145, + "transactionHash": "0x0a883a0194f3e659093888f5c3ffb5b37f58f91e78e85c3dd773f8ff70fd238c", + "address": "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", "topics": [ "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", "0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2", - "0xbdd7155d6d0c4325cc59e212e3b250f066020267ebb97be6b13fcf9649d3b982" + "0x3285e39eeeac8a96111a81a4e11f0c045cd02f6752a2974e76fcece55be5dfae" ], - "data": "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60", - "logIndex": 223, - "blockHash": "0x14ce85b59588811c06ac132fbc8b7cb68881151504cf3fa9e46a29bede3766d7" + "data": "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9", + "logIndex": 59, + "blockHash": "0x05b3a0058d0bf05fcfca7e02022ac8d8f0369badb89e5d678ffeca8093d56e47" } ], - "blockNumber": 5327844, - "cumulativeGasUsed": "16986706", + "blockNumber": 5650145, + "cumulativeGasUsed": "11240565", "status": 1, "byzantium": true }, "args": [ - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", - "0x5fd7999d7d84b871F91662Cb6390f6162918515A", - "0x582A09d4c2890F746fccFe1b66a7b1793a035d09", - "0x039bFf9e672aD4CEb2376F642f110898AA850dd8", - "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6" + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", + "0x1840D5416B9a60CA44e79Ff67E8771a1644Fd428", + "0x9EA3c7cC6F17FE621598DbD7BCE560e46c6bA036", + "0x5c0931699A75Ab2947d50327Ff37100f9A192158", + "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e" ], "numDeployments": 1, "solcInputHash": "cd6bf429cc4eb451b6820c60152496f5", diff --git a/deployments/sepolia/ENSRegistry.json b/deployments/sepolia/ENSRegistry.json index 671dd7e..c72f6be 100644 --- a/deployments/sepolia/ENSRegistry.json +++ b/deployments/sepolia/ENSRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", + "address": "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", "abi": [ { "inputs": [ @@ -395,24 +395,24 @@ "type": "function" } ], - "transactionHash": "0xf7e7f41f451cfe7d5b4d88c121547b0e0819fdbd0545f3f0d4b947d539461f55", + "transactionHash": "0x518fe623f8ace9f12961cfb685dc9d724399031f5d9d9d3e4a941f0bfe797b29", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be", - "transactionIndex": 45, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab", + "transactionIndex": 35, "gasUsed": "785195", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x24aba265038108f343a33afe21de859e8ece912bd5f08a1cb1863d1bb5edc916", - "transactionHash": "0xf7e7f41f451cfe7d5b4d88c121547b0e0819fdbd0545f3f0d4b947d539461f55", + "blockHash": "0x48ed320f3bf3c78a8771e4d3465d572344f9e80f20f8e3d2d885ce5900747e4c", + "transactionHash": "0x518fe623f8ace9f12961cfb685dc9d724399031f5d9d9d3e4a941f0bfe797b29", "logs": [], - "blockNumber": 5327821, - "cumulativeGasUsed": "6090505", + "blockNumber": 5650122, + "cumulativeGasUsed": "5685853", "status": 1, "byzantium": true }, "args": [ - "0xF7ce187040B53F40bc1DC3B1b5836cBf64268ef6" + "0xd6c4B6e03DF530f8608F665e97Efac4a63cFf2D7" ], "numDeployments": 1, "bytecode": "0x608060405234801561001057600080fd5b50604051610d2e380380610d2e83398101604081905261002f91610089565b60008080526020527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb58054336001600160a01b031991821617909155600280549091166001600160a01b03929092169190911790556100b9565b60006020828403121561009b57600080fd5b81516001600160a01b03811681146100b257600080fd5b9392505050565b610c66806100c86000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c80635b0fc9c31161008c578063b83f866311610066578063b83f8663146101d5578063cf408823146101e8578063e985e9c5146101fb578063f79fe5381461024757600080fd5b80635b0fc9c31461019c5780635ef2c7f0146101af578063a22cb465146101c257600080fd5b806314ab9038116100bd57806314ab90381461014857806316a25cbd1461015d5780631896f70a1461018957600080fd5b80630178b8bf146100e457806302571be31461011457806306ab592314610127575b600080fd5b6100f76100f2366004610a07565b610272565b6040516001600160a01b0390911681526020015b60405180910390f35b6100f7610122366004610a07565b61033b565b61013a610135366004610a38565b6103aa565b60405190815260200161010b565b61015b610156366004610a87565b61047a565b005b61017061016b366004610a07565b610561565b60405167ffffffffffffffff909116815260200161010b565b61015b610197366004610ab7565b61062b565b61015b6101aa366004610ab7565b6106fd565b61015b6101bd366004610adc565b61079f565b61015b6101d0366004610b3b565b6107c1565b6002546100f7906001600160a01b031681565b61015b6101f6366004610b6e565b61082d565b610237610209366004610bc1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b604051901515815260200161010b565b610237610255366004610a07565b6000908152602081905260409020546001600160a01b0316151590565b6000818152602081905260408120546001600160a01b031661031b576002546040517f0178b8bf000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0390911690630178b8bf906024015b602060405180830381865afa1580156102f1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103159190610bef565b92915050565b6000828152602081905260409020600101546001600160a01b0316610315565b6000818152602081905260408120546001600160a01b03166103a1576002546040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b03909116906302571be3906024016102d4565b61031582610848565b60008381526020819052604081205484906001600160a01b0316338114806103f557506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b6103fe57600080fd5b604080516020808201899052818301889052825180830384018152606090920190925280519101206104308186610870565b6040516001600160a01b0386168152869088907fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e829060200160405180910390a39695505050505050565b60008281526020819052604090205482906001600160a01b0316338114806104c557506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b6104ce57600080fd5b60405167ffffffffffffffff8416815284907f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa689060200160405180910390a25050600091825260208290526040909120600101805467ffffffffffffffff909216600160a01b027fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152602081905260408120546001600160a01b0316610603576002546040517f16a25cbd000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b03909116906316a25cbd90602401602060405180830381865afa1580156105df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103159190610c13565b600082815260208190526040902060010154600160a01b900467ffffffffffffffff16610315565b60008281526020819052604090205482906001600160a01b03163381148061067657506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b61067f57600080fd5b6040516001600160a01b038416815284907f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a09060200160405180910390a25050600091825260208290526040909120600101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091179055565b60008281526020819052604090205482906001600160a01b03163381148061074857506001600160a01b038116600090815260016020908152604080832033845290915290205460ff165b61075157600080fd5b61075b8484610870565b6040516001600160a01b038416815284907fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d2669060200160405180910390a250505050565b60006107ac8686866103aa565b90506107b98184846108c0565b505050505050565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61083784846106fd565b6108428483836108c0565b50505050565b6000818152602081905260408120546001600160a01b03163081036103155750600092915050565b806001600160a01b0381166108825750305b6000838152602081905260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316179055505050565b505050565b6000838152602081905260409020600101546001600160a01b038381169116146109535760008381526020818152604091829020600101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038616908117909155915191825284917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0910160405180910390a25b60008381526020819052604090206001015467ffffffffffffffff828116600160a01b90920416146108bb576000838152602081815260409182902060010180547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff16600160a01b67ffffffffffffffff861690810291909117909155915191825284917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68910160405180910390a2505050565b600060208284031215610a1957600080fd5b5035919050565b6001600160a01b0381168114610a3557600080fd5b50565b600080600060608486031215610a4d57600080fd5b83359250602084013591506040840135610a6681610a20565b809150509250925092565b67ffffffffffffffff81168114610a3557600080fd5b60008060408385031215610a9a57600080fd5b823591506020830135610aac81610a71565b809150509250929050565b60008060408385031215610aca57600080fd5b823591506020830135610aac81610a20565b600080600080600060a08688031215610af457600080fd5b85359450602086013593506040860135610b0d81610a20565b92506060860135610b1d81610a20565b91506080860135610b2d81610a71565b809150509295509295909350565b60008060408385031215610b4e57600080fd5b8235610b5981610a20565b915060208301358015158114610aac57600080fd5b60008060008060808587031215610b8457600080fd5b843593506020850135610b9681610a20565b92506040850135610ba681610a20565b91506060850135610bb681610a71565b939692955090935050565b60008060408385031215610bd457600080fd5b8235610bdf81610a20565b91506020830135610aac81610a20565b600060208284031215610c0157600080fd5b8151610c0c81610a20565b9392505050565b600060208284031215610c2557600080fd5b8151610c0c81610a7156fea26469706673582212200ca228106ebfbcf2a8f9809dd6a6e8feb568201ac730c6e7305d2a35fd19942e64736f6c63430008110033", diff --git a/deployments/sepolia/ERC20NameToken.json b/deployments/sepolia/ERC20NameToken.json index 4debac1..a36b304 100644 --- a/deployments/sepolia/ERC20NameToken.json +++ b/deployments/sepolia/ERC20NameToken.json @@ -1,8 +1,14 @@ { - "address": "0x55c7C1cBb2408881c3F09EdFaf8EEDC212F471d3", + "address": "0xAc9fa64a47f7d3f704649d88bb91981b5eE786d4", "abi": [ { - "inputs": [], + "inputs": [ + { + "internalType": "address", + "name": "_minterAccount", + "type": "address" + } + ], "stateMutability": "nonpayable", "type": "constructor" }, @@ -31,6 +37,25 @@ "name": "Approval", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldMinter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newMinter", + "type": "address" + } + ], + "name": "MinterChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -183,6 +208,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "newMinter", + "type": "address" + } + ], + "name": "changeMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "decimals", @@ -262,6 +300,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "minterAccount", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "name", @@ -388,43 +439,45 @@ "type": "function" } ], - "transactionHash": "0xfd1ecdaf64a36f167494d6ff861ed357bb24eaf5cbb0f8ea34bcf58cd690df84", + "transactionHash": "0x1a5166d82fac6f86f60b3e8fc2ea78a847859a518b5343a35147bba3d4509ec1", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x55c7C1cBb2408881c3F09EdFaf8EEDC212F471d3", - "transactionIndex": 80, - "gasUsed": "897527", - "logsBloom": "0x00000000000000000000000000000000000000000000000004800000000000000000000000000002080000000000000000000000000000000000000000001000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000400000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x41d6dd6735ae85bcc5dee3bbf1c8f5481e3313b8767bcbec4016e786e678970e", - "transactionHash": "0xfd1ecdaf64a36f167494d6ff861ed357bb24eaf5cbb0f8ea34bcf58cd690df84", + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0xAc9fa64a47f7d3f704649d88bb91981b5eE786d4", + "transactionIndex": 37, + "gasUsed": "1015887", + "logsBloom": "0x00002000000000000000000000000000000000000000000000800000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000820000000000000000000800000000000000000000000000000000400000000004000000002000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x71d80cb854125f28e80441f3f3dd0264aa0fcd0ca62b991e571e15194d8844f3", + "transactionHash": "0x1a5166d82fac6f86f60b3e8fc2ea78a847859a518b5343a35147bba3d4509ec1", "logs": [ { - "transactionIndex": 80, - "blockNumber": 5327846, - "transactionHash": "0xfd1ecdaf64a36f167494d6ff861ed357bb24eaf5cbb0f8ea34bcf58cd690df84", - "address": "0x55c7C1cBb2408881c3F09EdFaf8EEDC212F471d3", + "transactionIndex": 37, + "blockNumber": 5650147, + "transactionHash": "0x1a5166d82fac6f86f60b3e8fc2ea78a847859a518b5343a35147bba3d4509ec1", + "address": "0xAc9fa64a47f7d3f704649d88bb91981b5eE786d4", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", "logIndex": 91, - "blockHash": "0x41d6dd6735ae85bcc5dee3bbf1c8f5481e3313b8767bcbec4016e786e678970e" + "blockHash": "0x71d80cb854125f28e80441f3f3dd0264aa0fcd0ca62b991e571e15194d8844f3" } ], - "blockNumber": 5327846, - "cumulativeGasUsed": "15726556", + "blockNumber": 5650147, + "cumulativeGasUsed": "5286151", "status": 1, "byzantium": true }, - "args": [], + "args": [ + "0x48d9872A78e798856c26CC03c68D19db1c633049" + ], "numDeployments": 1, - "solcInputHash": "8f3cb90c314199728aaad15a00a271d1", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approveFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Token contract that allows to buy or renew a single name for 1 year It should not be used for monetary purposes, this is an utility token TODO: turn off transferability Workflow: Anytype Admin mints 1 token to a user User can use this token to buy/renew a name for 1 year\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"AnytypePriceOracle\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/anytype/ERC20NameToken.sol\":\"ERC20NameToken\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1300},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens 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(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/anytype/ERC20NameToken.sol\":{\"content\":\"pragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n * @title AnytypePriceOracle\\n * @dev Token contract that allows to buy or renew a single name for 1 year\\n * It should not be used for monetary purposes, this is an utility token\\n *\\n * TODO: turn off transferability\\n *\\n * Workflow:\\n * Anytype Admin mints 1 token to a user\\n * User can use this token to buy/renew a name for 1 year\\n */\\ncontract ERC20NameToken is Ownable, ERC20 {\\n constructor() ERC20(\\\"AnyNameToken\\\", \\\"ANT\\\") {}\\n\\n function decimals() public view virtual override returns (uint8) {\\n return 6;\\n }\\n\\n function mint(address user_, uint amount_) public onlyOwner {\\n _mint(user_, amount_);\\n }\\n\\n function burn(address user_, uint amount_) public onlyOwner {\\n _burn(user_, amount_);\\n }\\n\\n function approveFor(\\n address from,\\n address spender,\\n uint256 value\\n ) public onlyOwner {\\n _approve(from, spender, value);\\n }\\n}\\n\",\"keccak256\":\"0x5f79821053cf65812b580d06da70ccc92ad973be73b0b811ee44e5775a44cae4\"}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b506040518060400160405280600c81526020016b20b73ca730b6b2aa37b5b2b760a11b8152506040518060400160405280600381526020016210539560ea1b8152506200006d620000676200009360201b60201c565b62000097565b60046200007b83826200018c565b5060056200008a82826200018c565b50505062000258565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200011257607f821691505b6020821081036200013357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200018757600081815260208120601f850160051c81016020861015620001625750805b601f850160051c820191505b8181101562000183578281556001016200016e565b5050505b505050565b81516001600160401b03811115620001a857620001a8620000e7565b620001c081620001b98454620000fd565b8462000139565b602080601f831160018114620001f85760008415620001df5750858301515b600019600386901b1c1916600185901b17855562000183565b600085815260208120601f198616915b82811015620002295788860151825594840194600190910190840162000208565b5085821015620002485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610dea80620002686000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c806370a08231116100b25780639dc29fac11610081578063a9059cbb11610066578063a9059cbb1461024a578063dd62ed3e1461025d578063f2fde38b1461029657600080fd5b80639dc29fac14610224578063a457c2d71461023757600080fd5b806370a08231146101d0578063715018a6146101f95780638da5cb5b1461020157806395d89b411461021c57600080fd5b80632b991746116100ee5780632b99174614610186578063313ce5671461019b57806339509351146101aa57806340c10f19146101bd57600080fd5b806306fdde0314610120578063095ea7b31461013e57806318160ddd1461016157806323b872dd14610173575b600080fd5b6101286102a9565b6040516101359190610c34565b60405180910390f35b61015161014c366004610c9e565b61033b565b6040519015158152602001610135565b6003545b604051908152602001610135565b610151610181366004610cc8565b610355565b610199610194366004610cc8565b610379565b005b60405160068152602001610135565b6101516101b8366004610c9e565b610391565b6101996101cb366004610c9e565b6103d0565b6101656101de366004610d04565b6001600160a01b031660009081526001602052604090205490565b6101996103e6565b6000546040516001600160a01b039091168152602001610135565b6101286103fa565b610199610232366004610c9e565b610409565b610151610245366004610c9e565b61041b565b610151610258366004610c9e565b6104ca565b61016561026b366004610d26565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101996102a4366004610d04565b6104d8565b6060600480546102b890610d59565b80601f01602080910402602001604051908101604052809291908181526020018280546102e490610d59565b80156103315780601f1061030657610100808354040283529160200191610331565b820191906000526020600020905b81548152906001019060200180831161031457829003601f168201915b5050505050905090565b600033610349818585610568565b60019150505b92915050565b6000336103638582856106c0565b61036e858585610752565b506001949350505050565b610381610946565b61038c838383610568565b505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490919061034990829086906103cb908790610d93565b610568565b6103d8610946565b6103e282826109a0565b5050565b6103ee610946565b6103f86000610a61565b565b6060600580546102b890610d59565b610411610946565b6103e28282610ac9565b3360008181526002602090815260408083206001600160a01b0387168452909152812054909190838110156104bd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036e8286868403610568565b600033610349818585610752565b6104e0610946565b6001600160a01b03811661055c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104b4565b61056581610a61565b50565b6001600160a01b0383166105e35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03821661065f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260026020908152604080832093861683529290522054600019811461074c578181101561073f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104b4565b61074c8484848403610568565b50505050565b6001600160a01b0383166107ce5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03821661084a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b038316600090815260016020526040902054818110156108d95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109399086815260200190565b60405180910390a361074c565b6000546001600160a01b031633146103f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b4565b6001600160a01b0382166109f65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104b4565b8060036000828254610a089190610d93565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216610b455760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03821660009081526001602052604090205481811015610bd45760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03831660008181526001602090815260408083208686039055600380548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600060208083528351808285015260005b81811015610c6157858101830151858201604001528201610c45565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610c9957600080fd5b919050565b60008060408385031215610cb157600080fd5b610cba83610c82565b946020939093013593505050565b600080600060608486031215610cdd57600080fd5b610ce684610c82565b9250610cf460208501610c82565b9150604084013590509250925092565b600060208284031215610d1657600080fd5b610d1f82610c82565b9392505050565b60008060408385031215610d3957600080fd5b610d4283610c82565b9150610d5060208401610c82565b90509250929050565b600181811c90821680610d6d57607f821691505b602082108103610d8d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561034f57634e487b7160e01b600052601160045260246000fdfea26469706673582212201124c0cc8f68d2a3f1f2efd3e34500cd073c8247227c33b2794df784fec133a464736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011b5760003560e01c806370a08231116100b25780639dc29fac11610081578063a9059cbb11610066578063a9059cbb1461024a578063dd62ed3e1461025d578063f2fde38b1461029657600080fd5b80639dc29fac14610224578063a457c2d71461023757600080fd5b806370a08231146101d0578063715018a6146101f95780638da5cb5b1461020157806395d89b411461021c57600080fd5b80632b991746116100ee5780632b99174614610186578063313ce5671461019b57806339509351146101aa57806340c10f19146101bd57600080fd5b806306fdde0314610120578063095ea7b31461013e57806318160ddd1461016157806323b872dd14610173575b600080fd5b6101286102a9565b6040516101359190610c34565b60405180910390f35b61015161014c366004610c9e565b61033b565b6040519015158152602001610135565b6003545b604051908152602001610135565b610151610181366004610cc8565b610355565b610199610194366004610cc8565b610379565b005b60405160068152602001610135565b6101516101b8366004610c9e565b610391565b6101996101cb366004610c9e565b6103d0565b6101656101de366004610d04565b6001600160a01b031660009081526001602052604090205490565b6101996103e6565b6000546040516001600160a01b039091168152602001610135565b6101286103fa565b610199610232366004610c9e565b610409565b610151610245366004610c9e565b61041b565b610151610258366004610c9e565b6104ca565b61016561026b366004610d26565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101996102a4366004610d04565b6104d8565b6060600480546102b890610d59565b80601f01602080910402602001604051908101604052809291908181526020018280546102e490610d59565b80156103315780601f1061030657610100808354040283529160200191610331565b820191906000526020600020905b81548152906001019060200180831161031457829003601f168201915b5050505050905090565b600033610349818585610568565b60019150505b92915050565b6000336103638582856106c0565b61036e858585610752565b506001949350505050565b610381610946565b61038c838383610568565b505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490919061034990829086906103cb908790610d93565b610568565b6103d8610946565b6103e282826109a0565b5050565b6103ee610946565b6103f86000610a61565b565b6060600580546102b890610d59565b610411610946565b6103e28282610ac9565b3360008181526002602090815260408083206001600160a01b0387168452909152812054909190838110156104bd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61036e8286868403610568565b600033610349818585610752565b6104e0610946565b6001600160a01b03811661055c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104b4565b61056581610a61565b50565b6001600160a01b0383166105e35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03821661065f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03838116600090815260026020908152604080832093861683529290522054600019811461074c578181101561073f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016104b4565b61074c8484848403610568565b50505050565b6001600160a01b0383166107ce5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03821661084a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b038316600090815260016020526040902054818110156108d95760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109399086815260200190565b60405180910390a361074c565b6000546001600160a01b031633146103f85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104b4565b6001600160a01b0382166109f65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104b4565b8060036000828254610a089190610d93565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216610b455760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03821660009081526001602052604090205481811015610bd45760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016104b4565b6001600160a01b03831660008181526001602090815260408083208686039055600380548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600060208083528351808285015260005b81811015610c6157858101830151858201604001528201610c45565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610c9957600080fd5b919050565b60008060408385031215610cb157600080fd5b610cba83610c82565b946020939093013593505050565b600080600060608486031215610cdd57600080fd5b610ce684610c82565b9250610cf460208501610c82565b9150604084013590509250925092565b600060208284031215610d1657600080fd5b610d1f82610c82565b9392505050565b60008060408385031215610d3957600080fd5b610d4283610c82565b9150610d5060208401610c82565b90509250929050565b600181811c90821680610d6d57607f821691505b602082108103610d8d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561034f57634e487b7160e01b600052601160045260246000fdfea26469706673582212201124c0cc8f68d2a3f1f2efd3e34500cd073c8247227c33b2794df784fec133a464736f6c63430008110033", + "solcInputHash": "3f402fc479708b4be39699fece0ecc2a", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_minterAccount\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldMinter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"MinterChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approveFor\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newMinter\",\"type\":\"address\"}],\"name\":\"changeMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minterAccount\",\"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\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Token contract that allows to buy or renew a single name for 1 year It should not be used for monetary purposes, this is an utility token TODO: turn off transferability Workflow: Anytype Admin mints 1 token to a user User can use this token to buy/renew a name for 1 year\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"AnytypePriceOracle\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/anytype/ERC20NameToken.sol\":\"ERC20NameToken\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1300},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling 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\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens 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(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/anytype/ERC20NameToken.sol\":{\"content\":\"pragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {Ownable} from \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n * @title AnytypePriceOracle\\n * @dev Token contract that allows to buy or renew a single name for 1 year\\n * It should not be used for monetary purposes, this is an utility token\\n *\\n * TODO: turn off transferability\\n *\\n * Workflow:\\n * Anytype Admin mints 1 token to a user\\n * User can use this token to buy/renew a name for 1 year\\n */\\ncontract ERC20NameToken is Ownable, ERC20 {\\n address public minterAccount;\\n\\n event MinterChanged(address indexed oldMinter, address indexed newMinter);\\n\\n constructor(address _minterAccount) ERC20(\\\"AnyNameToken\\\", \\\"ANT\\\") {\\n minterAccount = _minterAccount;\\n }\\n\\n function _checkOwner() internal view virtual override {\\n require(\\n owner() == _msgSender() || minterAccount == _msgSender(),\\n \\\"Ownable: caller is not the owner1 or owner2\\\"\\n );\\n }\\n\\n function decimals() public view virtual override returns (uint8) {\\n return 6;\\n }\\n\\n function changeMinter(address newMinter) external {\\n // this should not be called by minter\\n // if minter gets hacked -> admin can change the minter\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n require(newMinter != address(0), \\\"Invalid minter address\\\");\\n\\n emit MinterChanged(minterAccount, newMinter);\\n\\n minterAccount = newMinter;\\n }\\n\\n function mint(address user_, uint amount_) public onlyOwner {\\n _mint(user_, amount_);\\n }\\n\\n function burn(address user_, uint amount_) public onlyOwner {\\n _burn(user_, amount_);\\n }\\n\\n function approveFor(\\n address from,\\n address spender,\\n uint256 value\\n ) public onlyOwner {\\n _approve(from, spender, value);\\n }\\n}\\n\",\"keccak256\":\"0x67129a75d0cb43d549388c6a2739a75c68f1562d64c9355a81d4dc858f1af22c\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200127a3803806200127a83398101604081905262000034916200012a565b6040518060400160405280600c81526020016b20b73ca730b6b2aa37b5b2b760a11b8152506040518060400160405280600381526020016210539560ea1b8152506200008f62000089620000d660201b60201c565b620000da565b60046200009d838262000201565b506005620000ac828262000201565b5050600680546001600160a01b0319166001600160a01b03939093169290921790915550620002cd565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156200013d57600080fd5b81516001600160a01b03811681146200015557600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018757607f821691505b602082108103620001a857634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001fc57600081815260208120601f850160051c81016020861015620001d75750805b601f850160051c820191505b81811015620001f857828155600101620001e3565b5050505b505050565b81516001600160401b038111156200021d576200021d6200015c565b62000235816200022e845462000172565b84620001ae565b602080601f8311600181146200026d5760008415620002545750858301515b600019600386901b1c1916600185901b178555620001f8565b600085815260208120601f198616915b828110156200029e578886015182559484019460019091019084016200027d565b5085821015620002bd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610f9d80620002dd6000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80635fac5574116100cd5780639dc29fac11610081578063a9059cbb11610066578063a9059cbb146102b4578063dd62ed3e146102c7578063f2fde38b1461030057600080fd5b80639dc29fac1461028e578063a457c2d7146102a157600080fd5b8063715018a6116100b2578063715018a61461026d5780638da5cb5b1461027557806395d89b411461028657600080fd5b80635fac55741461021957806370a082311461024457600080fd5b80632b99174611610124578063313ce56711610109578063313ce567146101e457806339509351146101f357806340c10f191461020657600080fd5b80632b991746146101bc5780632c4d4d18146101d157600080fd5b806306fdde0314610156578063095ea7b31461017457806318160ddd1461019757806323b872dd146101a9575b600080fd5b61015e610313565b60405161016b9190610de7565b60405180910390f35b610187610182366004610e51565b6103a5565b604051901515815260200161016b565b6003545b60405190815260200161016b565b6101876101b7366004610e7b565b6103bf565b6101cf6101ca366004610e7b565b6103e3565b005b6101cf6101df366004610eb7565b6103fb565b6040516006815260200161016b565b610187610201366004610e51565b610519565b6101cf610214366004610e51565b610558565b60065461022c906001600160a01b031681565b6040516001600160a01b03909116815260200161016b565b61019b610252366004610eb7565b6001600160a01b031660009081526001602052604090205490565b6101cf61056e565b6000546001600160a01b031661022c565b61015e610582565b6101cf61029c366004610e51565b610591565b6101876102af366004610e51565b6105a3565b6101876102c2366004610e51565b61064d565b61019b6102d5366004610ed9565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101cf61030e366004610eb7565b61065b565b60606004805461032290610f0c565b80601f016020809104026020016040519081016040528092919081815260200182805461034e90610f0c565b801561039b5780601f106103705761010080835404028352916020019161039b565b820191906000526020600020905b81548152906001019060200180831161037e57829003601f168201915b5050505050905090565b6000336103b38185856106eb565b60019150505b92915050565b6000336103cd858285610843565b6103d88585856108d5565b506001949350505050565b6103eb610ac9565b6103f68383836106eb565b505050565b6000546001600160a01b0316331461045a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381166104b05760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206d696e7465722061646472657373000000000000000000006044820152606401610451565b6006546040516001600160a01b038084169216907f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f690600090a36006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091906103b39082908690610553908790610f46565b6106eb565b610560610ac9565b61056a8282610b5e565b5050565b610576610ac9565b6105806000610c1f565b565b60606005805461032290610f0c565b610599610ac9565b61056a8282610c7c565b3360008181526002602090815260408083206001600160a01b0387168452909152812054909190838110156106405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610451565b6103d882868684036106eb565b6000336103b38185856108d5565b610663610ac9565b6001600160a01b0381166106df5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610451565b6106e881610c1f565b50565b6001600160a01b0383166107665760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0382166107e25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526002602090815260408083209386168352929052205460001981146108cf57818110156108c25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610451565b6108cf84848484036106eb565b50505050565b6001600160a01b0383166109515760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0382166109cd5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b03831660009081526001602052604090205481811015610a5c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610abc9086815260200190565b60405180910390a36108cf565b6000546001600160a01b0316331480610aec57506006546001600160a01b031633145b6105805760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201527f31206f72206f776e6572320000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b038216610bb45760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610451565b8060036000828254610bc69190610f46565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216610cf85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b03821660009081526001602052604090205481811015610d875760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b03831660008181526001602090815260408083208686039055600380548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600060208083528351808285015260005b81811015610e1457858101830151858201604001528201610df8565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610e4c57600080fd5b919050565b60008060408385031215610e6457600080fd5b610e6d83610e35565b946020939093013593505050565b600080600060608486031215610e9057600080fd5b610e9984610e35565b9250610ea760208501610e35565b9150604084013590509250925092565b600060208284031215610ec957600080fd5b610ed282610e35565b9392505050565b60008060408385031215610eec57600080fd5b610ef583610e35565b9150610f0360208401610e35565b90509250929050565b600181811c90821680610f2057607f821691505b602082108103610f4057634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156103b957634e487b7160e01b600052601160045260246000fdfea26469706673582212200c8c690e7a0ca5c241ce7da778008dadb262a726b963d2e78d95a641acf9ce7d64736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101515760003560e01c80635fac5574116100cd5780639dc29fac11610081578063a9059cbb11610066578063a9059cbb146102b4578063dd62ed3e146102c7578063f2fde38b1461030057600080fd5b80639dc29fac1461028e578063a457c2d7146102a157600080fd5b8063715018a6116100b2578063715018a61461026d5780638da5cb5b1461027557806395d89b411461028657600080fd5b80635fac55741461021957806370a082311461024457600080fd5b80632b99174611610124578063313ce56711610109578063313ce567146101e457806339509351146101f357806340c10f191461020657600080fd5b80632b991746146101bc5780632c4d4d18146101d157600080fd5b806306fdde0314610156578063095ea7b31461017457806318160ddd1461019757806323b872dd146101a9575b600080fd5b61015e610313565b60405161016b9190610de7565b60405180910390f35b610187610182366004610e51565b6103a5565b604051901515815260200161016b565b6003545b60405190815260200161016b565b6101876101b7366004610e7b565b6103bf565b6101cf6101ca366004610e7b565b6103e3565b005b6101cf6101df366004610eb7565b6103fb565b6040516006815260200161016b565b610187610201366004610e51565b610519565b6101cf610214366004610e51565b610558565b60065461022c906001600160a01b031681565b6040516001600160a01b03909116815260200161016b565b61019b610252366004610eb7565b6001600160a01b031660009081526001602052604090205490565b6101cf61056e565b6000546001600160a01b031661022c565b61015e610582565b6101cf61029c366004610e51565b610591565b6101876102af366004610e51565b6105a3565b6101876102c2366004610e51565b61064d565b61019b6102d5366004610ed9565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6101cf61030e366004610eb7565b61065b565b60606004805461032290610f0c565b80601f016020809104026020016040519081016040528092919081815260200182805461034e90610f0c565b801561039b5780601f106103705761010080835404028352916020019161039b565b820191906000526020600020905b81548152906001019060200180831161037e57829003601f168201915b5050505050905090565b6000336103b38185856106eb565b60019150505b92915050565b6000336103cd858285610843565b6103d88585856108d5565b506001949350505050565b6103eb610ac9565b6103f68383836106eb565b505050565b6000546001600160a01b0316331461045a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381166104b05760405162461bcd60e51b815260206004820152601660248201527f496e76616c6964206d696e7465722061646472657373000000000000000000006044820152606401610451565b6006546040516001600160a01b038084169216907f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f690600090a36006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091906103b39082908690610553908790610f46565b6106eb565b610560610ac9565b61056a8282610b5e565b5050565b610576610ac9565b6105806000610c1f565b565b60606005805461032290610f0c565b610599610ac9565b61056a8282610c7c565b3360008181526002602090815260408083206001600160a01b0387168452909152812054909190838110156106405760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610451565b6103d882868684036106eb565b6000336103b38185856108d5565b610663610ac9565b6001600160a01b0381166106df5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610451565b6106e881610c1f565b50565b6001600160a01b0383166107665760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0382166107e25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383811660009081526002602090815260408083209386168352929052205460001981146108cf57818110156108c25760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610451565b6108cf84848484036106eb565b50505050565b6001600160a01b0383166109515760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0382166109cd5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b03831660009081526001602052604090205481811015610a5c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b0380851660008181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610abc9086815260200190565b60405180910390a36108cf565b6000546001600160a01b0316331480610aec57506006546001600160a01b031633145b6105805760405162461bcd60e51b815260206004820152602b60248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201527f31206f72206f776e6572320000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b038216610bb45760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610451565b8060036000828254610bc69190610f46565b90915550506001600160a01b0382166000818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216610cf85760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b03821660009081526001602052604090205481811015610d875760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610451565b6001600160a01b03831660008181526001602090815260408083208686039055600380548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b600060208083528351808285015260005b81811015610e1457858101830151858201604001528201610df8565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610e4c57600080fd5b919050565b60008060408385031215610e6457600080fd5b610e6d83610e35565b946020939093013593505050565b600080600060608486031215610e9057600080fd5b610e9984610e35565b9250610ea760208501610e35565b9150604084013590509250925092565b600060208284031215610ec957600080fd5b610ed282610e35565b9392505050565b60008060408385031215610eec57600080fd5b610ef583610e35565b9150610f0360208401610e35565b90509250929050565b600181811c90821680610f2057607f821691505b602082108103610f4057634e487b7160e01b600052602260045260246000fd5b50919050565b808201808211156103b957634e487b7160e01b600052601160045260246000fdfea26469706673582212200c8c690e7a0ca5c241ce7da778008dadb262a726b963d2e78d95a641acf9ce7d64736f6c63430008110033", "devdoc": { "details": "Token contract that allows to buy or renew a single name for 1 year It should not be used for monetary purposes, this is an utility token TODO: turn off transferability Workflow: Anytype Admin mints 1 token to a user User can use this token to buy/renew a name for 1 year", "kind": "dev", @@ -491,7 +544,7 @@ "type": "t_address" }, { - "astId": 250, + "astId": 128, "contract": "contracts/anytype/ERC20NameToken.sol:ERC20NameToken", "label": "_balances", "offset": 0, @@ -499,7 +552,7 @@ "type": "t_mapping(t_address,t_uint256)" }, { - "astId": 256, + "astId": 134, "contract": "contracts/anytype/ERC20NameToken.sol:ERC20NameToken", "label": "_allowances", "offset": 0, @@ -507,7 +560,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" }, { - "astId": 258, + "astId": 136, "contract": "contracts/anytype/ERC20NameToken.sol:ERC20NameToken", "label": "_totalSupply", "offset": 0, @@ -515,7 +568,7 @@ "type": "t_uint256" }, { - "astId": 260, + "astId": 138, "contract": "contracts/anytype/ERC20NameToken.sol:ERC20NameToken", "label": "_name", "offset": 0, @@ -523,12 +576,20 @@ "type": "t_string_storage" }, { - "astId": 262, + "astId": 140, "contract": "contracts/anytype/ERC20NameToken.sol:ERC20NameToken", "label": "_symbol", "offset": 0, "slot": "5", "type": "t_string_storage" + }, + { + "astId": 838, + "contract": "contracts/anytype/ERC20NameToken.sol:ERC20NameToken", + "label": "minterAccount", + "offset": 0, + "slot": "6", + "type": "t_address" } ], "types": { diff --git a/deployments/sepolia/FakeUSDC.json b/deployments/sepolia/FakeUSDC.json deleted file mode 100644 index e7a4a33..0000000 --- a/deployments/sepolia/FakeUSDC.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "address": "0xBd2843f4e259AF4Eb78DA5E2D4f1B1443da979c9", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approveFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "valueUsd", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "total", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0x9e4d3fc71f288dedaa12fa7e631c18722fed0fe7d591ab805068dab9e9b0e7e1", - "receipt": { - "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0xBd2843f4e259AF4Eb78DA5E2D4f1B1443da979c9", - "transactionIndex": 2, - "gasUsed": "661331", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xcf94f0bd3c76426fb1602f28906b21fadb203e9fa8428ae1336f9425e269afbb", - "transactionHash": "0x9e4d3fc71f288dedaa12fa7e631c18722fed0fe7d591ab805068dab9e9b0e7e1", - "logs": [], - "blockNumber": 4518738, - "cumulativeGasUsed": "896595", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "cd6bf429cc4eb451b6820c60152496f5", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approveFor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"valueUsd\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"total\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/anytype/mocks/FakeUSDC.sol\":\"FakeUSDC\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1300},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"contracts/anytype/mocks/FakeUSDC.sol\":{\"content\":\"pragma solidity ^0.8.0;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/* This should be used only for tests or debugging\\n * It is not a real stablecoin\\n */\\ncontract FakeUSDC is IERC20 {\\n string public name = \\\"Fake USDC\\\";\\n string public symbol = \\\"FUSDC\\\";\\n uint8 public decimals = 6;\\n uint256 public total;\\n\\n mapping(address => uint256) balances;\\n mapping(address => mapping(address => uint256)) allowances;\\n\\n constructor() {}\\n\\n // use it for tests\\n function mint(address to, uint256 valueUsd) external {\\n uint256 value = valueUsd * 10 ** uint256(decimals);\\n\\n total += value;\\n balances[to] += value;\\n\\n emit Transfer(address(0), to, value);\\n }\\n\\n function approveFor(\\n address from,\\n address spender,\\n uint256 value\\n ) public returns (bool) {\\n allowances[from][spender] = value;\\n emit Approval(from, spender, value);\\n return true;\\n }\\n\\n function totalSupply() external view returns (uint256) {\\n return total;\\n }\\n\\n function balanceOf(address account) external view returns (uint256) {\\n return balances[account];\\n }\\n\\n function transfer(address to, uint256 value) public returns (bool) {\\n require(balances[msg.sender] >= value, \\\"Insufficient balance\\\");\\n balances[msg.sender] -= value;\\n balances[to] += value;\\n emit Transfer(msg.sender, to, value);\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n ) public returns (bool) {\\n require(balances[from] >= value, \\\"Insufficient balance\\\");\\n require(\\n allowances[from][msg.sender] >= value,\\n \\\"Insufficient allowance\\\"\\n );\\n balances[from] -= value;\\n balances[to] += value;\\n allowances[from][msg.sender] -= value;\\n emit Transfer(from, to, value);\\n return true;\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n ) external view returns (uint256) {\\n return allowances[owner][spender];\\n }\\n\\n function approve(address spender, uint256 value) public returns (bool) {\\n allowances[msg.sender][spender] = value;\\n emit Approval(msg.sender, spender, value);\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0x9cb79713d8ec7428a6fb988a11807d68f9ff8859dedea5df4b452aa800cb6604\"}},\"version\":1}", - "bytecode": "0x60c0604052600960809081526846616b65205553444360b81b60a0526000906100289082610111565b50604080518082019091526005815264465553444360d81b60208201526001906100529082610111565b506002805460ff1916600617905534801561006c57600080fd5b506101d0565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061009c57607f821691505b6020821081036100bc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561010c57600081815260208120601f850160051c810160208610156100e95750805b601f850160051c820191505b81811015610108578281556001016100f5565b5050505b505050565b81516001600160401b0381111561012a5761012a610072565b61013e816101388454610088565b846100c2565b602080601f831160018114610173576000841561015b5750858301515b600019600386901b1c1916600185901b178555610108565b600085815260208120601f198616915b828110156101a257888601518255948401946001909101908401610183565b50858210156101c05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6109a9806101df6000396000f3fe608060405234801561001057600080fd5b50600436106100d45760003560e01c8063313ce5671161008157806395d89b411161005b57806395d89b41146101b8578063a9059cbb146101c0578063dd62ed3e146101d357600080fd5b8063313ce5671461015b57806340c10f191461017a57806370a082311461018f57600080fd5b806323b872dd116100b257806323b872dd1461012c5780632b9917461461013f5780632ddbd13a1461015257600080fd5b806306fdde03146100d9578063095ea7b3146100f757806318160ddd1461011a575b600080fd5b6100e161020c565b6040516100ee91906106d1565b60405180910390f35b61010a61010536600461073b565b61029a565b60405190151581526020016100ee565b6003545b6040519081526020016100ee565b61010a61013a366004610765565b610307565b61010a61014d366004610765565b6104d2565b61011e60035481565b6002546101689060ff1681565b60405160ff90911681526020016100ee565b61018d61018836600461073b565b61052d565b005b61011e61019d3660046107a1565b6001600160a01b031660009081526004602052604090205490565b6100e16105d7565b61010a6101ce36600461073b565b6105e4565b61011e6101e13660046107c3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b60008054610219906107f6565b80601f0160208091040260200160405190810160405280929190818152602001828054610245906107f6565b80156102925780601f1061026757610100808354040283529160200191610292565b820191906000526020600020905b81548152906001019060200180831161027557829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906102f59086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600460205260408120548211156103745760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e636500000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03841660009081526005602090815260408083203384529091529020548211156103e75760405162461bcd60e51b815260206004820152601660248201527f496e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015260640161036b565b6001600160a01b0384166000908152600460205260408120805484929061040f908490610846565b90915550506001600160a01b0383166000908152600460205260408120805484929061043c908490610859565b90915550506001600160a01b038416600090815260056020908152604080832033845290915281208054849290610474908490610846565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104c091815260200190565b60405180910390a35060019392505050565b6001600160a01b03838116600081815260056020908152604080832094871680845294825280832086905551858152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591016104c0565b6002546000906105419060ff16600a610950565b61054b908361095c565b9050806003600082825461055f9190610859565b90915550506001600160a01b0383166000908152600460205260408120805483929061058c908490610859565b90915550506040518181526001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60018054610219906107f6565b336000908152600460205260408120548211156106435760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e6365000000000000000000000000604482015260640161036b565b3360009081526004602052604081208054849290610662908490610846565b90915550506001600160a01b0383166000908152600460205260408120805484929061068f908490610859565b90915550506040518281526001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016102f5565b600060208083528351808285015260005b818110156106fe578581018301518582016040015282016106e2565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073657600080fd5b919050565b6000806040838503121561074e57600080fd5b6107578361071f565b946020939093013593505050565b60008060006060848603121561077a57600080fd5b6107838461071f565b92506107916020850161071f565b9150604084013590509250925092565b6000602082840312156107b357600080fd5b6107bc8261071f565b9392505050565b600080604083850312156107d657600080fd5b6107df8361071f565b91506107ed6020840161071f565b90509250929050565b600181811c9082168061080a57607f821691505b60208210810361082a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561030157610301610830565b8082018082111561030157610301610830565b600181815b808511156108a757816000190482111561088d5761088d610830565b8085161561089a57918102915b93841c9390800290610871565b509250929050565b6000826108be57506001610301565b816108cb57506000610301565b81600181146108e157600281146108eb57610907565b6001915050610301565b60ff8411156108fc576108fc610830565b50506001821b610301565b5060208310610133831016604e8410600b841016171561092a575081810a610301565b610934838361086c565b806000190482111561094857610948610830565b029392505050565b60006107bc83836108af565b80820281158282048414176103015761030161083056fea26469706673582212205db06d652cb7e9b57cd91f109e6480bd5eb96975d37fadb641df76bd156650a064736f6c63430008110033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100d45760003560e01c8063313ce5671161008157806395d89b411161005b57806395d89b41146101b8578063a9059cbb146101c0578063dd62ed3e146101d357600080fd5b8063313ce5671461015b57806340c10f191461017a57806370a082311461018f57600080fd5b806323b872dd116100b257806323b872dd1461012c5780632b9917461461013f5780632ddbd13a1461015257600080fd5b806306fdde03146100d9578063095ea7b3146100f757806318160ddd1461011a575b600080fd5b6100e161020c565b6040516100ee91906106d1565b60405180910390f35b61010a61010536600461073b565b61029a565b60405190151581526020016100ee565b6003545b6040519081526020016100ee565b61010a61013a366004610765565b610307565b61010a61014d366004610765565b6104d2565b61011e60035481565b6002546101689060ff1681565b60405160ff90911681526020016100ee565b61018d61018836600461073b565b61052d565b005b61011e61019d3660046107a1565b6001600160a01b031660009081526004602052604090205490565b6100e16105d7565b61010a6101ce36600461073b565b6105e4565b61011e6101e13660046107c3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b60008054610219906107f6565b80601f0160208091040260200160405190810160405280929190818152602001828054610245906107f6565b80156102925780601f1061026757610100808354040283529160200191610292565b820191906000526020600020905b81548152906001019060200180831161027557829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906102f59086815260200190565b60405180910390a35060015b92915050565b6001600160a01b0383166000908152600460205260408120548211156103745760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e636500000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b03841660009081526005602090815260408083203384529091529020548211156103e75760405162461bcd60e51b815260206004820152601660248201527f496e73756666696369656e7420616c6c6f77616e636500000000000000000000604482015260640161036b565b6001600160a01b0384166000908152600460205260408120805484929061040f908490610846565b90915550506001600160a01b0383166000908152600460205260408120805484929061043c908490610859565b90915550506001600160a01b038416600090815260056020908152604080832033845290915281208054849290610474908490610846565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104c091815260200190565b60405180910390a35060019392505050565b6001600160a01b03838116600081815260056020908152604080832094871680845294825280832086905551858152919392917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591016104c0565b6002546000906105419060ff16600a610950565b61054b908361095c565b9050806003600082825461055f9190610859565b90915550506001600160a01b0383166000908152600460205260408120805483929061058c908490610859565b90915550506040518181526001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60018054610219906107f6565b336000908152600460205260408120548211156106435760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e6365000000000000000000000000604482015260640161036b565b3360009081526004602052604081208054849290610662908490610846565b90915550506001600160a01b0383166000908152600460205260408120805484929061068f908490610859565b90915550506040518281526001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016102f5565b600060208083528351808285015260005b818110156106fe578581018301518582016040015282016106e2565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461073657600080fd5b919050565b6000806040838503121561074e57600080fd5b6107578361071f565b946020939093013593505050565b60008060006060848603121561077a57600080fd5b6107838461071f565b92506107916020850161071f565b9150604084013590509250925092565b6000602082840312156107b357600080fd5b6107bc8261071f565b9392505050565b600080604083850312156107d657600080fd5b6107df8361071f565b91506107ed6020840161071f565b90509250929050565b600181811c9082168061080a57607f821691505b60208210810361082a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561030157610301610830565b8082018082111561030157610301610830565b600181815b808511156108a757816000190482111561088d5761088d610830565b8085161561089a57918102915b93841c9390800290610871565b509250929050565b6000826108be57506001610301565b816108cb57506000610301565b81600181146108e157600281146108eb57610907565b6001915050610301565b60ff8411156108fc576108fc610830565b50506001821b610301565b5060208310610133831016604e8410600b841016171561092a575081810a610301565b610934838361086c565b806000190482111561094857610948610830565b029392505050565b60006107bc83836108af565b80820281158282048414176103015761030161083056fea26469706673582212205db06d652cb7e9b57cd91f109e6480bd5eb96975d37fadb641df76bd156650a064736f6c63430008110033", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." - }, - "balanceOf(address)": { - "details": "Returns the amount of tokens owned by `account`." - }, - "totalSupply()": { - "details": "Returns the amount of tokens in existence." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 10220, - "contract": "contracts/anytype/mocks/FakeUSDC.sol:FakeUSDC", - "label": "name", - "offset": 0, - "slot": "0", - "type": "t_string_storage" - }, - { - "astId": 10223, - "contract": "contracts/anytype/mocks/FakeUSDC.sol:FakeUSDC", - "label": "symbol", - "offset": 0, - "slot": "1", - "type": "t_string_storage" - }, - { - "astId": 10226, - "contract": "contracts/anytype/mocks/FakeUSDC.sol:FakeUSDC", - "label": "decimals", - "offset": 0, - "slot": "2", - "type": "t_uint8" - }, - { - "astId": 10228, - "contract": "contracts/anytype/mocks/FakeUSDC.sol:FakeUSDC", - "label": "total", - "offset": 0, - "slot": "3", - "type": "t_uint256" - }, - { - "astId": 10232, - "contract": "contracts/anytype/mocks/FakeUSDC.sol:FakeUSDC", - "label": "balances", - "offset": 0, - "slot": "4", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 10238, - "contract": "contracts/anytype/mocks/FakeUSDC.sol:FakeUSDC", - "label": "allowances", - "offset": 0, - "slot": "5", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/deployments/sepolia/LegacyENSRegistry.json b/deployments/sepolia/LegacyENSRegistry.json index 31406a8..17ccbdc 100644 --- a/deployments/sepolia/LegacyENSRegistry.json +++ b/deployments/sepolia/LegacyENSRegistry.json @@ -1,5 +1,5 @@ { - "address": "0xF7ce187040B53F40bc1DC3B1b5836cBf64268ef6", + "address": "0xd6c4B6e03DF530f8608F665e97Efac4a63cFf2D7", "abi": [ { "inputs": [], @@ -376,19 +376,19 @@ "type": "function" } ], - "transactionHash": "0xc41dc3f3bdc0df7024de5e828cf18faa9f96ad293ccd968fb67115f2df989a63", + "transactionHash": "0x300d325b0b2b5c056e9ad6491111e676b31d554b94e6f30df7dc06cc64fcd12b", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0xF7ce187040B53F40bc1DC3B1b5836cBf64268ef6", - "transactionIndex": 58, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0xd6c4B6e03DF530f8608F665e97Efac4a63cFf2D7", + "transactionIndex": 33, "gasUsed": "643649", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x097f34426c6849077b6c928fbbf12bbda2a7ee1c5fb022053a80111678e42fc0", - "transactionHash": "0xc41dc3f3bdc0df7024de5e828cf18faa9f96ad293ccd968fb67115f2df989a63", + "blockHash": "0xb76a7b47096767929841e65f0cb740a648a5f75c125681d3b9fa7f598addb0b7", + "transactionHash": "0x300d325b0b2b5c056e9ad6491111e676b31d554b94e6f30df7dc06cc64fcd12b", "logs": [], - "blockNumber": 5327818, - "cumulativeGasUsed": "6195404", + "blockNumber": 5650119, + "cumulativeGasUsed": "4405609", "status": 1, "byzantium": true }, diff --git a/deployments/sepolia/ReverseRegistrar.json b/deployments/sepolia/ReverseRegistrar.json index 75a8794..a64a743 100644 --- a/deployments/sepolia/ReverseRegistrar.json +++ b/deployments/sepolia/ReverseRegistrar.json @@ -1,5 +1,5 @@ { - "address": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", + "address": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", "abi": [ { "inputs": [ @@ -336,39 +336,39 @@ "type": "function" } ], - "transactionHash": "0x8cf1e51f076123024c53396761a9642c338551be0ed1728b570d1ac09657eac3", + "transactionHash": "0x4656e8c6a16cac8d385cf976997bed7fbefe5e9b9408e6bbb601effcda142515", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", - "transactionIndex": 98, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", + "transactionIndex": 62, "gasUsed": "825904", - "logsBloom": "0x00000000000000000000000000000000000000000040000000800000000000002000000000000002080000000000000000000000000000000000000000001000000000000000000000000000000000200001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x61615142e65e39a5dfdc3d36aedff9c0a12b4285e33e443eff9c53ee594c2fef", - "transactionHash": "0x8cf1e51f076123024c53396761a9642c338551be0ed1728b570d1ac09657eac3", + "logsBloom": "0x00002000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000001000000000000000000000000000000000000820000000000000000000800000000000000000000800000000000400000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc5a259214a9c77f9ce6df1ebc6ca94a6ca704280ee4d776fb2eac2f3f05a15be", + "transactionHash": "0x4656e8c6a16cac8d385cf976997bed7fbefe5e9b9408e6bbb601effcda142515", "logs": [ { - "transactionIndex": 98, - "blockNumber": 5327830, - "transactionHash": "0x8cf1e51f076123024c53396761a9642c338551be0ed1728b570d1ac09657eac3", - "address": "0x4C5597d48A5E8b0bb81Ed7146017179428C027E6", + "transactionIndex": 62, + "blockNumber": 5650132, + "transactionHash": "0x4656e8c6a16cac8d385cf976997bed7fbefe5e9b9408e6bbb601effcda142515", + "address": "0xa1DAFa05DCd37D89A987AfffAa6D73e6EF04094e", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", - "logIndex": 140, - "blockHash": "0x61615142e65e39a5dfdc3d36aedff9c0a12b4285e33e443eff9c53ee594c2fef" + "logIndex": 127, + "blockHash": "0xc5a259214a9c77f9ce6df1ebc6ca94a6ca704280ee4d776fb2eac2f3f05a15be" } ], - "blockNumber": 5327830, - "cumulativeGasUsed": "9255976", + "blockNumber": 5650132, + "cumulativeGasUsed": "9370426", "status": 1, "byzantium": true }, "args": [ - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be" + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab" ], "numDeployments": 1, "solcInputHash": "cd6bf429cc4eb451b6820c60152496f5", diff --git a/deployments/sepolia/Root.json b/deployments/sepolia/Root.json index 0f917e9..164a09f 100644 --- a/deployments/sepolia/Root.json +++ b/deployments/sepolia/Root.json @@ -1,5 +1,5 @@ { - "address": "0x4d2fea672c1d9D62C5D391a65849620241fA62dc", + "address": "0x1d31cFC6bC67F04137688c8F0d8fdbBF920eAf7d", "abi": [ { "inputs": [ @@ -229,39 +229,39 @@ "type": "function" } ], - "transactionHash": "0x55b066a25665a768e97742b60ad85fa55ffd32eab80a74965e870176d3ecf893", + "transactionHash": "0xa1bde10e33e619fa2e03693ac92aefb8d738594608942b0bb85c5e5ca63b6732", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0x4d2fea672c1d9D62C5D391a65849620241fA62dc", - "transactionIndex": 89, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x1d31cFC6bC67F04137688c8F0d8fdbBF920eAf7d", + "transactionIndex": 61, "gasUsed": "506813", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000002080000000000000000000000000000001000000000001000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000200000800000000000000000000000000000000400000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xa59d1361d86ca6d80e6260edce434c3a742698c4f83de38066717a118e3bf7f3", - "transactionHash": "0x55b066a25665a768e97742b60ad85fa55ffd32eab80a74965e870176d3ecf893", + "logsBloom": "0x00002000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000820000000000000000080800000000000000000000000000000000400000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000820000000000000000000000000000000000000000001000000000000000000000000", + "blockHash": "0xb693e16b8dc8344b016ff441ec4e93b75b22e74c64fbf60fbacd13c6bb5da1a9", + "transactionHash": "0xa1bde10e33e619fa2e03693ac92aefb8d738594608942b0bb85c5e5ca63b6732", "logs": [ { - "transactionIndex": 89, - "blockNumber": 5327822, - "transactionHash": "0x55b066a25665a768e97742b60ad85fa55ffd32eab80a74965e870176d3ecf893", - "address": "0x4d2fea672c1d9D62C5D391a65849620241fA62dc", + "transactionIndex": 61, + "blockNumber": 5650123, + "transactionHash": "0xa1bde10e33e619fa2e03693ac92aefb8d738594608942b0bb85c5e5ca63b6732", + "address": "0x1d31cFC6bC67F04137688c8F0d8fdbBF920eAf7d", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x00000000000000000000000061d1eee7fbf652482dea98a1df591c626ba09a60" + "0x000000000000000000000000b87bbe9f9a0866b942b6587d74b06ed98dc1efb9" ], "data": "0x", - "logIndex": 108, - "blockHash": "0xa59d1361d86ca6d80e6260edce434c3a742698c4f83de38066717a118e3bf7f3" + "logIndex": 149, + "blockHash": "0xb693e16b8dc8344b016ff441ec4e93b75b22e74c64fbf60fbacd13c6bb5da1a9" } ], - "blockNumber": 5327822, - "cumulativeGasUsed": "9610459", + "blockNumber": 5650123, + "cumulativeGasUsed": "15377848", "status": 1, "byzantium": true }, "args": [ - "0x3c2E173A65BC3ecaFDa38802eF2D6E137a5D91be" + "0x7e69Bb2E7933B5C8250965d0bF36B955a16a03Ab" ], "numDeployments": 1, "solcInputHash": "cd6bf429cc4eb451b6820c60152496f5", diff --git a/deployments/sepolia/StaticMetadataService.json b/deployments/sepolia/StaticMetadataService.json index e070f66..11c16a9 100644 --- a/deployments/sepolia/StaticMetadataService.json +++ b/deployments/sepolia/StaticMetadataService.json @@ -1,5 +1,5 @@ { - "address": "0xba6647fA7569ba5466E955bE3FFd1e476F16719A", + "address": "0x2a1351f38E5842F57835326137C07b6DecEAc8d9", "abi": [ { "inputs": [ @@ -32,19 +32,19 @@ "type": "function" } ], - "transactionHash": "0x1d0adf683b70d249cd6e243297760fe20fa13ee08efe1d7e414809f65b278f56", + "transactionHash": "0xf50d59e2c5f91ed8a462b67a00833ee3613cbf36d0a05942b0020b85bfd585e4", "receipt": { "to": null, - "from": "0x61d1eeE7FBF652482DEa98A1Df591C626bA09a60", - "contractAddress": "0xba6647fA7569ba5466E955bE3FFd1e476F16719A", - "transactionIndex": 32, + "from": "0xB87bBe9F9a0866B942B6587D74B06Ed98dC1EFB9", + "contractAddress": "0x2a1351f38E5842F57835326137C07b6DecEAc8d9", + "transactionIndex": 43, "gasUsed": "233826", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x3188f2c1fa354fb1d2bafcbac4d999521b009b5e95318e10485e0fac961ab521", - "transactionHash": "0x1d0adf683b70d249cd6e243297760fe20fa13ee08efe1d7e414809f65b278f56", + "blockHash": "0x8c02292e19404cdbeb94768837e8ce01fb5a31243598e34b6f7ead531967d060", + "transactionHash": "0xf50d59e2c5f91ed8a462b67a00833ee3613cbf36d0a05942b0020b85bfd585e4", "logs": [], - "blockNumber": 5327829, - "cumulativeGasUsed": "3770720", + "blockNumber": 5650131, + "cumulativeGasUsed": "4587362", "status": 1, "byzantium": true }, diff --git a/deployments/sepolia/solcInputs/3f402fc479708b4be39699fece0ecc2a.json b/deployments/sepolia/solcInputs/3f402fc479708b4be39699fece0ecc2a.json new file mode 100644 index 0000000..67307e5 --- /dev/null +++ b/deployments/sepolia/solcInputs/3f402fc479708b4be39699fece0ecc2a.json @@ -0,0 +1,50 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\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 the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens 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(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "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" + }, + "contracts/anytype/ERC20NameToken.sol": { + "content": "pragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title AnytypePriceOracle\n * @dev Token contract that allows to buy or renew a single name for 1 year\n * It should not be used for monetary purposes, this is an utility token\n *\n * TODO: turn off transferability\n *\n * Workflow:\n * Anytype Admin mints 1 token to a user\n * User can use this token to buy/renew a name for 1 year\n */\ncontract ERC20NameToken is Ownable, ERC20 {\n address public minterAccount;\n\n event MinterChanged(address indexed oldMinter, address indexed newMinter);\n\n constructor(address _minterAccount) ERC20(\"AnyNameToken\", \"ANT\") {\n minterAccount = _minterAccount;\n }\n\n function _checkOwner() internal view virtual override {\n require(\n owner() == _msgSender() || minterAccount == _msgSender(),\n \"Ownable: caller is not the owner1 or owner2\"\n );\n }\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n\n function changeMinter(address newMinter) external {\n // this should not be called by minter\n // if minter gets hacked -> admin can change the minter\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n require(newMinter != address(0), \"Invalid minter address\");\n\n emit MinterChanged(minterAccount, newMinter);\n\n minterAccount = newMinter;\n }\n\n function mint(address user_, uint amount_) public onlyOwner {\n _mint(user_, amount_);\n }\n\n function burn(address user_, uint amount_) public onlyOwner {\n _burn(user_, amount_);\n }\n\n function approveFor(\n address from,\n address spender,\n uint256 value\n ) public onlyOwner {\n _approve(from, spender, value);\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 1300 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/sepolia/solcInputs/465f7599d1c4574a9ae14cd482541e20.json b/deployments/sepolia/solcInputs/49ca6a3dcd0a38c743396303b30f42c4.json similarity index 94% rename from deployments/sepolia/solcInputs/465f7599d1c4574a9ae14cd482541e20.json rename to deployments/sepolia/solcInputs/49ca6a3dcd0a38c743396303b30f42c4.json index 27d05e6..1594498 100644 --- a/deployments/sepolia/solcInputs/465f7599d1c4574a9ae14cd482541e20.json +++ b/deployments/sepolia/solcInputs/49ca6a3dcd0a38c743396303b30f42c4.json @@ -47,7 +47,7 @@ "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IAnytypeRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n/**\n * Each registrar simply controls one top level domain, such as \".any\"\n */\ncontract AnytypeRegistrarImplementation is ERC721, IAnytypeRegistrar, Ownable {\n // A map of expiry times\n mapping(uint256 => uint256) expiries;\n // The ENS registry\n ENS public ens;\n // The namehash of the TLD this registrar owns (eg, .any)\n bytes32 public baseNode;\n // A map of addresses that are authorised to register and renew names.\n mapping(address => bool) public controllers;\n\n uint256 public constant GRACE_PERIOD = 90 days;\n bytes4 private constant INTERFACE_META_ID =\n bytes4(keccak256(\"supportsInterface(bytes4)\"));\n\n bytes4 private constant ERC721_ID =\n bytes4(\n keccak256(\"balanceOf(address)\") ^\n keccak256(\"ownerOf(uint256)\") ^\n keccak256(\"approve(address,uint256)\") ^\n keccak256(\"getApproved(uint256)\") ^\n keccak256(\"setApprovalForAll(address,bool)\") ^\n keccak256(\"isApprovedForAll(address,address)\") ^\n keccak256(\"transferFrom(address,address,uint256)\") ^\n keccak256(\"safeTransferFrom(address,address,uint256)\") ^\n keccak256(\"safeTransferFrom(address,address,uint256,bytes)\")\n );\n\n bytes4 private constant RECLAIM_ID =\n bytes4(keccak256(\"reclaim(uint256,address)\"));\n\n /**\n * v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187\n * @dev Returns whether the given spender can transfer a given token ID\n * @param spender address of the spender to query\n * @param tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function _isApprovedOrOwner(\n address spender,\n uint256 tokenId\n ) internal view override returns (bool) {\n address owner = ownerOf(tokenId);\n return (spender == owner ||\n getApproved(tokenId) == spender ||\n isApprovedForAll(owner, spender));\n }\n\n constructor(ENS _ens, bytes32 _baseNode) ERC721(\"\", \"\") {\n ens = _ens;\n baseNode = _baseNode;\n }\n\n modifier live() {\n require(ens.owner(baseNode) == address(this));\n _;\n }\n\n modifier onlyController() {\n require(controllers[msg.sender]);\n _;\n }\n\n /**\n * @dev Gets the owner of the specified token ID. Names become unowned\n * when their registration expires.\n * @param tokenId uint256 ID of the token to query the owner of\n * @return address currently marked as the owner of the given token ID\n */\n function ownerOf(\n uint256 tokenId\n ) public view override(IERC721, ERC721) returns (address) {\n require(expiries[tokenId] > block.timestamp);\n return super.ownerOf(tokenId);\n }\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external override onlyOwner {\n controllers[controller] = true;\n emit ControllerAdded(controller);\n }\n\n // Revoke controller permission for an address.\n function removeController(address controller) external override onlyOwner {\n controllers[controller] = false;\n emit ControllerRemoved(controller);\n }\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external override onlyOwner {\n ens.setResolver(baseNode, resolver);\n }\n\n // Returns the expiration timestamp of the specified id.\n function nameExpires(uint256 id) external view override returns (uint256) {\n return expiries[id];\n }\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) public view override returns (bool) {\n // Not available if it's registered here or in its grace period.\n return expiries[id] + GRACE_PERIOD < block.timestamp;\n }\n\n /**\n * @dev Register a name.\n * @param id The token ID (keccak256 of the label).\n * @param owner The address that should own the registration.\n * @param duration Duration in seconds for the registration.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external override returns (uint256) {\n return _register(id, owner, duration, true);\n }\n\n /**\n * @dev Register a name, without modifying the registry.\n * @param id The token ID (keccak256 of the label).\n * @param owner The address that should own the registration.\n * @param duration Duration in seconds for the registration.\n */\n function registerOnly(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256) {\n return _register(id, owner, duration, false);\n }\n\n function _register(\n uint256 id,\n address owner,\n uint256 duration,\n bool updateRegistry\n ) internal live onlyController returns (uint256) {\n require(available(id));\n require(\n block.timestamp + duration + GRACE_PERIOD >\n block.timestamp + GRACE_PERIOD\n ); // Prevent future overflow\n\n expiries[id] = block.timestamp + duration;\n if (_exists(id)) {\n // Name was previously owned, and expired\n _burn(id);\n }\n _mint(owner, id);\n if (updateRegistry) {\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\n }\n\n emit NameRegistered(id, owner, block.timestamp + duration);\n\n return block.timestamp + duration;\n }\n\n function renew(\n uint256 id,\n uint256 duration\n ) external override live onlyController returns (uint256) {\n require(expiries[id] + GRACE_PERIOD >= block.timestamp); // Name must be registered here or in grace period\n require(\n expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD\n ); // Prevent future overflow\n\n expiries[id] += duration;\n emit NameRenewed(id, expiries[id]);\n return expiries[id];\n }\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external override live {\n require(_isApprovedOrOwner(msg.sender, id));\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(ERC721, IERC165) returns (bool) {\n return\n interfaceID == INTERFACE_META_ID ||\n interfaceID == ERC721_ID ||\n interfaceID == RECLAIM_ID;\n }\n}\n" }, "contracts/anytype/AnytypeRegistrarControllerPrivate.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport {AnytypeRegistrarImplementation} from \"./AnytypeRegistrar.sol\";\nimport {StringUtils} from \"../ethregistrar/StringUtils.sol\";\nimport {Resolver} from \"../resolvers/Resolver.sol\";\nimport {ENS} from \"../registry/ENS.sol\";\nimport {ReverseRegistrar} from \"../reverseRegistrar/ReverseRegistrar.sol\";\nimport {ReverseClaimer} from \"../reverseRegistrar/ReverseClaimer.sol\";\nimport {IAnytypeRegistrarControllerPrivate} from \"./IAnytypeRegistrarControllerPrivate.sol\";\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {INameWrapper} from \"../wrapper/INameWrapper.sol\";\nimport {ERC20Recoverable} from \"../utils/ERC20Recoverable.sol\";\n\nerror CommitmentTooNew(bytes32 commitment);\nerror CommitmentTooOld(bytes32 commitment);\nerror NameNotAvailable(string name);\nerror DurationTooShort(uint256 duration);\nerror ResolverRequiredWhenDataSupplied();\nerror UnexpiredCommitmentExists(bytes32 commitment);\nerror InsufficientValue();\nerror Unauthorised(bytes32 node);\nerror MaxCommitmentAgeTooLow();\nerror MaxCommitmentAgeTooHigh();\n\n/**\n * This is a fork/copy of the ENS registrar controller with the following changes:\n * .any TLD is used instead of .eth\n * Owner of this contract can register any name without a payment on behalf/for other users.\n */\ncontract AnytypeRegistrarControllerPrivate is\n Ownable,\n IAnytypeRegistrarControllerPrivate,\n IERC165,\n ERC20Recoverable,\n ReverseClaimer\n{\n using StringUtils for *;\n using Address for address;\n\n uint256 public constant MIN_REGISTRATION_DURATION = 28 days;\n\n // any type namehash\n // use 'namehash' function to get namehash in your JS code\n bytes32 private constant ANY_NODE =\n 0xe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463;\n\n uint64 private constant MAX_EXPIRY = type(uint64).max;\n AnytypeRegistrarImplementation immutable base;\n\n // in seconds\n uint256 public immutable minCommitmentAge;\n uint256 public immutable maxCommitmentAge;\n ReverseRegistrar public immutable reverseRegistrar;\n INameWrapper public immutable nameWrapper;\n\n address public immutable additionalOwner;\n\n mapping(bytes32 => uint256) public commitments;\n\n event NameRegistered(\n string name,\n bytes32 indexed label,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(string name, bytes32 indexed label, uint256 expires);\n\n function _checkOwner() internal view virtual override {\n require(owner() == _msgSender() || additionalOwner == _msgSender(), \"Ownable: caller is not the owner1 or owner2\");\n }\n\n constructor(\n AnytypeRegistrarImplementation _base,\n uint256 _minCommitmentAge,\n uint256 _maxCommitmentAge,\n ReverseRegistrar _reverseRegistrar,\n INameWrapper _nameWrapper,\n ENS _ens,\n address _additionalOwner\n ) ReverseClaimer(_ens, msg.sender) {\n if (_maxCommitmentAge <= _minCommitmentAge) {\n revert MaxCommitmentAgeTooLow();\n }\n\n if (_maxCommitmentAge > block.timestamp) {\n revert MaxCommitmentAgeTooHigh();\n }\n\n base = _base;\n minCommitmentAge = _minCommitmentAge;\n maxCommitmentAge = _maxCommitmentAge;\n reverseRegistrar = _reverseRegistrar;\n nameWrapper = _nameWrapper;\n additionalOwner = _additionalOwner;\n }\n\n function valid(string memory name) public pure returns (bool) {\n return name.strlen() >= 3;\n }\n\n function available(string memory name) public view override returns (bool) {\n bytes32 label = keccak256(bytes(name));\n return valid(name) && base.available(uint256(label));\n }\n\n function makeCommitment(\n string memory name,\n address owner,\n uint256 duration,\n bytes32 secret,\n address resolver,\n bytes[] calldata data,\n bool reverseRecord,\n uint16 ownerControlledFuses\n ) public view override onlyOwner returns (bytes32) {\n bytes32 label = keccak256(bytes(name));\n if (data.length > 0 && resolver == address(0)) {\n revert ResolverRequiredWhenDataSupplied();\n }\n return\n keccak256(\n abi.encode(\n label,\n owner,\n duration,\n secret,\n resolver,\n data,\n reverseRecord,\n ownerControlledFuses\n )\n );\n }\n\n function commit(bytes32 commitment) public override onlyOwner {\n if (commitments[commitment] + maxCommitmentAge >= block.timestamp) {\n revert UnexpiredCommitmentExists(commitment);\n }\n commitments[commitment] = block.timestamp;\n }\n\n function register(\n string calldata name,\n address owner,\n uint256 duration,\n bytes32 secret,\n address resolver,\n bytes[] calldata data,\n bool reverseRecord,\n uint16 ownerControlledFuses\n ) public override onlyOwner {\n _consumeCommitment(\n name,\n duration,\n makeCommitment(\n name,\n owner,\n duration,\n secret,\n resolver,\n data,\n reverseRecord,\n ownerControlledFuses\n )\n );\n\n uint256 expires = nameWrapper.registerAndWrapETH2LD(\n name,\n owner,\n duration,\n resolver,\n ownerControlledFuses\n );\n\n if (data.length > 0) {\n _setRecords(resolver, keccak256(bytes(name)), data);\n }\n\n if (reverseRecord) {\n _setReverseRecord(name, resolver, owner);\n }\n\n emit NameRegistered(name, keccak256(bytes(name)), owner, expires);\n }\n\n function renew(\n string calldata name,\n uint256 duration\n ) external override onlyOwner {\n bytes32 labelhash = keccak256(bytes(name));\n uint256 tokenId = uint256(labelhash);\n\n uint256 expires = nameWrapper.renew(tokenId, duration);\n\n emit NameRenewed(name, labelhash, expires);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) external pure returns (bool) {\n return\n interfaceID == type(IERC165).interfaceId ||\n interfaceID == type(IAnytypeRegistrarControllerPrivate).interfaceId;\n }\n\n /* Internal functions */\n function _consumeCommitment(\n string memory name,\n uint256 duration,\n bytes32 commitment\n ) internal {\n // Require an old enough commitment.\n if (commitments[commitment] + minCommitmentAge > block.timestamp) {\n revert CommitmentTooNew(commitment);\n }\n\n // If the commitment is too old, or the name is registered, stop\n if (commitments[commitment] + maxCommitmentAge <= block.timestamp) {\n revert CommitmentTooOld(commitment);\n }\n if (!available(name)) {\n revert NameNotAvailable(name);\n }\n\n delete (commitments[commitment]);\n\n if (duration < MIN_REGISTRATION_DURATION) {\n revert DurationTooShort(duration);\n }\n }\n\n function _setRecords(\n address resolverAddress,\n bytes32 label,\n bytes[] calldata data\n ) internal {\n // use hardcoded .any namehash\n bytes32 nodehash = keccak256(abi.encodePacked(ANY_NODE, label));\n Resolver resolver = Resolver(resolverAddress);\n resolver.multicallWithNodeCheck(nodehash, data);\n }\n\n function _setReverseRecord(\n string memory name,\n address resolver,\n address owner\n ) internal {\n reverseRegistrar.setNameForAddr(\n owner,\n owner,\n resolver,\n string.concat(name, \".any\")\n );\n }\n}\n" + "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport {AnytypeRegistrarImplementation} from \"./AnytypeRegistrar.sol\";\nimport {StringUtils} from \"../ethregistrar/StringUtils.sol\";\nimport {Resolver} from \"../resolvers/Resolver.sol\";\nimport {ENS} from \"../registry/ENS.sol\";\nimport {ReverseRegistrar} from \"../reverseRegistrar/ReverseRegistrar.sol\";\nimport {ReverseClaimer} from \"../reverseRegistrar/ReverseClaimer.sol\";\nimport {IAnytypeRegistrarControllerPrivate} from \"./IAnytypeRegistrarControllerPrivate.sol\";\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {INameWrapper} from \"../wrapper/INameWrapper.sol\";\nimport {ERC20Recoverable} from \"../utils/ERC20Recoverable.sol\";\n\nerror CommitmentTooNew(bytes32 commitment);\nerror CommitmentTooOld(bytes32 commitment);\nerror NameNotAvailable(string name);\nerror DurationTooShort(uint256 duration);\nerror ResolverRequiredWhenDataSupplied();\nerror UnexpiredCommitmentExists(bytes32 commitment);\nerror InsufficientValue();\nerror Unauthorised(bytes32 node);\nerror MaxCommitmentAgeTooLow();\nerror MaxCommitmentAgeTooHigh();\n\n/**\n * This is a fork/copy of the ENS registrar controller with the following changes:\n * .any TLD is used instead of .eth\n * Owner of this contract can register any name without a payment on behalf/for other users.\n */\ncontract AnytypeRegistrarControllerPrivate is\n Ownable,\n IAnytypeRegistrarControllerPrivate,\n IERC165,\n ERC20Recoverable,\n ReverseClaimer\n{\n using StringUtils for *;\n using Address for address;\n\n uint256 public constant MIN_REGISTRATION_DURATION = 28 days;\n\n // any type namehash\n // use 'namehash' function to get namehash in your JS code\n bytes32 private constant ANY_NODE =\n 0xe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463;\n\n uint64 private constant MAX_EXPIRY = type(uint64).max;\n AnytypeRegistrarImplementation immutable base;\n\n // in seconds\n uint256 public immutable minCommitmentAge;\n uint256 public immutable maxCommitmentAge;\n ReverseRegistrar public immutable reverseRegistrar;\n INameWrapper public immutable nameWrapper;\n\n address public minterAccount;\n address public minterAccount2;\n\n mapping(bytes32 => uint256) public commitments;\n\n event NameRegistered(\n string name,\n bytes32 indexed label,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(string name, bytes32 indexed label, uint256 expires);\n event MintersChanged(address oldMinter, address newMinter, address newMinter2);\n\n function _checkOwner() internal view virtual override {\n require(\n owner() == _msgSender() || minterAccount == _msgSender() || minterAccount2 == _msgSender(),\n \"Ownable: caller is not the owner1 or minter or minter2\"\n );\n }\n\n constructor(\n AnytypeRegistrarImplementation _base,\n uint256 _minCommitmentAge,\n uint256 _maxCommitmentAge,\n ReverseRegistrar _reverseRegistrar,\n INameWrapper _nameWrapper,\n ENS _ens,\n address _minterAccount,\n address _minter2Account\n ) ReverseClaimer(_ens, msg.sender) {\n if (_maxCommitmentAge <= _minCommitmentAge) {\n revert MaxCommitmentAgeTooLow();\n }\n\n if (_maxCommitmentAge > block.timestamp) {\n revert MaxCommitmentAgeTooHigh();\n }\n\n base = _base;\n minCommitmentAge = _minCommitmentAge;\n maxCommitmentAge = _maxCommitmentAge;\n reverseRegistrar = _reverseRegistrar;\n nameWrapper = _nameWrapper;\n minterAccount = _minterAccount;\n minterAccount2 = _minter2Account;\n }\n\n function changeMinters(address newMinter, address newMinter2) external {\n // this should not be called by minter\n // if minter gets hacked -> admin can change the minter\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n require(newMinter != address(0), \"Invalid minter address\");\n require(newMinter2 != address(0), \"Invalid minter2 address\");\n\n emit MintersChanged(minterAccount, newMinter, newMinter2);\n\n minterAccount = newMinter;\n minterAccount2 = newMinter2;\n }\n\n function valid(string memory name) public pure returns (bool) {\n return name.strlen() >= 3;\n }\n\n function available(string memory name) public view override returns (bool) {\n bytes32 label = keccak256(bytes(name));\n return valid(name) && base.available(uint256(label));\n }\n\n function makeCommitment(\n string memory name,\n address owner,\n uint256 duration,\n bytes32 secret,\n address resolver,\n bytes[] calldata data,\n bool reverseRecord,\n uint16 ownerControlledFuses\n ) public view override onlyOwner returns (bytes32) {\n bytes32 label = keccak256(bytes(name));\n if (data.length > 0 && resolver == address(0)) {\n revert ResolverRequiredWhenDataSupplied();\n }\n return\n keccak256(\n abi.encode(\n label,\n owner,\n duration,\n secret,\n resolver,\n data,\n reverseRecord,\n ownerControlledFuses\n )\n );\n }\n\n function commit(bytes32 commitment) public override onlyOwner {\n if (commitments[commitment] + maxCommitmentAge >= block.timestamp) {\n revert UnexpiredCommitmentExists(commitment);\n }\n commitments[commitment] = block.timestamp;\n }\n\n function register(\n string calldata name,\n address owner,\n uint256 duration,\n bytes32 secret,\n address resolver,\n bytes[] calldata data,\n bool reverseRecord,\n uint16 ownerControlledFuses\n ) public override onlyOwner {\n _consumeCommitment(\n name,\n duration,\n makeCommitment(\n name,\n owner,\n duration,\n secret,\n resolver,\n data,\n reverseRecord,\n ownerControlledFuses\n )\n );\n\n uint256 expires = nameWrapper.registerAndWrapETH2LD(\n name,\n owner,\n duration,\n resolver,\n ownerControlledFuses\n );\n\n if (data.length > 0) {\n _setRecords(resolver, keccak256(bytes(name)), data);\n }\n\n if (reverseRecord) {\n _setReverseRecord(name, resolver, owner);\n }\n\n emit NameRegistered(name, keccak256(bytes(name)), owner, expires);\n }\n\n function renew(\n string calldata name,\n uint256 duration\n ) external override onlyOwner {\n bytes32 labelhash = keccak256(bytes(name));\n uint256 tokenId = uint256(labelhash);\n\n uint256 expires = nameWrapper.renew(tokenId, duration);\n\n emit NameRenewed(name, labelhash, expires);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) external pure returns (bool) {\n return\n interfaceID == type(IERC165).interfaceId ||\n interfaceID == type(IAnytypeRegistrarControllerPrivate).interfaceId;\n }\n\n /* Internal functions */\n function _consumeCommitment(\n string memory name,\n uint256 duration,\n bytes32 commitment\n ) internal {\n // Require an old enough commitment.\n if (commitments[commitment] + minCommitmentAge > block.timestamp) {\n revert CommitmentTooNew(commitment);\n }\n\n // If the commitment is too old, or the name is registered, stop\n if (commitments[commitment] + maxCommitmentAge <= block.timestamp) {\n revert CommitmentTooOld(commitment);\n }\n if (!available(name)) {\n revert NameNotAvailable(name);\n }\n\n delete (commitments[commitment]);\n\n if (duration < MIN_REGISTRATION_DURATION) {\n revert DurationTooShort(duration);\n }\n }\n\n function _setRecords(\n address resolverAddress,\n bytes32 label,\n bytes[] calldata data\n ) internal {\n // use hardcoded .any namehash\n bytes32 nodehash = keccak256(abi.encodePacked(ANY_NODE, label));\n Resolver resolver = Resolver(resolverAddress);\n resolver.multicallWithNodeCheck(nodehash, data);\n }\n\n function _setReverseRecord(\n string memory name,\n address resolver,\n address owner\n ) internal {\n reverseRegistrar.setNameForAddr(\n owner,\n owner,\n resolver,\n string.concat(name, \".any\")\n );\n }\n}\n" }, "contracts/anytype/IAnytypeRegistrar.sol": { "content": "import \"../registry/ENS.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\ninterface IAnytypeRegistrar is IERC721 {\n event ControllerAdded(address indexed controller);\n event ControllerRemoved(address indexed controller);\n\n event NameRegistered(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(uint256 indexed id, uint256 expires);\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external;\n\n // Revoke controller permission for an address.\n function removeController(address controller) external;\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external;\n\n // Returns the expiration timestamp of the specified label hash.\n function nameExpires(uint256 id) external view returns (uint256);\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) external view returns (bool);\n\n /**\n * @dev Register a name.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256);\n\n function renew(uint256 id, uint256 duration) external returns (uint256);\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external;\n}\n" diff --git a/deployments/sepolia/solcInputs/8f3cb90c314199728aaad15a00a271d1.json b/deployments/sepolia/solcInputs/8f3cb90c314199728aaad15a00a271d1.json deleted file mode 100644 index 91d6296..0000000 --- a/deployments/sepolia/solcInputs/8f3cb90c314199728aaad15a00a271d1.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@openzeppelin/contracts/access/Ownable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\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 the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby disabling 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" - }, - "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens 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(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/IERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address from, address to, uint256 amount) external returns (bool);\n}\n" - }, - "@openzeppelin/contracts/token/ERC721/ERC721.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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: address zero is not a valid owner\");\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 = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\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 _requireMinted(tokenId);\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 overridden 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 token owner or 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 _requireMinted(tokenId);\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(address from, address to, uint256 tokenId) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner or 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(address from, address to, uint256 tokenId, bytes memory data) 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\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 _ownerOf(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 address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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(address to, uint256 tokenId, bytes memory data) 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, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\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, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\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(address from, address to, uint256 tokenId) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {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 an {ApprovalForAll} event.\n */\n function _setApprovalForAll(address owner, address operator, bool approved) 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 Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\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 /// @solidity memory-safe-assembly\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 and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}\n\n /**\n * @dev Unsafe write access to the balances, used by extensions that \"mint\" tokens using an {ownerOf} override.\n *\n * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant\n * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such\n * that `ownerOf(tokenId)` is `a`.\n */\n // solhint-disable-next-line func-name-mixedcase\n function __unsafe_increaseBalance(address account, uint256 amount) internal {\n _balances[account] += amount;\n }\n}\n" - }, - "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { - "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" - }, - "@openzeppelin/contracts/token/ERC721/IERC721.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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`.\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(address from, address to, uint256 tokenId, bytes calldata data) external;\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 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(address from, address to, uint256 tokenId) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\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(address from, address to, uint256 tokenId) 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 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 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 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" - }, - "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.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" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, \"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(address target, bytes memory data, uint256 value) 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 (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or 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 _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\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 /// @solidity memory-safe-assembly\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" - }, - "@openzeppelin/contracts/utils/Context.sol": { - "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" - }, - "@openzeppelin/contracts/utils/introspection/ERC165.sol": { - "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" - }, - "@openzeppelin/contracts/utils/introspection/IERC165.sol": { - "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" - }, - "@openzeppelin/contracts/utils/math/Math.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n // The surrounding unchecked block does not change this fact.\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1, \"Math: mulDiv overflow\");\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10 ** 64) {\n value /= 10 ** 64;\n result += 64;\n }\n if (value >= 10 ** 32) {\n value /= 10 ** 32;\n result += 32;\n }\n if (value >= 10 ** 16) {\n value /= 10 ** 16;\n result += 16;\n }\n if (value >= 10 ** 8) {\n value /= 10 ** 8;\n result += 8;\n }\n if (value >= 10 ** 4) {\n value /= 10 ** 4;\n result += 4;\n }\n if (value >= 10 ** 2) {\n value /= 10 ** 2;\n result += 2;\n }\n if (value >= 10 ** 1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/math/SignedMath.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard signed math utilities missing in the Solidity language.\n */\nlibrary SignedMath {\n /**\n * @dev Returns the largest of two signed numbers.\n */\n function max(int256 a, int256 b) internal pure returns (int256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two signed numbers.\n */\n function min(int256 a, int256 b) internal pure returns (int256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two signed numbers without overflow.\n * The result is rounded towards zero.\n */\n function average(int256 a, int256 b) internal pure returns (int256) {\n // Formula from the book \"Hacker's Delight\"\n int256 x = (a & b) + ((a ^ b) >> 1);\n return x + (int256(uint256(x) >> 255) & (a ^ b));\n }\n\n /**\n * @dev Returns the absolute unsigned value of a signed value.\n */\n function abs(int256 n) internal pure returns (uint256) {\n unchecked {\n // must be unchecked in order to support `n = type(int256).min`\n return uint256(n >= 0 ? n : -n);\n }\n }\n}\n" - }, - "@openzeppelin/contracts/utils/Strings.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\nimport \"./math/SignedMath.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\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 unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `int256` to its ASCII `string` decimal representation.\n */\n function toString(int256 value) internal pure returns (string memory) {\n return string(abi.encodePacked(value < 0 ? \"-\" : \"\", toString(SignedMath.abs(value))));\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 unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\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] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n\n /**\n * @dev Returns true if the two strings are equal.\n */\n function equal(string memory a, string memory b) internal pure returns (bool) {\n return keccak256(bytes(a)) == keccak256(bytes(b));\n }\n}\n" - }, - "contracts/anytype/AnytypeRegistrar.sol": { - "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IAnytypeRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n/**\n * Each registrar simply controls one top level domain, such as \".any\"\n */\ncontract AnytypeRegistrarImplementation is ERC721, IAnytypeRegistrar, Ownable {\n // A map of expiry times\n mapping(uint256 => uint256) expiries;\n // The ENS registry\n ENS public ens;\n // The namehash of the TLD this registrar owns (eg, .any)\n bytes32 public baseNode;\n // A map of addresses that are authorised to register and renew names.\n mapping(address => bool) public controllers;\n\n uint256 public constant GRACE_PERIOD = 90 days;\n bytes4 private constant INTERFACE_META_ID =\n bytes4(keccak256(\"supportsInterface(bytes4)\"));\n\n bytes4 private constant ERC721_ID =\n bytes4(\n keccak256(\"balanceOf(address)\") ^\n keccak256(\"ownerOf(uint256)\") ^\n keccak256(\"approve(address,uint256)\") ^\n keccak256(\"getApproved(uint256)\") ^\n keccak256(\"setApprovalForAll(address,bool)\") ^\n keccak256(\"isApprovedForAll(address,address)\") ^\n keccak256(\"transferFrom(address,address,uint256)\") ^\n keccak256(\"safeTransferFrom(address,address,uint256)\") ^\n keccak256(\"safeTransferFrom(address,address,uint256,bytes)\")\n );\n\n bytes4 private constant RECLAIM_ID =\n bytes4(keccak256(\"reclaim(uint256,address)\"));\n\n /**\n * v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);\n * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187\n * @dev Returns whether the given spender can transfer a given token ID\n * @param spender address of the spender to query\n * @param tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function _isApprovedOrOwner(\n address spender,\n uint256 tokenId\n ) internal view override returns (bool) {\n address owner = ownerOf(tokenId);\n return (spender == owner ||\n getApproved(tokenId) == spender ||\n isApprovedForAll(owner, spender));\n }\n\n constructor(ENS _ens, bytes32 _baseNode) ERC721(\"\", \"\") {\n ens = _ens;\n baseNode = _baseNode;\n }\n\n modifier live() {\n require(ens.owner(baseNode) == address(this));\n _;\n }\n\n modifier onlyController() {\n require(controllers[msg.sender]);\n _;\n }\n\n /**\n * @dev Gets the owner of the specified token ID. Names become unowned\n * when their registration expires.\n * @param tokenId uint256 ID of the token to query the owner of\n * @return address currently marked as the owner of the given token ID\n */\n function ownerOf(\n uint256 tokenId\n ) public view override(IERC721, ERC721) returns (address) {\n require(expiries[tokenId] > block.timestamp);\n return super.ownerOf(tokenId);\n }\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external override onlyOwner {\n controllers[controller] = true;\n emit ControllerAdded(controller);\n }\n\n // Revoke controller permission for an address.\n function removeController(address controller) external override onlyOwner {\n controllers[controller] = false;\n emit ControllerRemoved(controller);\n }\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external override onlyOwner {\n ens.setResolver(baseNode, resolver);\n }\n\n // Returns the expiration timestamp of the specified id.\n function nameExpires(uint256 id) external view override returns (uint256) {\n return expiries[id];\n }\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) public view override returns (bool) {\n // Not available if it's registered here or in its grace period.\n return expiries[id] + GRACE_PERIOD < block.timestamp;\n }\n\n /**\n * @dev Register a name.\n * @param id The token ID (keccak256 of the label).\n * @param owner The address that should own the registration.\n * @param duration Duration in seconds for the registration.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external override returns (uint256) {\n return _register(id, owner, duration, true);\n }\n\n /**\n * @dev Register a name, without modifying the registry.\n * @param id The token ID (keccak256 of the label).\n * @param owner The address that should own the registration.\n * @param duration Duration in seconds for the registration.\n */\n function registerOnly(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256) {\n return _register(id, owner, duration, false);\n }\n\n function _register(\n uint256 id,\n address owner,\n uint256 duration,\n bool updateRegistry\n ) internal live onlyController returns (uint256) {\n require(available(id));\n require(\n block.timestamp + duration + GRACE_PERIOD >\n block.timestamp + GRACE_PERIOD\n ); // Prevent future overflow\n\n expiries[id] = block.timestamp + duration;\n if (_exists(id)) {\n // Name was previously owned, and expired\n _burn(id);\n }\n _mint(owner, id);\n if (updateRegistry) {\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\n }\n\n emit NameRegistered(id, owner, block.timestamp + duration);\n\n return block.timestamp + duration;\n }\n\n function renew(\n uint256 id,\n uint256 duration\n ) external override live onlyController returns (uint256) {\n require(expiries[id] + GRACE_PERIOD >= block.timestamp); // Name must be registered here or in grace period\n require(\n expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD\n ); // Prevent future overflow\n\n expiries[id] += duration;\n emit NameRenewed(id, expiries[id]);\n return expiries[id];\n }\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external override live {\n require(_isApprovedOrOwner(msg.sender, id));\n ens.setSubnodeOwner(baseNode, bytes32(id), owner);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) public view override(ERC721, IERC165) returns (bool) {\n return\n interfaceID == INTERFACE_META_ID ||\n interfaceID == ERC721_ID ||\n interfaceID == RECLAIM_ID;\n }\n}\n" - }, - "contracts/anytype/AnytypeRegistrarControllerPrivate.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport {AnytypeRegistrarImplementation} from \"./AnytypeRegistrar.sol\";\nimport {StringUtils} from \"../ethregistrar/StringUtils.sol\";\nimport {Resolver} from \"../resolvers/Resolver.sol\";\nimport {ENS} from \"../registry/ENS.sol\";\nimport {ReverseRegistrar} from \"../reverseRegistrar/ReverseRegistrar.sol\";\nimport {ReverseClaimer} from \"../reverseRegistrar/ReverseClaimer.sol\";\nimport {IAnytypeRegistrarControllerPrivate} from \"./IAnytypeRegistrarControllerPrivate.sol\";\n\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC165} from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\nimport {INameWrapper} from \"../wrapper/INameWrapper.sol\";\nimport {ERC20Recoverable} from \"../utils/ERC20Recoverable.sol\";\n\nerror CommitmentTooNew(bytes32 commitment);\nerror CommitmentTooOld(bytes32 commitment);\nerror NameNotAvailable(string name);\nerror DurationTooShort(uint256 duration);\nerror ResolverRequiredWhenDataSupplied();\nerror UnexpiredCommitmentExists(bytes32 commitment);\nerror InsufficientValue();\nerror Unauthorised(bytes32 node);\nerror MaxCommitmentAgeTooLow();\nerror MaxCommitmentAgeTooHigh();\n\n/**\n * This is a fork/copy of the ENS registrar controller with the following changes:\n * .any TLD is used instead of .eth\n * Owner of this contract can register any name without a payment on behalf/for other users.\n */\ncontract AnytypeRegistrarControllerPrivate is\n Ownable,\n IAnytypeRegistrarControllerPrivate,\n IERC165,\n ERC20Recoverable,\n ReverseClaimer\n{\n using StringUtils for *;\n using Address for address;\n\n uint256 public constant MIN_REGISTRATION_DURATION = 28 days;\n\n // any type namehash\n // use 'namehash' function to get namehash in your JS code\n bytes32 private constant ANY_NODE =\n 0xe87ebb796e516beccff9b955bf6c33af4ec312d6e2984185d016feab4d18a463;\n\n uint64 private constant MAX_EXPIRY = type(uint64).max;\n AnytypeRegistrarImplementation immutable base;\n\n // in seconds\n uint256 public immutable minCommitmentAge;\n uint256 public immutable maxCommitmentAge;\n ReverseRegistrar public immutable reverseRegistrar;\n INameWrapper public immutable nameWrapper;\n\n mapping(bytes32 => uint256) public commitments;\n\n event NameRegistered(\n string name,\n bytes32 indexed label,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(string name, bytes32 indexed label, uint256 expires);\n\n constructor(\n AnytypeRegistrarImplementation _base,\n uint256 _minCommitmentAge,\n uint256 _maxCommitmentAge,\n ReverseRegistrar _reverseRegistrar,\n INameWrapper _nameWrapper,\n ENS _ens\n ) ReverseClaimer(_ens, msg.sender) {\n if (_maxCommitmentAge <= _minCommitmentAge) {\n revert MaxCommitmentAgeTooLow();\n }\n\n if (_maxCommitmentAge > block.timestamp) {\n revert MaxCommitmentAgeTooHigh();\n }\n\n base = _base;\n minCommitmentAge = _minCommitmentAge;\n maxCommitmentAge = _maxCommitmentAge;\n reverseRegistrar = _reverseRegistrar;\n nameWrapper = _nameWrapper;\n }\n\n function valid(string memory name) public pure returns (bool) {\n return name.strlen() >= 3;\n }\n\n function available(string memory name) public view override returns (bool) {\n bytes32 label = keccak256(bytes(name));\n return valid(name) && base.available(uint256(label));\n }\n\n function makeCommitment(\n string memory name,\n address owner,\n uint256 duration,\n bytes32 secret,\n address resolver,\n bytes[] calldata data,\n bool reverseRecord,\n uint16 ownerControlledFuses\n ) public view override returns (bytes32) {\n bytes32 label = keccak256(bytes(name));\n if (data.length > 0 && resolver == address(0)) {\n revert ResolverRequiredWhenDataSupplied();\n }\n return\n keccak256(\n abi.encode(\n label,\n owner,\n duration,\n secret,\n resolver,\n data,\n reverseRecord,\n ownerControlledFuses\n )\n );\n }\n\n function commit(bytes32 commitment) public override {\n if (commitments[commitment] + maxCommitmentAge >= block.timestamp) {\n revert UnexpiredCommitmentExists(commitment);\n }\n commitments[commitment] = block.timestamp;\n }\n\n function register(\n string calldata name,\n address owner,\n uint256 duration,\n bytes32 secret,\n address resolver,\n bytes[] calldata data,\n bool reverseRecord,\n uint16 ownerControlledFuses\n ) public override {\n _consumeCommitment(\n name,\n duration,\n makeCommitment(\n name,\n owner,\n duration,\n secret,\n resolver,\n data,\n reverseRecord,\n ownerControlledFuses\n )\n );\n\n uint256 expires = nameWrapper.registerAndWrapETH2LD(\n name,\n owner,\n duration,\n resolver,\n ownerControlledFuses\n );\n\n if (data.length > 0) {\n _setRecords(resolver, keccak256(bytes(name)), data);\n }\n\n if (reverseRecord) {\n _setReverseRecord(name, resolver, owner);\n }\n\n emit NameRegistered(name, keccak256(bytes(name)), owner, expires);\n }\n\n function renew(\n string calldata name,\n uint256 duration\n ) external override onlyOwner {\n bytes32 labelhash = keccak256(bytes(name));\n uint256 tokenId = uint256(labelhash);\n\n uint256 expires = nameWrapper.renew(tokenId, duration);\n\n emit NameRenewed(name, labelhash, expires);\n }\n\n function supportsInterface(\n bytes4 interfaceID\n ) external pure returns (bool) {\n return\n interfaceID == type(IERC165).interfaceId ||\n interfaceID == type(IAnytypeRegistrarControllerPrivate).interfaceId;\n }\n\n /* Internal functions */\n function _consumeCommitment(\n string memory name,\n uint256 duration,\n bytes32 commitment\n ) internal {\n // Require an old enough commitment.\n if (commitments[commitment] + minCommitmentAge > block.timestamp) {\n revert CommitmentTooNew(commitment);\n }\n\n // If the commitment is too old, or the name is registered, stop\n if (commitments[commitment] + maxCommitmentAge <= block.timestamp) {\n revert CommitmentTooOld(commitment);\n }\n if (!available(name)) {\n revert NameNotAvailable(name);\n }\n\n delete (commitments[commitment]);\n\n if (duration < MIN_REGISTRATION_DURATION) {\n revert DurationTooShort(duration);\n }\n }\n\n function _setRecords(\n address resolverAddress,\n bytes32 label,\n bytes[] calldata data\n ) internal {\n // use hardcoded .any namehash\n bytes32 nodehash = keccak256(abi.encodePacked(ANY_NODE, label));\n Resolver resolver = Resolver(resolverAddress);\n resolver.multicallWithNodeCheck(nodehash, data);\n }\n\n function _setReverseRecord(\n string memory name,\n address resolver,\n address owner\n ) internal {\n reverseRegistrar.setNameForAddr(\n owner,\n owner,\n resolver,\n string.concat(name, \".any\")\n );\n }\n}\n" - }, - "contracts/anytype/ERC20NameToken.sol": { - "content": "pragma solidity ^0.8.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {Ownable} from \"@openzeppelin/contracts/access/Ownable.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @title AnytypePriceOracle\n * @dev Token contract that allows to buy or renew a single name for 1 year\n * It should not be used for monetary purposes, this is an utility token\n *\n * TODO: turn off transferability\n *\n * Workflow:\n * Anytype Admin mints 1 token to a user\n * User can use this token to buy/renew a name for 1 year\n */\ncontract ERC20NameToken is Ownable, ERC20 {\n constructor() ERC20(\"AnyNameToken\", \"ANT\") {}\n\n function decimals() public view virtual override returns (uint8) {\n return 6;\n }\n\n function mint(address user_, uint amount_) public onlyOwner {\n _mint(user_, amount_);\n }\n\n function burn(address user_, uint amount_) public onlyOwner {\n _burn(user_, amount_);\n }\n\n function approveFor(\n address from,\n address spender,\n uint256 value\n ) public onlyOwner {\n _approve(from, spender, value);\n }\n}\n" - }, - "contracts/anytype/IAnytypeRegistrar.sol": { - "content": "import \"../registry/ENS.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\ninterface IAnytypeRegistrar is IERC721 {\n event ControllerAdded(address indexed controller);\n event ControllerRemoved(address indexed controller);\n\n event NameRegistered(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(uint256 indexed id, uint256 expires);\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external;\n\n // Revoke controller permission for an address.\n function removeController(address controller) external;\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external;\n\n // Returns the expiration timestamp of the specified label hash.\n function nameExpires(uint256 id) external view returns (uint256);\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) external view returns (bool);\n\n /**\n * @dev Register a name.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256);\n\n function renew(uint256 id, uint256 duration) external returns (uint256);\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external;\n}\n" - }, - "contracts/anytype/IAnytypeRegistrarControllerPrivate.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface IAnytypeRegistrarControllerPrivate {\n function available(string memory) external returns (bool);\n\n function makeCommitment(\n string memory,\n address,\n uint256,\n bytes32,\n address,\n bytes[] calldata,\n bool,\n uint16\n ) external view returns (bytes32);\n\n function commit(bytes32) external;\n\n function register(\n string calldata,\n address,\n uint256,\n bytes32,\n address,\n bytes[] calldata,\n bool,\n uint16\n ) external;\n\n function renew(string calldata, uint256) external;\n}\n" - }, - "contracts/ethregistrar/IBaseRegistrar.sol": { - "content": "import \"../registry/ENS.sol\";\nimport \"./IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\n\ninterface IBaseRegistrar is IERC721 {\n event ControllerAdded(address indexed controller);\n event ControllerRemoved(address indexed controller);\n event NameMigrated(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRegistered(\n uint256 indexed id,\n address indexed owner,\n uint256 expires\n );\n event NameRenewed(uint256 indexed id, uint256 expires);\n\n // Authorises a controller, who can register and renew domains.\n function addController(address controller) external;\n\n // Revoke controller permission for an address.\n function removeController(address controller) external;\n\n // Set the resolver for the TLD this registrar manages.\n function setResolver(address resolver) external;\n\n // Returns the expiration timestamp of the specified label hash.\n function nameExpires(uint256 id) external view returns (uint256);\n\n // Returns true if the specified name is available for registration.\n function available(uint256 id) external view returns (bool);\n\n /**\n * @dev Register a name.\n */\n function register(\n uint256 id,\n address owner,\n uint256 duration\n ) external returns (uint256);\n\n function renew(uint256 id, uint256 duration) external returns (uint256);\n\n /**\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\n */\n function reclaim(uint256 id, address owner) external;\n}\n" - }, - "contracts/ethregistrar/StringUtils.sol": { - "content": "pragma solidity >=0.8.4;\n\nlibrary StringUtils {\n /**\n * @dev Returns the length of a given string\n *\n * @param s The string to measure the length of\n * @return The length of the input string\n */\n function strlen(string memory s) internal pure returns (uint256) {\n uint256 len;\n uint256 i = 0;\n uint256 bytelength = bytes(s).length;\n for (len = 0; i < bytelength; len++) {\n bytes1 b = bytes(s)[i];\n if (b < 0x80) {\n i += 1;\n } else if (b < 0xE0) {\n i += 2;\n } else if (b < 0xF0) {\n i += 3;\n } else if (b < 0xF8) {\n i += 4;\n } else if (b < 0xFC) {\n i += 5;\n } else {\n i += 6;\n }\n }\n return len;\n }\n}\n" - }, - "contracts/registry/ENS.sol": { - "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" - }, - "contracts/resolvers/profiles/IABIResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IABIResolver {\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view returns (uint256, bytes memory);\n}\n" - }, - "contracts/resolvers/profiles/IAddressResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the new (multicoin) addr function.\n */\ninterface IAddressResolver {\n event AddressChanged(\n bytes32 indexed node,\n uint256 coinType,\n bytes newAddress\n );\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) external view returns (bytes memory);\n}\n" - }, - "contracts/resolvers/profiles/IAddrResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the legacy (ETH-only) addr function.\n */\ninterface IAddrResolver {\n event AddrChanged(bytes32 indexed node, address a);\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(bytes32 node) external view returns (address payable);\n}\n" - }, - "contracts/resolvers/profiles/IContentHashResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IContentHashResolver {\n event ContenthashChanged(bytes32 indexed node, bytes hash);\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(bytes32 node) external view returns (bytes memory);\n}\n" - }, - "contracts/resolvers/profiles/IDNSRecordResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSRecordResolver {\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\n event DNSRecordChanged(\n bytes32 indexed node,\n bytes name,\n uint16 resource,\n bytes record\n );\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) external view returns (bytes memory);\n}\n" - }, - "contracts/resolvers/profiles/IDNSZoneResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSZoneResolver {\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\n event DNSZonehashChanged(\n bytes32 indexed node,\n bytes lastzonehash,\n bytes zonehash\n );\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(bytes32 node) external view returns (bytes memory);\n}\n" - }, - "contracts/resolvers/profiles/IExtendedResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" - }, - "contracts/resolvers/profiles/IInterfaceResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IInterfaceResolver {\n event InterfaceChanged(\n bytes32 indexed node,\n bytes4 indexed interfaceID,\n address implementer\n );\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view returns (address);\n}\n" - }, - "contracts/resolvers/profiles/INameResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" - }, - "contracts/resolvers/profiles/IPubkeyResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IPubkeyResolver {\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\n}\n" - }, - "contracts/resolvers/profiles/ITextResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" - }, - "contracts/resolvers/Resolver.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"./profiles/IABIResolver.sol\";\nimport \"./profiles/IAddressResolver.sol\";\nimport \"./profiles/IAddrResolver.sol\";\nimport \"./profiles/IContentHashResolver.sol\";\nimport \"./profiles/IDNSRecordResolver.sol\";\nimport \"./profiles/IDNSZoneResolver.sol\";\nimport \"./profiles/IInterfaceResolver.sol\";\nimport \"./profiles/INameResolver.sol\";\nimport \"./profiles/IPubkeyResolver.sol\";\nimport \"./profiles/ITextResolver.sol\";\nimport \"./profiles/IExtendedResolver.sol\";\n\n/**\n * A generic resolver interface which includes all the functions including the ones deprecated\n */\ninterface Resolver is\n IERC165,\n IABIResolver,\n IAddressResolver,\n IAddrResolver,\n IContentHashResolver,\n IDNSRecordResolver,\n IDNSZoneResolver,\n IInterfaceResolver,\n INameResolver,\n IPubkeyResolver,\n ITextResolver,\n IExtendedResolver\n{\n /* Deprecated events */\n event ContentChanged(bytes32 indexed node, bytes32 hash);\n\n function setApprovalForAll(address, bool) external;\n\n function approve(bytes32 node, address delegate, bool approved) external;\n\n function isApprovedForAll(address account, address operator) external;\n\n function isApprovedFor(\n address owner,\n bytes32 node,\n address delegate\n ) external;\n\n function setABI(\n bytes32 node,\n uint256 contentType,\n bytes calldata data\n ) external;\n\n function setAddr(bytes32 node, address addr) external;\n\n function setAddr(bytes32 node, uint256 coinType, bytes calldata a) external;\n\n function setContenthash(bytes32 node, bytes calldata hash) external;\n\n function setDnsrr(bytes32 node, bytes calldata data) external;\n\n function setName(bytes32 node, string calldata _name) external;\n\n function setPubkey(bytes32 node, bytes32 x, bytes32 y) external;\n\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n ) external;\n\n function setInterface(\n bytes32 node,\n bytes4 interfaceID,\n address implementer\n ) external;\n\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n /* Deprecated functions */\n function content(bytes32 node) external view returns (bytes32);\n\n function multihash(bytes32 node) external view returns (bytes memory);\n\n function setContent(bytes32 node, bytes32 hash) external;\n\n function setMultihash(bytes32 node, bytes calldata hash) external;\n}\n" - }, - "contracts/reverseRegistrar/IReverseRegistrar.sol": { - "content": "pragma solidity >=0.8.4;\n\ninterface IReverseRegistrar {\n function setDefaultResolver(address resolver) external;\n\n function claim(address owner) external returns (bytes32);\n\n function claimForAddr(\n address addr,\n address owner,\n address resolver\n ) external returns (bytes32);\n\n function claimWithResolver(\n address owner,\n address resolver\n ) external returns (bytes32);\n\n function setName(string memory name) external returns (bytes32);\n\n function setNameForAddr(\n address addr,\n address owner,\n address resolver,\n string memory name\n ) external returns (bytes32);\n\n function node(address addr) external pure returns (bytes32);\n}\n" - }, - "contracts/reverseRegistrar/ReverseClaimer.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.17 <0.9.0;\n\nimport {ENS} from \"../registry/ENS.sol\";\nimport {IReverseRegistrar} from \"../reverseRegistrar/IReverseRegistrar.sol\";\n\ncontract ReverseClaimer {\n bytes32 constant ADDR_REVERSE_NODE =\n 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\n\n constructor(ENS ens, address claimant) {\n IReverseRegistrar reverseRegistrar = IReverseRegistrar(\n ens.owner(ADDR_REVERSE_NODE)\n );\n reverseRegistrar.claim(claimant);\n }\n}\n" - }, - "contracts/reverseRegistrar/ReverseRegistrar.sol": { - "content": "pragma solidity >=0.8.4;\n\nimport \"../registry/ENS.sol\";\nimport \"./IReverseRegistrar.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"../root/Controllable.sol\";\n\nabstract contract NameResolver {\n function setName(bytes32 node, string memory name) public virtual;\n}\n\nbytes32 constant lookup = 0x3031323334353637383961626364656600000000000000000000000000000000;\n\nbytes32 constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\n\n// namehash('addr.reverse')\n\ncontract ReverseRegistrar is Ownable, Controllable, IReverseRegistrar {\n ENS public immutable ens;\n NameResolver public defaultResolver;\n\n event ReverseClaimed(address indexed addr, bytes32 indexed node);\n event DefaultResolverChanged(NameResolver indexed resolver);\n\n /**\n * @dev Constructor\n * @param ensAddr The address of the ENS registry.\n */\n constructor(ENS ensAddr) {\n ens = ensAddr;\n\n // Assign ownership of the reverse record to our deployer\n ReverseRegistrar oldRegistrar = ReverseRegistrar(\n ensAddr.owner(ADDR_REVERSE_NODE)\n );\n if (address(oldRegistrar) != address(0x0)) {\n oldRegistrar.claim(msg.sender);\n }\n }\n\n modifier authorised(address addr) {\n require(\n addr == msg.sender ||\n controllers[msg.sender] ||\n ens.isApprovedForAll(addr, msg.sender) ||\n ownsContract(addr),\n \"ReverseRegistrar: Caller is not a controller or authorised by address or the address itself\"\n );\n _;\n }\n\n function setDefaultResolver(address resolver) public override onlyOwner {\n require(\n address(resolver) != address(0),\n \"ReverseRegistrar: Resolver address must not be 0\"\n );\n defaultResolver = NameResolver(resolver);\n emit DefaultResolverChanged(NameResolver(resolver));\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @return The ENS node hash of the reverse record.\n */\n function claim(address owner) public override returns (bytes32) {\n return claimForAddr(msg.sender, owner, address(defaultResolver));\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param addr The reverse record to set\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @param resolver The resolver of the reverse node\n * @return The ENS node hash of the reverse record.\n */\n function claimForAddr(\n address addr,\n address owner,\n address resolver\n ) public override authorised(addr) returns (bytes32) {\n bytes32 labelHash = sha3HexAddress(addr);\n bytes32 reverseNode = keccak256(\n abi.encodePacked(ADDR_REVERSE_NODE, labelHash)\n );\n emit ReverseClaimed(addr, reverseNode);\n ens.setSubnodeRecord(ADDR_REVERSE_NODE, labelHash, owner, resolver, 0);\n return reverseNode;\n }\n\n /**\n * @dev Transfers ownership of the reverse ENS record associated with the\n * calling account.\n * @param owner The address to set as the owner of the reverse record in ENS.\n * @param resolver The address of the resolver to set; 0 to leave unchanged.\n * @return The ENS node hash of the reverse record.\n */\n function claimWithResolver(\n address owner,\n address resolver\n ) public override returns (bytes32) {\n return claimForAddr(msg.sender, owner, resolver);\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the calling account. First updates the resolver to the default reverse\n * resolver if necessary.\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setName(string memory name) public override returns (bytes32) {\n return\n setNameForAddr(\n msg.sender,\n msg.sender,\n address(defaultResolver),\n name\n );\n }\n\n /**\n * @dev Sets the `name()` record for the reverse ENS record associated with\n * the account provided. Updates the resolver to a designated resolver\n * Only callable by controllers and authorised users\n * @param addr The reverse record to set\n * @param owner The owner of the reverse node\n * @param resolver The resolver of the reverse node\n * @param name The name to set for this address.\n * @return The ENS node hash of the reverse record.\n */\n function setNameForAddr(\n address addr,\n address owner,\n address resolver,\n string memory name\n ) public override returns (bytes32) {\n bytes32 node = claimForAddr(addr, owner, resolver);\n NameResolver(resolver).setName(node, name);\n return node;\n }\n\n /**\n * @dev Returns the node hash for a given account's reverse records.\n * @param addr The address to hash\n * @return The ENS node hash.\n */\n function node(address addr) public pure override returns (bytes32) {\n return\n keccak256(\n abi.encodePacked(ADDR_REVERSE_NODE, sha3HexAddress(addr))\n );\n }\n\n /**\n * @dev An optimised function to compute the sha3 of the lower-case\n * hexadecimal representation of an Ethereum address.\n * @param addr The address to hash\n * @return ret The SHA3 hash of the lower-case hexadecimal encoding of the\n * input address.\n */\n function sha3HexAddress(address addr) private pure returns (bytes32 ret) {\n assembly {\n for {\n let i := 40\n } gt(i, 0) {\n\n } {\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(addr, 0xf), lookup))\n addr := div(addr, 0x10)\n }\n\n ret := keccak256(0, 40)\n }\n }\n\n function ownsContract(address addr) internal view returns (bool) {\n try Ownable(addr).owner() returns (address owner) {\n return owner == msg.sender;\n } catch {\n return false;\n }\n }\n}\n" - }, - "contracts/root/Controllable.sol": { - "content": "pragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract Controllable is Ownable {\n mapping(address => bool) public controllers;\n\n event ControllerChanged(address indexed controller, bool enabled);\n\n modifier onlyController() {\n require(\n controllers[msg.sender],\n \"Controllable: Caller is not a controller\"\n );\n _;\n }\n\n function setController(address controller, bool enabled) public onlyOwner {\n controllers[controller] = enabled;\n emit ControllerChanged(controller, enabled);\n }\n}\n" - }, - "contracts/utils/ERC20Recoverable.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.17 <0.9.0;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n @notice Contract is used to recover ERC20 tokens sent to the contract by mistake.\n */\n\ncontract ERC20Recoverable is Ownable {\n /**\n @notice Recover ERC20 tokens sent to the contract by mistake.\n @dev The contract is Ownable and only the owner can call the recover function.\n @param _to The address to send the tokens to.\n@param _token The address of the ERC20 token to recover\n @param _amount The amount of tokens to recover.\n */\n function recoverFunds(\n address _token,\n address _to,\n uint256 _amount\n ) external onlyOwner {\n IERC20(_token).transfer(_to, _amount);\n }\n}\n" - }, - "contracts/wrapper/IMetadataService.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface IMetadataService {\n function uri(uint256) external view returns (string memory);\n}\n" - }, - "contracts/wrapper/INameWrapper.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\nimport \"../registry/ENS.sol\";\nimport \"../ethregistrar/IBaseRegistrar.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\";\nimport \"./IMetadataService.sol\";\nimport \"./INameWrapperUpgrade.sol\";\n\nuint32 constant CANNOT_UNWRAP = 1;\nuint32 constant CANNOT_BURN_FUSES = 2;\nuint32 constant CANNOT_TRANSFER = 4;\nuint32 constant CANNOT_SET_RESOLVER = 8;\nuint32 constant CANNOT_SET_TTL = 16;\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\nuint32 constant CANNOT_APPROVE = 64;\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\nuint32 constant IS_DOT_ETH = 1 << 17;\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\nuint32 constant CAN_DO_EVERYTHING = 0;\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\n// all fuses apart from IS_DOT_ETH\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\n\ninterface INameWrapper is IERC1155 {\n event NameWrapped(\n bytes32 indexed node,\n bytes name,\n address owner,\n uint32 fuses,\n uint64 expiry\n );\n\n event NameUnwrapped(bytes32 indexed node, address owner);\n\n event FusesSet(bytes32 indexed node, uint32 fuses);\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\n\n function ens() external view returns (ENS);\n\n function registrar() external view returns (IBaseRegistrar);\n\n function metadataService() external view returns (IMetadataService);\n\n function names(bytes32) external view returns (bytes memory);\n\n function name() external view returns (string memory);\n\n function upgradeContract() external view returns (INameWrapperUpgrade);\n\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\n\n function wrap(\n bytes calldata name,\n address wrappedOwner,\n address resolver\n ) external;\n\n function wrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint16 ownerControlledFuses,\n address resolver\n ) external returns (uint64 expires);\n\n function registerAndWrapETH2LD(\n string calldata label,\n address wrappedOwner,\n uint256 duration,\n address resolver,\n uint16 ownerControlledFuses\n ) external returns (uint256 registrarExpiry);\n\n function renew(\n uint256 labelHash,\n uint256 duration\n ) external returns (uint256 expires);\n\n function unwrap(bytes32 node, bytes32 label, address owner) external;\n\n function unwrapETH2LD(\n bytes32 label,\n address newRegistrant,\n address newController\n ) external;\n\n function upgrade(bytes calldata name, bytes calldata extraData) external;\n\n function setFuses(\n bytes32 node,\n uint16 ownerControlledFuses\n ) external returns (uint32 newFuses);\n\n function setChildFuses(\n bytes32 parentNode,\n bytes32 labelhash,\n uint32 fuses,\n uint64 expiry\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n string calldata label,\n address owner,\n address resolver,\n uint64 ttl,\n uint32 fuses,\n uint64 expiry\n ) external returns (bytes32);\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n string calldata label,\n address newOwner,\n uint32 fuses,\n uint64 expiry\n ) external returns (bytes32);\n\n function extendExpiry(\n bytes32 node,\n bytes32 labelhash,\n uint64 expiry\n ) external returns (uint64);\n\n function canModifyName(\n bytes32 node,\n address addr\n ) external view returns (bool);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function ownerOf(uint256 id) external view returns (address owner);\n\n function approve(address to, uint256 tokenId) external;\n\n function getApproved(uint256 tokenId) external view returns (address);\n\n function getData(\n uint256 id\n ) external view returns (address, uint32, uint64);\n\n function setMetadataService(IMetadataService _metadataService) external;\n\n function uri(uint256 tokenId) external view returns (string memory);\n\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\n\n function allFusesBurned(\n bytes32 node,\n uint32 fuseMask\n ) external view returns (bool);\n\n function isWrapped(bytes32) external view returns (bool);\n\n function isWrapped(bytes32, bytes32) external view returns (bool);\n}\n" - }, - "contracts/wrapper/INameWrapperUpgrade.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity ~0.8.17;\n\ninterface INameWrapperUpgrade {\n function wrapFromUpgrade(\n bytes calldata name,\n address wrappedOwner,\n uint32 fuses,\n uint64 expiry,\n address approved,\n bytes calldata extraData\n ) external;\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 1300 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/hardhat.config.ts b/hardhat.config.ts index 656cfbd..f9f4090 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -73,7 +73,8 @@ const config: HardhatUserConfig = { tags: ['test', 'legacy', 'use_root'], chainId: 11155111, accounts: real_accounts, - gasPrice: 8000000000, + // 8000000000 = 8 Gwei + gasPrice: 1300000000, }, mainnet: { url: `https://mainnet.infura.io/v3/${process.env.INFURA_API_KEY}`, diff --git a/test/anytype/TestAnytypeRegistrarController.js b/test/anytype/TestAnytypeRegistrarController.js index 44c9657..b7f5eed 100644 --- a/test/anytype/TestAnytypeRegistrarController.js +++ b/test/anytype/TestAnytypeRegistrarController.js @@ -99,7 +99,12 @@ contract('AnytypeRegistrarController', function () { signers = await ethers.getSigners() ownerAccount = await signers[0].getAddress() registrantAccount = await signers[1].getAddress() - accounts = [ownerAccount, registrantAccount, signers[2].getAddress()] + accounts = [ + ownerAccount, + registrantAccount, + signers[2].getAddress(), + signers[3].getAddress(), + ] ens = await deploy('ENSRegistry') @@ -177,7 +182,10 @@ contract('AnytypeRegistrarController', function () { // deploy ERC20 "stablecoin" stub contract with initial balance of 0 USD tokens stable1 = await deploy('ERC20StablecoinStub', 'Token1', 'USDCC', 18, 0) - nameToken = await deploy('ERC20NameToken') + nameToken = await deploy( + 'ERC20NameToken', + accounts[3], // minter + ) // add it as a payment option await controller.addERC20UsdPaymentOption(stable1.address, 18) diff --git a/test/anytype/TestAnytypeRegistrarControllerPrivate.js b/test/anytype/TestAnytypeRegistrarControllerPrivate.js index 999fbb0..373f310 100644 --- a/test/anytype/TestAnytypeRegistrarControllerPrivate.js +++ b/test/anytype/TestAnytypeRegistrarControllerPrivate.js @@ -82,7 +82,14 @@ contract('AnytypeRegistrarControllerPrivate', function () { signers = await ethers.getSigners() ownerAccount = await signers[0].getAddress() registrantAccount = await signers[1].getAddress() - accounts = [ownerAccount, registrantAccount, signers[2].getAddress()] + accounts = [ + ownerAccount, + registrantAccount, + signers[2].getAddress(), + signers[3].getAddress(), + signers[4].getAddress(), + signers[5].getAddress(), + ] ens = await deploy('ENSRegistry') @@ -125,6 +132,8 @@ contract('AnytypeRegistrarControllerPrivate', function () { reverseRegistrar.address, nameWrapper.address, ens.address, + accounts[3], // minter account + accounts[4], // minter scw ) controller2 = controller.connect(signers[1]) @@ -188,6 +197,36 @@ contract('AnytypeRegistrarControllerPrivate', function () { '\ud83d\udca9\ud83d\udca9': false, } + it('should not permit to change minter if called not from admin', async () => { + await expect( + controller.changeMinters( + signers[4].getAddress(), + signers[5].getAddress(), + { from: accounts[1] }, + ), + ).to.be.reverted + + await expect( + controller.changeMinters( + signers[4].getAddress(), + signers[5].getAddress(), + // current minter also should not be able to change + { from: accounts[3] }, + ), + ).to.be.reverted + }) + + it('should permit to change minter if called from admin', async () => { + const tx = await controller.changeMinters( + signers[4].getAddress(), + signers[5].getAddress(), + { + from: accounts[0], + }, + ) + await expect(tx).to.emit(controller, 'MintersChanged') + }) + it('should report label validity', async () => { for (const label in checkLabels) { expect(await controller.valid(label)).to.equal(checkLabels[label], label) diff --git a/test/anytype/TestERC20NameToken.js b/test/anytype/TestERC20NameToken.js index 0ad0713..fbe4dbc 100644 --- a/test/anytype/TestERC20NameToken.js +++ b/test/anytype/TestERC20NameToken.js @@ -23,11 +23,15 @@ contract('ERC20NameToken', function (accounts) { signers = await ethers.getSigners() account = await signers[0].getAddress() account2 = await signers[1].getAddress() + minter = await signers[2].getAddress() assert.notEqual(account, account2) // 1 name token only to the owner - nameToken = await deploy('ERC20NameToken') + nameToken = await deploy( + 'ERC20NameToken', + minter, // minter account + ) assert.equal(await nameToken.name(), 'AnyNameToken') }) @@ -39,6 +43,21 @@ contract('ERC20NameToken', function (accounts) { }) }) + describe('changeMinter', async () => { + it('should not permit to change minter if called not from admin', async () => { + await expect( + nameToken.changeMinter(signers[4].getAddress(), { from: accounts[1] }), + ).to.be.reverted + }) + + it('should permit to change minter if called from admin', async () => { + const tx = await nameToken.changeMinter(signers[4].getAddress(), { + from: accounts[0], + }) + await expect(tx).to.emit(controller, 'MintersChanged') + }) + }) + describe('mint', async () => { it('should not mint X to if not from owner', async () => { await expect(nameToken.mint(account2, 15000, { from: account2 })).to.be