* remove code related to getting nonce from storage and use RPC call instead
* cargo fmt
* move nonce fetching into Rpc, since it's just an RPC call
* clippy
* Remove health warning
* Update cargo-contract link
* Add example of initializing the api client
* Explain RuntimeApi parameterization
* Add storage query example
* Add basic extrinsic example
* make subscription stream generic in EventSubscription
* rename to EventSub/FinalizedEventSub
* wip fix some lifetimes so that event sub can depend on client in stream
* Cargo fmt + comment tweaks
* Add another comment
* factor out prev block header fetching into a separate function to tidy
* add a comment
* remove ListOrValue as it's unused
* Into<u128> on BlockNumber to simplify things
* clippy
* Fix an example and clippy
* simplify iterator now we are Into<u128>
* Into<u64> instead because it needs serializing, and test core logic
* Tweak missing block test to fill in >=2 holes
* tweak a comment
* codegen: Update polkadot.rs
polkadot commit-hash: d96d3bea85
polkadot tag: v0.9.16-rc2
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Reference key storage api
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Regenerate polkadot.rs with reference api
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Update tests with reference interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Fix polkadot.rs license check
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Update polkadot.rs with copyright
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "codegen: Update polkadot.rs with copyright"
This reverts commit 2970d0573dc0b11d01072b270a525ad497992ddf.
Revert "cli: Fix polkadot.rs license check"
This reverts commit 6fe8818582ae39669c059c1ed0424b6606620295.
* codegen: Implement AccountData trait in the expected order
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Store implementation of StorageEntry
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Generate AccountDefaultData wrapper struct
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Allow `Account` references
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Utilize AccountDefaultData instead of Account
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Update tests to utilize `Account` reference
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Rename AccountDefaultData to AccountOwned
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Add comments for wrapper account
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Obtain vector type parameter for TypePath::Type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Use slices instead of `& std::vec` in storage API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fix documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Remove extra reference
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Add staking example to exercise storage API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Update storage tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix cargo clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Simplify vec_type_param
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Rename staking_details.rs to fetch_staking_details.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Remove dummy variable
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Update polkadot version
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Apply rust-fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Regenerate polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Remove comment
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Split events.rs into multiple files and start work on FilterEvents
* First pass filtering event(s)
* Tweak event examples to show filter_events
* cargo clippy + fmt
* consistify and tidy
* cargo fmt
* Tweak a couple of comments
* Expose phase and block_hash of filtered events, too
* cargo fmt
* expose FilteredEventDetails
* Add docs
* cargo clippy
* remove FilterEvents knowledge of EventSubscription so it's easier to unit test
* unit test filter_events
* tweak an integration test to use filter_events
* cargo fmt
* cargo clippy
* Tweak a comment
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
* Distinct handling for N fields + 1 hasher vs N fields + N hashers
* tweak comment
* cargo fmt
* fix typo
* Add a few storage specific tests
* clippy fixes
* cargo fmt
* Add a test to specifically address this fix
* comment typo
* Address niggles
* slgihtly nicer iter code
* Substitute BTreeMap/BTreeSet for Vec
* regen code
* cargo fmt
* undo test tweak since not substituting bounded things at the mo
* add a couple of comments
* Add error information back into metadata to roll back removal in #394
* Go back to obtaining runtime error info
* re-do codegen too to check that it's all gravy
* Convert DispatchError module errors into a module variant to make them easier to work with
* Fix broken doc link
* ModuleError is now a tuple variant
* more robust pointer to DispatchError
* backward compat
* clippy
* cargo fmt
* abort_call_site and simplify path comparison
* clippy
* Add reworked event types
* first pass implementing event subscriptions
* make clear that some methods are private
* comment tidy
* use Events in transaction stuff
* align transaction and event APIs
* remove __private_ prefixes; they are ugly
* fix examples and remove old events and subscription code
* better comments on hidden event functions
* re-add find_first_event; it's used a bunch in tests and examples
* cargo check --all-targets now passes
* Fix up existing event tests
* cargo fmt
* change todo to note
* clippy and doc niggles
* revert to find_first_event
* Add specific subscription related tests
* cargo fmt
* Update tests and add/fix examples
* cargo fmt
* add a little to subscribe_all_events example
* cargo fmt
* move an example comment
* easy access to root mod for more clarity
* add a couple of tests to ensure that events properly decoded until naff bytes
* Simplify EventSubscription Stream impl a little
* Address some PR feedback
* implement next_context
* write test_context for method next_context
* change how events are uniquely identified
* undo local changes for test-runtime
* introduce EventContext struct
* adjust test_context to EventContext struct
* fix return type for next_context
* add suggestions by jsdw
* ran cargo fmt and clippy
* move into subfolder step 1
* Make folders a workspace again
* Move examples into their own workspace crate to make them more visible and easier to run
* clippy fix
* newline
* tweak releasing steps for folder move
* reference exampels more clearly in top level readme
* Add release checklist
* Subxt, not Soketto
* more Soketto -> Subxt fixes
* Signed tags and note about incrementing version of each crate
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Add command to publish crates in required order
* undo test breakages and codegen first since macro depends on it
* Update RELEASING.md
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* sleep 10, and text niggles
Co-authored-by: David <dvdplm@gmail.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* WIP DispatchError generic param
* main crate now compiling with new E generic param for DispatchError
* Remove E param from RpcClient since it doesn't really need it
* Point to generated DispatchError in codegen so no need for additional param there
* More error hunting; cargo check --all-targets passes now
* Use our own RuntimeVersion struct (for now) to avoid error decoding into sp_version::RuntimeVersion
* cargo fmt
* fix docs and expose private documented thing that I think should be pub
* move error info to compile time so that we can make DispatchError a little nicer to work with
* cargo fmt
* clippy
* Rework error handling to remove <E> param in most cases
* fix Error doc ambiguity (hopefully)
* doc tweaks
* docs: remove dismbiguation thing that isn't needed now
* One more Error<E> that can be a BasicError
* rewrite pallet errors thing into normal loops to tidy
* tidy errors codegen a little
* tidy examples/custom_type_derives.rs a little
* cargo fmt
* silcnce clippy in example
* Update transaction.rs
* documentation
* Update src/transaction.rs
Co-authored-by: James Wilson <james@jsdw.me>
* fmt
Co-authored-by: James Wilson <james@jsdw.me>
* WIP update dependencies to crates versions
* Use released versions of sp-version and sp-arithmetic
* Attempt to align version of sp-keyring used to correspond to 4.0.0 releases. No luck but closer
* sp-keyring 4.0.0
* also sp-keyring 4.0.0 for macro crate
* simplify cargo.tomls
Co-authored-by: James Wilson <james@jsdw.me>
* Use Derivative to skip bounds on T when they aren't necessary, and remove unnecessary bounds on Config
* loosen a couple more derive bounds
* Use PhantomDataSendSync to avoid accidentally removing Send+Sync bounds