tx · F7xwzz2MDq1ZmHRnQcSVhfm56NA9znQiaXMSGJzCPPXx 3MwgDbpnUQcr7MiFVQ1NcNgTBvkRytdGd2R: -0.00200000 Waves 2022.11.23 16:44 [2329826] smart account 3MwgDbpnUQcr7MiFVQ1NcNgTBvkRytdGd2R > SELF 0.00000000 Waves
{ "type": 13, "id": "F7xwzz2MDq1ZmHRnQcSVhfm56NA9znQiaXMSGJzCPPXx", "fee": 200000, "feeAssetId": null, "timestamp": 1669211111707, "version": 2, "chainId": 84, "sender": "3MwgDbpnUQcr7MiFVQ1NcNgTBvkRytdGd2R", "senderPublicKey": "6kGDUcAPHWXGnMU89GNpRLQT8qawCijYhNB4zF8EV6kK", "proofs": [ "5S2fsqzNE1XipE3A7vCXxaUXLVjbNMGdU9M5mAufNwkWgyxqB8MbjYrajaMp6p5jK38MqqVNziCRNqak9D2LVPHY" ], "script": "base64:BgIWCAISAwoBCBIDCgEIEgMKAQgSAwoBAQYACVNFUEFSQVRPUgICX18ACEtFWV9JTklUAgRJTklUAAxLRVlfTVVMVElTSUcCCE1VTFRJU0lHAApLRVlfU1RBVFVTAgZTVEFUVVMAC0tFWV9DTEFJTUVSAgdDTEFJTUVSARBfdmFsaWRhdGVBZGRyZXNzAQhhZGRyZXNzXwQHJG1hdGNoMAkApggBBQhhZGRyZXNzXwMJAAECBQckbWF0Y2gwAgdBZGRyZXNzBAFhBQckbWF0Y2gwBgcEAWkBBGluaXQBCGNsYWltZXJfBAhtdWx0aXNpZwkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCiCAEFDEtFWV9NVUxUSVNJRwIVaW5pdDogbm8gbXVsdGlzaWcgc2V0BARpbml0CQELdmFsdWVPckVsc2UCCQCgCAEFCEtFWV9JTklUBwQDZXJyAwkBAiE9AggFAWkGY2FsbGVyBQR0aGlzCQACAQIXaW5pdDogcGVybWlzc2lvbiBkZW5pZWQDBQRpbml0CQACAQIZaW5pdDogYWxyZWFkeSBpbml0aWFsaXplZAMJAQEhAQ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aXRzZWxmLgFpAQVjbGFpbQEHYW1vdW50XwMJAQIhPQIIBQFpBmNhbGxlcgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBEUBleHRyTmF0aXZlKDEwNTgpAQULS0VZX0NMQUlNRVIJAAIBAhhjbGFpbTogcGVybWlzc2lvbiBkZW5pZWQDAwkAZwIAAAUHYW1vdW50XwYJAGYCBQdhbW91bnRfCAkA7wcBBQR0aGlzB3JlZ3VsYXIJAAIBAhVjbGFpbTogaW52YWxpZCBhbW91bnQJAJQKAgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFB2Ftb3VudF8FBHVuaXQFA25pbAUEdW5pdAECdHgBBnZlcmlmeQAEByRtYXRjaDAJAKIIAQUMS0VZX01VTFRJU0lHAwkAAQIFByRtYXRjaDACBlN0cmluZwQIbXVsdGlzaWcFByRtYXRjaDAJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIbXVsdGlzaWcJALkJAgkAzAgCBQpLRVlfU1RBVFVTCQDMCAIJAKUIAQUEdGhpcwkAzAgCCQDYBAEIBQJ0eAJpZAUDbmlsBQlTRVBBUkFUT1IHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5r/ldwA==", "height": 2329826, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "__" | |
5 | + | ||
6 | + | let b = "INIT" | |
7 | + | ||
8 | + | let c = "MULTISIG" | |
9 | + | ||
10 | + | let d = "STATUS" | |
11 | + | ||
12 | + | let e = "CLAIMER" | |
13 | + | ||
14 | + | func f (g) = { | |
15 | + | let h = addressFromString(g) | |
16 | + | if ($isInstanceOf(h, "Address")) | |
17 | + | then { | |
18 | + | let i = h | |
19 | + | true | |
20 | + | } | |
21 | + | else false | |
22 | + | } | |
23 | + | ||
24 | + | ||
25 | + | @Callable(j) | |
26 | + | func init (k) = { | |
27 | + | let l = valueOrErrorMessage(getString(c), "init: no multisig set") | |
28 | + | let m = valueOrElse(getBoolean(b), false) | |
29 | + | let n = if ((j.caller != this)) | |
30 | + | then throw("init: permission denied") | |
31 | + | else if (m) | |
32 | + | then throw("init: already initialized") | |
33 | + | else if (!(f(k))) | |
34 | + | then throw("init: invalid claimer address") | |
35 | + | else unit | |
36 | + | if ((n == n)) | |
37 | + | then $Tuple2([BooleanEntry(b, true), StringEntry(e, k)], unit) | |
38 | + | else throw("Strict value is not equal to itself.") | |
39 | + | } | |
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | @Callable(j) | |
44 | + | func setMultisig (o) = { | |
45 | + | let n = if ((j.caller != this)) | |
46 | + | then throw("setMultisig: permission denied") | |
47 | + | else if (!(f(o))) | |
48 | + | then throw("setMultisig: invalid multisig address") | |
49 | + | else unit | |
50 | + | if ((n == n)) | |
51 | + | then $Tuple2([StringEntry(c, o)], unit) | |
52 | + | else throw("Strict value is not equal to itself.") | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | @Callable(j) | |
58 | + | func setClaimer (k) = { | |
59 | + | let n = if ((j.caller != this)) | |
60 | + | then throw("setClaimer: permission denied") | |
61 | + | else if (!(f(k))) | |
62 | + | then throw("setClaimer: invalid claimer address") | |
63 | + | else unit | |
64 | + | if ((n == n)) | |
65 | + | then $Tuple2([StringEntry(e, k)], unit) | |
66 | + | else throw("Strict value is not equal to itself.") | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | @Callable(j) | |
72 | + | func claim (p) = if ((j.caller != addressFromStringValue(getStringValue(e)))) | |
73 | + | then throw("claim: permission denied") | |
74 | + | else if (if ((0 >= p)) | |
75 | + | then true | |
76 | + | else (p > wavesBalance(this).regular)) | |
77 | + | then throw("claim: invalid amount") | |
78 | + | else $Tuple2([ScriptTransfer(j.caller, p, unit)], unit) | |
79 | + | ||
80 | + | ||
81 | + | @Verifier(q) | |
82 | + | func r () = { | |
83 | + | let h = getString(c) | |
84 | + | if ($isInstanceOf(h, "String")) | |
85 | + | then { | |
86 | + | let l = h | |
87 | + | valueOrElse(getBoolean(addressFromStringValue(l), makeString([d, toString(this), toBase58String(q.id)], a)), false) | |
88 | + | } | |
89 | + | else sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) | |
90 | + | } | |
91 | + |
github/deemru/w8io/026f985 16.38 ms ◑