wormhole/algorand/teal/token_approve.teal

2291 lines
26 KiB
Plaintext
Raw Permalink Normal View History

2022-04-29 12:53:48 -07:00
#pragma version 6
2022-08-12 06:44:24 -07:00
intcblock 0 1 2 127 133 128 255
2022-09-27 03:44:29 -07:00
bytecblock 0x 0x636f72656964 0x436861696e 0x6e6174697665 0x7075626c6973684d657373616765 0x6e6f70 0x766572696679564141 0x0008 0x76616c6964557064617465417070726f766548617368 0x414c474f 0x50726f6772616d 0x636f726541646472
2022-04-29 12:53:48 -07:00
txn ApplicationID
intc_0 // 0
==
2022-08-12 06:44:24 -07:00
bnz main_l81
2022-04-29 12:53:48 -07:00
txn OnCompletion
pushint 4 // UpdateApplication
==
2022-08-12 06:44:24 -07:00
bnz main_l80
2022-04-29 12:53:48 -07:00
txn OnCompletion
pushint 5 // DeleteApplication
==
2022-08-12 06:44:24 -07:00
bnz main_l79
2022-04-29 12:53:48 -07:00
txn OnCompletion
intc_1 // OptIn
==
2022-08-12 06:44:24 -07:00
bnz main_l78
2022-04-29 12:53:48 -07:00
txn OnCompletion
intc_0 // NoOp
==
bnz main_l6
err
main_l6:
txna ApplicationArgs 0
bytec 5 // "nop"
==
2022-08-12 06:44:24 -07:00
bnz main_l77
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 0
pushbytes 0x72656365697665417474657374 // "receiveAttest"
==
2022-08-12 06:44:24 -07:00
bnz main_l70
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 0
pushbytes 0x617474657374546f6b656e // "attestToken"
==
2022-08-12 06:44:24 -07:00
bnz main_l58
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 0
pushbytes 0x636f6d706c6574655472616e73666572 // "completeTransfer"
==
bnz main_l41
txna ApplicationArgs 0
pushbytes 0x73656e645472616e73666572 // "sendTransfer"
==
bnz main_l21
txna ApplicationArgs 0
pushbytes 0x6f7074696e // "optin"
==
bnz main_l20
txna ApplicationArgs 0
pushbytes 0x676f7665726e616e6365 // "governance"
==
bnz main_l14
err
main_l14:
callsub checkForDuplicate_21
callsub governanceSet_7
2022-08-12 06:44:24 -07:00
store 67
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
extract 1 4
btoi
2022-08-12 06:44:24 -07:00
load 67
2022-04-29 12:53:48 -07:00
==
assert
txna ApplicationArgs 1
extract 5 1
btoi
pushint 66 // 66
*
pushint 14 // 14
+
2022-08-12 06:44:24 -07:00
store 62
2022-04-29 12:53:48 -07:00
txn GroupIndex
intc_1 // 1
-
2022-08-12 06:44:24 -07:00
store 68
load 68
2022-04-29 12:53:48 -07:00
gtxns TypeEnum
pushint 6 // appl
==
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxns ApplicationID
bytec_1 // "coreid"
app_global_get
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxnsa ApplicationArgs 0
bytec 6 // "verifyVAA"
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxns Sender
txn Sender
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-09-19 07:08:55 -07:00
gtxns OnCompletion
intc_0 // NoOp
==
&&
load 68
2022-04-29 12:53:48 -07:00
gtxnsa ApplicationArgs 1
txna ApplicationArgs 1
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxnsa Accounts 0
txna Accounts 0
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxnsa Accounts 1
txna Accounts 1
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxnsa Accounts 2
txna Accounts 2
==
&&
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
intc_2 // 2
extract3
pushbytes 0x0001 // 0x0001
==
&&
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
intc_2 // 2
+
pushint 32 // 32
extract3
pushint 31 // 31
bzero
pushbytes 0x04 // 0x04
concat
==
&&
assert
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxns RekeyTo
global ZeroAddress
==
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxns CloseRemainderTo
global ZeroAddress
==
&&
2022-08-12 06:44:24 -07:00
load 68
2022-04-29 12:53:48 -07:00
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 68
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txn RekeyTo
global ZeroAddress
==
txn CloseRemainderTo
global ZeroAddress
==
&&
txn AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
txn OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
pushint 43 // 43
+
pushint 32 // 32
extract3
pushint 21 // 21
bzero
pushbytes 0x546f6b656e427269646765 // 0x546f6b656e427269646765
concat
==
assert
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
pushint 75 // 75
+
intc_1 // 1
extract3
btoi
2022-08-12 06:44:24 -07:00
store 63
load 62
2022-04-29 12:53:48 -07:00
pushint 76 // 76
+
2022-08-12 06:44:24 -07:00
store 62
load 63
2022-04-29 12:53:48 -07:00
intc_1 // 1
==
bnz main_l19
2022-08-12 06:44:24 -07:00
load 63
2022-04-29 12:53:48 -07:00
intc_2 // 2
==
bnz main_l17
err
main_l17:
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
intc_2 // 2
extract3
bytec 7 // 0x0008
==
assert
bytec 8 // "validUpdateApproveHash"
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
intc_2 // 2
+
pushint 32 // 32
extract3
app_global_put
main_l18:
intc_1 // 1
return
main_l19:
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
intc_2 // 2
extract3
btoi
2022-08-12 06:44:24 -07:00
store 64
load 64
2022-04-29 12:53:48 -07:00
intc_0 // 0
==
2022-08-12 06:44:24 -07:00
load 64
2022-04-29 12:53:48 -07:00
pushint 8 // 8
==
||
assert
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
intc_2 // 2
+
intc_2 // 2
extract3
2022-08-12 06:44:24 -07:00
store 65
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 62
2022-04-29 12:53:48 -07:00
pushint 4 // 4
+
pushint 32 // 32
extract3
2022-08-12 06:44:24 -07:00
store 66
2022-04-29 12:53:48 -07:00
bytec_2 // "Chain"
2022-08-12 06:44:24 -07:00
load 65
2022-04-29 12:53:48 -07:00
concat
app_global_get
intc_0 // 0
==
assert
bytec_2 // "Chain"
2022-08-12 06:44:24 -07:00
load 65
2022-04-29 12:53:48 -07:00
concat
2022-08-12 06:44:24 -07:00
load 66
2022-04-29 12:53:48 -07:00
app_global_put
b main_l18
main_l20:
txna Accounts 1
txna ApplicationArgs 1
btoi
bytec_3 // "native"
callsub getsigaddress_15
==
assert
txn RekeyTo
global ZeroAddress
==
txn CloseRemainderTo
global ZeroAddress
==
&&
txn AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
txn OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
itxn_begin
txna Accounts 1
itxn_field Sender
pushint 4 // axfer
itxn_field TypeEnum
txna ApplicationArgs 1
btoi
itxn_field XferAsset
intc_0 // 0
itxn_field AssetAmount
txna Accounts 1
itxn_field AssetReceiver
intc_0 // 0
itxn_field Fee
itxn_submit
intc_1 // 1
return
main_l21:
callsub getMessageFee_8
store 23
pushint 32 // 32
bzero
2022-08-12 06:44:24 -07:00
store 59
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
btoi
2022-08-12 06:44:24 -07:00
store 52
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 5
btoi
2022-08-12 06:44:24 -07:00
store 61
2022-04-29 12:53:48 -07:00
intc_2 // 2
callsub checkFeePmt_10
txn GroupIndex
intc_1 // 1
-
store 22
2022-08-12 06:44:24 -07:00
load 52
2022-04-29 12:53:48 -07:00
intc_0 // 0
==
bnz main_l40
load 22
gtxns TypeEnum
pushint 4 // axfer
==
load 22
gtxns Sender
txn Sender
==
&&
load 22
gtxns XferAsset
2022-08-12 06:44:24 -07:00
load 52
2022-04-29 12:53:48 -07:00
==
&&
load 22
gtxns AssetReceiver
txna Accounts 2
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
load 22
gtxns AssetAmount
2022-08-12 06:44:24 -07:00
store 53
load 61
load 53
2022-04-29 12:53:48 -07:00
<=
assert
2022-08-12 06:44:24 -07:00
load 52
2022-04-29 12:53:48 -07:00
callsub extractdecimal_20
btoi
callsub getFactor_14
2022-08-12 06:44:24 -07:00
store 60
load 60
2022-04-29 12:53:48 -07:00
intc_1 // 1
!=
bnz main_l39
main_l23:
2022-08-12 06:44:24 -07:00
load 53
2022-04-29 12:53:48 -07:00
intc_0 // 0
>
2022-08-12 06:44:24 -07:00
load 61
2022-04-29 12:53:48 -07:00
intc_0 // 0
>=
&&
assert
2022-08-12 06:44:24 -07:00
load 52
2022-04-29 12:53:48 -07:00
intc_0 // 0
!=
bnz main_l38
bytec_0 // ""
2022-08-12 06:44:24 -07:00
store 56
2022-04-29 12:53:48 -07:00
main_l25:
2022-08-12 06:44:24 -07:00
load 56
2022-04-29 12:53:48 -07:00
global CurrentApplicationAddress
==
bnz main_l37
txna Accounts 2
2022-08-12 06:44:24 -07:00
load 52
2022-04-29 12:53:48 -07:00
bytec_3 // "native"
callsub getsigaddress_15
==
assert
bytec 7 // 0x0008
2022-08-12 06:44:24 -07:00
store 58
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
store 57
2022-04-29 12:53:48 -07:00
main_l27:
2022-08-12 06:44:24 -07:00
load 57
2022-04-29 12:53:48 -07:00
len
pushint 32 // 32
<=
2022-08-12 06:44:24 -07:00
load 58
2022-04-29 12:53:48 -07:00
len
intc_2 // 2
==
&&
txna ApplicationArgs 3
len
pushint 32 // 32
<=
&&
2022-08-12 06:44:24 -07:00
txn NumAppArgs
pushint 7 // 7
<=
2022-04-29 12:53:48 -07:00
&&
assert
txn NumAppArgs
2022-08-12 06:44:24 -07:00
pushint 7 // 7
2022-04-29 12:53:48 -07:00
==
bnz main_l36
2022-08-12 06:44:24 -07:00
pushbytes 0x01 // 0x01
2022-04-29 12:53:48 -07:00
main_l29:
2022-08-12 06:44:24 -07:00
load 59
2022-04-29 12:53:48 -07:00
extract 0 24
concat
2022-08-12 06:44:24 -07:00
load 53
2022-04-29 12:53:48 -07:00
itob
concat
2022-08-12 06:44:24 -07:00
load 59
2022-04-29 12:53:48 -07:00
intc_0 // 0
pushint 32 // 32
2022-08-12 06:44:24 -07:00
load 57
2022-04-29 12:53:48 -07:00
len
-
extract3
concat
2022-08-12 06:44:24 -07:00
load 57
2022-04-29 12:53:48 -07:00
concat
2022-08-12 06:44:24 -07:00
load 58
2022-04-29 12:53:48 -07:00
concat
2022-08-12 06:44:24 -07:00
load 59
2022-04-29 12:53:48 -07:00
intc_0 // 0
pushint 32 // 32
txna ApplicationArgs 3
len
-
extract3
concat
txna ApplicationArgs 3
concat
txna ApplicationArgs 4
extract 6 2
concat
txn NumAppArgs
pushint 7 // 7
==
bnz main_l35
2022-08-12 06:44:24 -07:00
load 59
extract 0 24
load 61
itob
concat
2022-04-29 12:53:48 -07:00
main_l31:
concat
2022-08-12 06:44:24 -07:00
store 54
2022-04-29 12:53:48 -07:00
txn NumAppArgs
pushint 7 // 7
==
bnz main_l34
2022-08-12 06:44:24 -07:00
load 54
2022-04-29 12:53:48 -07:00
len
intc 4 // 133
==
assert
main_l33:
itxn_begin
callsub sendMfee_11
pushint 6 // appl
itxn_field TypeEnum
bytec_1 // "coreid"
app_global_get
itxn_field ApplicationID
bytec 4 // "publishMessage"
itxn_field ApplicationArgs
2022-08-12 06:44:24 -07:00
load 54
2022-04-29 12:53:48 -07:00
itxn_field ApplicationArgs
intc_0 // 0
itob
itxn_field ApplicationArgs
txna Accounts 1
itxn_field Accounts
bytec 4 // "publishMessage"
itxn_field Note
intc_0 // 0
itxn_field Fee
itxn_submit
intc_1 // 1
return
main_l34:
2022-08-12 06:44:24 -07:00
load 54
2022-04-29 12:53:48 -07:00
len
intc 4 // 133
txna ApplicationArgs 6
len
+
==
assert
b main_l33
main_l35:
2022-08-12 06:44:24 -07:00
txn Sender
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 6
2022-08-12 06:44:24 -07:00
concat
2022-04-29 12:53:48 -07:00
b main_l31
main_l36:
2022-08-12 06:44:24 -07:00
pushbytes 0x03 // 0x03
2022-04-29 12:53:48 -07:00
b main_l29
main_l37:
intc_2 // 2
intc_0 // 0
pushint 8 // 8
callsub read_4
2022-08-12 06:44:24 -07:00
store 55
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 55
2022-04-29 12:53:48 -07:00
==
assert
intc_2 // 2
pushint 60 // 60
pushint 92 // 92
callsub read_4
2022-08-12 06:44:24 -07:00
store 57
2022-04-29 12:53:48 -07:00
intc_2 // 2
pushint 92 // 92
pushint 94 // 94
callsub read_4
2022-08-12 06:44:24 -07:00
store 58
2022-04-29 12:53:48 -07:00
txna Accounts 2
2022-08-12 06:44:24 -07:00
load 58
2022-04-29 12:53:48 -07:00
btoi
2022-08-12 06:44:24 -07:00
load 57
2022-04-29 12:53:48 -07:00
callsub getsigaddress_15
==
assert
b main_l27
main_l38:
2022-08-12 06:44:24 -07:00
load 52
2022-04-29 12:53:48 -07:00
callsub extractcreator_18
callsub authaddr_16
2022-08-12 06:44:24 -07:00
store 56
2022-04-29 12:53:48 -07:00
b main_l25
main_l39:
2022-08-12 06:44:24 -07:00
load 53
load 60
2022-04-29 12:53:48 -07:00
/
2022-08-12 06:44:24 -07:00
store 53
load 61
load 60
2022-04-29 12:53:48 -07:00
/
2022-08-12 06:44:24 -07:00
store 61
2022-04-29 12:53:48 -07:00
b main_l23
main_l40:
load 22
gtxns TypeEnum
intc_1 // pay
==
load 22
gtxns Sender
txn Sender
==
&&
load 22
gtxns Receiver
txna Accounts 2
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
load 22
gtxns Amount
2022-08-12 06:44:24 -07:00
store 53
load 61
load 53
<=
2022-04-29 12:53:48 -07:00
assert
b main_l23
main_l41:
callsub checkForDuplicate_21
pushint 32 // 32
bzero
2022-08-12 06:44:24 -07:00
store 49
2022-04-29 12:53:48 -07:00
txn GroupIndex
intc_1 // 1
-
store 22
load 22
gtxns TypeEnum
pushint 6 // appl
==
load 22
gtxns ApplicationID
bytec_1 // "coreid"
app_global_get
==
&&
load 22
gtxnsa ApplicationArgs 0
bytec 6 // "verifyVAA"
==
&&
load 22
gtxns Sender
txn Sender
==
&&
load 22
2022-09-19 07:08:55 -07:00
gtxns OnCompletion
intc_0 // NoOp
==
&&
load 22
2022-04-29 12:53:48 -07:00
gtxnsa ApplicationArgs 1
txna ApplicationArgs 1
==
&&
load 22
gtxnsa Accounts 0
txna Accounts 0
==
&&
load 22
gtxnsa Accounts 1
txna Accounts 1
==
&&
load 22
gtxnsa Accounts 2
txna Accounts 2
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txn RekeyTo
global ZeroAddress
==
txn CloseRemainderTo
global ZeroAddress
==
&&
txn AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
txn OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txna ApplicationArgs 1
extract 5 1
btoi
pushint 66 // 66
*
pushint 6 // 6
+
pushint 8 // 8
+
2022-08-12 06:44:24 -07:00
store 39
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
intc_2 // 2
extract3
btoi
2022-08-12 06:44:24 -07:00
store 40
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
intc_2 // 2
+
pushint 32 // 32
extract3
2022-08-12 06:44:24 -07:00
store 41
load 40
2022-04-29 12:53:48 -07:00
pushint 8 // 8
==
2022-08-12 06:44:24 -07:00
bnz main_l57
2022-04-29 12:53:48 -07:00
bytec_2 // "Chain"
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
intc_2 // 2
extract3
concat
app_global_get
2022-08-12 06:44:24 -07:00
load 41
2022-04-29 12:53:48 -07:00
==
assert
main_l43:
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 43 // 43
+
2022-08-12 06:44:24 -07:00
store 39
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
intc_1 // 1
extract3
btoi
2022-08-12 06:44:24 -07:00
store 50
load 50
2022-04-29 12:53:48 -07:00
intc_1 // 1
==
2022-08-12 06:44:24 -07:00
load 50
2022-04-29 12:53:48 -07:00
pushint 3 // 3
==
||
assert
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
intc_1 // 1
+
pushint 24 // 24
extract3
2022-08-12 06:44:24 -07:00
load 49
2022-04-29 12:53:48 -07:00
extract 0 24
==
assert
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 25 // 25
+
pushint 8 // 8
extract3
btoi
2022-08-12 06:44:24 -07:00
store 42
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 33 // 33
+
pushint 32 // 32
extract3
2022-08-12 06:44:24 -07:00
store 43
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 65 // 65
+
intc_2 // 2
extract3
btoi
2022-08-12 06:44:24 -07:00
store 44
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 67 // 67
+
pushint 32 // 32
extract3
2022-08-12 06:44:24 -07:00
store 45
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 99 // 99
+
intc_2 // 2
extract3
btoi
2022-08-12 06:44:24 -07:00
pushint 8 // 8
==
assert
load 50
pushint 3 // 3
==
bnz main_l56
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 101 // 101
+
pushint 24 // 24
extract3
2022-08-12 06:44:24 -07:00
load 49
2022-04-29 12:53:48 -07:00
extract 0 24
==
assert
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 39
2022-04-29 12:53:48 -07:00
pushint 125 // 125
+
pushint 8 // 8
extract3
btoi
2022-08-12 06:44:24 -07:00
store 46
load 46
load 42
2022-04-29 12:53:48 -07:00
<=
assert
2022-08-12 06:44:24 -07:00
load 42
load 46
-
store 42
main_l45:
load 44
2022-04-29 12:53:48 -07:00
pushint 8 // 8
==
2022-08-12 06:44:24 -07:00
bnz main_l50
2022-04-29 12:53:48 -07:00
pushint 3 // 3
intc_0 // 0
pushint 8 // 8
callsub read_4
btoi
2022-08-12 06:44:24 -07:00
store 47
load 47
2022-04-29 12:53:48 -07:00
intc_0 // 0
!=
txna Accounts 3
2022-08-12 06:44:24 -07:00
load 44
load 43
2022-04-29 12:53:48 -07:00
callsub getsigaddress_15
==
&&
assert
2022-08-12 06:44:24 -07:00
main_l47:
2022-04-29 12:53:48 -07:00
itxn_begin
txna Accounts 3
itxn_field Sender
pushint 4 // axfer
itxn_field TypeEnum
2022-08-12 06:44:24 -07:00
load 47
2022-04-29 12:53:48 -07:00
itxn_field XferAsset
2022-08-12 06:44:24 -07:00
load 42
2022-04-29 12:53:48 -07:00
itxn_field AssetAmount
2022-08-12 06:44:24 -07:00
load 45
2022-04-29 12:53:48 -07:00
itxn_field AssetReceiver
intc_0 // 0
itxn_field Fee
2022-08-12 06:44:24 -07:00
load 46
2022-04-29 12:53:48 -07:00
intc_0 // 0
>
2022-08-12 06:44:24 -07:00
bnz main_l49
main_l48:
2022-04-29 12:53:48 -07:00
itxn_submit
intc_1 // 1
return
2022-08-12 06:44:24 -07:00
main_l49:
2022-04-29 12:53:48 -07:00
itxn_next
txna Accounts 3
itxn_field Sender
pushint 4 // axfer
itxn_field TypeEnum
2022-08-12 06:44:24 -07:00
load 47
2022-04-29 12:53:48 -07:00
itxn_field XferAsset
2022-08-12 06:44:24 -07:00
load 46
2022-04-29 12:53:48 -07:00
itxn_field AssetAmount
txn Sender
itxn_field AssetReceiver
intc_0 // 0
itxn_field Fee
2022-08-12 06:44:24 -07:00
b main_l48
main_l50:
load 43
2022-04-29 12:53:48 -07:00
extract 24 8
btoi
2022-08-12 06:44:24 -07:00
store 47
2022-04-29 12:53:48 -07:00
txna Accounts 3
2022-08-12 06:44:24 -07:00
load 47
2022-04-29 12:53:48 -07:00
bytec_3 // "native"
callsub getsigaddress_15
==
assert
2022-08-12 06:44:24 -07:00
load 47
2022-04-29 12:53:48 -07:00
intc_0 // 0
==
2022-08-12 06:44:24 -07:00
bnz main_l53
load 47
2022-04-29 12:53:48 -07:00
callsub extractdecimal_20
btoi
callsub getFactor_14
2022-08-12 06:44:24 -07:00
store 48
load 48
2022-04-29 12:53:48 -07:00
intc_1 // 1
!=
2022-08-12 06:44:24 -07:00
bz main_l47
load 42
load 48
2022-04-29 12:53:48 -07:00
*
2022-08-12 06:44:24 -07:00
store 42
load 46
load 48
2022-04-29 12:53:48 -07:00
*
2022-08-12 06:44:24 -07:00
store 46
b main_l47
main_l53:
2022-04-29 12:53:48 -07:00
itxn_begin
txna Accounts 3
itxn_field Sender
intc_1 // pay
itxn_field TypeEnum
load 45
2022-08-12 06:44:24 -07:00
itxn_field Receiver
load 42
2022-04-29 12:53:48 -07:00
itxn_field Amount
intc_0 // 0
itxn_field Fee
2022-08-12 06:44:24 -07:00
load 46
2022-04-29 12:53:48 -07:00
intc_0 // 0
>
2022-08-12 06:44:24 -07:00
bnz main_l55
main_l54:
2022-04-29 12:53:48 -07:00
itxn_submit
intc_1 // 1
return
2022-08-12 06:44:24 -07:00
main_l55:
2022-04-29 12:53:48 -07:00
itxn_next
txna Accounts 3
itxn_field Sender
intc_1 // pay
itxn_field TypeEnum
txn Sender
itxn_field Receiver
2022-08-12 06:44:24 -07:00
load 46
2022-04-29 12:53:48 -07:00
itxn_field Amount
intc_0 // 0
itxn_field Fee
2022-08-12 06:44:24 -07:00
b main_l54
main_l56:
load 45
extract 24 8
btoi
store 51
2022-04-29 12:53:48 -07:00
txn GroupIndex
intc_1 // 1
+
store 22
load 22
gtxns TypeEnum
pushint 6 // appl
==
load 22
gtxnsa ApplicationArgs 0
2022-08-12 06:44:24 -07:00
pushbytes 0x903f4535 // "portal_transfer(byte[])byte[]"
2022-04-29 12:53:48 -07:00
==
&&
load 22
gtxnsa ApplicationArgs 1
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
len
itob
extract 6 2
txna ApplicationArgs 1
concat
2022-04-29 12:53:48 -07:00
==
&&
2022-08-12 06:44:24 -07:00
load 22
gtxns ApplicationID
load 51
2022-04-29 12:53:48 -07:00
==
&&
assert
2022-08-12 06:44:24 -07:00
load 51
callsub getAppAddress_9
store 45
intc_0 // 0
store 46
b main_l45
main_l57:
2022-04-29 12:53:48 -07:00
global CurrentApplicationAddress
2022-08-12 06:44:24 -07:00
load 41
2022-04-29 12:53:48 -07:00
==
assert
b main_l43
2022-08-12 06:44:24 -07:00
main_l58:
2022-04-29 12:53:48 -07:00
callsub getMessageFee_8
store 23
intc_1 // 1
callsub checkFeePmt_10
txna ApplicationArgs 1
btoi
2022-08-12 06:44:24 -07:00
store 38
load 38
2022-04-29 12:53:48 -07:00
intc_0 // 0
!=
2022-08-12 06:44:24 -07:00
bnz main_l69
2022-04-29 12:53:48 -07:00
intc_0 // 0
2022-08-12 06:44:24 -07:00
main_l60:
bnz main_l68
2022-04-29 12:53:48 -07:00
txna Accounts 2
2022-08-12 06:44:24 -07:00
load 38
2022-04-29 12:53:48 -07:00
bytec_3 // "native"
callsub getsigaddress_15
==
assert
pushint 32 // 32
bzero
2022-08-12 06:44:24 -07:00
store 34
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
btoi
2022-08-12 06:44:24 -07:00
store 38
load 38
2022-04-29 12:53:48 -07:00
intc_0 // 0
==
2022-08-12 06:44:24 -07:00
bnz main_l67
load 38
2022-04-29 12:53:48 -07:00
callsub extractdecimal_20
2022-08-12 06:44:24 -07:00
store 35
load 35
2022-04-29 12:53:48 -07:00
btoi
pushint 8 // 8
>
2022-08-12 06:44:24 -07:00
bnz main_l66
main_l63:
load 38
2022-04-29 12:53:48 -07:00
callsub extractunitname_19
2022-08-12 06:44:24 -07:00
store 36
load 38
2022-04-29 12:53:48 -07:00
callsub extractname_17
2022-08-12 06:44:24 -07:00
store 37
main_l64:
2022-04-29 12:53:48 -07:00
pushbytes 0x02 // 0x02
2022-08-12 06:44:24 -07:00
load 34
2022-04-29 12:53:48 -07:00
extract 0 24
concat
2022-08-12 06:44:24 -07:00
load 38
2022-04-29 12:53:48 -07:00
itob
concat
bytec 7 // 0x0008
concat
2022-08-12 06:44:24 -07:00
load 35
2022-04-29 12:53:48 -07:00
concat
2022-08-12 06:44:24 -07:00
load 36
2022-04-29 12:53:48 -07:00
concat
2022-08-12 06:44:24 -07:00
load 34
2022-04-29 12:53:48 -07:00
intc_0 // 0
pushint 32 // 32
2022-08-12 06:44:24 -07:00
load 36
2022-04-29 12:53:48 -07:00
len
-
extract3
concat
2022-08-12 06:44:24 -07:00
load 37
2022-04-29 12:53:48 -07:00
concat
2022-08-12 06:44:24 -07:00
load 34
2022-04-29 12:53:48 -07:00
intc_0 // 0
pushint 32 // 32
2022-08-12 06:44:24 -07:00
load 37
2022-04-29 12:53:48 -07:00
len
-
extract3
concat
2022-08-12 06:44:24 -07:00
store 33
load 33
2022-04-29 12:53:48 -07:00
len
pushint 100 // 100
==
assert
itxn_begin
callsub sendMfee_11
pushint 6 // appl
itxn_field TypeEnum
bytec_1 // "coreid"
app_global_get
itxn_field ApplicationID
bytec 4 // "publishMessage"
itxn_field ApplicationArgs
2022-08-12 06:44:24 -07:00
load 33
2022-04-29 12:53:48 -07:00
itxn_field ApplicationArgs
intc_0 // 0
itob
itxn_field ApplicationArgs
txna Accounts 1
itxn_field Accounts
bytec 4 // "publishMessage"
itxn_field Note
intc_0 // 0
itxn_field Fee
itxn_submit
intc_1 // 1
return
main_l66:
2022-08-12 06:44:24 -07:00
pushbytes 0x08 // 0x08
store 35
b main_l63
main_l67:
2022-04-29 12:53:48 -07:00
pushbytes 0x06 // 0x06
2022-08-12 06:44:24 -07:00
store 35
2022-09-27 03:44:29 -07:00
bytec 9 // "ALGO"
2022-04-29 12:53:48 -07:00
store 36
2022-09-27 03:44:29 -07:00
bytec 9 // "ALGO"
2022-04-29 12:53:48 -07:00
store 37
b main_l64
main_l68:
2022-08-12 06:44:24 -07:00
intc_0 // 0
return
main_l69:
load 38
2022-04-29 12:53:48 -07:00
callsub extractcreator_18
callsub authaddr_16
global CurrentApplicationAddress
==
2022-08-12 06:44:24 -07:00
b main_l60
main_l70:
2022-04-29 12:53:48 -07:00
callsub checkForDuplicate_21
txn GroupIndex
pushint 4 // 4
-
store 22
load 22
gtxns TypeEnum
pushint 6 // appl
==
load 22
gtxns ApplicationID
bytec_1 // "coreid"
app_global_get
==
&&
load 22
gtxnsa ApplicationArgs 0
bytec 6 // "verifyVAA"
==
&&
load 22
gtxns Sender
txn Sender
==
&&
load 22
2022-09-19 07:08:55 -07:00
gtxns OnCompletion
intc_0 // NoOp
==
&&
load 22
2022-04-29 12:53:48 -07:00
gtxnsa ApplicationArgs 1
txna ApplicationArgs 1
==
&&
load 22
gtxnsa Accounts 0
txna Accounts 0
==
&&
load 22
gtxnsa Accounts 1
txna Accounts 1
==
&&
load 22
gtxnsa Accounts 2
txna Accounts 2
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txn GroupIndex
pushint 3 // 3
-
store 22
load 22
gtxns TypeEnum
intc_1 // pay
==
load 22
gtxns Amount
2022-08-12 06:44:24 -07:00
pushint 100000 // 100000
2022-04-29 12:53:48 -07:00
>=
&&
load 22
gtxns Sender
txn Sender
==
&&
load 22
gtxns Receiver
txna Accounts 3
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txn GroupIndex
intc_2 // 2
-
store 22
load 22
gtxns TypeEnum
pushint 6 // appl
==
load 22
gtxns ApplicationID
global CurrentApplicationID
==
&&
load 22
gtxnsa ApplicationArgs 0
bytec 5 // "nop"
==
&&
load 22
gtxns Sender
txn Sender
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txn GroupIndex
intc_1 // 1
-
store 22
load 22
gtxns TypeEnum
pushint 6 // appl
==
load 22
gtxns ApplicationID
global CurrentApplicationID
==
&&
load 22
gtxnsa ApplicationArgs 0
bytec 5 // "nop"
==
&&
load 22
gtxns Sender
txn Sender
==
&&
global GroupSize
intc_1 // 1
-
txn GroupIndex
==
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
txna ApplicationArgs 1
extract 5 1
btoi
pushint 66 // 66
*
pushint 6 // 6
+
pushint 8 // 8
+
store 24
txna ApplicationArgs 1
load 24
intc_2 // 2
extract3
btoi
store 26
bytec_2 // "Chain"
txna ApplicationArgs 1
load 24
intc_2 // 2
extract3
concat
app_global_get
txna ApplicationArgs 1
load 24
intc_2 // 2
+
pushint 32 // 32
extract3
==
assert
load 24
pushint 43 // 43
+
store 24
intc_2 // 2
txna ApplicationArgs 1
load 24
intc_1 // 1
extract3
btoi
==
assert
txna ApplicationArgs 1
load 24
intc_1 // 1
+
pushint 32 // 32
extract3
store 25
txna ApplicationArgs 1
load 24
pushint 33 // 33
+
intc_2 // 2
extract3
btoi
store 27
txna ApplicationArgs 1
load 24
pushint 35 // 35
+
intc_1 // 1
extract3
btoi
store 28
txna ApplicationArgs 1
load 24
pushint 36 // 36
+
pushint 32 // 32
extract3
store 29
txna ApplicationArgs 1
load 24
pushint 68 // 68
+
pushint 32 // 32
extract3
store 30
load 29
callsub trimbytes_13
store 29
load 29
len
2022-08-12 06:44:24 -07:00
pushint 8 // 8
2022-04-29 12:53:48 -07:00
>
2022-08-12 06:44:24 -07:00
bnz main_l76
main_l71:
2022-04-29 12:53:48 -07:00
load 30
callsub trimbytes_13
store 30
load 28
pushint 8 // 8
2022-08-12 06:44:24 -07:00
>
bnz main_l75
main_l72:
2022-04-29 12:53:48 -07:00
txna Accounts 3
load 27
load 25
callsub getsigaddress_15
==
assert
pushint 3 // 3
intc_0 // 0
pushint 8 // 8
callsub read_4
store 31
txna ApplicationArgs 1
extract 5 1
btoi
pushint 66 // 66
*
pushint 6 // 6
+
store 24
load 31
intc_0 // 0
itob
==
2022-08-12 06:44:24 -07:00
bnz main_l74
main_l73:
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
store 32
pushint 3 // 3
pushint 8 // 8
load 32
load 24
load 32
len
load 24
-
extract3
callsub write_6
pop
intc_1 // 1
return
2022-08-12 06:44:24 -07:00
main_l74:
2022-04-29 12:53:48 -07:00
itxn_begin
txna Accounts 3
itxn_field Sender
pushint 3 // acfg
itxn_field TypeEnum
load 30
itxn_field ConfigAssetName
load 29
itxn_field ConfigAssetUnitName
2022-09-27 03:44:29 -07:00
pushint 18446744073709550000 // 18446744073709550000
2022-04-29 12:53:48 -07:00
itxn_field ConfigAssetTotal
load 28
itxn_field ConfigAssetDecimals
global CurrentApplicationAddress
itxn_field ConfigAssetManager
2022-08-17 06:14:45 -07:00
txna Accounts 3
2022-04-29 12:53:48 -07:00
itxn_field ConfigAssetReserve
2022-09-27 03:44:29 -07:00
global CurrentApplicationAddress
2022-04-29 12:53:48 -07:00
itxn_field ConfigAssetFreeze
2022-09-27 03:44:29 -07:00
global CurrentApplicationAddress
2022-04-29 12:53:48 -07:00
itxn_field ConfigAssetClawback
intc_0 // 0
itxn_field Fee
itxn_submit
itxn CreatedAssetID
itob
store 31
pushint 3 // 3
intc_0 // 0
load 31
callsub write_6
pop
pushint 3 // 3
pushbytes 0x6173736574 // "asset"
callsub meta_5
2022-08-12 06:44:24 -07:00
b main_l73
main_l75:
2022-04-29 12:53:48 -07:00
pushint 8 // 8
store 28
2022-08-12 06:44:24 -07:00
b main_l72
main_l76:
2022-04-29 12:53:48 -07:00
load 29
2022-08-12 06:44:24 -07:00
extract 0 8
2022-04-29 12:53:48 -07:00
store 29
2022-08-12 06:44:24 -07:00
b main_l71
main_l77:
2022-04-29 12:53:48 -07:00
intc_1 // 1
return
2022-08-12 06:44:24 -07:00
main_l78:
2022-04-29 12:53:48 -07:00
callsub optin_22
return
2022-08-12 06:44:24 -07:00
main_l79:
2022-04-29 12:53:48 -07:00
intc_0 // 0
return
2022-08-12 06:44:24 -07:00
main_l80:
2022-09-27 03:44:29 -07:00
bytec 10 // "Program"
2022-08-12 06:44:24 -07:00
txn ApprovalProgram
concat
sha512_256
bytec 8 // "validUpdateApproveHash"
app_global_get
==
assert
txn ClearStateProgram
2022-09-27 03:44:29 -07:00
len
pushint 4 // 4
==
txn ClearStateProgram
extract 1 3
pushbytes 0x810143 // 0x810143
2022-04-29 12:53:48 -07:00
==
2022-09-27 03:44:29 -07:00
&&
2022-08-12 06:44:24 -07:00
assert
intc_1 // 1
2022-04-29 12:53:48 -07:00
return
2022-08-12 06:44:24 -07:00
main_l81:
2022-04-29 12:53:48 -07:00
bytec_1 // "coreid"
txna ApplicationArgs 0
btoi
app_global_put
2022-09-27 03:44:29 -07:00
bytec 11 // "coreAddr"
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
app_global_put
bytec 8 // "validUpdateApproveHash"
bytec_0 // ""
app_global_put
intc_1 // 1
return
// intkey
intkey_0:
itob
extract 7 1
retsub
// zero
zero_1:
store 17
intc_0 // 0
store 18
zero_1_l1:
load 18
pushint 15 // 15
<
bz zero_1_l3
load 17
load 18
callsub intkey_0
intc_3 // 127
bzero
app_local_put
load 18
intc_1 // 1
+
store 18
b zero_1_l1
zero_1_l3:
retsub
// get_byte
getbyte_2:
store 0
load 0
intc_3 // 127
/
callsub intkey_0
app_local_get
load 0
intc_3 // 127
%
getbyte
retsub
// set_byte
setbyte_3:
store 21
store 20
store 19
load 19
load 20
intc_3 // 127
/
callsub intkey_0
load 19
load 20
intc_3 // 127
/
callsub intkey_0
app_local_get
load 20
intc_3 // 127
%
load 21
setbyte
app_local_put
retsub
// read
read_4:
store 3
store 2
store 1
bytec_0 // ""
store 5
load 2
intc_3 // 127
/
store 4
read_4_l1:
load 4
load 3
intc_3 // 127
/
<=
bz read_4_l9
load 4
load 2
intc_3 // 127
/
==
bnz read_4_l8
intc_0 // 0
read_4_l4:
store 6
load 4
load 3
intc_3 // 127
/
==
bnz read_4_l7
intc_3 // 127
read_4_l6:
store 7
load 5
load 1
load 4
callsub intkey_0
app_local_get
load 6
load 7
substring3
concat
store 5
load 4
intc_1 // 1
+
store 4
b read_4_l1
read_4_l7:
load 3
intc_3 // 127
%
b read_4_l6
read_4_l8:
load 2
intc_3 // 127
%
b read_4_l4
read_4_l9:
load 5
retsub
// meta
meta_5:
store 8
pushbytes 0x6d657461 // "meta"
load 8
app_local_put
retsub
// write
write_6:
store 11
store 10
store 9
intc_0 // 0
store 15
load 10
intc_3 // 127
/
store 12
write_6_l1:
load 12
load 10
load 11
len
+
intc_3 // 127
/
<=
bz write_6_l12
load 12
load 10
intc_3 // 127
/
==
bnz write_6_l11
intc_0 // 0
write_6_l4:
store 13
load 12
load 10
load 11
len
+
intc_3 // 127
/
==
bnz write_6_l10
intc_3 // 127
write_6_l6:
store 14
load 9
load 12
callsub intkey_0
load 14
intc_3 // 127
!=
load 13
intc_0 // 0
!=
||
bnz write_6_l9
intc_3 // 127
store 16
load 11
load 15
intc_3 // 127
extract3
write_6_l8:
app_local_put
load 15
load 16
+
store 15
load 12
intc_1 // 1
+
store 12
b write_6_l1
write_6_l9:
load 14
load 13
-
store 16
load 9
load 12
callsub intkey_0
app_local_get
intc_0 // 0
load 13
substring3
load 11
load 15
load 16
extract3
concat
load 9
load 12
callsub intkey_0
app_local_get
load 14
intc_3 // 127
substring3
concat
b write_6_l8
write_6_l10:
load 10
load 11
len
+
intc_3 // 127
%
b write_6_l6
write_6_l11:
load 10
intc_3 // 127
%
b write_6_l4
write_6_l12:
load 15
retsub
// governanceSet
governanceSet_7:
bytec_1 // "coreid"
app_global_get
pushbytes 0x63757272656e74477561726469616e536574496e646578 // "currentGuardianSetIndex"
app_global_get_ex
2022-08-12 06:44:24 -07:00
store 70
store 69
load 70
2022-04-29 12:53:48 -07:00
assert
2022-08-12 06:44:24 -07:00
load 69
2022-04-29 12:53:48 -07:00
retsub
// getMessageFee
getMessageFee_8:
bytec_1 // "coreid"
app_global_get
pushbytes 0x4d657373616765466565 // "MessageFee"
app_global_get_ex
2022-08-12 06:44:24 -07:00
store 72
store 71
load 72
2022-04-29 12:53:48 -07:00
assert
2022-08-12 06:44:24 -07:00
load 71
2022-04-29 12:53:48 -07:00
retsub
2022-08-12 06:44:24 -07:00
// getAppAddress
getAppAddress_9:
2022-04-29 12:53:48 -07:00
app_params_get AppAddress
2022-08-12 06:44:24 -07:00
store 74
store 73
load 74
2022-04-29 12:53:48 -07:00
assert
2022-08-12 06:44:24 -07:00
load 73
2022-04-29 12:53:48 -07:00
retsub
// checkFeePmt
checkFeePmt_10:
2022-08-12 06:44:24 -07:00
store 75
2022-04-29 12:53:48 -07:00
load 23
intc_0 // 0
>
bz checkFeePmt_10_l2
txn GroupIndex
2022-08-12 06:44:24 -07:00
load 75
2022-04-29 12:53:48 -07:00
-
store 22
load 22
gtxns TypeEnum
intc_1 // pay
==
load 22
gtxns Sender
txn Sender
==
&&
load 22
gtxns Receiver
global CurrentApplicationAddress
==
&&
load 22
gtxns Amount
load 23
>=
&&
assert
load 22
gtxns RekeyTo
global ZeroAddress
==
load 22
gtxns CloseRemainderTo
global ZeroAddress
==
&&
load 22
gtxns AssetCloseTo
global ZeroAddress
==
&&
2022-09-19 07:08:55 -07:00
load 22
gtxns OnCompletion
intc_0 // NoOp
==
&&
2022-04-29 12:53:48 -07:00
assert
checkFeePmt_10_l2:
retsub
// sendMfee
sendMfee_11:
load 23
intc_0 // 0
>
bz sendMfee_11_l2
intc_1 // pay
itxn_field TypeEnum
2022-09-27 03:44:29 -07:00
bytec 11 // "coreAddr"
2022-04-29 12:53:48 -07:00
app_global_get
itxn_field Receiver
load 23
itxn_field Amount
intc_0 // 0
itxn_field Fee
itxn_next
sendMfee_11_l2:
retsub
// encode_uvarint
encodeuvarint_12:
2022-08-12 06:44:24 -07:00
store 84
store 83
load 84
load 83
intc 5 // 128
2022-04-29 12:53:48 -07:00
>=
bnz encodeuvarint_12_l2
2022-08-12 06:44:24 -07:00
load 83
intc 6 // 255
2022-04-29 12:53:48 -07:00
&
itob
extract 7 1
b encodeuvarint_12_l3
encodeuvarint_12_l2:
2022-08-12 06:44:24 -07:00
load 83
2022-04-29 12:53:48 -07:00
pushint 7 // 7
shr
2022-08-12 06:44:24 -07:00
load 83
intc 6 // 255
2022-04-29 12:53:48 -07:00
&
2022-08-12 06:44:24 -07:00
intc 5 // 128
2022-04-29 12:53:48 -07:00
|
itob
extract 7 1
2022-08-12 06:44:24 -07:00
load 83
load 84
2022-04-29 12:53:48 -07:00
uncover 3
uncover 3
callsub encodeuvarint_12
cover 2
2022-08-12 06:44:24 -07:00
store 84
store 83
2022-04-29 12:53:48 -07:00
encodeuvarint_12_l3:
concat
retsub
// trim_bytes
trimbytes_13:
store 79
2022-08-12 06:44:24 -07:00
load 79
len
store 76
2022-04-29 12:53:48 -07:00
intc_1 // 1
bzero
2022-08-12 06:44:24 -07:00
store 78
2022-04-29 12:53:48 -07:00
intc_0 // 0
2022-08-12 06:44:24 -07:00
store 77
2022-04-29 12:53:48 -07:00
trimbytes_13_l1:
2022-08-12 06:44:24 -07:00
load 77
load 76
2022-04-29 12:53:48 -07:00
<
bz trimbytes_13_l5
2022-08-12 06:44:24 -07:00
load 79
load 77
2022-04-29 12:53:48 -07:00
intc_1 // 1
extract3
2022-08-12 06:44:24 -07:00
load 78
2022-04-29 12:53:48 -07:00
==
bnz trimbytes_13_l4
trimbytes_13_l3:
2022-08-12 06:44:24 -07:00
load 77
2022-04-29 12:53:48 -07:00
intc_1 // 1
+
2022-08-12 06:44:24 -07:00
store 77
2022-04-29 12:53:48 -07:00
b trimbytes_13_l1
trimbytes_13_l4:
2022-08-12 06:44:24 -07:00
load 79
2022-04-29 12:53:48 -07:00
intc_0 // 0
2022-08-12 06:44:24 -07:00
load 77
2022-04-29 12:53:48 -07:00
extract3
2022-08-12 06:44:24 -07:00
store 79
load 76
store 77
2022-04-29 12:53:48 -07:00
b trimbytes_13_l3
trimbytes_13_l5:
2022-08-12 06:44:24 -07:00
load 79
2022-04-29 12:53:48 -07:00
retsub
// getFactor
getFactor_14:
2022-08-12 06:44:24 -07:00
store 80
load 80
2022-04-29 12:53:48 -07:00
pushint 9 // 9
<
2022-08-12 06:44:24 -07:00
bnz getFactor_14_l6
load 80
pushint 19 // 19
>
bnz getFactor_14_l5
2022-04-29 12:53:48 -07:00
intc_1 // 1
2022-08-12 06:44:24 -07:00
bnz getFactor_14_l4
err
getFactor_14_l4:
pushint 10 // 10
load 80
pushint 8 // 8
-
exp
b getFactor_14_l7
getFactor_14_l5:
2022-04-29 12:53:48 -07:00
intc_0 // 0
return
intc_1 // 1
2022-08-12 06:44:24 -07:00
getFactor_14_l6:
intc_1 // 1
getFactor_14_l7:
2022-04-29 12:53:48 -07:00
retsub
// get_sig_address
getsigaddress_15:
2022-08-12 06:44:24 -07:00
store 82
store 81
2022-09-27 03:44:29 -07:00
bytec 10 // "Program"
2022-04-29 12:53:48 -07:00
pushbytes 0x0620010181 // 0x0620010181
concat
2022-08-12 06:44:24 -07:00
load 81
2022-04-29 12:53:48 -07:00
bytec_0 // ""
callsub encodeuvarint_12
concat
pushbytes 0x4880 // 0x4880
concat
2022-08-12 06:44:24 -07:00
load 82
2022-04-29 12:53:48 -07:00
len
bytec_0 // ""
callsub encodeuvarint_12
concat
2022-08-12 06:44:24 -07:00
load 82
2022-04-29 12:53:48 -07:00
concat
pushbytes 0x483110810612443119221244311881 // 0x483110810612443119221244311881
concat
global CurrentApplicationID
bytec_0 // ""
callsub encodeuvarint_12
concat
pushbytes 0x1244312080 // 0x1244312080
concat
global CurrentApplicationAddress
len
bytec_0 // ""
callsub encodeuvarint_12
concat
global CurrentApplicationAddress
concat
pushbytes 0x124431018100124431093203124431153203124422 // 0x124431018100124431093203124431153203124422
concat
sha512_256
retsub
// auth_addr
authaddr_16:
acct_params_get AcctAuthAddr
2022-08-12 06:44:24 -07:00
store 86
store 85
load 86
2022-04-29 12:53:48 -07:00
bnz authaddr_16_l2
bytec_0 // ""
b authaddr_16_l3
authaddr_16_l2:
2022-08-12 06:44:24 -07:00
load 85
2022-04-29 12:53:48 -07:00
authaddr_16_l3:
retsub
// extract_name
extractname_17:
asset_params_get AssetName
2022-08-12 06:44:24 -07:00
store 88
store 87
load 88
2022-04-29 12:53:48 -07:00
bnz extractname_17_l2
bytec_0 // ""
b extractname_17_l3
extractname_17_l2:
2022-08-12 06:44:24 -07:00
load 87
2022-04-29 12:53:48 -07:00
extractname_17_l3:
retsub
// extract_creator
extractcreator_18:
asset_params_get AssetCreator
2022-08-12 06:44:24 -07:00
store 90
store 89
load 90
2022-04-29 12:53:48 -07:00
bnz extractcreator_18_l2
bytec_0 // ""
b extractcreator_18_l3
extractcreator_18_l2:
2022-08-12 06:44:24 -07:00
load 89
2022-04-29 12:53:48 -07:00
extractcreator_18_l3:
retsub
// extract_unit_name
extractunitname_19:
asset_params_get AssetUnitName
2022-08-12 06:44:24 -07:00
store 92
store 91
load 92
2022-04-29 12:53:48 -07:00
bnz extractunitname_19_l2
bytec_0 // ""
b extractunitname_19_l3
extractunitname_19_l2:
2022-08-12 06:44:24 -07:00
load 91
2022-04-29 12:53:48 -07:00
extractunitname_19_l3:
retsub
// extract_decimal
extractdecimal_20:
asset_params_get AssetDecimals
2022-08-12 06:44:24 -07:00
store 94
store 93
load 94
2022-04-29 12:53:48 -07:00
bnz extractdecimal_20_l2
pushbytes 0x00 // 0x00
b extractdecimal_20_l3
extractdecimal_20_l2:
2022-08-12 06:44:24 -07:00
load 93
2022-04-29 12:53:48 -07:00
itob
extract 7 1
extractdecimal_20_l3:
retsub
// checkForDuplicate
checkForDuplicate_21:
txna ApplicationArgs 1
extract 0 1
btoi
intc_1 // 1
==
assert
txna ApplicationArgs 1
extract 5 1
btoi
pushint 66 // 66
*
pushint 14 // 14
+
2022-08-12 06:44:24 -07:00
store 95
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 95
2022-04-29 12:53:48 -07:00
pushint 34 // 34
extract3
2022-08-12 06:44:24 -07:00
store 96
2022-04-29 12:53:48 -07:00
txna ApplicationArgs 1
2022-08-12 06:44:24 -07:00
load 95
2022-04-29 12:53:48 -07:00
pushint 34 // 34
+
pushint 8 // 8
extract3
btoi
2022-08-12 06:44:24 -07:00
store 97
load 97
2022-04-29 12:53:48 -07:00
pushint 15240 // 15240
/
2022-08-12 06:44:24 -07:00
store 99
2022-04-29 12:53:48 -07:00
txna Accounts 1
load 99
2022-08-12 06:44:24 -07:00
load 96
2022-04-29 12:53:48 -07:00
callsub getsigaddress_15
==
assert
2022-08-12 06:44:24 -07:00
load 97
2022-04-29 12:53:48 -07:00
pushint 8 // 8
/
pushint 1905 // 1905
%
2022-08-12 06:44:24 -07:00
store 99
2022-04-29 12:53:48 -07:00
intc_1 // 1
2022-08-12 06:44:24 -07:00
load 99
2022-04-29 12:53:48 -07:00
callsub getbyte_2
2022-08-12 06:44:24 -07:00
store 98
load 98
load 97
2022-04-29 12:53:48 -07:00
pushint 8 // 8
%
getbit
intc_0 // 0
==
assert
intc_1 // 1
2022-08-12 06:44:24 -07:00
load 99
load 98
load 97
2022-04-29 12:53:48 -07:00
pushint 8 // 8
%
intc_1 // 1
setbit
callsub setbyte_3
retsub
// optin
optin_22:
2022-08-12 06:44:24 -07:00
txn GroupIndex
intc_1 // 1
-
gtxns TypeEnum
2022-04-29 12:53:48 -07:00
intc_1 // pay
==
2022-08-12 06:44:24 -07:00
txn GroupIndex
intc_1 // 1
-
gtxns Amount
2022-04-29 12:53:48 -07:00
pushint 1002000 // 1002000
==
&&
2022-09-19 07:08:55 -07:00
txn GroupIndex
intc_1 // 1
-
gtxns Receiver
txn Sender
==
&&
2022-08-12 06:44:24 -07:00
txn TypeEnum
2022-04-29 12:53:48 -07:00
pushint 6 // appl
==
&&
2022-08-12 06:44:24 -07:00
txn OnCompletion
2022-04-29 12:53:48 -07:00
intc_1 // OptIn
==
&&
2022-09-19 07:08:55 -07:00
txn ApplicationID
global CurrentApplicationID
==
&&
txn RekeyTo
global CurrentApplicationAddress
==
&&
txn NumAppArgs
intc_0 // 0
==
&&
2022-04-29 12:53:48 -07:00
assert
intc_0 // 0
callsub zero_1
intc_1 // 1
retsub