tools/setup/branded_token/register.js
async function () {
    const oThis = this;

    // Validate new branded token
    logger.step("** Validating branded token");
    await oThis._validateBrandedTokenDetails();

    // Generate reserve address
    logger.step("** Generating reserve address");
    var addressRes = await oThis._generateAddress();
    oThis.reserveAddress = addressRes.data.address;
    logger.info("* address:", oThis.reserveAddress);

    // Start the BT proposal
    var proposeRes = await oThis._propose();

    // Monitor the BT proposal response
    var statusRes = await oThis._checkProposeStatus(proposeRes.data.transaction_hash);
    var registrationStatus = statusRes.data.registration_status;
    oThis.uuid = registrationStatus['uuid'];
    oThis.erc20 = registrationStatus['erc20_address'];

    // Add branded token to config file
    logger.step("** Updating branded token config file");
    await oThis._updateBrandedTokenConfig();

    // Allocating shard for storage of token balances
    logger.step("** Allocating shard for storage of token balances");
    await oThis._allocateShard();

    process.exit(0);

  }
async function () {
    const oThis = this;

    // Validate new branded token
    logger.step("** Validating branded token");
    await oThis._validateBrandedTokenDetails();

    // Generate reserve address
    logger.step("** Generating reserve address");
    var addressRes = await oThis._generateAddress();
    oThis.reserveAddress = addressRes.data.address;
    logger.info("* address:", oThis.reserveAddress);

    // Start the BT proposal
    var proposeRes = await oThis._propose();

    // Monitor the BT proposal response
    var statusRes = await oThis._checkProposeStatus(proposeRes.data.transaction_hash);
    var registrationStatus = statusRes.data.registration_status;
    oThis.uuid = registrationStatus['uuid'];
    oThis.erc20 = registrationStatus['erc20_address'];

    // Add branded token to config file
    logger.step("** Updating branded token config file");
    await oThis._updateBrandedTokenConfig();

    // Allocating shard for storage of token balances
    logger.step("** Allocating shard for storage of token balances");
    await oThis._allocateShard();

    process.exit(0);

  }
async function ( ) { const oThis = this ; // Validate new branded token logger . step ( "** Validating branded token" ) ; await oThis . _validateBrandedTokenDetails ( ) ; // Generate reserve address logger . step ( "** Generating reserve address" ) ; var addressRes = await oThis . _generateAddress ( ) ; oThis . reserveAddress = addressRes . data . address ; logger . info ( "* address:" , oThis . reserveAddress ) ; // Start the BT proposal var proposeRes = await oThis . _propose ( ) ; // Monitor the BT proposal response var statusRes = await oThis . _checkProposeStatus ( proposeRes . data . transaction_hash ) ; var registrationStatus = statusRes . data . registration_status ; oThis . uuid = registrationStatus [ 'uuid' ] ; oThis . erc20 = registrationStatus [ 'erc20_address' ] ; // Add branded token to config file logger . step ( "** Updating branded token config file" ) ; await oThis . _updateBrandedTokenConfig ( ) ; // Allocating shard for storage of token balances logger . step ( "** Allocating shard for storage of token balances" ) ; await oThis . _allocateShard ( ) ; process . exit ( 0 ) ; }
Start BT proposal
Start BT proposal