diff --git a/coin/coins.go b/coin/coins.go index 5298008..d50b010 100644 --- a/coin/coins.go +++ b/coin/coins.go @@ -1,6 +1,6 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots at -// 2023-11-07 09:56:20.751618 +0900 JST m=+0.001836918 +// 2023-12-27 13:35:37.21799 +0400 +04 m=+0.003749418 // using data from coins.yml package coin @@ -156,6 +156,7 @@ const ( LINEA = 59144 GBNB = 5600 MANTLE = 5000 + MANTA = 169 ) var Coins = map[uint]Coin{ @@ -1369,6 +1370,17 @@ var Coins = map[uint]Coin{ Blockchain: "Ethereum", IsTokenSupported: false, }, + MANTA: { + ID: 169, + Handle: "manta", + Symbol: "ETH", + Name: "Manta Pacific", + Decimals: 18, + BlockTime: 0, + MinConfirmations: 0, + Blockchain: "Ethereum", + IsTokenSupported: true, + }, } var Chains = map[string]Coin{ @@ -2582,6 +2594,17 @@ var Chains = map[string]Coin{ Blockchain: "Ethereum", IsTokenSupported: false, }, + Manta().Handle: { + ID: 169, + Handle: "manta", + Symbol: "ETH", + Name: "Manta Pacific", + Decimals: 18, + BlockTime: 0, + MinConfirmations: 0, + Blockchain: "Ethereum", + IsTokenSupported: true, + }, } func Ethereum() Coin { @@ -3023,3 +3046,7 @@ func Gbnb() Coin { func Mantle() Coin { return Coins[MANTLE] } + +func Manta() Coin { + return Coins[MANTA] +} diff --git a/coin/coins.yml b/coin/coins.yml index 689b406..87a631f 100644 --- a/coin/coins.yml +++ b/coin/coins.yml @@ -989,3 +989,11 @@ decimals: 18 blockchain: Ethereum isTokenSupported: false + +- id: 169 + symbol: ETH + handle: manta + name: Manta Pacific + decimals: 18 + blockchain: Ethereum + isTokenSupported: true diff --git a/coin/models_test.go b/coin/models_test.go index b5a5677..6931498 100644 --- a/coin/models_test.go +++ b/coin/models_test.go @@ -420,6 +420,7 @@ var evmCoinsTestSet = map[uint]struct{}{ OPBNB: {}, LINEA: {}, MANTLE: {}, + MANTA: {}, } // TestEvmCoinsList This test will automatically fail when new EVM chain is added to coins.yml diff --git a/types/chain.go b/types/chain.go index 6c79116..ab0fa8c 100644 --- a/types/chain.go +++ b/types/chain.go @@ -159,6 +159,8 @@ func GetChainFromAssetType(assetType string) (coin.Coin, error) { return coin.Stargaze(), nil case MANTLE: return coin.Mantle(), nil + case MANTA: + return coin.Manta(), nil } return coin.Coin{}, errors.New("unknown asset type: " + assetType) diff --git a/types/token.go b/types/token.go index aed1a08..bf836b6 100644 --- a/types/token.go +++ b/types/token.go @@ -114,6 +114,7 @@ const ( OPBNB TokenType = "OPBNB" LINEA TokenType = "LINEA" MANTLE TokenType = "MANTLE" + MANTA TokenType = "MANTA" ) const ( @@ -131,6 +132,7 @@ const ( TokenVersionV12 TokenVersion = 12 TokenVersionV13 TokenVersion = 13 TokenVersionV14 TokenVersion = 14 + TokenVersionV15 TokenVersion = 15 TokenVersionUndefined TokenVersion = -1 ) @@ -217,6 +219,7 @@ func GetTokenTypes() []TokenType { LINEA, ACALAEVM, MANTLE, + MANTA, } } @@ -322,6 +325,8 @@ func GetTokenType(c uint, tokenID string) (string, bool) { return string(NEON), true case coin.MANTLE: return string(MANTLE), true + case coin.MANTA: + return string(MANTA), true default: return "", false } @@ -374,6 +379,8 @@ func GetTokenVersion(tokenType string) (TokenVersion, error) { return TokenVersionV13, nil case KAVAEVM, BOBA, METIS, NEON, LINEA, ACA, ACALAEVM, CONFLUX, IOTEXEVM, KLAYTN, MOONRIVER, MOONBEAM, MANTLE: return TokenVersionV14, nil + case MANTA: + return TokenVersionV15, nil case BRC20, ERC721, ERC1155, EOS, NEP5, VET, ONTOLOGY, THETA, TOMO, POA, OASIS, ALGORAND, METER, EVMOS_ERC20, KIP20, STRIDE, NEUTRON, FA2, CARDANO, NATIVEINJECTIVE, NATIVEEVMOS, CRYPTOORG, COSMOS, OSMOSIS, STARGAZE: return TokenVersionUndefined, nil @@ -483,6 +490,8 @@ func GetEthereumTokenTypeByIndex(coinIndex uint) (TokenType, error) { tokenType = LINEA case coin.MANTLE: tokenType = MANTLE + case coin.MANTA: + tokenType = MANTA } if tokenType == "" {