github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/ir/auth_table/auth_testnet.cpp (about)

     1  // Copyright (C) 2018 go-nebulas authors
     2  //
     3  // This file is part of the go-nebulas library.
     4  //
     5  // the go-nebulas library is free software: you can redistribute it and/or
     6  // modify
     7  // it under the terms of the GNU General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // the go-nebulas library is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  // GNU General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU General Public License
    17  // along with the go-nebulas library.  If not, see
    18  // <http://www.gnu.org/licenses/>.
    19  //
    20  
    21  #include <string>
    22  #include <tuple>
    23  #include <vector>
    24  
    25  typedef std::string name_t;
    26  typedef std::string address_t;
    27  typedef uint64_t height_t;
    28  
    29  typedef std::tuple<name_t, address_t, height_t, height_t> row_t;
    30  
    31  std::vector<row_t> entry_point_auth() {
    32  
    33    // testnet admin address: n1UodK5h3o7yHFLHe9Vq4N3WZGUthsWm6j7
    34    auto admin_addr = {0x19, 0x57, 0x9c, 0xbd, 0xfd, 0x7c, 0x04, 0xad, 0x91,
    35                       0x44, 0x41, 0x5f, 0x48, 0xe1, 0xe5, 0x08, 0x54, 0x0d,
    36                       0xb6, 0x99, 0x61, 0x70, 0xae, 0xd4, 0x78, 0xae};
    37  
    38    std::vector<row_t> auth_table = {
    39        std::make_tuple("nr", std::string(admin_addr.begin(), admin_addr.end()),
    40                        1562800ULL, 3000000ULL),
    41        std::make_tuple("dip", std::string(admin_addr.begin(), admin_addr.end()),
    42                        1562800ULL, 3000000ULL)};
    43    return auth_table;
    44  }
    45