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
9 changes: 8 additions & 1 deletion modules/sdk-coin-dot/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ import {
UnstakeBatchCallArgs,
} from './iface';
import { KeyPair } from '.';
import { mainnetMetadataRpc, westendMetadataRpc, westendAssetHubMetadataRpc } from '../resources';
import {
mainnetMetadataRpc,
westendMetadataRpc,
polkadotAssetHubMetadataRpc,
westendAssetHubMetadataRpc,
} from '../resources';

const PROXY_METHOD_ARG = 2;
// map to retrieve the address encoding format when the key is the asset name
Expand Down Expand Up @@ -261,6 +266,8 @@ export class Utils implements BaseUtils {
metadataRpc = westendMetadataRpc;
} else if (specName === 'westmint') {
metadataRpc = westendAssetHubMetadataRpc;
} else if (specName === 'statemint') {
metadataRpc = polkadotAssetHubMetadataRpc;
}

return {
Expand Down
1 change: 1 addition & 0 deletions modules/sdk-coin-dot/src/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './mainnet';
export * from './westend';
export * from './polkadotAssetHub';
export * from './westendAssetHub';
2 changes: 2 additions & 0 deletions modules/sdk-coin-dot/src/resources/polkadotAssetHub.ts

Large diffs are not rendered by default.

This file was deleted.

12 changes: 6 additions & 6 deletions modules/sdk-coin-dot/test/resources/materialData.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions modules/sdk-coin-dot/test/resources/materialDataModified.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import should from 'should';
import { SingletonRegistry } from '../../../src/lib';
import { TypeRegistry } from '@substrate/txwrapper-core/lib/types';
import { Material } from '../../../src/lib/iface';
import * as material from '../../resources/assetHubMaterialData.json';
import * as material from '../../resources/materialData.json';
import * as modifiedMaterial from '../../resources/materialDataModified.json';

describe('SingletonRegistry', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '../../../src/lib';
import { Material } from '../../../src/lib/iface';
import { rawTx, accounts, mockTssSignature } from '../../resources';
import * as materialData from '../../resources/assetHubMaterialData.json';
import * as materialData from '../../resources/materialData.json';

describe('dot Transaction Builder Factory', function () {
const sender = accounts.account1;
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-dot/test/unit/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import should from 'should';
import { SingletonRegistry } from '../../src';
import utils from '../../src/lib/utils';
import { accounts, blockHash, signatures, txIds, rawTx } from '../resources';
import * as material from '../resources/assetHubMaterialData.json';
import * as material from '../resources/materialData.json';

describe('utils', () => {
const registry: TypeRegistry = SingletonRegistry.getInstance(material);
Expand Down
8 changes: 1 addition & 7 deletions modules/sdk-coin-dot/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
"typeRoots": ["../../types", "./node_modules/@types", "../../node_modules/@types"],
"resolveJsonModule": true
},
"include": [
"src/**/*",
"test/**/*",
"test/resources/materialData.json",
"test/resources/materialDataModified.json",
"test/resources/assetHubMaterialData.json"
],
"include": ["src/**/*", "test/**/*", "test/resources/materialData.json", "test/resources/materialDataModified.json"],
"exclude": ["node_modules"],
"references": [
{
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-core/src/bitgo/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const mainnetBase: EnvironmentTemplate = {
cronosNodeUrl: 'https://cronos-pos-rest.publicnode.com/',
initiaNodeUrl: 'https://rest.initia.xyz/',
asiNodeUrl: 'https://rest-fetchhub.fetch.ai/',
dotNodeUrls: ['wss://rpc.polkadot.io'],
dotNodeUrls: ['wss://asset-hub-polkadot-rpc.n.dwellir.com'],
substrateNodeUrls: ['wss://entrypoint-finney.opentensor.ai'],
polymeshNodeUrls: ['wss://mainnet-rpc.polymesh.network'],
tronNodes: {
Expand Down
18 changes: 9 additions & 9 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,15 @@ class ECashTestnet extends Testnet implements UtxoNetwork {
explorerUrl = undefined;
}

class Polkadot extends Mainnet implements DotNetwork {
name = 'Polkadot';
class PolkadotAssetHub extends Mainnet implements DotNetwork {
name = 'PolkadotAssetHub';
family = CoinFamily.DOT;
explorerUrl = 'https://polkadot.subscan.io/extrinsic/';
specName = 'polkadot' as PolkadotSpecNameType;
genesisHash = '0x91b171bb158e2d3848fa23a9f1c25182fb8e20313b2c1eb49219da7a70ce90c3';
specVersion = 9140;
chainName = 'Polkadot';
txVersion = 9;
explorerUrl = 'https://assethub-polkadot.subscan.io/extrinsic';
specName = 'statemint' as PolkadotSpecNameType;
genesisHash = '0x68d56f15f85d3136970ec16946040bc1752654e906147f7e43e9d539d7c3de2f';
specVersion = 1007001;
chainName = 'Polkadot Asset Hub';
txVersion = 15;
}

class WestendAssetHub extends Testnet implements DotNetwork {
Expand Down Expand Up @@ -2059,7 +2059,7 @@ export const Networks = {
cronos: Object.freeze(new Cronos()),
dash: Object.freeze(new Dash()),
dogecoin: Object.freeze(new Dogecoin()),
dot: Object.freeze(new Polkadot()),
dot: Object.freeze(new PolkadotAssetHub()),
eCash: Object.freeze(new ECash()),
eos: Object.freeze(new Eos()),
ethereum: Object.freeze(new Ethereum()),
Expand Down