From 4ed32ce9e7dc80a226f222db42f09daac1d36bfa Mon Sep 17 00:00:00 2001 From: Viktor Radchenko <1641795+vikmeup@users.noreply.github.com> Date: Fri, 22 Oct 2021 11:31:04 -0700 Subject: [PATCH] [Coins] Add celo and ronin (#8) * [Coins] Add celo and ronin * Add Ronin token type --- coin/coins.go | 30 +++++++++++++++++++++++++++++- coin/coins.yml | 12 ++++++++++++ types/token_type.go | 3 +++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/coin/coins.go b/coin/coins.go index b121046..6fd582e 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 -// 2021-09-12 19:51:29.835204 -0700 PDT m=+0.001601880 +// 2021-10-22 11:26:46.375491 -0700 PDT m=+0.001942606 // using data from coins.yml package coin @@ -113,6 +113,8 @@ const ( HECO = 10000553 FANTOM = 10000250 ARBITRUM = 10042221 + CELO = 52752 + RONIN = 10002020 ) var Coins = map[uint]Coin{ @@ -737,6 +739,24 @@ var Coins = map[uint]Coin{ BlockTime: 0, MinConfirmations: 0, }, + CELO: { + ID: 52752, + Handle: "celo", + Symbol: "CELO", + Name: "Celo", + Decimals: 18, + BlockTime: 0, + MinConfirmations: 0, + }, + RONIN: { + ID: 10002020, + Handle: "ronin", + Symbol: "RON", + Name: "Ronin", + Decimals: 18, + BlockTime: 0, + MinConfirmations: 0, + }, } func Ethereum() Coin { @@ -1014,3 +1034,11 @@ func Fantom() Coin { func Arbitrum() Coin { return Coins[ARBITRUM] } + +func Celo() Coin { + return Coins[CELO] +} + +func Ronin() Coin { + return Coins[RONIN] +} diff --git a/coin/coins.yml b/coin/coins.yml index 66f98f6..b742bc6 100644 --- a/coin/coins.yml +++ b/coin/coins.yml @@ -468,4 +468,16 @@ symbol: ARETH handle: arbitrum name: Arbitrum + decimals: 18 + +- id: 52752 + symbol: CELO + handle: celo + name: Celo + decimals: 18 + +- id: 10002020 + symbol: RON + handle: ronin + name: Ronin decimals: 18 \ No newline at end of file diff --git a/types/token_type.go b/types/token_type.go index d5c2c93..14fb0ac 100644 --- a/types/token_type.go +++ b/types/token_type.go @@ -34,6 +34,7 @@ const ( HRC20 TokenType = "HRC20" ARBITRUM TokenType = "ARBITRUM" TERRA TokenType = "TERRA" + RONIN TokenType = "RONIN" ) func GetEthereumTokenTypeByIndex(coinIndex uint) TokenType { @@ -67,6 +68,8 @@ func GetEthereumTokenTypeByIndex(coinIndex uint) TokenType { tokenType = XDAI case coin.Avalanchec().ID: tokenType = AVALANCHE + case coin.Ronin().ID: + tokenType = RONIN default: tokenType = ERC20 }