Skip to content

Commit

Permalink
Added Parisnet (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-karuna authored May 9, 2024
1 parent cf74b4d commit 0c7631f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
13 changes: 12 additions & 1 deletion configs/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ rpc:
uri: https://rpc.tzkt.io/oxfordnet
timeout: 20
requests_per_second: 20
parisnet:
uri: https://rpc.tzkt.io/parisnet
timeout: 20
requests_per_second: 20

log_level: ${LOG_LEVEL:-info}

Expand All @@ -21,6 +25,8 @@ services:
mempool: https://mempool.test.dipdup.net/v1/graphql
oxfordnet:
mempool: https://mempool.test.dipdup.net/v1/graphql
parisnet:
mempool: https://mempool.test.dipdup.net/v1/graphql

storage:
pg:
Expand Down Expand Up @@ -57,11 +63,13 @@ api:
rpc:
mainnet: https://rpc.tzkt.io/mainnet
ghostnet: https://rpc.tzkt.io/ghostnet
oxfordnet: https://rpc.tzkt.io/oxfordnet
oxfordnet: https://rpc.tzkt.io/oxfordnet
parisnet: https://rpc.tzkt.io/parisnet
networks:
- mainnet
- ghostnet
- oxfordnet
- parisnet

indexer:
project_name: indexer
Expand All @@ -73,9 +81,12 @@ indexer:
receiver_threads: 5
oxfordnet:
receiver_threads: 10
parisnet:
receiver_threads: 10

scripts:
networks:
- mainnet
- ghostnet
- oxfordnet
- parisnet
11 changes: 11 additions & 0 deletions configs/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ rpc:
uri: https://rpc.tzkt.io/oxfordnet
timeout: 20
requests_per_second: 20
parisnet:
uri: https://rpc.tzkt.io/parisnet
timeout: 20
requests_per_second: 20

log_level: ${LOG_LEVEL:-info}

Expand All @@ -21,6 +25,8 @@ services:
mempool: https://mempool.test.dipdup.net/v1/graphql
oxfordnet:
mempool: https://mempool.test.dipdup.net/v1/graphql
parisnet:
mempool: https://mempool.test.dipdup.net/v1/graphql

storage:
pg:
Expand Down Expand Up @@ -61,10 +67,12 @@ api:
mainnet: https://rpc.tzkt.io/mainnet
ghostnet: https://rpc.tzkt.io/ghostnet
oxfordnet: https://rpc.tzkt.io/oxfordnet
parisnet: https://rpc.tzkt.io/parisnet
networks:
- mainnet
- ghostnet
- oxfordnet
# - parisnet

indexer:
project_name: indexer
Expand All @@ -76,6 +84,8 @@ indexer:
receiver_threads: ${TESTNET_THREADS:-10}
oxfordnet:
receiver_threads: ${TESTNET_THREADS:-10}
parisnet:
receiver_threads: ${TESTNET_THREADS:-10}

scripts:
aws:
Expand All @@ -87,3 +97,4 @@ scripts:
- mainnet
- ghostnet
- oxfordnet
- parisnet
3 changes: 3 additions & 0 deletions internal/bcd/protocols.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ var symLinks = map[string]string{
"PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf": SymLinkJakarta, // Nairobinet
"ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8": SymLinkJakarta, // Oxford
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH": SymLinkJakarta, // Oxford 2
"PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5": SymLinkJakarta, // Paris A
"PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz": SymLinkJakarta, // Paris B
}

// GetProtoSymLink -
Expand Down Expand Up @@ -79,4 +81,5 @@ var ChainID = map[string]string{
"NetXQw6nWSnrJ5t": "mumbainet",
"NetXyuzvDo2Ugzb": "nairobinet",
"NetXxWsskGahzQB": "oxfordnet",
"NetXo8SqH1c38SS": "parisnet",
}
3 changes: 3 additions & 0 deletions internal/models/types/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const (
Nairobinet
Oxfordnet
Weeklynet
Parisnet
)

var networkNames = map[Network]string{
Expand All @@ -57,6 +58,7 @@ var networkNames = map[Network]string{
Rollupnet: "rollupnet",
Nairobinet: "nairobinet",
Oxfordnet: "oxfordnet",
Parisnet: "parisnet",
}

var namesToNetwork = map[string]Network{
Expand All @@ -81,6 +83,7 @@ var namesToNetwork = map[string]Network{
"nairobinet": Nairobinet,
"oxfordnet": Oxfordnet,
"weeklynet": Weeklynet,
"parisnet": Parisnet,
}

// String - convert enum to string for printing
Expand Down
4 changes: 3 additions & 1 deletion internal/parsers/operations/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ func (m Migration) Parse(ctx context.Context, data noderpc.Operation, operation
"PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1",
"PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf",
"ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8",
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH":
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH",
"PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5",
"PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz":
return m.fromLazyStorageDiff(ctx, data, operation, store)
default:
return errors.Errorf("unknown protocol for migration parser: %s", protocol)
Expand Down
8 changes: 6 additions & 2 deletions internal/parsers/protocols/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ func Get(ctx *config.Context, protocol string) (*Specific, error) {
"PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1",
"PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf",
"ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8",
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH":
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH",
"PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5",
"PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz":
return &Specific{
StorageParser: storage.NewLazyBabylon(ctx.BigMapDiffs, ctx.Operations, ctx.Accounts),
ContractParser: contract.NewJakarta(ctx),
Expand Down Expand Up @@ -133,7 +135,9 @@ func NeedImplicitParsing(protocol string) bool {
"PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1",
"PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf",
"ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8",
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH":
"ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH",
"PtParisA6ruu136piHaBC7cQLDP87JEqtczJWP2pLa5QCELGBH5",
"PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz":
return true
}
return false
Expand Down

0 comments on commit 0c7631f

Please sign in to comment.