tx · 9zFfuwXYhxftvMUKMfMpShTHHE1YwBazWcSgFtv5Ee8H
3MpUDmnN27gMSxHDEFQLW75epUMECTHDn6E: -0.01400000 Waves
2020.11.26 11:00 [1282115] smart account 3MpUDmnN27gMSxHDEFQLW75epUMECTHDn6E > SELF 0.00000000 Waves
{
"type": 13,
"id": "9zFfuwXYhxftvMUKMfMpShTHHE1YwBazWcSgFtv5Ee8H",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1606377656350,
"version": 2,
"chainId": 84,
"sender": "3MpUDmnN27gMSxHDEFQLW75epUMECTHDn6E",
"senderPublicKey": "FJk5n9i5ysYBtjvPcos6iKm98yzpxms3gECZgg6Y8Bt1",
"proofs": [
"ybFi4Hcrr4Vn8wRNT1YBJEes8KLnhdm1Qb4xpUCBaxp4oUN9r979PdRcd8QNYJUvYFn6kLCZAWSYBc5NqGMY32D"
],
"script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABQAAAAAFZGVsYXkAAAAAAAAAAAoAAAAADGFtb3VudFRvR2l2ZQAAAAACVAvkAAAAAAAHYXNzZXRJZAEAAAAg6KVqvMp3QvJwYTI1Sk9Fg7m5HuWZZxfDcerZC6EEresBAAAAD2dldEludGVnZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhCQAAZQAAAAIFAAAABmhlaWdodAUAAAAFZGVsYXkBAAAACGFzU3RyaW5nAAAAAQAAAAJidgQAAAAHJG1hdGNoMAUAAAACYnYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAADYnYwBQAAAAckbWF0Y2gwBQAAAANidjAJAAACAAAAAQIAAAAXQWRkcmVzcyBTdHJpbmcgZXhwZWN0ZWQAAAABAAAAAWkBAAAAB2dldFNpZ24AAAABAAAABGFkZHIEAAAADmxhc3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dHgAAAAPc2VuZGVyUHVibGljS2V5B2rXRSI=",
"height": 1282115,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: B4aZPSHXihFqetkCTxWkNp8BxGJzmQJKqnEjE92os9ZL
Next: 6FcsZQTwQxxmmLX1AjGG4oRoGKfntFqzZktEM9ijGqJb
Diff:
Old | New | | Differences |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | | - | @Callable(h) |
---|
22 | | - | func getSign (i) = { |
---|
23 | | - | let j = d(i) |
---|
24 | | - | let k = ((height - j) >= a) |
---|
25 | | - | if (k) |
---|
26 | | - | then [IntegerEntry(i, height), ScriptTransfer(Address(fromBase58String(i)), b, c)] |
---|
| 21 | + | func h (i) = { |
---|
| 22 | + | let f = i |
---|
| 23 | + | if ($isInstanceOf(f, "String")) |
---|
| 24 | + | then { |
---|
| 25 | + | let j = f |
---|
| 26 | + | j |
---|
| 27 | + | } |
---|
| 28 | + | else throw("Address String expected") |
---|
| 29 | + | } |
---|
| 30 | + | |
---|
| 31 | + | |
---|
| 32 | + | @Callable(k) |
---|
| 33 | + | func getSign (l) = { |
---|
| 34 | + | let m = d(l) |
---|
| 35 | + | let n = ((height - m) >= a) |
---|
| 36 | + | if (n) |
---|
| 37 | + | then [IntegerEntry(l, height), ScriptTransfer(Address(fromBase58String(l)), b, c)] |
---|
27 | 38 | | else throw("You cannot get SIGN Token again yet") |
---|
28 | 39 | | } |
---|
29 | 40 | | |
---|
30 | 41 | | |
---|
31 | | - | @Verifier(l) |
---|
32 | | - | func m () = { |
---|
33 | | - | let f = l |
---|
| 42 | + | @Verifier(o) |
---|
| 43 | + | func p () = { |
---|
| 44 | + | let f = o |
---|
34 | 45 | | if ($isInstanceOf(f, "InvokeScriptTransaction")) |
---|
35 | 46 | | then { |
---|
36 | | - | let n = f |
---|
37 | | - | true |
---|
| 47 | + | let q = f |
---|
| 48 | + | let m = d(h(q.args[0])) |
---|
| 49 | + | let n = ((height - m) >= a) |
---|
| 50 | + | if (n) |
---|
| 51 | + | then (q.function == "getSign") |
---|
| 52 | + | else false |
---|
38 | 53 | | } |
---|
39 | 54 | | else if ($isInstanceOf(f, "SetScriptTransaction")) |
---|
40 | 55 | | then { |
---|
41 | | - | let o = f |
---|
42 | | - | sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) |
---|
| 56 | + | let r = f |
---|
| 57 | + | sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey) |
---|
43 | 58 | | } |
---|
44 | 59 | | else false |
---|
45 | 60 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = 10 |
---|
5 | 5 | | |
---|
6 | 6 | | let b = 10000000000 |
---|
7 | 7 | | |
---|
8 | 8 | | let c = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' |
---|
9 | 9 | | |
---|
10 | 10 | | func d (e) = { |
---|
11 | 11 | | let f = getInteger(this, e) |
---|
12 | 12 | | if ($isInstanceOf(f, "Int")) |
---|
13 | 13 | | then { |
---|
14 | 14 | | let g = f |
---|
15 | 15 | | g |
---|
16 | 16 | | } |
---|
17 | 17 | | else (height - a) |
---|
18 | 18 | | } |
---|
19 | 19 | | |
---|
20 | 20 | | |
---|
21 | | - | @Callable(h) |
---|
22 | | - | func getSign (i) = { |
---|
23 | | - | let j = d(i) |
---|
24 | | - | let k = ((height - j) >= a) |
---|
25 | | - | if (k) |
---|
26 | | - | then [IntegerEntry(i, height), ScriptTransfer(Address(fromBase58String(i)), b, c)] |
---|
| 21 | + | func h (i) = { |
---|
| 22 | + | let f = i |
---|
| 23 | + | if ($isInstanceOf(f, "String")) |
---|
| 24 | + | then { |
---|
| 25 | + | let j = f |
---|
| 26 | + | j |
---|
| 27 | + | } |
---|
| 28 | + | else throw("Address String expected") |
---|
| 29 | + | } |
---|
| 30 | + | |
---|
| 31 | + | |
---|
| 32 | + | @Callable(k) |
---|
| 33 | + | func getSign (l) = { |
---|
| 34 | + | let m = d(l) |
---|
| 35 | + | let n = ((height - m) >= a) |
---|
| 36 | + | if (n) |
---|
| 37 | + | then [IntegerEntry(l, height), ScriptTransfer(Address(fromBase58String(l)), b, c)] |
---|
27 | 38 | | else throw("You cannot get SIGN Token again yet") |
---|
28 | 39 | | } |
---|
29 | 40 | | |
---|
30 | 41 | | |
---|
31 | | - | @Verifier(l) |
---|
32 | | - | func m () = { |
---|
33 | | - | let f = l |
---|
| 42 | + | @Verifier(o) |
---|
| 43 | + | func p () = { |
---|
| 44 | + | let f = o |
---|
34 | 45 | | if ($isInstanceOf(f, "InvokeScriptTransaction")) |
---|
35 | 46 | | then { |
---|
36 | | - | let n = f |
---|
37 | | - | true |
---|
| 47 | + | let q = f |
---|
| 48 | + | let m = d(h(q.args[0])) |
---|
| 49 | + | let n = ((height - m) >= a) |
---|
| 50 | + | if (n) |
---|
| 51 | + | then (q.function == "getSign") |
---|
| 52 | + | else false |
---|
38 | 53 | | } |
---|
39 | 54 | | else if ($isInstanceOf(f, "SetScriptTransaction")) |
---|
40 | 55 | | then { |
---|
41 | | - | let o = f |
---|
42 | | - | sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) |
---|
| 56 | + | let r = f |
---|
| 57 | + | sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey) |
---|
43 | 58 | | } |
---|
44 | 59 | | else false |
---|
45 | 60 | | } |
---|
46 | 61 | | |
---|