From 3eec7cba8d751094a78980898fea095ed2c064c6 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Wed, 13 Nov 2024 19:31:20 +0300 Subject: [PATCH] Added quebecnet (#1026) --- configs/development.yml | 11 +++++++++++ internal/bcd/protocols.go | 2 ++ internal/models/types/network.go | 3 +++ internal/parsers/operations/migration.go | 3 ++- internal/parsers/protocols/protocol.go | 6 ++++-- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/configs/development.yml b/configs/development.yml index 126700da3..5290dd159 100644 --- a/configs/development.yml +++ b/configs/development.yml @@ -11,6 +11,10 @@ rpc: uri: https://rpc.tzkt.io/parisnet timeout: 20 requests_per_second: 20 + quebecnet: + uri: https://rpc.tzkt.io/quebecnet + timeout: 20 + requests_per_second: 20 log_level: ${LOG_LEVEL:-info} @@ -21,6 +25,8 @@ services: mempool: https://mempool.test.dipdup.net/v1/graphql parisnet: mempool: https://mempool.test.dipdup.net/v1/graphql + quebecnet: + mempool: https://mempool.test.dipdup.net/v1/graphql storage: pg: @@ -58,10 +64,12 @@ api: mainnet: https://rpc.tzkt.io/mainnet ghostnet: https://rpc.tzkt.io/ghostnet parisnet: https://rpc.tzkt.io/parisnet + quebecnet: https://rpc.tzkt.io/quebecnet networks: - mainnet - ghostnet - parisnet + - quebecnet indexer: project_name: indexer @@ -73,9 +81,12 @@ indexer: receiver_threads: 5 parisnet: receiver_threads: 10 + quebecnet: + receiver_threads: 10 scripts: networks: - mainnet - ghostnet - parisnet + - quebecnet diff --git a/internal/bcd/protocols.go b/internal/bcd/protocols.go index b6fb304ca..cb91e156d 100644 --- a/internal/bcd/protocols.go +++ b/internal/bcd/protocols.go @@ -46,6 +46,7 @@ var symLinks = map[string]string{ "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz": SymLinkJakarta, // Paris B "PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ": SymLinkJakarta, // Paris B 2, "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi": SymLinkJakarta, // Paris C + "PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg": SymLinkJakarta, // Quebec } // GetProtoSymLink - @@ -84,4 +85,5 @@ var ChainID = map[string]string{ "NetXyuzvDo2Ugzb": "nairobinet", "NetXxWsskGahzQB": "oxfordnet", "NetXR64bNAYkP4S": "parisnet", + "NetXuTeGinLEqxp": "quebecnet", } diff --git a/internal/models/types/network.go b/internal/models/types/network.go index ee4330953..5ae4ccae9 100644 --- a/internal/models/types/network.go +++ b/internal/models/types/network.go @@ -34,6 +34,7 @@ const ( Oxfordnet Weeklynet Parisnet + Quebecnet ) var networkNames = map[Network]string{ @@ -59,6 +60,7 @@ var networkNames = map[Network]string{ Nairobinet: "nairobinet", Oxfordnet: "oxfordnet", Parisnet: "parisnet", + Quebecnet: "quebecnet", } var namesToNetwork = map[string]Network{ @@ -84,6 +86,7 @@ var namesToNetwork = map[string]Network{ "oxfordnet": Oxfordnet, "weeklynet": Weeklynet, "parisnet": Parisnet, + "quebecnet": Quebecnet, } // String - convert enum to string for printing diff --git a/internal/parsers/operations/migration.go b/internal/parsers/operations/migration.go index 7f79d7bb2..f95bacebe 100644 --- a/internal/parsers/operations/migration.go +++ b/internal/parsers/operations/migration.go @@ -67,7 +67,8 @@ func (m Migration) Parse(ctx context.Context, data noderpc.Operation, operation "PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5", "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz", "PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ", - "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi": + "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi", + "PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg": return m.fromLazyStorageDiff(ctx, data, operation, store) default: return errors.Errorf("unknown protocol for migration parser: %s", protocol) diff --git a/internal/parsers/protocols/protocol.go b/internal/parsers/protocols/protocol.go index b49f2d819..6c68bfaf7 100644 --- a/internal/parsers/protocols/protocol.go +++ b/internal/parsers/protocols/protocol.go @@ -86,7 +86,8 @@ func Get(ctx *config.Context, protocol string) (*Specific, error) { "PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5", "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz", "PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ", - "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi": + "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi", + "PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg": return &Specific{ StorageParser: storage.NewLazyBabylon(ctx.BigMapDiffs, ctx.Operations, ctx.Accounts), ContractParser: contract.NewJakarta(ctx), @@ -141,7 +142,8 @@ func NeedImplicitParsing(protocol string) bool { "PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5", "PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz", "PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ", - "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi": + "PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi", + "PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg": return true } return false