Skip to content

Commit

Permalink
feat: add network ‘testnet-migration’
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxl committed Jun 18, 2024
1 parent 123c01a commit 73a2def
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Sources/Models/FlowChainId.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public extension Flow {
/// Default gRPC node is `access.devnet.nodes.onflow.org:9000`
/// HTTP node `https://rest-mainnet.onflow.org/`
case testnet


case testnetMigration
/// Canarynet enviroment
/// Default node is `access.canary.nodes.onflow.org:9000`
case canarynet
Expand All @@ -55,7 +56,7 @@ public extension Flow {
case custom(name: String, transport: Flow.Transport)

/// List of other type chain id exclude custom type
public static var allCases: [Flow.ChainID] = [.mainnet, .testnet, .canarynet, .crescendo,.previewnet, .emulator]
public static var allCases: [Flow.ChainID] = [.mainnet, .testnet, .testnetMigration, .canarynet, .crescendo,.previewnet, .emulator]

/// Name of the chain id
public var name: String {
Expand All @@ -64,6 +65,8 @@ public extension Flow {
return "mainnet"
case .testnet:
return "testnet"
case .testnetMigration:
return "testnet-migration"
case .crescendo:
return "crescendo"
case .previewnet:
Expand Down Expand Up @@ -100,6 +103,8 @@ public extension Flow {
return .HTTP(URL(string: "https://rest-mainnet.onflow.org/")!)
case .testnet:
return .HTTP(URL(string: "https://rest-testnet.onflow.org/")!)
case .testnetMigration:
return .HTTP(URL(string: "https://rest-migrationtestnet.onflow.org/v1/")!)
case .emulator:
return .HTTP(URL(string: "http://127.0.0.1:8888/")!)
case .crescendo:
Expand All @@ -120,6 +125,8 @@ public extension Flow {
return .gRPC(.init(node: "access.mainnet.nodes.onflow.org", port: 9000))
case .testnet:
return .gRPC(.init(node: "access.devnet.nodes.onflow.org", port: 9000))
case .testnetMigration:
return .gRPC(.init(node: "access.devnet.nodes.onflow.org", port: 9000))
case .canarynet:
return .gRPC(.init(node: "access.canary.nodes.onflow.org", port: 9000))
case .crescendo:
Expand Down

0 comments on commit 73a2def

Please sign in to comment.