tx · 7xJQ1uhGCqGLXDZ8uJYfiRCzhyUV3Bur8wFkfcVpESCv
3N7y8qhNA8RXkfuzGTLdtmZFZmwbhZtLJhb: -0.01000000 Waves
2023.02.14 20:11 [2449575] smart account 3N7y8qhNA8RXkfuzGTLdtmZFZmwbhZtLJhb > SELF 0.00000000 Waves
{
"type": 13,
"id": "7xJQ1uhGCqGLXDZ8uJYfiRCzhyUV3Bur8wFkfcVpESCv",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1676394791141,
"version": 2,
"chainId": 84,
"sender": "3N7y8qhNA8RXkfuzGTLdtmZFZmwbhZtLJhb",
"senderPublicKey": "GWpjPX6mt3HRdUusZGysPeTyNhb6kELXVYQRJny11i59",
"proofs": [
"3CAmrejvrGDfFs4dFrgGueKsErmnEaFixCdBttkM1rsYZrbQmJy6uoCM6qkzxHcMk1L6HqSgbibF7VvWc7T9Uram"
],
"script": "base64:AAIFAAAAAAAAAA0IAhIDCgEIEgQKAggIAAAAAAAAAAIAAAABaQEAAAAJYWNjZXB0UmVnAAAAAQAAAA1wcm92aWRlcl9hZGRyBAAAAAxvcHRpb25zX2FkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRBW/gr9hfqKqHLxIrx+8e7siBhMf6HIMEEAAAACWFkbWluTGlzdAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAxvcHRpb25zX2FkZHICAAAACmFkbWluX2xpc3QDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQCAAAABXVuc2V0AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAXgFAAAAByRtYXRjaDAFAAAAAXgJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IEAAAAEGNhbGxlckFkZHJlc3NTdHIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkBAAAAAiE9AAAAAgUAAAAJYWRtaW5MaXN0AgAAAAV1bnNldAQAAAAEdGVzdAkABB0AAAACCQEAAAARQGV4dHJ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0A==",
"height": 2449575,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 6kk8y4UsjTjk2Z4mpJ67yRHET1M8LFg37zD9TVMPTCbV
Next: Hwu5a59LmVmQnvrTbdKaAi2noCH4d4zAu9iQo9ZxwcSu
Diff:
Old | New | | Differences |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func setOption (variable,value) = { |
---|
8 | | - | let adminList = match getString(this, "admin_list") { |
---|
| 7 | + | func acceptReg (provider_addr) = { |
---|
| 8 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') |
---|
| 9 | + | let adminList = match getString(options_addr, "admin_list") { |
---|
9 | 10 | | case _: Unit => |
---|
10 | 11 | | "unset" |
---|
11 | 12 | | case x: String => |
---|
|
26 | 27 | | throw("Match error") |
---|
27 | 28 | | } |
---|
28 | 29 | | if ((isAdmin != "no admin")) |
---|
29 | | - | then $Tuple2([StringEntry(variable, value)], unit) |
---|
| 30 | + | then $Tuple2([StringEntry(provider_addr, "")], unit) |
---|
30 | 31 | | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) |
---|
31 | 32 | | } |
---|
32 | 33 | | else throw("Unset admin list") |
---|
|
35 | 36 | | |
---|
36 | 37 | | |
---|
37 | 38 | | @Callable(i) |
---|
38 | | - | func delOption (variable) = { |
---|
39 | | - | let adminList = match getString(this, "admin_list") { |
---|
| 39 | + | func rejectReg (provider_addr,confirm_data) = { |
---|
| 40 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') |
---|
| 41 | + | let adminList = match getString(options_addr, "admin_list") { |
---|
40 | 42 | | case _: Unit => |
---|
41 | 43 | | "unset" |
---|
42 | 44 | | case x: String => |
---|
|
57 | 59 | | throw("Match error") |
---|
58 | 60 | | } |
---|
59 | 61 | | if ((isAdmin != "no admin")) |
---|
60 | | - | then $Tuple2([DeleteEntry(variable)], unit) |
---|
| 62 | + | then $Tuple2([StringEntry(provider_addr, confirm_data)], unit) |
---|
61 | 63 | | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) |
---|
62 | 64 | | } |
---|
63 | 65 | | else throw("Unset admin list") |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func setOption (variable,value) = { |
---|
8 | | - | let adminList = match getString(this, "admin_list") { |
---|
| 7 | + | func acceptReg (provider_addr) = { |
---|
| 8 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') |
---|
| 9 | + | let adminList = match getString(options_addr, "admin_list") { |
---|
9 | 10 | | case _: Unit => |
---|
10 | 11 | | "unset" |
---|
11 | 12 | | case x: String => |
---|
12 | 13 | | x |
---|
13 | 14 | | case _ => |
---|
14 | 15 | | throw("Match error") |
---|
15 | 16 | | } |
---|
16 | 17 | | let callerAddressStr = toString(i.caller) |
---|
17 | 18 | | if ((adminList != "unset")) |
---|
18 | 19 | | then { |
---|
19 | 20 | | let test = getString(addressFromStringValue(adminList), callerAddressStr) |
---|
20 | 21 | | let isAdmin = match test { |
---|
21 | 22 | | case x: String => |
---|
22 | 23 | | x |
---|
23 | 24 | | case _: Unit => |
---|
24 | 25 | | "no admin" |
---|
25 | 26 | | case _ => |
---|
26 | 27 | | throw("Match error") |
---|
27 | 28 | | } |
---|
28 | 29 | | if ((isAdmin != "no admin")) |
---|
29 | | - | then $Tuple2([StringEntry(variable, value)], unit) |
---|
| 30 | + | then $Tuple2([StringEntry(provider_addr, "")], unit) |
---|
30 | 31 | | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) |
---|
31 | 32 | | } |
---|
32 | 33 | | else throw("Unset admin list") |
---|
33 | 34 | | } |
---|
34 | 35 | | |
---|
35 | 36 | | |
---|
36 | 37 | | |
---|
37 | 38 | | @Callable(i) |
---|
38 | | - | func delOption (variable) = { |
---|
39 | | - | let adminList = match getString(this, "admin_list") { |
---|
| 39 | + | func rejectReg (provider_addr,confirm_data) = { |
---|
| 40 | + | let options_addr = Address(base58'3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6') |
---|
| 41 | + | let adminList = match getString(options_addr, "admin_list") { |
---|
40 | 42 | | case _: Unit => |
---|
41 | 43 | | "unset" |
---|
42 | 44 | | case x: String => |
---|
43 | 45 | | x |
---|
44 | 46 | | case _ => |
---|
45 | 47 | | throw("Match error") |
---|
46 | 48 | | } |
---|
47 | 49 | | let callerAddressStr = toString(i.caller) |
---|
48 | 50 | | if ((adminList != "unset")) |
---|
49 | 51 | | then { |
---|
50 | 52 | | let test = getString(addressFromStringValue(adminList), callerAddressStr) |
---|
51 | 53 | | let isAdmin = match test { |
---|
52 | 54 | | case x: String => |
---|
53 | 55 | | x |
---|
54 | 56 | | case _: Unit => |
---|
55 | 57 | | "no admin" |
---|
56 | 58 | | case _ => |
---|
57 | 59 | | throw("Match error") |
---|
58 | 60 | | } |
---|
59 | 61 | | if ((isAdmin != "no admin")) |
---|
60 | | - | then $Tuple2([DeleteEntry(variable)], unit) |
---|
| 62 | + | then $Tuple2([StringEntry(provider_addr, confirm_data)], unit) |
---|
61 | 63 | | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) |
---|
62 | 64 | | } |
---|
63 | 65 | | else throw("Unset admin list") |
---|
64 | 66 | | } |
---|
65 | 67 | | |
---|
66 | 68 | | |
---|
67 | 69 | | @Verifier(tx) |
---|
68 | 70 | | func verify () = match tx { |
---|
69 | 71 | | case _ => |
---|
70 | 72 | | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) |
---|
71 | 73 | | } |
---|
72 | 74 | | |
---|