Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions modules/statics/src/allCoinsAndTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,26 @@ export const allCoinsAndTokens = [
BaseUnit.KAVA,
[...COSMOS_SIDECHAIN_FEATURES, CoinFeature.SHARED_COSMOS_SDK, CoinFeature.SHARED_COSMOS_WP]
),
account(
'f5a8c3d1-7b2e-4f9a-8c6d-1e3b5a7c9d2f',
'dydxcosmos',
'dYdX Cosmos',
Networks.main.dydx,
18,
UnderlyingAsset.DYDX,
BaseUnit.DYDX,
[...COSMOS_SIDECHAIN_FEATURES, CoinFeature.SHARED_COSMOS_SDK, CoinFeature.SHARED_COSMOS_WP]
),
account(
'a2b4c6d8-e1f3-5a7b-9c2d-4e6f8a1b3c5d',
'tdydxcosmos',
'Testnet dYdX Cosmos',
Networks.test.dydx,
18,
UnderlyingAsset.DYDX,
BaseUnit.DYDX,
[...COSMOS_SIDECHAIN_FEATURES, CoinFeature.SHARED_COSMOS_SDK, CoinFeature.SHARED_COSMOS_WP]
),
account(
'7df858d5-9da3-4071-ab06-399962ea87b7',
'coreum',
Expand Down
2 changes: 2 additions & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export enum CoinFamily {
DOGE = 'doge',
DOGEOS = 'dogeos',
DOT = 'dot',
DYDX = 'dydx',
ETH = 'eth',
ETH2 = 'eth2',
ETHW = 'ethw',
Expand Down Expand Up @@ -3600,6 +3601,7 @@ export enum BaseUnit {
IOTA = 'iota',
ZETA = 'azeta',
KAVA = 'ukava',
DYDX = 'adydx',
COREUM = 'ucore',
TCOREUM = 'utestcore', // Coreum testnet uses different name for native coin
ISLM = 'aISLM',
Expand Down
26 changes: 26 additions & 0 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,30 @@ class KavaTestnet extends Testnet implements CosmosNetwork {
validDenoms = ['kava', 'ukava'];
}

class Dydx extends Mainnet implements CosmosNetwork {
name = 'Dydx';
family = CoinFamily.DYDX;
explorerUrl = 'https://www.mintscan.io/dydx/tx/';
addressPrefix = 'dydx';
validatorPrefix = 'dydxvaloper';
denom = 'adydx';
gasAmount = '5000000000000000';
gasLimit = 200000;
validDenoms = ['adydx'];
}

class DydxTestnet extends Testnet implements CosmosNetwork {
name = 'DydxTestnet';
family = CoinFamily.DYDX;
explorerUrl = 'https://www.mintscan.io/dydx-testnet/tx/';
addressPrefix = 'dydx';
validatorPrefix = 'dydxvaloper';
denom = 'adv4tnt';
gasAmount = '5000000000000000';
gasLimit = 200000;
validDenoms = ['adv4tnt'];
}

class Ton extends Mainnet implements AccountNetwork {
name = 'Ton';
family = CoinFamily.TON;
Expand Down Expand Up @@ -2358,6 +2382,7 @@ export const Networks = {
dogecoin: Object.freeze(new Dogecoin()),
dogeos: Object.freeze(new Dogeos()),
dot: Object.freeze(new PolkadotAssetHub()),
dydx: Object.freeze(new Dydx()),
eCash: Object.freeze(new ECash()),
eos: Object.freeze(new Eos()),
ethereum: Object.freeze(new Ethereum()),
Expand Down Expand Up @@ -2469,6 +2494,7 @@ export const Networks = {
dogecoin: Object.freeze(new DogecoinTestnet()),
dogeos: Object.freeze(new DogeosTestnet()),
dot: Object.freeze(new WestendAssetHub()),
dydx: Object.freeze(new DydxTestnet()),
eCash: Object.freeze(new ECashTestnet()),
eos: Object.freeze(new EosTestnet()),
fiat: Object.freeze(new FiatTestnet()),
Expand Down
2 changes: 1 addition & 1 deletion modules/statics/test/unit/coins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ coins.forEach((coin, coinName) => {
});

if (!coin.isToken && coin.family !== CoinFamily.FIAT) {
if (coin.family !== CoinFamily.THOR) {
if (coin.family !== CoinFamily.THOR && coin.family !== CoinFamily.DYDX) {
it(`has expected network type`, function () {
coin.network.type.should.eql(coin.name === coin.family ? NetworkType.MAINNET : NetworkType.TESTNET);
});
Expand Down
2 changes: 2 additions & 0 deletions modules/statics/test/unit/fixtures/expectedColdFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const expectedColdFeatures = {
'cronos',
'dogeos',
'dot',
'dydxcosmos',
'fetchai',
'flow',
'fluenteth',
Expand Down Expand Up @@ -152,6 +153,7 @@ export const expectedColdFeatures = {
'tcronos',
'tdogeos',
'tdot',
'tdydxcosmos',
'tfetchai',
'tflow',
'tfluenteth',
Expand Down