Skip to content

Commit

Permalink
feat: add THORChain support (shapeshift#1010)
Browse files Browse the repository at this point in the history
* add thorchain to caip package

* add thorchain to types package

* add missing constants

* add thorchain to asset-service packages

* add thorchain to unchained-client start

* correct dev endpoints

* cosmos parser

* clean up existing cosmossdk abstraction and update tests

* add thorchain parser support

* fix input spec for dev endpoint

* update prod input spec endpoints

* export thorchain and cleanup

* start thorchain support in chain adapters

* expose cosmossdk types

* update package versions and cleanup

* bump hdwallet and fix type changes

* fix tests
  • Loading branch information
kaladinlight authored Sep 12, 2022
1 parent a989a5f commit d7c3b72
Show file tree
Hide file tree
Showing 92 changed files with 2,988 additions and 2,024 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@commitlint/config-conventional": "^13.1.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@shapeshiftoss/hdwallet-core": "^1.27.0",
"@shapeshiftoss/hdwallet-native": "^1.27.0",
"@shapeshiftoss/hdwallet-core": "^1.31.0",
"@shapeshiftoss/hdwallet-native": "^1.31.0",
"@types/jest": "^27.0.1",
"@types/lodash": "^4.14.182",
"@types/node": "^14.17.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/asset-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"@ethersproject/providers": "^5.5.3",
"@shapeshiftoss/caip": "^8.0.0",
"@shapeshiftoss/types": "^8.1.0",
"@shapeshiftoss/investor-idle": "^1.0.0",
"@shapeshiftoss/investor-idle": "^2.0.1",
"@types/node-polyglot": "^2.4.2",
"@yfi/sdk": "^1.0.30",
"colorthief": "^2.3.2",
Expand Down
13 changes: 13 additions & 0 deletions packages/asset-service/src/generateAssetData/baseAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,16 @@ export const avax: Asset = {
explorerAddressLink: 'https://snowtrace.io/address/',
explorerTxLink: 'https://snowtrace.io/tx/',
}

export const thorchain: Asset = {
assetId: caip.thorchainAssetId,
chainId: caip.thorchainChainId,
name: 'THORChain',
symbol: 'RUNE',
precision: 8,
color: '#33FF99',
icon: 'https://assets.coincap.io/assets/icons/[email protected]',
explorer: 'https://viewblock.io/thorchain',
explorerAddressLink: 'https://viewblock.io/thorchain/address/',
explorerTxLink: 'https://viewblock.io/thorchain/tx/',
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import orderBy from 'lodash/orderBy'

import { Asset, AssetsById } from '../service/AssetService'
import * as avalanche from './avalanche'
import { atom, bitcoin, bitcoincash, dogecoin, litecoin } from './baseAssets'
import { atom, bitcoin, bitcoincash, dogecoin, litecoin, thorchain } from './baseAssets'
import * as ethereum from './ethereum'
import * as osmosis from './osmosis'
import assetOverrides from './overrides.json'
Expand All @@ -31,6 +31,7 @@ const generateAssetData = async () => {
dogecoin,
litecoin,
atom,
thorchain,
...ethAssets,
...osmosisAssets,
...avalancheAssets,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import orderBy from 'lodash/orderBy'

import { Asset } from '../service/AssetService'
import * as avalanche from './avalanche'
import { atom, bitcoin, bitcoincash, dogecoin, litecoin } from './baseAssets'
import { atom, bitcoin, bitcoincash, dogecoin, litecoin, thorchain } from './baseAssets'
import * as ethereum from './ethereum'
import * as osmosis from './osmosis'
import { setColors } from './setColors'
Expand All @@ -26,6 +26,7 @@ const generateColorMap = async () => {
dogecoin,
litecoin,
atom,
thorchain,
...ethAssets,
...osmosisAssets,
...avalancheAssets,
Expand Down
Loading

0 comments on commit d7c3b72

Please sign in to comment.