tx · Buapt4Y8hQds49duX211UexFvSLzeYP4FquMfoDYFzt8

3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4:  -0.01400000 Waves

2020.11.18 16:58 [1270872] smart account 3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4 > SELF 0.00000000 Waves

{ "type": 13, "id": "Buapt4Y8hQds49duX211UexFvSLzeYP4FquMfoDYFzt8", "fee": 1400000, "feeAssetId": null, "timestamp": 1605707937804, "version": 2, "chainId": 84, "sender": "3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4", "senderPublicKey": "2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv", "proofs": [ "2BCvLJdrcKv9VBDqjyBu8PR5GjJjg8jtnojfNck7338C91rqm1drdNbMuz9fVr9ki4A9du1jkp9PVfvHrCNfY8w" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAARYWNjb3VudDFQdWJsaWNLZXkBAAAAIPeNeDDs4TWVhR1bzOk94lFsHOraL9B/FRj0XfVMj0hOAAAAABFhY2NvdW50MlB1YmxpY0tleQEAAAAgG1e/aEwKrtMkcq9WyiLLAHtKPJgLd/oAoUXcKuUDIhUAAAAADm90aGVyUHVibGljS2V5AQAAACDnblGJprjxGAm9jEz8V5M0TOEG6bhNvbMQquBNrx0dWgAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEIBQAAAAFpAAAACHBheW1lbnRzAwkBAAAACWlzRGVmaW5lZAAAAAEICQABkQAAAAIFAAAAA3BtdAAAAAAAAAAAAAAAAAdhc3NldElkCQAAAgAAAAECAAAACG9ubHkgd3dzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAA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wUAAAAQYWNjb3VudDFhY2NvdW50MgYFAAAADWFjY291bnQxb3RoZXIGBQAAAA1hY2NvdW50Mm90aGVyKpsx/w==", "height": 1270872, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5YnQ2pv7QKAbgYMjPDEmWGWoNHPFYeXDqBSmL9HR6GCu Next: AvT16XRz5LeDDDYmFhfPZnVEeeoA3VgVrB8wgrF8BCW1 Diff:
OldNewDifferences
66 let account2PublicKey = base58'2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv'
77
88 let otherPublicKey = base58'GaQkBG6yLLAarb8wvPrEKnQhFqWomD2ZGT1T4vVx24qw'
9+
10+@Callable(i)
11+func purchase () = {
12+ let pmt = value(i.payments)
13+ if (isDefined(pmt[0].assetId))
14+ then throw("only wws")
15+ else {
16+ let customerAddress = toBase58String(i.caller.bytes)
17+ let price = match getInteger(this, "item_A_coupon_price") {
18+ case a: Int =>
19+ a
20+ case _ =>
21+ 0
22+ }
23+ if ((price > pmt[0].amount))
24+ then throw("moar moeny")
25+ else if ((pmt[0].amount > price))
26+ then throw("tu macz money")
27+ else if ((size(pmt) > 1))
28+ then throw("single item only")
29+ else [StringEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + customerAddress), price)]
30+ }
31+ }
932
1033
1134 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let account1PublicKey = base58'HfLpRhXtnuCabRyNT6z7soaXcbUpwLUhjyBCVQ4szwzd'
55
66 let account2PublicKey = base58'2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv'
77
88 let otherPublicKey = base58'GaQkBG6yLLAarb8wvPrEKnQhFqWomD2ZGT1T4vVx24qw'
9+
10+@Callable(i)
11+func purchase () = {
12+ let pmt = value(i.payments)
13+ if (isDefined(pmt[0].assetId))
14+ then throw("only wws")
15+ else {
16+ let customerAddress = toBase58String(i.caller.bytes)
17+ let price = match getInteger(this, "item_A_coupon_price") {
18+ case a: Int =>
19+ a
20+ case _ =>
21+ 0
22+ }
23+ if ((price > pmt[0].amount))
24+ then throw("moar moeny")
25+ else if ((pmt[0].amount > price))
26+ then throw("tu macz money")
27+ else if ((size(pmt) > 1))
28+ then throw("single item only")
29+ else [StringEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + customerAddress), price)]
30+ }
31+ }
932
1033
1134 @Verifier(tx)
1235 func verify () = {
1336 let account1 = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], account1PublicKey))
1437 then true
1538 else sigVerify(tx.bodyBytes, tx.proofs[1], account1PublicKey))
1639 then true
1740 else sigVerify(tx.bodyBytes, tx.proofs[2], account1PublicKey)
1841 let account2 = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], account2PublicKey))
1942 then true
2043 else sigVerify(tx.bodyBytes, tx.proofs[1], account2PublicKey))
2144 then true
2245 else sigVerify(tx.bodyBytes, tx.proofs[2], account2PublicKey)
2346 let other = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], otherPublicKey))
2447 then true
2548 else sigVerify(tx.bodyBytes, tx.proofs[1], otherPublicKey))
2649 then true
2750 else sigVerify(tx.bodyBytes, tx.proofs[2], otherPublicKey)
2851 let account1account2 = if (account1)
2952 then account2
3053 else false
3154 let account1other = if (account1)
3255 then other
3356 else false
3457 let account2other = if (other)
3558 then account2
3659 else false
3760 match tx {
3861 case d: SetScriptTransaction =>
3962 true
4063 case d: DataTransaction =>
4164 true
4265 case _ =>
4366 if (if (account1account2)
4467 then true
4568 else account1other)
4669 then true
4770 else account2other
4871 }
4972 }
5073

github/deemru/w8io/169f3d6 
37.19 ms