From 477d2a41ae8c6a2af6afe4a241cdce73cda6aef9 Mon Sep 17 00:00:00 2001 From: hayes-mysten <135670682+hayes-mysten@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:12:59 -0700 Subject: [PATCH] [ts sdk] Add new errors to ExecutionFailureStatus (#19897) ## Description Describe the changes or additions included in this PR. ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- .changeset/small-icons-smash.md | 5 +++++ sdk/typescript/src/bcs/effects.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .changeset/small-icons-smash.md diff --git a/.changeset/small-icons-smash.md b/.changeset/small-icons-smash.md new file mode 100644 index 0000000000000..8dac4e7f6fda1 --- /dev/null +++ b/.changeset/small-icons-smash.md @@ -0,0 +1,5 @@ +--- +'@mysten/sui': minor +--- + +Add new errors to ExecutionFailureStatus enum diff --git a/sdk/typescript/src/bcs/effects.ts b/sdk/typescript/src/bcs/effects.ts index 37827116ff3cd..944a011fcf93e 100644 --- a/sdk/typescript/src/bcs/effects.ts +++ b/sdk/typescript/src/bcs/effects.ts @@ -105,6 +105,18 @@ const ExecutionFailureStatus = bcs.enum('ExecutionFailureStatus', { SuiMoveVerificationTimedout: null, SharedObjectOperationNotAllowed: null, InputObjectDeleted: null, + ExecutionCancelledDueToSharedObjectCongestion: bcs.struct( + 'ExecutionCancelledDueToSharedObjectCongestion', + { + congestedObjects: bcs.vector(Address), + }, + ), + AddressDeniedForCoin: bcs.struct('AddressDeniedForCoin', { + address: Address, + coinType: bcs.string(), + }), + CoinTypeGlobalPause: bcs.struct('CoinTypeGlobalPause', { coinType: bcs.string() }), + ExecutionCancelledDueToRandomnessUnavailable: null, }); const ExecutionStatus = bcs.enum('ExecutionStatus', {