tx · AhCShtmr2zhZntHaY2xHSQXqikxVL5gc8Xf9MecTM2hV

3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni:  -0.01400000 Waves

2019.08.19 14:20 [637962] smart account 3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni > SELF 0.00000000 Waves

{ "type": 13, "id": "AhCShtmr2zhZntHaY2xHSQXqikxVL5gc8Xf9MecTM2hV", "fee": 1400000, "feeAssetId": null, "timestamp": 1566213652899, "version": 1, "sender": "3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni", "senderPublicKey": "5qEf6v7n4Cm55KWEaSs76eUft3uwLezLoJeBrf6u9BKE", "proofs": [ "3n9duRzYiprtAnTAjV5QUs3FPiR4PnbwfZEs7puuxSMzSPt7LuynTgZtQegBaKVgPFysNgNRt2pVs4vPqEuTYXjU" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAp3YXZlc1Rva2VuBQAAAAR1bml0AQAAAAlwYXltZW50T2YAAAABAAAAA2tleQkAASwAAAACAgAAAAtwYXltZW50X29mXwUAAAADa2V5AQAAAAhzdGF0dXNPZgAAAAEAAAADa2V5CQABLAAAAAICAAAACnN0YXR1c19vZl8FAAAAA2tleQAAAAAFb3duZXIJAQAAAAV2YWx1ZQAAAAEJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM041aFFtNnR3VmhGZ2Y4bUtCa0pwTmh4d2NCbnBac1B5bmkBAAAAEGlzUGF5bWVudFBlbmRpbmcAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzCQABLAAAAAICAAAACnN0YXR1c19vZl8FAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwCQAAAAAAAAIFAAAAAXMCAAAAB3BlbmRpbmcHAAAAAwAAAAFpAQAAABBzZXRXYWl0VG9QYXltZW50AAAAAgAAAANrZX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mVlbiBwYXllZCBvciByZWplY3RlZAAAAAFpAQAAAAZyZWplY3QAAAABAAAAA2tleQMJAQAAABBpc1BheW1lbnRQZW5kaW5nAAAAAQUAAAADa2V5CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAIc3RhdHVzT2YAAAABBQAAAANrZXkCAAAACHJlamVjdGVkBQAAAANuaWwJAAACAAAAAQIAAAAoT3JkZXIgYWxyZWFkeSBoYXMgYmVlbiBwYXllZCBvciByZWplY3RlZAAAAAARzhSF", "chainId": 84, "height": 637962, "spentComplexity": 0 } View: original | compacted Prev: CSrrtvcWK5PNkVHx3SH6JA5dhUhrLqw3QC1kKeP7Rzay Next: qPgECP2aQ4ByJYJqfoF3ZCAPGyXxuzjq8jLp4XeVC8W Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "owner"
4+let a = unit
55
6-let b = unit
7-
8-func c (d) = ("payment_of_" + d)
6+func b (c) = ("payment_of_" + c)
97
108
11-func e (d) = ("status_of_" + d)
9+func d (c) = ("status_of_" + c)
1210
1311
14-let f = addressFromStringValue(value(getString(this, a)))
12+let e = value(addressFromStringValue("3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni"))
1513
16-func g (d) = {
17- let h = getString(this, ("status_of_" + d))
18- if ($isInstanceOf(h, "String"))
14+func f (c) = {
15+ let g = getString(this, ("status_of_" + c))
16+ if ($isInstanceOf(g, "String"))
1917 then {
20- let i = h
21- (i == "pending")
18+ let h = g
19+ (h == "pending")
2220 }
2321 else false
2422 }
2523
2624
27-@Callable(j)
28-func init (f,k) = if ((j.caller == this))
29- then WriteSet([DataEntry(a, f)])
30- else throw("only dapp itself can init")
25+@Callable(i)
26+func setWaitToPayment (c,j) = WriteSet([DataEntry(d(c), "pending"), DataEntry(b(c), j)])
3127
3228
3329
34-@Callable(j)
35-func setWaitToPayment (d,l) = WriteSet([DataEntry(e(d), "pending"), DataEntry(c(d), l)])
36-
37-
38-
39-@Callable(j)
40-func pay (d) = if (g(d))
30+@Callable(i)
31+func pay (c) = if (f(c))
4132 then {
42- let h = j.payment
43- if ($isInstanceOf(h, "AttachedPayment"))
33+ let g = i.payment
34+ if ($isInstanceOf(g, "AttachedPayment"))
4435 then {
45- let m = h
46- if ((m.assetId == unit))
36+ let k = g
37+ if ((k.assetId == unit))
4738 then {
48- let n = WriteSet([DataEntry("status_of_test", "paid")])
49- ScriptResult(n, TransferSet([ScriptTransfer(Address(base58'3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni'), 10, b)]))
39+ let l = WriteSet([DataEntry(d(c), "paid")])
40+ let j = extract(getInteger(this, b(c)))
41+ ScriptResult(l, TransferSet([ScriptTransfer(e, j, a)]))
5042 }
51- else throw("can only WAVES, but got ")
43+ else throw(("can only WAVES, but got " + toBase58String(value(k.assetId))))
5244 }
5345 else throw("payment in assetTokens must be attached")
5446 }
5648
5749
5850
59-@Callable(j)
60-func reject (d) = if (g(d))
61- then WriteSet([DataEntry(e(d), "rejected")])
51+@Callable(i)
52+func reject (c) = if (f(c))
53+ then WriteSet([DataEntry(d(c), "rejected")])
6254 else throw("Order already has been payed or rejected")
6355
6456
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "owner"
4+let a = unit
55
6-let b = unit
7-
8-func c (d) = ("payment_of_" + d)
6+func b (c) = ("payment_of_" + c)
97
108
11-func e (d) = ("status_of_" + d)
9+func d (c) = ("status_of_" + c)
1210
1311
14-let f = addressFromStringValue(value(getString(this, a)))
12+let e = value(addressFromStringValue("3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni"))
1513
16-func g (d) = {
17- let h = getString(this, ("status_of_" + d))
18- if ($isInstanceOf(h, "String"))
14+func f (c) = {
15+ let g = getString(this, ("status_of_" + c))
16+ if ($isInstanceOf(g, "String"))
1917 then {
20- let i = h
21- (i == "pending")
18+ let h = g
19+ (h == "pending")
2220 }
2321 else false
2422 }
2523
2624
27-@Callable(j)
28-func init (f,k) = if ((j.caller == this))
29- then WriteSet([DataEntry(a, f)])
30- else throw("only dapp itself can init")
25+@Callable(i)
26+func setWaitToPayment (c,j) = WriteSet([DataEntry(d(c), "pending"), DataEntry(b(c), j)])
3127
3228
3329
34-@Callable(j)
35-func setWaitToPayment (d,l) = WriteSet([DataEntry(e(d), "pending"), DataEntry(c(d), l)])
36-
37-
38-
39-@Callable(j)
40-func pay (d) = if (g(d))
30+@Callable(i)
31+func pay (c) = if (f(c))
4132 then {
42- let h = j.payment
43- if ($isInstanceOf(h, "AttachedPayment"))
33+ let g = i.payment
34+ if ($isInstanceOf(g, "AttachedPayment"))
4435 then {
45- let m = h
46- if ((m.assetId == unit))
36+ let k = g
37+ if ((k.assetId == unit))
4738 then {
48- let n = WriteSet([DataEntry("status_of_test", "paid")])
49- ScriptResult(n, TransferSet([ScriptTransfer(Address(base58'3N5hQm6twVhFgf8mKBkJpNhxwcBnpZsPyni'), 10, b)]))
39+ let l = WriteSet([DataEntry(d(c), "paid")])
40+ let j = extract(getInteger(this, b(c)))
41+ ScriptResult(l, TransferSet([ScriptTransfer(e, j, a)]))
5042 }
51- else throw("can only WAVES, but got ")
43+ else throw(("can only WAVES, but got " + toBase58String(value(k.assetId))))
5244 }
5345 else throw("payment in assetTokens must be attached")
5446 }
5547 else throw("Order already has been payed or rejected")
5648
5749
5850
59-@Callable(j)
60-func reject (d) = if (g(d))
61- then WriteSet([DataEntry(e(d), "rejected")])
51+@Callable(i)
52+func reject (c) = if (f(c))
53+ then WriteSet([DataEntry(d(c), "rejected")])
6254 else throw("Order already has been payed or rejected")
6355
6456

github/deemru/w8io/026f985 
30.55 ms