tx · KxeNzrMhp4EsChMTVU7HAWStTu45vwiDoBBMLACbQGh 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy: -0.01000000 Waves 2023.01.17 03:30 [2408218] smart account 3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy > SELF 0.00000000 Waves
{ "type": 13, "id": "KxeNzrMhp4EsChMTVU7HAWStTu45vwiDoBBMLACbQGh", "fee": 1000000, "feeAssetId": null, "timestamp": 1673915457322, "version": 2, "chainId": 84, "sender": "3MumkGGztCKAXpWDqxkddofqXSUbqQkvSJy", "senderPublicKey": "C3PaRKeL8AUKbwUqdniMQtThgcTh5DYHV1777Hkxy7rp", "proofs": [ "5xgfj5cUjs4PJJNgPbxCwsDd8kotVj9j1EdpnDksmcYcXkcuudHhe8QcPhokErxvNq2h3BF4h8Ksa7MeZbEZgMus" ], "script": "base64:BgINCAISAwoBCBIECgIICA4ABWNoYWluCQCwCQEJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEAC3VzZG5Bc3NldElkBAckbWF0Y2gwBQVjaGFpbgMJAAACAgFXBQckbWF0Y2gwASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QMJAAACAgFUBQckbWF0Y2gwASD3dur394PKZdtuE+4CO89YKZWpwdGN8kvabNgdYoDI3gkAAgECDVVua25vd24gY2hhaW4AD2Vjb25vbXlDb250cmFjdAkBEUBleHRyTmF0aXZlKDEwNjIpAQQHJG1hdGNoMAUFY2hhaW4DCQAAAgIBVwUHJG1hdGNoMAIjM1Ayc2sxS25jU3hSYVpzOGI0Q1dHUHcyamt2dmF2NzR1NEQDCQAAAgIBVAUHJG1hdGNoMAIjM044eTR3eFgzSkM0VGRyQ0pCWFgxNlNqV2Y2WDI1NmhyZXAJAAIBAg1Vbmtub3duIGNoYWluAA9zdGFraW5nQ29udHJhY3QJARFAZXh0ck5hdGl2ZSgxMDYyKQEEByRtYXRjaDAFBWNoYWluAwkAAAICAVcFByRtYXRjaDACIzNQTG5j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D3N0YWtpbmdDb250cmFjdAkBD2tleUR1Y2tMb2NhdGlvbgEFC2R1Y2tBc3NldElkAgAEBmhlYWx0aAkBC3ZhbHVlT3JFbHNlAgkAmggCBQ9zdGFraW5nQ29udHJhY3QJAQ1rZXlEdWNrSGVhbHRoAQULZHVja0Fzc2V0SWQA////////////AQQIYmFja3BhY2sJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUPc3Rha2luZ0NvbnRyYWN0CQERa2V5QmFja3BhY2tCeUR1Y2sBBQtkdWNrQXNzZXRJZAIaMDowXzBfMF8wXzBfMDowXzBfMF8wXzBfMDoECGJhbGFuY2VzCQEOd2FsbGV0SW50ZXJuYWwBBQ51c2VyQWRkcmVzc09wdAkAlAoCBQNuaWwJAMwIAgkArAICAhIlcyVkX19zdGFrZWRUaW1lX18JAKQDAQUKc3Rha2VkVGltZQkAzAgCCQCsAgICDSVzJXNfX293bmVyX18FBW93bmVyCQDMCAIJAKwCAgIMJXMlc19fbmFtZV9fBQRuYW1lCQDMCAIJAKwCAgIQJXMlc19fbG9jYXRpb25fXwULY3VyTG9jYXRpb24JAMwIAgkArAICAg4lcyVkX19oZWFsdGhfXwkApAMBBQZoZWFsdGgJAMwIAgkArAICAhAlcyVzX19iYWNrUGFja19fBQhiYWNrcGFjawkAzAgCCQC5CQIJAMwIAgIOJXMlZCVkX193YWxsZXQJAMwIAgkApAMBCQCRAwIFCGJhbGFuY2VzAAAJAMwIAgkApAMBCQCRAwIFCGJhbGFuY2VzAAEFA25pbAICX18FA25pbAADmNlL", "height": 2408218, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BzAL94caPBNHrJANpPWPh5JiWNeJJbnpUyHVJWT3CkyM Next: fjM7qt9tfLoajfYJBzDKRimZRsEEdtmshVnhCrQcFPy Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | - | @Callable(d) | |
16 | - | func walletInfoREADONLY (e) = { | |
17 | - | let f = addressFromString(e) | |
18 | - | let g = if (isDefined(f)) | |
19 | - | then wavesBalance(value(f)) | |
15 | + | let d = addressFromStringValue({ | |
16 | + | let c = a | |
17 | + | if (("W" == c)) | |
18 | + | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
19 | + | else if (("T" == c)) | |
20 | + | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
21 | + | else throw("Unknown chain") | |
22 | + | }) | |
23 | + | ||
24 | + | let e = addressFromStringValue({ | |
25 | + | let c = a | |
26 | + | if (("W" == c)) | |
27 | + | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
28 | + | else if (("T" == c)) | |
29 | + | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
30 | + | else throw("Unknown chain") | |
31 | + | }) | |
32 | + | ||
33 | + | let f = "LAND" | |
34 | + | ||
35 | + | let g = "DUCK" | |
36 | + | ||
37 | + | func h (i) = ("duckOwner_" + i) | |
38 | + | ||
39 | + | ||
40 | + | func j (i) = ("stakedTime_" + i) | |
41 | + | ||
42 | + | ||
43 | + | func k (l) = ("stakedDuckByOwner_" + l) | |
44 | + | ||
45 | + | ||
46 | + | func m (n,i,l) = ((((("stakedTimeByTypeAssetIdAndOwner_" + n) + "_") + i) + "_") + l) | |
47 | + | ||
48 | + | ||
49 | + | func o (p) = ("backPack_" + p) | |
50 | + | ||
51 | + | ||
52 | + | func q (p) = ("duckLocation_" + p) | |
53 | + | ||
54 | + | ||
55 | + | func r (p) = ("duckHealth_" + p) | |
56 | + | ||
57 | + | ||
58 | + | func s (t) = { | |
59 | + | let u = addressFromString(t) | |
60 | + | let v = if (isDefined(u)) | |
61 | + | then wavesBalance(value(u)) | |
20 | 62 | else BalanceDetails(0, 0, 0, 0) | |
21 | - | let | |
22 | - | then assetBalance(value( | |
63 | + | let w = if (isDefined(u)) | |
64 | + | then assetBalance(value(u), b) | |
23 | 65 | else 0 | |
24 | - | $Tuple2(nil, makeString(["%d%d%d%d%d", toString(g.regular), toString(g.available), toString(g.generating), toString(g.effective), toString(h)], "_")) | |
66 | + | [v.available, w] | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | @Callable(x) | |
71 | + | func walletInfoREADONLY (t) = { | |
72 | + | let y = s(t) | |
73 | + | $Tuple2(nil, makeString(["%s%d%d__wallet", toString(y[0]), toString(y[1])], "__")) | |
74 | + | } | |
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | @Callable(x) | |
79 | + | func duckInfoREADONLY (p,t) = { | |
80 | + | let u = addressFromString(t) | |
81 | + | let z = fromBase58String(p) | |
82 | + | if ((p == "")) | |
83 | + | then throw("duckAssetId is required") | |
84 | + | else { | |
85 | + | let A = valueOrElse(getInteger(e, j(p)), 0) | |
86 | + | let B = if ((A > 0)) | |
87 | + | then value(getString(e, h(p))) | |
88 | + | else if (if (isDefined(u)) | |
89 | + | then (assetBalance(value(u), z) == 1) | |
90 | + | else false) | |
91 | + | then t | |
92 | + | else throw("unknown owner") | |
93 | + | let C = value(assetInfo(z)) | |
94 | + | let D = C.name | |
95 | + | let E = valueOrElse(getString(e, q(p)), "") | |
96 | + | let F = valueOrElse(getInteger(e, r(p)), -1) | |
97 | + | let G = valueOrElse(getString(e, o(p)), "0:0_0_0_0_0_0:0_0_0_0_0_0:") | |
98 | + | let y = s(t) | |
99 | + | $Tuple2(nil, [("%s%d__stakedTime__" + toString(A)), ("%s%s__owner__" + B), ("%s%s__name__" + D), ("%s%s__location__" + E), ("%s%d__health__" + toString(F)), ("%s%s__backPack__" + G), makeString(["%s%d%d__wallet", toString(y[0]), toString(y[1])], "__")]) | |
100 | + | } | |
25 | 101 | } | |
26 | 102 | ||
27 | 103 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = toUtf8String(take(drop(this.bytes, 1), 1)) | |
5 | 5 | ||
6 | 6 | let b = { | |
7 | 7 | let c = a | |
8 | 8 | if (("W" == c)) | |
9 | 9 | then base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
10 | 10 | else if (("T" == c)) | |
11 | 11 | then base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ' | |
12 | 12 | else throw("Unknown chain") | |
13 | 13 | } | |
14 | 14 | ||
15 | - | @Callable(d) | |
16 | - | func walletInfoREADONLY (e) = { | |
17 | - | let f = addressFromString(e) | |
18 | - | let g = if (isDefined(f)) | |
19 | - | then wavesBalance(value(f)) | |
15 | + | let d = addressFromStringValue({ | |
16 | + | let c = a | |
17 | + | if (("W" == c)) | |
18 | + | then "3P2sk1KncSxRaZs8b4CWGPw2jkvvav74u4D" | |
19 | + | else if (("T" == c)) | |
20 | + | then "3N8y4wxX3JC4TdrCJBXX16SjWf6X256hrep" | |
21 | + | else throw("Unknown chain") | |
22 | + | }) | |
23 | + | ||
24 | + | let e = addressFromStringValue({ | |
25 | + | let c = a | |
26 | + | if (("W" == c)) | |
27 | + | then "3PLncXtS1U83D6cQbFD3H8rBHPLgzxSFKZ1" | |
28 | + | else if (("T" == c)) | |
29 | + | then "3NDCyBG5q85JuaRiigUeEtainyjCQT3XpZm" | |
30 | + | else throw("Unknown chain") | |
31 | + | }) | |
32 | + | ||
33 | + | let f = "LAND" | |
34 | + | ||
35 | + | let g = "DUCK" | |
36 | + | ||
37 | + | func h (i) = ("duckOwner_" + i) | |
38 | + | ||
39 | + | ||
40 | + | func j (i) = ("stakedTime_" + i) | |
41 | + | ||
42 | + | ||
43 | + | func k (l) = ("stakedDuckByOwner_" + l) | |
44 | + | ||
45 | + | ||
46 | + | func m (n,i,l) = ((((("stakedTimeByTypeAssetIdAndOwner_" + n) + "_") + i) + "_") + l) | |
47 | + | ||
48 | + | ||
49 | + | func o (p) = ("backPack_" + p) | |
50 | + | ||
51 | + | ||
52 | + | func q (p) = ("duckLocation_" + p) | |
53 | + | ||
54 | + | ||
55 | + | func r (p) = ("duckHealth_" + p) | |
56 | + | ||
57 | + | ||
58 | + | func s (t) = { | |
59 | + | let u = addressFromString(t) | |
60 | + | let v = if (isDefined(u)) | |
61 | + | then wavesBalance(value(u)) | |
20 | 62 | else BalanceDetails(0, 0, 0, 0) | |
21 | - | let | |
22 | - | then assetBalance(value( | |
63 | + | let w = if (isDefined(u)) | |
64 | + | then assetBalance(value(u), b) | |
23 | 65 | else 0 | |
24 | - | $Tuple2(nil, makeString(["%d%d%d%d%d", toString(g.regular), toString(g.available), toString(g.generating), toString(g.effective), toString(h)], "_")) | |
66 | + | [v.available, w] | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | @Callable(x) | |
71 | + | func walletInfoREADONLY (t) = { | |
72 | + | let y = s(t) | |
73 | + | $Tuple2(nil, makeString(["%s%d%d__wallet", toString(y[0]), toString(y[1])], "__")) | |
74 | + | } | |
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | @Callable(x) | |
79 | + | func duckInfoREADONLY (p,t) = { | |
80 | + | let u = addressFromString(t) | |
81 | + | let z = fromBase58String(p) | |
82 | + | if ((p == "")) | |
83 | + | then throw("duckAssetId is required") | |
84 | + | else { | |
85 | + | let A = valueOrElse(getInteger(e, j(p)), 0) | |
86 | + | let B = if ((A > 0)) | |
87 | + | then value(getString(e, h(p))) | |
88 | + | else if (if (isDefined(u)) | |
89 | + | then (assetBalance(value(u), z) == 1) | |
90 | + | else false) | |
91 | + | then t | |
92 | + | else throw("unknown owner") | |
93 | + | let C = value(assetInfo(z)) | |
94 | + | let D = C.name | |
95 | + | let E = valueOrElse(getString(e, q(p)), "") | |
96 | + | let F = valueOrElse(getInteger(e, r(p)), -1) | |
97 | + | let G = valueOrElse(getString(e, o(p)), "0:0_0_0_0_0_0:0_0_0_0_0_0:") | |
98 | + | let y = s(t) | |
99 | + | $Tuple2(nil, [("%s%d__stakedTime__" + toString(A)), ("%s%s__owner__" + B), ("%s%s__name__" + D), ("%s%s__location__" + E), ("%s%d__health__" + toString(F)), ("%s%s__backPack__" + G), makeString(["%s%d%d__wallet", toString(y[0]), toString(y[1])], "__")]) | |
100 | + | } | |
25 | 101 | } | |
26 | 102 | ||
27 | 103 |
github/deemru/w8io/026f985 33.10 ms ◑