tx · E2TeSJy2qmKwooAP3jTgCGve8srUkrmV8jsHehVwEqj1 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6: -0.01000000 Waves 2023.02.01 07:01 [2430042] smart account 3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6 > SELF 0.00000000 Waves
{ "type": 13, "id": "E2TeSJy2qmKwooAP3jTgCGve8srUkrmV8jsHehVwEqj1", "fee": 1000000, "feeAssetId": null, "timestamp": 1675224117500, "version": 2, "chainId": 84, "sender": "3MusfsY6PqDh1YnF7YyTi5ffVT16Dm2bqf6", "senderPublicKey": "GmYZFRssDr88KiZt3x4LsJ6qfqaTfMUycQTKZVdipUgS", "proofs": [ "3HYmN3rX2KHZ1t7ipQEcJiGPyMjcruFE8NP323sMTEyBwdAcjQnPPR61Syg7GgsJcLw2HyShpJameELo39NPuanQ" ], "script": "base64:BgIKCAISBAoCCAgSAAACAWkBCXNldE9wdGlvbgIIdmFyaWFibGUFdmFsdWUECWFkbWluTGlzdAQHJG1hdGNoMAkAnQgCBQR0aGlzAgphZG1pbl9saXN0AwkAAQIFByRtYXRjaDACBFVuaXQCBXVuc2V0AwkAAQIFByRtYXRjaDACBlN0cmluZwQBeAUHJG1hdGNoMAUBeAkAAgECC01hdGNoIGVycm9yBBBjYWxsZXJBZGRyZXNzU3RyCQClCAEIBQFpBmNhbGxlcgMJAQIhPQIFCWFkbWluTGlzdAIFdW5zZXQEBHRlc3QJAJ0IAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUJYWRtaW5MaXN0BRBjYWxsZXJBZGRyZXNzU3RyBAdpc0FkbWluBAckbWF0Y2gwBQR0ZXN0AwkAAQIFByRtYXRjaDACBlN0cmluZwQBeAUHJG1hdGNoMAUBeAMJAAECBQckbWF0Y2gwAgRVbml0AghubyBhZG1pbgkAAgECC01hdGNoIGVycm9yAwkBAiE9AgUHaXNBZG1pbgIIbm8gYWRtaW4JAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCBQh2YXJpYWJsZQUFdmFsdWUFA25pbAUEdW5pdAkAAgEJAKwCAgkArAICCQCsAgIJAKwCAgkArAICCQCsAgICD1lvdSBub3QgYWRtaW46IAUJYWRtaW5MaXN0AgssIGlzQWRtaW46IAUHaXNBZG1pbgIULCBjYWxsZXJBZGRyZXNzU3RyOiAFEGNhbGxlckFkZHJlc3NTdHICAiwgCQACAQIQVW5zZXQgYWRtaW4gbGlzdAFpAQZmYXVjZXQABA1pc0tub3duQ2FsbGVyBAckbWF0Y2gwCQCbCAIFBHRoaXMJANgEAQgIBQFpBmNhbGxlcgVieXRlcwMJAAECBQckbWF0Y2gwAgdCb29sZWFuBARoaXN0BQckbWF0Y2gwBQRoaXN0BwQEdFVTRAEgqyRKarZCRuvS/ON5sGG6w65pV01SespFHKdAHRGwKQ4DCQEBIQEFDWlzS25vd25DYWxsZXIJAJQKAgkAzAgCCQEMQm9vbGVhbkVudHJ5AgkA2AQBCAgFAWkGY2FsbGVyBWJ5dGVzBgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAwIQ9BQR1bml0CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgDAhD0FBHRVU0QFA25pbAUEdW5pdAkAAgECFUNhbiBiZSB1c2VkIG9ubHkgb25jZQECdHgBBnZlcmlmeQAEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACD0RhdGFUcmFuc2FjdGlvbgQDZHR4BQckbWF0Y2gwBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleatNZvM=", "height": 2430042, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7tADDsjGjKL2YsTUVbYEAZrjX6P2EYc2sVPsXqr7R6YD Next: 5fG3Agtrdb1dvz29fTaNF4URLWGnAQVa5zDKAFvJ7E4A Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | + | ||
37 | + | @Callable(i) | |
38 | + | func faucet () = { | |
39 | + | let isKnownCaller = match getBoolean(this, toBase58String(i.caller.bytes)) { | |
40 | + | case hist: Boolean => | |
41 | + | hist | |
42 | + | case _ => | |
43 | + | false | |
44 | + | } | |
45 | + | let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85' | |
46 | + | if (!(isKnownCaller)) | |
47 | + | then $Tuple2([BooleanEntry(toBase58String(i.caller.bytes), true), ScriptTransfer(i.caller, 1000000, unit), ScriptTransfer(i.caller, 1000000, tUSD)], unit) | |
48 | + | else throw("Can be used only once") | |
49 | + | } | |
50 | + | ||
51 | + | ||
36 | 52 | @Verifier(tx) | |
37 | 53 | func verify () = match tx { | |
38 | 54 | case dtx: DataTransaction => |
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 | 17 | if ((adminList != "unset")) | |
18 | 18 | then { | |
19 | 19 | let test = getString(addressFromStringValue(adminList), callerAddressStr) | |
20 | 20 | let isAdmin = match test { | |
21 | 21 | case x: String => | |
22 | 22 | x | |
23 | 23 | case _: Unit => | |
24 | 24 | "no admin" | |
25 | 25 | case _ => | |
26 | 26 | throw("Match error") | |
27 | 27 | } | |
28 | 28 | if ((isAdmin != "no admin")) | |
29 | 29 | then $Tuple2([StringEntry(variable, value)], unit) | |
30 | 30 | else throw((((((("You not admin: " + adminList) + ", isAdmin: ") + isAdmin) + ", callerAddressStr: ") + callerAddressStr) + ", ")) | |
31 | 31 | } | |
32 | 32 | else throw("Unset admin list") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | + | ||
37 | + | @Callable(i) | |
38 | + | func faucet () = { | |
39 | + | let isKnownCaller = match getBoolean(this, toBase58String(i.caller.bytes)) { | |
40 | + | case hist: Boolean => | |
41 | + | hist | |
42 | + | case _ => | |
43 | + | false | |
44 | + | } | |
45 | + | let tUSD = base58'CX4p6XcuSBUvv44r1avCqYka5PYAVzBK5hSXaT7maU85' | |
46 | + | if (!(isKnownCaller)) | |
47 | + | then $Tuple2([BooleanEntry(toBase58String(i.caller.bytes), true), ScriptTransfer(i.caller, 1000000, unit), ScriptTransfer(i.caller, 1000000, tUSD)], unit) | |
48 | + | else throw("Can be used only once") | |
49 | + | } | |
50 | + | ||
51 | + | ||
36 | 52 | @Verifier(tx) | |
37 | 53 | func verify () = match tx { | |
38 | 54 | case dtx: DataTransaction => | |
39 | 55 | false | |
40 | 56 | case _ => | |
41 | 57 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | 58 | } | |
43 | 59 |
github/deemru/w8io/169f3d6 82.28 ms ◑