tx · BnrwJ2pAKoaXF3LgupZ4mMewYjtexM5oCaVjMN6wrdf1
3NB7gYiKko9aybm4jjEFdrTjTsvQWpcCdaS: -0.05000000 Waves
2022.01.25 23:28 [1894916] smart account 3NB7gYiKko9aybm4jjEFdrTjTsvQWpcCdaS > SELF 0.00000000 Waves
{
"type": 13,
"id": "BnrwJ2pAKoaXF3LgupZ4mMewYjtexM5oCaVjMN6wrdf1",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1643142538991,
"version": 2,
"chainId": 84,
"sender": "3NB7gYiKko9aybm4jjEFdrTjTsvQWpcCdaS",
"senderPublicKey": "CMZuFNW2DCrX1xFXYGgE6QrERYLGpncVxcAKhxyEsoAa",
"proofs": [
"4jXqEvxxriMTMytzXSEj8CPYTcgY3xeWBQFysZA4VEYkrU3GyU1mYD97zY6WnVWU9UTWac6qKCguFVvGaFVTkhmW"
],
"script": "base64:AAIFAAAAAAAAABgIAhIDCgEIEgQKAggIEgQKAggBEgMKAQgAAAAEAAAAAAxhZG1pbkFkZHJlc3MJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAFYWRtaW4CAAAAAAEAAAAHaXNBZG1pbgAAAAEAAAANY2FsbGVyQWRkcmVzcwMJAAAAAAAAAgUAAAANY2FsbGVyQWRkcmVzcwkAAlkAAAABBQAAAAxhZG1pbkFkZHJlc3MGBwEAAAAMd3JpdGVJbnRlZ2VyAAAAAgAAAANrZXkAAAAMaW50ZWdlclZhbHVlCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAADa2V5BQAAAAxpbnRlZ2VyVmFsdWUBAAAAC3dyaXRlU3RyaW5nAAAAAgAAAANrZXkAAAALc3RyaW5nVmFsdWUJAQAAAAtTdHJpbmdFbnRyeQAAAAIFAAAAA2tleQUAAAALc3RyaW5nVmFsdWUAAAAEAAAAAWkBAAAABXNldHVwAAAAAQAAAAttYWluQWRkcmVzcwMJAQAAAAEhAAAAAQkBAAAACWlz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B3aXRoIGFkbWluIGFkZHJlc3MhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkCRPcW",
"height": 1894916,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: UnoRdY5N9CXDWmxqpTT8NpV2XSLfreuC7hmDXJehFco
Next: CGobikNVzPpL5pwBeXERorsdL4a2scP7oqEweJgPLJ7
Diff:
Old | New | | Differences |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Callable(i) |
---|
18 | | - | func setup (adminAddress,mainAddress) = if (!(isDefined(getString(this, "admin")))) |
---|
19 | | - | then [writeString("admin", adminAddress), writeString("main", mainAddress)] |
---|
| 18 | + | func setup (mainAddress) = if (!(isDefined(getString(this, "admin")))) |
---|
| 19 | + | then [writeString("admin", toBase58String(i.caller.bytes)), writeString("main", mainAddress)] |
---|
20 | 20 | | else throw("Pool already setup!") |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let adminAddress = valueOrElse(getString(this, "admin"), "") |
---|
5 | 5 | | |
---|
6 | 6 | | func isAdmin (callerAddress) = if ((callerAddress == fromBase58String(adminAddress))) |
---|
7 | 7 | | then true |
---|
8 | 8 | | else false |
---|
9 | 9 | | |
---|
10 | 10 | | |
---|
11 | 11 | | func writeInteger (key,integerValue) = IntegerEntry(key, integerValue) |
---|
12 | 12 | | |
---|
13 | 13 | | |
---|
14 | 14 | | func writeString (key,stringValue) = StringEntry(key, stringValue) |
---|
15 | 15 | | |
---|
16 | 16 | | |
---|
17 | 17 | | @Callable(i) |
---|
18 | | - | func setup (adminAddress,mainAddress) = if (!(isDefined(getString(this, "admin")))) |
---|
19 | | - | then [writeString("admin", adminAddress), writeString("main", mainAddress)] |
---|
| 18 | + | func setup (mainAddress) = if (!(isDefined(getString(this, "admin")))) |
---|
| 19 | + | then [writeString("admin", toBase58String(i.caller.bytes)), writeString("main", mainAddress)] |
---|
20 | 20 | | else throw("Pool already setup!") |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | |
---|
24 | 24 | | @Callable(i) |
---|
25 | 25 | | func updateStringEntry (key,stringValue) = if (isAdmin(i.caller.bytes)) |
---|
26 | 26 | | then [writeString(key, stringValue)] |
---|
27 | 27 | | else throw("Address does not match with admin address!") |
---|
28 | 28 | | |
---|
29 | 29 | | |
---|
30 | 30 | | |
---|
31 | 31 | | @Callable(i) |
---|
32 | 32 | | func updateIntegerEntry (key,integerValue) = if (isAdmin(i.caller.bytes)) |
---|
33 | 33 | | then [writeInteger(key, integerValue)] |
---|
34 | 34 | | else throw("Address does not match with admin address!") |
---|
35 | 35 | | |
---|
36 | 36 | | |
---|
37 | 37 | | |
---|
38 | 38 | | @Callable(i) |
---|
39 | 39 | | func deleteStorageEntry (key) = if (isAdmin(i.caller.bytes)) |
---|
40 | 40 | | then [DeleteEntry(key)] |
---|
41 | 41 | | else throw("Address does not match with admin address!") |
---|
42 | 42 | | |
---|
43 | 43 | | |
---|
44 | 44 | | @Verifier(tx) |
---|
45 | 45 | | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
46 | 46 | | |
---|