Node: Add Optimism chainID (#1867)
Change-Id: Ic86d9ff02c8ab486e8fae077f21c833de156a9d8
This commit is contained in:
parent
8d23de5fe3
commit
51eac5104c
|
@ -186,6 +186,8 @@ func (c ChainID) String() string {
|
|||
return "injective"
|
||||
case ChainIDArbitrum:
|
||||
return "arbitrum"
|
||||
case ChainIDOptimism:
|
||||
return "optimism"
|
||||
case ChainIDPythNet:
|
||||
return "pythnet"
|
||||
case ChainIDWormchain:
|
||||
|
@ -245,6 +247,8 @@ func ChainIDFromString(s string) (ChainID, error) {
|
|||
return ChainIDInjective, nil
|
||||
case "arbitrum":
|
||||
return ChainIDArbitrum, nil
|
||||
case "optimism":
|
||||
return ChainIDOptimism, nil
|
||||
case "pythnet":
|
||||
return ChainIDPythNet, nil
|
||||
case "wormchain":
|
||||
|
@ -302,6 +306,8 @@ const (
|
|||
ChainIDAptos ChainID = 22
|
||||
// ChainIDArbitrum is the ChainID of Arbitrum
|
||||
ChainIDArbitrum ChainID = 23
|
||||
// ChainIDOptimism is the ChainID of Optimism
|
||||
ChainIDOptimism ChainID = 24
|
||||
// ChainIDPythNet is the ChainID of PythNet
|
||||
ChainIDPythNet ChainID = 26
|
||||
// ChainIDXpla is the ChainID of Xpla
|
||||
|
|
|
@ -70,6 +70,7 @@ func TestChainIDFromString(t *testing.T) {
|
|||
{input: "Terra2", output: ChainIDTerra2},
|
||||
{input: "Injective", output: ChainIDInjective},
|
||||
{input: "Arbitrum", output: ChainIDArbitrum},
|
||||
{input: "Optimism", output: ChainIDOptimism},
|
||||
{input: "XPLA", output: ChainIDXpla},
|
||||
{input: "Wormchain", output: ChainIDWormchain},
|
||||
{input: "wormchain", output: ChainIDWormchain},
|
||||
|
@ -166,6 +167,7 @@ func TestChainId_String(t *testing.T) {
|
|||
{input: 21, output: "sui"},
|
||||
{input: 22, output: "aptos"},
|
||||
{input: 23, output: "arbitrum"},
|
||||
{input: 24, output: "optimism"},
|
||||
{input: 28, output: "xpla"},
|
||||
{input: 3104, output: "wormchain"},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue