diff --git a/database/100-up-sql-shared/20240827150438-network_add_superposition_networks.sql b/database/100-up-sql-shared/20240827150438-network_add_superposition_networks.sql new file mode 100644 index 000000000..c359729df --- /dev/null +++ b/database/100-up-sql-shared/20240827150438-network_add_superposition_networks.sql @@ -0,0 +1,8 @@ + +-- migrate:up + +ALTER TYPE network_blockchain ADD VALUE 'superposition_testnet'; + +ALTER TYPE network_blockchain ADD VALUE 'superposition_mainnet'; + +-- migrate:down diff --git a/lib/types/network/blockchain.go b/lib/types/network/blockchain.go index 0d3c76517..74bb2cd87 100644 --- a/lib/types/network/blockchain.go +++ b/lib/types/network/blockchain.go @@ -12,12 +12,12 @@ import "fmt" type BlockchainNetwork string const ( - NetworkEthereum BlockchainNetwork = `ethereum` - NetworkArbitrum BlockchainNetwork = `arbitrum` - NetworkSolana BlockchainNetwork = `solana` - NetworkPolygonZk BlockchainNetwork = `polygon_zk` - NetworkStylusTestnet BlockchainNetwork = `stylus_testnet` - NetworkSui BlockchainNetwork = `sui` + NetworkEthereum BlockchainNetwork = `ethereum` + NetworkArbitrum BlockchainNetwork = `arbitrum` + NetworkSolana BlockchainNetwork = `solana` + NetworkSui BlockchainNetwork = `sui` + NetworkSuperpositionTestnet BlockchainNetwork = `superposition_testnet` + NetworkSuperpositionMainnet BlockchainNetwork = `superposition_mainnet` ) // ParseEthereumNetwork takes a network name as a string @@ -28,12 +28,12 @@ func ParseEthereumNetwork(network_ string) (network BlockchainNetwork, err error network = NetworkEthereum case string(NetworkArbitrum): network = NetworkArbitrum - case string(NetworkPolygonZk): - network = NetworkPolygonZk - case string(NetworkStylusTestnet): - network = NetworkStylusTestnet case string(NetworkSui): network = NetworkSui + case string(NetworkSuperpositionTestnet): + network = NetworkSuperpositionTestnet + case string(NetworkSuperpositionMainnet): + network = NetworkSuperpositionMainnet default: err = fmt.Errorf( "Unknown network name '%s'",