Skip to content

Commit 0bf2c96

Browse files
committed
feat: add first and last valid to this.txn
1 parent 6011b07 commit 0bf2c96

File tree

6 files changed

+642
-493
lines changed

6 files changed

+642
-493
lines changed

tests/contracts/artifacts/GeneralTest.approval.teal

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,28 @@ reassignedNonFirstVar:
28282828
popn 1
28292829
retsub
28302830

2831+
// fvLv()void
2832+
*abi_route_fvLv:
2833+
// execute fvLv()void
2834+
callsub fvLv
2835+
int 1
2836+
return
2837+
2838+
// fvLv(): void
2839+
fvLv:
2840+
proto 0 0
2841+
2842+
// tests/contracts/general.algo.ts:557
2843+
// assert(this.txn.firstValid)
2844+
txn FirstValid
2845+
assert
2846+
2847+
// tests/contracts/general.algo.ts:558
2848+
// assert(this.txn.lastValid)
2849+
txn LastValid
2850+
assert
2851+
retsub
2852+
28312853
*abi_route_createApplication:
28322854
int 1
28332855
return
@@ -2914,8 +2936,9 @@ reassignedNonFirstVar:
29142936
method "b()uint64"
29152937
method "unusedMethodValue()uint64"
29162938
method "reassignedNonFirstVar()uint64"
2939+
method "fvLv()void"
29172940
txna ApplicationArgs 0
2918-
match *abi_route_txnTypeEnum *abi_route_txnGroupLength *abi_route_asserts *abi_route_verifyTxnFromArg *abi_route_verifyTxnFromTxnGroup *abi_route_verifyTxnCondition *abi_route_verifyTxnIncludedIn *abi_route_verifyTxnNotIncludedIn *abi_route_submitPendingGroup *abi_route_methodWithTxnArgs *abi_route_shift *abi_route_fromBytes *abi_route_fromUint64 *abi_route_bzeroFunction *abi_route_events *abi_route_letOptimization *abi_route_staticContractProperties *abi_route_numberToString *abi_route_methodOnParens *abi_route_stringSubstring *abi_route_idProperty *abi_route_scratchSlot *abi_route_ecdsa *abi_route_verifyTxnTypes *abi_route_stringPlusEquals *abi_route_importedProgram *abi_route_callPrivateDefinedLater *abi_route_interalPublicMethod *abi_route_callInternalPublicMethod *abi_route_appLoadScratch *abi_route_uintNWithUnderscore *abi_route_opUp *abi_route_returnValueOnAssignment *abi_route_returnArrayValueOnAssignment *abi_route_returnStorageValueOnAssignment *abi_route_returnOperatorAssignmentValue *abi_route_returnArrayValueOnOperatorAssignment *abi_route_returnArrayInStorageValueOnOperatorAssignment *abi_route_consts *abi_route_assertWithMessage *abi_route_opcodeAliases *abi_route_vrfVerifyOp *abi_route_ecMath *abi_route_gitxn *abi_route_getSetBytes *abi_route_getSetUint64 *abi_route_blockOp *abi_route_b64 *abi_route_json *abi_route_bitlenOp *abi_route_computedConst *abi_route_multiComputedConst *abi_route_readSchema *abi_route_comparisonOr *abi_route_txnArgsMethod *abi_route_callTxnArgsMethod *abi_route_staticValueLen *abi_route_staticTypeLen *abi_route_dynamicScratchSlot *abi_route_incrementScratchSlot *abi_route_incrementDynamicScratchSlot *abi_route_fromAddress *abi_route_earlyReturn *abi_route_assetMethodArgs *abi_route_multipleProgramPages *abi_route_assertComment *abi_route_throwErrorMessage *abi_route_orLiteralType *abi_route_multilineFunctionCall *abi_route_a *abi_route_b *abi_route_unusedMethodValue *abi_route_reassignedNonFirstVar
2941+
match *abi_route_txnTypeEnum *abi_route_txnGroupLength *abi_route_asserts *abi_route_verifyTxnFromArg *abi_route_verifyTxnFromTxnGroup *abi_route_verifyTxnCondition *abi_route_verifyTxnIncludedIn *abi_route_verifyTxnNotIncludedIn *abi_route_submitPendingGroup *abi_route_methodWithTxnArgs *abi_route_shift *abi_route_fromBytes *abi_route_fromUint64 *abi_route_bzeroFunction *abi_route_events *abi_route_letOptimization *abi_route_staticContractProperties *abi_route_numberToString *abi_route_methodOnParens *abi_route_stringSubstring *abi_route_idProperty *abi_route_scratchSlot *abi_route_ecdsa *abi_route_verifyTxnTypes *abi_route_stringPlusEquals *abi_route_importedProgram *abi_route_callPrivateDefinedLater *abi_route_interalPublicMethod *abi_route_callInternalPublicMethod *abi_route_appLoadScratch *abi_route_uintNWithUnderscore *abi_route_opUp *abi_route_returnValueOnAssignment *abi_route_returnArrayValueOnAssignment *abi_route_returnStorageValueOnAssignment *abi_route_returnOperatorAssignmentValue *abi_route_returnArrayValueOnOperatorAssignment *abi_route_returnArrayInStorageValueOnOperatorAssignment *abi_route_consts *abi_route_assertWithMessage *abi_route_opcodeAliases *abi_route_vrfVerifyOp *abi_route_ecMath *abi_route_gitxn *abi_route_getSetBytes *abi_route_getSetUint64 *abi_route_blockOp *abi_route_b64 *abi_route_json *abi_route_bitlenOp *abi_route_computedConst *abi_route_multiComputedConst *abi_route_readSchema *abi_route_comparisonOr *abi_route_txnArgsMethod *abi_route_callTxnArgsMethod *abi_route_staticValueLen *abi_route_staticTypeLen *abi_route_dynamicScratchSlot *abi_route_incrementScratchSlot *abi_route_incrementDynamicScratchSlot *abi_route_fromAddress *abi_route_earlyReturn *abi_route_assetMethodArgs *abi_route_multipleProgramPages *abi_route_assertComment *abi_route_throwErrorMessage *abi_route_orLiteralType *abi_route_multilineFunctionCall *abi_route_a *abi_route_b *abi_route_unusedMethodValue *abi_route_reassignedNonFirstVar *abi_route_fvLv
29192942

29202943
// !!!! WARNING: non-ABI routing
29212944
callsub nonAbi

tests/contracts/artifacts/GeneralTest.arc32.json

Lines changed: 13 additions & 1 deletion
Large diffs are not rendered by default.

tests/contracts/artifacts/GeneralTest.arc4.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,13 @@
583583
"type": "uint64"
584584
}
585585
},
586+
{
587+
"name": "fvLv",
588+
"args": [],
589+
"returns": {
590+
"type": "void"
591+
}
592+
},
586593
{
587594
"name": "createApplication",
588595
"args": [],

0 commit comments

Comments
 (0)