Skip to content

Commit

Permalink
Remove previewnet (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink authored Sep 5, 2024
1 parent f6ec637 commit 5ab7a1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
3 changes: 1 addition & 2 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,11 @@ func Test_DefaultConfig(t *testing.T) {
assert.Len(t, cfg.Emulators, 1)
assert.Equal(t, "default", cfg.Emulators[0].Name)
assert.Equal(t, "emulator-account", cfg.Emulators[0].ServiceAccount)
assert.Len(t, cfg.Networks, 5)
assert.Len(t, cfg.Networks, 4)
assert.Equal(t, "emulator", cfg.Networks[0].Name)
assert.Equal(t, "testing", cfg.Networks[1].Name)
assert.Equal(t, "testnet", cfg.Networks[2].Name)
assert.Equal(t, "mainnet", cfg.Networks[3].Name)
assert.Equal(t, "previewnet", cfg.Networks[4].Name)
}

func Test_DefaultPath(t *testing.T) {
Expand Down
15 changes: 6 additions & 9 deletions config/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,23 @@ func (c *Contracts) Remove(name string) error {
const dependencyManagerDirectory = "imports"

const (
networkEmulator = "emulator"
networkTestnet = "testnet"
networkPreviewnet = "previewnet"
networkMainnet = "mainnet"
networkEmulator = "emulator"
networkTestnet = "testnet"
networkMainnet = "mainnet"
)

func supportedNetworks() []string {
return []string{
networkEmulator,
networkTestnet,
networkPreviewnet,
networkMainnet,
}
}

var networkToChainID = map[string]flowGo.ChainID{
networkEmulator: flowGo.Emulator,
networkTestnet: flowGo.Testnet,
networkPreviewnet: flowGo.Previewnet,
networkMainnet: flowGo.Mainnet,
networkEmulator: flowGo.Emulator,
networkTestnet: flowGo.Testnet,
networkMainnet: flowGo.Mainnet,
}

func isCoreContract(networkName, contractName, contractAddress string) bool {
Expand Down
5 changes: 0 additions & 5 deletions config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,11 @@ var (
Name: "mainnet",
Host: "access.mainnet.nodes.onflow.org:9000",
}
PreviewnetNetwork = Network{
Name: "previewnet",
Host: "access.previewnet.nodes.onflow.org:9000",
}
DefaultNetworks = Networks{
EmulatorNetwork,
TestingNetwork,
TestnetNetwork,
MainnetNetwork,
PreviewnetNetwork,
}
)

Expand Down

0 comments on commit 5ab7a1e

Please sign in to comment.