Skip to content

Commit 110add0

Browse files
committed
llms
1 parent ce5ad7a commit 110add0

File tree

3 files changed

+57
-9
lines changed

3 files changed

+57
-9
lines changed

.ai/categories/smart-contracts.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8410,8 +8410,8 @@ python compile.py
84108410
84118411
After executing the script, the Solidity contract is compiled into standard EVM bytecode. The ABI and bytecode are saved into files with `.json` and `.bin` extensions, respectively:
84128412
8413-
- **ABI file** (`abis/Storage.json`): Provides a JSON interface describing the contract's functions and how to interact with it.
8414-
- **Bytecode file** (`artifacts/Storage.bin`): Contains the low-level machine code executable on EVM that represents the compiled smart contract ready for blockchain deployment.
8413+
- **ABI file (`abis/Storage.json`)**: Provides a JSON interface describing the contract's functions and how to interact with it.
8414+
- **Bytecode file (`artifacts/Storage.bin`)**: Contains the low-level machine code executable on EVM that represents the compiled smart contract ready for blockchain deployment.
84158415
84168416
You can now proceed with deploying the contract to Polkadot Hub, as outlined in the next section.
84178417
@@ -8546,9 +8546,17 @@ if __name__ == "__main__":
85468546
!!!warning
85478547
Never commit or share your private key. Exposed keys can lead to immediate theft of all associated funds.
85488548
8549+
To run the script, execute the following command:
8550+
8551+
```bash
8552+
python deploy.py
8553+
```
8554+
8555+
After running this script, your contract will be deployed to Polkadot Hub, and its address will be printed in your terminal. You can use this address for future contract interactions.
8556+
85498557
## Interact with the Contract
85508558
8551-
After deployment, interact with your contract using Web3.py methods. The example below demonstrates how to set and retrieve a number. Be sure to replace the `INSERT_RPC_URL`, `INSERT_PRIVATE_KEY`, and `INSERT_CONTRACT_ADDRESS` placeholders with your specific values:
8559+
After deployment, interact with your contract using Web3.py methods. The example below demonstrates how to set and retrieve a number.
85528560
85538561
```python title="update_storage.py"
85548562
from web3 import Web3
@@ -8627,6 +8635,14 @@ if __name__ == "__main__":
86278635
86288636
```
86298637
8638+
Be sure to replace the `INSERT_RPC_URL`, `INSERT_PRIVATE_KEY`, and `INSERT_CONTRACT_ADDRESS` placeholders with your specific values.
8639+
8640+
To interact with the contract, run:
8641+
8642+
```bash
8643+
python update_storage.py
8644+
```
8645+
86308646
## Where to Go Next
86318647
86328648
<div class="grid cards" markdown>

.ai/categories/tooling.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8619,8 +8619,8 @@ python compile.py
86198619

86208620
After executing the script, the Solidity contract is compiled into standard EVM bytecode. The ABI and bytecode are saved into files with `.json` and `.bin` extensions, respectively:
86218621

8622-
- **ABI file** (`abis/Storage.json`): Provides a JSON interface describing the contract's functions and how to interact with it.
8623-
- **Bytecode file** (`artifacts/Storage.bin`): Contains the low-level machine code executable on EVM that represents the compiled smart contract ready for blockchain deployment.
8622+
- **ABI file (`abis/Storage.json`)**: Provides a JSON interface describing the contract's functions and how to interact with it.
8623+
- **Bytecode file (`artifacts/Storage.bin`)**: Contains the low-level machine code executable on EVM that represents the compiled smart contract ready for blockchain deployment.
86248624

86258625
You can now proceed with deploying the contract to Polkadot Hub, as outlined in the next section.
86268626

@@ -8755,9 +8755,17 @@ if __name__ == "__main__":
87558755
!!!warning
87568756
Never commit or share your private key. Exposed keys can lead to immediate theft of all associated funds.
87578757

8758+
To run the script, execute the following command:
8759+
8760+
```bash
8761+
python deploy.py
8762+
```
8763+
8764+
After running this script, your contract will be deployed to Polkadot Hub, and its address will be printed in your terminal. You can use this address for future contract interactions.
8765+
87588766
## Interact with the Contract
87598767

8760-
After deployment, interact with your contract using Web3.py methods. The example below demonstrates how to set and retrieve a number. Be sure to replace the `INSERT_RPC_URL`, `INSERT_PRIVATE_KEY`, and `INSERT_CONTRACT_ADDRESS` placeholders with your specific values:
8768+
After deployment, interact with your contract using Web3.py methods. The example below demonstrates how to set and retrieve a number.
87618769

87628770
```python title="update_storage.py"
87638771
from web3 import Web3
@@ -8836,6 +8844,14 @@ if __name__ == "__main__":
88368844

88378845
```
88388846

8847+
Be sure to replace the `INSERT_RPC_URL`, `INSERT_PRIVATE_KEY`, and `INSERT_CONTRACT_ADDRESS` placeholders with your specific values.
8848+
8849+
To interact with the contract, run:
8850+
8851+
```bash
8852+
python update_storage.py
8853+
```
8854+
88398855
## Where to Go Next
88408856

88418857
<div class="grid cards" markdown>

.ai/pages/smart-contracts-libraries-web3-py.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ python compile.py
176176
177177
After executing the script, the Solidity contract is compiled into standard EVM bytecode. The ABI and bytecode are saved into files with `.json` and `.bin` extensions, respectively:
178178
179-
- **ABI file** (`abis/Storage.json`): Provides a JSON interface describing the contract's functions and how to interact with it.
180-
- **Bytecode file** (`artifacts/Storage.bin`): Contains the low-level machine code executable on EVM that represents the compiled smart contract ready for blockchain deployment.
179+
- **ABI file (`abis/Storage.json`)**: Provides a JSON interface describing the contract's functions and how to interact with it.
180+
- **Bytecode file (`artifacts/Storage.bin`)**: Contains the low-level machine code executable on EVM that represents the compiled smart contract ready for blockchain deployment.
181181
182182
You can now proceed with deploying the contract to Polkadot Hub, as outlined in the next section.
183183
@@ -312,9 +312,17 @@ if __name__ == "__main__":
312312
!!!warning
313313
Never commit or share your private key. Exposed keys can lead to immediate theft of all associated funds.
314314
315+
To run the script, execute the following command:
316+
317+
```bash
318+
python deploy.py
319+
```
320+
321+
After running this script, your contract will be deployed to Polkadot Hub, and its address will be printed in your terminal. You can use this address for future contract interactions.
322+
315323
## Interact with the Contract
316324
317-
After deployment, interact with your contract using Web3.py methods. The example below demonstrates how to set and retrieve a number. Be sure to replace the `INSERT_RPC_URL`, `INSERT_PRIVATE_KEY`, and `INSERT_CONTRACT_ADDRESS` placeholders with your specific values:
325+
After deployment, interact with your contract using Web3.py methods. The example below demonstrates how to set and retrieve a number.
318326
319327
```python title="update_storage.py"
320328
from web3 import Web3
@@ -393,6 +401,14 @@ if __name__ == "__main__":
393401
394402
```
395403
404+
Be sure to replace the `INSERT_RPC_URL`, `INSERT_PRIVATE_KEY`, and `INSERT_CONTRACT_ADDRESS` placeholders with your specific values.
405+
406+
To interact with the contract, run:
407+
408+
```bash
409+
python update_storage.py
410+
```
411+
396412
## Where to Go Next
397413
398414
<div class="grid cards" markdown>

0 commit comments

Comments
 (0)