tx · 9Foa9wW6AsqFH5TrwWMRfDKiR2SWLBTQwmDXVJBPrJeU 3MzQVX6dx814uhiG8oUgjekfS3edJmTEGV6: -0.01000000 Waves 2020.05.29 19:44 [1020006] smart account 3MzQVX6dx814uhiG8oUgjekfS3edJmTEGV6 > SELF 0.00000000 Waves
{ "type": 13, "id": "9Foa9wW6AsqFH5TrwWMRfDKiR2SWLBTQwmDXVJBPrJeU", "fee": 1000000, "feeAssetId": null, "timestamp": 1590770641870, "version": 1, "sender": "3MzQVX6dx814uhiG8oUgjekfS3edJmTEGV6", "senderPublicKey": "Fj9eozBBFQcn1iXebFDwbHfUwhmMB2t3DXKHXdT7oqg", "proofs": [ "4BEZUhVR2FbxspCEGoPK7tzacVjAygoSLuqLDTDupGLCa982AkvioRtHyQrPJR2MYHg5QvgUjT1Mk8iMmdKoB7qY" ], "script": "base64:AAIDAAAAAAAAABsIARIDCgEIEgASBAoCCAgSABIDCgEBEgMKAQEAAAAeAAAAAAtmdW5kQWRkcmVzcwIAAAAMRnVuZCBBZGRyZXNzAAAAAARVU0ROAQAAACC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QAAAAAETk9ORQIAAAAEbm9uZQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAADc3RyAQAAAA9nZXRCb29sZWFuQnlLZXkAAAABAAAAA2tle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GVyBAAAAAFvBQAAAAckbWF0Y2gwBAAAAAdidXlVU0ROAwMJAAAAAAAAAggIBQAAAAFvAAAACWFzc2V0UGFpcgAAAAthbW91bnRBc3NldAUAAAAEVVNETgkAAAAAAAACCAUAAAABbwAAAAlvcmRlclR5cGUFAAAAA0J1eQcGAwkAAAAAAAACCAgFAAAAAW8AAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQFAAAABFVTRE4JAAAAAAAAAggFAAAAAW8AAAAJb3JkZXJUeXBlBQAAAARTZWxsBwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BQAAAAdidXlVU0ROBweG3Ggw", "chainId": 84, "height": 1020006, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let fundAddress = "Fund Address" | |
5 | + | ||
6 | + | let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
7 | + | ||
8 | + | let NONE = "none" | |
9 | + | ||
10 | + | func getNumberByKey (key) = { | |
11 | + | let num = match getInteger(this, key) { | |
12 | + | case a: Int => | |
13 | + | a | |
14 | + | case _ => | |
15 | + | 0 | |
16 | + | } | |
17 | + | num | |
18 | + | } | |
19 | + | ||
20 | + | ||
21 | + | func getStrByKey (key) = { | |
22 | + | let str = match getString(this, key) { | |
23 | + | case a: String => | |
24 | + | a | |
25 | + | case _ => | |
26 | + | NONE | |
27 | + | } | |
28 | + | str | |
29 | + | } | |
30 | + | ||
31 | + | ||
32 | + | func getBooleanByKey (key) = { | |
33 | + | let bool = match getBoolean(this, key) { | |
34 | + | case b: Boolean => | |
35 | + | b | |
36 | + | case _ => | |
37 | + | false | |
38 | + | } | |
39 | + | bool | |
40 | + | } | |
41 | + | ||
42 | + | ||
43 | + | func getKeyTitle () = "title" | |
44 | + | ||
45 | + | ||
46 | + | func getValueTitle () = getStrByKey(getKeyTitle()) | |
47 | + | ||
48 | + | ||
49 | + | func getKeyGPAddress () = "GP" | |
50 | + | ||
51 | + | ||
52 | + | func getValueGPAddress () = getStrByKey(getKeyGPAddress()) | |
53 | + | ||
54 | + | ||
55 | + | func getKeyLPAddress (lpid) = ("LP_" + toString(lpid)) | |
56 | + | ||
57 | + | ||
58 | + | func getValueLPAddress (lpid) = getStrByKey(getKeyLPAddress(lpid)) | |
59 | + | ||
60 | + | ||
61 | + | func getKeyLPCount () = "LP_count" | |
62 | + | ||
63 | + | ||
64 | + | func getValueLPCount () = getNumberByKey(getKeyLPCount()) | |
65 | + | ||
66 | + | ||
67 | + | func getKeyGPFunding () = "GP_funding" | |
68 | + | ||
69 | + | ||
70 | + | func getValueGPFunding () = getNumberByKey(getKeyGPFunding()) | |
71 | + | ||
72 | + | ||
73 | + | func getKeyLPsFunding () = "LPs_funding" | |
74 | + | ||
75 | + | ||
76 | + | func getValueLPsFunding () = getNumberByKey(getKeyLPsFunding()) | |
77 | + | ||
78 | + | ||
79 | + | func getKeyFunding () = "funding" | |
80 | + | ||
81 | + | ||
82 | + | func getValueFunding () = getNumberByKey(getKeyFunding()) | |
83 | + | ||
84 | + | ||
85 | + | func getKeyParticipantFunding (account) = (account + "_funding") | |
86 | + | ||
87 | + | ||
88 | + | func getValueParticipantFunding (account) = getNumberByKey(getKeyParticipantFunding(account)) | |
89 | + | ||
90 | + | ||
91 | + | func getKeyAmountForCashingOut () = "amount_for_distributed_profit" | |
92 | + | ||
93 | + | ||
94 | + | func getValueAmountForCashingOut () = getNumberByKey(getKeyAmountForCashingOut()) | |
95 | + | ||
96 | + | ||
97 | + | func getKeyDistributedProfit (count) = ("distributed_profit_" + toString(count)) | |
98 | + | ||
99 | + | ||
100 | + | func getValueDistributedProfit (count) = getNumberByKey(getKeyDistributedProfit(count)) | |
101 | + | ||
102 | + | ||
103 | + | func getKeyProfitDistributionCount () = "profit_distribution_count" | |
104 | + | ||
105 | + | ||
106 | + | func getValueProfitDistributionCount () = getNumberByKey(getKeyProfitDistributionCount()) | |
107 | + | ||
108 | + | ||
109 | + | func getKeyIsAccountCashed (account,distributionCount) = ((account + "is_cahsed_") + toString(distributionCount)) | |
110 | + | ||
111 | + | ||
112 | + | func getValueIsAccountCashed (account,distributionCount) = getBooleanByKey(getKeyIsAccountCashed(account, distributionCount)) | |
113 | + | ||
114 | + | ||
115 | + | @Callable(i) | |
116 | + | func startFund (title) = { | |
117 | + | let GP = toBase58String(i.caller.bytes) | |
118 | + | let pmt = extract(i.payment) | |
119 | + | if ((pmt.assetId != USDN)) | |
120 | + | then throw("can use only USDN") | |
121 | + | else if ((getValueGPAddress() != NONE)) | |
122 | + | then throw("this fund already exists") | |
123 | + | else WriteSet([DataEntry(getKeyTitle(), title), DataEntry(getKeyGPAddress(), GP), DataEntry(getKeyParticipantFunding(GP), pmt.amount), DataEntry(getKeyGPFunding(), pmt.amount), DataEntry(getKeyFunding(), pmt.amount)]) | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | @Callable(i) | |
129 | + | func increaseFund () = { | |
130 | + | let GP = toBase58String(i.caller.bytes) | |
131 | + | let pmt = extract(i.payment) | |
132 | + | if ((pmt.assetId != USDN)) | |
133 | + | then throw("can use only USDN") | |
134 | + | else if ((GP != getValueGPAddress())) | |
135 | + | then throw("only GP can increase fund") | |
136 | + | else WriteSet([DataEntry(getKeyParticipantFunding(GP), (getValueParticipantFunding(GP) + pmt.amount)), DataEntry(getKeyGPFunding(), (getValueGPFunding() + pmt.amount)), DataEntry(getKeyFunding(), (getValueFunding() + pmt.amount))]) | |
137 | + | } | |
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | @Callable(i) | |
142 | + | func investInFund (founder,title) = { | |
143 | + | let lpAddress = toBase58String(i.caller.bytes) | |
144 | + | let pmt = extract(i.payment) | |
145 | + | let lpid = (getValueLPCount() + 1) | |
146 | + | if ((pmt.assetId != USDN)) | |
147 | + | then throw("can use only USDN") | |
148 | + | else if ((getValueGPAddress() == NONE)) | |
149 | + | then throw("this fund doesn't exist") | |
150 | + | else if ((lpAddress == getValueGPAddress())) | |
151 | + | then throw("GP can't be LP") | |
152 | + | else WriteSet([DataEntry(getKeyLPAddress(lpid), lpAddress), DataEntry(getKeyLPCount(), lpid), DataEntry(getKeyParticipantFunding(lpAddress), pmt.amount), DataEntry(getKeyLPsFunding(), (getValueLPsFunding() + pmt.amount)), DataEntry(getKeyFunding(), (getValueFunding() + pmt.amount))]) | |
153 | + | } | |
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | @Callable(i) | |
158 | + | func distributeProfit () = { | |
159 | + | let participant = toBase58String(i.caller.bytes) | |
160 | + | let currentProfit = (wavesBalance(addressFromStringValue(fundAddress)) - getValueAmountForCashingOut()) | |
161 | + | let distributionCount = (getValueProfitDistributionCount() + 1) | |
162 | + | if ((getValueParticipantFunding(participant) == 0)) | |
163 | + | then throw("only participants allowed") | |
164 | + | else if ((0 >= currentProfit)) | |
165 | + | then throw("profit must be positive") | |
166 | + | else WriteSet([DataEntry(getKeyAmountForCashingOut(), wavesBalance(addressFromStringValue(fundAddress))), DataEntry(getKeyDistributedProfit(distributionCount), currentProfit), DataEntry(getKeyProfitDistributionCount(), distributionCount)]) | |
167 | + | } | |
168 | + | ||
169 | + | ||
170 | + | ||
171 | + | @Callable(i) | |
172 | + | func getProfitLP (distributionNumber) = { | |
173 | + | let lpAddress = toBase58String(i.caller.bytes) | |
174 | + | let amountInvested = getValueParticipantFunding(lpAddress) | |
175 | + | let total = getValueLPsFunding() | |
176 | + | let amount = ((((getValueDistributedProfit(distributionNumber) * 80) / 100) * amountInvested) / total) | |
177 | + | if ((getValueParticipantFunding(lpAddress) == 0)) | |
178 | + | then throw("only participants allowed") | |
179 | + | else if ((lpAddress == getValueGPAddress())) | |
180 | + | then throw("GP can't call this function") | |
181 | + | else if (getValueIsAccountCashed(lpAddress, distributionNumber)) | |
182 | + | then throw("this account has been already cashed") | |
183 | + | else if ((amount > getValueAmountForCashingOut())) | |
184 | + | then throw("there isn't enough money") | |
185 | + | else ScriptResult(WriteSet([DataEntry(getKeyIsAccountCashed(lpAddress, distributionNumber), true), DataEntry(getKeyAmountForCashingOut(), (getValueAmountForCashingOut() - amount))]), TransferSet([ScriptTransfer(i.caller, amount, USDN)])) | |
186 | + | } | |
187 | + | ||
188 | + | ||
189 | + | ||
190 | + | @Callable(i) | |
191 | + | func getProfitGP (distributionNumber) = { | |
192 | + | let gpAddress = toBase58String(i.caller.bytes) | |
193 | + | let amount = ((getValueDistributedProfit(distributionNumber) * 20) / 100) | |
194 | + | if ((gpAddress != getValueGPAddress())) | |
195 | + | then throw("only GP can call this function") | |
196 | + | else if (getValueIsAccountCashed(gpAddress, distributionNumber)) | |
197 | + | then throw("this account has been already cashed") | |
198 | + | else if ((amount > getValueAmountForCashingOut())) | |
199 | + | then throw("there isn't enough money") | |
200 | + | else ScriptResult(WriteSet([DataEntry(getKeyIsAccountCashed(gpAddress, distributionNumber), true), DataEntry(getKeyAmountForCashingOut(), (getValueAmountForCashingOut() - amount))]), TransferSet([ScriptTransfer(i.caller, amount, USDN)])) | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | @Verifier(tx) | |
205 | + | func verify () = match tx { | |
206 | + | case i: InvokeScriptTransaction => | |
207 | + | if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
208 | + | then (i.dApp == addressFromStringValue("DSBA Address")) | |
209 | + | else false | |
210 | + | case o: Order => | |
211 | + | let buyUSDN = if (if ((o.assetPair.amountAsset == USDN)) | |
212 | + | then (o.orderType == Buy) | |
213 | + | else false) | |
214 | + | then true | |
215 | + | else if ((o.assetPair.priceAsset == USDN)) | |
216 | + | then (o.orderType == Sell) | |
217 | + | else false | |
218 | + | if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
219 | + | then buyUSDN | |
220 | + | else false | |
221 | + | case _ => | |
222 | + | false | |
223 | + | } | |
224 | + |
github/deemru/w8io/169f3d6 23.04 ms ◑