github.com/igggame/nebulas-go@v2.1.0+incompatible/nebtestkit/cases/testnet_config.js (about)

     1  'use strict';
     2  
     3  var Wallet = require("nebulas");
     4  
     5  
     6  var TestNet = function (env) {
     7  
     8      this.ChainId = "";
     9      this.SourceAccount = "";
    10      this.coinbase = "";
    11      this.apiEndPoint = "";
    12  
    13      if (env === 'testneb1') {
    14  
    15          this.ChainId = 1001;
    16          this.sourceAccount = new Wallet.Account("25a3a441a34658e7a595a0eda222fa43ac51bd223017d17b420674fb6d0a4d52");
    17          this.coinbase = "n1SAeQRVn33bamxN4ehWUT7JGdxipwn8b17";
    18          this.apiEndPoint = "http://13.57.120.136:8685";
    19  
    20      } else if (env === "testneb2") {
    21  
    22          this.ChainId = 1002;
    23          this.sourceAccount = new Wallet.Account("1d3fe06a53919e728315e2ccca41d4aa5b190845a79007797517e62dbc0df454");
    24          this.coinbase = "n1SAeQRVn33bamxN4ehWUT7JGdxipwn8b17";
    25          this.apiEndPoint = "http://34.205.26.12:8685";
    26  
    27      } else if (env === "testneb3") {
    28  
    29          this.ChainId = 1003;
    30          this.sourceAccount = new Wallet.Account("25a3a441a34658e7a595a0eda222fa43ac51bd223017d17b420674fb6d0a4d52");
    31          this.coinbase = "n1SAeQRVn33bamxN4ehWUT7JGdxipwn8b17";
    32      //    this.apiEndPoint = "http://35.182.205.40:8685";
    33          
    34          this.apiEndPoint = "http://13.57.120.136:8685";
    35  
    36      } else if (env === "testneb4") { //super node
    37  
    38          this.ChainId = 1004;
    39          this.sourceAccount = new Wallet.Account("c75402f6ffe6edcc2c062134b5932151cb39b6486a7beb984792bb9da3f38b9f");
    40          this.coinbase = "n1EzGmFsVepKduN1U5QFyhLqpzFvM9sRSmG";
    41          this.apiEndPoint = "http://35.154.108.11:8685";
    42  
    43      } else if (env === "maintest") {
    44  
    45          this.ChainId = 2;
    46          this.sourceAccount = new Wallet.Account("d2319a8a63b1abcb0cc6d4183198e5d7b264d271f97edf0c76cfdb1f2631848c");
    47          this.coinbase = "n1dZZnqKGEkb1LHYsZRei1CH6DunTio1j1q";
    48          this.apiEndPoint = "https://mainnet.nebulas.io";
    49  
    50      } else if (env === "local") {
    51  
    52          this.ChainId = 100;
    53          this.sourceAccount = new Wallet.Account("1d3fe06a53919e728315e2ccca41d4aa5b190845a79007797517e62dbc0df454");
    54          this.coinbase = "n1XkoVVjswb5Gek3rRufqjKNpwrDdsnQ7Hq";
    55          this.apiEndPoint = "http://127.0.0.1:8685";
    56  
    57      } else {
    58          console.log("====> could not found specified env: " + env + ", using local env instead");
    59          console.log("====> example: mocha cases/contract/xxx testneb2 -t 2000000");
    60          env = "local";
    61          // throw new Error("invalid env (" + env + ").");
    62  
    63          this.ChainId = 100;
    64          this.sourceAccount = new Wallet.Account("1d3fe06a53919e728315e2ccca41d4aa5b190845a79007797517e62dbc0df454");
    65          this.coinbase = "n1QZMXSZtW7BUerroSms4axNfyBGyFGkrh5";
    66          this.apiEndPoint = "http://127.0.0.1:8685";
    67  
    68      }
    69      console.log("\n=====> running: env:", env, " ChainId:", this.ChainId, " apiEndPoint:", this.apiEndPoint, " time:", new Date());
    70  
    71  };
    72  
    73  module.exports = TestNet;