Skip to content

feat!: enable populateAppCallResources by default #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions docs/code/classes/types_composer.TransactionComposer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand All @@ -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` }\>

Expand Down Expand Up @@ -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` }\>

Expand Down Expand Up @@ -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)

___

Expand All @@ -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)
20 changes: 10 additions & 10 deletions docs/code/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)

___

Expand Down Expand Up @@ -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)
6 changes: 3 additions & 3 deletions src/__snapshots__/app-deploy.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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`] = `
Expand Down Expand Up @@ -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`] = `
Expand All @@ -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`] = `
Expand Down
1 change: 0 additions & 1 deletion src/transaction/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) })
Expand Down
2 changes: 1 addition & 1 deletion src/types/__snapshots__/app-client.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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":[]}]"
`;
4 changes: 2 additions & 2 deletions src/types/__snapshots__/app-factory-and-client.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions src/types/composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SendAtomicTransactionComposerResults> {
Expand Down
2 changes: 1 addition & 1 deletion src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class UpdatableConfig implements Readonly<Config> {
traceAll: false,
traceBufferSizeMb: 256,
maxSearchDepth: 10,
populateAppCallResources: false,
populateAppCallResources: true,
events: new AsyncEventEmitter(),
}
}
Expand Down