diff --git a/internal/protocols/algorand/algorand.go b/internal/protocols/algorand/algorand.go new file mode 100644 index 000000000..2124e681b --- /dev/null +++ b/internal/protocols/algorand/algorand.go @@ -0,0 +1,17 @@ +package algorand + +const ( + // Mainnet network name. + Mainnet = "mainnet" + + // Betanet network name. + Betanet = "betanet" + + // Testnet network name. + Testnet = "testnet" +) + +// Networks supported by substrate package. +func Networks() []string { + return []string{Mainnet, Betanet, Testnet} +} diff --git a/internal/protocols/algorand/algorand_test.go b/internal/protocols/algorand/algorand_test.go new file mode 100644 index 000000000..2bc35d01a --- /dev/null +++ b/internal/protocols/algorand/algorand_test.go @@ -0,0 +1,26 @@ +package algorand + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNetworks(t *testing.T) { + tests := []struct { + name string + want []string + }{ + { + "success", + []string{"mainnet", "betanet", "testnet"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := Networks(); !assert.Equal(t, tt.want, got) { + t.Errorf("Networks() = %v, want %v", got, tt.want) + } + }) + } +}