tx · 31X97VH8cQuaeWheH8NXKBYNZLaS2E6HVizTHWvTJhk1

3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX:  -0.01400000 Waves

2020.05.23 02:28 [1010149] smart account 3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX > SELF 0.00000000 Waves

{ "type": 13, "id": "31X97VH8cQuaeWheH8NXKBYNZLaS2E6HVizTHWvTJhk1", "fee": 1400000, "feeAssetId": null, "timestamp": 1590190082616, "version": 1, "sender": "3MvuveAR1Z4LmsKiNvjDKDNdUwhRY1peZcX", "senderPublicKey": "ATKvASNMrYVF14RZZmQE1XB1SEL2JSn7EVZMr9XcG4ho", "proofs": [ "33c1E71pNkoaBPB2TydCAkbtT7ZQazUf1mmPwmMHquQjB2BGCx3qykwzeqZpDXfqPPwfxgwPPvv21rnp1cB3KdTd" ], "script": "base64:AAIDAAAAAAAAABEIARIHCgUICAgICBIECgIICAAAAAYAAAAABE5PTkUCAAAABG5vbmUAAAAACWFkbVB1YktleQEAAAAgjHesJPp5xIuoKzJYyBWRN6te3+eZKpca/z07LlUeq3IBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAANZ2V0U2VjdXJlSGFzaAAAAAEAAAADa2V5CQACWAAAAAEJAAH1AAAAAQkAAfYAAAABCQABmwAAAAEFAAAAA2tleQEAAAALZ2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"chainId": 84, "height": 1010149, "spentComplexity": 0 } View: original | compacted Prev: 2WWAvn3YXGpRKjNtUerDTfDE5rgSqfaDhvim4R1kytqY Next: JCoKbUviEAZd4FNPTxSoA9hUCdGW5MyS5vbxSNNxrN98 Diff:
OldNewDifferences
3838 then true
3939 else ((2000000 * (multiplier + 1)) >= pay.amount))
4040 then throw("Need at least 2 Waves for auth change password")
41- else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 15000000, pay.assetId)])
41+ else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), (pay.amount - 1500000), pay.assetId)])
4242 }
4343
4444
4848 let secEmail = getSecureHash(opEmail)
4949 let secPass = getSecureHash(opPass)
5050 if ((pubKey != toBase58String(admPubKey)))
51- then throw("Not auth to add operator")
51+ 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))
55- then getExternal(i.payment, 5)
55+ 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)))])
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
3333 func getExternal (payment,multiplier) = {
3434 let pay = extract(payment)
3535 if ((isDefined(pay) == false))
3636 then throw("You need pay at least 2 waves for this operation")
3737 else if (if ((isDefined(extract(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")
41- else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 15000000, pay.assetId)])
41+ 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)))
51- then throw("Not auth to add operator")
51+ 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))
55- then getExternal(i.payment, 5)
55+ 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.23 ms