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