tx · 2S5ypuTZoB4dr4abieFTgnV4yHgawWp6ozULcbNLiyUq

3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX:  -0.01400000 Waves

2020.05.23 02:34 [1010153] smart account 3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX > SELF 0.00000000 Waves

{ "type": 13, "id": "2S5ypuTZoB4dr4abieFTgnV4yHgawWp6ozULcbNLiyUq", "fee": 1400000, "feeAssetId": null, "timestamp": 1590190488340, "version": 1, "sender": "3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX", "senderPublicKey": "ATKvASNMrYVF14RZZmQE1XB1SEL2JSn7EVZMr9XcG4ho", "proofs": [ "2Xipyejf4N5v8TzTY2hHXR2i6JACNrPeucPaEST6WSN9rsZ3PZiWpB7eUjMetLqbr2M59rT4NZHrgRryoiY1DFVw" ], "script": "base64:AAIDAAAAAAAAABEIARIHCgUICAgICBIECgIICAAAAAYAAAAABE5PTkUCAAAABG5vbmUAAAAACWFkbVB1YktleQEAAAAgjHesJPp5xIuoKzJYyBWRN6te3+eZKpca/z07LlUeq3IBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAANZ2V0U2VjdXJlSGFzaAAAAAEAAAADa2V5CQACWAAAAAEJAAH1AAAAAQkAAfYAAAABCQABmwAAAAEFAAAAA2tleQEAAAALZ2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AARhdXRoAAAAAAAAAAAAAgAAAAVBbGxvdwYJAQAAAAIhPQAAAAIJAAGRAAAAAgUAAAAEYXV0aAAAAAAAAAAAAAIAAAAIUmVjb3ZlcnkDCQEAAAACIT0AAAACCQABkQAAAAIFAAAABGF1dGgAAAAAAAAAAAACAAAABUFsbG93BgkAAAAAAAACCQABkQAAAAIFAAAABGF1dGgAAAAAAAAAAAACAAAACFJlY292ZXJ5BwkAAAIAAAABAgAAABNSZXF1ZXN0IG5vdCBhbGxvd2VkAwkAAAAAAAACCQABkQAAAAIFAAAABGF1dGgAAAAAAAAAAAACAAAACFJlY292ZXJ5BAAAAAVtdWx0aQkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIFAAAABGF1dGgAAAAAAAAAAAEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAIc2VjRW1haWwCAAAAB19vcEF1dGgJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAACVJlY292ZXJ5LAkAAaQAAAABCQAAZAAAAAIFAAAABW11bHRpAAAAAAAAAAABAgAAAAEsCQABpAAAAAEJAABkAAAAAggFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQJAABoAAAAAgUAAAAFbXVsdGkAAAAAAAAAADwFAAAAA25pbAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIc2VjRW1haWwFAAAACHJlc2V0S2V5CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACHNlY0VtYWlsAgAAAAdfb3BBdXRoCQABLAAAAAICAAAAC1JlY292ZXJ5LDEsCQABpAAAAAEJAABkAAAAAggFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQAAAAAAAAAADwFAAAAA25pbAAAAAAkQPTn", "chainId": 84, "height": 1010153, "spentComplexity": 0 } View: original | compacted Prev: JCoKbUviEAZd4FNPTxSoA9hUCdGW5MyS5vbxSNNxrN98 Next: YKszNacE2SrGV5xo6YTN4qEJQaPFtnf3FrizwX7nouY Diff:
OldNewDifferences
3030 func getSecureHash (key) = toBase58String(keccak256(blake2b256(toBytes(key))))
3131
3232
33-func getExternal (payment,multiplier) = if ((isDefined(extract(payment)) == false))
33+func getExternal (payment,multiplier) = if ((isDefined(payment) == false))
3434 then throw("You need pay at least 2 waves for this operation")
3535 else {
3636 let pay = extract(payment)
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) = if ((isDefined(extract(payment)) == false))
33+func getExternal (payment,multiplier) = if ((isDefined(payment) == false))
3434 then throw("You need pay at least 2 waves for this operation")
3535 else {
3636 let pay = extract(payment)
3737 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)])
4242 }
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 
28.12 ms