Skip to content

Commit

Permalink
Support token types: moonbeam, klaytn, metis, moonriver, boba (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikoskarakostas authored Dec 15, 2022
1 parent 352ae8c commit d2385e9
Show file tree
Hide file tree
Showing 8 changed files with 400 additions and 83 deletions.
290 changes: 208 additions & 82 deletions coin/coins.go

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

35 changes: 35 additions & 0 deletions coin/coins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,38 @@
name: Aptos
decimals: 8
blockchain: Aptos

- id: 10001284
symbol: GLMR
handle: moonbeam
name: Moonbeam
decimals: 18
blockchain: Ethereum

- id: 10008217
symbol: KLAY
handle: klaytn
name: Klaytn
decimals: 18
blockchain: Ethereum

- id: 10001088
symbol: METIS
handle: metis
name: Metis
decimals: 18
blockchain: Ethereum

- id: 10001285
symbol: MOVR
handle: moonriver
name: Moonriver
decimals: 18
blockchain: Ethereum

- id: 10000288
symbol: BOBAETH
handle: boba
name: Boba
decimals: 18
blockchain: Ethereum
10 changes: 10 additions & 0 deletions coin/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ func GetCoinExploreURL(c Coin, tokenID, tokenType string) (string, error) {
return fmt.Sprintf("https://www.oklink.com/en/okc/address/%s", tokenID), nil
case APTOS:
return "https://explorer.aptoslabs.com/", nil
case MOONBEAM:
return fmt.Sprintf("https://moonscan.io/token/%s", tokenID), nil
case KLAYTN:
return fmt.Sprintf("https://scope.klaytn.com/token/%s", tokenID), nil
case METIS:
return fmt.Sprintf("https://andromeda-explorer.metis.io/token/%s", tokenID), nil
case MOONRIVER:
return fmt.Sprintf("https://moonriver.moonscan.io/token/%s", tokenID), nil
case BOBA:
return fmt.Sprintf("https://bobascan.com/token/%s", tokenID), nil
}

return "", errors.New("no explorer for coin: " + c.Handle)
Expand Down
Loading

0 comments on commit d2385e9

Please sign in to comment.