@@ -1064,7 +1064,9 @@ paths:
1064
1064
tags :
1065
1065
- transaction
1066
1066
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.
1068
1070
operationId : dryrunTransaction
1069
1071
requestBody :
1070
1072
$ref : ' #/components/requestBodies/TransactionDryRun'
@@ -3107,16 +3109,11 @@ components:
3107
3109
decodedXcmMsgs :
3108
3110
type : object
3109
3111
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"
3120
3117
downwardMessages :
3121
3118
type : array
3122
3119
items :
@@ -4494,6 +4491,50 @@ components:
4494
4491
tx :
4495
4492
type : string
4496
4493
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`.
4497
4538
DryRunBody :
4498
4539
type : object
4499
4540
properties :
@@ -4513,22 +4554,19 @@ components:
4513
4554
type : string
4514
4555
enum :
4515
4556
- DispatchOutcome
4557
+ - DispatchError
4516
4558
- 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.
4518
4561
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'
4529
4566
description : >-
4530
4567
References:
4531
4568
- `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
4532
4570
- `Error Type`: https://paritytech.github.io/polkadot-sdk/master/xcm_runtime_apis/dry_run/enum.Error.html
4533
4571
TransactionFailedToParse :
4534
4572
type : object
0 commit comments