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