tx · HM9QLwmdKTGUFbfe7L5EqBZWnEMPDkLpCjAQjKAC5Ct7

3N3b5wban4PEUuND6PxSbTvoekc66fss78g:  -0.14000000 Waves

2021.10.29 09:10 [1767230] smart account 3N3b5wban4PEUuND6PxSbTvoekc66fss78g > SELF 0.00000000 Waves

{ "type": 13, "id": "HM9QLwmdKTGUFbfe7L5EqBZWnEMPDkLpCjAQjKAC5Ct7", "fee": 14000000, "feeAssetId": null, "timestamp": 1635487869599, "version": 2, "chainId": 84, "sender": "3N3b5wban4PEUuND6PxSbTvoekc66fss78g", "senderPublicKey": "DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq", "proofs": [ "5QXChAaGBQdTjnNpHzz8JMN73WRrFUsMjLVD2r7UtvNvrvBfPrMh5YTvgAM3H4g7V1Zs8UzYkEUXA3HgvaeyNi88" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAADAAAAAARa2V5QWN0aXZhdGVIZWlnaHQCAAAAD2FjdGl2YXRlX2hlaWdodAAAAAAPa2V5RmluaXNoSGVpZ2h0AgAAAA1maW5pc2hfaGVpZ2h0AAAAAA5hY3RpdmF0ZUhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAARa2V5QWN0aXZhdGVIZWlnaHQAAAAADGZpbmlzaEhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAAPa2V5RmluaXNoSGVpZ2h0AAAAAARFTk5PAQAAACAVu9xX04Dqsv7neb8N5XqfEZgi74hev1uuuc/fa0g3cAAAAAAYa2V5VXNlckVOTk9DbGFpbWVkQW1vdW50AgAAABRfRU5OT19jbGFpbWVkX2Ftb3VudAAAAAAca2V5VXNlckVOTk9MYXN0Q2xhaW1lZEFtb3VudAIAAAAZX0VOTk9fbGFzdF9jbGFpbWVkX2Ftb3VudAAAAAAMYWRtaW5QdWJLZXkxAQAAACC9ZwkrDA/32sIX2Vu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VkAAAAAAAAAAACk+HnXA==", "height": 1767230, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FtQ99f4gaWUZqeKktSpjHSF9kmna88E29bujTT3eAuVC Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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 ENNO = base58'2Tqhz5PWbkijnzYpdLxLDFfVDw5ALQWm2rmxQ79ooMRZ'
13+
14+let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
15+
16+let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
17+
18+let adminPubKey1 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
19+
20+let adminPubKey2 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
21+
22+let adminPubKey3 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
23+
24+func getCallerShare (caller) = {
25+ let callerShare = getInteger(this, ("share_" + toString(caller)))
26+ let callerShareAmount = match callerShare {
27+ case share: Int =>
28+ share
29+ case share: Unit =>
30+ throw("Only early liquidity providers can call this function")
31+ case _ =>
32+ throw("Match error")
33+ }
34+ callerShareAmount
35+ }
436
537
38+func getClaimedAmount (caller) = {
39+ let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
40+ let callerWithdrawnAmount = match callerWithdrawn {
41+ case share: Int =>
42+ share
43+ case share: Unit =>
44+ 0
45+ case _ =>
46+ throw("Match error")
47+ }
48+ callerWithdrawnAmount
49+ }
50+
51+
52+@Callable(i)
53+func claimENNO () = {
54+ let blockDuration = (finishHeight - activateHeight)
55+ let currentDuration = if ((finishHeight > height))
56+ then height
57+ else finishHeight
58+ let userShare = getCallerShare(i.caller)
59+ if ((activateHeight > height))
60+ then throw("Early Bird period has not been started yet.")
61+ else {
62+ let userClaimedAmount = getClaimedAmount(i.caller)
63+ let claimAmount = (fraction((currentDuration - activateHeight), userShare, blockDuration) - userClaimedAmount)
64+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
65+[ScriptTransfer(i.caller, claimAmount, ENNO), IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
66+ }
67+ }
68+
69+
70+@Verifier(tx)
71+func verify () = match tx {
72+ case d: DataTransaction =>
73+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
74+ case _ =>
75+ let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
76+ then 1
77+ else 0
78+ let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
79+ then 1
80+ else 0
81+ let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
82+ then 1
83+ else 0
84+ (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
85+}
686

github/deemru/w8io/026f985 
26.70 ms