diff --git a/lib/modules/ens/contracts/FIFSRegistrar.sol b/lib/modules/ens/contracts/FIFSRegistrar.sol index 62b7f270..2a739a29 100644 --- a/lib/modules/ens/contracts/FIFSRegistrar.sol +++ b/lib/modules/ens/contracts/FIFSRegistrar.sol @@ -10,7 +10,8 @@ contract FIFSRegistrar { bytes32 rootNode; modifier only_owner(bytes32 subnode) { - address currentOwner = ens.owner(keccak256(rootNode, subnode)); + bytes32 node = sha3(rootNode, subnode); + address currentOwner = ens.owner(node); require(currentOwner == 0 || currentOwner == msg.sender); _; } @@ -30,6 +31,11 @@ contract FIFSRegistrar { * @param subnode The hash of the label to register. * @param owner The address of the new owner. */ + /* + function register(bytes32 subnode, address owner) public only_owner(subnode) { + ens.setSubnodeOwner(rootNode, subnode, owner); + } +*/ function register(bytes32 subnode, address owner) public only_owner(subnode) { ens.setSubnodeOwner(rootNode, subnode, owner); } diff --git a/lib/modules/ens/index.js b/lib/modules/ens/index.js index fac81782..53c67b9e 100644 --- a/lib/modules/ens/index.js +++ b/lib/modules/ens/index.js @@ -104,7 +104,7 @@ class ENS { "FIFSRegistrar": { "deploy": true, "args": ["$ENSRegistry", rootNode], - "onDeploy": ["ENSRegistry.methods.setOwner(0, FIFSRegistrar.options.address).send()"] + "onDeploy": ["ENSRegistry.methods.setOwner('"+rootNode+"', web3.eth.defaultAccount).send()"] } } },