Skip to content

Commit f4c2d6c

Browse files
authored
docs: update docs for dry-run endpoint (#1524)
1 parent aeef4dc commit f4c2d6c

File tree

2 files changed

+61
-23
lines changed

2 files changed

+61
-23
lines changed

docs/dist/app.bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/openapi-v1.yaml

+60-22
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,9 @@ paths:
10641064
tags:
10651065
- transaction
10661066
summary: Dry run an extrinsic.
1067-
description: Use the dryrun call to practice submission of a transaction.
1067+
description: Use the `dryRun` call to simulate the submission of a transaction
1068+
without executing it so that you can check for potential errors and
1069+
validate the expected outcome.
10681070
operationId: dryrunTransaction
10691071
requestBody:
10701072
$ref: '#/components/requestBodies/TransactionDryRun'
@@ -3107,16 +3109,11 @@ components:
31073109
decodedXcmMsgs:
31083110
type: object
31093111
properties:
3110-
horizontalMessages: {
3111-
"oneOf": [
3112-
{
3113-
"$ref": "#/components/schemas/DecodedXcmMsgsHorizontalMessagesInRelay"
3114-
},
3115-
{
3116-
"$ref": "#/components/schemas/DecodedXcmMsgsHorizontalMessagesInParachain"
3117-
}
3118-
]
3119-
}
3112+
horizontalMessages:
3113+
type: object
3114+
oneOf:
3115+
- $ref: "#/components/schemas/DecodedXcmMsgsHorizontalMessagesInRelay"
3116+
- $ref: "#/components/schemas/DecodedXcmMsgsHorizontalMessagesInParachain"
31203117
downwardMessages:
31213118
type: array
31223119
items:
@@ -4494,6 +4491,50 @@ components:
44944491
tx:
44954492
type: string
44964493
format: hex
4494+
TransactionDispatchOutcome:
4495+
type: object
4496+
description: The result of a valid transaction submitted via the `dry-run` endpoint.
4497+
properties:
4498+
actualWeight:
4499+
type: string
4500+
format: unsignedInteger
4501+
description: The actual weight of the transaction.
4502+
paysFee:
4503+
type: string
4504+
format: boolean
4505+
description: Whether the transaction pays a fee.
4506+
TransactionDispatchError:
4507+
type: object
4508+
description: The reason why the dispatch call failed.
4509+
properties:
4510+
errorType:
4511+
type: string
4512+
enum:
4513+
- Other
4514+
- CannotLookup
4515+
- BadOrigin
4516+
- ModuleError
4517+
- ConsumerRemaining
4518+
- NoProviders
4519+
- TooManyConsumers
4520+
- TokenError
4521+
- ArithmeticError
4522+
- TransactionalError
4523+
- Exhausted
4524+
- Corruption
4525+
- Unavailable
4526+
- RootNotAllowed
4527+
description: The type of transaction error.
4528+
TransactionValidityError:
4529+
type: object
4530+
description: The error result from an invalid transaction submitted via the `dry-run` endpoint.
4531+
properties:
4532+
errorType:
4533+
type: string
4534+
enum:
4535+
- Unimplemented
4536+
- VersionedConversionFailed
4537+
description: The type of transaction error, either `Unimplemented` or `VersionedConversionFailed`.
44974538
DryRunBody:
44984539
type: object
44994540
properties:
@@ -4513,22 +4554,19 @@ components:
45134554
type: string
45144555
enum:
45154556
- DispatchOutcome
4557+
- DispatchError
45164558
- TransactionValidityError
4517-
description: Either `DispatchOutcome` if the transaction is valid or `TransactionValidityError` if the result is invalid.
4559+
description: The result will be either a `DispatchOutcome` if the transaction is valid, a `DispatchError`
4560+
if the transaction failed, or a `TransactionValidityError` if the transaction is invalid.
45184561
result:
4519-
type: object
4520-
properties:
4521-
actualWeight:
4522-
type: string
4523-
format: unsignedInteger
4524-
description: The actual weight of the transaction.
4525-
paysFee:
4526-
type: string
4527-
format: boolean
4528-
description: Whether the transaction pays a fee.
4562+
oneOf:
4563+
- $ref: '#/components/schemas/TransactionDispatchOutcome'
4564+
- $ref: '#/components/schemas/TransactionDispatchError'
4565+
- $ref: '#/components/schemas/TransactionValidityError'
45294566
description: >-
45304567
References:
45314568
- `PostDispatchInfo`: https://docs.rs/frame-support/38.0.0/frame_support/dispatch/struct.PostDispatchInfo.html
4569+
- `DispatchError`: https://docs.rs/sp-runtime/39.0.1/sp_runtime/enum.DispatchError.html
45324570
- `Error Type`: https://paritytech.github.io/polkadot-sdk/master/xcm_runtime_apis/dry_run/enum.Error.html
45334571
TransactionFailedToParse:
45344572
type: object

0 commit comments

Comments
 (0)