Skip to content

Commit

Permalink
Add AbstractENS interface and remove @aragon/os dependency
Browse files Browse the repository at this point in the history
Address PR #22 comments.
  • Loading branch information
bingen committed Sep 26, 2018
1 parent 5ab5410 commit 060725b
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 14 deletions.
7 changes: 2 additions & 5 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
module.exports = {
norpc: true,
copyPackages: ['@aragon/os'],
skipFiles: [
'IFIFSResolvingRegistrar.sol',
'ens/IPublicResolver.sol',
'ens/',
'interface/ApproveAndCallReceiver.sol',
'misc/Migrations.sol',
'zeppelin/ERC20.sol',
'zeppelin/ERC20Basic.sol',
'zeppelin/Ownable.sol',
'zeppelin/',
'test/',
]
}
2 changes: 1 addition & 1 deletion contracts/FIFSResolvingRegistrar.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity 0.4.24;

import "@aragon/os/contracts/lib/ens/AbstractENS.sol";
import "./ens/AbstractENS.sol";
import "./ens/IPublicResolver.sol";
import "./IFIFSResolvingRegistrar.sol";

Expand Down
24 changes: 24 additions & 0 deletions contracts/ens/AbstractENS.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pragma solidity ^0.4.15;


interface AbstractENS {
function owner(bytes32 _node) public constant returns (address);
function resolver(bytes32 _node) public constant returns (address);
function ttl(bytes32 _node) public constant returns (uint64);
function setOwner(bytes32 _node, address _owner) public;
function setSubnodeOwner(bytes32 _node, bytes32 label, address _owner) public;
function setResolver(bytes32 _node, address _resolver) public;
function setTTL(bytes32 _node, uint64 _ttl) public;

// Logged when the owner of a node assigns a new owner to a subnode.
event NewOwner(bytes32 indexed _node, bytes32 indexed _label, address _owner);

// Logged when the owner of a node transfers ownership to a new account.
event Transfer(bytes32 indexed _node, address _owner);

// Logged when the resolver for a node changes.
event NewResolver(bytes32 indexed _node, address _resolver);

// Logged when the TTL of a node changes
event NewTTL(bytes32 indexed _node, uint64 _ttl);
}
2 changes: 1 addition & 1 deletion contracts/test/ens/ENS.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.4.0;

import "@aragon/os/contracts/lib/ens/AbstractENS.sol";
import "../../ens/AbstractENS.sol";


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/ens/FIFSRegistrar.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.4.0;

import "@aragon/os/contracts/lib/ens/AbstractENS.sol";
import "../../ens/AbstractENS.sol";

/**
* A registrar that allocates subdomains to the first person to claim them.
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/ens/PublicResolver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity ^0.4.0;

import "@aragon/os/contracts/lib/ens/AbstractENS.sol";
import "../../ens/AbstractENS.sol";

/**
* A simple resolver anyone can use; only allows the owner of a node to set its
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/ens/Registrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The plan is to test the basic features and then move to a new contract in at mos
*/


import "@aragon/os/contracts/lib/ens/AbstractENS.sol";
import "../../ens/AbstractENS.sol";


/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/test/mocks/MockResolver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pragma solidity 0.4.24;

import "@aragon/os/contracts/lib/ens/AbstractENS.sol";
import "../../ens/AbstractENS.sol";


contract MockResolver {
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,5 @@
"solidity-coverage": "^0.5.8",
"truffle": "4.1.14",
"truffle-hdwallet-provider": "0.0.3"
},
"dependencies": {
"@aragon/os": "4.0.0-beta.2"
}
}

0 comments on commit 060725b

Please sign in to comment.