tx · 6dqSR13AkJcTe5n48uyEH118aPSDkV82espR2dK82kZs
3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt: -0.05000000 Waves
2023.03.22 11:38 [2501001] smart account 3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt > SELF 0.00000000 Waves
{
"type": 13,
"id": "6dqSR13AkJcTe5n48uyEH118aPSDkV82espR2dK82kZs",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1679474365321,
"version": 2,
"chainId": 84,
"sender": "3N3irEKCdj77h97aEbfj3fa3uMXCNCXVhKt",
"senderPublicKey": "FACNGaFYnR8yFbQFg9sRBpzGVCyzMyLeVw3JMhGQT1wn",
"proofs": [
"2dYhyDD9cQS1yRQAQWMHiewmUG4MSgvpYXAy8SkV8N4nDewrR1vkCFckMxv7yuojrU6fmyfUkmEshve46hvWTyMT"
],
"script": "base64:BgIGCAISABIABAATcGVwZUNvbnRyYWN0QWRkcmVzcwIjM040a1haSEdrZTZ5UnEzWjU3cTdCVGdDclQyU0N2UUNZRVIADnNXYXZlc0lkU3RyaW5nAixGWGlGeGVkUDc2Q21nMXY0WEdORFlKcE5FOWdUR1BSRzF6amZrbVVzR2hGbQAMcGVwZUNvbnRyYWN0CQERQGV4dHJOYXRpdmUoMTA2MikBBRNwZXBlQ29udHJhY3RBZGRyZXNzAAZzV2F2ZXMJANkEAQUOc1dhdmVzSWRTdHJpbmcCAWkBB2dldFJhdGUABAdyZXN1bHRzCQD8BwQFDHBlcGVDb250cmFjdAIHZ2V0UmF0ZQUDbmlsBQNuaWwEByRtYXRjaDAFB3Jlc3VsdHMDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAF0BQckbWF0Y2gwCQCUCgIFA25pbAUBdAkAAgECBUVycm9yAWkBB2RlcG9zaXQABAxzdGFydEJhbGFuY2UJAPAHAgUEdGhpcwUGc1dhdmVzBAdyZXN1bHRzCQD8BwQFDHBlcGVDb250cmFjdAIHZGVwb3NpdAUDbmlsCAUBaQhwYXltZW50cwMJAAACBQdyZXN1bHRzBQdyZXN1bHRzBAckbWF0Y2gwBQdyZXN1bHRzAwkAAQIFByRtYXRjaDACBFVuaXQEAWEFByRtYXRjaDAECm5ld0JhbGFuY2UJAPAHAgUEdGhpcwUGc1dhdmVzCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgkAZQIFCm5ld0JhbGFuY2UFDHN0YXJ0QmFsYW5jZQUGc1dhdmVzBQNuaWwJAAIBAg1FcnJvciBkZXBvc2l0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAEj3iE4=",
"height": 2501001,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2QeTbFHbUwzFeqeV46HMsMsjat1uTaFx8TYsukFR7Nbf
Next: DmEvoNtfouYRyRk238qN5fQS7bFnas6Bprh9gb4DoamK
Diff:
Old | New | | Differences |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER" |
---|
5 | 5 | | |
---|
6 | | - | let b = addressFromStringValue(a) |
---|
| 6 | + | let b = "FXiFxedP76Cmg1v4XGNDYJpNE9gTGPRG1zjfkmUsGhFm" |
---|
7 | 7 | | |
---|
8 | | - | @Callable(c) |
---|
| 8 | + | let c = addressFromStringValue(a) |
---|
| 9 | + | |
---|
| 10 | + | let d = fromBase58String(b) |
---|
| 11 | + | |
---|
| 12 | + | @Callable(e) |
---|
9 | 13 | | func getRate () = { |
---|
10 | | - | let d = invoke(b, "getRate", nil, nil) |
---|
11 | | - | let e = d |
---|
12 | | - | if ($isInstanceOf(e, "String")) |
---|
| 14 | + | let f = invoke(c, "getRate", nil, nil) |
---|
| 15 | + | let g = f |
---|
| 16 | + | if ($isInstanceOf(g, "String")) |
---|
13 | 17 | | then { |
---|
14 | | - | let f = e |
---|
15 | | - | $Tuple2(nil, f) |
---|
| 18 | + | let h = g |
---|
| 19 | + | $Tuple2(nil, h) |
---|
16 | 20 | | } |
---|
17 | 21 | | else throw("Error") |
---|
18 | 22 | | } |
---|
19 | 23 | | |
---|
20 | 24 | | |
---|
21 | 25 | | |
---|
22 | | - | @Callable(c) |
---|
| 26 | + | @Callable(e) |
---|
23 | 27 | | func deposit () = { |
---|
24 | | - | let d = invoke(b, "deposit", nil, c.payments) |
---|
25 | | - | let e = d |
---|
26 | | - | if ($isInstanceOf(e, "Unit")) |
---|
| 28 | + | let i = assetBalance(this, d) |
---|
| 29 | + | let f = invoke(c, "deposit", nil, e.payments) |
---|
| 30 | + | if ((f == f)) |
---|
27 | 31 | | then { |
---|
28 | | - | let g = e |
---|
29 | | - | nil |
---|
| 32 | + | let g = f |
---|
| 33 | + | if ($isInstanceOf(g, "Unit")) |
---|
| 34 | + | then { |
---|
| 35 | + | let j = g |
---|
| 36 | + | let k = assetBalance(this, d) |
---|
| 37 | + | [ScriptTransfer(e.caller, (k - i), d)] |
---|
| 38 | + | } |
---|
| 39 | + | else throw("Error deposit") |
---|
30 | 40 | | } |
---|
31 | | - | else throw("Error deposit") |
---|
| 41 | + | else throw("Strict value is not equal to itself.") |
---|
32 | 42 | | } |
---|
33 | 43 | | |
---|
34 | 44 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER" |
---|
5 | 5 | | |
---|
6 | | - | let b = addressFromStringValue(a) |
---|
| 6 | + | let b = "FXiFxedP76Cmg1v4XGNDYJpNE9gTGPRG1zjfkmUsGhFm" |
---|
7 | 7 | | |
---|
8 | | - | @Callable(c) |
---|
| 8 | + | let c = addressFromStringValue(a) |
---|
| 9 | + | |
---|
| 10 | + | let d = fromBase58String(b) |
---|
| 11 | + | |
---|
| 12 | + | @Callable(e) |
---|
9 | 13 | | func getRate () = { |
---|
10 | | - | let d = invoke(b, "getRate", nil, nil) |
---|
11 | | - | let e = d |
---|
12 | | - | if ($isInstanceOf(e, "String")) |
---|
| 14 | + | let f = invoke(c, "getRate", nil, nil) |
---|
| 15 | + | let g = f |
---|
| 16 | + | if ($isInstanceOf(g, "String")) |
---|
13 | 17 | | then { |
---|
14 | | - | let f = e |
---|
15 | | - | $Tuple2(nil, f) |
---|
| 18 | + | let h = g |
---|
| 19 | + | $Tuple2(nil, h) |
---|
16 | 20 | | } |
---|
17 | 21 | | else throw("Error") |
---|
18 | 22 | | } |
---|
19 | 23 | | |
---|
20 | 24 | | |
---|
21 | 25 | | |
---|
22 | | - | @Callable(c) |
---|
| 26 | + | @Callable(e) |
---|
23 | 27 | | func deposit () = { |
---|
24 | | - | let d = invoke(b, "deposit", nil, c.payments) |
---|
25 | | - | let e = d |
---|
26 | | - | if ($isInstanceOf(e, "Unit")) |
---|
| 28 | + | let i = assetBalance(this, d) |
---|
| 29 | + | let f = invoke(c, "deposit", nil, e.payments) |
---|
| 30 | + | if ((f == f)) |
---|
27 | 31 | | then { |
---|
28 | | - | let g = e |
---|
29 | | - | nil |
---|
| 32 | + | let g = f |
---|
| 33 | + | if ($isInstanceOf(g, "Unit")) |
---|
| 34 | + | then { |
---|
| 35 | + | let j = g |
---|
| 36 | + | let k = assetBalance(this, d) |
---|
| 37 | + | [ScriptTransfer(e.caller, (k - i), d)] |
---|
| 38 | + | } |
---|
| 39 | + | else throw("Error deposit") |
---|
30 | 40 | | } |
---|
31 | | - | else throw("Error deposit") |
---|
| 41 | + | else throw("Strict value is not equal to itself.") |
---|
32 | 42 | | } |
---|
33 | 43 | | |
---|
34 | 44 | | |
---|