Skip to content

Commit 8fdd673

Browse files
committed
Merge branch 'master' into nhussein11/estimate-fees
2 parents 0a65c70 + 8ef861b commit 8fdd673

File tree

118 files changed

+5517
-4570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+5517
-4570
lines changed

.CONTRIBUTING.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ You may want to spin up a local version of the documentation site to preview you
3030

3131
Building and serving the site requires cloning two repositories:
3232

33-
- **[Polkadot MkDocs](https://github.com/papermoonio/polkadot-mkdocs)** - contains the MkDocs configuration files, theme overrides, and custom CSS for the Polkadot documentation site
33+
- **[Polkadot MkDocs](https://github.com/papermoonio/polkadot-mkdocs)**: Contains the MkDocs configuration files, theme overrides, and custom CSS for the Polkadot documentation site.
3434

35-
- **[Polkadot Docs](https://github.com/polkadot-developers/polkadot-docs)** - the actual content is stored in the `polkadot-docs` repository and pulled into the `polkadot-mkdocs` directory during build
35+
- **[Polkadot Docs](https://github.com/polkadot-developers/polkadot-docs)**: The actual content is stored in the `polkadot-docs` repository and pulled into the `polkadot-mkdocs` directory during build.
3636

3737
For everything to work correctly, the file structure needs to be as follows:
3838

@@ -90,16 +90,16 @@ When adding new pages to the documentation site, it is important to ensure all r
9090

9191
To create a new section of pages, you will first need to create a subdirectory with the desired name of the section. The root directory, and every subdirectory, must contain the following files:
9292

93-
- `.pages` - defines the structure of the documentation site
94-
- `index.md` - a landing page which can be used to provide more context about the content in the section
93+
- **`.pages`**: Defines the structure of the documentation site.
94+
- **`index.md`**: A landing page which can be used to provide more context about the content in the section.
9595

9696
#### Example `.pages` File
9797

9898
```markdown
9999
title: Application Developers
100100
nav:
101101
- index.md
102-
- 'Polkadot SDK': 'polkadot-sdk.md'
102+
- **'Polkadot SDK'**: 'polkadot-sdk.md'
103103
- interact
104104
- tooling
105105
```
@@ -108,10 +108,10 @@ This example would result in adding 'Application Developers' as a section with t
108108

109109
Some important things to note:
110110

111-
- The `title` field at the top of the page represents the display name for the section. This is displayed on the left-side navigation bar when viewing the site
112-
- The `index.md` page should always be the first item in the `nav` list
113-
- Files follow the convention of `'Display Name': 'file-name.md'`
114-
- Sections are listed by their directory name in the source code. For example, the Tooling section will be added to the navigation simply by using the directory name: `tooling`
111+
- The `title` field at the top of the page represents the display name for the section. This is displayed on the left-side navigation bar when viewing the site.
112+
- The `index.md` page should always be the first item in the `nav` list.
113+
- Files follow the convention of `'Display Name': 'file-name.md'`.
114+
- Sections are listed by their directory name in the source code. For example, the Tooling section will be added to the navigation simply by using the directory name: `tooling`.
115115

116116
#### Example `index.md` File
117117

@@ -126,22 +126,22 @@ description: Learn how to build and customize blockchains with Polkadot SDK. Exp
126126

127127
Some important things to note:
128128

129-
- The `title` represents the `<title>` tag and is used for SEO purposes
130-
- The `description` represents the meta-description and is also used for SEO purposes
129+
- The `title` represents the `<title>` tag and is used for SEO purposes.
130+
- The `description` represents the meta-description and is also used for SEO purposes.
131131

132132
### Adding Pages to Existing Section
133133

134134
If you are adding pages to an existing section, the steps are simplified. However, it's essential to ensure you complete these steps to display the new page and its title on the documentation site correctly:
135135
136136
- Add the new markdown page to the appropriate section. Note that the filename becomes part of the URL for this page. See the [style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md#naming-conventions) for additional guidance on naming conventions.
137137
- Ensure the new content page includes the following:
138-
- **`title`** - represents the `<title>` tag and is used for SEO purposes (not displayed on the published site) Titles have a maximum length of 45 characters.
139-
- **`description`** - represents the meta-description and is also used for SEO purposes (not displayed on the published site). Descriptions should be 120-160 characters and should provide a preview into the page topic.
140-
- **Page title** - an H1 heading title to be displayed at the top of the page
138+
- **`title`**: Represents the `<title>` tag and is used for SEO purposes (not displayed on the published site) Titles have a maximum length of 45 characters.
139+
- **`description`**: Represents the meta-description and is also used for SEO purposes (not displayed on the published site). Descriptions should be 120-160 characters and should provide a preview into the page topic.
140+
- **Page title**: An H1 heading title to be displayed at the top of the page.
141141
142-
- **`## Checking Prerequisites` section** - if the guide requires the user to have specific developer tools installed, for example, Docker or MetaMask, it should be listed here
142+
- **`## Checking Prerequisites` section**: If the guide requires the user to have specific developer tools installed, for example, Docker or MetaMask, it should be listed here.
143143
144-
- Add the 'Display Name': 'file-name.md' for the new page to the `.pages` folder in the same subdirectory where you added the new page
144+
- **Add the 'Display Name'**: 'file-name.md' for the new page to the `.pages` folder in the same subdirectory where you added the new page.
145145
146146
An example new content page might look like:
147147
@@ -172,10 +172,10 @@ More resources for [SEO Optimization](#search-engine-optimization-seo) of titles
172172
git checkout -b INSERT_NEW_BRANCH_NAME
173173
```
174174
175-
2. Modify content as desired. Remember to place images and code snippets in the appropriate folders (see the following sections for details)
176-
3. Review the [style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md) to ensure your new content meets the guidelines
177-
3. Once you commit and push all of your changes, open a pull request for the new content branch against the `main` branch
178-
4. Monitor notifications and pull requests for feedback from code owners. At least one approval is required before merging content
175+
2. Modify content as desired. Remember to place images and code snippets in the appropriate folders (see the following sections for details).
176+
3. Review the [style guide](https://github.com/papermoonio/documentation-style-guide/blob/main/style-guide.md) to ensure your new content meets the guidelines.
177+
3. Once you commit and push all of your changes, open a pull request for the new content branch against the `main` branch.
178+
4. Monitor notifications and pull requests for feedback from code owners. At least one approval is required before merging content.
179179
180180
If your additions or modifications are limited to content on an existing page, there is no need to worry about the [`.pages`](#example-pages-file) or [`index.md`](#example-indexmd-file) files, as changes to page content don't affect these files.
181181

@@ -222,11 +222,11 @@ In general, titles should be between 50 and 60 characters and descriptions shoul
222222

223223
There are a few tools you may find useful for proofreading and editing your contributions:
224224

225-
- **[Vale](https://vale.sh/)** - the `polkadot-mkdocs` repository contains configuration for Vale, an open source NLP-powered linter for text. The configuration is a work in progress with a growing custom dictionary tailored toward software engineering, blockchain, and Polkadot terms. Running Vale against your files locally can serve as a first round of feedback to speed up the review process
225+
- **[Vale](https://vale.sh/)**: The `polkadot-mkdocs` repository contains configuration for Vale, an open source NLP-powered linter for text. The configuration is a work in progress with a growing custom dictionary tailored toward software engineering, blockchain, and Polkadot terms. Running Vale against your files locally can serve as a first round of feedback to speed up the review process.
226226

227227
To use Vale locally to screen your work:
228228

229-
1. Visit the Vale site and follow the [installation instructions](https://vale.sh/docs/vale-cli/installation/)
229+
1. Visit the Vale site and follow the [installation instructions](https://vale.sh/docs/vale-cli/installation/).
230230
2. From the `polkadot-mkdocs` directory, run the following in your terminal:
231231

232232
```bash
@@ -237,8 +237,8 @@ To use Vale locally to screen your work:
237237

238238
![Vale sample terminal output](images/contributing/vale-output-01.webp)
239239

240-
3. You can use CMD+click to open the file with the flagged items. This is especially helpful if you run Vale against a directory with multiple files
240+
3. You can use CMD+click to open the file with the flagged items. This is especially helpful if you run Vale against a directory with multiple files.
241241

242-
4. Each flag tells you the line and location of the flagged item, the level of the flag (error, warning, or suggestion), and a suggestion for how to resolve the flag
242+
4. Each flag tells you the line and location of the flagged item, the level of the flag (error, warning, or suggestion), and a suggestion for how to resolve the flag.
243243

244-
5. Once you have addressed the flagged items and made edits as needed, you can complete the normal steps to commit your changes and open a pull request to review for merge
244+
5. Once you have addressed the flagged items and made edits as needed, you can complete the normal steps to commit your changes and open a pull request to review for merge.

.snippets/code/develop/toolkit/interoperability/asset-transfer-api/reference/transfer-arg-opts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Options for customizing the claim assets transaction. These options allow you to
1818

1919
The Asset ID to pay fees on the current common good parachain. The defaults are as follows:
2020

21-
- Polkadot Asset Hub - `'DOT'`
22-
- Kusama Asset Hub - `'KSM'`
21+
- **Polkadot Asset Hub**: `'DOT'`
22+
- **Kusama Asset Hub**: `'KSM'`
2323

2424
---
2525

.snippets/code/develop/toolkit/interoperability/asset-transfer-api/reference/tx-result.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ A promise containing the result of constructing the transaction.
133133

134134
The `ConstructedFormat` type is a conditional type that returns a specific type based on the value of the TxResult `format` field.
135135

136-
- **Payload format** - if the format field is set to `'payload'`, the `ConstructedFormat` type will return a [`GenericExtrinsicPayload`](https://github.com/polkadot-js/api/blob/v15.8.1/packages/types/src/extrinsic/ExtrinsicPayload.ts#L87){target=\_blank}
137-
- **Call format** - if the format field is set to `'call'`, the `ConstructedFormat` type will return a hexadecimal string (`0x${string}`). This is the encoded representation of the extrinsic call
138-
- **Submittable format** - if the format field is set to `'submittable'`, the `ConstructedFormat` type will return a [`SubmittableExtrinsic`](https://github.com/polkadot-js/api/blob/v15.8.1/packages/api-base/src/types/submittable.ts#L56){target=\_blank}. This is a Polkadot.js type that represents a transaction that can be submitted to the blockchain
136+
- **Payload format**: If the format field is set to `'payload'`, the `ConstructedFormat` type will return a [`GenericExtrinsicPayload`](https://github.com/polkadot-js/api/blob/v15.8.1/packages/types/src/extrinsic/ExtrinsicPayload.ts#L87){target=\_blank}.
137+
- **Call format**: If the format field is set to `'call'`, the `ConstructedFormat` type will return a hexadecimal string (`0x${string}`). This is the encoded representation of the extrinsic call.
138+
- **Submittable format**: If the format field is set to `'submittable'`, the `ConstructedFormat` type will return a [`SubmittableExtrinsic`](https://github.com/polkadot-js/api/blob/v15.8.1/packages/api-base/src/types/submittable.ts#L56){target=\_blank}. This is a Polkadot.js type that represents a transaction that can be submitted to the blockchain.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
3+
// Account configuration - replace with your addresses
4+
const RECIPIENT_ACCOUNT = 'INSERT_RECIPIENT_ACCOUNT';
5+
const PROXIED_ACCOUNT = 'INSERT_PROXIED_ACCOUNT';
6+
7+
async function executeRemoteProxyTransaction() {
8+
try {
9+
// Establish connections to both chains
10+
console.log('Connecting to Kusama relay chain...');
11+
const kusamaProvider = new WsProvider(
12+
'wss://kusama.public.curie.radiumblock.co/ws',
13+
);
14+
const kusamaApi = await ApiPromise.create({ provider: kusamaProvider });
15+
16+
console.log('Connecting to Kusama Asset Hub...');
17+
const assetHubProvider = new WsProvider(
18+
'wss://kusama-asset-hub-rpc.polkadot.io',
19+
);
20+
const assetHubApi = await ApiPromise.create({ provider: assetHubProvider });
21+
22+
// Step 1: Generate storage key for proxy definition
23+
const proxyStorageKey = kusamaApi.query.proxy.proxies.key(PROXIED_ACCOUNT);
24+
console.log(`Proxy storage key: ${proxyStorageKey}`);
25+
26+
// Step 2: Identify latest recognized block
27+
const blockToRootMapping = JSON.parse(
28+
await assetHubApi.query.remoteProxyRelayChain.blockToRoot(),
29+
);
30+
const latestRecognizedBlock =
31+
blockToRootMapping[blockToRootMapping.length - 1][0];
32+
const blockHash = await kusamaApi.rpc.chain.getBlockHash(
33+
latestRecognizedBlock,
34+
);
35+
36+
console.log(`Generating proof for block ${latestRecognizedBlock}`);
37+
38+
// Step 3: Create storage proof
39+
const storageProof = JSON.parse(
40+
await kusamaApi.rpc.state.getReadProof([proxyStorageKey], blockHash),
41+
);
42+
43+
// Step 4: Define target transaction
44+
const targetTransaction = assetHubApi.tx.balances.transferAll(
45+
RECIPIENT_ACCOUNT,
46+
false,
47+
);
48+
49+
// Step 5: Construct remote proxy call
50+
const remoteProxyCall = assetHubApi.tx.remoteProxyRelayChain.remoteProxy(
51+
PROXIED_ACCOUNT,
52+
null, // Proxy type filter (null accepts any compatible type)
53+
targetTransaction.method,
54+
{
55+
RelayChain: {
56+
proof: storageProof.proof,
57+
block: latestRecognizedBlock,
58+
},
59+
},
60+
);
61+
62+
console.log('\n✅ Remote proxy transaction constructed successfully!');
63+
console.log('\n📋 Next steps:');
64+
console.log('1. Copy the URL below');
65+
console.log('2. Open in Polkadot.js Apps');
66+
console.log('3. Submit the transaction within 1 minute');
67+
console.log('\n🔗 Polkadot.js Apps URL:');
68+
console.log(
69+
`https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-asset-hub-rpc.polkadot.io#/extrinsics/decode/${remoteProxyCall.method.toHex()}`,
70+
);
71+
72+
// Cleanup connections
73+
await kusamaApi.disconnect();
74+
await assetHubApi.disconnect();
75+
} catch (error) {
76+
console.error('❌ Remote proxy execution failed:', error.message);
77+
}
78+
}
79+
80+
// Execute the remote proxy workflow
81+
executeRemoteProxyTransaction();
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
[
22
{
33
"title": "Choose a Smart Contract Platform",
4-
"content": "Select the platform that best fits your project requirements and development expertise: <br><br> - [**PolkaVM**](/develop/smart-contracts/overview#native-smart-contracts){target=_blank} - Native smart contracts on Polkadot Hub <br> - [**EVM (Parachain-based)**](/develop/smart-contracts/overview#parachain-contracts){target=_blank} - Ethereum Virtual Machine compatibility on parachains <br> - [**Rust (ink!)**](/develop/smart-contracts/overview#other-smart-contract-environments){target=_blank} - contracts using Rust and ink!",
4+
"content": "Select the platform that best fits your project requirements and development expertise: <br><br> - [**PolkaVM**](/develop/smart-contracts/overview#native-smart-contracts){target=_blank}: Native smart contracts on Polkadot Hub <br> - [**EVM (parachain-based)**](/develop/smart-contracts/overview#parachain-contracts){target=_blank}: Ethereum Virtual Machine compatibility on parachains <br> - [**Rust (ink!)**](/develop/smart-contracts/overview#other-smart-contract-environments){target=_blank}: Contracts using Rust and ink!",
55
"icon": ":fontawesome-solid-1:"
66
},
77
{
88
"title": "Get Network Configuration Details",
9-
"content": "Configure your development environment with the appropriate network settings for your chosen platform: <br><br> - **PolkaVM** - [Connect to Polkadot](/develop/smart-contracts/connect-to-polkadot/){target=_blank} <br> - **EVM** - [Moonbeam Documentation](https://docs.moonbeam.network/){target=_blank}, [Astar Documentation](https://docs.astar.network/){target=_blank}, [Acala Documentation](https://wiki.acala.network/){target=_blank} <br> - **Rust (ink!)** - for more information check the [ink! documentation](https://use.ink){target=_blank}",
9+
"content": "Configure your development environment with the appropriate network settings for your chosen platform: <br><br> - **PolkaVM**: [Connect to Polkadot](/develop/smart-contracts/connect-to-polkadot/){target=_blank} <br> - **EVM**: [Moonbeam documentation](https://docs.moonbeam.network/){target=_blank}, [Astar documentation](https://docs.astar.network/){target=_blank}, [Acala documentation](https://wiki.acala.network/){target=_blank} <br> - **Rust (ink!)**: For more information, check the [ink! documentation](https://use.ink){target=_blank}",
1010
"icon": ":fontawesome-solid-2:"
1111
},
1212
{
1313
"title": "Set Up Your Development Environment",
14-
"content": "Install and configure the necessary tools and frameworks for your chosen smart contract platform: <br><br> - **PolkaVM/EVM** - [Development Environments](/develop/smart-contracts/dev-environments/){target=_blank} <br> - **Rust (ink!)** - [Development Environment Setup](https://use.ink/getting-started/setup){target=_blank}",
14+
"content": "Install and configure the necessary tools and frameworks for your chosen smart contract platform: <br><br> - **PolkaVM/EVM**: [Development Environments](/develop/smart-contracts/dev-environments/){target=_blank} <br> - **Rust (ink!)**: [Development Environment Setup](https://use.ink/getting-started/setup){target=_blank}",
1515
"icon": ":fontawesome-solid-3:"
1616
},
1717
{
1818
"title": "Write, Compile, Test, and Deploy Your Contracts",
19-
"content": "Develop your smart contracts, test their functionality, and deploy them to your chosen network: <br><br> - **PolkaVM/EVM** - [Solidity Development Guide](https://docs.soliditylang.org/en/v0.8.29/introduction-to-smart-contracts.html){target=_blank} <br> - **Rust (ink!)** - [ink! Contract Structure](https://use.ink/basics/contract-template#librs){target=_blank}",
19+
"content": "Develop your smart contracts, test their functionality, and deploy them to your chosen network: <br><br> - **PolkaVM/EVM**: [Solidity Development Guide](https://docs.soliditylang.org/en/v0.8.29/introduction-to-smart-contracts.html){target=_blank} <br> - **Rust (ink!)**: [ink! Contract Structure](https://use.ink/basics/contract-template#librs){target=_blank}",
2020
"icon": ":fontawesome-solid-4:"
2121
},
2222
{
2323
"title": "Interact With Your Deployed Contracts",
24-
"content": "Utilize libraries and tools to interact with your deployed smart contracts and integrate them into applications: <br><br> - **PolkaVM/EVM** - [Contract Libraries](/develop/smart-contracts/libraries/) <br> - **Rust (ink!)** - [Contract Interaction](https://use.ink/getting-started/calling-your-contract){target=_blank}",
24+
"content": "Utilize libraries and tools to interact with your deployed smart contracts and integrate them into applications: <br><br> - **PolkaVM/EVM**: [Contract Libraries](/develop/smart-contracts/libraries/) <br> - **Rust (ink!)**: [Contract Interaction](https://use.ink/getting-started/calling-your-contract){target=_blank}",
2525
"icon": ":fontawesome-solid-5:"
2626
}
2727
]

ai-chatbot-policy.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: AI Chatbot Policy
3+
description: This AI chatbot policy outlines the terms, conditions, and guidelines you agree to when accessing or using the AI chatbot provided through this Website.
4+
hide:
5+
- toc
6+
- feedback
7+
- navigation
8+
---
9+
10+
# AI Chatbot Policy
11+
12+
--8<-- 'https://raw.githubusercontent.com/w3f/polkadot-wiki/refs/heads/master/docs/policies/chatbot-terms.md:5'

0 commit comments

Comments
 (0)