tx · CQZ5DUYy7TYDzQWinGESEPHpUKHiBRoAuMFmzYwzTv8L 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF: -0.01400000 Waves 2020.03.09 00:32 [900643] smart account 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF > SELF 0.00000000 Waves
{ "type": 13, "id": "CQZ5DUYy7TYDzQWinGESEPHpUKHiBRoAuMFmzYwzTv8L", "fee": 1400000, "feeAssetId": null, "timestamp": 1583702488792, "version": 1, "sender": "3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF", "senderPublicKey": "9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3", "proofs": [ "247DpWM5jWHKGnBRWfx4xwjHFVHvKxvvgcGjGKmfJc5SonZCgWhf4PVh6u5PnMX96LitkuyL3bhaVpZtAEUGEbU5" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASABIDCgEBAAAAAwAAAAAGRVVDb2luAQAAACDJofoUphCC2vgdQrn0R0tQm4QOreBLRVolNScltI/WUQAAAAAGVVNDb2luAQAAACCWpimiLpI8FZFaHXIW3ZwI74bEgcPecoAv5ODcRcQ7/QAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIIR0OzhzTJc1ozXjp3CfISpQxO2vbrCrTGSiFABFRe8mAAAABAAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkAwkAAAAAAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABlVTQ29pbgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAKY3VycmVudEtleQIAAAAHX3VzY29pbgMJA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bmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCQAAaAAAAAIIBQAAAANwbXQAAAAGYW1vdW50AAAAAAAAAABkBQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAhWW91IENhbiBXaXRoZHJhdyB3aXRoIEVVQ29pbiBvbmx5CQAAAgAAAAECAAAAIVlvdSBDYW4gV2l0aGRyYXcgd2l0aCBFVUNvaW4gb25seQAAAAFpAQAAAAlnZXRGYXVjZXQAAAABAAAABmFtb3VudAMJAABmAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAABmFtb3VudAUAAAAGRVVDb2luBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA5vd25lclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgeCdcPX", "chainId": 84, "height": 900643, "spentComplexity": 0 } View: original | compacted Prev: CboyMhD6AT5mda17bNrfukxyFGF8ChBkHzA9mt5aQUDw Next: 8g6cLM8gBeo4CTSUvYNAiDwxFh1SodqncDLQNhyKKsjD Diff:
Old | New | Differences | |
---|---|---|---|
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | - | @Verifier(k) | |
106 | - | func l () = { | |
107 | - | let h = k | |
105 | + | ||
106 | + | @Callable(d) | |
107 | + | func getFaucet (k) = if ((0 > k)) | |
108 | + | then throw("Can't withdraw negative amount") | |
109 | + | else TransferSet([ScriptTransfer(d.caller, k, a)]) | |
110 | + | ||
111 | + | ||
112 | + | @Verifier(l) | |
113 | + | func m () = { | |
114 | + | let h = l | |
108 | 115 | if ($isInstanceOf(h, "SetScriptTransaction")) | |
109 | 116 | then { | |
110 | - | let | |
111 | - | sigVerify( | |
117 | + | let n = h | |
118 | + | sigVerify(l.bodyBytes, l.proofs[0], c) | |
112 | 119 | } | |
113 | 120 | else if ($isInstanceOf(h, "DataTransaction")) | |
114 | 121 | then { | |
115 | - | let | |
122 | + | let n = h | |
116 | 123 | true | |
117 | 124 | } | |
118 | 125 | else false |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'Ea6CdDfumo8ZFecxUSWKAjZpQXmkRC79WB4ktu3KffPn' | |
5 | 5 | ||
6 | 6 | let b = base58'B957NA5BEM8quCDhe1fUPkqBSdCZdJunNxjGE8FRJkWx' | |
7 | 7 | ||
8 | 8 | let c = base58'9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3' | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func deposit () = { | |
12 | 12 | let e = extract(d.payment) | |
13 | 13 | if (isDefined(e.assetId)) | |
14 | 14 | then if ((e.assetId == b)) | |
15 | 15 | then { | |
16 | 16 | let f = toBase58String(d.caller.bytes) | |
17 | 17 | let g = { | |
18 | 18 | let h = getInteger(this, (f + "_uscoin")) | |
19 | 19 | if ($isInstanceOf(h, "Int")) | |
20 | 20 | then { | |
21 | 21 | let i = h | |
22 | 22 | i | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | let j = (g + e.amount) | |
27 | 27 | ScriptResult(WriteSet([DataEntry((f + "_uscoin"), j)]), TransferSet([ScriptTransfer(d.caller, e.amount, a)])) | |
28 | 28 | } | |
29 | 29 | else throw("can hodl USCoin only at the moment") | |
30 | 30 | else { | |
31 | 31 | let f = toBase58String(d.caller.bytes) | |
32 | 32 | let g = { | |
33 | 33 | let h = getInteger(this, (f + "_waves")) | |
34 | 34 | if ($isInstanceOf(h, "Int")) | |
35 | 35 | then { | |
36 | 36 | let i = h | |
37 | 37 | i | |
38 | 38 | } | |
39 | 39 | else 0 | |
40 | 40 | } | |
41 | 41 | let j = (g + (e.amount / 100)) | |
42 | 42 | ScriptResult(WriteSet([DataEntry((f + "_waves"), j)]), TransferSet([ScriptTransfer(d.caller, (e.amount / 100), a)])) | |
43 | 43 | } | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(d) | |
49 | 49 | func withdrawUSCoin () = { | |
50 | 50 | let e = extract(d.payment) | |
51 | 51 | if (isDefined(e.assetId)) | |
52 | 52 | then if ((e.assetId == a)) | |
53 | 53 | then { | |
54 | 54 | let f = toBase58String(d.caller.bytes) | |
55 | 55 | let g = { | |
56 | 56 | let h = getInteger(this, (f + "_uscoin")) | |
57 | 57 | if ($isInstanceOf(h, "Int")) | |
58 | 58 | then { | |
59 | 59 | let i = h | |
60 | 60 | i | |
61 | 61 | } | |
62 | 62 | else 0 | |
63 | 63 | } | |
64 | 64 | let j = (g - e.amount) | |
65 | 65 | if ((0 > e.amount)) | |
66 | 66 | then throw("Can't withdraw negative amount") | |
67 | 67 | else if ((0 > j)) | |
68 | 68 | then throw("Not enough USCoin Deposited") | |
69 | 69 | else ScriptResult(WriteSet([DataEntry((f + "_uscoin"), j)]), TransferSet([ScriptTransfer(d.caller, e.amount, b)])) | |
70 | 70 | } | |
71 | 71 | else throw("You Can Withdraw with EUCoin only") | |
72 | 72 | else throw("You Can Withdraw with EUCoin only") | |
73 | 73 | } | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(d) | |
78 | 78 | func withdrawWaves () = { | |
79 | 79 | let e = extract(d.payment) | |
80 | 80 | if (isDefined(e.assetId)) | |
81 | 81 | then if ((e.assetId == a)) | |
82 | 82 | then { | |
83 | 83 | let f = toBase58String(d.caller.bytes) | |
84 | 84 | let g = { | |
85 | 85 | let h = getInteger(this, (f + "_waves")) | |
86 | 86 | if ($isInstanceOf(h, "Int")) | |
87 | 87 | then { | |
88 | 88 | let i = h | |
89 | 89 | i | |
90 | 90 | } | |
91 | 91 | else 0 | |
92 | 92 | } | |
93 | 93 | let j = (g - e.amount) | |
94 | 94 | if ((0 > e.amount)) | |
95 | 95 | then throw("Can't withdraw negative amount") | |
96 | 96 | else if ((0 > j)) | |
97 | 97 | then throw("Not enough Waves Deposited") | |
98 | 98 | else ScriptResult(WriteSet([DataEntry((f + "_waves"), j)]), TransferSet([ScriptTransfer(d.caller, (e.amount * 100), unit)])) | |
99 | 99 | } | |
100 | 100 | else throw("You Can Withdraw with EUCoin only") | |
101 | 101 | else throw("You Can Withdraw with EUCoin only") | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | - | @Verifier(k) | |
106 | - | func l () = { | |
107 | - | let h = k | |
105 | + | ||
106 | + | @Callable(d) | |
107 | + | func getFaucet (k) = if ((0 > k)) | |
108 | + | then throw("Can't withdraw negative amount") | |
109 | + | else TransferSet([ScriptTransfer(d.caller, k, a)]) | |
110 | + | ||
111 | + | ||
112 | + | @Verifier(l) | |
113 | + | func m () = { | |
114 | + | let h = l | |
108 | 115 | if ($isInstanceOf(h, "SetScriptTransaction")) | |
109 | 116 | then { | |
110 | - | let | |
111 | - | sigVerify( | |
117 | + | let n = h | |
118 | + | sigVerify(l.bodyBytes, l.proofs[0], c) | |
112 | 119 | } | |
113 | 120 | else if ($isInstanceOf(h, "DataTransaction")) | |
114 | 121 | then { | |
115 | - | let | |
122 | + | let n = h | |
116 | 123 | true | |
117 | 124 | } | |
118 | 125 | else false | |
119 | 126 | } | |
120 | 127 |
github/deemru/w8io/169f3d6 66.13 ms ◑