tx · 4N8JDcePpondjFZ2YfCsGpR85pHJfoi7wwDapqpMWU1X

3N9kfEMrTjmxo1Sx7jMTzjsY6KVT1sjnkgc:  -0.01400000 Waves

2021.02.03 00:32 [1381073] smart account 3N9kfEMrTjmxo1Sx7jMTzjsY6KVT1sjnkgc > SELF 0.00000000 Waves

{ "type": 13, "id": "4N8JDcePpondjFZ2YfCsGpR85pHJfoi7wwDapqpMWU1X", "fee": 1400000, "feeAssetId": null, "timestamp": 1612301587391, "version": 1, "sender": "3N9kfEMrTjmxo1Sx7jMTzjsY6KVT1sjnkgc", "senderPublicKey": "Abx2n2y8qRBULFmd16a9vk8EdFhFFJgYTGU498Z4CVty", "proofs": [ "2NrP4qKLMd5NZaBddPSAoqsfArcPk9ei1hfDSVber9aD4Lxv42gGZw2eiJQiUfFyAsFXA8WCBcCDiZDZHaBhAyZ4" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACgAAAAARa2V5QWN0aXZhdGVIZWlnaHQCAAAAD2FjdGl2YXRlX2hlaWdodAAAAAAPa2V5RmluaXNoSGVpZ2h0AgAAAA1maW5pc2hfaGVpZ2h0AAAAAA5hY3RpdmF0ZUhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAARa2V5QWN0aXZhdGVIZWlnaHQAAAAADGZpbmlzaEhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwUAAAAPa2V5RmluaXNoSGVpZ2h0AAAAAA50b3RhbFNoYXJlU1dPUAAAAFrzEHpAAAAAAAAEU1dPUAEAAAAgBZi8XXEARXN0cD+GmsdMDJvvV9t9kMADB5+FCvE65koAAAAAGGtleVVzZXJTV09QQ2xhaW1lZEFtb3VudAIAAAAUX1NXT1BfY2xhaW1lZF9hbW91bnQAAAAAHGtleVVzZXJTV09QTGFzdENsYWltZWRBbW91bnQCAAAAGV9TV09QX2xhc3RfY2xhaW1lZF9hbW91bnQBAAAADmdldENh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FjdGl2YXRlSGVpZ2h0BAAAAA9jdXJyZW50RHVyYXRpb24DCQAAZgAAAAIFAAAADGZpbmlzaEhlaWdodAUAAAAGaGVpZ2h0BQAAAAZoZWlnaHQFAAAADGZpbmlzaEhlaWdodAQAAAAJdXNlclNoYXJlCQEAAAAOZ2V0Q2FsbGVyU2hhcmUAAAABCAUAAAABaQAAAAZjYWxsZXIEAAAAEXVzZXJDbGFpbWVkQW1vdW50CQEAAAAQZ2V0Q2xhaW1lZEFtb3VudAAAAAEIBQAAAAFpAAAABmNhbGxlcgQAAAALY2xhaW1BbW91bnQJAABlAAAAAgkAAGsAAAADCQAAZQAAAAIFAAAAD2N1cnJlbnREdXJhdGlvbgUAAAAOYWN0aXZhdGVIZWlnaHQFAAAACXVzZXJTaGFyZQUAAAANYmxvY2tEdXJhdGlvbgUAAAARdXNlckNsYWltZWRBbW91bnQEAAAAFHVzZXJDbGFpbWVkQW1vdW50TmV3CQAAZAAAAAIFAAAAEXVzZXJDbGFpbWVkQW1vdW50BQAAAAtjbGFpbUFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAC2NsYWltQW1vdW50BQAAAARTV09QCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABhrZXlVc2VyU1dPUENsYWltZWRBbW91bnQFAAAAFHVzZXJDbGFpbWVkQW1vdW50TmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABxrZXlVc2VyU1dPUExhc3RDbGFpbWVkQW1vdW50BQAAAAtjbGFpbUFtb3VudAUAAAADbmlsAAAAAAAEd/I=", "chainId": 84, "height": 1381073, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: LbdqfnMzQFkZsvqC5Uw38FjooBWq8cEyRpjcoh79LjQ Next: none Diff:
OldNewDifferences
1111
1212 let totalShareSWOP = 100000000000000
1313
14-let SWOP = base58'6Lr5NxST5APD9uTwSi1roZPZX9uX971D3F63ZTSWrCPA'
14+let SWOP = base58'Nr7tfLqcNgqiPyFj8mw7hqHjUac9HDTjK5bKXnukSmw'
1515
1616 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
1717
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 totalShareSWOP = 100000000000000
1313
14-let SWOP = base58'6Lr5NxST5APD9uTwSi1roZPZX9uX971D3F63ZTSWrCPA'
14+let SWOP = base58'Nr7tfLqcNgqiPyFj8mw7hqHjUac9HDTjK5bKXnukSmw'
1515
1616 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
1717
1818 let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount"
1919
2020 func getCallerShare (caller) = {
2121 let callerShare = getInteger(this, ("share_" + toString(caller)))
2222 let callerShareAmount = match callerShare {
2323 case share: Int =>
2424 share
2525 case share: Unit =>
2626 throw("Only early liquidity providers can call this function")
2727 case _ =>
2828 throw("Match error")
2929 }
3030 callerShareAmount
3131 }
3232
3333
3434 func getClaimedAmount (caller) = {
3535 let callerWithdrawn = getInteger(this, (toString(caller) + keyUserSWOPClaimedAmount))
3636 let callerWithdrawnAmount = match callerWithdrawn {
3737 case share: Int =>
3838 share
3939 case share: Unit =>
4040 0
4141 case _ =>
4242 throw("Match error")
4343 }
4444 callerWithdrawnAmount
4545 }
4646
4747
4848 @Callable(i)
4949 func claimSWOP () = {
5050 let blockDuration = (finishHeight - activateHeight)
5151 let currentDuration = if ((finishHeight > height))
5252 then height
5353 else finishHeight
5454 let userShare = getCallerShare(i.caller)
5555 let userClaimedAmount = getClaimedAmount(i.caller)
5656 let claimAmount = (fraction((currentDuration - activateHeight), userShare, blockDuration) - userClaimedAmount)
5757 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
5858 [ScriptTransfer(i.caller, claimAmount, SWOP), IntegerEntry((toString(i.caller) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((toString(i.caller) + keyUserSWOPLastClaimedAmount), claimAmount)]
5959 }
6060
6161

github/deemru/w8io/169f3d6 
19.13 ms