@@ -10,6 +10,7 @@ export const NEUROWEB_TEST_CHAIN_ID = 11155111 // Sepolia
10
10
export const NEUROWEB_TEST_TOKEN_ID = "0xef32abea56beff54f61da319a7311098d6fbcea9"
11
11
export const NEUROWEB_CHAIN_ID = 1 // Ethereum Mainnet
12
12
export const NEUROWEB_TOKEN_ID = "0xaa7a9ca87d3694b5755f213b5d04094b8d0f0a6f"
13
+ const TRAC_ASSET_ID = 1
13
14
14
15
export class NeurowebParachain extends ParachainBase {
15
16
getXC20DOT ( ) {
@@ -71,7 +72,7 @@ export class NeurowebParachain extends ParachainBase {
71
72
asset
72
73
) } '. Using default.`
73
74
)
74
- return 10_000_000_000n // TODO
75
+ return 1_000_000_000n
75
76
}
76
77
return await this . calculateXcmFee ( destinationXcm , asset )
77
78
}
@@ -113,22 +114,25 @@ export class NeurowebParachain extends ParachainBase {
113
114
114
115
async tracBalance ( account : string ) {
115
116
const accountData = (
116
- await this . provider . query . assets . account ( 1 , account )
117
+ await this . provider . query . assets . account ( TRAC_ASSET_ID , account )
117
118
) . toPrimitive ( ) as any
118
119
return BigInt ( accountData ?. balance ?? 0n )
119
120
}
120
121
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 )
126
125
}
127
126
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
133
137
}
134
138
}
0 commit comments