Skip to content

Commit

Permalink
Re-order box args to avoid breaking changes (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpaulos authored Sep 26, 2022
1 parent 5e97b5c commit 4026bf5
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 37 deletions.
70 changes: 35 additions & 35 deletions src/makeTxn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1100,11 +1100,11 @@ export function makeAssetTransferTxnWithSuggestedParamsFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param extraPages - integer extra pages of memory to rent on creation of application
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationCreateTxn(
from: AppCreateTxn['from'],
Expand All @@ -1120,11 +1120,11 @@ export function makeApplicationCreateTxn(
accounts?: AppCreateTxn['appAccounts'],
foreignApps?: AppCreateTxn['appForeignApps'],
foreignAssets?: AppCreateTxn['appForeignAssets'],
boxes?: AppCreateTxn['boxes'],
note?: AppCreateTxn['note'],
lease?: AppCreateTxn['lease'],
rekeyTo?: AppCreateTxn['reKeyTo'],
extraPages?: AppCreateTxn['extraPages']
extraPages?: AppCreateTxn['extraPages'],
boxes?: AppCreateTxn['boxes']
) {
const o: AppCreateTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1206,11 +1206,11 @@ export function makeApplicationCreateTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo,
o.extraPages
o.extraPages,
o.boxes
);
}

Expand All @@ -1232,10 +1232,10 @@ export function makeApplicationCreateTxnFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationUpdateTxn(
from: AppUpdateTxn['from'],
Expand All @@ -1247,10 +1247,10 @@ export function makeApplicationUpdateTxn(
accounts?: AppUpdateTxn['appAccounts'],
foreignApps?: AppUpdateTxn['appForeignApps'],
foreignAssets?: AppUpdateTxn['appForeignAssets'],
boxes?: AppUpdateTxn['boxes'],
note?: AppUpdateTxn['note'],
lease?: AppUpdateTxn['lease'],
rekeyTo?: AppUpdateTxn['reKeyTo']
rekeyTo?: AppUpdateTxn['reKeyTo'],
boxes?: AppUpdateTxn['boxes']
) {
const o: AppUpdateTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1313,10 +1313,10 @@ export function makeApplicationUpdateTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo
o.rekeyTo,
o.boxes
);
}

Expand All @@ -1336,10 +1336,10 @@ export function makeApplicationUpdateTxnFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationDeleteTxn(
from: AppDeleteTxn['from'],
Expand All @@ -1349,10 +1349,10 @@ export function makeApplicationDeleteTxn(
accounts?: AppDeleteTxn['appAccounts'],
foreignApps?: AppDeleteTxn['appForeignApps'],
foreignAssets?: AppDeleteTxn['appForeignAssets'],
boxes?: AppDeleteTxn['boxes'],
note?: AppDeleteTxn['note'],
lease?: AppDeleteTxn['lease'],
rekeyTo?: AppDeleteTxn['reKeyTo']
rekeyTo?: AppDeleteTxn['reKeyTo'],
boxes?: AppDeleteTxn['boxes']
) {
const o: AppDeleteTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1407,10 +1407,10 @@ export function makeApplicationDeleteTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo
o.rekeyTo,
o.boxes
);
}

Expand All @@ -1430,10 +1430,10 @@ export function makeApplicationDeleteTxnFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationOptInTxn(
from: AppOptInTxn['from'],
Expand All @@ -1443,10 +1443,10 @@ export function makeApplicationOptInTxn(
accounts?: AppOptInTxn['appAccounts'],
foreignApps?: AppOptInTxn['appForeignApps'],
foreignAssets?: AppOptInTxn['appForeignAssets'],
boxes?: AppOptInTxn['boxes'],
note?: AppOptInTxn['note'],
lease?: AppOptInTxn['lease'],
rekeyTo?: AppOptInTxn['reKeyTo']
rekeyTo?: AppOptInTxn['reKeyTo'],
boxes?: AppOptInTxn['boxes']
) {
const o: AppOptInTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1501,10 +1501,10 @@ export function makeApplicationOptInTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo
o.rekeyTo,
o.boxes
);
}

Expand All @@ -1524,10 +1524,10 @@ export function makeApplicationOptInTxnFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationCloseOutTxn(
from: AppCloseOutTxn['from'],
Expand All @@ -1537,10 +1537,10 @@ export function makeApplicationCloseOutTxn(
accounts?: AppCloseOutTxn['appAccounts'],
foreignApps?: AppCloseOutTxn['appForeignApps'],
foreignAssets?: AppCloseOutTxn['appForeignAssets'],
boxes?: AppCloseOutTxn['boxes'],
note?: AppCloseOutTxn['note'],
lease?: AppCloseOutTxn['lease'],
rekeyTo?: AppCloseOutTxn['reKeyTo']
rekeyTo?: AppCloseOutTxn['reKeyTo'],
boxes?: AppCloseOutTxn['boxes']
) {
const o: AppCloseOutTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1595,10 +1595,10 @@ export function makeApplicationCloseOutTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo
o.rekeyTo,
o.boxes
);
}

Expand All @@ -1618,10 +1618,10 @@ export function makeApplicationCloseOutTxnFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationClearStateTxn(
from: AppClearStateTxn['from'],
Expand All @@ -1631,10 +1631,10 @@ export function makeApplicationClearStateTxn(
accounts?: AppClearStateTxn['appAccounts'],
foreignApps?: AppClearStateTxn['appForeignApps'],
foreignAssets?: AppClearStateTxn['appForeignAssets'],
boxes?: AppClearStateTxn['boxes'],
note?: AppClearStateTxn['note'],
lease?: AppClearStateTxn['lease'],
rekeyTo?: AppClearStateTxn['reKeyTo']
rekeyTo?: AppClearStateTxn['reKeyTo'],
boxes?: AppClearStateTxn['boxes']
) {
const o: AppClearStateTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1689,10 +1689,10 @@ export function makeApplicationClearStateTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo
o.rekeyTo,
o.boxes
);
}

Expand All @@ -1712,10 +1712,10 @@ export function makeApplicationClearStateTxnFromObject(
* @param accounts - Array of Address strings, any additional accounts to supply to the application
* @param foreignApps - Array of int, any other apps used by the application, identified by index
* @param foreignAssets - Array of int, any assets used by the application, identified by index
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
* @param note - Arbitrary data for sender to store
* @param lease - Lease a transaction
* @param rekeyTo - String representation of the Algorand address that will be used to authorize all future transactions
* @param boxes - Array of BoxReference, app ID and name of box to be accessed
*/
export function makeApplicationNoOpTxn(
from: AppNoOpTxn['from'],
Expand All @@ -1725,10 +1725,10 @@ export function makeApplicationNoOpTxn(
accounts?: AppNoOpTxn['appAccounts'],
foreignApps?: AppNoOpTxn['appForeignApps'],
foreignAssets?: AppNoOpTxn['appForeignAssets'],
boxes?: AppNoOpTxn['boxes'],
note?: AppNoOpTxn['note'],
lease?: AppNoOpTxn['lease'],
rekeyTo?: AppNoOpTxn['reKeyTo']
rekeyTo?: AppNoOpTxn['reKeyTo'],
boxes?: AppNoOpTxn['boxes']
) {
const o: AppNoOpTxn = {
type: TransactionType.appl,
Expand Down Expand Up @@ -1783,10 +1783,10 @@ export function makeApplicationNoOpTxnFromObject(
o.accounts,
o.foreignApps,
o.foreignAssets,
o.boxes,
o.note,
o.lease,
o.rekeyTo
o.rekeyTo,
o.boxes
);
}

Expand Down
19 changes: 17 additions & 2 deletions tests/cucumber/steps/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -3196,6 +3196,9 @@ module.exports = function getSteps(options) {
appAccounts,
foreignApps,
foreignAssets,
undefined,
undefined,
undefined,
boxes
);
return;
Expand All @@ -3214,11 +3217,11 @@ module.exports = function getSteps(options) {
appAccounts,
foreignApps,
foreignAssets,
boxes,
undefined,
undefined,
undefined,
extraPages
extraPages,
boxes
);
return;
case 'update':
Expand All @@ -3232,6 +3235,9 @@ module.exports = function getSteps(options) {
appAccounts,
foreignApps,
foreignAssets,
undefined,
undefined,
undefined,
boxes
);
return;
Expand All @@ -3244,6 +3250,9 @@ module.exports = function getSteps(options) {
appAccounts,
foreignApps,
foreignAssets,
undefined,
undefined,
undefined,
boxes
);
return;
Expand All @@ -3256,6 +3265,9 @@ module.exports = function getSteps(options) {
appAccounts,
foreignApps,
foreignAssets,
undefined,
undefined,
undefined,
boxes
);
return;
Expand All @@ -3280,6 +3292,9 @@ module.exports = function getSteps(options) {
appAccounts,
foreignApps,
foreignAssets,
undefined,
undefined,
undefined,
boxes
);
return;
Expand Down

0 comments on commit 4026bf5

Please sign in to comment.