Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subxt documentation #546

Merged
merged 62 commits into from
Jun 14, 2022
Merged

Add subxt documentation #546

merged 62 commits into from
Jun 14, 2022

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented May 19, 2022

This PR adds subxt documentation with in-line examples.

While at it, simplify the number of params of codegen functions.

Closes #542.

lexnv added 21 commits May 12, 2022 19:16
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
LIB_DOC.md Outdated Show resolved Hide resolved
LIB_DOC.md Outdated Show resolved Hide resolved
LIB_DOC.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
codegen/src/api/calls.rs Outdated Show resolved Hide resolved
codegen/src/api/constants.rs Outdated Show resolved Hide resolved
codegen/src/api/calls.rs Outdated Show resolved Hide resolved
codegen/src/api/constants.rs Outdated Show resolved Hide resolved
lexnv and others added 6 commits June 14, 2022 11:41
Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
Co-authored-by: Tarik Gul <47201679+TarikGul@users.noreply.github.com>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
docs/subxt.md Outdated Show resolved Hide resolved
macro/src/lib.rs Show resolved Hide resolved
subxt/src/extrinsic/mod.rs Outdated Show resolved Hide resolved
Comment on lines 32 to 43
//! For this implementation:
//! - "signed extra" contains:
//! - sp_runtime::Era: This is utilized to determine the longevity of a transaction.
//! - nonce: Account index (aka nonce) that stores the number of previous transactions
//! associated with a sender account. This is utilized to avoid replay attacks.
//! - tip: A tip payment for including the transaction in the block.
//! - "additional" contains:
//! - spec_version: The version of the runtime specification of the node.
//! - transaction_version: The version of the extrinsic interface. This allows hardware
//! wallets to know which transactions can be safely signed.
//! - genesis_hash: The hash of the Genesis block.
//! - mortality_checkpoint: The block hash after which the transaction becomes valid.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to keep this, but aware that it can easily fall out of sync with reality if these things change :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, we could remove this for now. It's hard to notice when those things change, even so, remember to update the comment. We could add it back later when things are stable enough.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me; I think what you wrote above was sufficient anyway :)

subxt/src/rpc.rs Outdated Show resolved Hide resolved
subxt/src/updates.rs Outdated Show resolved Hide resolved
lexnv and others added 9 commits June 14, 2022 13:22
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: James Wilson <james@jsdw.me>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv merged commit e3732e3 into master Jun 14, 2022
@lexnv lexnv deleted the 542_add_documentation branch June 14, 2022 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Have a pass over the subxt crate to add documentation and inline example usage.
3 participants