tx · 6vUFbjfbpUZS49RSnUMy2XHomoFJWoNuCo2ip5RpCmUQ
3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6: -0.01000000 Waves
2023.01.31 22:38 [2429550] smart account 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6 > SELF 0.00000000 Waves
{
"type": 13,
"id": "6vUFbjfbpUZS49RSnUMy2XHomoFJWoNuCo2ip5RpCmUQ",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1675193976567,
"version": 2,
"chainId": 84,
"sender": "3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6",
"senderPublicKey": "GmYZFRssDr88KiZt3x4LsJ6qfqaTfMUycQTKZVdipUgS",
"proofs": [
"2daHfUedipm8jWnBEtuWEutKr1H1jXRooowAE1NWLjD69TZop9gTtx5mvJtJmtoN4bkLi2HkgH2ad88k78eabuNq"
],
"script": "base64:BgIICAISBAoCCAgAAQFpAQlzZXRPcHRpb24CCHZhcmlhYmxlBXZhbHVlBAlhZG1pbkxpc3QEByRtYXRjaDAJAJ0IAgUEdGhpcwIKYWRtaW5fbGlzdAMJAAECBQckbWF0Y2gwAgRVbml0AgV1bnNldAMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXgFByRtYXRjaDAFAXgJAAIBAgtNYXRjaCBlcnJvcgQQY2FsbGVyQWRkcmVzc1N0cgkApQgBCAUBaQZjYWxsZXIDCQECIT0CBQlhZG1pbkxpc3QCBXVuc2V0BAR0ZXN0CQCdCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCWFkbWluTGlzdAUQY2FsbGVyQWRkcmVzc1N0cgQHaXNBZG1pbgQHJG1hdGNoMAUEdGVzdAMJAAECBQckbWF0Y2gwAgZTdHJpbmcEAXgFByRtYXRjaDAFAXgDCQABAgUHJG1hdGNoMAIEVW5pdAIIbm8gYWRtaW4JAAIBAgtNYXRjaCBlcnJvcgMJAQIhPQIFB2lzQWRtaW4CCG5vIGFkbWluCQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgUIdmFyaWFibGUFBXZhbHVlBQNuaWwFBHVuaXQJAAIBCQCsAgIJAKwCAgkArAICCQCsAgIJAKwCAgkArAICAg9Zb3Ugbm90IGFkbWluOiAFCWFkbWluTGlzdAILLCBpc0FkbWluOiAFB2lzQWRtaW4CFCwgY2FsbGVyQWRkcmVzc1N0cjogBRBjYWxsZXJBZGRyZXNzU3RyAgIsIAkAAgECEFVuc2V0IGFkbWluIGxpc3QBAnR4AQZ2ZXJpZnkABAckbWF0Y2gwBQJ0eAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleY5TUKM=",
"height": 2429550,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: DgCJEjFWeAztV7XxKPFApK3QpSVGMWsHLSVmJ339PffL
Next: 7tADDsjGjKL2YsTUVbYEAZrjX6P2EYc2sVPsXqr7R6YD
Diff:
Old | New | | Differences |
---|
14 | 14 | | throw("Match error") |
---|
15 | 15 | | } |
---|
16 | 16 | | let callerAddressStr = toString(i.caller) |
---|
17 | | - | let testadr = base58'3N6qFzWmhjoTvsk1bC2iN38i2qH95pqc6S7' |
---|
18 | 17 | | if ((adminList != "unset")) |
---|
19 | 18 | | then { |
---|
20 | | - | let test = getString(Address(testadr), callerAddressStr) |
---|
| 19 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) |
---|
21 | 20 | | let isAdmin = match test { |
---|
22 | 21 | | case x: String => |
---|
23 | 22 | | x |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func setOption (variable,value) = { |
---|
8 | 8 | | let adminList = match getString(this, "admin_list") { |
---|
9 | 9 | | case _: Unit => |
---|
10 | 10 | | "unset" |
---|
11 | 11 | | case x: String => |
---|
12 | 12 | | x |
---|
13 | 13 | | case _ => |
---|
14 | 14 | | throw("Match error") |
---|
15 | 15 | | } |
---|
16 | 16 | | let callerAddressStr = toString(i.caller) |
---|
17 | | - | let testadr = base58'3N6qFzWmhjoTvsk1bC2iN38i2qH95pqc6S7' |
---|
18 | 17 | | if ((adminList != "unset")) |
---|
19 | 18 | | then { |
---|
20 | | - | let test = getString(Address(testadr), callerAddressStr) |
---|
| 19 | + | let test = getString(addressFromStringValue(adminList), callerAddressStr) |
---|
21 | 20 | | let isAdmin = match test { |
---|
22 | 21 | | case x: String => |
---|
23 | 22 | | x |
---|
24 | 23 | | case _: Unit => |
---|
25 | 24 | | "no admin" |
---|
26 | 25 | | case _ => |
---|
27 | 26 | | throw("Match error") |
---|
28 | 27 | | } |
---|
29 | 28 | | if ((isAdmin != "no admin")) |
---|
30 | 29 | | then $Tuple2([StringEntry(variable, value)], unit) |
---|
31 | 30 | | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) |
---|
32 | 31 | | } |
---|
33 | 32 | | else throw("Unset admin list") |
---|
34 | 33 | | } |
---|
35 | 34 | | |
---|
36 | 35 | | |
---|
37 | 36 | | @Verifier(tx) |
---|
38 | 37 | | func verify () = match tx { |
---|
39 | 38 | | case _ => |
---|
40 | 39 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
41 | 40 | | } |
---|
42 | 41 | | |
---|