Skip to content

Commit 5f0c9e0

Browse files
nhussein11eshabenkapetan3sidCopilotbrunopgalvao
authored
Add chopsticks page (#1328)
* Add Chopsticks documentation and images * Refactor Chopsticks documentation to streamline code examples and improve readability. Replace lengthy code snippets with references to external files for configuration, connection, and RPC examples. Update output examples for consistency across sections. * show technical reference section * llms * Refactor and improve Technical Reference > Parachain > Consensus > Assets & Smart Contracts (#1129) * add assets page * add smart contract page * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Update .nav.yml Co-authored-by: Nicolás Hussein <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Nicolás Hussein <[email protected]> * merge pages and apply feedback * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * Apply suggestion from @nhussein11 Co-authored-by: Nicolás Hussein <[email protected]> * minor edits * split content in two pages * add llms stuff * Update reference/polkadot-hub/assets.md Co-authored-by: Nicolás Hussein <[email protected]> * clean up pages * fix target blank * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * Update reference/polkadot-hub/smart-contracts.md Co-authored-by: Bruno Galvao <[email protected]> * apply bruno's feedback, remove repetitive text, and update intro based on current content * move warning to bottom of page * apply bruno's feedback * llms * apply feedback and make some minor edits * llms --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Nicolás Hussein <[email protected]> Co-authored-by: Erin Shaben <[email protected]> Co-authored-by: Bruno Galvao <[email protected]> * Add zombienet page (#1323) * Add Zombienet documentation for testing framework (#1300) * Introduce Zombienet as a testing framework for Polkadot SDK-based blockchain networks. * Detail installation methods including executable, Nix, and Docker. * Outline key features, configuration options, and CLI commands for network spawning and testing. * Provide examples for basic configuration and test file structure. Co-authored-by: [Your Name] <[email protected]> * Remove tutorial section for spawning a basic chain with Zombienet from documentation. * Apply suggestions from code review Co-authored-by: Bruno Galvao <[email protected]> Co-authored-by: Copilot <[email protected]> * Update Zombienet documentation to clarify provider configuration * minor formatting edits * llms --------- Co-authored-by: [Your Name] <[email protected]> Co-authored-by: Bruno Galvao <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Erin Shaben <[email protected]> * minor formatting * format ts files and update layout of ws commands section * grammarly and llms * Update chopsticks images to enhance visual reference in documentation --------- Co-authored-by: Erin Shaben <[email protected]> Co-authored-by: Andreja Markovic <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Bruno Galvao <[email protected]> Co-authored-by: [Your Name] <[email protected]>
1 parent 4fb252c commit 5f0c9e0

20 files changed

+1960
-13
lines changed

.ai/categories/parachains.md

Lines changed: 466 additions & 0 deletions
Large diffs are not rendered by default.

.ai/categories/tooling.md

Lines changed: 466 additions & 0 deletions
Large diffs are not rendered by default.

.ai/pages/reference-tools-chopsticks.md

Lines changed: 459 additions & 1 deletion
Large diffs are not rendered by default.

.ai/site-index.json

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5373,22 +5373,99 @@
53735373
},
53745374
{
53755375
"id": "reference-tools-chopsticks",
5376-
"title": "reference-tools-chopsticks",
5376+
"title": "Chopsticks",
53775377
"slug": "reference-tools-chopsticks",
53785378
"categories": [
5379-
"Uncategorized"
5379+
"Parachains",
5380+
"Tooling"
53805381
],
53815382
"raw_md_url": "https://raw.githubusercontent.com/polkadot-developers/polkadot-docs/master/.ai/pages/reference-tools-chopsticks.md",
53825383
"html_url": "https://docs.polkadot.com/reference/tools/chopsticks/",
5383-
"preview": "TODO",
5384-
"outline": [],
5384+
"preview": "[Chopsticks](https://github.com/AcalaNetwork/chopsticks/){target=\\_blank}, developed by the [Acala Foundation](https://github.com/AcalaNetwork){target=\\_blank}, is a versatile tool tailored for developers working on Polkadot SDK-based blockchains. With Chopsticks, you can fork live chains locally, replay blocks to analyze extrinsics, and simulate complex scenarios like XCM interactions, all without deploying to a live network.",
5385+
"outline": [
5386+
{
5387+
"depth": 2,
5388+
"title": "Introduction",
5389+
"anchor": "introduction"
5390+
},
5391+
{
5392+
"depth": 3,
5393+
"title": "Key Features",
5394+
"anchor": "key-features"
5395+
},
5396+
{
5397+
"depth": 2,
5398+
"title": "Prerequisites",
5399+
"anchor": "prerequisites"
5400+
},
5401+
{
5402+
"depth": 2,
5403+
"title": "Installation",
5404+
"anchor": "installation"
5405+
},
5406+
{
5407+
"depth": 3,
5408+
"title": "Global Installation",
5409+
"anchor": "global-installation"
5410+
},
5411+
{
5412+
"depth": 3,
5413+
"title": "Local Installation",
5414+
"anchor": "local-installation"
5415+
},
5416+
{
5417+
"depth": 2,
5418+
"title": "Get Started",
5419+
"anchor": "get-started"
5420+
},
5421+
{
5422+
"depth": 3,
5423+
"title": "Configuration Options",
5424+
"anchor": "configuration-options"
5425+
},
5426+
{
5427+
"depth": 3,
5428+
"title": "Configuration File",
5429+
"anchor": "configuration-file"
5430+
},
5431+
{
5432+
"depth": 3,
5433+
"title": "Create a Fork",
5434+
"anchor": "create-a-fork"
5435+
},
5436+
{
5437+
"depth": 3,
5438+
"title": "Interact with a Fork",
5439+
"anchor": "interact-with-a-fork"
5440+
},
5441+
{
5442+
"depth": 3,
5443+
"title": "Replay Blocks",
5444+
"anchor": "replay-blocks"
5445+
},
5446+
{
5447+
"depth": 3,
5448+
"title": "Test XCM",
5449+
"anchor": "test-xcm"
5450+
},
5451+
{
5452+
"depth": 2,
5453+
"title": "WebSocket Commands",
5454+
"anchor": "websocket-commands"
5455+
},
5456+
{
5457+
"depth": 2,
5458+
"title": "Where to Go Next",
5459+
"anchor": "where-to-go-next"
5460+
}
5461+
],
53855462
"stats": {
5386-
"chars": 5,
5387-
"words": 1,
5388-
"headings": 0,
5389-
"estimated_token_count_total": 0
5463+
"chars": 15763,
5464+
"words": 2070,
5465+
"headings": 15,
5466+
"estimated_token_count_total": 4021
53905467
},
5391-
"hash": "sha256:56ba36249ea8216ad513b13df3de6c0e490ba214897674d30331f1c7e7edbef3",
5468+
"hash": "sha256:90e24f11e952b1f61ea4b53d8a0618c231293b032ebac0ee657d9bf55e75264f",
53925469
"token_estimator": "heuristic-v1"
53935470
},
53945471
{
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
3+
async function connectToFork() {
4+
const wsProvider = new WsProvider('ws://localhost:8000');
5+
const api = await ApiPromise.create({ provider: wsProvider });
6+
await api.isReady;
7+
8+
// Now you can use 'api' to interact with your fork
9+
console.log(`Connected to chain: ${await api.rpc.system.chain()}`);
10+
}
11+
12+
connectToFork();
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
3+
async function main() {
4+
const wsProvider = new WsProvider('ws://localhost:8000');
5+
const api = await ApiPromise.create({ provider: wsProvider });
6+
await api.isReady;
7+
await api.rpc('dev_newBlock', { count: 1 });
8+
}
9+
10+
main();
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
3+
async function main() {
4+
const wsProvider = new WsProvider('ws://localhost:8000');
5+
const api = await ApiPromise.create({ provider: wsProvider });
6+
await api.isReady;
7+
await api.rpc('dev_setBlockBuildMode', 'Instant');
8+
}
9+
10+
main();
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
3+
async function main() {
4+
const wsProvider = new WsProvider('ws://localhost:8000');
5+
const api = await ApiPromise.create({ provider: wsProvider });
6+
await api.isReady;
7+
await api.rpc('dev_setHead', 500);
8+
}
9+
10+
main();
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
3+
async function main() {
4+
const wsProvider = new WsProvider('ws://localhost:8000');
5+
const api = await ApiPromise.create({ provider: wsProvider });
6+
await api.isReady;
7+
await api.rpc('dev_setRuntimeLogLevel', 1);
8+
}
9+
10+
main();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { ApiPromise, WsProvider } from '@polkadot/api';
2+
import { Keyring } from '@polkadot/keyring';
3+
4+
async function main() {
5+
const wsProvider = new WsProvider('ws://localhost:8000');
6+
const api = await ApiPromise.create({ provider: wsProvider });
7+
await api.isReady;
8+
const keyring = new Keyring({ type: 'ed25519' });
9+
const bob = keyring.addFromUri('//Bob');
10+
const storage = {
11+
System: {
12+
Account: [[[bob.address], { data: { free: 100000 }, nonce: 1 }]],
13+
},
14+
};
15+
await api.rpc('dev_setStorage', storage);
16+
}
17+
18+
main();

0 commit comments

Comments
 (0)