github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/ir/auth_table/auth.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 auto admin_addr = {0x19, 0x57, 0x73, 0x3f, 0x7b, 0x52, 0xad, 0x3a, 0x99, 34 0xc5, 0x56, 0x84, 0xb3, 0x9f, 0x4c, 0x31, 0xe0, 0x5c, 35 0x35, 0x0c, 0x5d, 0xaa, 0xb0, 0x7e, 0x87, 0x5b}; 36 37 std::vector<row_t> auth_table = { 38 std::make_tuple("nr", std::string(admin_addr.begin(), admin_addr.end()), 39 1ULL, 200000ULL), 40 std::make_tuple("dip", std::string(admin_addr.begin(), admin_addr.end()), 41 1ULL, 200000ULL)}; 42 return auth_table; 43 } 44