Skip to content

Commit

Permalink
[Coins] Add celo and ronin (#8)
Browse files Browse the repository at this point in the history
* [Coins] Add celo and ronin

* Add Ronin token type
  • Loading branch information
vikmeup authored Oct 22, 2021
1 parent 79acb5a commit 4ed32ce
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
30 changes: 29 additions & 1 deletion coin/coins.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions coin/coins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions types/token_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const (
HRC20 TokenType = "HRC20"
ARBITRUM TokenType = "ARBITRUM"
TERRA TokenType = "TERRA"
RONIN TokenType = "RONIN"
)

func GetEthereumTokenTypeByIndex(coinIndex uint) TokenType {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 4ed32ce

Please sign in to comment.