Skip to content

Commit

Permalink
Remove pairs from EVM chain tokelists.json (trustwallet#17637)
Browse files Browse the repository at this point in the history
* Remove pairs from EVM chain tokelists.json

* Add tokenlist-extended.json

* Add command for adding token to tokenlist-extended.json

* Remove empty pairs

* Update config namings

* Add command for adding token to tokenlist.json

* Update config and file namings

* Update tokenlist-extended.json

* Add token info getting

* Fix

* Fix

* Add duplicates check

* Add duplicate check in token list

* Update commands.go

Co-authored-by: Viktor Radchenko <[email protected]>
  • Loading branch information
unanoc and vikmeup authored Jan 27, 2022
1 parent 878bd0e commit ed272b2
Show file tree
Hide file tree
Showing 17 changed files with 718 additions and 1,635 deletions.
14 changes: 9 additions & 5 deletions .github/assets.config.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
app:
log_level: debug
log_level: "debug"

client_urls:
binance:
dex: https://dex.binance.org
explorer: https://explorer.binance.org
assets_manager_api: "https://assets-manager-api.herokuapp.com"
dex: "https://dex.binance.org"
explorer: "https://explorer.binance.org"
assets_manager_api: "https://api.assets.trustwallet.com"

urls:
tw_assets_app: https://assets.trustwalletapp.com
assets_app: "https://assets.trustwalletapp.com"
logo: "https://trustwallet.com/assets/images/favicon.png"

time_format: "2006-01-02T15:04:05.000000"

validators_settings:
root_folder:
Expand Down Expand Up @@ -45,6 +48,7 @@ validators_settings:
allowed_files:
- "assets"
- "tokenlist.json"
- "tokenlist-extended.json"
- "validators"
- "info"

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ update-manual:

# Helper commands.
add-token:
go run cmd/main.go add-token $(token)
go run cmd/main.go add-token $(asset_id)

add-tokenlist:
go run cmd/main.go add-tokenlist $(asset_id)

add-tokenlist-extended:
go run cmd/main.go add-tokenlist-extended $(asset_id)
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ There are several scripts available for maintainers:
- `make check` -- Execute validation checks; also used in continuous integration.
- `make fix` -- Perform automatic fixes where possible
- `make update-auto` -- Run automatic updates from external sources, executed regularly (GitHub action)
- `make add-token token=c60_t0x4Fabb145d64652a948d72533023f6E7A623C7C53` -- Create `info.json` file as asset template.
- `make add-token asset_id=c60_t0x4Fabb145d64652a948d72533023f6E7A623C7C53` -- Create `info.json` file as asset template.
- `make add-tokenlist asset_id=c60_t0x4Fabb145d64652a948d72533023f6E7A623C7C53` -- Adds a token to tokenlist.json.
- `make add-tokenlist-extended asset_id=c60_t0x4Fabb145d64652a948d72533023f6E7A623C7C53` -- Adds a token to tokenlist-extended.json.

## On Checks

Expand Down
30 changes: 30 additions & 0 deletions blockchains/ethereum/tokenlist-extended.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "Trust Wallet: Ethereum Extended List",
"logoURI": "https://trustwallet.com/assets/images/favicon.png",
"timestamp": "2022-01-27T14:33:26.183301",
"tokens": [
{
"asset": "c60_t0x8E870D67F660D95d5be530380D0eC0bd388289E1",
"type": "ERC20",
"address": "0x8E870D67F660D95d5be530380D0eC0bd388289E1",
"name": "Pax Dollar",
"symbol": "USDP",
"decimals": 18,
"logoURI": "https://assets.trustwalletapp.com/blockchains/ethereum/assets/0x8E870D67F660D95d5be530380D0eC0bd388289E1/logo.png"
},
{
"asset": "c60_t0xa47c8bf37f92aBed4A126BDA807A7b7498661acD",
"type": "ERC20",
"address": "0xa47c8bf37f92aBed4A126BDA807A7b7498661acD",
"name": "UST Token",
"symbol": "UST",
"decimals": 18,
"logoURI": "https://assets.trustwalletapp.com/blockchains/ethereum/assets/0xa47c8bf37f92aBed4A126BDA807A7b7498661acD/logo.png"
}
],
"version": {
"major": 6,
"minor": 0,
"patch": 0
}
}
Loading

0 comments on commit ed272b2

Please sign in to comment.