Skip to content

Commit a959169

Browse files
Neuroweb Fixes (#1564)
* update metadata * allow nueroweb para to para * fixes * ws
1 parent e5229c1 commit a959169

File tree

5 files changed

+33
-20
lines changed

5 files changed

+33
-20
lines changed

web/packages/api/src/assets_v2.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,15 @@ function addOverrides(envName: string, result: RegistryOptions) {
905905
}
906906
break
907907
}
908+
case "paseo_sepolia": {
909+
result.metadataOverrides = {}
910+
// Change the name of TRAC
911+
result.metadataOverrides["0xef32abea56beff54f61da319a7311098d6fbcea9".toLowerCase()] = {
912+
name: "OriginTrail TRAC",
913+
symbol: "TRAC"
914+
}
915+
break
916+
}
908917
}
909918
}
910919

web/packages/api/src/parachains/neuroweb.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const NEUROWEB_TEST_CHAIN_ID = 11155111 // Sepolia
1010
export const NEUROWEB_TEST_TOKEN_ID = "0xef32abea56beff54f61da319a7311098d6fbcea9"
1111
export const NEUROWEB_CHAIN_ID = 1 // Ethereum Mainnet
1212
export const NEUROWEB_TOKEN_ID = "0xaa7a9ca87d3694b5755f213b5d04094b8d0f0a6f"
13+
const TRAC_ASSET_ID = 1
1314

1415
export class NeurowebParachain extends ParachainBase {
1516
getXC20DOT() {
@@ -71,7 +72,7 @@ export class NeurowebParachain extends ParachainBase {
7172
asset
7273
)}'. Using default.`
7374
)
74-
return 10_000_000_000n // TODO
75+
return 1_000_000_000n
7576
}
7677
return await this.calculateXcmFee(destinationXcm, asset)
7778
}
@@ -113,22 +114,25 @@ export class NeurowebParachain extends ParachainBase {
113114

114115
async tracBalance(account: string) {
115116
const accountData = (
116-
await this.provider.query.assets.account(1, account)
117+
await this.provider.query.assets.account(TRAC_ASSET_ID, account)
117118
).toPrimitive() as any
118119
return BigInt(accountData?.balance ?? 0n)
119120
}
120121

121-
createWrapTx(
122-
parachain: ApiPromise,
123-
amount: bigint
124-
): SubmittableExtrinsic<"promise", ISubmittableResult> {
125-
return parachain.tx.wrapper.tracWrap(amount)
122+
createWrapTx(amount: bigint): SubmittableExtrinsic<"promise", ISubmittableResult> {
123+
// TODO: Delete, unused
124+
return this.provider.tx.wrapper.tracWrap(amount)
126125
}
127126

128-
createUnwrapTx(
129-
parachain: ApiPromise,
130-
amount: bigint
131-
): SubmittableExtrinsic<"promise", ISubmittableResult> {
132-
return parachain.tx.wrapper.tracUnwrap(amount)
127+
createUnwrapTx(amount: bigint): SubmittableExtrinsic<"promise", ISubmittableResult> {
128+
// TODO: Delete, unused
129+
return this.provider.tx.wrapper.tracUnwrap(amount)
130+
}
131+
132+
async calculateDeliveryFeeInDOT(_destParachainId: number, _xcm: any): Promise<bigint> {
133+
console.warn(
134+
`${this.specName} does not support calculating xcm delivery fee. Using default.`
135+
)
136+
return 1_000_000_000n
133137
}
134138
}

web/packages/operations/src/unwrap_snow_trac.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const unwrapSnowTRAC = async () => {
5151
process.exit(1)
5252
}
5353

54-
const wrapTx = neuroWeb.createUnwrapTx(parachain, balance)
54+
const wrapTx = neuroWeb.createUnwrapTx(balance)
5555

5656
/* await wrapTx.signAndSend(POLKADOT_ACCOUNT, { nonce: -1 }, (result) => {
5757
console.log(`Transaction status: ${result.status}`)

web/packages/operations/src/wrap_snow_trac.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const wrapSnowTRAC = async () => {
5151
process.exit(1)
5252
}
5353

54-
const wrapTx = neuroWeb.createWrapTx(parachain, balance)
54+
const wrapTx = neuroWeb.createWrapTx(balance)
5555

5656
await wrapTx.signAndSend(POLKADOT_ACCOUNT, { nonce: -1 }, (result) => {
5757
console.log(`Transaction status: ${result.status}`)

web/packages/registry/src/paseo_sepolia.registry.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"timestamp": "2025-08-28T06:45:53.537Z",
2+
"timestamp": "2025-09-09T21:32:39.144Z",
33
"environment": "paseo_sepolia",
44
"ethChainId": 11155111,
55
"gatewayAddress": "0x1607C1368bc943130258318c91bBd8cFf3D063E6",
@@ -13,7 +13,7 @@
1313
"accountType": "AccountId32",
1414
"name": "Paseo Testnet",
1515
"specName": "paseo",
16-
"specVersion": 1006001
16+
"specVersion": 1006002
1717
},
1818
"bridgeHub": {
1919
"tokenSymbols": "PAS",
@@ -43,8 +43,8 @@
4343
},
4444
"0xef32abea56beff54f61da319a7311098d6fbcea9": {
4545
"token": "0xef32abea56beff54f61da319a7311098d6fbcea9",
46-
"name": "Trace token",
47-
"symbol": "TRACE",
46+
"name": "OriginTrail TRAC",
47+
"symbol": "TRAC",
4848
"decimals": 18
4949
},
5050
"0x99e743964c036bc28931fb564817db428aa7f752": {
@@ -145,7 +145,7 @@
145145
"accountType": "AccountId32",
146146
"name": "Neuro Testnet",
147147
"specName": "origintrail-parachain",
148-
"specVersion": 142
148+
"specVersion": 146
149149
},
150150
"assets": {
151151
"0xef32abea56beff54f61da319a7311098d6fbcea9": {
@@ -157,7 +157,7 @@
157157
"isSufficient": true
158158
}
159159
},
160-
"estimatedExecutionFeeDOT": "bigint:200000000000",
160+
"estimatedExecutionFeeDOT": "bigint:10000000000",
161161
"estimatedDeliveryFeeDOT": "bigint:307250000"
162162
},
163163
"3369": {

0 commit comments

Comments
 (0)