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