tx · 2JiQrsWdckAoLEaEoRBQo5BATwt16btJJAHzH3wvcTHM

3Mv8f9tSNJHWEzeJ79YbSTSAAuoCjRw4uyP:  -0.01300000 Waves

2022.08.17 12:51 [2188312] smart account 3Mv8f9tSNJHWEzeJ79YbSTSAAuoCjRw4uyP > SELF 0.00000000 Waves

{ "type": 13, "id": "2JiQrsWdckAoLEaEoRBQo5BATwt16btJJAHzH3wvcTHM", "fee": 1300000, "feeAssetId": null, "timestamp": 1660729909983, "version": 2, "chainId": 84, "sender": "3Mv8f9tSNJHWEzeJ79YbSTSAAuoCjRw4uyP", "senderPublicKey": "J7toGWdoqBgK7hh8WbEEBg7SqoqvAtCbKM9S7bXgn4YN", "proofs": [ "3ST9P27zU6DpwmkpvSiZeMk5VkM3K497hRPkDZ5DwAvf1zKwSEw5z6Jag22fde97Lumw8NcC4FctdiSU3mGGxnyP" ], "script": "base64:AAIFAAAAAAAAABwIAhIHCgUBCAgBARIAEgMKAQgSAwoBCBIDCgEIAAAAHAAAAAADU0VQAgAAAAJfXwAAAAAFTVVMVDYAAAAAAAAPQkAAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAApXQVZFU0lEU1RSAgAAAAVXQVZFUwAAAAAHV0FWRVNJRAkAAlkAAAABBQAAAApXQVZFU0lEU1RSAQAAAAxnZXRJbnRPckZhaWwAAAABAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQkAASwAAAACCQABLAAAAAICAAAAD01hbmRhdG9yeSB0aGlzLgUAAAADa2V5AgAAAA8gaXMgbm90IGRlZmluZWQBAAAADGdldFN0ck9yRWxzZQAAAAIAAAADa2V5AAAACmRlZmF1bHRWYWwJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5BQAAAApkZWZhdWx0VmFsAQAAAA9nZXRTdHJpbmdPckZhaWwAAAACAAAAB2FkZHJlc3MAAA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AAZzdGF0dXMDCQAAZwAAAAIJAAGQAAAAAQUAAAAIbm9kZURhdGEAAAAAAAAAAAkJAAGRAAAAAgUAAAAIbm9kZURhdGEAAAAAAAAAAAYCAAAAB1BFTkRJTkcDCQEAAAACIT0AAAACBQAAAAZzdGF0dXMCAAAAB1BFTkRJTkcJAAACAAAAAQIAAAAiQXBwbGljYXRpb24gc3RhdHVzIGlzIG5vdCBQRU5ESU5HIQQAAAAKZGVwb0Ftb3VudAkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIFAAAACG5vZGVEYXRhAAAAAAAAAAAEBAAAABJiZW5lZmljaWFyeUFkZHJlc3MJAQAAABRyZXNvbHZlQmVuZWZpY2lhcmllcwAAAAIFAAAAC25vZGVBZGRyZXNzBQAAAAtub2RlQWRkcmVzcwkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAA9ub2RlUmVnaXN0cnlLRVkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAASYmVuZWZpY2lhcnlBZGRyZXNzBQAAAApkZXBvQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAk5efCw==", "height": 2188312, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: bWGRDB5hE6bHYZwKuMxh6zzJYwoFdwmeDyokDjAZhxG Next: none Diff:
OldNewDifferences
144144
145145 @Callable(i)
146146 func distributeMinerReward (beneficiaryAddressStr) = {
147- let minDistributeAmount = valueOrElse(getInteger(this, keyMinDistributeAmount()), (24 * MULT8))
147+ let minDistributeAmount = valueOrElse(getInteger(this, keyMinDistributeAmount()), (1 * MULT8))
148148 if ((size(i.payments) != 1))
149149 then throw("exact 1 payment must be attached")
150150 else if ((i.caller != i.originCaller))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let MULT6 = 1000000
77
88 let MULT8 = 100000000
99
1010 let WAVESIDSTR = "WAVES"
1111
1212 let WAVESID = fromBase58String(WAVESIDSTR)
1313
1414 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
1515
1616
1717 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
1818
1919
2020 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("Mandatory this." + key) + " is not defined"))
2121
2222
2323 func getAddressOrFail (key) = valueOrErrorMessage(addressFromString(getStringOrFail(this, key)), (("Fail to convert this." + key) + " value into Address"))
2424
2525
2626 func validateAddressOrFail (addressStr) = {
2727 let address = valueOrErrorMessage(addressFromString(addressStr), ("fail to convert into address " + addressStr))
2828 if ((0 > wavesBalance(address).available))
2929 then throw()
3030 else addressStr
3131 }
3232
3333
3434 func keyNodeRegistry (address) = ("%s__" + address)
3535
3636
3737 func keyNodeRewardsTotals (address) = ("%s%s__totals__" + address)
3838
3939
4040 func keyApprovedNodeList () = "%s__approvedNodeList"
4141
4242
4343 func keyDepositAmount () = "%s%s__cfg__depositAmount"
4444
4545
4646 func keyNeutrinoAddressStr () = "%s%s__cfg__neutrinoAddress"
4747
4848
4949 func keyMasterNodeAddressStr () = "%s%s__cfg__mainNeutrinoNodeAddress"
5050
5151
5252 func keyProtocolPartX6 () = "%s%s__cfg__protocolPartX6"
5353
5454
5555 func keyBenificaryPartX6 () = "%s%s__cfg__benificaryPartX6"
5656
5757
5858 func keyMinDistributeAmount () = "%s%s__cfg__minDistributeAmount"
5959
6060
6161 func keyBeneficiaryAddress () = "%s%s__cfg__beneficiaryAddress"
6262
6363
6464 func formatDepositAdd (txIdStr,depositAmount,remainingDepositAmount,status) = makeString(["%s%d%d%d%d%s%d%d", txIdStr, toString(lastBlock.height), toString(lastBlock.timestamp), toString(depositAmount), toString(remainingDepositAmount), status, "0", "0"], SEP)
6565
6666
6767 func formatDepositChangeStatus (origS,newStatus) = {
6868 let orig = split(origS, SEP)
6969 makeString(["%s%d%d%d%d%s%d%d", orig[1], orig[2], orig[3], orig[4], orig[5], newStatus, toString(lastBlock.height), toString(lastBlock.timestamp)], SEP)
7070 }
7171
7272
7373 func keyRewardHistory (nodeAddress,txId) = makeString(["%s%s%s", "history", toString(nodeAddress), toBase58String(txId)], SEP)
7474
7575
7676 func dataRewardHistory (wavesAmountTotal,beneficiaryAmt,protocolAmt,protocolAmtPart1,protocolAmtPart2) = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(wavesAmountTotal), toString(beneficiaryAmt), toString(protocolAmt), toString(protocolAmtPart1), toString(protocolAmtPart2)], SEP)
7777
7878
7979 func RewardHistoryEntry (nodeAddress,txId,minedAmt,beneficiaryAmt,protocolAmt,protocolAmt1,protocolAmt2) = StringEntry(keyRewardHistory(nodeAddress, txId), dataRewardHistory(minedAmt, beneficiaryAmt, protocolAmt, protocolAmt1, protocolAmt2))
8080
8181
8282 func dataRewardTotals (minedAmt,beneficiaryAmt,protocolAmt,protocolAmtPart1,protocolAmtPart2) = makeString(["%d%d%d%d%d", toString(minedAmt), toString(beneficiaryAmt), toString(protocolAmt), toString(protocolAmtPart1), toString(protocolAmtPart2)], SEP)
8383
8484
8585 func RewardTotalsEntry (miner,minedAmt,beneficiaryAmt,protocolAmt,protocolAmtPart1,protocolAmtPart2) = {
8686 let nodeRewardsTotalsKEY = keyNodeRewardsTotals(toString(miner))
8787 let nodeRewardsArray = split(getStrOrElse(nodeRewardsTotalsKEY, dataRewardTotals(0, 0, 0, 0, 0)), SEP)
8888 let newMinedAmt = (parseIntValue(nodeRewardsArray[1]) + minedAmt)
8989 let newBeneficiaryAmt = (parseIntValue(nodeRewardsArray[2]) + beneficiaryAmt)
9090 let newProtocolAmt = (parseIntValue(nodeRewardsArray[3]) + protocolAmt)
9191 let newProtocolAmtPart1 = (parseIntValue(nodeRewardsArray[4]) + protocolAmtPart1)
9292 let newProtocolAmtPart2 = (parseIntValue(nodeRewardsArray[5]) + protocolAmtPart2)
9393 StringEntry(nodeRewardsTotalsKEY, dataRewardTotals(newMinedAmt, newBeneficiaryAmt, newProtocolAmt, newProtocolAmtPart1, newProtocolAmtPart2))
9494 }
9595
9696
9797 func resolveBeneficiaries (minerAddress,beneficiaryFromParam) = {
9898 let minerScriptHash = scriptHash(minerAddress)
9999 let beneficiaryFromMinerState = addressFromStringValue(getStringOrFail(minerAddress, keyBeneficiaryAddress()))
100100 if ((minerScriptHash == unit))
101101 then beneficiaryFromParam
102102 else beneficiaryFromMinerState
103103 }
104104
105105
106106 @Callable(i)
107107 func constructor (depositAmount,neutrinoAddressStr,masterNodeAddressStr,protocolPartX6,benificaryPartX6) = if ((i.caller != this))
108108 then throw("permissions denied")
109109 else if ((0 > depositAmount))
110110 then throw("depositAmount less then zero")
111111 else if ((0 > protocolPartX6))
112112 then throw("protocolPartX6 less then zero")
113113 else if ((0 > benificaryPartX6))
114114 then throw("benificaryPartX6 less then zero")
115115 else if (((protocolPartX6 + benificaryPartX6) != MULT6))
116116 then throw("parts sum must be 1")
117117 else [IntegerEntry(keyDepositAmount(), depositAmount), StringEntry(keyNeutrinoAddressStr(), validateAddressOrFail(neutrinoAddressStr)), StringEntry(keyMasterNodeAddressStr(), validateAddressOrFail(masterNodeAddressStr)), IntegerEntry(keyProtocolPartX6(), protocolPartX6), IntegerEntry(keyBenificaryPartX6(), benificaryPartX6)]
118118
119119
120120
121121 @Callable(i)
122122 func sumbitApplication () = if ((size(i.payments) != 1))
123123 then throw("exact 1 payment must be attached")
124124 else if ((i.caller != i.originCaller))
125125 then throw("dapp to dapp calls are not allowed")
126126 else {
127127 let pmt = i.payments[0]
128128 let deposit = pmt.amount
129129 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
130130 let expectedDepositAmount = getIntOrFail(keyDepositAmount())
131131 let txId = toBase58String(i.transactionId)
132132 let nodeAddress = toString(i.caller)
133133 let nodeRegistryKEY = keyNodeRegistry(nodeAddress)
134134 if ((pmtAssetId != WAVESID))
135135 then throw("only Waves can be used for deposit")
136136 else if ((deposit != expectedDepositAmount))
137137 then throw((("exactly " + toString(expectedDepositAmount)) + " Wavelets are expected"))
138138 else if ((getStrOrElse(nodeRegistryKEY, "") != ""))
139139 then throw("your node already registered")
140140 else [StringEntry(nodeRegistryKEY, formatDepositAdd(txId, deposit, deposit, "PENDING"))]
141141 }
142142
143143
144144
145145 @Callable(i)
146146 func distributeMinerReward (beneficiaryAddressStr) = {
147- let minDistributeAmount = valueOrElse(getInteger(this, keyMinDistributeAmount()), (24 * MULT8))
147+ let minDistributeAmount = valueOrElse(getInteger(this, keyMinDistributeAmount()), (1 * MULT8))
148148 if ((size(i.payments) != 1))
149149 then throw("exact 1 payment must be attached")
150150 else if ((i.caller != i.originCaller))
151151 then throw("dapp to dapp calls are not allowed")
152152 else {
153153 let pmt = i.payments[0]
154154 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
155155 let feeAmt = i.fee
156156 let feeAssetId = valueOrElse(i.feeAssetId, WAVESID)
157157 let callReward = (feeAmt * 3)
158158 let minedAmt = (pmt.amount - callReward)
159159 if ((pmt.amount != minDistributeAmount))
160160 then throw((("attached payment must be exact " + toString(minDistributeAmount)) + " Wavelets"))
161161 else if ((pmtAssetId != WAVESID))
162162 then throw("only Waves can be used in payment")
163163 else if ((feeAssetId != WAVESID))
164164 then throw("only Waves can be used in fees")
165165 else if ((feeAmt != ((5 * MULT8) / 1000)))
166166 then throw("fee amount couldn't exceed 0.005")
167167 else {
168168 let neutrinoAddress = getAddressOrFail(keyNeutrinoAddressStr())
169169 let masterNodeAddress = getAddressOrFail(keyMasterNodeAddressStr())
170170 let minerAddress = i.caller
171171 let beneficiaryFromParam = addressFromStringValue(beneficiaryAddressStr)
172172 let beneficiaryAddress = resolveBeneficiaries(minerAddress, beneficiaryFromParam)
173173 let txRewardReceiver = beneficiaryFromParam
174174 let protocolPart = getIntOrFail(keyProtocolPartX6())
175175 let beneficiaryPart = getIntOrFail(keyBenificaryPartX6())
176176 let beneficiaryAmt = fraction(minedAmt, beneficiaryPart, MULT6)
177177 let protocolAmt = (minedAmt - beneficiaryAmt)
178178 let protocolAmt1 = (protocolAmt / 2)
179179 let protocolAmt2 = (protocolAmt - protocolAmt1)
180180 [ScriptTransfer(beneficiaryAddress, beneficiaryAmt, unit), ScriptTransfer(neutrinoAddress, protocolAmt1, unit), ScriptTransfer(masterNodeAddress, protocolAmt2, unit), ScriptTransfer(txRewardReceiver, callReward, unit), RewardHistoryEntry(minerAddress, i.transactionId, minedAmt, beneficiaryAmt, protocolAmt, protocolAmt1, protocolAmt2), RewardTotalsEntry(minerAddress, minedAmt, beneficiaryAmt, protocolAmt, protocolAmt1, protocolAmt2)]
181181 }
182182 }
183183 }
184184
185185
186186
187187 @Callable(i)
188188 func validateAndApproveLeasings (nListS) = {
189189 let nIdxs = [0, 1, 2, 3, 4, 5, 6, 7]
190190 let nList = split(nListS, SEP)
191191 let expectedCount = size(nIdxs)
192192 let neutrinoAddress = getAddressOrFail(keyNeutrinoAddressStr())
193193 if ((i.caller != neutrinoAddress))
194194 then throw("validateAndApproveLeasings not authorized")
195195 else if (((size(nList) % 2) != 0))
196196 then throw("Only even number of nodes is allowed")
197197 else if ((size(nList) != expectedCount))
198198 then throw((("Only " + toString(expectedCount)) + " node's address cab be passed"))
199199 else {
200200 func forEachNodeChangeStatus (acc,i) = {
201201 let nodeAddr = nList[i]
202202 let nodeRegistryKEY = keyNodeRegistry(nodeAddr)
203203 let nodeDataOpt = getString(this, nodeRegistryKEY)
204204 if (!(isDefined(nodeDataOpt)))
205205 then throw(("invalid Node in list " + nodeAddr))
206206 else {
207207 let nodeData = split(value(nodeDataOpt), SEP)
208208 let nodeStatus = nodeData[6]
209209 if (if ((size(nodeData) >= 9))
210210 then (nodeStatus != "PENDING")
211211 else false)
212212 then throw(((("node " + nodeAddr) + " already has a final status ") + nodeStatus))
213213 else (acc :+ StringEntry(nodeRegistryKEY, formatDepositChangeStatus(value(nodeDataOpt), "APPROVED")))
214214 }
215215 }
216216
217217 let approvedNodesData = {
218218 let $l = nIdxs
219219 let $s = size($l)
220220 let $acc0 = nil
221221 func $f0_1 ($a,$i) = if (($i >= $s))
222222 then $a
223223 else forEachNodeChangeStatus($a, $l[$i])
224224
225225 func $f0_2 ($a,$i) = if (($i >= $s))
226226 then $a
227227 else throw("List size exceeds 8")
228228
229229 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8)
230230 }
231231 $Tuple2(approvedNodesData, nil)
232232 }
233233 }
234234
235235
236236
237237 @Callable(i)
238238 func returnDeposit (nodeAddressStr) = if ((size(i.payments) != 0))
239239 then throw("No payments allowed")
240240 else {
241241 let callerAddress = i.caller
242242 let nodeAddress = addressFromStringValue(nodeAddressStr)
243243 let approvedNodeList = getStringOrFail(this, keyApprovedNodeList())
244244 if (if ((callerAddress != this))
245245 then (nodeAddress != callerAddress)
246246 else false)
247247 then throw("returnDeposit permissions denied")
248248 else {
249249 let nodeRegistryKEY = keyNodeRegistry(nodeAddressStr)
250250 let nodeDataOpt = getString(this, nodeRegistryKEY)
251251 if (!(isDefined(nodeDataOpt)))
252252 then throw(("Address is not applied as neutrino node: " + nodeAddressStr))
253253 else if (contains(approvedNodeList, nodeAddressStr))
254254 then throw("Impossible to return deposit from approved Node, please contact support team")
255255 else {
256256 let nodeData = split(value(nodeDataOpt), SEP)
257257 let status = if ((size(nodeData) >= 9))
258258 then nodeData[6]
259259 else "PENDING"
260260 if ((status != "PENDING"))
261261 then throw("Application status is not PENDING!")
262262 else {
263263 let depoAmount = parseIntValue(nodeData[4])
264264 let beneficiaryAddress = resolveBeneficiaries(nodeAddress, nodeAddress)
265265 [DeleteEntry(nodeRegistryKEY), ScriptTransfer(beneficiaryAddress, depoAmount, unit)]
266266 }
267267 }
268268 }
269269 }
270270
271271

github/deemru/w8io/169f3d6 
65.41 ms