Skip to content

Commit 7de3555

Browse files
Update deposit-reserve-asset-with-set-topic.ts
1 parent 0faa8a8 commit 7de3555

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.snippets/code/tutorials/interoperability/xcm-observability/deposit-reserve-asset-with-set-topic.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Binary, BlockInfo, createClient, Enum, PolkadotClient, TypedApi} from "polkadot-api";
1+
import {Binary, createClient, Enum, type BlockInfo, type PolkadotClient} from "polkadot-api";
22
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
33
import {getPolkadotSigner} from "polkadot-api/signer";
44
import {getWsProvider} from "polkadot-api/ws-provider/web";
@@ -39,7 +39,7 @@ const toHuman = (_key: any, value: any) => {
3939

4040
async function assertProcessedMessageId(
4141
client: PolkadotClient,
42-
api: TypedApi<any>,
42+
api: any,
4343
name: String,
4444
blockBefore: BlockInfo,
4545
expectedMessageId: String,
@@ -210,7 +210,7 @@ async function main() {
210210
}
211211
}
212212

213-
const sentEvents = await para1Api.event.PolkadotXcm.Sent.pull();
213+
const sentEvents: any = await para1Api.event.PolkadotXcm.Sent.pull();
214214
if (sentEvents.length > 0) {
215215
const sentMessageId = sentEvents[0].payload.message_id.asHex();
216216
console.log(`📣 Last message sent on ${para1Name}: ${sentMessageId}`);
@@ -231,4 +231,4 @@ async function main() {
231231
}
232232
}
233233

234-
main().catch(console.error);
234+
main().catch(console.error);

.snippets/code/tutorials/interoperability/xcm-observability/limited-reserve-transfer-assets.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Binary, createClient, Enum} from "polkadot-api";
1+
import {Binary, createClient, Enum, type BlockInfo, type PolkadotClient} from "polkadot-api";
22
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
33
import {getPolkadotSigner} from "polkadot-api/signer";
44
import {getWsProvider} from "polkadot-api/ws-provider/web";
@@ -36,10 +36,10 @@ const toHuman = (_key: any, value: any) => {
3636
};
3737

3838
async function assertProcessedMessageId(
39-
client: any,
39+
client: PolkadotClient,
4040
api: any,
4141
name: String,
42-
blockBefore: any,
42+
blockBefore: BlockInfo,
4343
expectedMessageId: String,
4444
) {
4545
let processedMessageId = undefined;
@@ -181,4 +181,4 @@ async function main() {
181181
}
182182
}
183183

184-
main().catch(console.error);
184+
main().catch(console.error);

llms-full.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31053,7 +31053,7 @@ flowchart TD
3105331053
Create and run `limited-reserve-transfer-assets.ts`:
3105431054

3105531055
```ts
31056-
import {Binary, createClient, Enum} from "polkadot-api";
31056+
import {Binary, createClient, Enum, type BlockInfo, type PolkadotClient} from "polkadot-api";
3105731057
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
3105831058
import {getPolkadotSigner} from "polkadot-api/signer";
3105931059
import {getWsProvider} from "polkadot-api/ws-provider/web";
@@ -31091,10 +31091,10 @@ const toHuman = (_key: any, value: any) => {
3109131091
};
3109231092

3109331093
async function assertProcessedMessageId(
31094-
client: any,
31094+
client: PolkadotClient,
3109531095
api: any,
3109631096
name: String,
31097-
blockBefore: any,
31097+
blockBefore: BlockInfo,
3109831098
expectedMessageId: String,
3109931099
) {
3110031100
let processedMessageId = undefined;
@@ -31308,7 +31308,7 @@ The runtime adds a `SetTopic` to the forwarded XCM automatically:
3130831308
Create and run `deposit-reserve-asset-with-set-topic.ts`:
3130931309

3131031310
```ts
31311-
import {Binary, BlockInfo, createClient, Enum, PolkadotClient, TypedApi} from "polkadot-api";
31311+
import {Binary, createClient, Enum, type BlockInfo, type PolkadotClient} from "polkadot-api";
3131231312
import {withPolkadotSdkCompat} from "polkadot-api/polkadot-sdk-compat";
3131331313
import {getPolkadotSigner} from "polkadot-api/signer";
3131431314
import {getWsProvider} from "polkadot-api/ws-provider/web";
@@ -31349,7 +31349,7 @@ const toHuman = (_key: any, value: any) => {
3134931349

3135031350
async function assertProcessedMessageId(
3135131351
client: PolkadotClient,
31352-
api: TypedApi<any>,
31352+
api: any,
3135331353
name: String,
3135431354
blockBefore: BlockInfo,
3135531355
expectedMessageId: String,
@@ -31520,7 +31520,7 @@ async function main() {
3152031520
}
3152131521
}
3152231522

31523-
const sentEvents = await para1Api.event.PolkadotXcm.Sent.pull();
31523+
const sentEvents: any = await para1Api.event.PolkadotXcm.Sent.pull();
3152431524
if (sentEvents.length > 0) {
3152531525
const sentMessageId = sentEvents[0].payload.message_id.asHex();
3152631526
console.log(`📣 Last message sent on ${para1Name}: ${sentMessageId}`);

0 commit comments

Comments
 (0)