Skip to content

Commit 6d7befe

Browse files
committed
fix: llms
1 parent 4c1ec64 commit 6d7befe

18 files changed

+530
-3227
lines changed

.ai/categories/basics.md

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ First, you'll update the runtime's `Cargo.toml` file to include the Utility pall
140140
1. Open the `runtime/Cargo.toml` file and locate the `[dependencies]` section. Add pallet-utility as one of the features for the `polkadot-sdk` dependency with the following line:
141141

142142
```toml hl_lines="4" title="runtime/Cargo.toml"
143-
[dependencies]
143+
144144
...
145145
polkadot-sdk = { workspace = true, features = [
146146
"pallet-utility",
@@ -151,7 +151,7 @@ First, you'll update the runtime's `Cargo.toml` file to include the Utility pall
151151
2. In the same `[dependencies]` section, add the custom pallet that you built from scratch with the following line:
152152

153153
```toml hl_lines="3" title="Cargo.toml"
154-
[dependencies]
154+
155155
...
156156
custom-pallet = { path = "../pallets/custom-pallet", default-features = false }
157157
```
@@ -1634,53 +1634,13 @@ To build the smart contract, follow the steps below:
16341634
6. Add the getter and setter functions:
16351635
16361636
```solidity
1637-
// SPDX-License-Identifier: MIT
1638-
pragma solidity ^0.8.28;
1639-
1640-
contract Storage {
1641-
// State variable to store our number
1642-
uint256 private number;
1643-
1644-
// Event to notify when the number changes
1645-
event NumberChanged(uint256 newNumber);
1646-
1647-
// Function to store a new number
1648-
function store(uint256 newNumber) public {
1649-
number = newNumber;
1650-
emit NumberChanged(newNumber);
1651-
}
1652-
1653-
// Function to retrieve the stored number
1654-
function retrieve() public view returns (uint256) {
1655-
return number;
1656-
}
1657-
}
1637+
16581638
```
16591639
16601640
??? code "Complete Storage.sol contract"
16611641
16621642
```solidity title="Storage.sol"
1663-
// SPDX-License-Identifier: MIT
1664-
pragma solidity ^0.8.28;
1665-
1666-
contract Storage {
1667-
// State variable to store our number
1668-
uint256 private number;
1669-
1670-
// Event to notify when the number changes
1671-
event NumberChanged(uint256 newNumber);
1672-
1673-
// Function to store a new number
1674-
function store(uint256 newNumber) public {
1675-
number = newNumber;
1676-
emit NumberChanged(newNumber);
1677-
}
1678-
1679-
// Function to retrieve the stored number
1680-
function retrieve() public view returns (uint256) {
1681-
return number;
1682-
}
1683-
}
1643+
16841644
```
16851645
16861646
## Understanding the Code
@@ -6516,32 +6476,7 @@ The `xcm-emulator` provides macros for defining a mocked testing environment. Ch
65166476
- **[`decl_test_parachains`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2506-2/cumulus/xcm/xcm-emulator/src/lib.rs#L596){target=\_blank}**: Defines runtime and configuration for parachains. Example:
65176477
65186478
```rust
6519-
decl_test_parachains! {
6520-
pub struct AssetHubWestend {
6521-
genesis = genesis::genesis(),
6522-
on_init = {
6523-
asset_hub_westend_runtime::AuraExt::on_initialize(1);
6524-
},
6525-
runtime = asset_hub_westend_runtime,
6526-
core = {
6527-
XcmpMessageHandler: asset_hub_westend_runtime::XcmpQueue,
6528-
LocationToAccountId: asset_hub_westend_runtime::xcm_config::LocationToAccountId,
6529-
ParachainInfo: asset_hub_westend_runtime::ParachainInfo,
6530-
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
6531-
DigestProvider: (),
6532-
},
6533-
pallets = {
6534-
PolkadotXcm: asset_hub_westend_runtime::PolkadotXcm,
6535-
Balances: asset_hub_westend_runtime::Balances,
6536-
Assets: asset_hub_westend_runtime::Assets,
6537-
ForeignAssets: asset_hub_westend_runtime::ForeignAssets,
6538-
PoolAssets: asset_hub_westend_runtime::PoolAssets,
6539-
AssetConversion: asset_hub_westend_runtime::AssetConversion,
6540-
SnowbridgeSystemFrontend: asset_hub_westend_runtime::SnowbridgeSystemFrontend,
6541-
Revive: asset_hub_westend_runtime::Revive,
6542-
}
6543-
},
6544-
}
6479+
65456480
```
65466481
65476482
- **[`decl_test_bridges`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2506-2/cumulus/xcm/xcm-emulator/src/lib.rs#L1221){target=\_blank}**: Creates bridges between chains, specifying the source, target, and message handler. Example:

.ai/categories/dapps.md

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ First, you'll update the runtime's `Cargo.toml` file to include the Utility pall
141141
1. Open the `runtime/Cargo.toml` file and locate the `[dependencies]` section. Add pallet-utility as one of the features for the `polkadot-sdk` dependency with the following line:
142142

143143
```toml hl_lines="4" title="runtime/Cargo.toml"
144-
[dependencies]
144+
145145
...
146146
polkadot-sdk = { workspace = true, features = [
147147
"pallet-utility",
@@ -152,7 +152,7 @@ First, you'll update the runtime's `Cargo.toml` file to include the Utility pall
152152
2. In the same `[dependencies]` section, add the custom pallet that you built from scratch with the following line:
153153

154154
```toml hl_lines="3" title="Cargo.toml"
155-
[dependencies]
155+
156156
...
157157
custom-pallet = { path = "../pallets/custom-pallet", default-features = false }
158158
```
@@ -1994,53 +1994,13 @@ To build the smart contract, follow the steps below:
19941994
6. Add the getter and setter functions:
19951995

19961996
```solidity
1997-
// SPDX-License-Identifier: MIT
1998-
pragma solidity ^0.8.28;
1999-
2000-
contract Storage {
2001-
// State variable to store our number
2002-
uint256 private number;
2003-
2004-
// Event to notify when the number changes
2005-
event NumberChanged(uint256 newNumber);
2006-
2007-
// Function to store a new number
2008-
function store(uint256 newNumber) public {
2009-
number = newNumber;
2010-
emit NumberChanged(newNumber);
2011-
}
2012-
2013-
// Function to retrieve the stored number
2014-
function retrieve() public view returns (uint256) {
2015-
return number;
2016-
}
2017-
}
1997+
20181998
```
20191999

20202000
??? code "Complete Storage.sol contract"
20212001

20222002
```solidity title="Storage.sol"
2023-
// SPDX-License-Identifier: MIT
2024-
pragma solidity ^0.8.28;
2025-
2026-
contract Storage {
2027-
// State variable to store our number
2028-
uint256 private number;
2029-
2030-
// Event to notify when the number changes
2031-
event NumberChanged(uint256 newNumber);
2032-
2033-
// Function to store a new number
2034-
function store(uint256 newNumber) public {
2035-
number = newNumber;
2036-
emit NumberChanged(newNumber);
2037-
}
2038-
2039-
// Function to retrieve the stored number
2040-
function retrieve() public view returns (uint256) {
2041-
return number;
2042-
}
2043-
}
2003+
20442004
```
20452005

20462006
## Understanding the Code
@@ -9914,32 +9874,7 @@ The `xcm-emulator` provides macros for defining a mocked testing environment. Ch
99149874
- **[`decl_test_parachains`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2506-2/cumulus/xcm/xcm-emulator/src/lib.rs#L596){target=\_blank}**: Defines runtime and configuration for parachains. Example:
99159875

99169876
```rust
9917-
decl_test_parachains! {
9918-
pub struct AssetHubWestend {
9919-
genesis = genesis::genesis(),
9920-
on_init = {
9921-
asset_hub_westend_runtime::AuraExt::on_initialize(1);
9922-
},
9923-
runtime = asset_hub_westend_runtime,
9924-
core = {
9925-
XcmpMessageHandler: asset_hub_westend_runtime::XcmpQueue,
9926-
LocationToAccountId: asset_hub_westend_runtime::xcm_config::LocationToAccountId,
9927-
ParachainInfo: asset_hub_westend_runtime::ParachainInfo,
9928-
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
9929-
DigestProvider: (),
9930-
},
9931-
pallets = {
9932-
PolkadotXcm: asset_hub_westend_runtime::PolkadotXcm,
9933-
Balances: asset_hub_westend_runtime::Balances,
9934-
Assets: asset_hub_westend_runtime::Assets,
9935-
ForeignAssets: asset_hub_westend_runtime::ForeignAssets,
9936-
PoolAssets: asset_hub_westend_runtime::PoolAssets,
9937-
AssetConversion: asset_hub_westend_runtime::AssetConversion,
9938-
SnowbridgeSystemFrontend: asset_hub_westend_runtime::SnowbridgeSystemFrontend,
9939-
Revive: asset_hub_westend_runtime::Revive,
9940-
}
9941-
},
9942-
}
9877+
99439878
```
99449879

99459880
- **[`decl_test_bridges`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2506-2/cumulus/xcm/xcm-emulator/src/lib.rs#L1221){target=\_blank}**: Creates bridges between chains, specifying the source, target, and message handler. Example:

.ai/categories/infrastructure.md

Lines changed: 5 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ First, you'll update the runtime's `Cargo.toml` file to include the Utility pall
141141
1. Open the `runtime/Cargo.toml` file and locate the `[dependencies]` section. Add pallet-utility as one of the features for the `polkadot-sdk` dependency with the following line:
142142

143143
```toml hl_lines="4" title="runtime/Cargo.toml"
144-
[dependencies]
144+
145145
...
146146
polkadot-sdk = { workspace = true, features = [
147147
"pallet-utility",
@@ -152,7 +152,7 @@ First, you'll update the runtime's `Cargo.toml` file to include the Utility pall
152152
2. In the same `[dependencies]` section, add the custom pallet that you built from scratch with the following line:
153153

154154
```toml hl_lines="3" title="Cargo.toml"
155-
[dependencies]
155+
156156
...
157157
custom-pallet = { path = "../pallets/custom-pallet", default-features = false }
158158
```
@@ -1635,53 +1635,13 @@ To build the smart contract, follow the steps below:
16351635
6. Add the getter and setter functions:
16361636

16371637
```solidity
1638-
// SPDX-License-Identifier: MIT
1639-
pragma solidity ^0.8.28;
1640-
1641-
contract Storage {
1642-
// State variable to store our number
1643-
uint256 private number;
1644-
1645-
// Event to notify when the number changes
1646-
event NumberChanged(uint256 newNumber);
1647-
1648-
// Function to store a new number
1649-
function store(uint256 newNumber) public {
1650-
number = newNumber;
1651-
emit NumberChanged(newNumber);
1652-
}
1653-
1654-
// Function to retrieve the stored number
1655-
function retrieve() public view returns (uint256) {
1656-
return number;
1657-
}
1658-
}
1638+
16591639
```
16601640

16611641
??? code "Complete Storage.sol contract"
16621642

16631643
```solidity title="Storage.sol"
1664-
// SPDX-License-Identifier: MIT
1665-
pragma solidity ^0.8.28;
1666-
1667-
contract Storage {
1668-
// State variable to store our number
1669-
uint256 private number;
1670-
1671-
// Event to notify when the number changes
1672-
event NumberChanged(uint256 newNumber);
1673-
1674-
// Function to store a new number
1675-
function store(uint256 newNumber) public {
1676-
number = newNumber;
1677-
emit NumberChanged(newNumber);
1678-
}
1679-
1680-
// Function to retrieve the stored number
1681-
function retrieve() public view returns (uint256) {
1682-
return number;
1683-
}
1684-
}
1644+
16851645
```
16861646

16871647
## Understanding the Code
@@ -10000,32 +9960,7 @@ The `xcm-emulator` provides macros for defining a mocked testing environment. Ch
100009960
- **[`decl_test_parachains`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2506-2/cumulus/xcm/xcm-emulator/src/lib.rs#L596){target=\_blank}**: Defines runtime and configuration for parachains. Example:
100019961

100029962
```rust
10003-
decl_test_parachains! {
10004-
pub struct AssetHubWestend {
10005-
genesis = genesis::genesis(),
10006-
on_init = {
10007-
asset_hub_westend_runtime::AuraExt::on_initialize(1);
10008-
},
10009-
runtime = asset_hub_westend_runtime,
10010-
core = {
10011-
XcmpMessageHandler: asset_hub_westend_runtime::XcmpQueue,
10012-
LocationToAccountId: asset_hub_westend_runtime::xcm_config::LocationToAccountId,
10013-
ParachainInfo: asset_hub_westend_runtime::ParachainInfo,
10014-
MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin,
10015-
DigestProvider: (),
10016-
},
10017-
pallets = {
10018-
PolkadotXcm: asset_hub_westend_runtime::PolkadotXcm,
10019-
Balances: asset_hub_westend_runtime::Balances,
10020-
Assets: asset_hub_westend_runtime::Assets,
10021-
ForeignAssets: asset_hub_westend_runtime::ForeignAssets,
10022-
PoolAssets: asset_hub_westend_runtime::PoolAssets,
10023-
AssetConversion: asset_hub_westend_runtime::AssetConversion,
10024-
SnowbridgeSystemFrontend: asset_hub_westend_runtime::SnowbridgeSystemFrontend,
10025-
Revive: asset_hub_westend_runtime::Revive,
10026-
}
10027-
},
10028-
}
9963+
100299964
```
100309965

100319966
- **[`decl_test_bridges`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2506-2/cumulus/xcm/xcm-emulator/src/lib.rs#L1221){target=\_blank}**: Creates bridges between chains, specifying the source, target, and message handler. Example:

0 commit comments

Comments
 (0)