tx · GovS7S95YvAwKdXn6q594We5zP4W72bXPSEMtXkGvfpJ

3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu:  -0.14000000 Waves

2021.10.26 22:04 [1763657] smart account 3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu > SELF 0.00000000 Waves

{ "type": 13, "id": "GovS7S95YvAwKdXn6q594We5zP4W72bXPSEMtXkGvfpJ", "fee": 14000000, "feeAssetId": null, "timestamp": 1635275151209, "version": 2, "chainId": 84, "sender": "3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu", "senderPublicKey": "Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8", "proofs": [ "2jGM7sam4KqctsDS21EiRyUYoVKyQjF75xFNrd9Begdy4qnjGmFRyPzwbkPyaGSWUGScDikrbAnXZ1mLSdYznwGQ", "4GrouGWs5D5WFi6hW1rtQqShbiuuVf6JGQtpwqvNMg9SSmodgn8FjEqG4MWQJ4GqaMa4rW16grznebjWoiiogN8h" ], "script": "base64:AAIFAAAAAAAAAA0IAhIAEgMKAQESABIAAAAADQAAAAAMYWRtaW5QdWJLZXkxAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAMYWRtaW5QdWJLZXkyAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAMYWRtaW5QdWJLZXkzAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIM4g6x+sX8HSDf+o3PS26XhSlvJ+gy9dQq4M8nek2W8bAAAAAAlrZXlBY3RpdmUCAAAABmFjdGl2ZQAAAAAIa2V5Q2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAABFrZXlVc2VyRU5OT0xvY2tlZAIAAAAMX0VOTk9fYW1vdW50AAAAABJrZXlUb3RhbEVOTk9Mb2NrZWQCAAAAEXRvd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cwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAxhZG1pblB1YktleTMAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAAKyHciH", "height": 1763657, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 68KJ89KUQjqyGkLmfLqvM2ateQxDDg7FQb1w5rwNCyjF Next: 65uAJAgE1nZv99ThTtju3fSEyVyZ5HM9rtQMmF9XC4eg Diff:
OldNewDifferences
5858 else {
5959 let totalENNOLocked = getTotalENNOLocked()
6060 let userENNOLocked = getUserENNOLocked(i.caller)
61- let availableToUnstake = userENNOLocked
62- if ((withdrawAmount > availableToUnstake))
61+ if ((withdrawAmount > userENNOLocked))
6362 then throw("withdrawAmount > availableToUnstake")
6463 else {
6564 let totalENNOLockedNew = (totalENNOLocked - withdrawAmount)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8'
55
66 let adminPubKey2 = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8'
77
88 let adminPubKey3 = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8'
99
1010 let adminPubKeyStartStop = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8'
1111
1212 let keyActive = "active"
1313
1414 let keyCause = "shutdown_cause"
1515
1616 let keyUserENNOLocked = "_ENNO_amount"
1717
1818 let keyTotalENNOLocked = "total_ENNO_amount"
1919
2020 let isActive = valueOrElse(getBoolean(this, keyActive), true)
2121
2222 let ENNO = base58'2Tqhz5PWbkijnzYpdLxLDFfVDw5ALQWm2rmxQ79ooMRZ'
2323
2424 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
2525
2626
2727 func getUserENNOLocked (user) = valueOrElse(getInteger(this, (toString(user) + keyUserENNOLocked)), 0)
2828
2929
3030 func getTotalENNOLocked () = valueOrElse(getInteger(this, keyTotalENNOLocked), 0)
3131
3232
3333 @Callable(i)
3434 func lockENNO () = if (!(isActive))
3535 then throw("DApp is inactive at this moment")
3636 else {
3737 let $t010381113 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
3838 let pmtAmount = $t010381113._1
3939 let pmtAssetId = $t010381113._2
4040 if ((pmtAssetId != ENNO))
4141 then throw("Incorrect pmtAssetId")
4242 else {
4343 let userENNOLocked = getUserENNOLocked(i.caller)
4444 let userENNOLockedNew = (userENNOLocked + pmtAmount)
4545 let totalENNOLocked = getTotalENNOLocked()
4646 let totalENNOLockedNew = (totalENNOLocked + pmtAmount)
4747 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOLockedNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew)]
4848 }
4949 }
5050
5151
5252
5353 @Callable(i)
5454 func withdrawENNO (withdrawAmount) = if (!(isActive))
5555 then throw("DApp is inactive at this moment")
5656 else if ((0 >= withdrawAmount))
5757 then throw("withdrawAmount <= 0")
5858 else {
5959 let totalENNOLocked = getTotalENNOLocked()
6060 let userENNOLocked = getUserENNOLocked(i.caller)
61- let availableToUnstake = userENNOLocked
62- if ((withdrawAmount > availableToUnstake))
61+ if ((withdrawAmount > userENNOLocked))
6362 then throw("withdrawAmount > availableToUnstake")
6463 else {
6564 let totalENNOLockedNew = (totalENNOLocked - withdrawAmount)
6665 let userENNOamountNew = (userENNOLocked - withdrawAmount)
6766 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)]
6867 }
6968 }
7069
7170
7271
7372 @Callable(i)
7473 func shutdown () = if (!(isActive))
7574 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
7675 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
7776 then throw("Only admin can call this function")
7877 else suspend("Paused by admin")
7978
8079
8180
8281 @Callable(i)
8382 func activate () = if (isActive)
8483 then throw("DApp is already active")
8584 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
8685 then throw("Only admin can call this function")
8786 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
8887
8988
9089 @Verifier(tx)
9190 func verify () = {
9291 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
9392 then 1
9493 else 0
9594 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
9695 then 1
9796 else 0
9897 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
9998 then 1
10099 else 0
101100 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
102101 }
103102

github/deemru/w8io/169f3d6 
26.37 ms