tx · Et4n3qHzA4SCLgzkmJZKwG2uGkAGXAtuRrXdoqRFyvyo

3N9g8vmJj171kPszhaCUyPDNfNPqaXiFP3Z:  -0.04000000 Waves

2020.06.07 19:46 [1033133] smart account 3N9g8vmJj171kPszhaCUyPDNfNPqaXiFP3Z > SELF 0.00000000 Waves

{ "type": 13, "id": "Et4n3qHzA4SCLgzkmJZKwG2uGkAGXAtuRrXdoqRFyvyo", "fee": 4000000, "feeAssetId": null, "timestamp": 1591548486253, "version": 1, "sender": "3N9g8vmJj171kPszhaCUyPDNfNPqaXiFP3Z", "senderPublicKey": "G4tSmURBD4HJkP9Q8xjQhetzYDb1J7Bc581de6M9V7AK", "proofs": [ "3wE96Whk4EmWFYY9ghviJCS4XMXjtcSyR8NQYxnHEY4NhiejmtenWyn76N8KWTw3ArU8j5TjWB6aE5S2tFz2MANz" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAgY2FuIHVzZSBXQVZFUyBvbmx5IGF0IHRoZSBtb21lbnQEAAAAD2N1c3RvbWVyQWRyZWVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNJdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbSBpdGVtIHByaWNlAwkAAGYAAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UJAAACAAAAAQIAAAAwcHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBoaWdoZXIgdGhhbiBpdGVtIHByb2NlCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAIHN0YXR1czpwdXJjaGFzZV9JdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkcmVlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAAB9wcmljZTpwdXJjaGFzZV9JdGVtX0FfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkcmVlc3MFAAAABXByaWNlBQAAAANuaWwAAAAA8TRENQ==", "chainId": 84, "height": 1033133, "spentComplexity": 0 } View: original | compacted Prev: zGKYXtPjHWS44vnEtqyaLaqzEVidpR2jnY682L6Pv2q Next: 453BXrz1QG6PHXRauBiCTQrPvD31wkC4BueWemFRheBb Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'7ULo5c4qYG7K4Zy4SFTMGzYzQ8By2hXNHAZYmoQrHtpE'
54
6-let b = base58'G4tSmURBD4HJkP9Q8xjQhetzYDb1J7Bc581de6M9V7AK'
75
8-let c = base58'B8P2fEVPKmbGP1deNKPcTxG9N3R9viSWrVdo3LiDjvkm'
9-
10-@Callable(d)
6+@Callable(a)
117 func purchase () = {
12- let e = extract(d.payment)
13- if (isDefined(e.assetId))
14- then throw("can hodl WAVES only at the moment")
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("can use WAVES only at the moment")
1511 else {
16- let f = toBase58String(d.caller.bytes)
17- let g = {
18- let h = getInteger(this, "Item_A_coupon_price")
19- if ($isInstanceOf(h, "Int"))
12+ let c = toBase58String(a.caller.bytes)
13+ let d = {
14+ let e = getInteger(this, "Item_A_coupon_price")
15+ if ($isInstanceOf(e, "Int"))
2016 then {
21- let i = h
22- i
17+ let f = e
18+ f
2319 }
2420 else 0
2521 }
26- if ((g > e.amount))
27- then throw("purchase amount cannot be less them item")
28- else if ((e.amount > g))
29- then throw("purchase amount cannot be higher them item")
30- else WriteSet([DataEntry(("status:purchase_Item_A_customer_" + f), "confirmed"), DataEntry(("price:purchase_Item_A_customer_" + f), g)])
22+ if ((d > b.amount))
23+ then throw("purchase amount cannot be less tham item price")
24+ else if ((b.amount > d))
25+ then throw("purchase amount cannot be higher than item proce")
26+ else WriteSet([DataEntry(("status:purchase_Item_A_customer_" + c), "confirmed"), DataEntry(("price:purchase_Item_A_customer_" + c), d)])
3127 }
3228 }
3329
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'7ULo5c4qYG7K4Zy4SFTMGzYzQ8By2hXNHAZYmoQrHtpE'
54
6-let b = base58'G4tSmURBD4HJkP9Q8xjQhetzYDb1J7Bc581de6M9V7AK'
75
8-let c = base58'B8P2fEVPKmbGP1deNKPcTxG9N3R9viSWrVdo3LiDjvkm'
9-
10-@Callable(d)
6+@Callable(a)
117 func purchase () = {
12- let e = extract(d.payment)
13- if (isDefined(e.assetId))
14- then throw("can hodl WAVES only at the moment")
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("can use WAVES only at the moment")
1511 else {
16- let f = toBase58String(d.caller.bytes)
17- let g = {
18- let h = getInteger(this, "Item_A_coupon_price")
19- if ($isInstanceOf(h, "Int"))
12+ let c = toBase58String(a.caller.bytes)
13+ let d = {
14+ let e = getInteger(this, "Item_A_coupon_price")
15+ if ($isInstanceOf(e, "Int"))
2016 then {
21- let i = h
22- i
17+ let f = e
18+ f
2319 }
2420 else 0
2521 }
26- if ((g > e.amount))
27- then throw("purchase amount cannot be less them item")
28- else if ((e.amount > g))
29- then throw("purchase amount cannot be higher them item")
30- else WriteSet([DataEntry(("status:purchase_Item_A_customer_" + f), "confirmed"), DataEntry(("price:purchase_Item_A_customer_" + f), g)])
22+ if ((d > b.amount))
23+ then throw("purchase amount cannot be less tham item price")
24+ else if ((b.amount > d))
25+ then throw("purchase amount cannot be higher than item proce")
26+ else WriteSet([DataEntry(("status:purchase_Item_A_customer_" + c), "confirmed"), DataEntry(("price:purchase_Item_A_customer_" + c), d)])
3127 }
3228 }
3329
3430

github/deemru/w8io/169f3d6 
35.72 ms