Skip to content

Commit 0365447

Browse files
authored
feat!: enable populateAppCallResources by default (#388)
1 parent 88445bc commit 0365447

File tree

8 files changed

+25
-30
lines changed

8 files changed

+25
-30
lines changed

docs/code/classes/types_composer.TransactionComposer.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ An alias for `composer.send(params)`.
17951795

17961796
#### Defined in
17971797

1798-
[src/types/composer.ts:1982](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1982)
1798+
[src/types/composer.ts:1980](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1980)
17991799

18001800
___
18011801

@@ -1845,14 +1845,12 @@ The execution result
18451845
**`Example`**
18461846

18471847
```typescript
1848-
const result = await composer.send({
1849-
populateAppCallResources: true,
1850-
})
1848+
const result = await composer.send()
18511849
```
18521850

18531851
#### Defined in
18541852

1855-
[src/types/composer.ts:1941](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1941)
1853+
[src/types/composer.ts:1939](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1939)
18561854

18571855
___
18581856

@@ -1876,7 +1874,7 @@ const result = await composer.simulate()
18761874

18771875
#### Defined in
18781876

1879-
[src/types/composer.ts:1994](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1994)
1877+
[src/types/composer.ts:1992](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L1992)
18801878

18811879
▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\>
18821880

@@ -1910,7 +1908,7 @@ const result = await composer.simulate({
19101908

19111909
#### Defined in
19121910

1913-
[src/types/composer.ts:2005](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2005)
1911+
[src/types/composer.ts:2003](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2003)
19141912

19151913
▸ **simulate**(`options`): `Promise`\<[`SendAtomicTransactionComposerResults`](../interfaces/types_transaction.SendAtomicTransactionComposerResults.md) & \{ `simulateResponse`: `SimulateResponse` }\>
19161914

@@ -1945,7 +1943,7 @@ const result = await composer.simulate({
19451943

19461944
#### Defined in
19471945

1948-
[src/types/composer.ts:2018](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2018)
1946+
[src/types/composer.ts:2016](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2016)
19491947

19501948
___
19511949

@@ -1971,4 +1969,4 @@ The binary encoded transaction note
19711969

19721970
#### Defined in
19731971

1974-
[src/types/composer.ts:2095](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2095)
1972+
[src/types/composer.ts:2093](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/composer.ts#L2093)

docs/code/modules/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ the estimated rate.
575575

576576
#### Defined in
577577

578-
[src/transaction/transaction.ts:1058](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1058)
578+
[src/transaction/transaction.ts:1057](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1057)
579579

580580
___
581581

@@ -639,7 +639,7 @@ Allows for control of fees on a `Transaction` or `SuggestedParams` object
639639

640640
#### Defined in
641641

642-
[src/transaction/transaction.ts:1085](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1085)
642+
[src/transaction/transaction.ts:1084](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1084)
643643

644644
___
645645

@@ -966,7 +966,7 @@ Converts `bigint`'s for Uint's < 64 to `number` for easier use.
966966

967967
#### Defined in
968968

969-
[src/transaction/transaction.ts:928](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L928)
969+
[src/transaction/transaction.ts:927](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L927)
970970

971971
___
972972

@@ -1942,7 +1942,7 @@ Returns the array of transactions currently present in the given `AtomicTransact
19421942

19431943
#### Defined in
19441944

1945-
[src/transaction/transaction.ts:1134](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1134)
1945+
[src/transaction/transaction.ts:1133](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1133)
19461946

19471947
___
19481948

@@ -2329,7 +2329,7 @@ Returns suggested transaction parameters from algod unless some are already prov
23292329

23302330
#### Defined in
23312331

2332-
[src/transaction/transaction.ts:1112](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1112)
2332+
[src/transaction/transaction.ts:1111](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1111)
23332333

23342334
___
23352335

@@ -2761,7 +2761,7 @@ A new ATC with the resources populated into the transactions
27612761

27622762
#### Defined in
27632763

2764-
[src/transaction/transaction.ts:383](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L383)
2764+
[src/transaction/transaction.ts:382](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L382)
27652765

27662766
___
27672767

@@ -2790,7 +2790,7 @@ A new ATC with the changes applied
27902790

27912791
#### Defined in
27922792

2793-
[src/transaction/transaction.ts:402](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L402)
2793+
[src/transaction/transaction.ts:401](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L401)
27942794

27952795
___
27962796

@@ -2940,7 +2940,7 @@ An object with transaction IDs, transactions, group transaction ID (`groupTransa
29402940

29412941
#### Defined in
29422942

2943-
[src/transaction/transaction.ts:777](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L777)
2943+
[src/transaction/transaction.ts:776](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L776)
29442944

29452945
___
29462946

@@ -2969,7 +2969,7 @@ Signs and sends a group of [up to 16](https://developer.algorand.org/docs/get-de
29692969

29702970
#### Defined in
29712971

2972-
[src/transaction/transaction.ts:957](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L957)
2972+
[src/transaction/transaction.ts:956](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L956)
29732973

29742974
___
29752975

@@ -3242,4 +3242,4 @@ Throws an error if the transaction is not confirmed or rejected in the next `tim
32423242

32433243
#### Defined in
32443244

3245-
[src/transaction/transaction.ts:1001](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1001)
3245+
[src/transaction/transaction.ts:1000](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/transaction/transaction.ts#L1000)

src/__snapshots__/app-deploy.spec.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ INFO: Detected a TEAL update in app APP_1 for creator ACCOUNT_1
2525
WARN: App is not deletable and onUpdate=ReplaceApp, will attempt to create new app and delete old app, delete will most likely fail
2626
INFO: Deploying a new test app for ACCOUNT_1; deploying app with version 2.0.
2727
WARN: Deleting existing test app with id APP_1 from ACCOUNT_1 account.
28-
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"}]"
28+
ERROR: Received error executing Atomic Transaction Composer, for more information enable the debug flag | [{"cause":{},"name":"Error"}]"
2929
`;
3030

3131
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
7474
INFO: App is not deletable but onSchemaBreak=ReplaceApp, will attempt to delete app, delete will most likely fail
7575
INFO: Deploying a new test app for ACCOUNT_1; deploying app with version 2.0.
7676
WARN: Deleting existing test app with id APP_1 from ACCOUNT_1 account.
77-
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"}]"
77+
ERROR: Received error executing Atomic Transaction Composer, for more information enable the debug flag | [{"cause":{},"name":"Error"}]"
7878
`;
7979

8080
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
8383
INFO: Detected a TEAL update in app APP_1 for creator ACCOUNT_1
8484
WARN: App is not updatable but onUpdate=UpdateApp, will attempt to update app, update will most likely fail
8585
INFO: Updating existing test app for ACCOUNT_1 to version 2.0.
86-
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":[]}]"
86+
ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{},"name":"Error","traces":[]}]"
8787
`;
8888

8989
exports[`deploy-app > Deploy update to updatable updated app 1`] = `

src/transaction/transaction.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ export const sendTransaction = async function (
233233
const populateAppCallResources = sendParams?.populateAppCallResources ?? Config.populateAppCallResources
234234

235235
// Populate resources if the transaction is an appcall and populateAppCallResources wasn't explicitly set to false
236-
// NOTE: Temporary false by default until this algod bug is fixed: https://github.com/algorand/go-algorand/issues/5914
237236
if (txnToSend.type === algosdk.TransactionType.appl && populateAppCallResources) {
238237
const newAtc = new AtomicTransactionComposer()
239238
newAtc.addTransaction({ txn: txnToSend, signer: getSenderTransactionSigner(from) })

src/types/__snapshots__/app-client.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ exports[`application-client > Errors > Display nice error messages when there is
55
INFO: App TestingApp not found in apps created by ACCOUNT_1; deploying app with version 1.0.
66
VERBOSE: Sent transaction ID TXID_1 appl from ACCOUNT_1
77
DEBUG: App created by ACCOUNT_1 with ID APP_1 via transaction TXID_1
8-
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":[]}]"
8+
ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{},"name":"Error","traces":[]}]"
99
`;

src/types/__snapshots__/app-factory-and-client.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ exports[`ARC32: app-factory-and-app-client > Errors > Display nice error message
55
INFO: App TestingApp not found in apps created by ACCOUNT_1; deploying app with version 1.0.
66
VERBOSE: Sent transaction ID TXID_1 appl from ACCOUNT_1
77
DEBUG: App created by ACCOUNT_1 with ID APP_1 via transaction TXID_1
8-
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":[]}]
9-
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
8+
ERROR: Received error executing Atomic Transaction Composer and debug flag enabled; attempting simulation to get more information | [{"cause":{},"name":"Error","traces":[]}]
9+
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
1010
1111
464: // error
1212
465: error_7:

src/types/composer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,9 +1933,7 @@ export class TransactionComposer {
19331933
* @returns The execution result
19341934
* @example
19351935
* ```typescript
1936-
* const result = await composer.send({
1937-
* populateAppCallResources: true,
1938-
* })
1936+
* const result = await composer.send()
19391937
* ```
19401938
*/
19411939
async send(params?: SendParams): Promise<SendAtomicTransactionComposerResults> {

src/types/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class UpdatableConfig implements Readonly<Config> {
9595
traceAll: false,
9696
traceBufferSizeMb: 256,
9797
maxSearchDepth: 10,
98-
populateAppCallResources: false,
98+
populateAppCallResources: true,
9999
events: new AsyncEventEmitter(),
100100
}
101101
}

0 commit comments

Comments
 (0)