migrations/2_deploy_contracts.js
function deployFIFSRegistrar(deployer, tld) {
  var rootNode = getRootNodeFromTLD(tld);

  // Deploy the ENS first
  deployer.deploy(ENS)
    .then(() => {
      // Deploy the FIFSRegistrar and bind it with ENS
      return deployer.deploy(FIFSRegistrar, ENS.address, rootNode.namehash);
    })
    .then(function() {
      // Transfer the owner of the `rootNode` to the FIFSRegistrar
      return ENS.at(ENS.address).then((c) => c.setSubnodeOwner('0x0', rootNode.sha3, FIFSRegistrar.address));
    });
}
function deployFIFSRegistrar(deployer, tld) {
  var rootNode = getRootNodeFromTLD(tld);

  // Deploy the ENS first
  deployer.deploy(ENS)
    .then(() => {
      // Deploy the FIFSRegistrar and bind it with ENS
      return deployer.deploy(FIFSRegistrar, ENS.address, rootNode.namehash);
    })
    .then(function() {
      // Transfer the owner of the `rootNode` to the FIFSRegistrar
      return ENS.at(ENS.address).then((c) => c.setSubnodeOwner('0x0', rootNode.sha3, FIFSRegistrar.address));
    });
}
function deployFIFSRegistrar ( deployer , tld ) { var rootNode = getRootNodeFromTLD ( tld ) ; // Deploy the ENS first deployer . deploy ( ENS ) . then ( ( ) => { // Deploy the FIFSRegistrar and bind it with ENS return deployer . deploy ( FIFSRegistrar , ENS . address , rootNode . namehash ) ; } ) . then ( function ( ) { // Transfer the owner of the `rootNode` to the FIFSRegistrar return ENS . at ( ENS . address ) . then ( ( c ) => c . setSubnodeOwner ( '0x0' , rootNode . sha3 , FIFSRegistrar . address ) ) ; } ) ; }
Deploy the ENS and FIFSRegistrar

@param {Object} deployer truffle deployer helper
@param {string} tld tld which the FIFS registrar takes charge of
Deploy the ENS and FIFSRegistrar