tx · EEB1kxiyWNTrthSru6Qc2Sgmu3umgkdzcJhGtXCgxqgV
3MwvooYHA22kyPsQkRNQ8zkqaVQaSvwAuz2: -0.00100000 Waves
2022.07.06 16:08 [2127861] smart account 3MwvooYHA22kyPsQkRNQ8zkqaVQaSvwAuz2 > SELF 0.00000000 Waves
{
"type": 13,
"id": "EEB1kxiyWNTrthSru6Qc2Sgmu3umgkdzcJhGtXCgxqgV",
"fee": 100000,
"feeAssetId": null,
"timestamp": 1657113019545,
"version": 2,
"chainId": 84,
"sender": "3MwvooYHA22kyPsQkRNQ8zkqaVQaSvwAuz2",
"senderPublicKey": "7Sz8q9VzovjXEiBaupHd5syNkwyUfLaKf4pwETwksZLT",
"proofs": [
"2qVNyCRZrLBzpy32YJfAyGJydK7nXGq1xTidkWd4MoeWjt1xub4jYogQNq84LaR6cEAuWKqhDXUbtqEro1rm4VAp"
],
"script": "base64:BgIMCAISAwoBARIDCgEBAAIBaQEHcHJvY2VzcwEFZGVwdGgEBWNsYWltCQD8BwQFBHRoaXMCBWNsYWltCQDMCAIFBWRlcHRoBQNuaWwFA25pbAMJAAACBQVjbGFpbQUFY2xhaW0DCQAAAgUFZGVwdGgAAAkAlAoCBQNuaWwFBHVuaXQEA3JlcwkA/AcEBQR0aGlzAgdwcm9jZXNzCQDMCAIJAGUCBQVkZXB0aAABBQNuaWwFA25pbAMJAAACBQNyZXMFA3JlcwkAlAoCBQNuaWwFA3JlcwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQVjbGFpbQEFZGVwdGgECmNoZWNrRGVwdGgEByRtYXRjaDAJAJoIAgUEdGhpcwIEdGVzdAMJAAECBQckbWF0Y2gwAgRVbml0BQR1bml0AwkAAQIFByRtYXRjaDACA0ludAQDbnVtBQckbWF0Y2gwAwkBAiE9AgkAZQIFA251bQABBQVkZXB0aAkAAgECBW9vb3BzBQR1bml0CQACAQILTWF0Y2ggZXJyb3IDCQAAAgUKY2hlY2tEZXB0aAUKY2hlY2tEZXB0aAkAlAoCCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgR0ZXN0BQVkZXB0aAUDbmlsBQR1bml0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAOmNL/g=",
"height": 2127861,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: CpJSyW4v1feiGgrgj1zhwY9rh3JxJLzGA2QgRqJ4s8ST
Next: 3BdbXYJtZ2AB8CTjCsDY2eRrUNQEgGTJK26Ks2SdSSa8
Diff:
Old | New | | Differences |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | | - | func call (depth,startHeight) = { |
---|
8 | | - | let checkHeight = if (if ((startHeight != 0)) |
---|
9 | | - | then (height != startHeight) |
---|
10 | | - | else false) |
---|
11 | | - | then throw("invalid height") |
---|
12 | | - | else unit |
---|
13 | | - | if ((checkHeight == checkHeight)) |
---|
| 7 | + | func process (depth) = { |
---|
| 8 | + | let claim = invoke(this, "claim", [depth], nil) |
---|
| 9 | + | if ((claim == claim)) |
---|
14 | 10 | | then if ((depth == 0)) |
---|
15 | 11 | | then $Tuple2(nil, unit) |
---|
16 | 12 | | else { |
---|
17 | | - | let startHeightNew = if ((startHeight == 0)) |
---|
18 | | - | then height |
---|
19 | | - | else startHeight |
---|
20 | | - | let res = invoke(this, "call", [(depth - 1), startHeightNew], nil) |
---|
| 13 | + | let res = invoke(this, "process", [(depth - 1)], nil) |
---|
21 | 14 | | if ((res == res)) |
---|
22 | 15 | | then $Tuple2(nil, res) |
---|
23 | 16 | | else throw("Strict value is not equal to itself.") |
---|
|
26 | 19 | | } |
---|
27 | 20 | | |
---|
28 | 21 | | |
---|
| 22 | + | |
---|
| 23 | + | @Callable(i) |
---|
| 24 | + | func claim (depth) = { |
---|
| 25 | + | let checkDepth = match getInteger(this, "test") { |
---|
| 26 | + | case _: Unit => |
---|
| 27 | + | unit |
---|
| 28 | + | case num: Int => |
---|
| 29 | + | if (((num - 1) != depth)) |
---|
| 30 | + | then throw("ooops") |
---|
| 31 | + | else unit |
---|
| 32 | + | case _ => |
---|
| 33 | + | throw("Match error") |
---|
| 34 | + | } |
---|
| 35 | + | if ((checkDepth == checkDepth)) |
---|
| 36 | + | then $Tuple2([IntegerEntry("test", depth)], unit) |
---|
| 37 | + | else throw("Strict value is not equal to itself.") |
---|
| 38 | + | } |
---|
| 39 | + | |
---|
| 40 | + | |
---|
Full:
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 | | - | func call (depth,startHeight) = { |
---|
8 | | - | let checkHeight = if (if ((startHeight != 0)) |
---|
9 | | - | then (height != startHeight) |
---|
10 | | - | else false) |
---|
11 | | - | then throw("invalid height") |
---|
12 | | - | else unit |
---|
13 | | - | if ((checkHeight == checkHeight)) |
---|
| 7 | + | func process (depth) = { |
---|
| 8 | + | let claim = invoke(this, "claim", [depth], nil) |
---|
| 9 | + | if ((claim == claim)) |
---|
14 | 10 | | then if ((depth == 0)) |
---|
15 | 11 | | then $Tuple2(nil, unit) |
---|
16 | 12 | | else { |
---|
17 | | - | let startHeightNew = if ((startHeight == 0)) |
---|
18 | | - | then height |
---|
19 | | - | else startHeight |
---|
20 | | - | let res = invoke(this, "call", [(depth - 1), startHeightNew], nil) |
---|
| 13 | + | let res = invoke(this, "process", [(depth - 1)], nil) |
---|
21 | 14 | | if ((res == res)) |
---|
22 | 15 | | then $Tuple2(nil, res) |
---|
23 | 16 | | else throw("Strict value is not equal to itself.") |
---|
24 | 17 | | } |
---|
25 | 18 | | else throw("Strict value is not equal to itself.") |
---|
26 | 19 | | } |
---|
27 | 20 | | |
---|
28 | 21 | | |
---|
| 22 | + | |
---|
| 23 | + | @Callable(i) |
---|
| 24 | + | func claim (depth) = { |
---|
| 25 | + | let checkDepth = match getInteger(this, "test") { |
---|
| 26 | + | case _: Unit => |
---|
| 27 | + | unit |
---|
| 28 | + | case num: Int => |
---|
| 29 | + | if (((num - 1) != depth)) |
---|
| 30 | + | then throw("ooops") |
---|
| 31 | + | else unit |
---|
| 32 | + | case _ => |
---|
| 33 | + | throw("Match error") |
---|
| 34 | + | } |
---|
| 35 | + | if ((checkDepth == checkDepth)) |
---|
| 36 | + | then $Tuple2([IntegerEntry("test", depth)], unit) |
---|
| 37 | + | else throw("Strict value is not equal to itself.") |
---|
| 38 | + | } |
---|
| 39 | + | |
---|
| 40 | + | |
---|