diff --git a/package-lock.json b/package-lock.json index 94894e86f..393209593 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "license": "MIT", "dependencies": { "algo-msgpack-with-bigint": "^2.1.1", - "buffer": "^6.0.3", "hi-base32": "^0.5.1", "js-sha256": "^0.9.0", "js-sha3": "^0.8.0", @@ -1428,25 +1427,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/becke-ch--regex--s0-0-v1--base--pl--lib": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz", @@ -1587,29 +1567,6 @@ "url": "https://opencollective.com/browserslist" } }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -4338,25 +4295,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -9291,11 +9229,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, "becke-ch--regex--s0-0-v1--base--pl--lib": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz", @@ -9409,15 +9342,6 @@ "node-releases": "^1.1.71" } }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", @@ -11468,11 +11392,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", diff --git a/src/client/v2/algod/models/types.ts b/src/client/v2/algod/models/types.ts index 5dfac8bfa..51c48805c 100644 --- a/src/client/v2/algod/models/types.ts +++ b/src/client/v2/algod/models/types.ts @@ -4896,6 +4896,19 @@ export class SimulationTransactionExecTrace extends BaseModel { */ public clearStateProgramTrace?: SimulationOpcodeTraceUnit[]; + /** + * If true, indicates that the clear state program failed and any persistent state + * changes it produced should be reverted once the program exits. + */ + public clearStateRollback?: boolean; + + /** + * The error message explaining why the clear state program failed. This field will + * only be populated if clear-state-rollback is true and the failure was due to an + * execution error. + */ + public clearStateRollbackError?: string; + /** * An array of SimulationTransactionExecTrace representing the execution trace of * any inner transactions executed. @@ -4918,6 +4931,11 @@ export class SimulationTransactionExecTrace extends BaseModel { * @param approvalProgramTrace - Program trace that contains a trace of opcode effects in an approval program. * @param clearStateProgramHash - SHA512_256 hash digest of the clear state program executed in transaction. * @param clearStateProgramTrace - Program trace that contains a trace of opcode effects in a clear state program. + * @param clearStateRollback - If true, indicates that the clear state program failed and any persistent state + * changes it produced should be reverted once the program exits. + * @param clearStateRollbackError - The error message explaining why the clear state program failed. This field will + * only be populated if clear-state-rollback is true and the failure was due to an + * execution error. * @param innerTrace - An array of SimulationTransactionExecTrace representing the execution trace of * any inner transactions executed. * @param logicSigHash - SHA512_256 hash digest of the logic sig executed in transaction. @@ -4928,6 +4946,8 @@ export class SimulationTransactionExecTrace extends BaseModel { approvalProgramTrace, clearStateProgramHash, clearStateProgramTrace, + clearStateRollback, + clearStateRollbackError, innerTrace, logicSigHash, logicSigTrace, @@ -4936,6 +4956,8 @@ export class SimulationTransactionExecTrace extends BaseModel { approvalProgramTrace?: SimulationOpcodeTraceUnit[]; clearStateProgramHash?: string | Uint8Array; clearStateProgramTrace?: SimulationOpcodeTraceUnit[]; + clearStateRollback?: boolean; + clearStateRollbackError?: string; innerTrace?: SimulationTransactionExecTrace[]; logicSigHash?: string | Uint8Array; logicSigTrace?: SimulationOpcodeTraceUnit[]; @@ -4951,6 +4973,8 @@ export class SimulationTransactionExecTrace extends BaseModel { ? base64ToBytes(clearStateProgramHash) : clearStateProgramHash; this.clearStateProgramTrace = clearStateProgramTrace; + this.clearStateRollback = clearStateRollback; + this.clearStateRollbackError = clearStateRollbackError; this.innerTrace = innerTrace; this.logicSigHash = typeof logicSigHash === 'string' @@ -4963,6 +4987,8 @@ export class SimulationTransactionExecTrace extends BaseModel { approvalProgramTrace: 'approval-program-trace', clearStateProgramHash: 'clear-state-program-hash', clearStateProgramTrace: 'clear-state-program-trace', + clearStateRollback: 'clear-state-rollback', + clearStateRollbackError: 'clear-state-rollback-error', innerTrace: 'inner-trace', logicSigHash: 'logic-sig-hash', logicSigTrace: 'logic-sig-trace', @@ -4989,6 +5015,8 @@ export class SimulationTransactionExecTrace extends BaseModel { SimulationOpcodeTraceUnit.from_obj_for_encoding ) : undefined, + clearStateRollback: data['clear-state-rollback'], + clearStateRollbackError: data['clear-state-rollback-error'], innerTrace: typeof data['inner-trace'] !== 'undefined' ? data['inner-trace'].map(