tx · GWXs5uvJLbG7vQXym22EGfjwZs2ZjG4LTAEVYkzZXw2D

3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy:  -0.14000000 Waves

2021.10.26 16:39 [1763332] smart account 3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy > SELF 0.00000000 Waves

{ "type": 13, "id": "GWXs5uvJLbG7vQXym22EGfjwZs2ZjG4LTAEVYkzZXw2D", "fee": 14000000, "feeAssetId": null, "timestamp": 1635255555585, "version": 2, "chainId": 84, "sender": "3NCpyPuNzUaB7LFS4KBzwzWVnXmjur582oy", "senderPublicKey": "57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4", "proofs": [ "mUf6zPATVinPFfFFDaxYaqmjf7AHmZWRoo35XpPiXRzEBeWXMog3khQCgreLyAGB6Y12Ue1SZDB4q92LX7RktT4", "57w5TMq9R58qsvGY3RRhvQEXz4b9GZYeDC63cqNHuC4WszDS4BzrMRVoLZCf4iZgDipSRpeE8BtsXxbh9T4ZvvT4", "2q8zVs1X7CMzLAEkZZxf8PrZGNrRXVJyFPDMhMHzFjKKRx7EUD5udwBj15WajKjDQCRGqmWaFxi53y1QuciiqctY" ], "script": "base64:AwQAAAAJcHVibGljS2V5AQAAACA9BzhR2F2KQgdgvEYw2PJt53QZW/FooaGC8Nbbx1cIKwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAACXB1YmxpY0tleY5zYZ4=", "height": 1763332, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Azsa6wH4kHG3pUnRkwsGKEoQvqpf1uHUoJ9bNmcCWizP Next: none Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# 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- }
38-
39-
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- if ((activateHeight > height))
62- then throw("Early Bird period has not been started yet.")
63- else {
64- let userClaimedAmount = getClaimedAmount(i.caller)
65- let claimAmount = (fraction((currentDuration - activateHeight), userShare, blockDuration) - userClaimedAmount)
66- let userClaimedAmountNew = (userClaimedAmount + claimAmount)
67-[ScriptTransfer(i.caller, claimAmount, ENNO), IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
68- }
69- }
70-
71-
72-@Verifier(tx)
73-func verify () = match tx {
74- case d: DataTransaction =>
75- sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
76- case _ =>
77- let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
78- then 1
79- else 0
80- let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
81- then 1
82- else 0
83- let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
84- then 1
85- else 0
86- (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
87-}
88-
1+{-# STDLIB_VERSION 3 #-}
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let publicKey = base58'57EFni8M1XesEurFh3c4jnpLExP2PCPd5TRrwMjePAT4'
4+sigVerify(tx.bodyBytes, tx.proofs[0], publicKey)

github/deemru/w8io/026f985 
30.83 ms