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

Generate runtime API from metadata #294

Merged
merged 219 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
219 commits
Select commit Hold shift + click to select a range
f43df0e
Remove test macro
ascjones Aug 26, 2021
01b7131
Remove client crate
ascjones Aug 26, 2021
ff6b9fc
Create tests crate and move pallet specific tests there
ascjones Aug 26, 2021
d7c1d22
Extract client, remove metadata and extra, more demolition
ascjones Aug 26, 2021
b755c29
Update substrate dependencies to git dependencies
ascjones Aug 26, 2021
05fe051
Remove Store stuff for now
ascjones Aug 26, 2021
5e91406
Comment out some Call usages
ascjones Aug 26, 2021
59aa4d7
Add back Runtime trait coped from original System trait
ascjones Aug 26, 2021
e337d34
Make subxt lib compile
ascjones Aug 27, 2021
8540533
Delete old proc macros and copy over type generation from chameleon
ascjones Aug 27, 2021
e917dac
WIP make transfer balance test pass
ascjones Sep 3, 2021
2ef017d
Change to subxt attribute macro
ascjones Sep 3, 2021
f3005cb
WIP provide user defined type substitutes
ascjones Sep 3, 2021
e4f1374
User defined type substitutes compile
ascjones Sep 6, 2021
b98b7aa
WIP submitting transactions
ascjones Sep 6, 2021
e20f123
WIP transfer balance test
ascjones Sep 6, 2021
2cf09c1
Fix macro
ascjones Sep 6, 2021
56cb2a6
Cargo fmt
ascjones Sep 6, 2021
c35d781
WIP generating storage hashers
ascjones Sep 7, 2021
4726db3
WIP add AccountData trait for fetching the nonce
ascjones Sep 7, 2021
f8f8b47
Support single type storage map keys
ascjones Sep 7, 2021
4b573f5
WIP impl AccountInfo retrieval
ascjones Sep 7, 2021
a6e7225
Fix up storage struct generation
ascjones Sep 8, 2021
d2bd669
Implement AccountData triait directly on storage entry
ascjones Sep 8, 2021
11248d0
Borrow storage map key and convert account id
ascjones Sep 8, 2021
b9ad905
Implement storage fetch client methods
ascjones Sep 8, 2021
f98d95a
Remove legacy metadata storage key construction
ascjones Sep 8, 2021
a8ca64a
Rename CheckEra to CheckMortality
ascjones Sep 8, 2021
9eac486
Substitute perthings types for compact impls
ascjones Sep 8, 2021
a5281fc
Fmt
ascjones Sep 9, 2021
bbb4530
Downgrade dyn-clone for cargo-contract compat
ascjones Sep 9, 2021
2d7bed8
Scale-fo 1.0
ascjones Sep 9, 2021
8ab7976
scale-info 1.0
ascjones Sep 9, 2021
6ac3f42
Remove special range handling
ascjones Sep 9, 2021
c935dc1
Restore wildcard type params
ascjones Sep 9, 2021
13f69a3
Frame metadata 14.0
ascjones Sep 9, 2021
af7c4ce
WIP decoding events
ascjones Sep 9, 2021
4e47acd
WIP more dynamically decoding events
ascjones Sep 10, 2021
7e2ed94
Fmt
ascjones Sep 10, 2021
a2bb550
Decode events, handle errors
ascjones Sep 10, 2021
0b233e0
Uncomment some tests
ascjones Sep 13, 2021
09c5888
Remove unused get_mod function
ascjones Sep 13, 2021
93c121d
Fix some warnings
ascjones Sep 13, 2021
a503911
Fix some more warnings
ascjones Sep 13, 2021
b362dfd
Fix some more warnings
ascjones Sep 13, 2021
8357031
Add tests mod
ascjones Sep 13, 2021
e5333f1
Rename node-runtime tests mod to frame
ascjones Sep 13, 2021
5405fb7
Fix some warnings
ascjones Sep 13, 2021
1034b68
Fmt
ascjones Sep 13, 2021
8556bc0
WIP generate storage client with getters
ascjones Sep 13, 2021
ed0d1bc
Storage client compiling
ascjones Sep 13, 2021
327a215
Generate storage client api
ascjones Sep 14, 2021
e70534e
Fix up system account query account ids
ascjones Sep 14, 2021
d75d1f0
WIP generating tx api fns
ascjones Sep 14, 2021
634f21f
Only generate tx api fields when calls available
ascjones Sep 14, 2021
cedf27e
Fix tx api call fns
ascjones Sep 15, 2021
690e079
Fmt
ascjones Sep 15, 2021
b82d4e8
WIP generate event structs
ascjones Sep 16, 2021
8342c31
call functions not async
ascjones Sep 16, 2021
4cb16a3
Derive Eq for comparison on generated types
ascjones Sep 16, 2021
97308a9
Generate event structs
ascjones Sep 17, 2021
f8f2da6
Fix call name
ascjones Sep 17, 2021
4d0e392
Fmt
ascjones Sep 17, 2021
a264cf3
Update node runtime metadata to substrate c000780db
ascjones Sep 17, 2021
2eb657a
Download latest substrate release for integration testing
ascjones Sep 17, 2021
c89791f
Fix event decoding
ascjones Sep 17, 2021
537c633
Remove unused imports
ascjones Sep 17, 2021
73490a3
Fix plain storage access, total_issuance pass
ascjones Sep 17, 2021
4ab94d5
Fmt
ascjones Sep 17, 2021
9a6c98c
Restore contracts tests
ascjones Sep 17, 2021
599863e
Backoff connecting to substrate node
ascjones Sep 17, 2021
b99685a
Add required TypeInfo impls for local SignedExtension impls
ascjones Sep 17, 2021
f3ae886
Remove unnecessary assert formatting
ascjones Sep 20, 2021
a5c51af
Fix handling of DispatchError
ascjones Sep 20, 2021
92f8665
Refactor contracts tests
ascjones Sep 20, 2021
7da7f56
Troubleshooting contract not found
ascjones Sep 20, 2021
01558f5
Remove more client feature stuff
ascjones Sep 22, 2021
0203365
Fix dynamic event variant decoding, write consumed index to output
ascjones Sep 22, 2021
184c096
Fmt
ascjones Sep 22, 2021
e778231
Use substrate branch with heavy dependency removed
ascjones Sep 24, 2021
ba71cc0
Remove sp-rcp dependency, define types locally
ascjones Sep 24, 2021
cadb26f
Ignore cargo timeing files
ascjones Sep 24, 2021
2766b40
Use my branch for substrate test deps
ascjones Sep 24, 2021
1b04411
Fix storage key type gen
ascjones Sep 24, 2021
af1ec84
Comment out fetching contract info
ascjones Sep 27, 2021
bbad328
Merge branch 'master' into aj-metadata-vnext
ascjones Sep 27, 2021
c8ebd1c
Add key iteration, extract storage client from main client
ascjones Sep 27, 2021
0cf8ec7
Debugging key generation
ascjones Sep 27, 2021
d68e7dd
Use substrate master branch
ascjones Sep 27, 2021
a6f8eb4
Fix call test
ascjones Sep 27, 2021
20aee21
Remove TypeSegmenter and dynclone dependency
ascjones Sep 29, 2021
3de2815
Publicly expose Rpc mod
ascjones Sep 29, 2021
c5ef0fa
Unused import warnings
ascjones Sep 29, 2021
b2f0ddf
Add getter for runtime metadata
ascjones Sep 29, 2021
e8256e0
Add pallet and event indices for raw events
ascjones Sep 29, 2021
d0dda23
Add is_call and is_event convenience trait functions
ascjones Oct 1, 2021
6198ac2
Add missing docs
ascjones Oct 4, 2021
cbbf0e1
Refactor tests crate
ascjones Oct 4, 2021
76d7b11
Restore remaining client tests
ascjones Oct 4, 2021
c86a9ce
Fmt
ascjones Oct 4, 2021
d439722
Fix warnings
ascjones Oct 4, 2021
997d6b7
Restore get_mod as test helper and fmt
ascjones Oct 4, 2021
44ec197
Use client references for api calls
ascjones Oct 4, 2021
950845f
Fix api usages with methods
ascjones Oct 4, 2021
3cb4000
Use Bytes for RawEvent debug
ascjones Oct 4, 2021
602f62b
Update metadata
ascjones Oct 5, 2021
4d1de1b
Restoring some Balances tests
ascjones Oct 5, 2021
384f88e
Populate runtime storage metadata
ascjones Oct 5, 2021
b340bc2
Restore balances lock test
ascjones Oct 5, 2021
f1b7b85
Restore Balances error test
ascjones Oct 5, 2021
ec90ecc
Fmt
ascjones Oct 5, 2021
e4907d4
Restore transfer subscription API
ascjones Oct 5, 2021
bab2aef
Staking test
ascjones Oct 5, 2021
696ee63
Restore another staking test
ascjones Oct 5, 2021
560ceb5
Restore another staking test
ascjones Oct 5, 2021
c5915b9
Restore another staking test
ascjones Oct 5, 2021
5e9b7d2
Partially restore chill_works_for_controller_only staking test
ascjones Oct 5, 2021
34e1da5
Fix fetching Optional storage entries
ascjones Oct 6, 2021
442fe24
Restore staking bond test
ascjones Oct 6, 2021
35a3141
Restore remaining staking tests
ascjones Oct 6, 2021
83af04e
Fmt
ascjones Oct 6, 2021
b95ce3d
Restore sudo tests
ascjones Oct 6, 2021
79355d3
Add some system tests
ascjones Oct 6, 2021
5e7b7e7
Fmt
ascjones Oct 6, 2021
368ec3b
Resolve some todos
ascjones Oct 6, 2021
f819cb6
Remove pass through rpc methods on Client, expose via rpc() getter
ascjones Oct 6, 2021
903b153
Remove more rpc pass through methods
ascjones Oct 6, 2021
d984dd5
Remove submit tx pass through rpc methods
ascjones Oct 6, 2021
a9d1e8f
Add some comments to SubmittableExtrinsic methods
ascjones Oct 7, 2021
ccb1491
Construct the runtime api from the client
ascjones Oct 7, 2021
ffc1a3c
Fmt
ascjones Oct 7, 2021
f46c944
Use From trait instead of new for AccountData query
ascjones Oct 8, 2021
f834035
Rename subxt_proc_macro crate to subxt_macro
ascjones Oct 12, 2021
fc80bb0
Fix AccountData From impl
ascjones Oct 12, 2021
72dc1f9
Extract codegen crate from macro crate
ascjones Oct 12, 2021
6563914
Fmt
ascjones Oct 12, 2021
c66ac9f
Replace chameleon hidden field name
ascjones Oct 12, 2021
7594bc5
Extract StructDef for generating structs
ascjones Oct 12, 2021
d0b0bb1
More refactoring of StructDef, moving towards sharing with typegen
ascjones Oct 12, 2021
2c2dd9f
Replace explicit tests crate with single implicit integration tests c…
ascjones Oct 12, 2021
7d9884d
Rename from substrate-subxt to subxt
ascjones Oct 13, 2021
cc0212d
Fix runtime path relative to root Cargo.toml
ascjones Oct 13, 2021
ea4666f
Move RpcClient creation to RpcClient
ascjones Oct 13, 2021
851f612
WIP get examples to compile
ascjones Oct 13, 2021
69e6ed6
Rename Runtime to Config trait
ascjones Oct 13, 2021
a30f9f8
WIP implementing default Config
ascjones Oct 14, 2021
d5bec8c
WIP implementing default extrinsic extras
ascjones Oct 15, 2021
567ce0e
fix metadata constants (#299)
paulormart Oct 15, 2021
a672dc4
Move DefaultConfig definition and impl to macro
ascjones Oct 15, 2021
518c028
Extract type substitute parsing to ir mod
ascjones Oct 15, 2021
699ce18
Extract calls, events and storage from api generation
ascjones Oct 18, 2021
021c186
Add some hardcoded type substitute defaults
ascjones Oct 18, 2021
99a83c7
Fmt
ascjones Oct 18, 2021
27c5b92
Add utility pallet tests (#300)
paulormart Oct 18, 2021
4df1313
Add polkadot runtime metadata for example
ascjones Oct 18, 2021
da5bb8d
Merge branch 'aj-metadata-vnext' of github.com:paritytech/substrate-s…
ascjones Oct 18, 2021
c2e7ab7
Fix system errors and fmt
ascjones Oct 18, 2021
8108f00
Add subxt-cli crate
ascjones Oct 18, 2021
fd18fcd
Add metadata and codegen subcommands
ascjones Oct 19, 2021
643c8f8
Make subxt-cli codegen command work
ascjones Oct 19, 2021
77ae552
Fmt
ascjones Oct 19, 2021
a0447ff
Add polkadot codegen test
ascjones Oct 19, 2021
562b593
Comment about how to run codegen
ascjones Oct 19, 2021
398c63c
Derive AsCompact for structs with single concrete unsigned int field
ascjones Oct 21, 2021
192fa39
Fix bitvec codegen, adds as non optional dependency
ascjones Oct 21, 2021
adf8ebd
Regenerate polkadot api with bitvec fix
ascjones Oct 21, 2021
e430d1b
Edition 2021
ascjones Oct 21, 2021
90312bd
Fix polkadot codegen with bitvec
ascjones Oct 22, 2021
b2d04bb
Polkadot balance transfer is working
ascjones Oct 22, 2021
d1566e8
Fix fetch remote
ascjones Oct 22, 2021
927aa00
Fix transfer_subscribe example
ascjones Oct 22, 2021
b26cd2f
Fix submit_and_watch example
ascjones Oct 22, 2021
091b255
Fmt
ascjones Oct 22, 2021
cdb881e
Generate storage iter method for iterating over keys
ascjones Oct 22, 2021
da71f69
Fmt
ascjones Oct 22, 2021
23be116
Fix existential deposit test
ascjones Oct 22, 2021
9d8c9a1
Fix staking tests
ascjones Oct 25, 2021
b500ac4
Add option for custom generated type derives
ascjones Oct 28, 2021
43f59e4
Add generated type derives for test runtime api
ascjones Oct 28, 2021
c19d2e6
Fmt
ascjones Oct 28, 2021
1fd0d5f
Copy WrapperTypeOpaque from substrate, add Encode/Decode
ascjones Oct 30, 2021
0c45452
Fmt
ascjones Oct 30, 2021
57f7a0b
Extract type generator to module, separate & fix tests
ascjones Oct 30, 2021
4b45985
Fully qualified primitive and prelude types
ascjones Oct 30, 2021
7caec49
Fix up remaining type gen tests
ascjones Oct 30, 2021
d4a4ce0
Skip formatting of generated polkadot example code
ascjones Oct 30, 2021
cc1fdab
Remove empty utility test file.
ascjones Oct 30, 2021
b570e39
Newline
ascjones Oct 30, 2021
9fd9540
Update cli/src/main.rs
ascjones Oct 30, 2021
4657b57
Rename subxt-cli executable to subxt
ascjones Oct 30, 2021
36d5e57
Update src/client.rs
ascjones Oct 30, 2021
d250904
Merge remote-tracking branch 'origin/aj-metadata-vnext' into aj-metad…
ascjones Oct 30, 2021
9818d0d
Add some code docs to TypeGenerator.
ascjones Oct 30, 2021
13915e2
Extract TypePath to own file
ascjones Oct 30, 2021
69ee2da
Extract type def generation to separate file
ascjones Oct 30, 2021
e8a8376
Renamed ModuleType to TypeDefGen
ascjones Oct 30, 2021
4f3de30
Fmt
ascjones Oct 30, 2021
1d1fffe
Factor out type parameter from final_key
ascjones Oct 31, 2021
b301a85
Fix some type paths
ascjones Oct 31, 2021
c1f6d53
Resolve some todos
ascjones Oct 31, 2021
a97fb2e
Resolve some panic todos in events
ascjones Oct 31, 2021
d58834b
Add EventsDecodingError
ascjones Oct 31, 2021
d0f5e69
Decode compact composite types with a single primitive field
ascjones Oct 31, 2021
9da0bcc
Decode compact composite types with a single primitive field
ascjones Oct 31, 2021
346504b
Update src/metadata.rs
ascjones Nov 2, 2021
2f36a89
Remove Perbill compact substitute types
ascjones Nov 3, 2021
6306b9f
Remove todos regarding maintaining Rust code items, promoted to follo…
ascjones Nov 3, 2021
5dd6cf9
Remove todo regarding overridding default config impl
ascjones Nov 3, 2021
fc30e90
Remove todo regarding overridding default Extra
ascjones Nov 3, 2021
63bb5ea
Remove todo regarding AccountData storage type defintion
ascjones Nov 3, 2021
84fe1a0
Remove todo regarding borrowing storage key arguments
ascjones Nov 3, 2021
6886f4c
Remove type substitution tests todo
ascjones Nov 3, 2021
63641b4
Remove `Box` field name type hack todo
ascjones Nov 3, 2021
ba2e3a8
Remove Compact todo
ascjones Nov 3, 2021
06a6ddf
Remove sudo todos
ascjones Nov 3, 2021
0d07b0c
Remove BitVec implementation todo
ascjones Nov 3, 2021
f0bb889
Fmt
ascjones Nov 3, 2021
2c93f3c
Add health warning to README
ascjones Nov 3, 2021
641ac27
Fix up health warning
ascjones Nov 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: download-substrate
run: |
curl "https://releases.parity.io/substrate/x86_64-debian:stretch/v3.0.0/substrate/substrate" --output substrate --location
curl "https://releases.parity.io/substrate/x86_64-debian:stretch/latest/substrate/substrate" --output substrate --location
chmod +x ./substrate
mkdir -p ~/.local/bin
mv substrate ~/.local/bin
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
Cargo.lock
cargo-timing*
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ trailing_comma = "Vertical"
match_block_trailing_comma = false
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
edition = "2018" # changed
edition = "2021" # changed
version = "One"
merge_derives = true
use_try_shorthand = true # changed
Expand Down
134 changes: 67 additions & 67 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,105 +9,105 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.15.0] - 2021-03-15

### Added
- implement variant of subscription that returns finalized storage changes - [#237](https://github.com/paritytech/substrate-subxt/pull/237)
- implement session handling for unsubscribe in subxt-client - [#242](https://github.com/paritytech/substrate-subxt/pull/242)
- implement variant of subscription that returns finalized storage changes - [#237](https://github.com/paritytech/subxt/pull/237)
- implement session handling for unsubscribe in subxt-client - [#242](https://github.com/paritytech/subxt/pull/242)

### Changed
- update jsonrpsee [#251](https://github.com/paritytech/substrate-subxt/pull/251)
- return none if subscription returns early [#250](https://github.com/paritytech/substrate-subxt/pull/250)
- export ModuleError and RuntimeError for downstream usage - [#246](https://github.com/paritytech/substrate-subxt/pull/246)
- rpc client methods should be public for downstream usage - [#240](https://github.com/paritytech/substrate-subxt/pull/240)
- re-export WasmExecutionMethod for downstream usage - [#239](https://github.com/paritytech/substrate-subxt/pull/239)
- integration with jsonrpsee v2 - [#214](https://github.com/paritytech/substrate-subxt/pull/214)
- expose wasm execution method on subxt client config - [#230](https://github.com/paritytech/substrate-subxt/pull/230)
- Add hooks to register event types for decoding - [#227](https://github.com/paritytech/substrate-subxt/pull/227)
- Substrate 3.0 - [#232](https://github.com/paritytech/substrate-subxt/pull/232)
- update jsonrpsee [#251](https://github.com/paritytech/subxt/pull/251)
- return none if subscription returns early [#250](https://github.com/paritytech/subxt/pull/250)
- export ModuleError and RuntimeError for downstream usage - [#246](https://github.com/paritytech/subxt/pull/246)
- rpc client methods should be public for downstream usage - [#240](https://github.com/paritytech/subxt/pull/240)
- re-export WasmExecutionMethod for downstream usage - [#239](https://github.com/paritytech/subxt/pull/239)
- integration with jsonrpsee v2 - [#214](https://github.com/paritytech/subxt/pull/214)
- expose wasm execution method on subxt client config - [#230](https://github.com/paritytech/subxt/pull/230)
- Add hooks to register event types for decoding - [#227](https://github.com/paritytech/subxt/pull/227)
- Substrate 3.0 - [#232](https://github.com/paritytech/subxt/pull/232)

## [0.14.0] - 2021-02-05

- Refactor event type decoding and declaration [#221](https://github.com/paritytech/substrate-subxt/pull/221)
- Add Balances Locks [#197](https://github.com/paritytech/substrate-subxt/pull/197)
- Add event Phase::Initialization [#215](https://github.com/paritytech/substrate-subxt/pull/215)
- Make type explicit [#217](https://github.com/paritytech/substrate-subxt/pull/217)
- Upgrade dependencies, bumps substrate to 2.0.1 [#219](https://github.com/paritytech/substrate-subxt/pull/219)
- Export extra types [#212](https://github.com/paritytech/substrate-subxt/pull/212)
- Enable retrieval of constants from rutnime metadata [#207](https://github.com/paritytech/substrate-subxt/pull/207)
- register type sizes for u64 and u128 [#200](https://github.com/paritytech/substrate-subxt/pull/200)
- Remove some substrate dependencies to improve compile time [#194](https://github.com/paritytech/substrate-subxt/pull/194)
- propagate 'RuntimeError's to 'decode_raw_bytes' caller [#189](https://github.com/paritytech/substrate-subxt/pull/189)
- Derive `Clone` for `PairSigner` [#184](https://github.com/paritytech/substrate-subxt/pull/184)
- Refactor event type decoding and declaration [#221](https://github.com/paritytech/subxt/pull/221)
- Add Balances Locks [#197](https://github.com/paritytech/subxt/pull/197)
- Add event Phase::Initialization [#215](https://github.com/paritytech/subxt/pull/215)
- Make type explicit [#217](https://github.com/paritytech/subxt/pull/217)
- Upgrade dependencies, bumps substrate to 2.0.1 [#219](https://github.com/paritytech/subxt/pull/219)
- Export extra types [#212](https://github.com/paritytech/subxt/pull/212)
- Enable retrieval of constants from rutnime metadata [#207](https://github.com/paritytech/subxt/pull/207)
- register type sizes for u64 and u128 [#200](https://github.com/paritytech/subxt/pull/200)
- Remove some substrate dependencies to improve compile time [#194](https://github.com/paritytech/subxt/pull/194)
- propagate 'RuntimeError's to 'decode_raw_bytes' caller [#189](https://github.com/paritytech/subxt/pull/189)
- Derive `Clone` for `PairSigner` [#184](https://github.com/paritytech/subxt/pull/184)

## [0.13.0]

- Make the contract call extrinsic work [#165](https://github.com/paritytech/substrate-subxt/pull/165)
- Update to Substrate 2.0.0 [#173](https://github.com/paritytech/substrate-subxt/pull/173)
- Display RawEvent data in hex [#168](https://github.com/paritytech/substrate-subxt/pull/168)
- Add SudoUncheckedWeightCall [#167](https://github.com/paritytech/substrate-subxt/pull/167)
- Add Add SetCodeWithoutChecksCall [#166](https://github.com/paritytech/substrate-subxt/pull/166)
- Improve contracts pallet tests [#163](https://github.com/paritytech/substrate-subxt/pull/163)
- Make Metadata types public [#162](https://github.com/paritytech/substrate-subxt/pull/162)
- Fix option decoding and add basic sanity test [#161](https://github.com/paritytech/substrate-subxt/pull/161)
- Add staking support [#160](https://github.com/paritytech/substrate-subxt/pull/161)
- Decode option event arg [#158](https://github.com/paritytech/substrate-subxt/pull/158)
- Remove unnecessary Sync bound [#172](https://github.com/paritytech/substrate-subxt/pull/172)
- Make the contract call extrinsic work [#165](https://github.com/paritytech/subxt/pull/165)
- Update to Substrate 2.0.0 [#173](https://github.com/paritytech/subxt/pull/173)
- Display RawEvent data in hex [#168](https://github.com/paritytech/subxt/pull/168)
- Add SudoUncheckedWeightCall [#167](https://github.com/paritytech/subxt/pull/167)
- Add Add SetCodeWithoutChecksCall [#166](https://github.com/paritytech/subxt/pull/166)
- Improve contracts pallet tests [#163](https://github.com/paritytech/subxt/pull/163)
- Make Metadata types public [#162](https://github.com/paritytech/subxt/pull/162)
- Fix option decoding and add basic sanity test [#161](https://github.com/paritytech/subxt/pull/161)
- Add staking support [#160](https://github.com/paritytech/subxt/pull/161)
- Decode option event arg [#158](https://github.com/paritytech/subxt/pull/158)
- Remove unnecessary Sync bound [#172](https://github.com/paritytech/subxt/pull/172)

## [0.12.0]

- Only return an error if the extrinsic failed. [#156](https://github.com/paritytech/substrate-subxt/pull/156)
- Update to rc6. [#155](https://github.com/paritytech/substrate-subxt/pull/155)
- Different assert. [#153](https://github.com/paritytech/substrate-subxt/pull/153)
- Add a method to fetch an unhashed key, close #100 [#152](https://github.com/paritytech/substrate-subxt/pull/152)
- Fix port number. [#151](https://github.com/paritytech/substrate-subxt/pull/151)
- Implement the `concat` in `twox_64_concat` [#150](https://github.com/paritytech/substrate-subxt/pull/150)
- Storage map iter [#148](https://github.com/paritytech/substrate-subxt/pull/148)
- Only return an error if the extrinsic failed. [#156](https://github.com/paritytech/subxt/pull/156)
- Update to rc6. [#155](https://github.com/paritytech/subxt/pull/155)
- Different assert. [#153](https://github.com/paritytech/subxt/pull/153)
- Add a method to fetch an unhashed key, close #100 [#152](https://github.com/paritytech/subxt/pull/152)
- Fix port number. [#151](https://github.com/paritytech/subxt/pull/151)
- Implement the `concat` in `twox_64_concat` [#150](https://github.com/paritytech/subxt/pull/150)
- Storage map iter [#148](https://github.com/paritytech/subxt/pull/148)

## [0.11.0]

- Fix build error, wabt 0.9.2 is yanked [#146](https://github.com/paritytech/substrate-subxt/pull/146)
- Rc5 [#143](https://github.com/paritytech/substrate-subxt/pull/143)
- Refactor: extract functions and types for creating extrinsics [#138](https://github.com/paritytech/substrate-subxt/pull/138)
- event subscription example [#140](https://github.com/paritytech/substrate-subxt/pull/140)
- Document the `Call` derive macro [#137](https://github.com/paritytech/substrate-subxt/pull/137)
- Document the #[module] macro [#135](https://github.com/paritytech/substrate-subxt/pull/135)
- Support authors api. [#134](https://github.com/paritytech/substrate-subxt/pull/134)
- Fix build error, wabt 0.9.2 is yanked [#146](https://github.com/paritytech/subxt/pull/146)
- Rc5 [#143](https://github.com/paritytech/subxt/pull/143)
- Refactor: extract functions and types for creating extrinsics [#138](https://github.com/paritytech/subxt/pull/138)
- event subscription example [#140](https://github.com/paritytech/subxt/pull/140)
- Document the `Call` derive macro [#137](https://github.com/paritytech/subxt/pull/137)
- Document the #[module] macro [#135](https://github.com/paritytech/subxt/pull/135)
- Support authors api. [#134](https://github.com/paritytech/subxt/pull/134)

## [0.10.1] - 2020-06-19

- Release client v0.2.0 [#133](https://github.com/paritytech/substrate-subxt/pull/133)
- Release client v0.2.0 [#133](https://github.com/paritytech/subxt/pull/133)

## [0.10.0] - 2020-06-19

- Upgrade to substrate rc4 release [#131](https://github.com/paritytech/substrate-subxt/pull/131)
- Support unsigned extrinsics. [#130](https://github.com/paritytech/substrate-subxt/pull/130)
- Upgrade to substrate rc4 release [#131](https://github.com/paritytech/subxt/pull/131)
- Support unsigned extrinsics. [#130](https://github.com/paritytech/subxt/pull/130)

## [0.9.0] - 2020-06-25

- Events sub [#126](https://github.com/paritytech/substrate-subxt/pull/126)
- Improve error handling in proc-macros, handle DispatchError etc. [#123](https://github.com/paritytech/substrate-subxt/pull/123)
- Support embedded full/light node clients. [#91](https://github.com/paritytech/substrate-subxt/pull/91)
- Zero sized types [#121](https://github.com/paritytech/substrate-subxt/pull/121)
- Fix optional store items. [#120](https://github.com/paritytech/substrate-subxt/pull/120)
- Make signing fallable and asynchronous [#119](https://github.com/paritytech/substrate-subxt/pull/119)
- Events sub [#126](https://github.com/paritytech/subxt/pull/126)
- Improve error handling in proc-macros, handle DispatchError etc. [#123](https://github.com/paritytech/subxt/pull/123)
- Support embedded full/light node clients. [#91](https://github.com/paritytech/subxt/pull/91)
- Zero sized types [#121](https://github.com/paritytech/subxt/pull/121)
- Fix optional store items. [#120](https://github.com/paritytech/subxt/pull/120)
- Make signing fallable and asynchronous [#119](https://github.com/paritytech/subxt/pull/119)

## [0.8.0] - 2020-05-26

- Update to Substrate release candidate [#116](https://github.com/paritytech/substrate-subxt/pull/116)
- Update to alpha.8 [#114](https://github.com/paritytech/substrate-subxt/pull/114)
- Refactors the api [#113](https://github.com/paritytech/substrate-subxt/pull/113)
- Update to Substrate release candidate [#116](https://github.com/paritytech/subxt/pull/116)
- Update to alpha.8 [#114](https://github.com/paritytech/subxt/pull/114)
- Refactors the api [#113](https://github.com/paritytech/subxt/pull/113)

## [0.7.0] - 2020-05-13

- Split subxt [#102](https://github.com/paritytech/substrate-subxt/pull/102)
- Add support for RPC `state_getReadProof` [#106](https://github.com/paritytech/substrate-subxt/pull/106)
- Update to substrate alpha.7 release [#105](https://github.com/paritytech/substrate-subxt/pull/105)
- Double map and plain storage support, introduce macros [#93](https://github.com/paritytech/substrate-subxt/pull/93)
- Raw payload return SignedPayload struct [#92](https://github.com/paritytech/substrate-subxt/pull/92)
- Split subxt [#102](https://github.com/paritytech/subxt/pull/102)
- Add support for RPC `state_getReadProof` [#106](https://github.com/paritytech/subxt/pull/106)
- Update to substrate alpha.7 release [#105](https://github.com/paritytech/subxt/pull/105)
- Double map and plain storage support, introduce macros [#93](https://github.com/paritytech/subxt/pull/93)
- Raw payload return SignedPayload struct [#92](https://github.com/paritytech/subxt/pull/92)

## [0.6.0] - 2020-04-15

- Raw extrinsic payloads in Client [#83](https://github.com/paritytech/substrate-subxt/pull/83)
- Custom extras [#89](https://github.com/paritytech/substrate-subxt/pull/89)
- Wrap and export BlockNumber [#87](https://github.com/paritytech/substrate-subxt/pull/87)
- Raw extrinsic payloads in Client [#83](https://github.com/paritytech/subxt/pull/83)
- Custom extras [#89](https://github.com/paritytech/subxt/pull/89)
- Wrap and export BlockNumber [#87](https://github.com/paritytech/subxt/pull/87)
- All substrate dependencies upgraded to `alpha.6`

## [0.5.0] - 2020-03-25
Expand Down
44 changes: 18 additions & 26 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
[workspace]
members = [".", "client", "proc-macro"]
members = [".", "cli", "codegen", "macro"]

[package]
name = "substrate-subxt"
name = "subxt"
version = "0.15.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
edition = "2021"

license = "GPL-3.0"
readme = "README.md"
repository = "https://github.com/paritytech/substrate-subxt"
documentation = "https://docs.rs/substrate-subxt"
repository = "https://github.com/paritytech/subxt"
documentation = "https://docs.rs/subxt"
homepage = "https://www.parity.io/"
description = "Submit extrinsics (transactions) to a substrate node via RPC"
keywords = ["parity", "substrate", "blockchain"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[features]
default = ["tokio1"]
client = ["substrate-subxt-client"]
# jsonrpsee can be configured to use tokio02 or tokio1.
tokio02 = ["jsonrpsee-http-client/tokio02", "jsonrpsee-ws-client/tokio02"]
tokio1 = ["jsonrpsee-http-client/tokio1", "jsonrpsee-ws-client/tokio1"]

[dependencies]
async-trait = "0.1.49"
codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = [
"derive",
"full",
] }
dyn-clone = "1.0.4"
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full", "bit-vec"] }
chameleon = "0.1.0"
scale-info = { version = "1.0.0", features = ["bit-vec"] }
futures = "0.3.13"
hex = "0.4.3"
jsonrpsee-proc-macros = "0.3.0"
Expand All @@ -43,20 +41,14 @@ serde_json = "1.0.64"
thiserror = "1.0.24"
url = "2.2.1"

substrate-subxt-client = { version = "0.7.0", path = "client", optional = true }
substrate-subxt-proc-macro = { version = "0.15.0", path = "proc-macro" }
subxt-macro = { version = "0.1.0", path = "macro" }

sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-arithmetic = { package = "sp-arithmetic", git = "https://github.com/paritytech/substrate/", branch = "master" }
sp-core = { package = "sp-core", git = "https://github.com/paritytech/substrate/", branch = "master" }
sp-runtime = { package = "sp-runtime", git = "https://github.com/paritytech/substrate/", branch = "master" }
sp-version = { package = "sp-version", git = "https://github.com/paritytech/substrate/", branch = "master" }
Comment on lines +46 to +49
Copy link
Contributor

Choose a reason for hiding this comment

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

So these could be using the published versions (if the 4.0.0 crates were released)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. When released. And we can't release this until they are, so hope that is coming soon.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. When released. And we can't release this until they are, so hope that is coming soon.

@ascjones are you saying that this pr can't be merged until v4.0.0 of the substrate crates are released? Why can't we use polkadot-v0.9.11? This is what I use in my fork of this PR, and seems to compile just fine. Also, I assume the connected parachain will also need to be updated to v4.0.0 for this to work? Will this be a major breaking change?

Copy link
Contributor

Choose a reason for hiding this comment

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

@sander2 we can definitely merge this (indeed I'm typing this after it's merged) but we can't publish to crates.io with git dependencies, this is what Andrew means by "releasing" here. :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, most people will be using polkadot-v0.9.12 for their parachain. I suggest we do the same for subxt. Or at least maintain a different branch that follows the latest polkadot releases.


frame-metadata = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
frame-metadata = "14.0.0"

[dev-dependencies]
assert_matches = "1.5.0"
Expand All @@ -65,6 +57,6 @@ env_logger = "0.8.3"
tempdir = "0.3.7"
wabt = "0.10.0"
which = "4.0.2"
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }

sp-keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate/", branch = "master" }

4 changes: 2 additions & 2 deletions FILE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2019-2021 Parity Technologies (UK) Ltd.
// This file is part of substrate-subxt.
// This file is part of subxt.
//
// subxt is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand All @@ -12,4 +12,4 @@
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.
// along with subxt. If not, see <http://www.gnu.org/licenses/>.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# subxt &middot; ![build](https://github.com/paritytech/substrate-subxt/workflows/Rust/badge.svg) [![Latest Version](https://img.shields.io/crates/v/substrate-subxt.svg)](https://crates.io/crates/substrate-subxt) [![Documentation](https://docs.rs/substrate-subxt/badge.svg)](https://docs.rs/substrate-subxt)
# subxt &middot; ![build](https://github.com/paritytech/subxt/workflows/Rust/badge.svg) [![Latest Version](https://img.shields.io/crates/v/subxt.svg)](https://crates.io/crates/subxt) [![Documentation](https://docs.rs/subxt/badge.svg)](https://docs.rs/subxt)

A library to **sub**mit e**xt**rinsics to a [substrate](https://github.com/paritytech/substrate) node via RPC.

### :warning: Health Warning :warning: considered *alpha* after recent changes, API still subject to change

#### See https://github.com/paritytech/subxt/issues/309 for an overview of outstanding issues.

## Usage

See [examples](./examples).
Expand Down
Loading