tx · 8BryJQtA1yaKfH1JLpRa5PqkMtv4utbdKc7o9M8EYpZ9

3N3b5wban4PEUuND6PxSbTvoekc66fss78g:  -0.14000000 Waves

2021.10.26 15:56 [1763283] smart account 3N3b5wban4PEUuND6PxSbTvoekc66fss78g > SELF 0.00000000 Waves

{ "type": 13, "id": "8BryJQtA1yaKfH1JLpRa5PqkMtv4utbdKc7o9M8EYpZ9", "fee": 14000000, "feeAssetId": null, "timestamp": 1635253062193, "version": 2, "chainId": 84, "sender": "3N3b5wban4PEUuND6PxSbTvoekc66fss78g", "senderPublicKey": "DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq", "proofs": [ "5BXPyPeP4tLiSJuKxX1TxJN4gVHs2KKs5onBy3gT9C1aqj25uQbQXZnU4Ez4ovyq9fWRWcPnVTKETP6MqbyZct4q", "FvbLwnR1Qetjv3Hs7hYbTKyD6zD3chHgjd2q22hzbz3joWcx4cc4quDVZVRvadRfSFqmHjoyDGFjmzVUYnHVfDz", "2eaxyhVX8GYhLXgZ8XtBCo2KKVx868emfwwzFJ727dTxBsQ9wwpmxAL6tfJog5uMuHWEmu1NSfLGYmsUSaUHtKXZ" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAADQAAAAARa2V5QWN0aXZhdGVIZWlnaHQCAAAAD2FjdGl2YXRlX2hlaWdodAAAAAAPa2V5RmluaXNoSGVpZ2h0AgAAAA1maW5pc2hfaGVpZ2h0AAAAAA5hY3RpdmF0ZUhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAARa2V5QWN0aXZhdGVIZWlnaHQAAAAADGZpbmlzaEhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAAPa2V5RmluaXNoSGVpZ2h0AAAAAA50b3RhbFNoYXJlRU5OTwAAAFrzEHpAAAAAAAAERU5OTwEAAAAgFbvcV9OA6rL+53m/DeV6nxGYIu+IXr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us": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4zqJGMrtiYro9e2NsrPvr8SEQegT5WG3SEuiFVT56Ax9 Next: EDNQBxZvgAVXyNrzQ7quTj2jyF3Ns7oxZh4A1SPzwpzQ Diff:
OldNewDifferences
5757 let currentDuration = if ((finishHeight > height))
5858 then height
5959 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)
60+ if ((activateHeight > height))
61+ then throw("NOT-STARTED-YET")
62+ else {
63+ let userShare = getCallerShare(i.caller)
64+ let userClaimedAmount = getClaimedAmount(i.caller)
65+ let claimAmount = (fraction((currentDuration - activateHeight), userShare, blockDuration) - userClaimedAmount)
66+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
6467 [ScriptTransfer(i.caller, claimAmount, ENNO), IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
68+ }
6569 }
6670
6771
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let keyActivateHeight = "activate_height"
55
66 let keyFinishHeight = "finish_height"
77
88 let activateHeight = getIntegerValue(this, keyActivateHeight)
99
1010 let finishHeight = getIntegerValue(this, keyFinishHeight)
1111
1212 let totalShareENNO = 100000000000000
1313
1414 let ENNO = base58'2Tqhz5PWbkijnzYpdLxLDFfVDw5ALQWm2rmxQ79ooMRZ'
1515
1616 let keyUserENNOClaimedAmount = "_ENNO_claimed_amount"
1717
1818 let keyUserENNOLastClaimedAmount = "_ENNO_last_claimed_amount"
1919
2020 let adminPubKey1 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
2121
2222 let adminPubKey2 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
2323
2424 let adminPubKey3 = base58'DkMBTSHqT9hKVK1joeyL9DWKdzMAiCYZtYVkMPUx4Zwq'
2525
2626 func getCallerShare (caller) = {
2727 let callerShare = getInteger(this, ("share_" + toString(caller)))
2828 let callerShareAmount = match callerShare {
2929 case share: Int =>
3030 share
3131 case share: Unit =>
3232 throw("Only early liquidity providers can call this function")
3333 case _ =>
3434 throw("Match error")
3535 }
3636 callerShareAmount
3737 }
3838
3939
4040 func getClaimedAmount (caller) = {
4141 let callerWithdrawn = getInteger(this, (toString(caller) + keyUserENNOClaimedAmount))
4242 let callerWithdrawnAmount = match callerWithdrawn {
4343 case share: Int =>
4444 share
4545 case share: Unit =>
4646 0
4747 case _ =>
4848 throw("Match error")
4949 }
5050 callerWithdrawnAmount
5151 }
5252
5353
5454 @Callable(i)
5555 func claimENNO () = {
5656 let blockDuration = (finishHeight - activateHeight)
5757 let currentDuration = if ((finishHeight > height))
5858 then height
5959 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)
60+ if ((activateHeight > height))
61+ then throw("NOT-STARTED-YET")
62+ else {
63+ let userShare = getCallerShare(i.caller)
64+ let userClaimedAmount = getClaimedAmount(i.caller)
65+ let claimAmount = (fraction((currentDuration - activateHeight), userShare, blockDuration) - userClaimedAmount)
66+ let userClaimedAmountNew = (userClaimedAmount + claimAmount)
6467 [ScriptTransfer(i.caller, claimAmount, ENNO), IntegerEntry((toString(i.caller) + keyUserENNOClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserENNOLastClaimedAmount), claimAmount)]
68+ }
6569 }
6670
6771
6872 @Verifier(tx)
6973 func verify () = match tx {
7074 case _ =>
7175 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
7276 then 1
7377 else 0
7478 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
7579 then 1
7680 else 0
7781 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
7882 then 1
7983 else 0
8084 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
8185 }
8286

github/deemru/w8io/026f985 
44.97 ms