tx · 9kQviR45d23zLuBu3NCUdwpWR7QSurqQVELyvXSbrD29

3MtSS7RTsDoG91pR5gx5EWzGjJKuciDPeFN:  -0.01400000 Waves

2020.05.20 22:23 [1007002] smart account 3MtSS7RTsDoG91pR5gx5EWzGjJKuciDPeFN > SELF 0.00000000 Waves

{ "type": 13, "id": "9kQviR45d23zLuBu3NCUdwpWR7QSurqQVELyvXSbrD29", "fee": 1400000, "feeAssetId": null, "timestamp": 1590002317316, "version": 1, "sender": "3MtSS7RTsDoG91pR5gx5EWzGjJKuciDPeFN", "senderPublicKey": "8ffZxZakt7dEoMzAQT8TtX1zEBkt7fy8Z4amcAGGP4n6", "proofs": [ "3UvhDt2yJ93CBrBva5W5BxRCKdCDyK7f7bbDWjiASH4js1Z6KqeDdQUCJDK4FLC8ZH8hYH7JK3wbomFU1kxvGRXJ" ], "script": "base64:AAIDAAAAAAAAABAIARIHCgUICAgICBIDCgEIAAAABQAAAAAETk9ORQIAAAAEbm9uZQAAAAAJYWRtUHViS2V5AQAAACBJtFdmkqKlQZBmDC2wHIe5rNi7X/1v0xigoc7NIgTJdAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQUAAAADc3RyAQAAAA1nZXRTZWN1cmVIYXNoAAAAAQAAAANrZXkJAAJYAAAAAQkAAfUAAAABCQAB9gAAAAEJAAGbAAAAAQUAAAADa2V5AA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xvdwYJAQAAAAIhPQAAAAIJAAGRAAAAAgUAAAAEYXV0aAAAAAAAAAAAAAIAAAAIUmVjb3ZlcnkJAAACAAAAAQIAAAATUmVxdWVzdCBub3QgYWxsb3dlZAQAAAAFbXVsdGkJAQAAAA1wYXJzZUludFZhbHVlAAAAAQkAAZEAAAACBQAAAARhdXRoAAAAAAAAAAABCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACHNlY0VtYWlsAgAAAAdfb3BBdXRoCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAlSZWNvdmVyeSwJAAGkAAAAAQkAAGQAAAACBQAAAAVtdWx0aQAAAAAAAAAAAQIAAAABLAkAAaQAAAABCQAAZAAAAAIIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0CQAAaAAAAAIFAAAABW11bHRpAAAAAAAAAAA8BQAAAANuaWwAAAAAhOP+lA==", "chainId": 84, "height": 1007002, "spentComplexity": 0 } View: original | compacted Prev: none Next: BD1exPsvjoCFjMjbkwn6SUuASZujD2o4zWzTAbWeEA7c Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let NONE = "none"
5+
6+let admPubKey = base58'5xiFtrMoXunfGTJwkeA26uAcy2ByUajvA7WQ7xNNSa8b'
7+
8+func getNumberByKey (key) = {
9+ let num = match getInteger(this, key) {
10+ case a: Int =>
11+ a
12+ case _ =>
13+ 0
14+ }
15+ num
16+ }
17+
18+
19+func getStrByKey (key) = {
20+ let str = match getString(this, key) {
21+ case a: String =>
22+ a
23+ case _ =>
24+ NONE
25+ }
26+ str
27+ }
28+
29+
30+func getSecureHash (key) = toBase58String(keccak256(blake2b256(toBytes(key))))
31+
32+
33+@Callable(i)
34+func newAccredited (opEmail,opPass,opPubKey,opData,opLevel) = {
35+ let pubKey = toBase58String(i.callerPublicKey)
36+ let secEmail = getSecureHash(opEmail)
37+ let secPass = getSecureHash(opPass)
38+ if ((pubKey != toBase58String(admPubKey)))
39+ then throw("Not auth to add operator")
40+ else if ((getStrByKey(secEmail) != NONE))
41+ then throw("This operator already added")
42+ else {
43+ let LB = lastBlock.height
44+ WriteSet([DataEntry(secEmail, secPass), DataEntry((secEmail + "_opKey"), opPubKey), DataEntry((secEmail + "_opData"), opData), DataEntry((secEmail + "_opLevel"), opLevel), DataEntry((secEmail + "_opAuth"), ("Allow,0," + toString(lastBlock.height)))])
45+ }
46+ }
47+
48+
49+
50+@Callable(i)
51+func recovery (opEmail) = {
52+ let pubKey = toBase58String(i.callerPublicKey)
53+ let pay = extract(i.payment)
54+ let secEmail = getSecureHash(opEmail)
55+ if ((getStrByKey(secEmail) == NONE))
56+ then throw("This operator does not exist")
57+ else if (((getStrByKey(secEmail) + "_opKey") != pubKey))
58+ then if (if ((pay.assetId != base58''))
59+ then true
60+ else (20000000 >= pay.amount))
61+ then throw("Need at least 2 Waves for auth change password")
62+ else TransferSet([ScriptTransfer(addressFromStringValue("3MpBUJbYZVA8iwoesCYaSytA82dVPyzVpmW"), 25000000, pay.assetId)])
63+ else {
64+ let auth = split(getStrByKey((secEmail + "_opAuth")), ",")
65+ if (if ((auth[0] != "Allow"))
66+ then true
67+ else (auth[0] != "Recovery"))
68+ then throw("Request not allowed")
69+ else {
70+ let multi = parseIntValue(auth[1])
71+ WriteSet([DataEntry((secEmail + "_opAuth"), ((("Recovery," + toString((multi + 1))) + ",") + toString((lastBlock.height + (multi * 60)))))])
72+ }
73+ }
74+ }
75+
76+

github/deemru/w8io/026f985 
20.01 ms