* tests: Bind to localhost instead of 0.0.0.0
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* test-runtime: Bind to localhost instead of 0.0.0.0
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* test-runtime: Ask kernel for port allocation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Rely on kernel to provide port allocation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Use tokio instead of std async
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* test-runtime: Use tokio instead of std async
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Use tokio instead of std async
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Use only necessary tokio features
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Handle new errors of type [u8; 4] with backwards compatibility
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Add comments about the compatibility of `DispatchError::Module`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Handle legacy cases appropriately
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Introduce `ModuleErrorType` for compatibility versioning
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Implement `module_error_type` helper
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Implement `quote::ToTokens` for `ModuleErrorType`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Rename new error to ArrayError
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Add strict checks for ModuleError
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fix cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen, subxt: Expose the error's raw bytes to user
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Update polkadot with ModuleErrorRaw
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Rename `ModuleErrorRaw` to `ModuleErrorData`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Expose method to obtain error index
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Rename `ModuleErrorRaw` to `ModuleErrorData`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* WIP extrinsic api updates
* First pass done; now to get things compiling again
* document and tweak new structs/traits
* cargo check --all-targets now compiles without issue
* Polkadot and Substrate take different extra params; support both
* Fix transaction format (missing byte from AccountId -> Address) and fmt
* Tweak Signer trait
* Tweak comments and such in extrinsic params
* check all examples against newer polkadot, add new one with params, import path tweaks
* clippy fix, and save an allocation when signing
* Remove unnecessary Default clauses
* Tidy up and fix comments. Panic if payload size >4GB
* fix typo
* 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>