Created
May 9, 2020 01:26
-
-
Save kvhnuke/fe547109276c2743840091ce760cf093 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity >=0.4.22 <0.6.0; | |
pragma solidity ^0.5.0; | |
interface ENS{ | |
function nameExpires(uint256 id) external view returns(uint); | |
} | |
contract NameExpires { | |
constructor() public {} | |
function getExpirationDates(address ensAdd, uint[] memory labelHases) public view returns(uint[] memory){ | |
ENS ens = ENS(ensAdd); | |
uint[] memory expires = new uint[](labelHases.length); | |
for(uint i=0; i<labelHases.length; i++){ | |
expires[i] = ens.nameExpires(labelHases[i]); | |
} | |
return expires; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "ensAdd",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "labelHases",
"type": "uint256[]"
}
],
"name": "getExpirationDates",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
]