tx · GFgXCaWNgBkEKdyxrVYofep8boLpHXqdfP1hGMnKhuk 3NCZ57kfAyy5g1u9wU6xpPATZaGHQsWtdii: -0.01000000 Waves 2020.03.16 16:34 [911870] smart account 3NCZ57kfAyy5g1u9wU6xpPATZaGHQsWtdii > SELF 0.00000000 Waves
{ "type": 13, "id": "GFgXCaWNgBkEKdyxrVYofep8boLpHXqdfP1hGMnKhuk", "fee": 1000000, "feeAssetId": null, "timestamp": 1584365478487, "version": 1, "sender": "3NCZ57kfAyy5g1u9wU6xpPATZaGHQsWtdii", "senderPublicKey": "9qhZSTJv6GQKghqH88TBPU6rNvQWf6yXCL57T7C7oi7A", "proofs": [ "2mi78ssw1fmXQmrwUG7FPmf6yo86mqsUvYug7UyMVSAyaaf2ZQL4mKQi1AroFcZRXRY9HFUNYBiToJSJeEiVpQ92" ], "script": "base64:AAIDAAAAAAAAADoIARIFCgMBCAESCAoGAQgBAQgBEgUKAwgBCBIHCgUIAQgIARIFCgMIAQgSBQoDCAEIEgcKBQgBCAgBAAAAAAAAAAcAAAABaQEAAAAOc3BvbnNvckRlcG9zaXQAAAADAAAACmNvbXBlc3RhcnQAAAAJYXNzZXROYW1lAAAACGNvbXBlbnVtBAAAAAhjb21wZU51bQkAAaQAAAABBQAAAAhjb21wZW51bQQAAAAKY29tcGVTdGFydAkAAaQAAAABBQAAAApjb21wZXN0YXJ0BAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAJcGF5bWVudElkCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAhjb21wZU51bQUAAAAJYXNzZXROYW1lBQAAAApjb21wZVN0YXJ0BQAAAApjdXJyZW50S2V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AAANZ29sZmVyYWRkcmVzcwUAAAAJbmV3QW1vdW50BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAZhbW91bnQFAAAAB2Fzc2V0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAA3R0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAA3R0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAN0dHgAAAAPc2VuZGVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAANzdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANzdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAADc3R4AAAAD3NlbmRlclB1YmxpY0tleQYn2Ico", "chainId": 84, "height": 911870, "spentComplexity": 0 } View: original | compacted Prev: none Next: DceYtsNB4uh5tvBkwxTzFfYmjTQPxWkeCoy8rNxUuoqV Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func sponsorDeposit (compestart,assetName,compenum) = { | |
8 | + | let compeNum = toString(compenum) | |
9 | + | let compeStart = toString(compestart) | |
10 | + | let pmt = extract(i.payment) | |
11 | + | let paymentId = pmt.assetId | |
12 | + | let currentKey = toBase58String(i.caller.bytes) | |
13 | + | let currentAmount = match getInteger(this, (((compeNum + assetName) + compeStart) + currentKey)) { | |
14 | + | case a: Int => | |
15 | + | a | |
16 | + | case _ => | |
17 | + | 0 | |
18 | + | } | |
19 | + | let newAmount = (currentAmount + pmt.amount) | |
20 | + | WriteSet([DataEntry((((compeNum + assetName) + compeStart) + currentKey), newAmount), DataEntry((((compeNum + compeStart) + assetName) + currentKey), compestart)]) | |
21 | + | } | |
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | @Callable(i) | |
26 | + | func sponsorWithdraw (startTimestamp,assetName,compenum,amount,id,nowTimestamp) = { | |
27 | + | let compestart = toString(startTimestamp) | |
28 | + | let compeNum = toString(compenum) | |
29 | + | let assetId = fromBase58String(id) | |
30 | + | let currentKey = toBase58String(i.caller.bytes) | |
31 | + | let compeStart = match getInteger(this, (((compeNum + compestart) + assetName) + currentKey)) { | |
32 | + | case a: Int => | |
33 | + | a | |
34 | + | case _ => | |
35 | + | 0 | |
36 | + | } | |
37 | + | let currentAmount = match getInteger(this, (((compeNum + assetName) + compestart) + currentKey)) { | |
38 | + | case a: Int => | |
39 | + | a | |
40 | + | case _ => | |
41 | + | 0 | |
42 | + | } | |
43 | + | let newAmount = (currentAmount - amount) | |
44 | + | if ((nowTimestamp > startTimestamp)) | |
45 | + | then throw("Can't withdraw compe start") | |
46 | + | else if ((0 > amount)) | |
47 | + | then throw("Can't withdraw negative amount") | |
48 | + | else if ((0 > newAmount)) | |
49 | + | then throw("Not enough balance") | |
50 | + | else if ((id == "WAVES")) | |
51 | + | then ScriptResult(WriteSet([DataEntry((((compeNum + assetName) + compestart) + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
52 | + | else ScriptResult(WriteSet([DataEntry((((compeNum + assetName) + compestart) + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, assetId)])) | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | @Callable(i) | |
58 | + | func paymentDeposit (courseaddress,lockernum,markername) = { | |
59 | + | let lockerNum = toString(lockernum) | |
60 | + | let pmt = extract(i.payment) | |
61 | + | let markerId = pmt.assetId | |
62 | + | let currentKey = toBase58String(i.caller.bytes) | |
63 | + | let currentAmount = match getInteger(this, (((("pd_" + markername) + courseaddress) + lockerNum) + currentKey)) { | |
64 | + | case a: Int => | |
65 | + | a | |
66 | + | case _ => | |
67 | + | 0 | |
68 | + | } | |
69 | + | let newAmount = (currentAmount + pmt.amount) | |
70 | + | WriteSet([DataEntry((((("pd_" + markername) + courseaddress) + lockerNum) + currentKey), newAmount), DataEntry((((("pw_" + markername) + courseaddress) + lockerNum) + currentKey), true), DataEntry((((("cw_" + markername) + courseaddress) + lockerNum) + currentKey), false)]) | |
71 | + | } | |
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | @Callable(i) | |
76 | + | func paymentWithdraw (courseaddress,lockernum,markername,markerid,amount) = { | |
77 | + | let lockerNum = toString(lockernum) | |
78 | + | let assetId = fromBase58String(markerid) | |
79 | + | let currentKey = toBase58String(i.caller.bytes) | |
80 | + | let paymentWithdraw = match getBoolean(this, (((("pw_" + markername) + courseaddress) + lockerNum) + currentKey)) { | |
81 | + | case a: Boolean => | |
82 | + | a | |
83 | + | case _ => | |
84 | + | 0 | |
85 | + | } | |
86 | + | let currentAmount = match getInteger(this, (((("pd_" + markername) + courseaddress) + lockerNum) + currentKey)) { | |
87 | + | case a: Int => | |
88 | + | a | |
89 | + | case _ => | |
90 | + | 0 | |
91 | + | } | |
92 | + | let newAmount = (currentAmount - amount) | |
93 | + | if ((paymentWithdraw == false)) | |
94 | + | then throw("Can't withdraw") | |
95 | + | else if ((0 > amount)) | |
96 | + | then throw("Can't withdraw negative amount") | |
97 | + | else if ((0 > newAmount)) | |
98 | + | then throw("Not enough balance") | |
99 | + | else if ((markerid == "WAVES")) | |
100 | + | then ScriptResult(WriteSet([DataEntry((((("pd_" + markername) + courseaddress) + lockerNum) + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
101 | + | else ScriptResult(WriteSet([DataEntry((((("pd_" + markername) + courseaddress) + lockerNum) + currentKey), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, assetId)])) | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | @Callable(i) | |
107 | + | func golferAuth (courseaddress,lockernum,markername) = { | |
108 | + | let lockerNum = toString(lockernum) | |
109 | + | let currentKey = toBase58String(i.caller.bytes) | |
110 | + | WriteSet([DataEntry((((("pw_" + markername) + courseaddress) + lockerNum) + currentKey), false)]) | |
111 | + | } | |
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | @Callable(i) | |
116 | + | func courseAuth (golferaddress,lockernum,markername) = { | |
117 | + | let lockerNum = toString(lockernum) | |
118 | + | let currentKey = toBase58String(i.caller.bytes) | |
119 | + | WriteSet([DataEntry((((("cw_" + markername) + currentKey) + lockerNum) + golferaddress), true)]) | |
120 | + | } | |
121 | + | ||
122 | + | ||
123 | + | ||
124 | + | @Callable(i) | |
125 | + | func courseWithdraw (golferaddress,lockernum,markername,markerid,amount) = { | |
126 | + | let lockerNum = toString(lockernum) | |
127 | + | let assetId = fromBase58String(markerid) | |
128 | + | let currentKey = toBase58String(i.caller.bytes) | |
129 | + | let paymentWithdraw = match getBoolean(this, (((("pw_" + markername) + currentKey) + lockerNum) + golferaddress)) { | |
130 | + | case a: Boolean => | |
131 | + | a | |
132 | + | case _ => | |
133 | + | 0 | |
134 | + | } | |
135 | + | let courseWithdraw = match getBoolean(this, (((("cw_" + markername) + currentKey) + lockerNum) + golferaddress)) { | |
136 | + | case a: Boolean => | |
137 | + | a | |
138 | + | case _ => | |
139 | + | 0 | |
140 | + | } | |
141 | + | let currentAmount = match getInteger(this, (((("pd_" + markername) + currentKey) + lockerNum) + golferaddress)) { | |
142 | + | case a: Int => | |
143 | + | a | |
144 | + | case _ => | |
145 | + | 0 | |
146 | + | } | |
147 | + | let newAmount = (currentAmount - amount) | |
148 | + | if ((paymentWithdraw == true)) | |
149 | + | then throw("Can't golfer auth") | |
150 | + | else if ((courseWithdraw == false)) | |
151 | + | then throw("Can't golfcourse auth") | |
152 | + | else if ((0 > amount)) | |
153 | + | then throw("Can't withdraw negative amount") | |
154 | + | else if ((0 > newAmount)) | |
155 | + | then throw("Not enough balance") | |
156 | + | else if ((markerid == "WAVES")) | |
157 | + | then ScriptResult(WriteSet([DataEntry((((("pd_" + markername) + currentKey) + lockerNum) + golferaddress), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
158 | + | else ScriptResult(WriteSet([DataEntry((((("pd_" + markername) + currentKey) + lockerNum) + golferaddress), newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, assetId)])) | |
159 | + | } | |
160 | + | ||
161 | + | ||
162 | + | @Verifier(tx) | |
163 | + | func verify () = match tx { | |
164 | + | case ttx: TransferTransaction => | |
165 | + | sigVerify(ttx.bodyBytes, ttx.proofs[0], ttx.senderPublicKey) | |
166 | + | case stx: SetScriptTransaction => | |
167 | + | sigVerify(stx.bodyBytes, stx.proofs[0], stx.senderPublicKey) | |
168 | + | case _ => | |
169 | + | true | |
170 | + | } | |
171 | + |
github/deemru/w8io/169f3d6 25.64 ms ◑