tx · 68KJ89KUQjqyGkLmfLqvM2ateQxDDg7FQb1w5rwNCyjF

3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu:  -0.14000000 Waves

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

{ "type": 13, "id": "68KJ89KUQjqyGkLmfLqvM2ateQxDDg7FQb1w5rwNCyjF", "fee": 14000000, "feeAssetId": null, "timestamp": 1635275054407, "version": 2, "chainId": 84, "sender": "3N5qejBhCedYyTbK7Qgqxn2T6kubSeHt7pu", "senderPublicKey": "Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8", "proofs": [ "THncfWKsJ1gjfrS8QJmmrerDSmURAcyxuHY1Yh7sGRhBiRUZXwxeWNoZQGcpT6TavsGsJ4SuPHRFxiTWBoM5q6C", "jHfG9ZSpZ5WLrbHw1WrqdCwdvKyP7ADAcKtq94mf3twkGHBBgkqkuE1nHL3JirwCmj5DzWEDQbCBvkMEZ9Ejk3i" ], "script": "base64:AAIFAAAAAAAAAA0IAhIAEgMKAQESABIAAAAADQAAAAAMYWRtaW5QdWJLZXkxAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAMYWRtaW5QdWJLZXkyAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAMYWRtaW5QdWJLZXkzAQAAACDOIOsfrF/B0g3/qNz0tul4UpbyfoMvXUKuDPJ3pNlvGwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIM4g6x+sX8HSDf+o3PS26XhSlvJ+gy9dQq4M8nek2W8bAAAAAAlrZXlBY3RpdmUCAAAABmFjdGl2ZQAAAAAIa2V5Q2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAABFrZXlVc2VyRU5OT0xvY2tlZAIAAAAMX0VOTk9fYW1vdW50AAAAABJrZXlUb3RhbEVOTk9M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ABAAAAAAAAAAAABAAAABJhZG1pblB1YktleTNTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAACUdGX+Q==", "height": 1763656, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 99VdqVvcHu2oZ3shHjvsLVQYRrxwRFxMxPUctAR3RaFr Next: GovS7S95YvAwKdXn6q594We5zP4W72bXPSEMtXkGvfpJ Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8'
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# 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)
6161 let availableToUnstake = userENNOLocked
6262 if ((withdrawAmount > availableToUnstake))
6363 then throw("withdrawAmount > availableToUnstake")
6464 else {
6565 let totalENNOLockedNew = (totalENNOLocked - withdrawAmount)
6666 let userENNOamountNew = (userENNOLocked - withdrawAmount)
6767 [IntegerEntry((toString(i.caller) + keyUserENNOLocked), userENNOamountNew), IntegerEntry(keyTotalENNOLocked, totalENNOLockedNew), ScriptTransfer(i.caller, withdrawAmount, ENNO)]
6868 }
6969 }
7070
7171
7272
7373 @Callable(i)
7474 func shutdown () = if (!(isActive))
7575 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
7676 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
7777 then throw("Only admin can call this function")
7878 else suspend("Paused by admin")
7979
8080
8181
8282 @Callable(i)
8383 func activate () = if (isActive)
8484 then throw("DApp is already active")
8585 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
8686 then throw("Only admin can call this function")
8787 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
8888
8989
9090 @Verifier(tx)
9191 func verify () = {
9292 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
9393 then 1
9494 else 0
9595 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
9696 then 1
9797 else 0
9898 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
9999 then 1
100100 else 0
101101 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
102102 }
103103

github/deemru/w8io/169f3d6 
29.15 ms