tx · DfHkPw4YykxW4txAS84cn8LtSQ396YGADTVXhqSC2JFX

3NCVWoqgP5evS1BbN2RYeDofxSSfc83UPrm:  -0.14000000 Waves

2021.10.27 09:31 [1764344] smart account 3NCVWoqgP5evS1BbN2RYeDofxSSfc83UPrm > SELF 0.00000000 Waves

{ "type": 13, "id": "DfHkPw4YykxW4txAS84cn8LtSQ396YGADTVXhqSC2JFX", "fee": 14000000, "feeAssetId": null, "timestamp": 1635316385821, "version": 2, "chainId": 84, "sender": "3NCVWoqgP5evS1BbN2RYeDofxSSfc83UPrm", "senderPublicKey": "Ebjd61Ze5xP5ZS519XxDrSmiRo4s1e2BEaxbYCXzrSs2", "proofs": [ "wkjE5uktvuJPA1EXCzaDGGAWtHkTch8h2fJtDgF6wouZ2HSuJ9nnXcVGKJWJQbeBhoG2BBmUWugFk4DtjYatXuU" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAACQAAAAAYa2V5VXNlckVOTk9DbGFpbWVkQW1vdW50AgAAABRfRU5OT19jbGFpbWVkX2Ftb3VudAAAAAAca2V5VXNlckVOTk9MYXN0Q2xhaW1lZEFtb3VudAIAAAAZX0VOTk9fbGFzdF9jbGFpbWVkX2Ftb3VudAAAAAAERU5OTwEAAAAgFbvcV9OA6rL+53m/DeV6nxGYIu+IXr9brrnP32tIN3AAAAAADGFkbWluUHViS2V5MQEAAAAgW0PkM1DAtWhdk96onqOjXkZ/zYsUGYYG4p+U0apV6FkAAAAADGFkbWluUHViS2V5MgEAAAAgW0PkM1DAtWhdk96onqOjXkZ/zYsUGYYG4p+U0apV6FkAAAAADGFkbWluUHViS2V5MwEAAAAgW0PkM1DAtWhdk96onqOjXkZ/zYsUGYYG4p+U0apV6FkAAAAACXNoYXJlRGF0YQEAAAAgW0PkM1DAtWhdk96onqOjXkZ/zYsUGYYG4p+U0apV6FkBAAAADmdldENhbGxlclNoYXJlAAAAAQAAAAZjYWxsZXIEAAAAC2NhbGxlclNoYXJlCQAEGgAAAAIJAQAAABR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AAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAAC2iIFmA==", "height": 1764344, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 79K9UXbeL9Lck6YHpoHEnHs8eUpaZCRmSMavgU2UfRTB Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
5+
6+let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
7+
8+let ENNO = base58'2Tqhz5PWbkijnzYpdLxLDFfVDw5ALQWm2rmxQ79ooMRZ'
9+
10+let adminPubKey1 = base58'79G9MRTWPsir5gThDeuicpBuQxx8UFNqVaDUYcRfWtPA'
11+
12+let adminPubKey2 = base58'79G9MRTWPsir5gThDeuicpBuQxx8UFNqVaDUYcRfWtPA'
13+
14+let adminPubKey3 = base58'79G9MRTWPsir5gThDeuicpBuQxx8UFNqVaDUYcRfWtPA'
15+
16+let shareData = base58'79G9MRTWPsir5gThDeuicpBuQxx8UFNqVaDUYcRfWtPA'
17+
18+func getCallerShare (caller) = {
19+ let callerShare = getInteger(addressFromPublicKey(shareData), ("share_" + toString(caller)))
20+ let callerShareAmount = match callerShare {
21+ case share: Int =>
22+ share
23+ case share: Unit =>
24+ throw("Only governance qualifiers can call this function.")
25+ case _ =>
26+ throw("Match error")
27+ }
28+ callerShareAmount
29+ }
30+
31+
32+func getClaimedAmount (caller) = {
33+ let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
34+ let callerWithdrawnAmount = match callerWithdrawn {
35+ case share: Int =>
36+ share
37+ case share: Unit =>
38+ 0
39+ case _ =>
40+ throw("Match error")
41+ }
42+ callerWithdrawnAmount
43+ }
44+
45+
46+@Callable(i)
47+func claimENNO () = {
48+ let userShare = getCallerShare(i.caller)
49+ let userClaimedAmount = getClaimedAmount(i.caller)
50+ let claimAmount = (userShare - userClaimedAmount)
51+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
52+[ScriptTransfer(i.caller, claimAmount, ENNO), IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
53+ }
54+
55+
56+@Verifier(tx)
57+func verify () = match tx {
58+ case _ =>
59+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
60+ then 1
61+ else 0
62+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
63+ then 1
64+ else 0
65+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
66+ then 1
67+ else 0
68+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
69+}
70+

github/deemru/w8io/169f3d6 
13.49 ms