tx · JCoKbUviEAZd4FNPTxSoA9hUCdGW5MyS5vbxSNNxrN98

3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX:  -0.01400000 Waves

2020.05.23 02:32 [1010152] smart account 3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX > SELF 0.00000000 Waves

{ "type": 13, "id": "JCoKbUviEAZd4FNPTxSoA9hUCdGW5MyS5vbxSNNxrN98", "fee": 1400000, "feeAssetId": null, "timestamp": 1590190438086, "version": 1, "sender": "3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX", "senderPublicKey": "ATKvASNMrYVF14RZZmQE1XB1SEL2JSn7EVZMr9XcG4ho", "proofs": [ "4CNUmfTEfHk82McFGFsGtPQSqhHfRHerUUykMNLEuqSbRxVoJiMccZJipKPYbRa8WnK85XHnwT1Sq44DYFAGq5BX" ], "script": "base64:AAIDAAAAAAAAABEIARIHCgUICAgICBIECgIICAAAAAYAAAAABE5PTkUCAAAABG5vbmUAAAAACWFkbVB1YktleQEAAAAgjHesJPp5xIuoKzJYyBWRN6te3+eZKpca/z07LlUeq3IBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAANZ2V0U2VjdXJlSGFzaAAAAAEAAAADa2V5CQACWAAAAAEJAAH1AAAAAQkAAfYAAAABCQABmwAAAAEFAAAAA2tleQEAAAALZ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AUAAAADbmlsAAAAAN1wgvU=", "chainId": 84, "height": 1010152, "spentComplexity": 0 } View: original | compacted Prev: 31X97VH8cQuaeWheH8NXKBYNZLaS2E6HVizTHWvTJhk1 Next: 2S5ypuTZoB4dr4abieFTgnV4yHgawWp6ozULcbNLiyUq Diff:
OldNewDifferences
3030 func getSecureHash (key) = toBase58String(keccak256(blake2b256(toBytes(key))))
3131
3232
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))
33+func getExternal (payment,multiplier) = if ((isDefined(extract(payment)) == false))
34+ then throw("You need pay at least 2 waves for this operation")
35+ else {
36+ let pay = extract(payment)
37+ if (if ((isDefined(pay.assetId) == true))
3838 then true
3939 else ((2000000 * (multiplier + 1)) >= pay.amount))
4040 then throw("Need at least 2 Waves for auth change password")
4141 else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), (pay.amount - 1500000), pay.assetId)])
42- }
42+ }
4343
4444
4545 @Callable(i)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
55
66 let admPubKey = base58'ATKvASNMrYVF14RZZmQE1XB1SEL2JSn7EVZMr9XcG4ho'
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 (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))
33+func getExternal (payment,multiplier) = if ((isDefined(extract(payment)) == false))
34+ then throw("You need pay at least 2 waves for this operation")
35+ else {
36+ let pay = extract(payment)
37+ if (if ((isDefined(pay.assetId) == true))
3838 then true
3939 else ((2000000 * (multiplier + 1)) >= pay.amount))
4040 then throw("Need at least 2 Waves for auth change password")
4141 else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), (pay.amount - 1500000), pay.assetId)])
42- }
42+ }
4343
4444
4545 @Callable(i)
4646 func addOp (opEmail,opPass,opPubKey,opSign,opLevel) = {
4747 let pubKey = toBase58String(i.callerPublicKey)
4848 let secEmail = getSecureHash(opEmail)
4949 let secPass = getSecureHash(opPass)
5050 if ((pubKey != toBase58String(admPubKey)))
5151 then getExternal(i.payment, 3)
5252 else if ((getStrByKey(secEmail) != NONE))
5353 then throw("This operator already added")
5454 else if ((addressFromPublicKey(i.callerPublicKey) != this))
5555 then getExternal(i.payment, 10)
5656 else if ((sigVerify(toBytes((opEmail + opPass)), fromBase58String(opSign), fromBase58String(pubKey)) == false))
5757 then throw("Sign not verified")
5858 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)))])
5959 }
6060
6161
6262
6363 @Callable(i)
6464 func resetOp (opEmail,resetKey) = {
6565 let pubKey = toBase58String(i.callerPublicKey)
6666 let pay = extract(i.payment)
6767 let secEmail = getSecureHash(opEmail)
6868 if ((getStrByKey(secEmail) == NONE))
6969 then throw("This operator does not exist")
7070 else {
7171 let auth = split(getStrByKey((secEmail + "_opAuth")), ",")
7272 if (((getStrByKey(secEmail) + "_opKey") != pubKey))
7373 then getExternal(extract(i.payment), parseIntValue(auth[1]))
7474 else if ((parseIntValue(auth[2]) >= height))
7575 then throw((("There is already a request delivered to your email, wait " + toString((parseIntValue(auth[2]) - height))) + " minutes"))
7676 else if (if (if ((auth[0] == "Allow"))
7777 then true
7878 else (auth[0] != "Recovery"))
7979 then if ((auth[0] != "Allow"))
8080 then true
8181 else (auth[0] == "Recovery")
8282 else false)
8383 then throw("Request not allowed")
8484 else if ((auth[0] == "Recovery"))
8585 then {
8686 let multi = parseIntValue(auth[1])
8787 WriteSet([DataEntry((secEmail + "_opAuth"), ((("Recovery," + toString((multi + 1))) + ",") + toString((lastBlock.height + (multi * 60)))))])
8888 }
8989 else WriteSet([DataEntry(secEmail, resetKey), DataEntry((secEmail + "_opAuth"), ("Recovery,1," + toString((lastBlock.height + 60))))])
9090 }
9191 }
9292
9393

github/deemru/w8io/026f985 
40.82 ms