Commit f4b22b7
feat: add support for pre-confirmations (#3857)
* fix changeset
* using existent helper
* Applied suggestions
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Fix hidden
* improve docs
* add docs API reference
* define type for assembleTx response
* refact code
* add docs API reference
* add link
* improve doc description
* remove documentation
* add TS DOC
* remove public word
* add comments to code
* add docs to method
* remove config from doc page
* add values to spell words file
* moving docs around
* add word to spell check file
* make lint happy
* fuck this doc lint thing, seriously
* rename doc files
* try to make lint happy
* fix link
* rollback changes on fundWithRequiredCoins
* deprecate addSignersCallback
* adjust test
* made accountCoinQuantities optional
* Added comments to `readEvent`
* more comments
* Update apps/docs/src/guide/transactions/assemble-tx.md
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
* Update packages/account/src/providers/provider.ts
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
* Update packages/fuel-gauge/src/call-test-contract.test.ts
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
* nit
* remove unused snippet
* nit
* adjusting test case
* deprecating code
* add comment
* add doc section
* deprecate `Account.getTransactionCost`
* make lint happy
* fix snippet code
* Update apps/docs/src/guide/transactions/assemble-tx.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* uncomment e2e
* recoment tests for testnet
* create new type ResourcesIDsToIgnore
* rename excludedIds to resourcesIDsToIgnore
* capturing two errors on mapGqlErrorMessage
* simplify validation
* update test suite
* update doc snippet
* create new error code
* add error code to errors guide
* remove error handling section from assembleTx docs
* remove unused doc snippet
* fix const key name
* rename resourcesIDsToIgnore to resourcesIdsToIgnore
* made assembleTx to return rawReceipts
* refact tests related to improved JSON RPC
* update assembleTx docs
* add word to spell check
* fix flaky test
* feat: optimistic concurrency control (#3834)
* Renamed to `ENABLE_RPC_CONSISTENCY`
* WIP changes
* linting
* adjust test for SDK retry attempts
* simplify some tests parameters
* linting
* remove BLOCK_HEIGHT_SENSITIVE_OPERATIONS
* remove validation from loop
* adjust test values
* refact some code
* linting
---------
Co-authored-by: Torres-ssf <sergio.uft@gmail.com>
Co-authored-by: Sérgio Torres <30977845+Torres-ssf@users.noreply.github.com>
* Update apps/docs/src/guide/provider/rpc-consistency.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/provider/rpc-consistency.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/provider/rpc-consistency.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update .changeset/yummy-tools-sip.md
* chore: upgrade `fuel-core` to `0.43.0` (#3838)
* Changeset
* Added types for pre-conf
* Added pre conf statuses
* Add tests for PRECONFIRMATION_SUCCESS and PRECONFIRMATION_FAILURE statuses in transaction summary
* Lintfix
* Added `includePreconfirmation` method to the `sendTransaction` method
* Added required flag for `includePreconfirmation` and `waitForPreconfirmation` to the `TransactionResponse`
* remove preconf flag
* skip some tests
* include optional fields on preconfirmation tx fragments
* rename method waitForStatusChange
* ensure waitForConfirmation waits for the right statuses
* add waitForPreConfirmationStatuses
* create type PreConfirmationTransactionSummary
* include preconfirmation statuses when submitting TX
* add receipts property to preconfirmation statuses types
* edit TransactionSummary type to maintain its old signature
* extract receipts from preconfirmation statuses at processGraphqlStatus
* wip assemblePreconfirmationTransactionSummary
* implement waitForPreConfirmation helpers on TransactionResponse
* remove skip from test
* lint fix
* remove pre confirmation status from transactionStatusFragment
* add cast
* rename internal method
* improve readability
* implement helper deserializeProcessedTxOutput
* use deserializeProcessedTxOutput in favor of mapGqlOutputsToTxOutputs
* expose
* add type SubmittableTransactions
* using SubmittableTransactions
* remove unnecessary method
* add note
* implement inner helper
* adding some notes
* add rawPayload to PreconfirmationSuccessStatus statuses
* extract transaction from pre confirmation statuses
* refact assemblePreConfirmationTransactionSummary
* consider transaction property on pre confirmation results
* renaming some types
* include resolved outputs within pre confirmation statuses
* renaming type
* creating new type for resolved outputs
* extracting resolved outputs
* create type PreConfirmationFunctionResult
* implement helper buildPreConfirmationFunctionResult
* add callback waitForPreConfirmation to baseInvocationScope
* update test case
* add errorReason to PreConfirmationTransactionSummary
* add test case for preconfirmation false
* rename flag on query
* improve TS DOC
* add flag includePreConfirmation to ProviderSendTxParams
* stop using flag for now
* undo
* Upgrading `fuel-core` to `0.43.1`
* remove unnecessary test
* remove .skip
* lint
* Update .changeset/yummy-tools-sip.md
* Upgrading `@fuels/vm-asm` to `0.66.1`
* Updating lock file
* re-introduce pre-confirmation
* avoid using 2 subscriptions
* remove test case
* rollback change
* chore: upgrading `forc` to `0.68.0` (#3860)
* Upgrading `forc` to `0.68.0`
* Adding [empty] changeset (not merging into `master`)
* Adjusting changesets
* avoid subscribing to the same event twice
* fix promise resolvers on transaction response
* adding more tests for pre-confirmation
* remove test case retries
* add test env
* add missing graphql error map from master
* adjusting pre confirmation types
* adjusting test suite
* fix test
* slim down type PreConfirmationTransactionSummary
* unnecessary test
* add waitForPreConfirmation to DeployContractResult type
* refact code
* add more tests
* add transaction properties to PreConfirmationTransactionSummary
* extracting more properties on processGraphqlStatus
* use transaction request on assemblePreConfirmationTransactionSummary
* adjusting some tests
* adding docs
* adjust docs
* add words to spell check
* remove unnecessary .todo tests
* add connector test case
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/.vitepress/config.ts
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmation.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* rename doc page
* update doc
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* Update apps/docs/src/guide/transactions/pre-confirmations.md
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>
* add some comments on the code
* improve docs
---------
Co-authored-by: Peter Smith <peter@blueoceancomputing.co.uk>
Co-authored-by: Anderson Arboleya <anderson@arboleya.me>1 parent 640d613 commit f4b22b7
File tree
26 files changed
+1595
-255
lines changed- .changeset
- apps/docs
- .vitepress
- src/guide/transactions
- snippets/pre-confirmation
- packages
- account
- src
- providers
- transaction-response
- transaction-summary
- utils
- test
- fixtures
- contract/src
- fuel-gauge/src
- program/src
- functions
- transactions/src/coders
26 files changed
+1595
-255
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
Lines changed: 73 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
125 | 204 | | |
126 | 205 | | |
127 | 206 | | |
| |||
196 | 275 | | |
197 | 276 | | |
198 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
199 | 284 | | |
200 | 285 | | |
201 | 286 | | |
| |||
592 | 677 | | |
593 | 678 | | |
594 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
595 | 686 | | |
596 | 687 | | |
597 | 688 | | |
| |||
1042 | 1133 | | |
1043 | 1134 | | |
1044 | 1135 | | |
1045 | | - | |
1046 | | - | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
1047 | 1146 | | |
1048 | 1147 | | |
1049 | 1148 | | |
1050 | 1149 | | |
1051 | | - | |
1052 | | - | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1053 | 1158 | | |
1054 | 1159 | | |
1055 | 1160 | | |
0 commit comments