tx · 8pppPERomyKw43KKRvyLQ5Ke8xBei4x9x4XsQjMMZVuU

3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy:  -1.40000000 Waves

2020.10.10 17:02 [1214564] smart asset 3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy > SELF 0.00000000 D-BTC

{ "type": 15, "id": "8pppPERomyKw43KKRvyLQ5Ke8xBei4x9x4XsQjMMZVuU", "fee": 140000000, "feeAssetId": null, "timestamp": 1602338604642, "version": 2, "chainId": 84, "sender": "3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy", "senderPublicKey": "57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4", "proofs": [ "4daHXM1JK8SNtM9Sm2whMaLbj4gtfVSHLMqhTG73oddXLnDUtFjNG2umWAxciCZmkAqBnwLmRLyVoVNkFmfj8Y1u" ], "assetId": "FjTB2DdymTfpYbCCdcFwoRbHQnEhQD11CUm6nAF7P1UD", "script": "base64:AgQAAAAFYWRtaW4JAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVT7U3zgWylABs9zUfyaAS1l4Zzgbt82QMAEAAAAB2dhdGV3YXkJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVT7U3zgWylABs9zUfyaAS1l4Zzgbt82QMAEAAAABmJhbm5lZAAAAAAAAAABkwQAAAAHS1lDVmVyMQAAAAAAAAAAAQQAAAAHS1lDVmVyMgAAAAAAAAAAAgQAAAAKS1lDUGVuZGluZwAAAAAAAAAAAAQAAAAJbWF4QW1vdW50AAAAAAAF9eEABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAQAAAAEZGF0YQkABBoAAAACBQAAAAVhZG1pbgkAAlgAAAABCAgFAAAAAXQAAAAGc2VuZGVyAAAABWJ5dGVzBAAAAAZhbW91bnQIBQAAAAF0AAAABmFtb3VudAQAAAAHYX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VK2GqkWpe7MA Next: HeA63T717DPsDfv8SPRecGWyY5eVE2uc9fV9rJ6pKjbT Diff:
OldNewDifferences
1212 let data = getInteger(admin, toBase58String(t.sender.bytes))
1313 let amount = t.amount
1414 let assetId = extract(t.assetId)
15+ let isUser = getInteger(admin, toBase58String(addressFromRecipient(t.recipient).bytes))
1516 if (!(isDefined(data)))
1617 then throw("You are not a registered member. You cannot transfer this SmartAsset!")
1718 else if ((data == 0))
1819 then throw("KYC Pending. You cannot transfer this SmartAsset")
1920 else if ((data == 1))
2021 then if ((t.recipient == gateway))
21- then if ((maxAmount >= amount))
22- then true
23- else throw("Cannot transfer please verify your acount. Amount is too much!")
24- else throw("You are not authorized to transfer this SmartAsset.. !")
25- else if ((data == 2))
26- then {
27- let isUser = getInteger(admin, toBase58String(addressFromRecipient(t.recipient).bytes))
28- if (isDefined(isUser))
29- then if ((isUser == 1))
22+ then true
23+ else if ((isUser == 1))
24+ then if ((maxAmount >= amount))
25+ then true
26+ else throw("Cannot transfer please verify your acount. Amount is too much!")
27+ else if ((isUser == 0))
28+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
29+ else if ((isUser == 2))
3030 then if ((maxAmount >= amount))
3131 then true
3232 else throw("Cannot transfer please verify your acount. Amount is too much!")
33- else if ((isUser == 0))
34- then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
35- else if ((isUser == 2))
36- then true
37- else if ((isUser == 403))
38- then throw("The recipient is banned. You cannot transfer this SmartAsset")
39- else throw("Undefined situation!")
40- else throw("The recipient is not authorized to possess this SmartAsset!")
41- }
33+ else if ((isUser == 403))
34+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
35+ else throw("Undefined situation!")
36+ else if ((data == 2))
37+ then if (isDefined(isUser))
38+ then if ((isUser == 1))
39+ then if ((maxAmount >= amount))
40+ then true
41+ else throw("Cannot transfer please verify your acount. Amount is too much!")
42+ else if ((isUser == 0))
43+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
44+ else if ((isUser == 2))
45+ then true
46+ else if ((isUser == 403))
47+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
48+ else throw("Undefined situation!")
49+ else throw("The recipient is not authorized to possess this SmartAsset!")
4250 else if ((data == 403))
4351 then throw("Your acount has been suspended!")
4452 else throw("Undefined situation!")
5159 let secondRecipient = mtt.transfers[1].recipient
5260 let firstAmount = mtt.transfers[0].amount
5361 let issueTransaction = transactionById(assetId)
62+ let isUser = getInteger(admin, toBase58String(addressFromRecipient(secondRecipient).bytes))
5463 if ((transferCount > 2))
5564 then throw("not allowed")
5665 else if (!(isDefined(data)))
5867 else if ((data == 0))
5968 then throw("KYC Pending. You cannot transfer this SmartAsset")
6069 else if ((data == 1))
61- then if ((firstRecipient == gateway))
62- then if ((maxAmount >= amount))
63- then match issueTransaction {
64- case issueTx: IssueTransaction =>
65- let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
66- let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
67- if ((firstRecipient == issuerAddress))
68- then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
69- else false
70- case _ =>
71- false
72- }
73- else throw("Cannot transfer please verify your acount. Amount is too much!")
74- else throw("You are not authorized to transfer this SmartAsset.. !")
75- else if ((data == 2))
76- then {
77- let isUser = getInteger(admin, toBase58String(addressFromRecipient(secondRecipient).bytes))
78- if (isDefined(isUser))
79- then if ((isUser == 1))
70+ then if ((firstRecipient != gateway))
71+ then false
72+ else if ((isUser == 1))
73+ then if ((maxAmount >= amount))
74+ then match issueTransaction {
75+ case issueTx: IssueTransaction =>
76+ let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
77+ let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
78+ if ((firstRecipient == issuerAddress))
79+ then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
80+ else false
81+ case _ =>
82+ false
83+ }
84+ else throw("Cannot transfer please verify your acount. Amount is too much!")
85+ else if ((isUser == 0))
86+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
87+ else if ((isUser == 2))
8088 then if ((maxAmount >= amount))
8189 then match issueTransaction {
8290 case issueTx: IssueTransaction =>
8997 false
9098 }
9199 else throw("Cannot transfer please verify your acount. Amount is too much!")
92- else if ((isUser == 0))
93- then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
94- else if ((isUser == 2))
95- then match issueTransaction {
96- case issueTx: IssueTransaction =>
97- let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
98- let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
99- if ((firstRecipient == issuerAddress))
100- then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
101- else false
102- case _ =>
103- false
104- }
105- else if ((isUser == 403))
106- then throw("The recipient is banned. You cannot transfer this SmartAsset")
107- else throw("Undefined situation!")
108- else throw("The recipient is not authorized to possess this SmartAsset!")
109- }
100+ else if ((isUser == 403))
101+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
102+ else throw("Undefined situation!")
103+ else if ((data == 2))
104+ then if (isDefined(isUser))
105+ then if ((isUser == 1))
106+ then if ((maxAmount >= amount))
107+ then match issueTransaction {
108+ case issueTx: IssueTransaction =>
109+ let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
110+ let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
111+ if ((firstRecipient == issuerAddress))
112+ then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
113+ else false
114+ case _ =>
115+ false
116+ }
117+ else throw("Cannot transfer please verify your acount. Amount is too much!")
118+ else if ((isUser == 0))
119+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
120+ else if ((isUser == 2))
121+ then match issueTransaction {
122+ case issueTx: IssueTransaction =>
123+ let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
124+ let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
125+ if ((firstRecipient == issuerAddress))
126+ then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
127+ else false
128+ case _ =>
129+ false
130+ }
131+ else if ((isUser == 403))
132+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
133+ else throw("Undefined situation!")
134+ else throw("The recipient is not authorized to possess this SmartAsset!")
110135 else if ((data == 403))
111136 then throw("Your acount has been suspended!")
112137 else throw("Undefined situation!")
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 KYCPending = 0
99 let maxAmount = 100000000
1010 match tx {
1111 case t: TransferTransaction =>
1212 let data = getInteger(admin, toBase58String(t.sender.bytes))
1313 let amount = t.amount
1414 let assetId = extract(t.assetId)
15+ let isUser = getInteger(admin, toBase58String(addressFromRecipient(t.recipient).bytes))
1516 if (!(isDefined(data)))
1617 then throw("You are not a registered member. You cannot transfer this SmartAsset!")
1718 else if ((data == 0))
1819 then throw("KYC Pending. You cannot transfer this SmartAsset")
1920 else if ((data == 1))
2021 then if ((t.recipient == gateway))
21- then if ((maxAmount >= amount))
22- then true
23- else throw("Cannot transfer please verify your acount. Amount is too much!")
24- else throw("You are not authorized to transfer this SmartAsset.. !")
25- else if ((data == 2))
26- then {
27- let isUser = getInteger(admin, toBase58String(addressFromRecipient(t.recipient).bytes))
28- if (isDefined(isUser))
29- then if ((isUser == 1))
22+ then true
23+ else if ((isUser == 1))
24+ then if ((maxAmount >= amount))
25+ then true
26+ else throw("Cannot transfer please verify your acount. Amount is too much!")
27+ else if ((isUser == 0))
28+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
29+ else if ((isUser == 2))
3030 then if ((maxAmount >= amount))
3131 then true
3232 else throw("Cannot transfer please verify your acount. Amount is too much!")
33- else if ((isUser == 0))
34- then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
35- else if ((isUser == 2))
36- then true
37- else if ((isUser == 403))
38- then throw("The recipient is banned. You cannot transfer this SmartAsset")
39- else throw("Undefined situation!")
40- else throw("The recipient is not authorized to possess this SmartAsset!")
41- }
33+ else if ((isUser == 403))
34+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
35+ else throw("Undefined situation!")
36+ else if ((data == 2))
37+ then if (isDefined(isUser))
38+ then if ((isUser == 1))
39+ then if ((maxAmount >= amount))
40+ then true
41+ else throw("Cannot transfer please verify your acount. Amount is too much!")
42+ else if ((isUser == 0))
43+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
44+ else if ((isUser == 2))
45+ then true
46+ else if ((isUser == 403))
47+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
48+ else throw("Undefined situation!")
49+ else throw("The recipient is not authorized to possess this SmartAsset!")
4250 else if ((data == 403))
4351 then throw("Your acount has been suspended!")
4452 else throw("Undefined situation!")
4553 case mtt: MassTransferTransaction =>
4654 let data = getInteger(admin, toBase58String(mtt.sender.bytes))
4755 let amount = mtt.totalAmount
4856 let assetId = extract(mtt.assetId)
4957 let transferCount = mtt.transferCount
5058 let firstRecipient = mtt.transfers[0].recipient
5159 let secondRecipient = mtt.transfers[1].recipient
5260 let firstAmount = mtt.transfers[0].amount
5361 let issueTransaction = transactionById(assetId)
62+ let isUser = getInteger(admin, toBase58String(addressFromRecipient(secondRecipient).bytes))
5463 if ((transferCount > 2))
5564 then throw("not allowed")
5665 else if (!(isDefined(data)))
5766 then throw("You are not a registered member. You cannot transfer this SmartAsset!")
5867 else if ((data == 0))
5968 then throw("KYC Pending. You cannot transfer this SmartAsset")
6069 else if ((data == 1))
61- then if ((firstRecipient == gateway))
62- then if ((maxAmount >= amount))
63- then match issueTransaction {
64- case issueTx: IssueTransaction =>
65- let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
66- let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
67- if ((firstRecipient == issuerAddress))
68- then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
69- else false
70- case _ =>
71- false
72- }
73- else throw("Cannot transfer please verify your acount. Amount is too much!")
74- else throw("You are not authorized to transfer this SmartAsset.. !")
75- else if ((data == 2))
76- then {
77- let isUser = getInteger(admin, toBase58String(addressFromRecipient(secondRecipient).bytes))
78- if (isDefined(isUser))
79- then if ((isUser == 1))
70+ then if ((firstRecipient != gateway))
71+ then false
72+ else if ((isUser == 1))
73+ then if ((maxAmount >= amount))
74+ then match issueTransaction {
75+ case issueTx: IssueTransaction =>
76+ let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
77+ let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
78+ if ((firstRecipient == issuerAddress))
79+ then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
80+ else false
81+ case _ =>
82+ false
83+ }
84+ else throw("Cannot transfer please verify your acount. Amount is too much!")
85+ else if ((isUser == 0))
86+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
87+ else if ((isUser == 2))
8088 then if ((maxAmount >= amount))
8189 then match issueTransaction {
8290 case issueTx: IssueTransaction =>
8391 let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
8492 let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
8593 if ((firstRecipient == issuerAddress))
8694 then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
8795 else false
8896 case _ =>
8997 false
9098 }
9199 else throw("Cannot transfer please verify your acount. Amount is too much!")
92- else if ((isUser == 0))
93- then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
94- else if ((isUser == 2))
95- then match issueTransaction {
96- case issueTx: IssueTransaction =>
97- let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
98- let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
99- if ((firstRecipient == issuerAddress))
100- then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
101- else false
102- case _ =>
103- false
104- }
105- else if ((isUser == 403))
106- then throw("The recipient is banned. You cannot transfer this SmartAsset")
107- else throw("Undefined situation!")
108- else throw("The recipient is not authorized to possess this SmartAsset!")
109- }
100+ else if ((isUser == 403))
101+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
102+ else throw("Undefined situation!")
103+ else if ((data == 2))
104+ then if (isDefined(isUser))
105+ then if ((isUser == 1))
106+ then if ((maxAmount >= amount))
107+ then match issueTransaction {
108+ case issueTx: IssueTransaction =>
109+ let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
110+ let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
111+ if ((firstRecipient == issuerAddress))
112+ then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
113+ else false
114+ case _ =>
115+ false
116+ }
117+ else throw("Cannot transfer please verify your acount. Amount is too much!")
118+ else if ((isUser == 0))
119+ then throw("The recipient is in KYC pending status. You cannot transfer this SmartAsset")
120+ else if ((isUser == 2))
121+ then match issueTransaction {
122+ case issueTx: IssueTransaction =>
123+ let issuerAddress = addressFromPublicKey(issueTx.senderPublicKey)
124+ let taxSize = extract(getInteger(issuerAddress, toBase58String(assetId)))
125+ if ((firstRecipient == issuerAddress))
126+ then (firstAmount >= ((mtt.totalAmount / 100) * taxSize))
127+ else false
128+ case _ =>
129+ false
130+ }
131+ else if ((isUser == 403))
132+ then throw("The recipient is banned. You cannot transfer this SmartAsset")
133+ else throw("Undefined situation!")
134+ else throw("The recipient is not authorized to possess this SmartAsset!")
110135 else if ((data == 403))
111136 then throw("Your acount has been suspended!")
112137 else throw("Undefined situation!")
113138 case ex: ExchangeTransaction =>
114139 false
115140 case b: BurnTransaction =>
116141 false
117142 case script: SetAssetScriptTransaction =>
118143 if ((script.sender == admin))
119144 then true
120145 else throw("Admin operation only..")
121146 case _ =>
122147 true
123148 }

github/deemru/w8io/6500d08 
42.04 ms