Skip to content

Commit

Permalink
[Codegen] Add all coins (except TON an BSC) from the wallet core (#65)
Browse files Browse the repository at this point in the history
* [Codegen] Add all coins (except TON an BSC) from the wallet core

* [Codegen] Fix tests
  • Loading branch information
covain authored May 11, 2021
1 parent f584795 commit b082130
Show file tree
Hide file tree
Showing 3 changed files with 270 additions and 55 deletions.
248 changes: 194 additions & 54 deletions coin/coins.go

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

72 changes: 72 additions & 0 deletions coin/coins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,75 @@
decimals: 9
blockTime: 6000
sampleAddress: 'oasis1qpxx577luv69znyr7dleue43mz6aq7fh4sm43cxu'

- id: 22
symbol: MONA
handle: monacoin
name: Monacoin
decimals: 8
blockTime: 90000
sampleAddress: 'PSEbmFMLvjUg6vKoZBj3zPk1KVbVca5Uun'

- id: 156
symbol: BTG
handle: bitcoingold
name: Bitcoin Gold
decimals: 8
blockTime: 600000
sampleAddress: 'GR9ixMSWCPSo7yEPvNuobEWAdMKzY35LzQ'

- id: 194
symbol: EOS
handle: eos
name: EOS
decimals: 4
blockTime: 500

- id: 330
symbol: LUNA
handle: terra
name: Terra
decimals: 6
sampleAddress: 'terra1fex9f78reuwhfsnc8sun6mz8rl9zwqh03fhwf3'

- id: 494
symbol: BAND
handle: band
name: BandChain
decimals: 6
blockTime: 2000
sampleAddress: 'band12nmsm9khdsv0tywge43q3zwj8kkj3hvup9rltp'

- id: 888
symbol: NEO
handle: neo
name: NEO
decimals: 8
sampleAddress: 'AcxuqWhTureEQGeJgbmtSWNAtssjMLU7pb'

- id: 1815
symbol: ADA
handle: cardano
name: Cardano
decimals: 6
sampleAddress: 'addr1s3xuxwfetyfe7q9u3rfn6je9stlvcgmj8rezd87qjjegdtxm3y3f2mgtn87mrny9r77gm09h6ecslh3gmarrvrp9n4yzmdnecfxyu59jz29g8j'

- id: 8964
symbol: NULS
handle: nuls
name: NULS
decimals: 8

- id: 966
symbol: MATIC
handle: polygon
name: Polygon
decimals: 18
sampleAddress: '0x720E1fa107A1Df39Db4E78A3633121ac36Bec132'

- id: 931
symbol: RUNE
handle: thorchain
name: THORChain
decimals: 18
sampleAddress: 'bnb1czhptncu9uhhlrlrk9q0rmy459gae2ua79mapn'
5 changes: 4 additions & 1 deletion coin/gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io/ioutil"
"os"
"regexp"
"strings"
"testing"

Expand Down Expand Up @@ -53,7 +54,9 @@ func TestCoinFile(t *testing.T) {
if err != nil {
t.Error(err)
}
code := string(b)

r := regexp.MustCompile("[\\ |\\t]+")
code := string(r.ReplaceAll(b, []byte(" "))) // replace multi spaces and tabs with one space

for _, want := range coinList {
got, ok := Coins[want.ID]
Expand Down

0 comments on commit b082130

Please sign in to comment.