diff --git a/docs/code/classes/types_composer.TransactionComposer.md b/docs/code/classes/types_composer.TransactionComposer.md index cd90cdf1..23576914 100644 --- a/docs/code/classes/types_composer.TransactionComposer.md +++ b/docs/code/classes/types_composer.TransactionComposer.md @@ -1795,7 +1795,7 @@ An alias for `composer.send(params)`. #### Defined in -[src/types/composer.ts:1982](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1982) +[src/types/composer.ts:1980](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1980) ___ @@ -1845,14 +1845,12 @@ The execution result **`Example`** ```typescript -const result = await composer.send({ - populateAppCallResources: true, -}) +const result = await composer.send() ``` #### Defined in -[src/types/composer.ts:1941](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1941) +[src/types/composer.ts:1939](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1939) ___ @@ -1876,7 +1874,7 @@ const result = await composer.simulate() #### Defined in -[src/types/composer.ts:1994](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1994) +[src/types/composer.ts:1992](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1992) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1910,7 +1908,7 @@ const result = await composer.simulate({ #### Defined in -[src/types/composer.ts:2005](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2005) +[src/types/composer.ts:2003](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2003) ▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\> @@ -1945,7 +1943,7 @@ const result = await composer.simulate({ #### Defined in -[src/types/composer.ts:2018](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2018) +[src/types/composer.ts:2016](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2016) ___ @@ -1971,4 +1969,4 @@ The binary encoded transaction note #### Defined in -[src/types/composer.ts:2095](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2095) +[src/types/composer.ts:2093](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2093) diff --git a/docs/code/modules/index.md b/docs/code/modules/index.md index c4d09a19..51ec675c 100644 --- a/docs/code/modules/index.md +++ b/docs/code/modules/index.md @@ -575,7 +575,7 @@ the estimated rate. #### Defined in -[src/transaction/transaction.ts:1058](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1058) +[src/transaction/transaction.ts:1057](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1057) ___ @@ -639,7 +639,7 @@ Allows for control of fees on a `Transaction` or `SuggestedParams` object #### Defined in -[src/transaction/transaction.ts:1085](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1085) +[src/transaction/transaction.ts:1084](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1084) ___ @@ -966,7 +966,7 @@ Converts `bigint`'s for Uint's < 64 to `number` for easier use. #### Defined in -[src/transaction/transaction.ts:928](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L928) +[src/transaction/transaction.ts:927](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L927) ___ @@ -1942,7 +1942,7 @@ Returns the array of transactions currently present in the given `AtomicTransact #### Defined in -[src/transaction/transaction.ts:1134](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1134) +[src/transaction/transaction.ts:1133](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1133) ___ @@ -2329,7 +2329,7 @@ Returns suggested transaction parameters from algod unless some are already prov #### Defined in -[src/transaction/transaction.ts:1112](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1112) +[src/transaction/transaction.ts:1111](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1111) ___ @@ -2761,7 +2761,7 @@ A new ATC with the resources populated into the transactions #### Defined in -[src/transaction/transaction.ts:383](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L383) +[src/transaction/transaction.ts:382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L382) ___ @@ -2790,7 +2790,7 @@ A new ATC with the changes applied #### Defined in -[src/transaction/transaction.ts:402](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L402) +[src/transaction/transaction.ts:401](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L401) ___ @@ -2940,7 +2940,7 @@ An object with transaction IDs, transactions, group transaction ID (`groupTransa #### Defined in -[src/transaction/transaction.ts:777](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L777) +[src/transaction/transaction.ts:776](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L776) ___ @@ -2969,7 +2969,7 @@ Signs and sends a group of [up to 16](https://developer.algorand.org/docs/get-de #### Defined in -[src/transaction/transaction.ts:957](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L957) +[src/transaction/transaction.ts:956](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L956) ___ @@ -3242,4 +3242,4 @@ Throws an error if the transaction is not confirmed or rejected in the next `tim #### Defined in -[src/transaction/transaction.ts:1001](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1001) +[src/transaction/transaction.ts:1000](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1000) diff --git a/src/__snapshots__/app-deploy.spec.ts.snap b/src/__snapshots__/app-deploy.spec.ts.snap index 58c122e0..2b2e9f2a 100644 --- a/src/__snapshots__/app-deploy.spec.ts.snap +++ b/src/__snapshots__/app-deploy.spec.ts.snap @@ -25,7 +25,7 @@ INFO: Detected a TEAL update in app APP_1 for creator ACCOUNT_1 WARN: App is not deletable and onUpdate=ReplaceApp, will attempt to create new app and delete old app, delete will most likely fail INFO: Deploying a new test app for ACCOUNT_1; deploying app with version 2.0. WARN: Deleting existing test app with id APP_1 from ACCOUNT_1 account. -ERROR: Received error executing Atomic Transaction Composer, for more information enable the debug flag | [{"cause":{"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{},{\\"stack\\":[0]}],\\"group-index\\":1,\\"pc\\":994},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=994. Details: app=APP_1, pc=994, opcodes=assert; intc 5 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","status":400},"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{},{\\"stack\\":[0]}],\\"group-index\\":1,\\"pc\\":994},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=994. Details: app=APP_1, pc=994, opcodes=assert; intc 5 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError"}]" +ERROR: Received error executing Atomic Transaction Composer, for more information enable the debug flag | [{"cause":{},"name":"Error"}]" `; exports[`deploy-app > Deploy failure for replacement of schema broken app fails if onSchemaBreak = Fail 1`] = ` @@ -74,7 +74,7 @@ WARN: Detected a breaking app schema change in app APP_1: | [{"from":{"globalInt INFO: App is not deletable but onSchemaBreak=ReplaceApp, will attempt to delete app, delete will most likely fail INFO: Deploying a new test app for ACCOUNT_1; deploying app with version 2.0. WARN: Deleting existing test app with id APP_1 from ACCOUNT_1 account. -ERROR: Received error executing Atomic Transaction Composer, for more information enable the debug flag | [{"cause":{"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{},{\\"stack\\":[0]}],\\"group-index\\":1,\\"pc\\":994},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=994. Details: app=APP_1, pc=994, opcodes=assert; intc 5 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","status":400},"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{},{\\"stack\\":[0]}],\\"group-index\\":1,\\"pc\\":994},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=994. Details: app=APP_1, pc=994, opcodes=assert; intc 5 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError"}]" +ERROR: Received error executing Atomic Transaction Composer, for more information enable the debug flag | [{"cause":{},"name":"Error"}]" `; exports[`deploy-app > Deploy update to immutable updated app fails 1`] = ` @@ -83,7 +83,7 @@ INFO: Existing app test found by creator ACCOUNT_1, with app id APP_1 and versio INFO: Detected a TEAL update in app APP_1 for creator ACCOUNT_1 WARN: App is not updatable but onUpdate=UpdateApp, will attempt to update app, update will most likely fail INFO: Updating existing test app for ACCOUNT_1 to version 2.0. -ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{\\"stack\\":[0]}],\\"group-index\\":0,\\"pc\\":948},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=948. Details: app=APP_1, pc=948, opcodes=assert; intc 4 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","status":400},"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{\\"stack\\":[0]}],\\"group-index\\":0,\\"pc\\":948},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=948. Details: app=APP_1, pc=948, opcodes=assert; intc 4 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","traces":[]}]" +ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{},"name":"Error","traces":[]}]" `; exports[`deploy-app > Deploy update to updatable updated app 1`] = ` diff --git a/src/transaction/transaction.ts b/src/transaction/transaction.ts index 854b762b..d37d44db 100644 --- a/src/transaction/transaction.ts +++ b/src/transaction/transaction.ts @@ -233,7 +233,6 @@ export const sendTransaction = async function ( const populateAppCallResources = sendParams?.populateAppCallResources ?? Config.populateAppCallResources // Populate resources if the transaction is an appcall and populateAppCallResources wasn't explicitly set to false - // NOTE: Temporary false by default until this algod bug is fixed: https://github.com/algorand/go-algorand/issues/5914 if (txnToSend.type === algosdk.TransactionType.appl && populateAppCallResources) { const newAtc = new AtomicTransactionComposer() newAtc.addTransaction({ txn: txnToSend, signer: getSenderTransactionSigner(from) }) diff --git a/src/types/__snapshots__/app-client.spec.ts.snap b/src/types/__snapshots__/app-client.spec.ts.snap index c321320c..bb756790 100644 --- a/src/types/__snapshots__/app-client.spec.ts.snap +++ b/src/types/__snapshots__/app-client.spec.ts.snap @@ -5,5 +5,5 @@ exports[`application-client > Errors > Display nice error messages when there is INFO: App TestingApp not found in apps created by ACCOUNT_1; deploying app with version 1.0. VERBOSE: Sent transaction ID TXID_1 appl from ACCOUNT_1 DEBUG: App created by ACCOUNT_1 with ID APP_1 via transaction TXID_1 -ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{\\"stack\\":[0]}],\\"group-index\\":0,\\"pc\\":885},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=885. Details: app=APP_1, pc=885, opcodes=proto 0 0; intc_0 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","status":400},"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{\\"stack\\":[0]}],\\"group-index\\":0,\\"pc\\":885},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=885. Details: app=APP_1, pc=885, opcodes=proto 0 0; intc_0 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","traces":[]}]" +ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{},"name":"Error","traces":[]}]" `; diff --git a/src/types/__snapshots__/app-factory-and-client.spec.ts.snap b/src/types/__snapshots__/app-factory-and-client.spec.ts.snap index cd7ce454..1ba873f2 100644 --- a/src/types/__snapshots__/app-factory-and-client.spec.ts.snap +++ b/src/types/__snapshots__/app-factory-and-client.spec.ts.snap @@ -5,8 +5,8 @@ exports[`ARC32: app-factory-and-app-client > Errors > Display nice error message INFO: App TestingApp not found in apps created by ACCOUNT_1; deploying app with version 1.0. VERBOSE: Sent transaction ID TXID_1 appl from ACCOUNT_1 DEBUG: App created by ACCOUNT_1 with ID APP_1 via transaction TXID_1 -ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{\\"stack\\":[0]}],\\"group-index\\":0,\\"pc\\":885},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=885. Details: app=APP_1, pc=885, opcodes=proto 0 0; intc_0 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","status":400},"response":{"text":"{\\"data\\":{\\"app-index\\":APP_1,\\"eval-states\\":[{\\"stack\\":[0]}],\\"group-index\\":0,\\"pc\\":885},\\"message\\":\\"TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=885. Details: app=APP_1, pc=885, opcodes=proto 0 0; intc_0 // 0; assert\\"}\\n","format":"application/json","status":400,"ok":false},"name":"URLTokenBaseHTTPError","traces":[]}] -ERROR: assert failed pc=885. at:469. Network request error. Received status 400 (Bad Request): TransactionPool.Remember: transaction TXID_2: logic eval error: assert failed pc=885. Details: app=APP_1, pc=885, opcodes=proto 0 0; intc_0 // 0; assert +ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{},"name":"Error","traces":[]}] +ERROR: assert failed pc=885. at:469. Error resolving execution info via simulate in transaction 0: transaction TXID_2: logic eval error: assert failed pc=885. Details: app=APP_1, pc=885, opcodes=proto 0 0; intc_0 // 0; assert 464: // error 465: error_7: diff --git a/src/types/composer.ts b/src/types/composer.ts index f6596111..e139d685 100644 --- a/src/types/composer.ts +++ b/src/types/composer.ts @@ -1933,9 +1933,7 @@ export class TransactionComposer { * @returns The execution result * @example * ```typescript - * const result = await composer.send({ - * populateAppCallResources: true, - * }) + * const result = await composer.send() * ``` */ async send(params?: SendParams): Promise { diff --git a/src/types/config.ts b/src/types/config.ts index ea9a1dab..087068a4 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -95,7 +95,7 @@ export class UpdatableConfig implements Readonly { traceAll: false, traceBufferSizeMb: 256, maxSearchDepth: 10, - populateAppCallResources: false, + populateAppCallResources: true, events: new AsyncEventEmitter(), } }