ensdomains / ens

Implementations for ENS core functionality: The registry, registrars, and public resolvers.
https://ens.domains/
BSD 2-Clause "Simplified" License
1.16k stars 510 forks source link

truffle migrate to dev.fifs fails on setSubnodeOwner #325

Closed novakov-alexey-zz closed 5 years ago

novakov-alexey-zz commented 5 years ago

When I run truffle migrate --network dev.fifs

It fails with error:

Deploying 'FIFSRegistrar'
   -------------------------
   > transaction hash:    0x3171ac27bfa460866ecba590271155f14c211b89bda03fe7a426f26e20a5b728
   > Blocks: 0            Seconds: 0
   > contract address:    0xfd99008614d5800Cea28156adaA0442A53A8D7f7
   > account:             0x164Eb4B5CA48eD61af3C05222B1f91C68D3C5343
   > balance:             99.86372552
   > gas used:            317101
   > gas price:           20 gwei
   > value sent:          0 ETH
   > total cost:          0.00634202 ETH

TypeError: ENS.at(...).setSubnodeOwner is not a function
    at /Users/aa/dev/git/github/ens/migrations/2_deploy_contracts.js:41:27
    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-deployer/src/deferredchain.js:20:1
    at processTicksAndRejections (internal/process/next_tick.js:81:5)
Truffle v5.0.9 (core: 5.0.9)
Node v11.12.0

If I change the migration script like this:

return ENS.at(ENS.address).then((c) => {c.setSubnodeOwner('0x0', rootNode.sha3, FIFSRegistrar.address)});

then it seems it works.

makoto commented 5 years ago

Thank you for raising the issue. Looks like you already know the solution. I can fix it or would you like to raise PR which I can merge?

novakov-alexey-zz commented 5 years ago

Welcome. Yes, I can try to make a PR soon.