-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle
sp_runtime::ModuleError
substrate updates (#492)
* 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>
- Loading branch information
Showing
5 changed files
with
570 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.