Skip to content

Commit 91d07cc

Browse files
committed
python3 scripts/generate_llms.py
1 parent 6beae32 commit 91d07cc

File tree

1 file changed

+21
-24
lines changed

1 file changed

+21
-24
lines changed

llms.txt

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14077,57 +14077,54 @@ description: Understand how to construct, sign, and broadcast transactions in th
1407714077

1407814078
## Introduction
1407914079

14080-
This page will discuss the transaction format in Polkadot and how to create, sign, and broadcast
14081-
transactions. Like the other pages in this guide, this page demonstrates some of the available
14082-
tools.
14080+
This page will discuss the transaction format in Polkadot and how to create, sign, and broadcast transactions. Like the other pages in this guide, this page demonstrates some of the available tools.
1408314081

1408414082
**Always refer to each tool's documentation when integrating.**
1408514083

14086-
!!!note "Complementary Reading"
14087-
Learn about the basics of [blocks, transactions, and fees](/polkadot-protocol/parachain-basics/blocks-transactions-fees/).
14084+
For further reading, refer to [blocks, transactions, and fees](/polkadot-protocol/parachain-basics/blocks-transactions-fees/){target=\_blank} to learn more about the basics.
1408814085

1408914086
## Transaction Format
1409014087

1409114088
Polkadot has some basic transaction information that is common to all transactions.
1409214089

14093-
- Address: The SS58-encoded address of the sending account.
14094-
- Block Hash: The hash of the [checkpoint](/polkadot-protocol/parachain-basics/blocks-transactions-fees/transactions/#transaction-mortality) block.
14090+
- Address: The [SS58-encoded address](/polkadot-protocol/glossary/#ss58-address-format){target=\_blank} of the sending account.
14091+
- Block Hash: The hash of the [checkpoint](/polkadot-protocol/parachain-basics/blocks-transactions-fees/transactions/#transaction-mortality){target=\_blank} block.
1409514092
- Block Number: The number of the checkpoint block.
1409614093
- Genesis Hash: The genesis hash of the chain.
1409714094
- Metadata: The SCALE-encoded metadata for the runtime when submitted.
14098-
- Nonce: The nonce for this transaction.\*
14095+
- Nonce: The nonce for this transaction.
1409914096
- Spec Version: The current spec version for the runtime.
1410014097
- Transaction Version: The current version for transaction format.
14101-
- Tip: Optional, the [tip](https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/fees/#how-fees-are-calculated) to increase transaction priority.
14098+
- Tip: Optional, the [tip](https://docs.polkadot.com/polkadot-protocol/parachain-basics/blocks-transactions-fees/fees/#how-fees-are-calculated){target=\_blank} to increase transaction priority.
1410214099
- Mode: The flag indicating whether to verify the metadata hash or not.
1410314100
- Era Period: Optional, the number of blocks after the checkpoint for which a transaction is valid.
14104-
If zero, the transaction is [immortal](/polkadot-protocol/parachain-basics/blocks-transactions-fees/transactions/#transaction-mortality)
14101+
If zero, the transaction is [immortal](/polkadot-protocol/parachain-basics/blocks-transactions-fees/transactions/#transaction-mortality){target=\_blank}
1410514102
- MetadataHash: Optional, the metadata hash which should match the RUNTIME_METADATA_HASH environment
1410614103
variable.
1410714104

1410814105
!!!warning
14109-
There are risks to making a transaction immortal. If an account is reaped and a user re-funds the
14106+
There are risks to making a transaction immortal. If an account is reaped and a user re-funds the
1411014107
account, then they could replay an immortal transaction. Always default to using a mortal extrinsic.
14111-
14112-
The nonce queried from the System module does not account for pending transactions. You must track
14108+
14109+
The nonce queried from the System module does not account for pending transactions. You must track
1411314110
and increment the nonce manually if you want to submit multiple valid transactions at the same time.
1411414111

14115-
Each transaction will have its own (or no) parameters to add. For example, the `transferKeepAlive`
14112+
Each transaction will have its own (or no) parameters to add. For example, the [`transferKeepAlive`](https://paritytech.github.io/polkadot-sdk/master/pallet_balances/pallet/enum.Call.html#variant.transfer_keep_alive){target=\_blank}
1411614113
function from the Balances pallet will take:
1411714114

1411814115
- `dest`: Destination address
1411914116
- `#[compact] value`: Number of tokens (compact encoding)
1412014117

14121-
Refer to [the protocol specifications](https://spec.polkadot.network/id-extrinsics), for the
14118+
Refer to [the protocol specifications](https://spec.polkadot.network/id-extrinsics){target=\_blank}, for the
1412214119
concrete specifications and types to build a transaction.
1412314120

1412414121
**Mode and MetadataHash**
1412514122

1412614123
The mode and metadataHash fields were introduced in transaction construction to support the optional
14127-
[`CheckMetadataHash` Signed Extension](https://github.com/polkadot-fellows/RFCs/blob/main/text/0078-merkleized-metadata.md).
14124+
[`CheckMetadataHash` Signed Extension](https://github.com/polkadot-fellows/RFCs/blob/main/text/0078-merkleized-metadata.md){target=\_blank}.
1412814125
This enables trustless metadata verification by allowing the chain to verify the correctness of the
1412914126
metadata used without the need of a trusted party. This functionality was included in
14130-
[v1.2.5](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.5) runtime release by the
14127+
[v1.2.5](https://github.com/polkadot-fellows/runtimes/releases/tag/v1.2.5){target=\_blank} runtime release by the
1413114128
Fellowship. A user may opt out of this functionality by setting the mode to `0`. When the mode is 00,
1413214129
the `metadataHash` field is empty/None.
1413314130

@@ -14138,7 +14135,7 @@ SCALE-encoded bytes. The relay chain runtimes are upgradable and therefore any i
1413814135
subject to change, the metadata allows developers to structure any extrinsics or storage entries
1413914136
accordingly. The metadata provides you with all of the information required to know how to construct
1414014137
the serialized call data specific to your transaction. You can read more about the metadata, its
14141-
format and how to get it in the [Subxt documentation](/polkadot-protocol/parachain-basics/chain-data/#use-subxt).
14138+
format and how to get it in the [Subxt documentation](/polkadot-protocol/parachain-basics/chain-data/#use-subxt){target=\_blank}.
1414214139

1414314140
**Transaction Flow**
1414414141

@@ -14154,7 +14151,7 @@ Parity provides the following tools to help perform these steps.
1415414151

1415514152
## Polkadot-JS Tools
1415614153

14157-
[Polkadot-JS Tools](https://github.com/polkadot-js/tools) contains a set of command line tools for
14154+
[Polkadot-JS Tools](https://github.com/polkadot-js/tools){target=\_blank} contains a set of command line tools for
1415814155
interacting with a Substrate client, including one called "Signer CLI" to create, sign, and
1415914156
broadcast transactions.
1416014157

@@ -14193,10 +14190,10 @@ signature field, and send the transaction (or just return the serialized transac
1419314190
## TxWrapper
1419414191

1419514192
If you do not want to use the CLI for signing operations, Parity provides an SDK called
14196-
[TxWrapper Core](https://github.com/paritytech/txwrapper-core) to generate and sign transactions
14193+
[TxWrapper Core](https://github.com/paritytech/txwrapper-core){target=\_blank} to generate and sign transactions
1419714194
offline. For Polkadot, Kusama, and select parachains, use the `txwrapper-polkadot` package. Other
1419814195
Substrate-based chains will have their own `txwrapper-{chain}` implementations. See the
14199-
[examples](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/README.md)
14196+
[examples](https://github.com/paritytech/txwrapper-core/blob/main/packages/txwrapper-examples/README.md){target=\_blank}
1420014197
for a guide.
1420114198

1420214199
**Import a private key**
@@ -14297,15 +14294,15 @@ const txHash = getTxHash(signedTx);
1429714294
There are several ways to submit a signed payload:
1429814295

1429914296
1. Signer CLI (`yarn run:signer submit --tx <signed-transaction> --ws <endpoint>`)
14300-
1. [Substrate API Sidecar](https://docs.polkadot.com/develop/toolkit/api-libraries/sidecar/#sidecar-api)
14301-
1. [RPC](https://docs.polkadot.com/develop/toolkit/api-libraries/) with `author_submitExtrinsic` or
14297+
1. [Substrate API Sidecar](https://docs.polkadot.com/develop/toolkit/api-libraries/sidecar/#sidecar-api){target=\_blank}
14298+
1. [RPC](https://docs.polkadot.com/develop/toolkit/api-libraries/){target=\_blank} with `author_submitExtrinsic` or
1430214299
`author_submitAndWatchExtrinsic`, the latter of which will subscribe you to events to be notified
1430314300
as a transaction gets validated and included in the chain.
1430414301

1430514302
## Example Addresses
1430614303

1430714304
Some addresses to use in the examples. See
14308-
[Subkey documentation](https://docs.polkadot.com/polkadot-protocol/basics/accounts/#using-subkey).
14305+
[Subkey documentation](https://docs.polkadot.com/polkadot-protocol/basics/accounts/#using-subkey){target=\_blank}.
1430914306

1431014307
```bash
1431114308
$ subkey --network polkadot generate

0 commit comments

Comments
 (0)