tx · DFWPLH6T6C7CXDqBTWGPY8VM3tPiqocXo14H8jCxvw4D

3N9g8vmJj171kPszhaCUyPDNfNPqaXiFP3Z:  -0.04000000 Waves

2020.06.07 21:57 [1033274] smart account 3N9g8vmJj171kPszhaCUyPDNfNPqaXiFP3Z > SELF 0.00000000 Waves

{ "type": 13, "id": "DFWPLH6T6C7CXDqBTWGPY8VM3tPiqocXo14H8jCxvw4D", "fee": 4000000, "feeAssetId": null, "timestamp": 1591556317525, "version": 1, "sender": "3N9g8vmJj171kPszhaCUyPDNfNPqaXiFP3Z", "senderPublicKey": "G4tSmURBD4HJkP9Q8xjQhetzYDb1J7Bc581de6M9V7AK", "proofs": [ "5yeHXZd2scJkUSdSCXNBtyQc5766Qq8ui2sZf6aEF8vRFNxXZCWVNhSKoFTWV2uWE3JH35DrpjaFZLrrqE1S3Lvz" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAABAAAABGl0ZW0EAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACBjYW4gdXNlIFdBVkVTIG9ubHkgYXQgdGhlIG1vbWVudAQAAAAPY3VzdG9tZXJBZHJlZXNzCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABXByaWNlBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkAASwAAAACAgAAAAVpdGVtXwUAAAAEaXRlbQIAAAANX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAucHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBsZXNzIHRoYW4gaXRlbSBwcmljZQMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAECAAAAMHB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgaGlnaGVyIHRoYW4gaXRlbSBwcmljZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAVc3RhdHVzOnB1cmNoYXNlX2l0ZW1fBQAAAARpdGVtAgAAAApfY3VzdG9tZXJfBQAAAA9jdXN0b21lckFkcmVlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAUcHJpY2U6cHVyY2hhc2VfaXRlbV8FAAAABGl0ZW0CAAAACl9jdXN0b21lcl8FAAAAD2N1c3RvbWVyQWRyZWVzcwUAAAAFcHJpY2UFAAAAA25pbAAAAADQHoxw", "chainId": 84, "height": 1033274, "spentComplexity": 0 } View: original | compacted Prev: 6dzi6XKUmsrRgrLLzQjNhdWwjhDeAtYLKeFT5aUWCMyd Next: 4YpctKtJh8wwBX2XmQbKBV4GJx4rnqKhjXWKE4pZDM9b Diff:
OldNewDifferences
1111 else {
1212 let d = toBase58String(a.caller.bytes)
1313 let e = {
14- let f = getInteger(this, (b + "_coupon_price"))
14+ let f = getInteger(this, (("item_" + b) + "_coupon_price"))
1515 if ($isInstanceOf(f, "Int"))
1616 then {
1717 let g = f
2323 then throw("purchase amount cannot be less than item price")
2424 else if ((c.amount > e))
2525 then throw("purchase amount cannot be higher than item price")
26- else WriteSet([DataEntry(((("status:purchase_" + b) + "_customer_") + d), "confirmed"), DataEntry(((("price:purchase_" + b) + "_customer_") + d), e)])
26+ else WriteSet([DataEntry(((("status:purchase_item_" + b) + "_customer_") + d), "confirmed"), DataEntry(((("price:purchase_item_" + b) + "_customer_") + d), e)])
2727 }
2828 }
2929
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func purchase (b) = {
88 let c = extract(a.payment)
99 if (isDefined(c.assetId))
1010 then throw("can use WAVES only at the moment")
1111 else {
1212 let d = toBase58String(a.caller.bytes)
1313 let e = {
14- let f = getInteger(this, (b + "_coupon_price"))
14+ let f = getInteger(this, (("item_" + b) + "_coupon_price"))
1515 if ($isInstanceOf(f, "Int"))
1616 then {
1717 let g = f
1818 g
1919 }
2020 else 0
2121 }
2222 if ((e > c.amount))
2323 then throw("purchase amount cannot be less than item price")
2424 else if ((c.amount > e))
2525 then throw("purchase amount cannot be higher than item price")
26- else WriteSet([DataEntry(((("status:purchase_" + b) + "_customer_") + d), "confirmed"), DataEntry(((("price:purchase_" + b) + "_customer_") + d), e)])
26+ else WriteSet([DataEntry(((("status:purchase_item_" + b) + "_customer_") + d), "confirmed"), DataEntry(((("price:purchase_item_" + b) + "_customer_") + d), e)])
2727 }
2828 }
2929
3030

github/deemru/w8io/169f3d6 
40.15 ms