tx · DLtyqPVWBFNX4mnBLyVikGbqRXS4pTieynBB2WifcGLm

3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy:  -1.40000000 Waves

2020.10.16 11:31 [1222900] smart asset 3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy > SELF 0.00000000 D-Aid

{ "type": 15, "id": "DLtyqPVWBFNX4mnBLyVikGbqRXS4pTieynBB2WifcGLm", "fee": 140000000, "feeAssetId": null, "timestamp": 1602837129450, "version": 2, "chainId": 84, "sender": "3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy", "senderPublicKey": "57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4", "proofs": [ "3YqgJCVFzkggUGPatZqUms4CxNgYcyvKipKYx7omxQFhYsp7kHDgNQGKwsphvVwkLiT6YhpyxC2Uy9aQzDbYKGBa" ], "assetId": "2CrDXATWpvrriHHr1cVpQM65CaP3m7MJ425xz3tn9zMr", "script": "base64:AgQAAAAFYWRtaW4JAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVT7U3zgWylABs9zUfyaAS1l4Zzgbt82QMAEAAAAB2dhdGV3YXkJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVT7U3zgWylABs9zUfyaAS1l4Zzgbt82QMAEAAAABmJhbm5lZAAAAAAAAAABkwQAAAAHS1lDVmVyMQAAAAAAAAAAAQQAAAAHS1lDVmVyMgAAAAAAAAAAAgQAAAAKaXNNZXJjaGFudAAAAAAAAAAABQQAAAAKS1lDUGVuZGluZwAAAAAAAAAAAAQAAAAJbWF4QW1vdW50AAAAAAAF9eEABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAQAAAAEZGF0YQkABBoAAAACBQAAAAVhZG1pbgkAAlgAAAABCAgFAAAAAXQAAAAGc2VuZGVyAAAABWJ5dGVzBAAAAAZhbW91bnQIBQAA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9wZXJhdGlvbiBvbmx5Li4GJwgAtg==", "height": 1222900, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F51RDeyjzXmMk2CNTTMUFJG9XFKfMLQVUt3fA3csBGeY Next: 4Ta1aHRXWkUHKX29zeMwemckV3U1dH2RsMB98PSPGdRv Full:
OldNewDifferences
11 {-# STDLIB_VERSION 2 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 let admin = Address(base58'3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy')
44 let gateway = Address(base58'3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy')
55 let banned = 403
66 let KYCVer1 = 1
77 let KYCVer2 = 2
88 let isMerchant = 5
99 let KYCPending = 0
1010 let maxAmount = 100000000
1111 match tx {
1212 case t: TransferTransaction =>
1313 let data = getInteger(admin, toBase58String(t.sender.bytes))
1414 let amount = t.amount
1515 let assetId = extract(t.assetId)
1616 let isUser = getInteger(admin, toBase58String(addressFromRecipient(t.recipient).bytes))
1717 if (!(isDefined(data)))
1818 then throw("You are not a registered member. You cannot transfer this SmartAsset!")
1919 else if ((data == KYCPending))
2020 then throw("KYC Pending. You cannot transfer this SmartAsset")
2121 else if ((data == KYCVer1))
2222 then if ((t.recipient == gateway))
2323 then true
2424 else if (if (if ((isUser == KYCVer1))
2525 then true
2626 else (isUser == KYCVer2))
2727 then true
2828 else (isUser == isMerchant))
2929 then if ((maxAmount >= amount))
3030 then true
3131 else throw("Cannot transfer please verify your acount. Amount is too much!")
3232 else if ((isUser == KYCPending))
3333 then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
3434 else if ((isUser == banned))
3535 then throw("The recipient is banned. You cannot transfer this SmartAsset")
3636 else throw("Undefined situation!")
3737 else if ((data == KYCVer2))
3838 then if (isDefined(isUser))
3939 then if ((isUser == KYCVer1))
4040 then if ((maxAmount >= amount))
4141 then true
4242 else throw("Cannot transfer please verify your acount. Amount is too much!")
4343 else if ((isUser == KYCPending))
4444 then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
4545 else if (if ((isUser == KYCVer2))
4646 then true
4747 else (isUser == isMerchant))
4848 then true
4949 else if ((isUser == banned))
5050 then throw("The recipient is banned. You cannot transfer this SmartAsset")
5151 else throw("Undefined situation!")
5252 else throw("The recipient is not authorized to possess this SmartAsset!")
5353 else if ((data == banned))
5454 then throw("Your acount has been suspended!")
5555 else if ((data == isMerchant))
5656 then if ((t.recipient == gateway))
5757 then true
5858 else throw("Cannot transfer this asset to another account.")
5959 else throw("Undefined situation!")
6060 case mtt: MassTransferTransaction =>
6161 let data = getInteger(admin, toBase58String(mtt.sender.bytes))
6262 let amount = mtt.totalAmount
6363 let assetId = extract(mtt.assetId)
6464 let transferCount = mtt.transferCount
6565 let firstRecipient = mtt.transfers[0].recipient
6666 let secondRecipient = mtt.transfers[1].recipient
6767 let firstAmount = mtt.transfers[0].amount
6868 let secondAmount = mtt.transfers[1].amount
6969 let issueTransaction = transactionById(assetId)
7070 let isUser = getInteger(admin, toBase58String(addressFromRecipient(secondRecipient).bytes))
7171 if (!(isDefined(isUser)))
7272 then false
7373 else if ((transferCount > 2))
7474 then throw("not allowed")
7575 else if (!(isDefined(data)))
7676 then throw("You are not a registered member. You cannot transfer this SmartAsset!")
7777 else if ((data == KYCPending))
7878 then throw("KYC Pending. You cannot transfer this SmartAsset")
7979 else if ((data == KYCVer1))
8080 then if ((firstRecipient != gateway))
8181 then throw("First recipient must be the issuer")
8282 else if (if ((isUser == KYCVer1))
8383 then true
8484 else (isUser == KYCVer2))
8585 then if ((maxAmount >= amount))
8686 then match issueTransaction {
8787 case issueTx: IssueTransaction =>
8888 let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
8989 let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
9090 if ((firstRecipient == issuerAddress))
9191 then (firstAmount >= ((secondAmount / 1000) * taxSize))
9292 else false
9393 case _ =>
9494 false
9595 }
9696 else throw("Cannot transfer please verify your acount. Amount is too much!")
9797 else if ((isUser == KYCPending))
9898 then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
9999 else if ((isUser == banned))
100100 then throw("The recipient is banned. You cannot transfer this SmartAsset")
101101 else if ((isUser == isMerchant))
102102 then throw("Merchants cannot recieve mass payments")
103103 else throw("Undefined situation!")
104104 else if ((data == KYCVer2))
105105 then if (isDefined(isUser))
106106 then if ((isUser == KYCVer1))
107107 then if ((maxAmount >= amount))
108108 then match issueTransaction {
109109 case issueTx: IssueTransaction =>
110110 let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
111111 let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
112112 if ((firstRecipient == issuerAddress))
113113 then (firstAmount >= ((secondAmount / 1000) * taxSize))
114114 else false
115115 case _ =>
116116 false
117117 }
118118 else throw("Cannot transfer please verify your acount. Amount is too much!")
119119 else if ((isUser == KYCVer1))
120120 then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
121121 else if ((isUser == KYCVer2))
122122 then match issueTransaction {
123123 case issueTx: IssueTransaction =>
124124 let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
125125 let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
126126 if ((firstRecipient == issuerAddress))
127127 then (firstAmount >= ((secondAmount / 1000) * taxSize))
128128 else false
129129 case _ =>
130130 false
131131 }
132132 else if ((isUser == banned))
133133 then throw("The recipient is banned. You cannot transfer this SmartAsset")
134134 else if ((isUser == isMerchant))
135135 then throw("Merchants cannot recieve mass payments")
136136 else throw("Undefined situation!")
137137 else throw("The recipient is not authorized to possess this SmartAsset!")
138138 else if ((data == banned))
139139 then throw("Your acount has been suspended!")
140140 else if ((data == isMerchant))
141141 then throw("Merchant account cannot perform mass transfer")
142142 else throw("Undefined situation!")
143143 case ex: ExchangeTransaction =>
144144 false
145145 case b: BurnTransaction =>
146146 false
147147 case script: SetAssetScriptTransaction =>
148148 if ((script.sender == admin))
149149 then true
150150 else throw("Admin operation only..")
151151 case _ =>
152152 true
153153 }

github/deemru/w8io/fabc49c 
35.33 ms