tx · BivGgmCz7B6yNgwt7SyHfSUEdKJg4oM4ysGDw1c5kbP8

3N3b5wban4PEUuND6PxSbTvoekc66fss78g:  -0.14000000 Waves

2021.09.13 16:51 [1701349] smart account 3N3b5wban4PEUuND6PxSbTvoekc66fss78g > SELF 0.00000000 Waves

{ "type": 13, "id": "BivGgmCz7B6yNgwt7SyHfSUEdKJg4oM4ysGDw1c5kbP8", "fee": 14000000, "feeAssetId": null, "timestamp": 1631541152145, "version": 2, "chainId": 84, "sender": "3N3b5wban4PEUuND6PxSbTvoekc66fss78g", "senderPublicKey": "DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq", "proofs": [ "3QDMDH1i92hEDcnY8M5yHSNRuzuW7RF7jQwD7cdyHMJ7A2VXNL5BGHBK6UdFEv78pTb1Po7EdXhtNF9CCUPZwhuo", "3RJkKa73bUcV8AcFjZctFQSr65wc8DobSk38vondzJjCCxwGaVKu6UHRH9wt5xkS5s8Z2jzDuao6P7kNvVqzERRc", "3aRkUEmL3bf3p9rkaWdrGKhEPL4CGhcyMEH3EHAJfDCd8LrmzPxC3bL2PBbkcyeN5e5BNrkWxDPXhz9qejCfE8yJ" ], "script": "base64:AAIEAAAAAAAAAAIIAgAAAAAAAAAAAAAAALqqDqs=", "height": 1701349, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3c8AdRBQKwZuecmUQDUroaRoXSNnictG77UQSWV9zBUX Next: 4VGh9wVQQ6ay9eNifGrkYEDD3uci7NSRehWpPPrqEnd8 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let keyActivateHeight = "activate_height"
5-
6-let keyFinishHeight = "finish_height"
7-
8-let activateHeight = getIntegerValue(this, keyActivateHeight)
9-
10-let finishHeight = getIntegerValue(this, keyFinishHeight)
11-
12-let totalShareENNO = 100000000000000
13-
14-let ENNO = base58'2Tqhz5PWbkijnzYpdLxLDFfVDw5ALQWm2rmxQ79ooMRZ'
15-
16-let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
17-
18-let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
19-
20-let adminPubKey1 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
21-
22-let adminPubKey2 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
23-
24-let adminPubKey3 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
25-
26-func getCallerShare (caller) = {
27- let callerShare = getInteger(this, ("share_" + toString(caller)))
28- let callerShareAmount = match callerShare {
29- case share: Int =>
30- share
31- case share: Unit =>
32- throw("Only early liquidity providers can call this function")
33- case _ =>
34- throw("Match error")
35- }
36- callerShareAmount
37- }
384
395
40-func getClaimedAmount (caller) = {
41- let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
42- let callerWithdrawnAmount = match callerWithdrawn {
43- case share: Int =>
44- share
45- case share: Unit =>
46- 0
47- case _ =>
48- throw("Match error")
49- }
50- callerWithdrawnAmount
51- }
52-
53-
54-@Callable(i)
55-func claimENNO () = {
56- let blockDuration = (finishHeight - activateHeight)
57- let currentDuration = if ((finishHeight > height))
58- then height
59- else finishHeight
60- let userShare = getCallerShare(i.caller)
61- let userClaimedAmount = getClaimedAmount(i.caller)
62- let claimAmount = (fraction((currentDuration - activateHeight), userShare, blockDuration) - userClaimedAmount)
63- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
64-[ScriptTransfer(i.caller, claimAmount, ENNO), IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
65- }
66-
67-
68-@Verifier(tx)
69-func verify () = match tx {
70- case _ =>
71- let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
72- then 1
73- else 0
74- let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
75- then 1
76- else 0
77- let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
78- then 1
79- else 0
80- (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
81-}
826

github/deemru/w8io/6500d08 
24.71 ms