Skip to content

Commit 79ad572

Browse files
committed
feat(sdk-coin-tao): add network to ttao
TICKET: WIN-4293
1 parent 6580a08 commit 79ad572

File tree

4 files changed

+83
-8
lines changed

4 files changed

+83
-8
lines changed

modules/sdk-coin-tao/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"@polkadot/util-crypto": "13.3.1",
5050
"@substrate/txwrapper-core": "7.5.2",
5151
"@substrate/txwrapper-polkadot": "7.5.2",
52+
"@substrate/txwrapper-registry": "7.5.3",
5253
"bignumber.js": "^9.1.2",
5354
"bs58": "^4.0.1",
5455
"hi-base32": "^0.5.1",

modules/sdk-coin-tao/src/lib/singletonRegistry.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { PolkadotSpecNameType } from '@bitgo/statics';
1+
import { BittensorSpecNameType } from '@bitgo/statics';
22
import { TypeRegistry } from '@substrate/txwrapper-core/lib/types';
3-
import { getRegistry } from '@substrate/txwrapper-polkadot';
3+
import { getRegistry } from '@substrate/txwrapper-registry';
44
import { Material } from './iface';
55

66
export class SingletonRegistry {
@@ -12,7 +12,7 @@ export class SingletonRegistry {
1212
SingletonRegistry.material = material;
1313
SingletonRegistry.instance = getRegistry({
1414
chainName: material.chainName,
15-
specName: material.specName as PolkadotSpecNameType,
15+
specName: material.specName as BittensorSpecNameType,
1616
specVersion: material.specVersion,
1717
metadataRpc: material.metadata as `0x${string}`,
1818
});

modules/statics/src/networks.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ export interface AccountNetwork extends BaseNetwork {
7373
*/
7474
export type PolkadotSpecNameType = 'kusama' | 'polkadot' | 'westend' | 'statemint' | 'statemine';
7575

76+
export type BittensorSpecNameType = 'kusama' | 'polkadot' | 'westend' | 'statemint' | 'statemine' | 'node-subtensor';
77+
7678
export interface DotNetwork extends AccountNetwork {
7779
// some chains pay fees via an enterprise gas task. The account explorer url
7880
// is a url that can be used to look up the account for the gas tank on-chain.
@@ -923,6 +925,11 @@ class BittensorTestnet extends Testnet implements AccountNetwork {
923925
name = 'Testnet Tao';
924926
family = CoinFamily.TAO;
925927
explorerUrl = 'https://explorer.finney.opentensor.ai/#/';
928+
specName = 'node-subtensor' as BittensorSpecNameType;
929+
genesisHash = '0x8f9cf856bf558a14440e75569c9e58594757048d7b3a84b5d25f6bd978263105';
930+
specVersion = 224;
931+
chainName = 'bittensor';
932+
txVersion = 1;
926933
}
927934

928935
class Trx extends Mainnet implements TronNetwork {

yarn.lock

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4121,7 +4121,7 @@
41214121
"@polkadot/util-crypto" "13.3.1"
41224122
tslib "^2.8.0"
41234123

4124-
"@polkadot/[email protected]", "@polkadot/networks@^13.2.1":
4124+
"@polkadot/[email protected]", "@polkadot/networks@^13.1.1", "@polkadot/networks@^13.2.1":
41254125
version "13.3.1"
41264126
resolved "https://registry.npmjs.org/@polkadot/networks/-/networks-13.3.1.tgz"
41274127
integrity sha512-g/0OmCMUrbbW4RQ/xajTYd2SMJvFKY4kmMvpxtNN57hWQpY7c5oDXSz57jGH2uwvcBWeDfaNokcS+9hJL1RBcA==
@@ -4899,6 +4899,15 @@
48994899
"@polkadot/keyring" "^13.1.1"
49004900
memoizee "0.4.15"
49014901

4902+
"@substrate/txwrapper-core@^7.5.3":
4903+
version "7.5.3"
4904+
resolved "https://registry.npmjs.org/@substrate/txwrapper-core/-/txwrapper-core-7.5.3.tgz#30c6a67fa5e76ad1db7b8bbb73d39f04bf79d166"
4905+
integrity sha512-vcb9GaAY8ex330yjJoDCa2w32R2u/KUmEKsD/5DRgTbPEUF1OYiKmmuOJWcD0jHu9HZ8HWlniiV8wxxwo3PVCA==
4906+
dependencies:
4907+
"@polkadot/api" "^14.0.1"
4908+
"@polkadot/keyring" "^13.1.1"
4909+
memoizee "0.4.17"
4910+
49024911
"@substrate/[email protected]":
49034912
version "7.5.2"
49044913
resolved "https://registry.npmjs.org/@substrate/txwrapper-polkadot/-/txwrapper-polkadot-7.5.2.tgz"
@@ -4907,6 +4916,14 @@
49074916
"@substrate/txwrapper-core" "^7.5.2"
49084917
"@substrate/txwrapper-substrate" "^7.5.2"
49094918

4919+
"@substrate/[email protected]":
4920+
version "7.5.3"
4921+
resolved "https://registry.npmjs.org/@substrate/txwrapper-registry/-/txwrapper-registry-7.5.3.tgz#f6014e67ef74b5db349ef7ae7bdbbbae530b1a0e"
4922+
integrity sha512-Rye7wXfLQWjYQSvhhIEv5TnAROKyxNwAPWPsPGfei/VD5n/cpNHuhLRXYl4ULZk5IuFH2/ZXEt09BMe8hll9oA==
4923+
dependencies:
4924+
"@polkadot/networks" "^13.1.1"
4925+
"@substrate/txwrapper-core" "^7.5.3"
4926+
49104927
"@substrate/txwrapper-substrate@^7.5.2":
49114928
version "7.5.2"
49124929
resolved "https://registry.npmjs.org/@substrate/txwrapper-substrate/-/txwrapper-substrate-7.5.2.tgz"
@@ -12108,7 +12125,18 @@ html-minifier-terser@^6.0.2:
1210812125
tapable "^1.1.3"
1210912126
util.promisify "1.0.0"
1211012127

12111-
"html-webpack-plugin-5@npm:html-webpack-plugin@^5", html-webpack-plugin@^5.5.0:
12128+
"html-webpack-plugin-5@npm:html-webpack-plugin@^5":
12129+
version "5.6.3"
12130+
resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.3.tgz"
12131+
integrity sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==
12132+
dependencies:
12133+
"@types/html-minifier-terser" "^6.0.0"
12134+
html-minifier-terser "^6.0.2"
12135+
lodash "^4.17.21"
12136+
pretty-error "^4.0.0"
12137+
tapable "^2.0.0"
12138+
12139+
html-webpack-plugin@^5.5.0:
1211212140
version "5.6.3"
1211312141
resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.3.tgz"
1211412142
integrity sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==
@@ -14212,6 +14240,20 @@ [email protected]:
1421214240
next-tick "^1.1.0"
1421314241
timers-ext "^0.1.7"
1421414242

14243+
14244+
version "0.4.17"
14245+
resolved "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz#942a5f8acee281fa6fb9c620bddc57e3b7382949"
14246+
integrity sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==
14247+
dependencies:
14248+
d "^1.0.2"
14249+
es5-ext "^0.10.64"
14250+
es6-weak-map "^2.0.3"
14251+
event-emitter "^0.3.5"
14252+
is-promise "^2.2.2"
14253+
lru-queue "^0.1.0"
14254+
next-tick "^1.1.0"
14255+
timers-ext "^0.1.7"
14256+
1421514257
meow@^12.0.1:
1421614258
version "12.1.1"
1421714259
resolved "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz"
@@ -18540,7 +18582,16 @@ string-argv@^0.3.1:
1854018582
resolved "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz"
1854118583
integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==
1854218584

18543-
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
18585+
"string-width-cjs@npm:string-width@^4.2.0":
18586+
version "4.2.3"
18587+
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
18588+
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
18589+
dependencies:
18590+
emoji-regex "^8.0.0"
18591+
is-fullwidth-code-point "^3.0.0"
18592+
strip-ansi "^6.0.1"
18593+
18594+
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
1854418595
version "4.2.3"
1854518596
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
1854618597
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -18612,7 +18663,7 @@ string_decoder@~1.1.1:
1861218663
dependencies:
1861318664
safe-buffer "~5.1.0"
1861418665

18615-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
18666+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
1861618667
version "6.0.1"
1861718668
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
1861818669
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -18626,6 +18677,13 @@ strip-ansi@^3.0.1:
1862618677
dependencies:
1862718678
ansi-regex "^2.0.0"
1862818679

18680+
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
18681+
version "6.0.1"
18682+
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
18683+
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
18684+
dependencies:
18685+
ansi-regex "^5.0.1"
18686+
1862918687
strip-ansi@^7.0.1:
1863018688
version "7.1.0"
1863118689
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz"
@@ -20459,7 +20517,7 @@ [email protected]:
2045920517
resolved "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz"
2046020518
integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==
2046120519

20462-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
20520+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
2046320521
version "7.0.0"
2046420522
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
2046520523
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -20477,6 +20535,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
2047720535
string-width "^4.1.0"
2047820536
strip-ansi "^6.0.0"
2047920537

20538+
wrap-ansi@^7.0.0:
20539+
version "7.0.0"
20540+
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
20541+
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
20542+
dependencies:
20543+
ansi-styles "^4.0.0"
20544+
string-width "^4.1.0"
20545+
strip-ansi "^6.0.0"
20546+
2048020547
wrap-ansi@^8.1.0:
2048120548
version "8.1.0"
2048220549
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz"

0 commit comments

Comments
 (0)