algorand: Ensure optin transaction is the current transaction (#3131)
* Ensure optin transaction is the current transaction and address the algo_seed transaction in a relative manner. * Added core_approve.teal based on previous change. * Fixed admin.py to make the tests pass.
This commit is contained in:
parent
19b0c6d423
commit
0dcc53cbf8
|
@ -1151,7 +1151,7 @@ class PortalCore:
|
|||
off += 2
|
||||
ret["Fee"] = vaa[off:(off + 32)].hex()
|
||||
|
||||
if int.from_bytes((vaa[off:off+1]), "big") == 3:
|
||||
if len(vaa[off:]) > 133 and int.from_bytes((vaa[off:off+1]), "big") == 3:
|
||||
ret["Meta"] = "TokenBridge Transfer With Payload"
|
||||
ret["Type"] = int.from_bytes((vaa[off:off+1]), "big")
|
||||
off += 1
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -126,8 +126,8 @@ def getCoreContracts( genTeal, approve_name, clear_name,
|
|||
@Subroutine(TealType.uint64)
|
||||
def optin():
|
||||
# Alias for readability
|
||||
algo_seed = Gtxn[0]
|
||||
optin = Gtxn[1]
|
||||
algo_seed = Gtxn[Txn.group_index() - Int(1)]
|
||||
optin = Txn
|
||||
|
||||
well_formed_optin = And(
|
||||
# Check that we're paying it
|
||||
|
|
Loading…
Reference in New Issue