Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
INSRegistry
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2022-06-05
*/
// File: contracts/IIDN.sol
pragma solidity >=0.4.22 <0.9.0;
pragma experimental ABIEncoderV2;
interface IIDN {
function mint(address to, uint256 tokenid) external;
function available(uint256 tokenid) external view returns (bool);
}
// File: contracts/IDNSRegistry.sol
interface IDNSRegistry {
function idExpires(address nft, uint tokenid, bool includeGracePeriod) external view returns (uint);
function register(address to, uint tokenid, uint expireTime) external;
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: contracts/INSRegistry.sol
contract INSRegistry is IDNSRegistry, Ownable {
uint public gracePeroid;
mapping(uint => uint) public tokenidExpirationTimes;
address public idn;
constructor(address idnAddress) {
idn = idnAddress;
}
function setGracePeroid(uint value) public onlyOwner {
gracePeroid = value;
}
function register(address to, uint tokenid, uint expireTime) public override {
require(idExpires(idn, tokenid, true) < block.timestamp, "ID_IS_TAKEN");
tokenidExpirationTimes[tokenid] = block.timestamp + expireTime;
IIDN bunft = IIDN(idn);
bunft.mint(to, tokenid);
}
function idExpires(address nft, uint tokenid, bool includeGracePeriod) public override view returns (uint) {
require(nft == idn, "IDN_ADDR_NOT_MET");
uint expires = tokenidExpirationTimes[tokenid];
if (expires == 0) {
return 0;
} else {
return includeGracePeriod ? expires + gracePeroid : expires;
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"idnAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"gracePeroid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenid","type":"uint256"},{"internalType":"bool","name":"includeGracePeriod","type":"bool"}],"name":"idExpires","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"idn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenid","type":"uint256"},{"internalType":"uint256","name":"expireTime","type":"uint256"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setGracePeroid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenidExpirationTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b5060405161067038038061067083398101604081905261002f916100ad565b6100383361005d565b600380546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b610584806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100f1578063b634f75d14610116578063e342a7d614610129578063f2fde38b1461013c578063f9454f3f1461014f57600080fd5b8063462fe0ef14610098578063565ed832146100b45780636cd48613146100c7578063715018a6146100e7575b600080fd5b6100a160015481565b6040519081526020015b60405180910390f35b6100a16100c2366004610462565b610162565b6100a16100d53660046104da565b60026020526000908152604090205481565b6100ef6101fb565b005b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100ab565b6100ef6101243660046104da565b610231565b6003546100fe906001600160a01b031681565b6100ef61014a366004610447565b610260565b6100ef61015d3660046104a7565b6102fb565b6003546000906001600160a01b038581169116146101ba5760405162461bcd60e51b815260206004820152601060248201526f12511397d051111497d393d517d3515560821b60448201526064015b60405180910390fd5b600083815260026020526040902054806101d85760009150506101f4565b826101e357806101f0565b6001546101f09082610528565b9150505b9392505050565b6000546001600160a01b031633146102255760405162461bcd60e51b81526004016101b1906104f3565b61022f60006103db565b565b6000546001600160a01b0316331461025b5760405162461bcd60e51b81526004016101b1906104f3565b600155565b6000546001600160a01b0316331461028a5760405162461bcd60e51b81526004016101b1906104f3565b6001600160a01b0381166102ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101b1565b6102f8816103db565b50565b6003544290610315906001600160a01b0316846001610162565b106103505760405162461bcd60e51b815260206004820152600b60248201526a24a22fa4a9afaa20a5a2a760a91b60448201526064016101b1565b61035a8142610528565b600083815260026020526040908190209190915560035490516340c10f1960e01b81526001600160a01b038581166004830152602482018590529091169081906340c10f1990604401600060405180830381600087803b1580156103bd57600080fd5b505af11580156103d1573d6000803e3d6000fd5b5050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461044257600080fd5b919050565b60006020828403121561045957600080fd5b6101f48261042b565b60008060006060848603121561047757600080fd5b6104808461042b565b9250602084013591506040840135801515811461049c57600080fd5b809150509250925092565b6000806000606084860312156104bc57600080fd5b6104c58461042b565b95602085013595506040909401359392505050565b6000602082840312156104ec57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561054957634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122037ac21eb51700eec72d004e43d88af72a44fc7cea14148b3c66d8c8bcc9d559164736f6c634300080700330000000000000000000000002bdb4d17fe8f016da07a5b33ae19ded0d0f93030
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100f1578063b634f75d14610116578063e342a7d614610129578063f2fde38b1461013c578063f9454f3f1461014f57600080fd5b8063462fe0ef14610098578063565ed832146100b45780636cd48613146100c7578063715018a6146100e7575b600080fd5b6100a160015481565b6040519081526020015b60405180910390f35b6100a16100c2366004610462565b610162565b6100a16100d53660046104da565b60026020526000908152604090205481565b6100ef6101fb565b005b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100ab565b6100ef6101243660046104da565b610231565b6003546100fe906001600160a01b031681565b6100ef61014a366004610447565b610260565b6100ef61015d3660046104a7565b6102fb565b6003546000906001600160a01b038581169116146101ba5760405162461bcd60e51b815260206004820152601060248201526f12511397d051111497d393d517d3515560821b60448201526064015b60405180910390fd5b600083815260026020526040902054806101d85760009150506101f4565b826101e357806101f0565b6001546101f09082610528565b9150505b9392505050565b6000546001600160a01b031633146102255760405162461bcd60e51b81526004016101b1906104f3565b61022f60006103db565b565b6000546001600160a01b0316331461025b5760405162461bcd60e51b81526004016101b1906104f3565b600155565b6000546001600160a01b0316331461028a5760405162461bcd60e51b81526004016101b1906104f3565b6001600160a01b0381166102ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101b1565b6102f8816103db565b50565b6003544290610315906001600160a01b0316846001610162565b106103505760405162461bcd60e51b815260206004820152600b60248201526a24a22fa4a9afaa20a5a2a760a91b60448201526064016101b1565b61035a8142610528565b600083815260026020526040908190209190915560035490516340c10f1960e01b81526001600160a01b038581166004830152602482018590529091169081906340c10f1990604401600060405180830381600087803b1580156103bd57600080fd5b505af11580156103d1573d6000803e3d6000fd5b5050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461044257600080fd5b919050565b60006020828403121561045957600080fd5b6101f48261042b565b60008060006060848603121561047757600080fd5b6104808461042b565b9250602084013591506040840135801515811461049c57600080fd5b809150509250925092565b6000806000606084860312156104bc57600080fd5b6104c58461042b565b95602085013595506040909401359392505050565b6000602082840312156104ec57600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561054957634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122037ac21eb51700eec72d004e43d88af72a44fc7cea14148b3c66d8c8bcc9d559164736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002bdb4d17fe8f016da07a5b33ae19ded0d0f93030
-----Decoded View---------------
Arg [0] : idnAddress (address): 0x2BdB4D17Fe8f016da07A5b33Ae19deD0D0f93030
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002bdb4d17fe8f016da07a5b33ae19ded0d0f93030
Deployed Bytecode Sourcemap
3980:1039:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4033:23;;;;;;;;;3401:25:1;;;3389:2;3374:18;4033:23:0;;;;;;;;4639:377;;;;;;:::i;:::-;;:::i;4063:51::-;;;;;;:::i;:::-;;;;;;;;;;;;;;3119:103;;;:::i;:::-;;2468:87;2514:7;2541:6;-1:-1:-1;;;;;2541:6:0;2468:87;;;-1:-1:-1;;;;;1479:32:1;;;1461:51;;1449:2;1434:18;2468:87:0;1315:203:1;4223:91:0;;;;;;:::i;:::-;;:::i;4121:18::-;;;;;-1:-1:-1;;;;;4121:18:0;;;3377:201;;;;;;:::i;:::-;;:::i;4322:309::-;;;;;;:::i;:::-;;:::i;4639:377::-;4772:3;;4740:4;;-1:-1:-1;;;;;4765:10:0;;;4772:3;;4765:10;4757:39;;;;-1:-1:-1;;;4757:39:0;;3112:2:1;4757:39:0;;;3094:21:1;3151:2;3131:18;;;3124:30;-1:-1:-1;;;3170:18:1;;;3163:46;3226:18;;4757:39:0;;;;;;;;;4807:12;4822:31;;;:22;:31;;;;;;4868:12;4864:145;;4904:1;4897:8;;;;;4864:145;4945:18;:52;;4990:7;4945:52;;;4976:11;;4966:21;;:7;:21;:::i;:::-;4938:59;;;4639:377;;;;;;:::o;3119:103::-;2514:7;2541:6;-1:-1:-1;;;;;2541:6:0;1272:10;2688:23;2680:68;;;;-1:-1:-1;;;2680:68:0;;;;;;;:::i;:::-;3184:30:::1;3211:1;3184:18;:30::i;:::-;3119:103::o:0;4223:91::-;2514:7;2541:6;-1:-1:-1;;;;;2541:6:0;1272:10;2688:23;2680:68;;;;-1:-1:-1;;;2680:68:0;;;;;;;:::i;:::-;4287:11:::1;:19:::0;4223:91::o;3377:201::-;2514:7;2541:6;-1:-1:-1;;;;;2541:6:0;1272:10;2688:23;2680:68;;;;-1:-1:-1;;;2680:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;3466:22:0;::::1;3458:73;;;::::0;-1:-1:-1;;;3458:73:0;;2344:2:1;3458:73:0::1;::::0;::::1;2326:21:1::0;2383:2;2363:18;;;2356:30;2422:34;2402:18;;;2395:62;-1:-1:-1;;;2473:18:1;;;2466:36;2519:19;;3458:73:0::1;2142:402:1::0;3458:73:0::1;3542:28;3561:8;3542:18;:28::i;:::-;3377:201:::0;:::o;4322:309::-;4428:3;;4450:15;;4418:29;;-1:-1:-1;;;;;4428:3:0;4433:7;4428:3;4418:9;:29::i;:::-;:47;4410:71;;;;-1:-1:-1;;;4410:71:0;;2004:2:1;4410:71:0;;;1986:21:1;2043:2;2023:18;;;2016:30;-1:-1:-1;;;2062:18:1;;;2055:41;2113:18;;4410:71:0;1802:335:1;4410:71:0;4528:28;4546:10;4528:15;:28;:::i;:::-;4494:31;;;;:22;:31;;;;;;;:62;;;;4585:3;;4600:23;;-1:-1:-1;;;4600:23:0;;-1:-1:-1;;;;;1715:32:1;;;4600:23:0;;;1697:51:1;1764:18;;;1757:34;;;4585:3:0;;;;;;4600:10;;1670:18:1;;4600:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4399:232;4322:309;;;:::o;3738:191::-;3812:16;3831:6;;-1:-1:-1;;;;;3848:17:0;;;-1:-1:-1;;;;;;3848:17:0;;;;;;3881:40;;3831:6;;;;;;;3881:40;;3812:16;3881:40;3801:128;3738:191;:::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;383:415::-;457:6;465;473;526:2;514:9;505:7;501:23;497:32;494:52;;;542:1;539;532:12;494:52;565:29;584:9;565:29;:::i;:::-;555:39;;641:2;630:9;626:18;613:32;603:42;;695:2;684:9;680:18;667:32;742:5;735:13;728:21;721:5;718:32;708:60;;764:1;761;754:12;708:60;787:5;777:15;;;383:415;;;;;:::o;803:322::-;880:6;888;896;949:2;937:9;928:7;924:23;920:32;917:52;;;965:1;962;955:12;917:52;988:29;1007:9;988:29;:::i;:::-;978:39;1064:2;1049:18;;1036:32;;-1:-1:-1;1115:2:1;1100:18;;;1087:32;;803:322;-1:-1:-1;;;803:322:1:o;1130:180::-;1189:6;1242:2;1230:9;1221:7;1217:23;1213:32;1210:52;;;1258:1;1255;1248:12;1210:52;-1:-1:-1;1281:23:1;;1130:180;-1:-1:-1;1130:180:1:o;2549:356::-;2751:2;2733:21;;;2770:18;;;2763:30;2829:34;2824:2;2809:18;;2802:62;2896:2;2881:18;;2549:356::o;3437:225::-;3477:3;3508:1;3504:6;3501:1;3498:13;3495:136;;;3553:10;3548:3;3544:20;3541:1;3534:31;3588:4;3585:1;3578:15;3616:4;3613:1;3606:15;3495:136;-1:-1:-1;3647:9:1;;3437:225::o
Swarm Source
ipfs://37ac21eb51700eec72d004e43d88af72a44fc7cea14148b3c66d8c8bcc9d5591
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.