tx · EbUncTbqSj4FkzKbEmkUh6WGVPgoFEykxdwCM2VEZEf2

3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX:  -0.01400000 Waves

2020.05.23 02:16 [1010137] smart account 3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX > SELF 0.00000000 Waves

{ "type": 13, "id": "EbUncTbqSj4FkzKbEmkUh6WGVPgoFEykxdwCM2VEZEf2", "fee": 1400000, "feeAssetId": null, "timestamp": 1590189407177, "version": 1, "sender": "3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX", "senderPublicKey": "ATKvASNMrYVF14RZZmQE1XB1SEL2JSn7EVZMr9XcG4ho", "proofs": [ "5xSMfHjPHCQ3iL7qaYxH2mJzgXtpYdGvwcoHevakVjSJc93xk5hDerqssTUFH21okY8xVLFZ3xYPhm55HDQdGN5v" ], "script": "base64:AAIDAAAAAAAAABEIARIHCgUICAgICBIECgIICAAAAAYAAAAABE5PTkUCAAAABG5vbmUAAAAACWFkbVB1YktleQEAAAAgSbRXZpKipUGQZgwtsByHuazYu1/9b9MYoKHOzSIEyXQBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAANZ2V0U2VjdXJlSGFzaAAAAAEAAAADa2V5CQACWAAAAAEJAAH1AAAAAQkAAfYAAAABCQABmwAAAAEFAAAAA2tleQEAAA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ted Prev: F3mnXX57KuiokkFvMv2UwCQyTuo2MQC3M3TzmTs8YnLG Next: 2WWAvn3YXGpRKjNtUerDTfDE5rgSqfaDhvim4R1kytqY Diff:
OldNewDifferences
3030 func getSecureHash (key) = toBase58String(keccak256(blake2b256(toBytes(key))))
3131
3232
33-func getExternal (pay,multiplier) = if ((isDefined(pay) == false))
34- then throw("You need pay at least 2 waves for this operation")
35- else if (if ((isDefined(pay.assetId) == true))
36- then true
37- else ((2000000 * (multiplier + 1)) >= pay.amount))
38- then throw("Need at least 2 Waves for auth change password")
39- else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 15000000, pay.assetId)])
33+func getExternal (payment,multiplier) = {
34+ let pay = extract(payment)
35+ if ((isDefined(pay) == false))
36+ then throw("You need pay at least 2 waves for this operation")
37+ else if (if ((isDefined(extract(pay.assetId)) == true))
38+ then true
39+ else ((2000000 * (multiplier + 1)) >= pay.amount))
40+ then throw("Need at least 2 Waves for auth change password")
41+ else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 15000000, pay.assetId)])
42+ }
4043
4144
4245 @Callable(i)
4952 else if ((getStrByKey(secEmail) != NONE))
5053 then throw("This operator already added")
5154 else if ((addressFromPublicKey(i.callerPublicKey) != this))
52- then getExternal(extract(i.payment), 5)
55+ then getExternal(i.payment, 5)
5356 else if ((sigVerify(toBytes((opEmail + opPass)), fromBase58String(opSign), fromBase58String(pubKey)) == false))
5457 then throw("Sign not verified")
5558 else WriteSet([DataEntry(secEmail, secPass), DataEntry((secEmail + "_opKey"), opPubKey), DataEntry((secEmail + "_opId"), toBase58String(i.transactionId)), DataEntry((secEmail + "_opLevel"), opLevel), DataEntry((secEmail + "_opAuth"), ("Allow,0," + toString(lastBlock.height)))])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
55
66 let admPubKey = base58'5xiFtrMoXunfGTJwkeA26uAcy2ByUajvA7WQ7xNNSa8b'
77
88 func getNumberByKey (key) = {
99 let num = match getInteger(this, key) {
1010 case a: Int =>
1111 a
1212 case _ =>
1313 0
1414 }
1515 num
1616 }
1717
1818
1919 func getStrByKey (key) = {
2020 let str = match getString(this, key) {
2121 case a: String =>
2222 a
2323 case _ =>
2424 NONE
2525 }
2626 str
2727 }
2828
2929
3030 func getSecureHash (key) = toBase58String(keccak256(blake2b256(toBytes(key))))
3131
3232
33-func getExternal (pay,multiplier) = if ((isDefined(pay) == false))
34- then throw("You need pay at least 2 waves for this operation")
35- else if (if ((isDefined(pay.assetId) == true))
36- then true
37- else ((2000000 * (multiplier + 1)) >= pay.amount))
38- then throw("Need at least 2 Waves for auth change password")
39- else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 15000000, pay.assetId)])
33+func getExternal (payment,multiplier) = {
34+ let pay = extract(payment)
35+ if ((isDefined(pay) == false))
36+ then throw("You need pay at least 2 waves for this operation")
37+ else if (if ((isDefined(extract(pay.assetId)) == true))
38+ then true
39+ else ((2000000 * (multiplier + 1)) >= pay.amount))
40+ then throw("Need at least 2 Waves for auth change password")
41+ else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 15000000, pay.assetId)])
42+ }
4043
4144
4245 @Callable(i)
4346 func addOp (opEmail,opPass,opPubKey,opSign,opLevel) = {
4447 let pubKey = toBase58String(i.callerPublicKey)
4548 let secEmail = getSecureHash(opEmail)
4649 let secPass = getSecureHash(opPass)
4750 if ((pubKey != toBase58String(admPubKey)))
4851 then throw("Not auth to add operator")
4952 else if ((getStrByKey(secEmail) != NONE))
5053 then throw("This operator already added")
5154 else if ((addressFromPublicKey(i.callerPublicKey) != this))
52- then getExternal(extract(i.payment), 5)
55+ then getExternal(i.payment, 5)
5356 else if ((sigVerify(toBytes((opEmail + opPass)), fromBase58String(opSign), fromBase58String(pubKey)) == false))
5457 then throw("Sign not verified")
5558 else WriteSet([DataEntry(secEmail, secPass), DataEntry((secEmail + "_opKey"), opPubKey), DataEntry((secEmail + "_opId"), toBase58String(i.transactionId)), DataEntry((secEmail + "_opLevel"), opLevel), DataEntry((secEmail + "_opAuth"), ("Allow,0," + toString(lastBlock.height)))])
5659 }
5760
5861
5962
6063 @Callable(i)
6164 func resetOp (opEmail,resetKey) = {
6265 let pubKey = toBase58String(i.callerPublicKey)
6366 let pay = extract(i.payment)
6467 let secEmail = getSecureHash(opEmail)
6568 if ((getStrByKey(secEmail) == NONE))
6669 then throw("This operator does not exist")
6770 else {
6871 let auth = split(getStrByKey((secEmail + "_opAuth")), ",")
6972 if (((getStrByKey(secEmail) + "_opKey") != pubKey))
7073 then getExternal(extract(i.payment), parseIntValue(auth[1]))
7174 else if ((parseIntValue(auth[2]) >= height))
7275 then throw((("There is already a request delivered to your email, wait " + toString((parseIntValue(auth[2]) - height))) + " minutes"))
7376 else if (if (if ((auth[0] == "Allow"))
7477 then true
7578 else (auth[0] != "Recovery"))
7679 then if ((auth[0] != "Allow"))
7780 then true
7881 else (auth[0] == "Recovery")
7982 else false)
8083 then throw("Request not allowed")
8184 else if ((auth[0] == "Recovery"))
8285 then {
8386 let multi = parseIntValue(auth[1])
8487 WriteSet([DataEntry((secEmail + "_opAuth"), ((("Recovery," + toString((multi + 1))) + ",") + toString((lastBlock.height + (multi * 60)))))])
8588 }
8689 else WriteSet([DataEntry(secEmail, resetKey), DataEntry((secEmail + "_opAuth"), ("Recovery,1," + toString((lastBlock.height + 60))))])
8790 }
8891 }
8992
9093

github/deemru/w8io/026f985 
27.81 ms